Merge "Migrate trigger logic to fullfill new UI changes for One-handed mode settings." into sc-dev

This commit is contained in:
Jason Chang 2021-05-27 05:31:13 +00:00 committed by Android (Google) Code Review
commit 9bc712f267
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();
}
}