summaryrefslogtreecommitdiffstats
path: root/packages/Keyguard/src/com/android/keyguard/EmergencyButton.java
diff options
context:
space:
mode:
authorAdrian Roos <roosa@google.com>2015-03-24 12:57:20 -0700
committerAdrian Roos <roosa@google.com>2015-03-30 18:59:13 +0000
commit8d75c14d0c8881c7b97f2be86870d323d4454ec8 (patch)
treeeed501f5fd7d15ee03206e32aedb03e0427ae2e9 /packages/Keyguard/src/com/android/keyguard/EmergencyButton.java
parent07459a36177411595df2d6d0993d3dc489fa302b (diff)
downloadframeworks_base-8d75c14d0c8881c7b97f2be86870d323d4454ec8.zip
frameworks_base-8d75c14d0c8881c7b97f2be86870d323d4454ec8.tar.gz
frameworks_base-8d75c14d0c8881c7b97f2be86870d323d4454ec8.tar.bz2
Explicitly specify package in EmergencyButton
Change-Id: I0c64195e748ef926ae87db21663c86eab38c38b8
Diffstat (limited to 'packages/Keyguard/src/com/android/keyguard/EmergencyButton.java')
-rw-r--r--packages/Keyguard/src/com/android/keyguard/EmergencyButton.java14
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()));
}
}