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

Commit 91a31123 authored by Tiger Huang's avatar Tiger Huang Committed by Automerger Merge Worker
Browse files

Merge "Use public types to update system UI visibility" into tm-dev am: d5a1d1e2

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17291303

Change-Id: Id432146f9a831354b09636f26584c810d9c22f98
parents dddb71b7 d5a1d1e2
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -23,8 +23,6 @@ import static android.view.Display.DEFAULT_DISPLAY;
import static android.view.Display.INVALID_DISPLAY;
import static android.view.InputDevice.SOURCE_CLASS_NONE;
import static android.view.InsetsState.ITYPE_IME;
import static android.view.InsetsState.ITYPE_NAVIGATION_BAR;
import static android.view.InsetsState.ITYPE_STATUS_BAR;
import static android.view.InsetsState.SIZE;
import static android.view.View.PFLAG_DRAW_ANIMATION;
import static android.view.View.SYSTEM_UI_FLAG_FULLSCREEN;
@@ -2316,11 +2314,12 @@ public final class ViewRootImpl implements ViewParent,
     */
    void updateCompatSysUiVisibility(@InternalInsetsType int type, boolean visible,
            boolean hasControl) {
        if (type != ITYPE_STATUS_BAR && type != ITYPE_NAVIGATION_BAR) {
        @InsetsType final int publicType = InsetsState.toPublicType(type);
        if (publicType != Type.statusBars() && publicType != Type.navigationBars()) {
            return;
        }
        final SystemUiVisibilityInfo info = mCompatibleVisibilityInfo;
        final int systemUiFlag = type == ITYPE_STATUS_BAR
        final int systemUiFlag = publicType == Type.statusBars()
                ? View.SYSTEM_UI_FLAG_FULLSCREEN
                : View.SYSTEM_UI_FLAG_HIDE_NAVIGATION;
        final boolean wasVisible = (info.globalVisibility & systemUiFlag) == 0;