Always enable nav and status bar opaque/translucency
Removed the logic to enable or disable translucency and have it fully
enable all the time. Having it on has very or no impact on RAM.
Test: boot device and look at nav and status bar
Change-Id: Id9e613abc689ab8c1b53424aa92e864f75f8ed02
Fixes: 65286386
diff --git a/core/java/com/android/internal/policy/DecorView.java b/core/java/com/android/internal/policy/DecorView.java
index 0d962eb..969608b 100644
--- a/core/java/com/android/internal/policy/DecorView.java
+++ b/core/java/com/android/internal/policy/DecorView.java
@@ -1061,7 +1061,7 @@
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;
diff --git a/core/java/com/android/internal/policy/PhoneWindow.java b/core/java/com/android/internal/policy/PhoneWindow.java
index 544afd9..57b0a73 100644
--- a/core/java/com/android/internal/policy/PhoneWindow.java
+++ b/core/java/com/android/internal/policy/PhoneWindow.java
@@ -2438,7 +2438,7 @@
// 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)) {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/BarTransitions.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/BarTransitions.java
index f379a46..1f44abe 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/BarTransitions.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/BarTransitions.java
@@ -41,8 +41,6 @@
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 @@
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 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 @@
}
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) {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CollapsedStatusBarFragment.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CollapsedStatusBarFragment.java
index 8c923cb..2c3f452 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CollapsedStatusBarFragment.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CollapsedStatusBarFragment.java
@@ -161,10 +161,6 @@
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) {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/LightBarTransitionsController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/LightBarTransitionsController.java
index d3a6280..b0ac6ec 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/LightBarTransitionsController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/LightBarTransitionsController.java
@@ -127,11 +127,6 @@
}
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;