Loading packages/Keyguard/src/com/android/keyguard/EmergencyButton.java +10 −0 Original line number Diff line number Diff line Loading @@ -16,15 +16,18 @@ package com.android.keyguard; import android.app.ActivityManagerNative; import android.app.ActivityOptions; import android.content.Context; import android.content.Intent; import android.content.res.Configuration; import android.os.PowerManager; import android.os.RemoteException; import android.os.SystemClock; import android.os.UserHandle; import android.telecom.TelecomManager; import android.util.AttributeSet; import android.util.Slog; import android.view.View; import android.widget.Button; Loading @@ -46,6 +49,8 @@ public class EmergencyButton extends Button { | Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS | Intent.FLAG_ACTIVITY_CLEAR_TOP); private static final String LOG_TAG = "EmergencyButton"; KeyguardUpdateMonitorCallback mInfoCallback = new KeyguardUpdateMonitorCallback() { @Override Loading Loading @@ -121,6 +126,11 @@ public class EmergencyButton extends Button { // TODO: implement a shorter timeout once new PowerManager API is ready. // should be the equivalent to the old userActivity(EMERGENCY_CALL_TIMEOUT) mPowerManager.userActivity(SystemClock.uptimeMillis(), true); try { ActivityManagerNative.getDefault().stopLockTaskMode(); } catch (RemoteException e) { Slog.w(LOG_TAG, "Failed to stop app pinning"); } if (isInCall()) { resumeCall(); if (mEmergencyButtonCallback != null) { Loading services/core/java/com/android/server/am/ActivityManagerService.java +5 −0 Original line number Diff line number Diff line Loading @@ -213,6 +213,7 @@ import android.os.UpdateLock; import android.os.UserHandle; import android.os.UserManager; import android.provider.Settings; import android.telecom.TelecomManager; import android.text.format.DateUtils; import android.text.format.Time; import android.util.AtomicFile; Loading Loading @@ -9118,6 +9119,10 @@ public final class ActivityManagerService extends ActivityManagerNative mStackSupervisor.setLockTaskModeLocked(null, ActivityManager.LOCK_TASK_MODE_NONE, "stopLockTask", true); } TelecomManager tm = (TelecomManager) mContext.getSystemService(Context.TELECOM_SERVICE); if (tm != null) { tm.showInCallScreen(false); } } finally { Binder.restoreCallingIdentity(ident); } Loading services/core/java/com/android/server/am/ActivityStackSupervisor.java +3 −1 Original line number Diff line number Diff line Loading @@ -3863,8 +3863,10 @@ public final class ActivityStackSupervisor implements DisplayListener { } void showLockTaskToast() { if (mLockTaskNotify != null) { mLockTaskNotify.showToast(mLockTaskModeState); } } void showLockTaskEscapeMessageLocked(TaskRecord task) { if (mLockTaskModeTasks.contains(task)) { Loading Loading
packages/Keyguard/src/com/android/keyguard/EmergencyButton.java +10 −0 Original line number Diff line number Diff line Loading @@ -16,15 +16,18 @@ package com.android.keyguard; import android.app.ActivityManagerNative; import android.app.ActivityOptions; import android.content.Context; import android.content.Intent; import android.content.res.Configuration; import android.os.PowerManager; import android.os.RemoteException; import android.os.SystemClock; import android.os.UserHandle; import android.telecom.TelecomManager; import android.util.AttributeSet; import android.util.Slog; import android.view.View; import android.widget.Button; Loading @@ -46,6 +49,8 @@ public class EmergencyButton extends Button { | Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS | Intent.FLAG_ACTIVITY_CLEAR_TOP); private static final String LOG_TAG = "EmergencyButton"; KeyguardUpdateMonitorCallback mInfoCallback = new KeyguardUpdateMonitorCallback() { @Override Loading Loading @@ -121,6 +126,11 @@ public class EmergencyButton extends Button { // TODO: implement a shorter timeout once new PowerManager API is ready. // should be the equivalent to the old userActivity(EMERGENCY_CALL_TIMEOUT) mPowerManager.userActivity(SystemClock.uptimeMillis(), true); try { ActivityManagerNative.getDefault().stopLockTaskMode(); } catch (RemoteException e) { Slog.w(LOG_TAG, "Failed to stop app pinning"); } if (isInCall()) { resumeCall(); if (mEmergencyButtonCallback != null) { Loading
services/core/java/com/android/server/am/ActivityManagerService.java +5 −0 Original line number Diff line number Diff line Loading @@ -213,6 +213,7 @@ import android.os.UpdateLock; import android.os.UserHandle; import android.os.UserManager; import android.provider.Settings; import android.telecom.TelecomManager; import android.text.format.DateUtils; import android.text.format.Time; import android.util.AtomicFile; Loading Loading @@ -9118,6 +9119,10 @@ public final class ActivityManagerService extends ActivityManagerNative mStackSupervisor.setLockTaskModeLocked(null, ActivityManager.LOCK_TASK_MODE_NONE, "stopLockTask", true); } TelecomManager tm = (TelecomManager) mContext.getSystemService(Context.TELECOM_SERVICE); if (tm != null) { tm.showInCallScreen(false); } } finally { Binder.restoreCallingIdentity(ident); } Loading
services/core/java/com/android/server/am/ActivityStackSupervisor.java +3 −1 Original line number Diff line number Diff line Loading @@ -3863,8 +3863,10 @@ public final class ActivityStackSupervisor implements DisplayListener { } void showLockTaskToast() { if (mLockTaskNotify != null) { mLockTaskNotify.showToast(mLockTaskModeState); } } void showLockTaskEscapeMessageLocked(TaskRecord task) { if (mLockTaskModeTasks.contains(task)) { Loading