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

Commit 85c26277 authored by Adam Powell's avatar Adam Powell Committed by Android Git Automerger
Browse files

am d3b9bac6: Merge "Fix incorrect dispatch of empty WindowInsets from...

am d3b9bac6: Merge "Fix incorrect dispatch of empty WindowInsets from ActionBarOverlayLayout" into lmp-preview-dev

* commit 'd3b9bac6a96a065cd4058429569e0ed6ec4df032':
  Fix incorrect dispatch of empty WindowInsets from ActionBarOverlayLayout
parents 962c7b14 55e33b03
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -46,7 +46,13 @@ public final class WindowInsets {
     * since it would allow them to inadvertently consume unknown insets by returning it.
     * @hide
     */
    public static final WindowInsets EMPTY = new WindowInsets(EMPTY_RECT, EMPTY_RECT);
    public static final WindowInsets CONSUMED;

    static {
        CONSUMED = new WindowInsets(EMPTY_RECT, EMPTY_RECT);
        CONSUMED.mSystemWindowInsetsConsumed = true;
        CONSUMED.mWindowDecorInsetsConsumed = true;
    }

    /** @hide */
    public WindowInsets(Rect systemWindowInsets, Rect windowDecorInsets) {
+9 −1
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@ import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.content.Context;
import android.content.pm.ActivityInfo;
import android.content.res.Configuration;
import android.content.res.TypedArray;
import android.graphics.Canvas;
import android.graphics.Rect;
@@ -245,6 +246,13 @@ public class ActionBarOverlayLayout extends ViewGroup implements DecorContentPar
        }
    }

    @Override
    protected void onConfigurationChanged(Configuration newConfig) {
        super.onConfigurationChanged(newConfig);
        init(getContext());
        requestApplyInsets();
    }

    @Override
    public void onWindowSystemUiVisibilityChanged(int visible) {
        super.onWindowSystemUiVisibilityChanged(visible);
@@ -329,7 +337,7 @@ public class ActionBarOverlayLayout extends ViewGroup implements DecorContentPar
        // insets in all cases, we need to know the measured size of the various action
        // bar elements.  onApplyWindowInsets() happens before the measure pass, so we can't
        // do that here.  Instead we will take this up in onMeasure().
        return WindowInsets.EMPTY;
        return WindowInsets.CONSUMED;
    }

    @Override