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

Commit 2361434e authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix inconsistency in configuration override when offset" into main

parents 1abfc192 187eb93f
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -267,6 +267,7 @@ public abstract class ConfigurationContainer<E extends ConfigurationContainer> {
                task = task.getCreatedByOrganizerTask();
                if (task != null && (task.mOffsetYForInsets != 0 || task.mOffsetXForInsets != 0)) {
                    outAppBounds.offset(task.mOffsetXForInsets, task.mOffsetYForInsets);
                    outConfigBounds.offset(task.mOffsetXForInsets, task.mOffsetYForInsets);
                }
            }
            final DisplayPolicy.DecorInsets.Info decor =
@@ -284,11 +285,12 @@ public abstract class ConfigurationContainer<E extends ConfigurationContainer> {
            if (!outConfigBounds.intersect(decor.mOverrideConfigFrame)) {
                if (inOutConfig.windowConfiguration.getWindowingMode()
                        == WINDOWING_MODE_MULTI_WINDOW) {
                    outAppBounds.inset(decor.mOverrideConfigInsets);
                    outConfigBounds.inset(decor.mOverrideConfigInsets);
                }
            }
            if (task != null && (task.mOffsetYForInsets != 0 || task.mOffsetXForInsets != 0)) {
                outAppBounds.offset(-task.mOffsetXForInsets, -task.mOffsetYForInsets);
                outConfigBounds.offset(-task.mOffsetXForInsets, -task.mOffsetYForInsets);
            }
        }
        float density = inOutConfig.densityDpi;