summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/CellLayout.java
diff options
context:
space:
mode:
authorTony Wickham <twickham@google.com>2015-11-12 12:31:50 -0800
committerTony Wickham <twickham@google.com>2015-11-12 12:51:06 -0800
commit112ac95571c9b81921a912d67b9c369fb523a235 (patch)
treebea1a6c7af12f5124157beeb4730ff2be18de0cc /src/com/android/launcher3/CellLayout.java
parenta43f78fc4b70bf54b9c90758660b6155ef0257aa (diff)
downloadandroid_packages_apps_Trebuchet-112ac95571c9b81921a912d67b9c369fb523a235.tar.gz
android_packages_apps_Trebuchet-112ac95571c9b81921a912d67b9c369fb523a235.tar.bz2
android_packages_apps_Trebuchet-112ac95571c9b81921a912d67b9c369fb523a235.zip
Skip to the end of the folder open animation in battery saver mode.
Bug: 25666809 Change-Id: I867d56a34fc5e0ad6aaabd8b6df47be05ec31966
Diffstat (limited to 'src/com/android/launcher3/CellLayout.java')
-rw-r--r--src/com/android/launcher3/CellLayout.java6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/com/android/launcher3/CellLayout.java b/src/com/android/launcher3/CellLayout.java
index 5f64a829b..0a2a01728 100644
--- a/src/com/android/launcher3/CellLayout.java
+++ b/src/com/android/launcher3/CellLayout.java
@@ -36,7 +36,6 @@ import android.graphics.drawable.Drawable;
import android.graphics.drawable.TransitionDrawable;
import android.os.Build;
import android.os.Parcelable;
-import android.os.PowerManager;
import android.support.v4.view.ViewCompat;
import android.util.AttributeSet;
import android.util.Log;
@@ -2183,10 +2182,7 @@ public class CellLayout extends ViewGroup implements BubbleTextShadowHandler {
// Animations are disabled in power save mode, causing the repeated animation to jump
// spastically between beginning and end states. Since this looks bad, we don't repeat
// the animation in power save mode.
- PowerManager powerManager = (PowerManager) getContext()
- .getSystemService(Context.POWER_SERVICE);
- boolean powerSaverOn = Utilities.ATLEAST_LOLLIPOP && powerManager.isPowerSaveMode();
- if (!powerSaverOn) {
+ if (!Utilities.isPowerSaverOn(getContext())) {
va.setRepeatMode(ValueAnimator.REVERSE);
va.setRepeatCount(ValueAnimator.INFINITE);
}