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

Commit 991868b9 authored by Tiger Huang's avatar Tiger Huang
Browse files

Only return existing types from Type#defaultVisible() or Type#all()

Otherwise, Type#toString might return confusing information after
passing Type#defaultVisible() or Type#all() to it.

Fix: 391813572
Flag: EXEMPT bugfix
Test: presubmit
Change-Id: I76d832edb4fec1b65038c1d964e4ffdbc4c9b254
parent a53fdbb2
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -1853,8 +1853,11 @@ public final class WindowInsets {
        @InsetsType
        static final int LAST = SYSTEM_OVERLAYS;
        static final int SIZE = 9;

        @InsetsType
        static final int ALL = ((1 << SIZE) - 1);
        @InsetsType
        static final int DEFAULT_VISIBLE = ~IME;
        static final int DEFAULT_VISIBLE = ALL & ~IME;

        static int indexOf(@InsetsType int type) {
            switch (type) {
@@ -2074,7 +2077,7 @@ public final class WindowInsets {
         */
        @InsetsType
        public static int all() {
            return 0xFFFFFFFF;
            return ALL;
        }

        /**