We were updating most of the PhoneStatusBarView state during
re-inflation but not the expansion and its fraction.
Test: Pull down shade, run: adb shell service call overlay 4 s16 "com.android.systemui.theme.dark" i32 1 i32 0
Test: Switch to guest user, switch back
Test: Reboot, look at status bar
Change-Id: I41669fb32419ad02a11586ba248a68b47d450413
Fixes:
110530608
Fixes:
110147405
Fixes:
79122419
private static final String STATE = "state";
private boolean mBouncerShowing;
private boolean mExpanded;
+ protected float mPanelFraction;
public static final void LOG(String fmt, Object... args) {
if (!DEBUG) return;
if (mPanel != null) mPanel.setImportantForAccessibility(important);
}
+ public float getExpansionFraction() {
+ return mPanelFraction;
+ }
+
+ public boolean isExpanded() {
+ return mExpanded;
+ }
+
private void updateVisibility() {
mPanel.setVisibility(mExpanded || mBouncerShowing ? VISIBLE : INVISIBLE);
}
if (SPEW) LOG("panelExpansionChanged: start state=%d", mState);
PanelView pv = mPanel;
mExpanded = expanded;
+ mPanelFraction = frac;
updateVisibility();
// adjust any other panels that may be partially visible
if (expanded) {
private final PhoneStatusBarTransitions mBarTransitions;
private ScrimController mScrimController;
private float mMinFraction;
- private float mPanelFraction;
private Runnable mHideExpandedRunnable = new Runnable() {
@Override
public void run() {
@Override
public void panelExpansionChanged(float frac, boolean expanded) {
super.panelExpansionChanged(frac, expanded);
- mPanelFraction = frac;
updateScrimFraction();
if ((frac == 0 || frac == 1) && mBar.getNavigationBarView() != null) {
mBar.getNavigationBarView().onPanelExpandedChange(expanded);
CollapsedStatusBarFragment statusBarFragment =
(CollapsedStatusBarFragment) fragment;
statusBarFragment.initNotificationIconArea(mNotificationIconAreaController);
+ PhoneStatusBarView oldStatusBarView = mStatusBarView;
mStatusBarView = (PhoneStatusBarView) fragment.getView();
mStatusBarView.setBar(this);
mStatusBarView.setPanel(mNotificationPanel);
mNotificationPanel.notifyBarPanelExpansionChanged();
}
mStatusBarView.setBouncerShowing(mBouncerShowing);
+ if (oldStatusBarView != null) {
+ float fraction = oldStatusBarView.getExpansionFraction();
+ boolean expanded = oldStatusBarView.isExpanded();
+ mStatusBarView.panelExpansionChanged(fraction, expanded);
+ }
HeadsUpAppearanceController oldController = mHeadsUpAppearanceController;
if (mHeadsUpAppearanceController != null) {