Commit ec187cda authored by xinhe's avatar xinhe Committed by Android Git Automerger
Browse files

am 4091da61: Merge "Crash in Phone observed while launching SIM Toolkit app" into lmp-mr1-dev

* commit '4091da61':
  Crash in Phone observed while launching SIM Toolkit app
parents 592f0a6d 4091da61
......@@ -93,8 +93,7 @@
</intent-filter>
</receiver>
<receiver android:name="com.android.stk.BootCompletedReceiver"
androidprv:primaryUserOnly="true">
<receiver android:name="com.android.stk.BootCompletedReceiver">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
......
......@@ -19,7 +19,9 @@ package com.android.stk;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.os.Bundle;
import com.android.internal.telephony.cat.CatLog;
/**
......@@ -36,6 +38,13 @@ public class BootCompletedReceiver extends BroadcastReceiver {
// make sure the app icon is removed every time the device boots.
if (action.equals(Intent.ACTION_BOOT_COMPLETED)) {
if (!android.os.Process.myUserHandle().isOwner()) {
//Disable package for all secondary users. Package is only required for device
//owner.
context.getPackageManager().setApplicationEnabledSetting(context.getPackageName(),
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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment