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

Commit 9ab688d4 authored by Adrian Roos's avatar Adrian Roos
Browse files

WindowInsets: Ignore consumeStableInsets()

With the introduction of insets types we no longer support consuming
individual insets.

Instead we consumed all insets, regardless of whether you consumed
stable or system insets - but that led to compat issues.

On Q, consumeStableInsets was almost always a no-op anyways, because
stable insets already came pre-consumed during dispatch.

This change makes consumeStableInsets() a no-op to more closely match
that behavior.

Bug: 152033222
Test: atest WindowInsetsTest
Change-Id: Ic48ee7386320fc16449ac79435b69305a8132bf8
parent 30c2f30f
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -818,12 +818,13 @@ public final class WindowInsets {
     * @return A modified copy of this WindowInsets
     * @deprecated Consuming of different parts individually of a {@link WindowInsets} instance is
     * deprecated, since {@link WindowInsets} contains many different insets. Use {@link #CONSUMED}
     * instead to stop dispatching insets.
     * instead to stop dispatching insets. On {@link android.os.Build.VERSION_CODES#R R}, this
     * method has no effect.
     */
    @Deprecated
    @NonNull
    public WindowInsets consumeStableInsets() {
        return consumeSystemWindowInsets();
        return this;
    }

    /**