Merge "Recompute scrim alpha when enabling expansion" into rvc-dev am: 0c07fe50e9 am: 2863bd32aa am: 0af84bf1ac
Change-Id: I62d2b9efb95924fed04614ffa1497864ab3f127a
This commit is contained in:
@@ -440,24 +440,7 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, OnCo
|
|||||||
if (!(relevantState && mExpansionAffectsAlpha)) {
|
if (!(relevantState && mExpansionAffectsAlpha)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
applyExpansionToAlpha();
|
applyAndDispatchExpansion();
|
||||||
if (mUpdatePending) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
setOrAdaptCurrentAnimation(mScrimBehind);
|
|
||||||
setOrAdaptCurrentAnimation(mScrimInFront);
|
|
||||||
setOrAdaptCurrentAnimation(mScrimForBubble);
|
|
||||||
dispatchScrimState(mScrimBehind.getViewAlpha());
|
|
||||||
|
|
||||||
// Reset wallpaper timeout if it's already timeout like expanding panel while PULSING
|
|
||||||
// and docking.
|
|
||||||
if (mWallpaperVisibilityTimedOut) {
|
|
||||||
mWallpaperVisibilityTimedOut = false;
|
|
||||||
DejankUtils.postAfterTraversal(() -> {
|
|
||||||
mTimeTicker.schedule(mDozeParameters.getWallpaperAodDuration(),
|
|
||||||
AlarmTimeout.MODE_IGNORE_IF_SCHEDULED);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -513,6 +496,27 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, OnCo
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void applyAndDispatchExpansion() {
|
||||||
|
applyExpansionToAlpha();
|
||||||
|
if (mUpdatePending) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
setOrAdaptCurrentAnimation(mScrimBehind);
|
||||||
|
setOrAdaptCurrentAnimation(mScrimInFront);
|
||||||
|
setOrAdaptCurrentAnimation(mScrimForBubble);
|
||||||
|
dispatchScrimState(mScrimBehind.getViewAlpha());
|
||||||
|
|
||||||
|
// Reset wallpaper timeout if it's already timeout like expanding panel while PULSING
|
||||||
|
// and docking.
|
||||||
|
if (mWallpaperVisibilityTimedOut) {
|
||||||
|
mWallpaperVisibilityTimedOut = false;
|
||||||
|
DejankUtils.postAfterTraversal(() -> {
|
||||||
|
mTimeTicker.schedule(mDozeParameters.getWallpaperAodDuration(),
|
||||||
|
AlarmTimeout.MODE_IGNORE_IF_SCHEDULED);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the given drawable as the background of the scrim that shows up behind the
|
* Sets the given drawable as the background of the scrim that shows up behind the
|
||||||
* notifications.
|
* notifications.
|
||||||
@@ -1006,6 +1010,9 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, OnCo
|
|||||||
|
|
||||||
public void setExpansionAffectsAlpha(boolean expansionAffectsAlpha) {
|
public void setExpansionAffectsAlpha(boolean expansionAffectsAlpha) {
|
||||||
mExpansionAffectsAlpha = expansionAffectsAlpha;
|
mExpansionAffectsAlpha = expansionAffectsAlpha;
|
||||||
|
if (expansionAffectsAlpha) {
|
||||||
|
applyAndDispatchExpansion();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setKeyguardOccluded(boolean keyguardOccluded) {
|
public void setKeyguardOccluded(boolean keyguardOccluded) {
|
||||||
|
|||||||
Reference in New Issue
Block a user