Invert playNonAtomicComponent() as onlyPlayAtomicComponent()

This avoids the double negative we use in a few places, so should be clearer.
Also added some comments to explain what the animComponents are used for.

Change-Id: Ibd25bd12efce6553b377bbd9c0651e4f4ac3e498
This commit is contained in:
Tony Wickham
2020-03-06 15:56:46 -08:00
parent 31ff98e144
commit 984c01cbcd
6 changed files with 39 additions and 17 deletions

View File

@@ -120,7 +120,7 @@ public class WorkspaceStateTransitionAnimation {
hotseatIconsAlpha, fadeInterpolator);
}
if (!config.playNonAtomicComponent()) {
if (config.onlyPlayAtomicComponent()) {
// Only the alpha and scale, handled above, are included in the atomic animation.
return;
}
@@ -175,7 +175,8 @@ public class WorkspaceStateTransitionAnimation {
float pageAlpha = pageAlphaProvider.getPageAlpha(childIndex);
int drawableAlpha = Math.round(pageAlpha * (state.hasWorkspacePageBackground ? 255 : 0));
if (config.playNonAtomicComponent()) {
if (!config.onlyPlayAtomicComponent()) {
// Don't update the scrim during the atomic animation.
propertySetter.setInt(cl.getScrimBackground(),
DRAWABLE_ALPHA, drawableAlpha, ZOOM_OUT);
}