Disabling seamless rotation in multiwindow mode
Bug: 133765491 Change-Id: If68c709fa5b8216d63fc516f16f03bf2aa83172a
This commit is contained in:
@@ -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 {
|
||||
@@ -500,6 +498,7 @@ public class Launcher extends BaseDraggingActivity implements LauncherExterns,
|
||||
mRotationMode = RotationMode.NORMAL;
|
||||
}
|
||||
|
||||
mRotationHelper.updateRotationAnimation();
|
||||
onDeviceProfileInitiated();
|
||||
mModelWriter = mModel.getWriter(getWallpaperDeviceProfile().isVerticalBarLayout(), true);
|
||||
}
|
||||
|
||||
@@ -94,16 +94,20 @@ 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;
|
||||
mLauncher.getWindow().setAttributes(lp);
|
||||
if (oldAnim != lp.rotationAnimation) {
|
||||
mLauncher.getWindow().setAttributes(lp);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -123,6 +127,7 @@ public class RotationHelper implements OnSharedPreferenceChangeListener {
|
||||
public void setStateHandlerRequest(int request) {
|
||||
if (mStateHandlerRequest != request) {
|
||||
mStateHandlerRequest = request;
|
||||
updateRotationAnimation();
|
||||
notifyChange();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user