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

Commit 204b740f authored by Matthew Ng's avatar Matthew Ng Committed by android-build-merger
Browse files

Merge "Always enable nav and status bar opaque/translucency" into oc-mr1-dev

am: 8823588e

Change-Id: I3e9656a16b3e82ce64ca91e64f214e08f12aec00
parents a2207908 8823588e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1061,7 +1061,7 @@ public class DecorView extends FrameLayout implements RootViewSurfaceTaker, Wind
        WindowManager.LayoutParams attrs = mWindow.getAttributes();
        int sysUiVisibility = attrs.systemUiVisibility | getWindowSystemUiVisibility();

        if (!mWindow.mIsFloating && ActivityManager.isHighEndGfx()) {
        if (!mWindow.mIsFloating) {
            boolean disallowAnimate = !isLaidOut();
            disallowAnimate |= ((mLastWindowFlags ^ attrs.flags)
                    & FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS) != 0;
+1 −1
Original line number Diff line number Diff line
@@ -2438,7 +2438,7 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {

        // Non-floating windows on high end devices must put up decor beneath the system bars and
        // therefore must know about visibility changes of those.
        if (!mIsFloating && ActivityManager.isHighEndGfx()) {
        if (!mIsFloating) {
            if (!targetPreL && a.getBoolean(
                    R.styleable.Window_windowDrawsSystemBarBackgrounds,
                    false)) {
+3 −9
Original line number Diff line number Diff line
@@ -41,8 +41,6 @@ public class BarTransitions {
    private static final boolean DEBUG = false;
    private static final boolean DEBUG_COLORS = false;

    public static final boolean HIGH_END = ActivityManager.isHighEndGfx();

    public static final int MODE_OPAQUE = 0;
    public static final int MODE_SEMI_TRANSPARENT = 1;
    public static final int MODE_TRANSLUCENT = 2;
@@ -66,10 +64,8 @@ public class BarTransitions {
        mTag = "BarTransitions." + view.getClass().getSimpleName();
        mView = view;
        mBarBackground = new BarBackgroundDrawable(mView.getContext(), gradientResourceId);
        if (HIGH_END) {
        mView.setBackground(mBarBackground);
    }
    }

    public int getMode() {
        return mMode;
@@ -89,7 +85,7 @@ public class BarTransitions {

    public boolean isAlwaysOpaque() {
        // Low-end devices do not support translucent modes, fallback to opaque
        return !HIGH_END || mAlwaysOpaque;
        return mAlwaysOpaque;
    }

    public void transitionTo(int mode, boolean animate) {
@@ -109,10 +105,8 @@ public class BarTransitions {
    }

    protected void onTransition(int oldMode, int newMode, boolean animate) {
        if (HIGH_END) {
        applyModeBackground(oldMode, newMode, animate);
    }
    }

    protected void applyModeBackground(int oldMode, int newMode, boolean animate) {
        if (DEBUG) Log.d(mTag, String.format("applyModeBackground oldMode=%s newMode=%s animate=%s",
+0 −4
Original line number Diff line number Diff line
@@ -161,10 +161,6 @@ public class CollapsedStatusBarFragment extends Fragment implements CommandQueue
                showNotificationIconArea(animate);
            }
        }
        if (!BarTransitions.HIGH_END) {
            int mask = DISABLE_NOTIFICATION_ICONS | DISABLE_SYSTEM_INFO;
            getView().setVisibility((mDisabled1 & mask) == mask ? View.GONE : View.VISIBLE);
        }
    }

    protected int adjustDisableFlags(int state) {
+0 −5
Original line number Diff line number Diff line
@@ -127,11 +127,6 @@ public class LightBarTransitionsController implements Dumpable, Callbacks {
    }

    public void setIconsDark(boolean dark, boolean animate) {
        if (!BarTransitions.HIGH_END) {
            setIconTintInternal(0.0f);
            mNextDarkIntensity = 0.0f;
            return;
        }
        if (!animate) {
            setIconTintInternal(dark ? 1.0f : 0.0f);
            mNextDarkIntensity = dark ? 1.0f : 0.0f;