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

Commit ad1ea62b authored by LuK1337's avatar LuK1337 Committed by Joey Rizzoli
Browse files

SingleHandWindow: Allow locking the rotation to 180°

Change-Id: I4eec26084ef7a299d454483b429ab914405847cd
parent 80dc171d
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -136,7 +136,10 @@ final class SingleHandWindow {
    public void show() {
        if (!mWindowVisible) {
            if (!mIsBlurTopWindow) {
                mService.freezeOrThawRotation(Surface.ROTATION_0);
                int currentRotation = mDefaultDisplay.getRotation();

                mService.freezeOrThawRotation(currentRotation == Surface.ROTATION_180 ?
                        Surface.ROTATION_180 : Surface.ROTATION_0);
                mService.setSingleHandMode(mLeft ? 1 : 2);
                mService.requestTraversal();
            }