From a0583d3096da542bc0be044fbfa6045cad0a6c0c Mon Sep 17 00:00:00 2001 From: Xiaowen Lei Date: Tue, 14 Jun 2022 04:56:57 +0000 Subject: [PATCH] Remove the obsolete KeyguardState.showingAndNotOccluded. There used to be a isShowingAndNotOccluded() function which was added when this field was added (ag/440769). This is no longer the case. Plus, an occluded field was added in ag/15924835. The field isn't set correctly for dumping. Causes confusion for debugging. Bug: 15924835 Bug: 232985643 Test: no-op cleanup, passes existing tests; DumpSys. Change-Id: Icf16a48f70d40ec9be09c3bc6ec987249f75d332 --- .../server/policy/keyguard/KeyguardServiceDelegate.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/services/core/java/com/android/server/policy/keyguard/KeyguardServiceDelegate.java b/services/core/java/com/android/server/policy/keyguard/KeyguardServiceDelegate.java index 97a57e066fc78..b79ac6f68be20 100644 --- a/services/core/java/com/android/server/policy/keyguard/KeyguardServiceDelegate.java +++ b/services/core/java/com/android/server/policy/keyguard/KeyguardServiceDelegate.java @@ -64,7 +64,6 @@ public class KeyguardServiceDelegate { reset(); } boolean showing; - boolean showingAndNotOccluded; boolean inputRestricted; volatile boolean occluded; boolean secure; @@ -83,7 +82,7 @@ public class KeyguardServiceDelegate { // the event something checks before the service is actually started. // KeyguardService itself should default to this state until the real state is known. showing = true; - showingAndNotOccluded = true; + occluded = false; secure = true; deviceHasKeyguard = true; enabled = true; @@ -148,7 +147,6 @@ public class KeyguardServiceDelegate { Context.BIND_AUTO_CREATE, mHandler, UserHandle.SYSTEM)) { Log.v(TAG, "*** Keyguard: can't bind to " + keyguardComponent); mKeyguardState.showing = false; - mKeyguardState.showingAndNotOccluded = false; mKeyguardState.secure = false; synchronized (mKeyguardState) { // TODO: Fix synchronisation model in this class. The other state in this class @@ -440,7 +438,6 @@ public class KeyguardServiceDelegate { pw.println(prefix + TAG); prefix += " "; pw.println(prefix + "showing=" + mKeyguardState.showing); - pw.println(prefix + "showingAndNotOccluded=" + mKeyguardState.showingAndNotOccluded); pw.println(prefix + "inputRestricted=" + mKeyguardState.inputRestricted); pw.println(prefix + "occluded=" + mKeyguardState.occluded); pw.println(prefix + "secure=" + mKeyguardState.secure);