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

Commit a6519ca7 authored by Konsta's avatar Konsta Committed by Gerrit Code Review
Browse files

fix screen off animation for devices with abnormal hardware orientation

Change-Id: I8f263218554fd78f99ababce05f34751c07c7f30
parent f2c3122b
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -132,7 +132,8 @@ final class ElectronBeam {
        // Get the display size and adjust it for rotation.
        mDisplay.getDisplayInfo(mDisplayInfo);
        mDisplayLayerStack = mDisplay.getLayerStack();
        mDisplayRotation = mDisplayInfo.rotation;
        mDisplayRotation = (mDisplayInfo.rotation +
                (4 - android.os.SystemProperties.getInt("ro.sf.hwrotation", 0) / 90)) % 4;
        if (mDisplayRotation == Surface.ROTATION_90
                || mDisplayRotation == Surface.ROTATION_270) {
            mDisplayWidth = mDisplayInfo.logicalHeight;