summaryrefslogtreecommitdiff
path: root/src/com/android
diff options
context:
space:
mode:
authorxinhe <xinhe@google.com>2014-12-08 11:26:34 -0800
committerxinhe <xinhe@google.com>2014-12-08 13:34:59 -0800
commit1c3556bb6a8d05bb785c7d03cef52e07198a8c85 (patch)
tree5aced358675a67205feb2279ff6e6e9dfe149f5c /src/com/android
parent2ff24abbf939709550a373d8605327479c1b1621 (diff)
downloadStk-1c3556bb6a8d05bb785c7d03cef52e07198a8c85.tar.gz
Crash in Phone observed while launching SIM Toolkit app
This bug is due to the BOOT_COMPLETE propagate to the STK broadcast receiver too late. Instead, we listen to the USER_INITIALZE now. Bug:18607600 Change-Id: Iaf588797a75e9fcfabe78177df7d9270ae4e0ed9
Diffstat (limited to 'src/com/android')
-rw-r--r--src/com/android/stk/BootCompletedReceiver.java11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/com/android/stk/BootCompletedReceiver.java b/src/com/android/stk/BootCompletedReceiver.java
index 8fb938c..ff46a50 100644
--- a/src/com/android/stk/BootCompletedReceiver.java
+++ b/src/com/android/stk/BootCompletedReceiver.java
@@ -38,6 +38,12 @@ public class BootCompletedReceiver extends BroadcastReceiver {
// make sure the app icon is removed every time the device boots.
if (action.equals(Intent.ACTION_BOOT_COMPLETED)) {
+ Bundle args = new Bundle();
+ args.putInt(StkAppService.OPCODE, StkAppService.OP_BOOT_COMPLETED);
+ context.startService(new Intent(context, StkAppService.class)
+ .putExtras(args));
+ CatLog.d(LOG_TAG, "[ACTION_BOOT_COMPLETED]");
+ } else if(action.equals(Intent.ACTION_USER_INITIALIZE)) {
if (!android.os.Process.myUserHandle().isOwner()) {
//Disable package for all secondary users. Package is only required for device
//owner.
@@ -45,11 +51,6 @@ public class BootCompletedReceiver extends BroadcastReceiver {
PackageManager.COMPONENT_ENABLED_STATE_DISABLED, 0);
return;
}
- Bundle args = new Bundle();
- args.putInt(StkAppService.OPCODE, StkAppService.OP_BOOT_COMPLETED);
- context.startService(new Intent(context, StkAppService.class)
- .putExtras(args));
- CatLog.d(LOG_TAG, "[ACTION_BOOT_COMPLETED]");
}
}
}