Merge "Updates face-based auto-rotate triggering conditions." into tm-qpr-dev

This commit is contained in:
Yi Jiang
2022-05-25 22:45:30 +00:00
committed by Android (Google) Code Review
3 changed files with 6 additions and 6 deletions

View File

@@ -1522,8 +1522,8 @@ public class DisplayRotation {
} }
@Override @Override
public boolean isKeyguardLocked() { public boolean isKeyguardShowingAndNotOccluded() {
return mService.isKeyguardLocked(); return mService.isKeyguardShowingAndNotOccluded();
} }
@Override @Override

View File

@@ -296,9 +296,9 @@ public abstract class WindowOrientationListener {
/** /**
* Whether the device is in the lock screen. * 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) { public void dumpDebug(ProtoOutputStream proto, long fieldId) {
final long token = proto.start(fieldId); final long token = proto.start(fieldId);
@@ -1151,7 +1151,7 @@ public abstract class WindowOrientationListener {
FrameworkStatsLog.DEVICE_ROTATED__ROTATION_EVENT_TYPE__ACTUAL_EVENT); FrameworkStatsLog.DEVICE_ROTATED__ROTATION_EVENT_TYPE__ACTUAL_EVENT);
if (isRotationResolverEnabled()) { if (isRotationResolverEnabled()) {
if (isKeyguardLocked()) { if (isKeyguardShowingAndNotOccluded()) {
if (mLastRotationResolution != ROTATION_UNSET if (mLastRotationResolution != ROTATION_UNSET
&& SystemClock.uptimeMillis() - mLastRotationResolutionTimeStamp && SystemClock.uptimeMillis() - mLastRotationResolutionTimeStamp
< mRotationMemorizationTimeoutMillis) { < mRotationMemorizationTimeoutMillis) {

View File

@@ -185,7 +185,7 @@ public class WindowOrientationListenerTest {
} }
@Override @Override
public boolean isKeyguardLocked() { public boolean isKeyguardShowingAndNotOccluded() {
return mIsScreenLocked; return mIsScreenLocked;
} }