Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f03be922 authored by Louis Chang's avatar Louis Chang Committed by android-build-merger
Browse files

Merge "Reduce screen layout in task override configuration from its parent config" am: 6e12301e

am: e5424ec5

Change-Id: I34c49818890e02410329ba8e59073d452764670d
parents 816a0c8a e5424ec5
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -1839,7 +1839,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);