diff --git a/services/core/java/com/android/server/wm/DisplayRotation.java b/services/core/java/com/android/server/wm/DisplayRotation.java index e5ec4c3dfcd25..a78d25f4e21a9 100644 --- a/services/core/java/com/android/server/wm/DisplayRotation.java +++ b/services/core/java/com/android/server/wm/DisplayRotation.java @@ -1522,8 +1522,8 @@ public class DisplayRotation { } @Override - public boolean isKeyguardLocked() { - return mService.isKeyguardLocked(); + public boolean isKeyguardShowingAndNotOccluded() { + return mService.isKeyguardShowingAndNotOccluded(); } @Override diff --git a/services/core/java/com/android/server/wm/WindowOrientationListener.java b/services/core/java/com/android/server/wm/WindowOrientationListener.java index de87ab9dcce09..3e165e442d799 100644 --- a/services/core/java/com/android/server/wm/WindowOrientationListener.java +++ b/services/core/java/com/android/server/wm/WindowOrientationListener.java @@ -296,9 +296,9 @@ public abstract class WindowOrientationListener { /** * Whether the device is in the lock screen. - * @return returns true if the screen is locked. Otherwise, returns false. + * @return returns true if the key guard is showing on the lock screen. */ - public abstract boolean isKeyguardLocked(); + public abstract boolean isKeyguardShowingAndNotOccluded(); public void dumpDebug(ProtoOutputStream proto, long fieldId) { final long token = proto.start(fieldId); @@ -1151,7 +1151,7 @@ public abstract class WindowOrientationListener { FrameworkStatsLog.DEVICE_ROTATED__ROTATION_EVENT_TYPE__ACTUAL_EVENT); if (isRotationResolverEnabled()) { - if (isKeyguardLocked()) { + if (isKeyguardShowingAndNotOccluded()) { if (mLastRotationResolution != ROTATION_UNSET && SystemClock.uptimeMillis() - mLastRotationResolutionTimeStamp < mRotationMemorizationTimeoutMillis) { diff --git a/services/tests/servicestests/src/com/android/server/wm/WindowOrientationListenerTest.java b/services/tests/servicestests/src/com/android/server/wm/WindowOrientationListenerTest.java index c64ff9e128e62..3de65c19a1a49 100644 --- a/services/tests/servicestests/src/com/android/server/wm/WindowOrientationListenerTest.java +++ b/services/tests/servicestests/src/com/android/server/wm/WindowOrientationListenerTest.java @@ -185,7 +185,7 @@ public class WindowOrientationListenerTest { } @Override - public boolean isKeyguardLocked() { + public boolean isKeyguardShowingAndNotOccluded() { return mIsScreenLocked; }