Migrate trigger logic to fullfill new UI changes for

One-handed mode settings.

According to new key visual changes for One-handed mode,
modify the trigger condition to reflect the changes.

Bug: 175851783

Test: manual
Test: atest WMShellUnitTests
Change-Id: I4d734b31cafd5ce884010642b5e613c3deadfb20
This commit is contained in:
Jason Chang
2021-05-13 17:20:05 +08:00
parent 81f5ff3b3b
commit da85cb91f1
2 changed files with 4 additions and 6 deletions
@@ -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();
}
}