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

am: 8823588e36

Change-Id: I3e9656a16b3e82ce64ca91e64f214e08f12aec00
This commit is contained in:
Matthew Ng
2017-09-08 02:55:15 +00:00
committed by android-build-merger
5 changed files with 5 additions and 20 deletions

View File

@@ -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;

View File

@@ -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)) {

View File

@@ -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,9 +64,7 @@ public class BarTransitions {
mTag = "BarTransitions." + view.getClass().getSimpleName();
mView = view;
mBarBackground = new BarBackgroundDrawable(mView.getContext(), gradientResourceId);
if (HIGH_END) {
mView.setBackground(mBarBackground);
}
mView.setBackground(mBarBackground);
}
public int getMode() {
@@ -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,9 +105,7 @@ public class BarTransitions {
}
protected void onTransition(int oldMode, int newMode, boolean animate) {
if (HIGH_END) {
applyModeBackground(oldMode, newMode, animate);
}
applyModeBackground(oldMode, newMode, animate);
}
protected void applyModeBackground(int oldMode, int newMode, boolean animate) {

View File

@@ -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) {

View File

@@ -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;