diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2020-01-29 09:07:40 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2020-01-29 09:07:40 +0000 |
commit | afeccff350431c2b95efc5c2d9e79c0ba6c0398e (patch) | |
tree | 99ff129ec3d7cae3c962c2025c8dbf9cad6e4f35 /src/com | |
parent | 4f5cc5e43da1ca2df851cf12f1408fcb846cb840 (diff) | |
parent | f70e373f32f38e87cb60d216515f2a2c1ef3354f (diff) | |
download | Stk-afeccff350431c2b95efc5c2d9e79c0ba6c0398e.tar.gz |
Merge "Unregister handler for multi-SIM configuration change"
Diffstat (limited to 'src/com')
-rw-r--r-- | src/com/android/stk/StkAppService.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/com/android/stk/StkAppService.java b/src/com/android/stk/StkAppService.java index 4140d15..4a254ed 100644 --- a/src/com/android/stk/StkAppService.java +++ b/src/com/android/stk/StkAppService.java @@ -334,8 +334,6 @@ public class StkAppService extends Service implements Runnable { serviceThread.start(); mNotificationManager = (NotificationManager) mContext .getSystemService(Context.NOTIFICATION_SERVICE); - PhoneConfigurationManager.registerForMultiSimConfigChange(mServiceHandler, - EVENT_MULTI_SIM_CONFIG_CHANGED, null); sInstance = this; } @@ -418,6 +416,7 @@ public class StkAppService extends Service implements Runnable { unregisterHomeKeyEventReceiver(); sInstance = null; waitForLooper(); + PhoneConfigurationManager.unregisterForMultiSimConfigChange(mServiceHandler); mServiceLooper.quit(); } @@ -432,6 +431,9 @@ public class StkAppService extends Service implements Runnable { mServiceLooper = Looper.myLooper(); mServiceHandler = new ServiceHandler(); + PhoneConfigurationManager.registerForMultiSimConfigChange(mServiceHandler, + EVENT_MULTI_SIM_CONFIG_CHANGED, null); + Looper.loop(); } |