Merge "No longer trigger immersive cling on panic" into mnc-dev
diff --git a/services/core/java/com/android/server/policy/ImmersiveModeConfirmation.java b/services/core/java/com/android/server/policy/ImmersiveModeConfirmation.java
index f99ca7a..160d44c 100644
--- a/services/core/java/com/android/server/policy/ImmersiveModeConfirmation.java
+++ b/services/core/java/com/android/server/policy/ImmersiveModeConfirmation.java
@@ -60,7 +60,6 @@
private final H mHandler;
private final long mShowDelayMs;
private final long mPanicThresholdMs;
- private final SparseBooleanArray mUserPanicResets = new SparseBooleanArray();
private boolean mConfirmed;
private ClingWindowView mClingWindow;
@@ -86,8 +85,7 @@
public void loadSetting(int currentUserId) {
mConfirmed = false;
mCurrentUserId = currentUserId;
- if (DEBUG) Slog.d(TAG, String.format("loadSetting() mCurrentUserId=%d resetForPanic=%s",
- mCurrentUserId, mUserPanicResets.get(mCurrentUserId, false)));
+ if (DEBUG) Slog.d(TAG, String.format("loadSetting() mCurrentUserId=%d", mCurrentUserId));
String value = null;
try {
value = Settings.Secure.getStringForUser(mContext.getContentResolver(),
@@ -132,7 +130,6 @@
public boolean onPowerKeyDown(boolean isScreenOn, long time, boolean inImmersiveMode) {
if (!isScreenOn && (time - mPanicTime < mPanicThresholdMs)) {
// turning the screen back on within the panic threshold
- mHandler.sendEmptyMessage(H.PANIC);
return mClingWindow == null;
}
if (isScreenOn && inImmersiveMode) {
@@ -151,14 +148,6 @@
}
}
- private void handlePanic() {
- if (DEBUG) Slog.d(TAG, "handlePanic()");
- if (mUserPanicResets.get(mCurrentUserId, false)) return; // already reset for panic
- mUserPanicResets.put(mCurrentUserId, true);
- mConfirmed = false;
- saveSetting();
- }
-
private void handleHide() {
if (mClingWindow != null) {
if (DEBUG) Slog.d(TAG, "Hiding immersive mode confirmation");
@@ -350,7 +339,6 @@
private final class H extends Handler {
private static final int SHOW = 1;
private static final int HIDE = 2;
- private static final int PANIC = 3;
@Override
public void handleMessage(Message msg) {
@@ -361,9 +349,6 @@
case HIDE:
handleHide();
break;
- case PANIC:
- handlePanic();
- break;
}
}
}