Merge "Do not animate scrims when launching camera" into pi-dev am: aa21ec053c
am: 273bce2fde
Change-Id: I2e18284b89f8ba3ac7aca0095392550f345a7839
This commit is contained in:
@@ -223,6 +223,7 @@ public class NotificationPanelView extends PanelView implements
|
||||
private boolean mClosingWithAlphaFadeOut;
|
||||
private boolean mHeadsUpAnimatingAway;
|
||||
private boolean mLaunchingAffordance;
|
||||
private boolean mAffordanceHasPreview;
|
||||
private FalsingManager mFalsingManager;
|
||||
private String mLastCameraLaunchSource = KeyguardBottomAreaView.CAMERA_LAUNCH_SOURCE_AFFORDANCE;
|
||||
|
||||
@@ -2571,6 +2572,7 @@ public class NotificationPanelView extends PanelView implements
|
||||
} else {
|
||||
animate = false;
|
||||
}
|
||||
mAffordanceHasPreview = mKeyguardBottomArea.getRightPreview() != null;
|
||||
mAffordanceHelper.launchAffordance(animate, getLayoutDirection() == LAYOUT_DIRECTION_RTL);
|
||||
}
|
||||
|
||||
@@ -2615,6 +2617,13 @@ public class NotificationPanelView extends PanelView implements
|
||||
getCenterIcon().setLaunchingAffordance(launchingAffordance);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return true when a bottom affordance is launching an occluded activity with a splash screen.
|
||||
*/
|
||||
public boolean isLaunchingAffordanceWithPreview() {
|
||||
return mLaunchingAffordance && mAffordanceHasPreview;
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether the camera application can be launched for the camera launch gesture.
|
||||
*
|
||||
|
||||
@@ -889,9 +889,14 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, OnCo
|
||||
}
|
||||
|
||||
public void setHasBackdrop(boolean hasBackdrop) {
|
||||
ScrimState[] states = ScrimState.values();
|
||||
for (int i = 0; i < states.length; i++) {
|
||||
states[i].setHasBackdrop(hasBackdrop);
|
||||
for (ScrimState state : ScrimState.values()) {
|
||||
state.setHasBackdrop(hasBackdrop);
|
||||
}
|
||||
}
|
||||
|
||||
public void setLaunchingAffordanceWithPreview(boolean launchingAffordanceWithPreview) {
|
||||
for (ScrimState state : ScrimState.values()) {
|
||||
state.setLaunchingAffordanceWithPreview(launchingAffordanceWithPreview);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -144,6 +144,7 @@ public enum ScrimState {
|
||||
mCurrentBehindAlpha = 0;
|
||||
mCurrentInFrontAlpha = 0;
|
||||
mAnimationDuration = StatusBar.FADE_KEYGUARD_DURATION;
|
||||
mAnimateChange = !mLaunchingAffordanceWithPreview;
|
||||
|
||||
if (previousState == ScrimState.AOD || previousState == ScrimState.PULSING) {
|
||||
// Fade from black to transparent when coming directly from AOD
|
||||
@@ -177,6 +178,7 @@ public enum ScrimState {
|
||||
boolean mWallpaperSupportsAmbientMode;
|
||||
int mIndex;
|
||||
boolean mHasBackdrop;
|
||||
boolean mLaunchingAffordanceWithPreview;
|
||||
|
||||
ScrimState(int index) {
|
||||
mIndex = index;
|
||||
@@ -249,6 +251,10 @@ public enum ScrimState {
|
||||
mWallpaperSupportsAmbientMode = wallpaperSupportsAmbientMode;
|
||||
}
|
||||
|
||||
public void setLaunchingAffordanceWithPreview(boolean launchingAffordanceWithPreview) {
|
||||
mLaunchingAffordanceWithPreview = launchingAffordanceWithPreview;
|
||||
}
|
||||
|
||||
public boolean isLowPowerState() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -4750,6 +4750,10 @@ public class StatusBar extends SystemUI implements DemoMode,
|
||||
mScrimController.setExpansionAffectsAlpha(
|
||||
!mBiometricUnlockController.isBiometricUnlock());
|
||||
|
||||
boolean launchingAffordanceWithPreview =
|
||||
mNotificationPanel.isLaunchingAffordanceWithPreview();
|
||||
mScrimController.setLaunchingAffordanceWithPreview(launchingAffordanceWithPreview);
|
||||
|
||||
if (mBouncerShowing) {
|
||||
// Bouncer needs the front scrim when it's on top of an activity,
|
||||
// tapping on a notification, editing QS or being dismissed by
|
||||
@@ -4757,7 +4761,8 @@ public class StatusBar extends SystemUI implements DemoMode,
|
||||
ScrimState state = mStatusBarKeyguardViewManager.bouncerNeedsScrimming()
|
||||
? ScrimState.BOUNCER_SCRIMMED : ScrimState.BOUNCER;
|
||||
mScrimController.transitionTo(state);
|
||||
} else if (mLaunchCameraOnScreenTurningOn || isInLaunchTransition()) {
|
||||
} else if (isInLaunchTransition() || mLaunchCameraOnScreenTurningOn
|
||||
|| launchingAffordanceWithPreview) {
|
||||
mScrimController.transitionTo(ScrimState.UNLOCKED, mUnlockScrimCallback);
|
||||
} else if (mBrightnessMirrorVisible) {
|
||||
mScrimController.transitionTo(ScrimState.BRIGHTNESS_MIRROR);
|
||||
|
||||
Reference in New Issue
Block a user