Merge "Fix blank Keyguard #4" into lmp-dev
This commit is contained in:
@@ -983,10 +983,12 @@ public class NotificationPanelView extends PanelView implements
|
||||
.withEndAction(mAnimateKeyguardStatusViewVisibleEndRunnable);
|
||||
} else if (statusBarState == StatusBarState.KEYGUARD) {
|
||||
mKeyguardStatusView.animate().cancel();
|
||||
mKeyguardStatusViewAnimating = false;
|
||||
mKeyguardStatusView.setVisibility(View.VISIBLE);
|
||||
mKeyguardStatusView.setAlpha(1f);
|
||||
} else {
|
||||
mKeyguardStatusView.animate().cancel();
|
||||
mKeyguardStatusViewAnimating = false;
|
||||
mKeyguardStatusView.setVisibility(View.GONE);
|
||||
mKeyguardStatusView.setAlpha(1f);
|
||||
}
|
||||
|
||||
@@ -3494,6 +3494,15 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
|
||||
}
|
||||
|
||||
public void showKeyguard() {
|
||||
if (mLaunchTransitionFadingAway) {
|
||||
mNotificationPanel.animate().cancel();
|
||||
mNotificationPanel.setAlpha(1f);
|
||||
if (mLaunchTransitionEndRunnable != null) {
|
||||
mLaunchTransitionEndRunnable.run();
|
||||
}
|
||||
mLaunchTransitionEndRunnable = null;
|
||||
mLaunchTransitionFadingAway = false;
|
||||
}
|
||||
setBarState(StatusBarState.KEYGUARD);
|
||||
updateKeyguardState(false /* goingToFullShade */, false /* fromShadeLocked */);
|
||||
if (!mScreenOnFromKeyguard) {
|
||||
@@ -3533,7 +3542,8 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
|
||||
* @param endRunnable the runnable to be run when the transition is done
|
||||
*/
|
||||
public void fadeKeyguardAfterLaunchTransition(final Runnable beforeFading,
|
||||
final Runnable endRunnable) {
|
||||
Runnable endRunnable) {
|
||||
mLaunchTransitionEndRunnable = endRunnable;
|
||||
Runnable hideRunnable = new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
@@ -3551,9 +3561,10 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
|
||||
@Override
|
||||
public void run() {
|
||||
mNotificationPanel.setAlpha(1);
|
||||
if (endRunnable != null) {
|
||||
endRunnable.run();
|
||||
if (mLaunchTransitionEndRunnable != null) {
|
||||
mLaunchTransitionEndRunnable.run();
|
||||
}
|
||||
mLaunchTransitionEndRunnable = null;
|
||||
mLaunchTransitionFadingAway = false;
|
||||
}
|
||||
});
|
||||
|
||||
@@ -260,6 +260,11 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener {
|
||||
}
|
||||
|
||||
private void setScrimColor(ScrimView scrim, float alpha) {
|
||||
Object runningAnim = scrim.getTag(TAG_KEY_ANIM);
|
||||
if (runningAnim instanceof ValueAnimator) {
|
||||
((ValueAnimator) runningAnim).cancel();
|
||||
scrim.setTag(TAG_KEY_ANIM, null);
|
||||
}
|
||||
int color = Color.argb((int) (alpha * 255), 0, 0, 0);
|
||||
if (mAnimateChange) {
|
||||
startScrimAnimation(scrim, color);
|
||||
@@ -274,10 +279,6 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener {
|
||||
if (current == targetColor) {
|
||||
return;
|
||||
}
|
||||
Object runningAnim = scrim.getTag(TAG_KEY_ANIM);
|
||||
if (runningAnim instanceof ValueAnimator) {
|
||||
((ValueAnimator) runningAnim).cancel();
|
||||
}
|
||||
ValueAnimator anim = ValueAnimator.ofInt(current, target);
|
||||
anim.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user