From 3ee6172ab09571d3db550c8798481fd5923159c9 Mon Sep 17 00:00:00 2001 From: wuxianlin Date: Fri, 18 Sep 2015 08:39:15 +0800 Subject: [PATCH] more update --- .../smali/android/app/ContextImpl.smali | 8 ++ ...upplicantStateTracker$CompletedState.smali | 2 + .../SupplicantStateTracker$DefaultState.smali | 4 + ...licantStateTracker$DisconnectedState.smali | 2 +- .../net/wifi/SupplicantStateTracker.smali | 14 ++- .../WifiStateMachine$ConnectModeState.smali | 2 +- .../smali/android/os/Parcel.smali | 91 +++++++++++++++++++ overlay/OVERLAY_CLASSES | 1 + ...ntextImpl$JobSchedulerServiceFetcher.smali | 53 +++++++++++ .../server/NotificationManagerService$6.smali | 63 ++++++++++++- .../com/android/server/ServerThread$2.smali | 11 +++ .../com/android/server/ServerThread.smali | 43 +++++++++ .../server/am/ActivityManagerService.smali | 17 ++++ 13 files changed, 306 insertions(+), 5 deletions(-) create mode 100644 overlay/smali/android/app/ContextImpl$JobSchedulerServiceFetcher.smali diff --git a/framework.jar.out/smali/android/app/ContextImpl.smali b/framework.jar.out/smali/android/app/ContextImpl.smali index 98850045..cb2a1921 100644 --- a/framework.jar.out/smali/android/app/ContextImpl.smali +++ b/framework.jar.out/smali/android/app/ContextImpl.smali @@ -1762,6 +1762,14 @@ .locals 2 .prologue + const-string v0, "jobscheduler" + + new-instance v1, Landroid/app/ContextImpl$JobSchedulerServiceFetcher; + + invoke-direct {v1}, Landroid/app/ContextImpl$JobSchedulerServiceFetcher;->()V + + invoke-static {v0, v1}, Landroid/app/ContextImpl;->registerService(Ljava/lang/String;Landroid/app/ContextImpl$ServiceFetcher;)V + const-string v0, "security" new-instance v1, Landroid/app/ContextImpl$SecurityServiceFetcher; diff --git a/framework.jar.out/smali/android/net/wifi/SupplicantStateTracker$CompletedState.smali b/framework.jar.out/smali/android/net/wifi/SupplicantStateTracker$CompletedState.smali index 444155ae..901a1c66 100644 --- a/framework.jar.out/smali/android/net/wifi/SupplicantStateTracker$CompletedState.smali +++ b/framework.jar.out/smali/android/net/wifi/SupplicantStateTracker$CompletedState.smali @@ -71,6 +71,8 @@ # setter for: Landroid/net/wifi/SupplicantStateTracker;->mNetworksDisabledDuringConnect:Z invoke-static {v0, v1}, Landroid/net/wifi/SupplicantStateTracker;->access$602(Landroid/net/wifi/SupplicantStateTracker;Z)Z + invoke-static {}, Landroid/net/wifi/SupplicantStateTrackerInjector;->handleNetworkConnectionComplete()V + :cond_0 return-void .end method diff --git a/framework.jar.out/smali/android/net/wifi/SupplicantStateTracker$DefaultState.smali b/framework.jar.out/smali/android/net/wifi/SupplicantStateTracker$DefaultState.smali index 068c0306..a51510ec 100644 --- a/framework.jar.out/smali/android/net/wifi/SupplicantStateTracker$DefaultState.smali +++ b/framework.jar.out/smali/android/net/wifi/SupplicantStateTracker$DefaultState.smali @@ -151,6 +151,10 @@ # setter for: Landroid/net/wifi/SupplicantStateTracker;->mAssociationRejectCount:I invoke-static {v2, v4}, Landroid/net/wifi/SupplicantStateTracker;->access$702(Landroid/net/wifi/SupplicantStateTracker;I)I + iget v2, p1, Landroid/os/Message;->arg1:I + + invoke-static {v2}, Landroid/net/wifi/SupplicantStateTrackerInjector;->handleConnectNetwork(I)V + goto :goto_0 :sswitch_4 diff --git a/framework.jar.out/smali/android/net/wifi/SupplicantStateTracker$DisconnectedState.smali b/framework.jar.out/smali/android/net/wifi/SupplicantStateTracker$DisconnectedState.smali index 90644b44..980c1ffc 100644 --- a/framework.jar.out/smali/android/net/wifi/SupplicantStateTracker$DisconnectedState.smali +++ b/framework.jar.out/smali/android/net/wifi/SupplicantStateTracker$DisconnectedState.smali @@ -58,7 +58,7 @@ move-result v2 - const/4 v3, 0x2 + const/4 v3, 0x1 if-lt v2, v3, :cond_1 diff --git a/framework.jar.out/smali/android/net/wifi/SupplicantStateTracker.smali b/framework.jar.out/smali/android/net/wifi/SupplicantStateTracker.smali index 94c95568..04dd23bb 100644 --- a/framework.jar.out/smali/android/net/wifi/SupplicantStateTracker.smali +++ b/framework.jar.out/smali/android/net/wifi/SupplicantStateTracker.smali @@ -24,7 +24,7 @@ .field private static final MAX_RETRIES_ON_ASSOCIATION_REJECT:I = 0x10 -.field private static final MAX_RETRIES_ON_AUTHENTICATION_FAILURE:I = 0x2 +.field private static final MAX_RETRIES_ON_AUTHENTICATION_FAILURE:I = 0x1 .field private static final TAG:Ljava/lang/String; = "SupplicantStateTracker" @@ -407,7 +407,7 @@ .end method .method private handleNetworkConnectionFailure(II)V - .locals 1 + .locals 2 .param p1, "netId" # I .param p2, "disableReason" # I @@ -429,6 +429,16 @@ invoke-virtual {v0, p1, p2}, Landroid/net/wifi/WifiConfigStore;->disableNetwork(II)Z + iget-object v0, p0, Landroid/net/wifi/SupplicantStateTracker;->mContext:Landroid/content/Context; + + iget-object v1, p0, Landroid/net/wifi/SupplicantStateTracker;->mWifiConfigStore:Landroid/net/wifi/WifiConfigStore; + + invoke-virtual {v1}, Landroid/net/wifi/WifiConfigStore;->getConfiguredNetworks()Ljava/util/List; + + move-result-object v1 + + invoke-static {v0, v1, p1}, Landroid/net/wifi/SupplicantStateTrackerInjector;->handleNetworkConnectionFailure(Landroid/content/Context;Ljava/util/List;I)V + return-void .end method diff --git a/framework.jar.out/smali/android/net/wifi/WifiStateMachine$ConnectModeState.smali b/framework.jar.out/smali/android/net/wifi/WifiStateMachine$ConnectModeState.smali index f16fc8e3..2bb82b57 100644 --- a/framework.jar.out/smali/android/net/wifi/WifiStateMachine$ConnectModeState.smali +++ b/framework.jar.out/smali/android/net/wifi/WifiStateMachine$ConnectModeState.smali @@ -666,7 +666,7 @@ const v11, 0x25001 - invoke-virtual {v10, v11}, Landroid/net/wifi/SupplicantStateTracker;->sendMessage(I)V + invoke-virtual {v10, v11, v2}, Landroid/net/wifi/SupplicantStateTracker;->sendMessage(II)V iget-object v10, p0, Landroid/net/wifi/WifiStateMachine$ConnectModeState;->this$0:Landroid/net/wifi/WifiStateMachine; diff --git a/framework.jar.out/smali/android/os/Parcel.smali b/framework.jar.out/smali/android/os/Parcel.smali index 1b0bbb50..46b6c0d9 100644 --- a/framework.jar.out/smali/android/os/Parcel.smali +++ b/framework.jar.out/smali/android/os/Parcel.smali @@ -2840,6 +2840,50 @@ goto/16 :goto_0 .end method +.method public final readPersistableBundle()Landroid/os/PersistableBundle; + .locals 1 + + .prologue + const/4 v0, 0x0 + + invoke-virtual {p0, v0}, Landroid/os/Parcel;->readPersistableBundle(Ljava/lang/ClassLoader;)Landroid/os/PersistableBundle; + + move-result-object v0 + + return-object v0 +.end method + +.method public final readPersistableBundle(Ljava/lang/ClassLoader;)Landroid/os/PersistableBundle; + .locals 2 + .param p1, "loader" # Ljava/lang/ClassLoader; + + .prologue + invoke-virtual {p0}, Landroid/os/Parcel;->readInt()I + + move-result v1 + + .local v1, "length":I + if-gez v1, :cond_1 + + const/4 v0, 0x0 + + :cond_0 + :goto_0 + return-object v0 + + :cond_1 + new-instance v0, Landroid/os/PersistableBundle; + + invoke-direct {v0, p0, v1}, Landroid/os/PersistableBundle;->(Landroid/os/Parcel;I)V + + .local v0, "bundle":Landroid/os/PersistableBundle; + if-eqz p1, :cond_0 + + invoke-virtual {v0, p1}, Landroid/os/PersistableBundle;->setClassLoader(Ljava/lang/ClassLoader;)V + + goto :goto_0 +.end method + .method public final readRawFileDescriptor()Ljava/io/FileDescriptor; .locals 1 @@ -3678,6 +3722,13 @@ goto/16 :goto_0 + :pswitch_miui + invoke-virtual {p0, p1}, Landroid/os/Parcel;->readPersistableBundle(Ljava/lang/ClassLoader;)Landroid/os/PersistableBundle; + + move-result-object v2 + + goto/16 :goto_0 + nop :pswitch_data_0 @@ -3708,6 +3759,7 @@ :pswitch_18 :pswitch_c :pswitch_f + :pswitch_miui .end packed-switch .end method @@ -4815,6 +4867,28 @@ return-void .end method +.method public final writePersistableBundle(Landroid/os/PersistableBundle;)V + .locals 1 + .param p1, "val" # Landroid/os/PersistableBundle; + + .prologue + if-nez p1, :cond_0 + + const/4 v0, -0x1 + + invoke-virtual {p0, v0}, Landroid/os/Parcel;->writeInt(I)V + + :goto_0 + return-void + + :cond_0 + const/4 v0, 0x0 + + invoke-virtual {p1, p0, v0}, Landroid/os/PersistableBundle;->writeToParcel(Landroid/os/Parcel;I)V + + goto :goto_0 +.end method + .method public final writeSerializable(Ljava/io/Serializable;)V .locals 7 .param p1, "s" # Ljava/io/Serializable; @@ -5732,6 +5806,23 @@ .restart local p1 # "v":Ljava/lang/Object; :cond_18 + instance-of v0, p1, Landroid/os/PersistableBundle; + + if-eqz v0, :cond_miui_0 + + const/16 v0, 0x19 + + invoke-virtual {p0, v0}, Landroid/os/Parcel;->writeInt(I)V + + check-cast p1, Landroid/os/PersistableBundle; + + .end local p1 # "v":Ljava/lang/Object; + invoke-virtual {p0, p1}, Landroid/os/Parcel;->writePersistableBundle(Landroid/os/PersistableBundle;)V + + goto/16 :goto_0 + + .restart local p1 # "v":Ljava/lang/Object; + :cond_miui_0 instance-of v0, p1, Ljava/io/Serializable; if-eqz v0, :cond_19 diff --git a/overlay/OVERLAY_CLASSES b/overlay/OVERLAY_CLASSES index d1953ee9..9f4c4ecf 100644 --- a/overlay/OVERLAY_CLASSES +++ b/overlay/OVERLAY_CLASSES @@ -7,6 +7,7 @@ android/app/DownloadManager android/widget/DateTimeView android/widget/RemoteViews com/android/internal/app/ResolverActivity +com/android/internal/util/XmlUtils com/android/server/am/AppErrorDialog com/android/server/am/AppNotRespondingDialog com/android/server/am/BaseErrorDialog diff --git a/overlay/smali/android/app/ContextImpl$JobSchedulerServiceFetcher.smali b/overlay/smali/android/app/ContextImpl$JobSchedulerServiceFetcher.smali new file mode 100644 index 00000000..e507dce9 --- /dev/null +++ b/overlay/smali/android/app/ContextImpl$JobSchedulerServiceFetcher.smali @@ -0,0 +1,53 @@ +.class final Landroid/app/ContextImpl$JobSchedulerServiceFetcher; +.super Landroid/app/ContextImpl$ServiceFetcher; +.source "ContextImpl.java" + + +# annotations +.annotation system Ldalvik/annotation/EnclosingClass; + value = Landroid/app/ContextImpl; +.end annotation + +.annotation system Ldalvik/annotation/InnerClass; + accessFlags = 0x8 + name = null +.end annotation + + +# direct methods +.method constructor ()V + .locals 0 + + .prologue + .line 604 + invoke-direct {p0}, Landroid/app/ContextImpl$ServiceFetcher;->()V + + return-void +.end method + + +# virtual methods +.method public createService(Landroid/app/ContextImpl;)Ljava/lang/Object; + .locals 3 + .param p1, "ctx" # Landroid/app/ContextImpl; + + .prologue + .line 606 + const-string v1, "jobscheduler" + + invoke-static {v1}, Landroid/os/ServiceManager;->getService(Ljava/lang/String;)Landroid/os/IBinder; + + move-result-object v0 + + .line 607 + .local v0, "b":Landroid/os/IBinder; + new-instance v1, Landroid/app/JobSchedulerImpl; + + invoke-static {v0}, Landroid/app/job/IJobScheduler$Stub;->asInterface(Landroid/os/IBinder;)Landroid/app/job/IJobScheduler; + + move-result-object v2 + + invoke-direct {v1, v2}, Landroid/app/JobSchedulerImpl;->(Landroid/app/job/IJobScheduler;)V + + return-object v1 +.end method diff --git a/services.jar.out/smali/com/android/server/NotificationManagerService$6.smali b/services.jar.out/smali/com/android/server/NotificationManagerService$6.smali index b4905ba8..74abbbb7 100644 --- a/services.jar.out/smali/com/android/server/NotificationManagerService$6.smali +++ b/services.jar.out/smali/com/android/server/NotificationManagerService$6.smali @@ -253,8 +253,19 @@ iget-boolean v4, v0, Lcom/android/server/NotificationManagerService$6;->val$isSystemNotification:Z - if-nez v4, :cond_2 + if-eqz v4, :cond_miui_00 + + move-object/from16 v0, p0 + + iget-object v4, v0, Lcom/android/server/NotificationManagerService$6;->val$pkg:Ljava/lang/String; + + invoke-static {v4}, Lmiui/util/NotificationFilterHelper;->canSystemNotificationBeBlocked(Ljava/lang/String;)Z + move-result v4 + + if-eqz v4, :cond_2 + + :cond_miui_00 const/16 v9, -0x3e8 const-string v4, "NotificationService" @@ -684,6 +695,23 @@ .end local v28 # "resolver":Landroid/content/ContentResolver; :cond_b :goto_8 + move-object/from16 v0, p0 + + iget-object v4, v0, Lcom/android/server/NotificationManagerService$6;->this$0:Lcom/android/server/NotificationManagerService; + + iget-object v4, v4, Lcom/android/server/NotificationManagerService;->mContext:Landroid/content/Context; + + move-object/from16 v0, v30 + + invoke-static {v4, v0, v3}, Lmiui/util/NotificationFilterHelper;->getCustomSoundUri(Landroid/content/Context;Landroid/net/Uri;Landroid/service/notification/StatusBarNotification;)Landroid/net/Uri; + + move-result-object v30 + + if-eqz v30, :cond_miui_0 + + const/16 v18, 0x1 + + :goto_miui_0 if-eqz v18, :cond_d move-object/from16 v0, p0 @@ -737,6 +765,20 @@ if-nez v4, :cond_d + move-object/from16 v0, p0 + + iget-object v4, v0, Lcom/android/server/NotificationManagerService$6;->this$0:Lcom/android/server/NotificationManagerService; + + iget-object v4, v4, Lcom/android/server/NotificationManagerService;->mContext:Landroid/content/Context; + + const-string v5, "_sound" + + invoke-static {v4, v3, v5}, Lmiui/util/NotificationFilterHelper;->isAllowed(Landroid/content/Context;Landroid/service/notification/StatusBarNotification;Ljava/lang/String;)Z + + move-result v4 + + if-eqz v4, :cond_d + invoke-static {}, Landroid/os/Binder;->clearCallingIdentity()J :try_end_5 .catchall {:try_start_5 .. :try_end_5} :catchall_0 @@ -845,6 +887,20 @@ iget-object v4, v0, Lcom/android/server/NotificationManagerService$6;->this$0:Lcom/android/server/NotificationManagerService; + iget-object v4, v4, Lcom/android/server/NotificationManagerService;->mContext:Landroid/content/Context; + + const-string v5, "_vibrate" + + invoke-static {v4, v3, v5}, Lmiui/util/NotificationFilterHelper;->isAllowed(Landroid/content/Context;Landroid/service/notification/StatusBarNotification;Ljava/lang/String;)Z + + move-result v4 + + if-eqz v4, :cond_10 + + move-object/from16 v0, p0 + + iget-object v4, v0, Lcom/android/server/NotificationManagerService$6;->this$0:Lcom/android/server/NotificationManagerService; + move-object/from16 v0, v27 # setter for: Lcom/android/server/NotificationManagerService;->mVibrateNotification:Lcom/android/server/NotificationManagerService$NotificationRecord; @@ -1329,6 +1385,11 @@ goto :goto_13 + :cond_miui_0 + const/16 v18, 0x0 + + goto/16 :goto_miui_0 + :cond_1d const/16 v24, 0x0 diff --git a/services.jar.out/smali/com/android/server/ServerThread$2.smali b/services.jar.out/smali/com/android/server/ServerThread$2.smali index e1310b8f..8d747339 100644 --- a/services.jar.out/smali/com/android/server/ServerThread$2.smali +++ b/services.jar.out/smali/com/android/server/ServerThread$2.smali @@ -361,6 +361,17 @@ invoke-virtual {v1}, Lcom/android/server/Watchdog;->start()V + iget-object v1, p0, Lcom/android/server/ServerThread$2;->this$0:Lcom/android/server/ServerThread; + + # getter for: Lcom/android/server/ServerThread;->mSystemServiceManager:Lcom/android/server/SystemServiceManager; + invoke-static {v1}, Lcom/android/server/ServerThread;->access$mSystemServiceManager(Lcom/android/server/ServerThread;)Lcom/android/server/SystemServiceManager; + + move-result-object v1 + + const/16 v2, 0x258 + + invoke-virtual {v1, v2}, Lcom/android/server/SystemServiceManager;->startBootPhase(I)V + :try_start_c iget-object v1, p0, Lcom/android/server/ServerThread$2;->val$appWidgetF:Lcom/android/server/AppWidgetService; diff --git a/services.jar.out/smali/com/android/server/ServerThread.smali b/services.jar.out/smali/com/android/server/ServerThread.smali index ed3240a1..611e52cf 100644 --- a/services.jar.out/smali/com/android/server/ServerThread.smali +++ b/services.jar.out/smali/com/android/server/ServerThread.smali @@ -14,6 +14,7 @@ # instance fields .field mContentResolver:Landroid/content/ContentResolver; +.field private mSystemServiceManager:Lcom/android/server/SystemServiceManager; # direct methods .method constructor ()V @@ -25,6 +26,16 @@ return-void .end method +.method static synthetic access$mSystemServiceManager(Lcom/android/server/ServerThread;)Lcom/android/server/SystemServiceManager; + .locals 1 + .param p0, "x0" # Lcom/android/server/ServerThread; + + .prologue + iget-object v0, p0, Lcom/android/server/ServerThread;->mSystemServiceManager:Lcom/android/server/SystemServiceManager; + + return-object v0 +.end method + .method static final startSystemUi(Landroid/content/Context;)V .locals 4 .param p0, "context" # Landroid/content/Context; @@ -447,6 +458,22 @@ .local v88, "disableNetwork":Z :try_start_3 + new-instance v7, Lcom/android/server/SystemServiceManager; + + invoke-direct {v7, v5}, Lcom/android/server/SystemServiceManager;->(Landroid/content/Context;)V + + move-object/from16 v0, p0 + + iput-object v7, v0, Lcom/android/server/ServerThread;->mSystemServiceManager:Lcom/android/server/SystemServiceManager; + + const-class v7, Lcom/android/server/SystemServiceManager; + + move-object/from16 v0, p0 + + iget-object v9, v0, Lcom/android/server/ServerThread;->mSystemServiceManager:Lcom/android/server/SystemServiceManager; + + invoke-static {v7, v9}, Lcom/android/server/LocalServices;->addService(Ljava/lang/Class;Ljava/lang/Object;)V + const-string v7, "SystemServer" const-string v9, "Display Manager" @@ -2413,6 +2440,22 @@ :cond_1e :goto_41 + move-object/from16 v0, p0 + + iget-object v7, v0, Lcom/android/server/ServerThread;->mSystemServiceManager:Lcom/android/server/SystemServiceManager; + + const-class v9, Lcom/android/server/job/JobSchedulerService; + + invoke-virtual {v7, v9}, Lcom/android/server/SystemServiceManager;->startService(Ljava/lang/Class;)Lcom/android/server/SystemService; + + move-object/from16 v0, p0 + + iget-object v7, v0, Lcom/android/server/ServerThread;->mSystemServiceManager:Lcom/android/server/SystemServiceManager; + + const/16 v9, 0x1f4 + + invoke-virtual {v7, v9}, Lcom/android/server/SystemServiceManager;->startBootPhase(I)V + :try_start_5c invoke-virtual/range {v156 .. v156}, Lcom/android/server/wm/WindowManagerService;->systemReady()V :try_end_5c diff --git a/services.jar.out/smali/com/android/server/am/ActivityManagerService.smali b/services.jar.out/smali/com/android/server/am/ActivityManagerService.smali index 8e226c68..d1b17187 100644 --- a/services.jar.out/smali/com/android/server/am/ActivityManagerService.smali +++ b/services.jar.out/smali/com/android/server/am/ActivityManagerService.smali @@ -22849,6 +22849,23 @@ invoke-virtual {v1, v2, v4}, Lcom/android/server/Watchdog;->processStarted(Ljava/lang/String;I)V :cond_c + move-object/from16 v0, p1 + + iget-object v1, v0, Lcom/android/server/am/ProcessRecord;->processName:Ljava/lang/String; + + invoke-static {v1}, Lcom/miui/whetstone/client/WhetstoneClientManager;->isProtectImportantApp(Ljava/lang/String;)Z + + move-result v1 + + if-eqz v1, :cond_miui_1 + + const/4 v1, 0x4 + + move-object/from16 v0, p1 + + iput v1, v0, Lcom/android/server/am/ProcessRecord;->maxAdj:I + + :cond_miui_1 move-object/from16 v0, p0 iget-object v12, v0, Lcom/android/server/am/ActivityManagerService;->mStringBuilder:Ljava/lang/StringBuilder;