Loading packages/SystemUI/src/com/android/keyguard/KeyguardHostViewController.java +7 −0 Original line number Diff line number Diff line Loading @@ -492,4 +492,11 @@ public class KeyguardHostViewController extends ViewController<KeyguardHostView> mKeyguardSecurityContainerController.updateResources(); } } /** Update keyguard position based on a tapped X coordinate. */ public void updateKeyguardPosition(float x) { if (mKeyguardSecurityContainerController != null) { mKeyguardSecurityContainerController.updateKeyguardPosition(x); } } } packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainer.java +14 −3 Original line number Diff line number Diff line Loading @@ -267,6 +267,13 @@ public class KeyguardSecurityContainer extends FrameLayout { updateSecurityViewLocation(false); } /** Update keyguard position based on a tapped X coordinate. */ public void updateKeyguardPosition(float x) { if (mOneHandedMode) { moveBouncerForXCoordinate(x, /* animate= */false); } } /** Return whether the one-handed keyguard should be enabled. */ private boolean canUseOneHandedBouncer() { // Is it enabled? Loading Loading @@ -488,9 +495,13 @@ public class KeyguardSecurityContainer extends FrameLayout { return; } moveBouncerForXCoordinate(event.getX(), /* animate= */true); } private void moveBouncerForXCoordinate(float x, boolean animate) { // Did the tap hit the "other" side of the bouncer? if ((mIsSecurityViewLeftAligned && (event.getX() > getWidth() / 2f)) || (!mIsSecurityViewLeftAligned && (event.getX() < getWidth() / 2f))) { if ((mIsSecurityViewLeftAligned && (x > getWidth() / 2f)) || (!mIsSecurityViewLeftAligned && (x < getWidth() / 2f))) { mIsSecurityViewLeftAligned = !mIsSecurityViewLeftAligned; Settings.Global.putInt( Loading @@ -499,7 +510,7 @@ public class KeyguardSecurityContainer extends FrameLayout { mIsSecurityViewLeftAligned ? Settings.Global.ONE_HANDED_KEYGUARD_SIDE_LEFT : Settings.Global.ONE_HANDED_KEYGUARD_SIDE_RIGHT); updateSecurityViewLocation(true); updateSecurityViewLocation(animate); } } Loading packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainerController.java +5 −0 Original line number Diff line number Diff line Loading @@ -515,6 +515,11 @@ public class KeyguardSecurityContainerController extends ViewController<Keyguard } } /** Update keyguard position based on a tapped X coordinate. */ public void updateKeyguardPosition(float x) { mView.updateKeyguardPosition(x); } static class Factory { private final KeyguardSecurityContainer mView; Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBouncer.java +7 −0 Original line number Diff line number Diff line Loading @@ -555,6 +555,13 @@ public class KeyguardBouncer { pw.println(" mIsAnimatingAway: " + mIsAnimatingAway); } /** Update keyguard position based on a tapped X coordinate. */ public void updateKeyguardPosition(float x) { if (mKeyguardViewController != null) { mKeyguardViewController.updateKeyguardPosition(x); } } public interface BouncerExpansionCallback { void onFullyShown(); void onStartingToHide(); Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java +6 −0 Original line number Diff line number Diff line Loading @@ -3494,6 +3494,12 @@ public class NotificationPanelViewController extends PanelViewController { updateHorizontalPanelPosition(event.getX()); handled = true; } if (event.getActionMasked() == MotionEvent.ACTION_DOWN && isFullyExpanded() && mStatusBarKeyguardViewManager.isShowing()) { mStatusBarKeyguardViewManager.updateKeyguardPosition(event.getX()); } handled |= super.onTouch(v, event); return !mDozing || mPulsing || handled || showingOrAnimatingAltAuth; } Loading Loading
packages/SystemUI/src/com/android/keyguard/KeyguardHostViewController.java +7 −0 Original line number Diff line number Diff line Loading @@ -492,4 +492,11 @@ public class KeyguardHostViewController extends ViewController<KeyguardHostView> mKeyguardSecurityContainerController.updateResources(); } } /** Update keyguard position based on a tapped X coordinate. */ public void updateKeyguardPosition(float x) { if (mKeyguardSecurityContainerController != null) { mKeyguardSecurityContainerController.updateKeyguardPosition(x); } } }
packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainer.java +14 −3 Original line number Diff line number Diff line Loading @@ -267,6 +267,13 @@ public class KeyguardSecurityContainer extends FrameLayout { updateSecurityViewLocation(false); } /** Update keyguard position based on a tapped X coordinate. */ public void updateKeyguardPosition(float x) { if (mOneHandedMode) { moveBouncerForXCoordinate(x, /* animate= */false); } } /** Return whether the one-handed keyguard should be enabled. */ private boolean canUseOneHandedBouncer() { // Is it enabled? Loading Loading @@ -488,9 +495,13 @@ public class KeyguardSecurityContainer extends FrameLayout { return; } moveBouncerForXCoordinate(event.getX(), /* animate= */true); } private void moveBouncerForXCoordinate(float x, boolean animate) { // Did the tap hit the "other" side of the bouncer? if ((mIsSecurityViewLeftAligned && (event.getX() > getWidth() / 2f)) || (!mIsSecurityViewLeftAligned && (event.getX() < getWidth() / 2f))) { if ((mIsSecurityViewLeftAligned && (x > getWidth() / 2f)) || (!mIsSecurityViewLeftAligned && (x < getWidth() / 2f))) { mIsSecurityViewLeftAligned = !mIsSecurityViewLeftAligned; Settings.Global.putInt( Loading @@ -499,7 +510,7 @@ public class KeyguardSecurityContainer extends FrameLayout { mIsSecurityViewLeftAligned ? Settings.Global.ONE_HANDED_KEYGUARD_SIDE_LEFT : Settings.Global.ONE_HANDED_KEYGUARD_SIDE_RIGHT); updateSecurityViewLocation(true); updateSecurityViewLocation(animate); } } Loading
packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainerController.java +5 −0 Original line number Diff line number Diff line Loading @@ -515,6 +515,11 @@ public class KeyguardSecurityContainerController extends ViewController<Keyguard } } /** Update keyguard position based on a tapped X coordinate. */ public void updateKeyguardPosition(float x) { mView.updateKeyguardPosition(x); } static class Factory { private final KeyguardSecurityContainer mView; Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBouncer.java +7 −0 Original line number Diff line number Diff line Loading @@ -555,6 +555,13 @@ public class KeyguardBouncer { pw.println(" mIsAnimatingAway: " + mIsAnimatingAway); } /** Update keyguard position based on a tapped X coordinate. */ public void updateKeyguardPosition(float x) { if (mKeyguardViewController != null) { mKeyguardViewController.updateKeyguardPosition(x); } } public interface BouncerExpansionCallback { void onFullyShown(); void onStartingToHide(); Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java +6 −0 Original line number Diff line number Diff line Loading @@ -3494,6 +3494,12 @@ public class NotificationPanelViewController extends PanelViewController { updateHorizontalPanelPosition(event.getX()); handled = true; } if (event.getActionMasked() == MotionEvent.ACTION_DOWN && isFullyExpanded() && mStatusBarKeyguardViewManager.isShowing()) { mStatusBarKeyguardViewManager.updateKeyguardPosition(event.getX()); } handled |= super.onTouch(v, event); return !mDozing || mPulsing || handled || showingOrAnimatingAltAuth; } Loading