Reduce screen layout in task override configuration from
its parent config This prevented scheduling unexpected screen layout size changes to client when entering PIP. Bug: 110808291 Test: atest ActivityManagerPinnedStackTests Test: go/wm-smoke Change-Id: I6ff55bedad29df2ae3d00cdd18a748c052fae750
This commit is contained in:
@@ -1841,7 +1841,9 @@ class TaskRecord extends ConfigurationContainer implements TaskWindowContainerLi
|
||||
final int compatScreenHeightDp = (int) (mTmpNonDecorBounds.height() / density);
|
||||
// We're only overriding LONG, SIZE and COMPAT parts of screenLayout, so we start override
|
||||
// calculation with partial default.
|
||||
final int sl = Configuration.SCREENLAYOUT_LONG_YES | Configuration.SCREENLAYOUT_SIZE_XLARGE;
|
||||
// Reducing the screen layout starting from its parent config.
|
||||
final int sl = parentConfig.screenLayout &
|
||||
(Configuration.SCREENLAYOUT_LONG_MASK | Configuration.SCREENLAYOUT_SIZE_MASK);
|
||||
final int longSize = Math.max(compatScreenHeightDp, compatScreenWidthDp);
|
||||
final int shortSize = Math.min(compatScreenHeightDp, compatScreenWidthDp);
|
||||
config.screenLayout = Configuration.reduceScreenLayout(sl, longSize, shortSize);
|
||||
|
||||
Reference in New Issue
Block a user