Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9bc712f2 authored by Jason Chang's avatar Jason Chang Committed by Android (Google) Code Review
Browse files

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

parents bdb4ed71 da85cb91
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -561,7 +561,7 @@ public class RecentsAnimationDeviceState implements
            return false;
            return false;
        }
        }


        if (mIsOneHandedModeEnabled || mIsSwipeToNotificationEnabled) {
        if (mIsOneHandedModeEnabled) {
            final Info displayInfo = mDisplayController.getInfo();
            final Info displayInfo = mDisplayController.getInfo();
            return (mRotationTouchHelper.touchInOneHandedModeRegion(ev)
            return (mRotationTouchHelper.touchInOneHandedModeRegion(ev)
                && displayInfo.rotation != Surface.ROTATION_90
                && displayInfo.rotation != Surface.ROTATION_90
+3 −5
Original line number Original line Diff line number Diff line
@@ -147,12 +147,10 @@ public class OneHandedModeInputConsumer extends DelegateInputConsumer {
    }
    }


    private void onStartGestureDetected() {
    private void onStartGestureDetected() {
        if (mDeviceState.isOneHandedModeEnabled()) {
        if (mDeviceState.isSwipeToNotificationEnabled()) {
            if (!mDeviceState.isOneHandedModeActive()) {
                SystemUiProxy.INSTANCE.get(mContext).startOneHandedMode();
            }
        } else if (mDeviceState.isSwipeToNotificationEnabled()) {
            SystemUiProxy.INSTANCE.get(mContext).expandNotificationPanel();
            SystemUiProxy.INSTANCE.get(mContext).expandNotificationPanel();
        } else if (!mDeviceState.isOneHandedModeActive()) {
            SystemUiProxy.INSTANCE.get(mContext).startOneHandedMode();
        }
        }
    }
    }