Merge "Align one handed bouncer to the right edge of the screen." into sc-v2-dev am: c1ac2a11e4

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

Change-Id: Ie205ad36812b03ffcdf4514c29a29375a3f91e82
This commit is contained in:
Ben Murdoch
2021-08-27 10:47:56 +00:00
committed by Automerger Merge Worker
2 changed files with 4 additions and 2 deletions

View File

@@ -317,7 +317,8 @@ public class KeyguardSecurityContainer extends FrameLayout {
mRunningOneHandedAnimator = null; mRunningOneHandedAnimator = null;
} }
int targetTranslation = mIsSecurityViewLeftAligned ? 0 : (int) (getMeasuredWidth() / 2f); int targetTranslation = mIsSecurityViewLeftAligned
? 0 : (int) (getMeasuredWidth() - mSecurityViewFlipper.getWidth());
if (animate) { if (animate) {
mRunningOneHandedAnimator = mRunningOneHandedAnimator =

View File

@@ -165,7 +165,8 @@ public class KeyguardSecurityContainerTest extends SysuiTestCase {
mKeyguardSecurityContainer.setOneHandedModeLeftAligned( mKeyguardSecurityContainer.setOneHandedModeLeftAligned(
/* leftAligned= */false, /* animate= */false); /* leftAligned= */false, /* animate= */false);
verify(mSecurityViewFlipper).setTranslationX(SCREEN_WIDTH / 2.0f); verify(mSecurityViewFlipper).setTranslationX(
mKeyguardSecurityContainer.getWidth() - mSecurityViewFlipper.getWidth());
mKeyguardSecurityContainer.setOneHandedModeLeftAligned( mKeyguardSecurityContainer.setOneHandedModeLeftAligned(
/* leftAligned= */true, /* animate= */false); /* leftAligned= */true, /* animate= */false);