diff options
author | Adrian Roos <roosa@google.com> | 2015-03-30 22:01:22 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-03-30 22:01:23 +0000 |
commit | 4249c049ccb09da0666bff532541fe816168f306 (patch) | |
tree | 0eb2d95db2ee44a40d33b530bf544eef60370af3 /packages/Keyguard | |
parent | 71036a89e64ec5f9ee2464161d94da96ef04ccd2 (diff) | |
parent | 8d75c14d0c8881c7b97f2be86870d323d4454ec8 (diff) | |
download | frameworks_base-4249c049ccb09da0666bff532541fe816168f306.zip frameworks_base-4249c049ccb09da0666bff532541fe816168f306.tar.gz frameworks_base-4249c049ccb09da0666bff532541fe816168f306.tar.bz2 |
Merge "Explicitly specify package in EmergencyButton"
Diffstat (limited to 'packages/Keyguard')
-rw-r--r-- | packages/Keyguard/src/com/android/keyguard/EmergencyButton.java | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/packages/Keyguard/src/com/android/keyguard/EmergencyButton.java b/packages/Keyguard/src/com/android/keyguard/EmergencyButton.java index 3627e3e..7d5bf6b 100644 --- a/packages/Keyguard/src/com/android/keyguard/EmergencyButton.java +++ b/packages/Keyguard/src/com/android/keyguard/EmergencyButton.java @@ -36,7 +36,10 @@ import com.android.internal.widget.LockPatternUtils; * allows the user to return to the call. */ public class EmergencyButton extends Button { - private static final String ACTION_EMERGENCY_DIAL = "com.android.phone.EmergencyDialer.DIAL"; + private static final Intent INTENT_EMERGENCY_DIAL = new Intent() + .setAction("com.android.phone.EmergencyDialer.DIAL") + .setPackage("com.android.phone") + .setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS); KeyguardUpdateMonitorCallback mInfoCallback = new KeyguardUpdateMonitorCallback() { @@ -112,12 +115,9 @@ public class EmergencyButton extends Button { mEmergencyButtonCallback.onEmergencyButtonClickedWhenInCall(); } } else { - final boolean bypassHandler = true; - KeyguardUpdateMonitor.getInstance(mContext).reportEmergencyCallAction(bypassHandler); - Intent intent = new Intent(ACTION_EMERGENCY_DIAL); - intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK - | Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS); - getContext().startActivityAsUser(intent, + KeyguardUpdateMonitor.getInstance(mContext).reportEmergencyCallAction( + true /* bypassHandler */); + getContext().startActivityAsUser(INTENT_EMERGENCY_DIAL, new UserHandle(mLockPatternUtils.getCurrentUser())); } } |