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

Commit 8936b23e authored by Panneer Arumugam's avatar Panneer Arumugam Committed by Baldev Sahu
Browse files

Display: Initialize mRotation to panel orientation.

    - Fixes the homescreen layout to be prepared based on the panel
      orientation.
    - Disables the rotation animation from 0 to panel orientation after
      bootup.

Change-Id: Ie77e53ade087df05e102c45bf9d12bdaf09583f7
parent 5ad123f4
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@ import android.net.Uri;
import android.os.AsyncTask;
import android.os.Handler;
import android.os.RemoteException;
import android.os.SystemProperties;
import android.os.UserHandle;
import android.provider.Settings;
import android.util.Log;
@@ -140,7 +141,8 @@ public final class RotationPolicy {
                try {
                    IWindowManager wm = WindowManagerGlobal.getWindowManagerService();
                    if (enabled) {
                        wm.freezeRotation(rotation);
                        wm.freezeRotation(SystemProperties.getInt(
                                          "persist.panel.orientation", 0) / 90);
                    } else {
                        wm.thawRotation();
                    }
+1 −1
Original line number Diff line number Diff line
@@ -475,7 +475,7 @@ public class WindowManagerService extends IWindowManager.Stub
    /** All DisplayContents in the world, kept here */
    SparseArray<DisplayContent> mDisplayContents = new SparseArray<DisplayContent>(2);

    int mRotation = 0;
    int mRotation = SystemProperties.getInt("persist.panel.orientation", 0) / 90;
    int mForcedAppOrientation = ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED;
    boolean mAltOrientation = false;