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

Commit 8a30b31a authored by Adam Powell's avatar Adam Powell
Browse files

Fix CTS regression in fitSystemWindows

Don't attempt to apply null insets from a call to fitSystemWindows.
Immediately return false since null insets cannot be applied.

Bug 15452706

Change-Id: I1ad4cc0288db36b3e9485481173e64b2140a0204
parent c5db4bfb
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -6116,6 +6116,12 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
     */
    protected boolean fitSystemWindows(Rect insets) {
        if ((mPrivateFlags3 & PFLAG3_APPLYING_INSETS) == 0) {
            if (insets == null) {
                // Null insets by definition have already been consumed.
                // This call cannot apply insets since there are none to apply,
                // so return false.
                return false;
            }
            // If we're not in the process of dispatching the newer apply insets call,
            // that means we're not in the compatibility path. Dispatch into the newer
            // apply insets path and take things from there.