summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Adrian Roos <roosa@google.com> 2015-05-22 21:38:22 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2015-05-22 21:38:24 +0000
commitfab334081eee36d6d75fc19cf686ca9e20246c16 (patch)
tree4fe24e64700af133b1bc32fc3f7d367cf2afe7fb
parentd02ec5989dd93df1d6ab45ad9f280730553f11e6 (diff)
parentc5d8fbcd2eb78b909f2282b9924992babd198b00 (diff)
Merge "No longer trigger immersive cling on panic" into mnc-dev
-rw-r--r--services/core/java/com/android/server/policy/ImmersiveModeConfirmation.java17
1 files changed, 1 insertions, 16 deletions
diff --git a/services/core/java/com/android/server/policy/ImmersiveModeConfirmation.java b/services/core/java/com/android/server/policy/ImmersiveModeConfirmation.java
index f99ca7a1ab60..160d44c58bc9 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 @@ public class ImmersiveModeConfirmation {
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 class ImmersiveModeConfirmation {
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 class ImmersiveModeConfirmation {
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 @@ public class ImmersiveModeConfirmation {
}
}
- 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 @@ public class ImmersiveModeConfirmation {
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 @@ public class ImmersiveModeConfirmation {
case HIDE:
handleHide();
break;
- case PANIC:
- handlePanic();
- break;
}
}
}