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

Commit af031b69 authored by Bill Lin's avatar Bill Lin
Browse files

Only count EVENT_ONE_HANDED_TRIGGER_ROTATION_OUT in STATE_ACTIVE

The design philosophy of EVENT_ONE_HANDED_TRIGGER_ROTATION_OUT is
- When device in STATE_ACTIVE
- Rotate will automatically exit OHM

We only count when CUJ:
User trigger OHM -> Rotate -> Exit OHM

But bypass the CUJ:
No trigger OHM -> Rotate -> no action

Test: atest SystemUITests
Bug: 239654147
Change-Id: I2e73f29f4edd77998e015db960430f2b3a768349
parent 60135eb2
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -675,11 +675,14 @@ public class OneHandedController implements RemoteCallable<OneHandedController>,
            return;
        }

        mDisplayAreaOrganizer.onRotateDisplay(mContext, toRotation, wct);
        if (mState.getState() == STATE_ACTIVE) {
            mOneHandedUiEventLogger.writeEvent(
                    OneHandedUiEventLogger.EVENT_ONE_HANDED_TRIGGER_ROTATION_OUT);
        }

        mDisplayAreaOrganizer.onRotateDisplay(mContext, toRotation, wct);
    }

    /**
     * The interface for calls from outside the Shell, within the host process.
     */