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

@@ -88,11 +88,11 @@ public abstract class BaseRecentsViewStateController<T extends View>
@Override
public final void setStateWithAnimation(@NonNull final LauncherState toState,
@NonNull AnimatorSetBuilder builder, @NonNull AnimationConfig config) {
if (!config.hasAnimationComponent(PLAY_ATOMIC_OVERVIEW_PEEK | PLAY_ATOMIC_OVERVIEW_SCALE)) {
if (!config.hasAnimationFlag(PLAY_ATOMIC_OVERVIEW_PEEK | PLAY_ATOMIC_OVERVIEW_SCALE)) {
// The entire recents animation is played atomically.
return;
}
if (config.hasAnimationComponent(SKIP_OVERVIEW)) {
if (config.hasAnimationFlag(SKIP_OVERVIEW)) {
return;
}
setStateWithAnimationInternal(toState, builder, config);