Merge "Reset the keyguardGoingAway flag when keyguard is not dismissed." into tm-qpr-dev am: c4c302a89f

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18918933

Change-Id: I72cc7fe61310bd8995124384c53e3ad93cdbfe2c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
TreeHugger Robot
2022-07-06 14:45:22 +00:00
committed by Automerger Merge Worker
3 changed files with 8 additions and 3 deletions

View File

@@ -23,7 +23,6 @@ import static com.android.keyguard.LockIconView.ICON_LOCK;
import static com.android.keyguard.LockIconView.ICON_UNLOCK;
import static com.android.systemui.classifier.Classifier.LOCK_ICON;
import static com.android.systemui.doze.util.BurnInHelperKt.getBurnInOffset;
import static com.android.systemui.doze.util.BurnInHelperKt.getBurnInProgressOffset;
import android.content.res.Configuration;
import android.content.res.Resources;
@@ -403,7 +402,6 @@ public class LockIconViewController extends ViewController<LockIconView> impleme
float offsetY = MathUtils.lerp(0f,
getBurnInOffset(mMaxBurnInOffsetY * 2, false /* xAxis */)
- mMaxBurnInOffsetY, mInterpolatedDarkAmount);
float progress = MathUtils.lerp(0f, getBurnInProgressOffset(), mInterpolatedDarkAmount);
mView.setTranslationX(offsetX);
mView.setTranslationY(offsetY);

View File

@@ -2707,7 +2707,7 @@ public class KeyguardViewMediator extends CoreStartable implements Dumpable,
/** Hides the surface behind the keyguard by re-showing the keyguard/activity lock screen. */
public void hideSurfaceBehindKeyguard() {
mSurfaceBehindRemoteAnimationRequested = false;
mKeyguardStateController.notifyKeyguardGoingAway(false);
if (mShowing) {
setShowingLocked(true, true);
}

View File

@@ -203,6 +203,13 @@ public class KeyguardViewMediatorTest extends SysuiTestCase {
mViewMediator.mViewMediatorCallback.getBouncerPromptReason());
}
@Test
public void testHideSurfaceBehindKeyguardMarksKeyguardNotGoingAway() {
mViewMediator.hideSurfaceBehindKeyguard();
verify(mKeyguardStateController).notifyKeyguardGoingAway(false);
}
private void createAndStartViewMediator() {
mViewMediator = new KeyguardViewMediator(
mContext,