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

Commit 39e64bbc authored by Panneer Arumugam's avatar Panneer Arumugam Committed by Gerrit - the friendly Code Review server
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.

Conflicts:
    core/java/com/android/internal/view/RotationPolicy.java

Change-Id: Ie77e53ade087df05e102c45bf9d12bdaf09583f7
parent 1ef0a357
Loading
Loading
Loading
Loading
+4 −2
Original line number Original line Diff line number Diff line
@@ -18,6 +18,7 @@ package com.android.internal.view;


import android.content.Context;
import android.content.Context;
import android.content.pm.PackageManager;
import android.content.pm.PackageManager;
import android.os.SystemProperties;
import android.database.ContentObserver;
import android.database.ContentObserver;
import android.net.Uri;
import android.net.Uri;
import android.os.AsyncTask;
import android.os.AsyncTask;
@@ -130,7 +131,8 @@ public final class RotationPolicy {
                try {
                try {
                    IWindowManager wm = WindowManagerGlobal.getWindowManagerService();
                    IWindowManager wm = WindowManagerGlobal.getWindowManagerService();
                    if (enabled) {
                    if (enabled) {
                        wm.freezeRotation(Surface.ROTATION_0);
                        wm.freezeRotation(SystemProperties.getInt(
                                          "persist.panel.orientation", 0) / 90);
                    } else {
                    } else {
                        wm.thawRotation();
                        wm.thawRotation();
                    }
                    }
+1 −1
Original line number Original line Diff line number Diff line
@@ -436,7 +436,7 @@ public class WindowManagerService extends IWindowManager.Stub
    /** All DisplayContents in the world, kept here */
    /** All DisplayContents in the world, kept here */
    SparseArray<DisplayContent> mDisplayContents = new SparseArray<DisplayContent>(2);
    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;
    int mForcedAppOrientation = ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED;
    boolean mAltOrientation = false;
    boolean mAltOrientation = false;
    ArrayList<IRotationWatcher> mRotationWatchers
    ArrayList<IRotationWatcher> mRotationWatchers