Skip state animation if animations are disabled
> Also update the animation disabled check to use new-API
Bug: 118678948
Change-Id: Ib709844e34bdb7e369b368a7c33f2e8ff120024b
diff --git a/src/com/android/launcher3/AbstractFloatingView.java b/src/com/android/launcher3/AbstractFloatingView.java
index 3cb6ba6..d6f992f 100644
--- a/src/com/android/launcher3/AbstractFloatingView.java
+++ b/src/com/android/launcher3/AbstractFloatingView.java
@@ -30,7 +30,6 @@
import android.util.Pair;
import android.view.MotionEvent;
import android.view.View;
-import android.view.ViewGroup;
import android.widget.LinearLayout;
import androidx.annotation.IntDef;
@@ -120,7 +119,7 @@
}
public final void close(boolean animate) {
- animate &= !Utilities.isPowerSaverPreventingAnimation(getContext());
+ animate &= Utilities.areAnimationsEnabled(getContext());
if (mIsOpen) {
BaseActivity.fromContext(getContext()).getUserEventDispatcher()
.resetElapsedContainerMillis("container closed");