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