Merge "Align one handed bouncer to the right edge of the screen." into sc-v2-dev am: c1ac2a11e4 am: 17e36b40e0
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15685196 Change-Id: Ib17e49ca114f7dd65f7f73c1ecabb9b451c4c3c5
This commit is contained in:
@@ -317,7 +317,8 @@ public class KeyguardSecurityContainer extends FrameLayout {
|
||||
mRunningOneHandedAnimator = null;
|
||||
}
|
||||
|
||||
int targetTranslation = mIsSecurityViewLeftAligned ? 0 : (int) (getMeasuredWidth() / 2f);
|
||||
int targetTranslation = mIsSecurityViewLeftAligned
|
||||
? 0 : (int) (getMeasuredWidth() - mSecurityViewFlipper.getWidth());
|
||||
|
||||
if (animate) {
|
||||
mRunningOneHandedAnimator =
|
||||
|
||||
@@ -165,7 +165,8 @@ public class KeyguardSecurityContainerTest extends SysuiTestCase {
|
||||
|
||||
mKeyguardSecurityContainer.setOneHandedModeLeftAligned(
|
||||
/* leftAligned= */false, /* animate= */false);
|
||||
verify(mSecurityViewFlipper).setTranslationX(SCREEN_WIDTH / 2.0f);
|
||||
verify(mSecurityViewFlipper).setTranslationX(
|
||||
mKeyguardSecurityContainer.getWidth() - mSecurityViewFlipper.getWidth());
|
||||
|
||||
mKeyguardSecurityContainer.setOneHandedModeLeftAligned(
|
||||
/* leftAligned= */true, /* animate= */false);
|
||||
|
||||
Reference in New Issue
Block a user