Merge "Remove ActivityInfo.CONFIG_SCREEN_SIZE if orientation is still the same." into udc-dev am: 5c18fa35b2
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/22709055 Change-Id: I21ddb2670ed010e852e06370b8c56cd65559006e Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -168,9 +168,14 @@ public class TaskbarManager {
|
||||
DeviceProfile oldDp = mTaskbarActivityContext.getDeviceProfile();
|
||||
boolean isOrientationChange =
|
||||
(configDiff & ActivityInfo.CONFIG_ORIENTATION) != 0;
|
||||
|
||||
int newOrientation = newConfig.windowConfiguration.getRotation();
|
||||
int oldOrientation = mOldConfig.windowConfiguration.getRotation();
|
||||
int oldWidth = isOrientationChange ? oldDp.heightPx : oldDp.widthPx;
|
||||
int oldHeight = isOrientationChange ? oldDp.widthPx : oldDp.heightPx;
|
||||
if (dp.widthPx == oldWidth && dp.heightPx == oldHeight) {
|
||||
|
||||
if ((dp.widthPx == oldWidth && dp.heightPx == oldHeight)
|
||||
|| (newOrientation == oldOrientation)) {
|
||||
configDiffForRecreate &= ~ActivityInfo.CONFIG_SCREEN_SIZE;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user