Fix up bar transitions on low end devices
- Don't allow dark icons, because the backdrop is always dark. - Don't show the view when we aren't showing notification icons or system info, because the view may need to be transparent. Test: manual Change-Id: I5572a6379ceb605b21a1982db00fdf1659593b8a Fixes: 62549040
This commit is contained in:
@@ -14,6 +14,9 @@
|
||||
|
||||
package com.android.systemui.statusbar.phone;
|
||||
|
||||
import static android.app.StatusBarManager.DISABLE_NOTIFICATION_ICONS;
|
||||
import static android.app.StatusBarManager.DISABLE_SYSTEM_INFO;
|
||||
|
||||
import static com.android.systemui.statusbar.phone.StatusBar.reinflateSignalCluster;
|
||||
|
||||
import android.annotation.Nullable;
|
||||
@@ -144,35 +147,39 @@ public class CollapsedStatusBarFragment extends Fragment implements CommandQueue
|
||||
final int old1 = mDisabled1;
|
||||
final int diff1 = state1 ^ old1;
|
||||
mDisabled1 = state1;
|
||||
if ((diff1 & StatusBarManager.DISABLE_SYSTEM_INFO) != 0) {
|
||||
if ((state1 & StatusBarManager.DISABLE_SYSTEM_INFO) != 0) {
|
||||
if ((diff1 & DISABLE_SYSTEM_INFO) != 0) {
|
||||
if ((state1 & DISABLE_SYSTEM_INFO) != 0) {
|
||||
hideSystemIconArea(animate);
|
||||
} else {
|
||||
showSystemIconArea(animate);
|
||||
}
|
||||
}
|
||||
if ((diff1 & StatusBarManager.DISABLE_NOTIFICATION_ICONS) != 0) {
|
||||
if ((state1 & StatusBarManager.DISABLE_NOTIFICATION_ICONS) != 0) {
|
||||
if ((diff1 & DISABLE_NOTIFICATION_ICONS) != 0) {
|
||||
if ((state1 & DISABLE_NOTIFICATION_ICONS) != 0) {
|
||||
hideNotificationIconArea(animate);
|
||||
} else {
|
||||
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) {
|
||||
if (!mStatusBarComponent.isLaunchTransitionFadingAway()
|
||||
&& !mKeyguardMonitor.isKeyguardFadingAway()
|
||||
&& shouldHideNotificationIcons()) {
|
||||
state |= StatusBarManager.DISABLE_NOTIFICATION_ICONS;
|
||||
state |= StatusBarManager.DISABLE_SYSTEM_INFO;
|
||||
state |= DISABLE_NOTIFICATION_ICONS;
|
||||
state |= DISABLE_SYSTEM_INFO;
|
||||
}
|
||||
if (mNetworkController != null && EncryptionHelper.IS_DATA_ENCRYPTED) {
|
||||
if (mNetworkController.hasEmergencyCryptKeeperText()) {
|
||||
state |= StatusBarManager.DISABLE_NOTIFICATION_ICONS;
|
||||
state |= DISABLE_NOTIFICATION_ICONS;
|
||||
}
|
||||
if (!mNetworkController.isRadioOn()) {
|
||||
state |= StatusBarManager.DISABLE_SYSTEM_INFO;
|
||||
state |= DISABLE_SYSTEM_INFO;
|
||||
}
|
||||
}
|
||||
return state;
|
||||
|
||||
@@ -127,6 +127,11 @@ 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;
|
||||
|
||||
Reference in New Issue
Block a user