Merge "Fix wake-and-unlock animation" into oc-dev
This commit is contained in:
@@ -92,6 +92,7 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb
|
||||
private boolean mLastBouncerShowing;
|
||||
private boolean mLastBouncerDismissible;
|
||||
protected boolean mLastRemoteInputActive;
|
||||
private boolean mLastDeferScrimFadeOut;
|
||||
|
||||
private OnDismissAction mAfterKeyguardGoneAction;
|
||||
private final ArrayList<Runnable> mAfterKeyguardGoneRunnables = new ArrayList<>();
|
||||
@@ -367,7 +368,6 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb
|
||||
mStatusBar.setKeyguardFadingAway(startTime, delay, fadeoutDuration);
|
||||
mFingerprintUnlockController.startKeyguardFadingAway();
|
||||
mBouncer.hide(true /* destroyView */);
|
||||
updateStates();
|
||||
if (wakeUnlockPulsing) {
|
||||
mStatusBarWindowManager.setKeyguardFadingAway(true);
|
||||
mStatusBar.fadeKeyguardWhilePulsing();
|
||||
@@ -399,6 +399,7 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb
|
||||
mFingerprintUnlockController.finishKeyguardFadingAway();
|
||||
}
|
||||
}
|
||||
updateStates();
|
||||
mStatusBarWindowManager.setKeyguardShowing(false);
|
||||
mViewMediatorCallback.keyguardGone();
|
||||
}
|
||||
@@ -569,7 +570,7 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb
|
||||
mLastBouncerShowing = bouncerShowing;
|
||||
mLastBouncerDismissible = bouncerDismissible;
|
||||
mLastRemoteInputActive = remoteInputActive;
|
||||
|
||||
mLastDeferScrimFadeOut = mDeferScrimFadeOut;
|
||||
mStatusBar.onKeyguardViewManagerStatesUpdated();
|
||||
}
|
||||
|
||||
@@ -577,14 +578,16 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb
|
||||
* @return Whether the navigation bar should be made visible based on the current state.
|
||||
*/
|
||||
protected boolean isNavBarVisible() {
|
||||
return !(mShowing && !mOccluded) || mBouncer.isShowing() || mRemoteInputActive;
|
||||
return (!(mShowing && !mOccluded) || mBouncer.isShowing() || mRemoteInputActive)
|
||||
&& !mDeferScrimFadeOut;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Whether the navigation bar was made visible based on the last known state.
|
||||
*/
|
||||
protected boolean getLastNavBarVisible() {
|
||||
return !(mLastShowing && !mLastOccluded) || mLastBouncerShowing || mLastRemoteInputActive;
|
||||
return (!(mLastShowing && !mLastOccluded) || mLastBouncerShowing || mLastRemoteInputActive)
|
||||
&& !mLastDeferScrimFadeOut;
|
||||
}
|
||||
|
||||
public boolean shouldDismissOnMenuPressed() {
|
||||
|
||||
@@ -3072,13 +3072,18 @@ public class PhoneWindowManager implements WindowManagerPolicy {
|
||||
if (PRINT_ANIM) Log.i(TAG, "selectAnimation in " + win
|
||||
+ ": transit=" + transit);
|
||||
if (win == mStatusBar) {
|
||||
boolean isKeyguard = (win.getAttrs().privateFlags & PRIVATE_FLAG_KEYGUARD) != 0;
|
||||
final boolean isKeyguard = (win.getAttrs().privateFlags & PRIVATE_FLAG_KEYGUARD) != 0;
|
||||
final boolean expanded = win.getAttrs().height == MATCH_PARENT
|
||||
&& win.getAttrs().width == MATCH_PARENT;
|
||||
if (isKeyguard || expanded) {
|
||||
return -1;
|
||||
}
|
||||
if (transit == TRANSIT_EXIT
|
||||
|| transit == TRANSIT_HIDE) {
|
||||
return isKeyguard ? -1 : R.anim.dock_top_exit;
|
||||
return R.anim.dock_top_exit;
|
||||
} else if (transit == TRANSIT_ENTER
|
||||
|| transit == TRANSIT_SHOW) {
|
||||
return isKeyguard ? -1 : R.anim.dock_top_enter;
|
||||
return R.anim.dock_top_enter;
|
||||
}
|
||||
} else if (win == mNavigationBar) {
|
||||
if (win.getAttrs().windowAnimations != 0) {
|
||||
@@ -6803,7 +6808,9 @@ public class PhoneWindowManager implements WindowManagerPolicy {
|
||||
|
||||
@Override
|
||||
public boolean isScreenOn() {
|
||||
return mScreenOnFully;
|
||||
synchronized (mLock) {
|
||||
return mScreenOnEarly;
|
||||
}
|
||||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
|
||||
Reference in New Issue
Block a user