am d94d3a2a: Fix issues with light status bar and fp wake-and-unlock
* commit 'd94d3a2aa5cd1f177f61f73733217c952e356c43': Fix issues with light status bar and fp wake-and-unlock
This commit is contained in:
@@ -183,8 +183,11 @@ public class FingerprintUnlockController extends KeyguardUpdateMonitorCallback {
|
|||||||
mStatusBarKeyguardViewManager.animateCollapsePanels(
|
mStatusBarKeyguardViewManager.animateCollapsePanels(
|
||||||
FINGERPRINT_COLLAPSE_SPEEDUP_FACTOR);
|
FINGERPRINT_COLLAPSE_SPEEDUP_FACTOR);
|
||||||
break;
|
break;
|
||||||
case MODE_WAKE_AND_UNLOCK:
|
|
||||||
case MODE_WAKE_AND_UNLOCK_PULSING:
|
case MODE_WAKE_AND_UNLOCK_PULSING:
|
||||||
|
mPhoneStatusBar.updateMediaMetaData(false /* metaDataChanged */);
|
||||||
|
// Fall through.
|
||||||
|
case MODE_WAKE_AND_UNLOCK:
|
||||||
|
mStatusBarWindowManager.setStatusBarFocusable(false);
|
||||||
mDozeScrimController.abortPulsing();
|
mDozeScrimController.abortPulsing();
|
||||||
mKeyguardViewMediator.onWakeAndUnlocking();
|
mKeyguardViewMediator.onWakeAndUnlocking();
|
||||||
mScrimController.setWakeAndUnlocking();
|
mScrimController.setWakeAndUnlocking();
|
||||||
|
|||||||
@@ -1694,7 +1694,9 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
|
|||||||
final boolean hasArtwork = artworkBitmap != null;
|
final boolean hasArtwork = artworkBitmap != null;
|
||||||
|
|
||||||
if ((hasArtwork || DEBUG_MEDIA_FAKE_ARTWORK)
|
if ((hasArtwork || DEBUG_MEDIA_FAKE_ARTWORK)
|
||||||
&& (mState == StatusBarState.KEYGUARD || mState == StatusBarState.SHADE_LOCKED)) {
|
&& (mState == StatusBarState.KEYGUARD || mState == StatusBarState.SHADE_LOCKED)
|
||||||
|
&& mFingerprintUnlockController.getMode()
|
||||||
|
!= FingerprintUnlockController.MODE_WAKE_AND_UNLOCK_PULSING) {
|
||||||
// time to show some art!
|
// time to show some art!
|
||||||
if (mBackdrop.getVisibility() != View.VISIBLE) {
|
if (mBackdrop.getVisibility() != View.VISIBLE) {
|
||||||
mBackdrop.setVisibility(View.VISIBLE);
|
mBackdrop.setVisibility(View.VISIBLE);
|
||||||
@@ -1749,31 +1751,40 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
|
|||||||
if (DEBUG_MEDIA) {
|
if (DEBUG_MEDIA) {
|
||||||
Log.v(TAG, "DEBUG_MEDIA: Fading out album artwork");
|
Log.v(TAG, "DEBUG_MEDIA: Fading out album artwork");
|
||||||
}
|
}
|
||||||
mBackdrop.animate()
|
if (mFingerprintUnlockController.getMode()
|
||||||
// Never let the alpha become zero - otherwise the RenderNode
|
== FingerprintUnlockController.MODE_WAKE_AND_UNLOCK_PULSING) {
|
||||||
// won't draw anything and uninitialized memory will show through
|
|
||||||
// if mScrimSrcModeEnabled. Note that 0.001 is rounded down to 0 in libhwui.
|
|
||||||
.alpha(0.002f)
|
|
||||||
.setInterpolator(mBackdropInterpolator)
|
|
||||||
.setDuration(300)
|
|
||||||
.setStartDelay(0)
|
|
||||||
.withEndAction(new Runnable() {
|
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
mBackdrop.setVisibility(View.GONE);
|
|
||||||
mBackdropFront.animate().cancel();
|
|
||||||
mBackdropBack.animate().cancel();
|
|
||||||
mHandler.post(mHideBackdropFront);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
if (mKeyguardFadingAway) {
|
|
||||||
mBackdrop.animate()
|
|
||||||
|
|
||||||
// Make it disappear faster, as the focus should be on the activity behind.
|
// We are unlocking directly - no animation!
|
||||||
.setDuration(mKeyguardFadingAwayDuration / 2)
|
mBackdrop.setVisibility(View.GONE);
|
||||||
.setStartDelay(mKeyguardFadingAwayDelay)
|
} else {
|
||||||
.setInterpolator(mLinearInterpolator)
|
mBackdrop.animate()
|
||||||
.start();
|
// Never let the alpha become zero - otherwise the RenderNode
|
||||||
|
// won't draw anything and uninitialized memory will show through
|
||||||
|
// if mScrimSrcModeEnabled. Note that 0.001 is rounded down to 0 in
|
||||||
|
// libhwui.
|
||||||
|
.alpha(0.002f)
|
||||||
|
.setInterpolator(mBackdropInterpolator)
|
||||||
|
.setDuration(300)
|
||||||
|
.setStartDelay(0)
|
||||||
|
.withEndAction(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
mBackdrop.setVisibility(View.GONE);
|
||||||
|
mBackdropFront.animate().cancel();
|
||||||
|
mBackdropBack.animate().cancel();
|
||||||
|
mHandler.post(mHideBackdropFront);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if (mKeyguardFadingAway) {
|
||||||
|
mBackdrop.animate()
|
||||||
|
|
||||||
|
// Make it disappear faster, as the focus should be on the activity
|
||||||
|
// behind.
|
||||||
|
.setDuration(mKeyguardFadingAwayDuration / 2)
|
||||||
|
.setStartDelay(mKeyguardFadingAwayDelay)
|
||||||
|
.setInterpolator(mLinearInterpolator)
|
||||||
|
.start();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2436,8 +2447,12 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
|
|||||||
|| mStatusBarMode == MODE_LIGHTS_OUT_TRANSPARENT);
|
|| mStatusBarMode == MODE_LIGHTS_OUT_TRANSPARENT);
|
||||||
boolean allowLight = isTransparentBar && !mBatteryController.isPowerSave();
|
boolean allowLight = isTransparentBar && !mBatteryController.isPowerSave();
|
||||||
boolean light = (vis & View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR) != 0;
|
boolean light = (vis & View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR) != 0;
|
||||||
|
boolean animate = mFingerprintUnlockController == null
|
||||||
mIconController.setIconsDark(allowLight && light);
|
|| (mFingerprintUnlockController.getMode()
|
||||||
|
!= FingerprintUnlockController.MODE_WAKE_AND_UNLOCK_PULSING
|
||||||
|
&& mFingerprintUnlockController.getMode()
|
||||||
|
!= FingerprintUnlockController.MODE_WAKE_AND_UNLOCK);
|
||||||
|
mIconController.setIconsDark(allowLight && light, animate);
|
||||||
}
|
}
|
||||||
// restore the recents bit
|
// restore the recents bit
|
||||||
if (wasRecentsVisible) {
|
if (wasRecentsVisible) {
|
||||||
@@ -4029,8 +4044,9 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
|
|||||||
public void appTransitionStarting(long startTime, long duration) {
|
public void appTransitionStarting(long startTime, long duration) {
|
||||||
|
|
||||||
// Use own timings when Keyguard is going away, see keyguardGoingAway and
|
// Use own timings when Keyguard is going away, see keyguardGoingAway and
|
||||||
// setKeyguardFadingAway
|
// setKeyguardFadingAway. When duration is 0, skip this one because no animation is really
|
||||||
if (!mKeyguardFadingAway) {
|
// playing.
|
||||||
|
if (!mKeyguardFadingAway && duration > 0) {
|
||||||
mIconController.appTransitionStarting(startTime, duration);
|
mIconController.appTransitionStarting(startTime, duration);
|
||||||
}
|
}
|
||||||
if (mIconPolicy != null) {
|
if (mIconPolicy != null) {
|
||||||
|
|||||||
@@ -335,8 +335,10 @@ public class StatusBarIconController implements Tunable {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setIconsDark(boolean dark) {
|
public void setIconsDark(boolean dark, boolean animate) {
|
||||||
if (mTransitionPending) {
|
if (!animate) {
|
||||||
|
setIconTintInternal(dark ? 1.0f : 0.0f);
|
||||||
|
} else if (mTransitionPending) {
|
||||||
deferIconTintChange(dark ? 1.0f : 0.0f);
|
deferIconTintChange(dark ? 1.0f : 0.0f);
|
||||||
} else if (mTransitionDeferring) {
|
} else if (mTransitionDeferring) {
|
||||||
animateIconTint(dark ? 1.0f : 0.0f,
|
animateIconTint(dark ? 1.0f : 0.0f,
|
||||||
|
|||||||
@@ -72,7 +72,9 @@ public class StatusBarController extends BarController {
|
|||||||
if (statusbar != null) {
|
if (statusbar != null) {
|
||||||
long startTime = calculateStatusBarTransitionStartTime(openAnimation,
|
long startTime = calculateStatusBarTransitionStartTime(openAnimation,
|
||||||
closeAnimation);
|
closeAnimation);
|
||||||
statusbar.appTransitionStarting(startTime, TRANSITION_DURATION);
|
long duration = closeAnimation != null || openAnimation != null
|
||||||
|
? TRANSITION_DURATION : 0;
|
||||||
|
statusbar.appTransitionStarting(startTime, duration);
|
||||||
}
|
}
|
||||||
} catch (RemoteException e) {
|
} catch (RemoteException e) {
|
||||||
Slog.e(mTag, "RemoteException when app transition is starting", e);
|
Slog.e(mTag, "RemoteException when app transition is starting", e);
|
||||||
|
|||||||
Reference in New Issue
Block a user