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

Commit 42ff37a2 authored by Tiger Huang's avatar Tiger Huang Committed by Android (Google) Code Review
Browse files

Merge "Don't force IME drawing system bar backgrounds" into tm-qpr-dev

parents 4d0ab326 ff489163
Loading
Loading
Loading
Loading
+6 −3
Original line number Original line Diff line number Diff line
@@ -42,6 +42,7 @@ import static android.view.WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS;
import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION;
import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION;
import static android.view.WindowManager.LayoutParams.TYPE_BASE_APPLICATION;
import static android.view.WindowManager.LayoutParams.TYPE_BASE_APPLICATION;
import static android.view.WindowManager.LayoutParams.TYPE_DRAWN_APPLICATION;
import static android.view.WindowManager.LayoutParams.TYPE_DRAWN_APPLICATION;
import static android.view.WindowManager.LayoutParams.TYPE_INPUT_METHOD;


import static com.android.internal.policy.PhoneWindow.FEATURE_OPTIONS_PANEL;
import static com.android.internal.policy.PhoneWindow.FEATURE_OPTIONS_PANEL;


@@ -309,6 +310,7 @@ public class DecorView extends FrameLayout implements RootViewSurfaceTaker, Wind
                R.integer.dock_enter_exit_duration);
                R.integer.dock_enter_exit_duration);
        mForceWindowDrawsBarBackgrounds = context.getResources().getBoolean(
        mForceWindowDrawsBarBackgrounds = context.getResources().getBoolean(
                R.bool.config_forceWindowDrawsStatusBarBackground)
                R.bool.config_forceWindowDrawsStatusBarBackground)
                && params.type != TYPE_INPUT_METHOD
                && context.getApplicationInfo().targetSdkVersion >= N;
                && context.getApplicationInfo().targetSdkVersion >= N;
        mSemiTransparentBarColor = context.getResources().getColor(
        mSemiTransparentBarColor = context.getResources().getColor(
                R.color.system_bar_background_semi_transparent, null /* theme */);
                R.color.system_bar_background_semi_transparent, null /* theme */);
@@ -1164,8 +1166,8 @@ public class DecorView extends FrameLayout implements RootViewSurfaceTaker, Wind
                    0 /* sideInset */, animate && !disallowAnimate,
                    0 /* sideInset */, animate && !disallowAnimate,
                    mForceWindowDrawsBarBackgrounds, controller);
                    mForceWindowDrawsBarBackgrounds, controller);
            boolean oldDrawLegacy = mDrawLegacyNavigationBarBackground;
            boolean oldDrawLegacy = mDrawLegacyNavigationBarBackground;
            mDrawLegacyNavigationBarBackground = mNavigationColorViewState.visible
            mDrawLegacyNavigationBarBackground =
                    && (mWindow.getAttributes().flags & FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS) == 0;
                    (mWindow.getAttributes().flags & FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS) == 0;
            if (oldDrawLegacy != mDrawLegacyNavigationBarBackground) {
            if (oldDrawLegacy != mDrawLegacyNavigationBarBackground) {
                mDrawLegacyNavigationBarBackgroundHandled =
                mDrawLegacyNavigationBarBackgroundHandled =
                        mWindow.onDrawLegacyNavigationBarBackgroundChanged(
                        mWindow.onDrawLegacyNavigationBarBackgroundChanged(
@@ -1206,7 +1208,8 @@ public class DecorView extends FrameLayout implements RootViewSurfaceTaker, Wind
        boolean hideNavigation = (sysUiVisibility & SYSTEM_UI_FLAG_HIDE_NAVIGATION) != 0
        boolean hideNavigation = (sysUiVisibility & SYSTEM_UI_FLAG_HIDE_NAVIGATION) != 0
                || !(controller == null || controller.isRequestedVisible(ITYPE_NAVIGATION_BAR));
                || !(controller == null || controller.isRequestedVisible(ITYPE_NAVIGATION_BAR));
        boolean decorFitsSystemWindows = mWindow.mDecorFitsSystemWindows;
        boolean decorFitsSystemWindows = mWindow.mDecorFitsSystemWindows;
        boolean forceConsumingNavBar = (mForceWindowDrawsBarBackgrounds
        boolean forceConsumingNavBar =
                ((mForceWindowDrawsBarBackgrounds || mDrawLegacyNavigationBarBackgroundHandled)
                        && (attrs.flags & FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS) == 0
                        && (attrs.flags & FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS) == 0
                        && (sysUiVisibility & SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION) == 0
                        && (sysUiVisibility & SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION) == 0
                        && decorFitsSystemWindows
                        && decorFitsSystemWindows