From e138389214cda4d6cfa7af0620f20ca1b5373ca8 Mon Sep 17 00:00:00 2001 From: Alex Chau Date: Tue, 12 Jan 2021 16:22:18 +0000 Subject: [PATCH] Flag FLAG_MULTIPLE_ORIENTATION_SUPPORTED_BY_DENSITY false when allow_rotation is set Bug: 177312556 Change-Id: I22e28b60be68b9cf7bb064d801854d0093920c9e --- .../src/com/android/quickstep/util/RecentsOrientedState.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/quickstep/src/com/android/quickstep/util/RecentsOrientedState.java b/quickstep/src/com/android/quickstep/util/RecentsOrientedState.java index dd3e31fa2a..a89aaf4b3c 100644 --- a/quickstep/src/com/android/quickstep/util/RecentsOrientedState.java +++ b/quickstep/src/com/android/quickstep/util/RecentsOrientedState.java @@ -49,6 +49,7 @@ import androidx.annotation.NonNull; import com.android.launcher3.DeviceProfile; import com.android.launcher3.InvariantDeviceProfile; +import com.android.launcher3.R; import com.android.launcher3.Utilities; import com.android.launcher3.testing.TestProtocol; import com.android.launcher3.touch.PagedOrientationHandler; @@ -156,7 +157,8 @@ public final class RecentsOrientedState implements SharedPreferences.OnSharedPre Resources res = context.getResources(); int originalSmallestWidth = res.getConfiguration().smallestScreenWidthDp * res.getDisplayMetrics().densityDpi / DENSITY_DEVICE_STABLE; - if (originalSmallestWidth < 600) { + if (originalSmallestWidth < 600 && !mContext.getResources().getBoolean( + R.bool.allow_rotation)) { mFlags |= FLAG_MULTIPLE_ORIENTATION_SUPPORTED_BY_DENSITY; } mFlags |= FLAG_SWIPE_UP_NOT_RUNNING;