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