Loading src/com/android/launcher3/Launcher.java +2 −3 Original line number Diff line number Diff line Loading @@ -490,9 +490,7 @@ public class Launcher extends BaseDraggingActivity implements LauncherExterns, mDeviceProfile = mDeviceProfile.getMultiWindowProfile(this, mwSize); } if (supportsFakeLandscapeUI() && mDeviceProfile.isVerticalBarLayout() && !mDeviceProfile.isMultiWindowMode) { if (supportsFakeLandscapeUI() && mDeviceProfile.isVerticalBarLayout()) { mStableDeviceProfile = mDeviceProfile.inv.portraitProfile; mRotationMode = UiFactory.getRotationMode(mDeviceProfile); } else { Loading @@ -500,6 +498,7 @@ public class Launcher extends BaseDraggingActivity implements LauncherExterns, mRotationMode = RotationMode.NORMAL; } mRotationHelper.updateRotationAnimation(); onDeviceProfileInitiated(); mModelWriter = mModel.getWriter(getWallpaperDeviceProfile().isVerticalBarLayout(), true); } Loading src/com/android/launcher3/states/RotationHelper.java +8 −3 Original line number Diff line number Diff line Loading @@ -94,18 +94,22 @@ public class RotationHelper implements OnSharedPreferenceChangeListener { public boolean homeScreenCanRotate() { return mIgnoreAutoRotateSettings || mAutoRotateEnabled || mStateHandlerRequest != REQUEST_NONE; || mStateHandlerRequest != REQUEST_NONE || mLauncher.getDeviceProfile().isMultiWindowMode; } private void updateRotationAnimation() { public void updateRotationAnimation() { if (FeatureFlags.FAKE_LANDSCAPE_UI.get()) { WindowManager.LayoutParams lp = mLauncher.getWindow().getAttributes(); int oldAnim = lp.rotationAnimation; lp.rotationAnimation = homeScreenCanRotate() ? WindowManager.LayoutParams.ROTATION_ANIMATION_ROTATE : WindowManager.LayoutParams.ROTATION_ANIMATION_SEAMLESS; if (oldAnim != lp.rotationAnimation) { mLauncher.getWindow().setAttributes(lp); } } } @Override public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String s) { Loading @@ -123,6 +127,7 @@ public class RotationHelper implements OnSharedPreferenceChangeListener { public void setStateHandlerRequest(int request) { if (mStateHandlerRequest != request) { mStateHandlerRequest = request; updateRotationAnimation(); notifyChange(); } } Loading Loading
src/com/android/launcher3/Launcher.java +2 −3 Original line number Diff line number Diff line Loading @@ -490,9 +490,7 @@ public class Launcher extends BaseDraggingActivity implements LauncherExterns, mDeviceProfile = mDeviceProfile.getMultiWindowProfile(this, mwSize); } if (supportsFakeLandscapeUI() && mDeviceProfile.isVerticalBarLayout() && !mDeviceProfile.isMultiWindowMode) { if (supportsFakeLandscapeUI() && mDeviceProfile.isVerticalBarLayout()) { mStableDeviceProfile = mDeviceProfile.inv.portraitProfile; mRotationMode = UiFactory.getRotationMode(mDeviceProfile); } else { Loading @@ -500,6 +498,7 @@ public class Launcher extends BaseDraggingActivity implements LauncherExterns, mRotationMode = RotationMode.NORMAL; } mRotationHelper.updateRotationAnimation(); onDeviceProfileInitiated(); mModelWriter = mModel.getWriter(getWallpaperDeviceProfile().isVerticalBarLayout(), true); } Loading
src/com/android/launcher3/states/RotationHelper.java +8 −3 Original line number Diff line number Diff line Loading @@ -94,18 +94,22 @@ public class RotationHelper implements OnSharedPreferenceChangeListener { public boolean homeScreenCanRotate() { return mIgnoreAutoRotateSettings || mAutoRotateEnabled || mStateHandlerRequest != REQUEST_NONE; || mStateHandlerRequest != REQUEST_NONE || mLauncher.getDeviceProfile().isMultiWindowMode; } private void updateRotationAnimation() { public void updateRotationAnimation() { if (FeatureFlags.FAKE_LANDSCAPE_UI.get()) { WindowManager.LayoutParams lp = mLauncher.getWindow().getAttributes(); int oldAnim = lp.rotationAnimation; lp.rotationAnimation = homeScreenCanRotate() ? WindowManager.LayoutParams.ROTATION_ANIMATION_ROTATE : WindowManager.LayoutParams.ROTATION_ANIMATION_SEAMLESS; if (oldAnim != lp.rotationAnimation) { mLauncher.getWindow().setAttributes(lp); } } } @Override public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String s) { Loading @@ -123,6 +127,7 @@ public class RotationHelper implements OnSharedPreferenceChangeListener { public void setStateHandlerRequest(int request) { if (mStateHandlerRequest != request) { mStateHandlerRequest = request; updateRotationAnimation(); notifyChange(); } } Loading