Merge "Fixed a potential bug where the keyguard could become empty" into mnc-dev

This commit is contained in:
Selim Cinek
2015-06-18 18:42:58 +00:00
committed by Android (Google) Code Review
2 changed files with 12 additions and 6 deletions

View File

@@ -3460,6 +3460,7 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
mKeyguardIndicationController.setVisible(true);
mNotificationPanel.resetViews();
mKeyguardUserSwitcher.setKeyguard(true, fromShadeLocked);
mStatusBarView.removePendingHideExpandedRunnables();
} else {
mKeyguardIndicationController.setVisible(false);
mKeyguardUserSwitcher.setKeyguard(false,

View File

@@ -42,6 +42,12 @@ public class PhoneStatusBarView extends PanelBar {
private ScrimController mScrimController;
private float mMinFraction;
private float mPanelFraction;
private Runnable mHideExpandedRunnable = new Runnable() {
@Override
public void run() {
mBar.makeExpandedInvisible();
}
};
public PhoneStatusBarView(Context context, AttributeSet attrs) {
super(context, attrs);
@@ -118,15 +124,14 @@ public class PhoneStatusBarView extends PanelBar {
+ Log.getStackTraceString(new Throwable()));
}
// Close the status bar in the next frame so we can show the end of the animation.
postOnAnimation(new Runnable() {
@Override
public void run() {
mBar.makeExpandedInvisible();
}
});
postOnAnimation(mHideExpandedRunnable);
mLastFullyOpenedPanel = null;
}
public void removePendingHideExpandedRunnables() {
removeCallbacks(mHideExpandedRunnable);
}
@Override
public void onPanelFullyOpened(PanelView openPanel) {
super.onPanelFullyOpened(openPanel);