summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/com/android/stk/StkAppService.java6
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();
}