Loading core/java/com/android/internal/view/RotationPolicy.java +4 −2 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.internal.view; import android.os.SystemProperties; import android.content.Context; import android.content.pm.PackageManager; import android.content.res.Configuration; Loading Loading @@ -142,7 +143,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(); } Loading policy/src/com/android/internal/policy/impl/PhoneWindowManager.java +7 −2 Original line number Diff line number Diff line Loading @@ -584,6 +584,9 @@ public class PhoneWindowManager implements WindowManagerPolicy { int mOverscanRight = 0; int mOverscanBottom = 0; // Panel Orientation default portrait int mPanelOrientation = Surface.ROTATION_0; // What we do when the user double-taps on home private int mDoubleTapOnHomeBehavior; Loading Loading @@ -1659,6 +1662,8 @@ public class PhoneWindowManager implements WindowManagerPolicy { return; } mDisplay = display; mPanelOrientation = SystemProperties.getInt("persist.panel.orientation", 0) / 90; final Resources res = mContext.getResources(); int shortSize, longSize; Loading Loading @@ -5944,7 +5949,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { mAllowAllRotations = mContext.getResources().getBoolean( com.android.internal.R.bool.config_allowAllRotations) ? 1 : 0; } if (sensorRotation != Surface.ROTATION_180 if (sensorRotation != mUpsideDownRotation || mAllowAllRotations == 1 || orientation == ActivityInfo.SCREEN_ORIENTATION_FULL_SENSOR || orientation == ActivityInfo.SCREEN_ORIENTATION_FULL_USER) { Loading Loading @@ -6022,7 +6027,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { if (preferredRotation >= 0) { return preferredRotation; } return Surface.ROTATION_0; return mPanelOrientation; } } } Loading services/core/java/com/android/server/wm/WindowManagerService.java +1 −1 Original line number Diff line number Diff line Loading @@ -486,7 +486,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; Loading Loading
core/java/com/android/internal/view/RotationPolicy.java +4 −2 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.internal.view; import android.os.SystemProperties; import android.content.Context; import android.content.pm.PackageManager; import android.content.res.Configuration; Loading Loading @@ -142,7 +143,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(); } Loading
policy/src/com/android/internal/policy/impl/PhoneWindowManager.java +7 −2 Original line number Diff line number Diff line Loading @@ -584,6 +584,9 @@ public class PhoneWindowManager implements WindowManagerPolicy { int mOverscanRight = 0; int mOverscanBottom = 0; // Panel Orientation default portrait int mPanelOrientation = Surface.ROTATION_0; // What we do when the user double-taps on home private int mDoubleTapOnHomeBehavior; Loading Loading @@ -1659,6 +1662,8 @@ public class PhoneWindowManager implements WindowManagerPolicy { return; } mDisplay = display; mPanelOrientation = SystemProperties.getInt("persist.panel.orientation", 0) / 90; final Resources res = mContext.getResources(); int shortSize, longSize; Loading Loading @@ -5944,7 +5949,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { mAllowAllRotations = mContext.getResources().getBoolean( com.android.internal.R.bool.config_allowAllRotations) ? 1 : 0; } if (sensorRotation != Surface.ROTATION_180 if (sensorRotation != mUpsideDownRotation || mAllowAllRotations == 1 || orientation == ActivityInfo.SCREEN_ORIENTATION_FULL_SENSOR || orientation == ActivityInfo.SCREEN_ORIENTATION_FULL_USER) { Loading Loading @@ -6022,7 +6027,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { if (preferredRotation >= 0) { return preferredRotation; } return Surface.ROTATION_0; return mPanelOrientation; } } } Loading
services/core/java/com/android/server/wm/WindowManagerService.java +1 −1 Original line number Diff line number Diff line Loading @@ -486,7 +486,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; Loading