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

Commit ae4d2193 authored by Jason Chang's avatar Jason Chang
Browse files

Fix One-handed mode tutorial broken on large screen device

Change the orientation judgement by checking display info's
width & height

Bug: 223486060

Test: manual
Change-Id: I94947ad635146dcb656e5074577b297617326c8d
parent f10b877f
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -63,7 +63,6 @@ import android.os.UserManager;
import android.provider.Settings;
import android.text.TextUtils;
import android.view.MotionEvent;
import android.view.Surface;

import androidx.annotation.BinderThread;

@@ -557,8 +556,7 @@ public class RecentsAnimationDeviceState implements DisplayInfoChangeListener {
        if (mIsOneHandedModeEnabled) {
            final Info displayInfo = mDisplayController.getInfo();
            return (mRotationTouchHelper.touchInOneHandedModeRegion(ev)
                && displayInfo.rotation != Surface.ROTATION_90
                && displayInfo.rotation != Surface.ROTATION_270);
                    && (displayInfo.currentSize.x < displayInfo.currentSize.y));
        }
        return false;
    }