Merge "Migrate trigger logic to fullfill new UI changes for One-handed mode settings." into sc-dev am: 9bc712f267 am: 92f45a5019

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/14527644

Change-Id: I35790ebb84f2ba2c0b06a8622efb945399bab598
This commit is contained in:
Jason Chang
2021-05-28 03:29:15 +00:00
committed by Automerger Merge Worker
2 changed files with 4 additions and 6 deletions

View File

@@ -561,7 +561,7 @@ public class RecentsAnimationDeviceState implements
return false;
}
if (mIsOneHandedModeEnabled || mIsSwipeToNotificationEnabled) {
if (mIsOneHandedModeEnabled) {
final Info displayInfo = mDisplayController.getInfo();
return (mRotationTouchHelper.touchInOneHandedModeRegion(ev)
&& displayInfo.rotation != Surface.ROTATION_90

View File

@@ -147,12 +147,10 @@ public class OneHandedModeInputConsumer extends DelegateInputConsumer {
}
private void onStartGestureDetected() {
if (mDeviceState.isOneHandedModeEnabled()) {
if (!mDeviceState.isOneHandedModeActive()) {
SystemUiProxy.INSTANCE.get(mContext).startOneHandedMode();
}
} else if (mDeviceState.isSwipeToNotificationEnabled()) {
if (mDeviceState.isSwipeToNotificationEnabled()) {
SystemUiProxy.INSTANCE.get(mContext).expandNotificationPanel();
} else if (!mDeviceState.isOneHandedModeActive()) {
SystemUiProxy.INSTANCE.get(mContext).startOneHandedMode();
}
}