summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/CellLayout.java
diff options
context:
space:
mode:
authorTony Wickham <twickham@google.com>2015-11-25 00:06:14 +0000
committerandroid-build-merger <android-build-merger@google.com>2015-11-25 00:06:14 +0000
commit2ef6abc0919581ab66b3ca08321c8c7886ff3bc9 (patch)
tree3da1643b08b7ebd4648587b6125e55587cfa8ca6 /src/com/android/launcher3/CellLayout.java
parent6b14c150f6494769c1d07c1cd2168be46181e5f4 (diff)
parent6e83dc4031b78ac6e65102b2d936e9e769686fec (diff)
downloadandroid_packages_apps_Trebuchet-2ef6abc0919581ab66b3ca08321c8c7886ff3bc9.tar.gz
android_packages_apps_Trebuchet-2ef6abc0919581ab66b3ca08321c8c7886ff3bc9.tar.bz2
android_packages_apps_Trebuchet-2ef6abc0919581ab66b3ca08321c8c7886ff3bc9.zip
Merge "Skip to the end of the folder open animation in battery saver mode." into ub-launcher3-burnaby-polish
am: 6e83dc4031 * commit '6e83dc4031b78ac6e65102b2d936e9e769686fec': Skip to the end of the folder open animation in battery saver mode.
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 a28b835bd..eb70b1362 100644
--- a/src/com/android/launcher3/CellLayout.java
+++ b/src/com/android/launcher3/CellLayout.java
@@ -35,7 +35,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;
@@ -2156,10 +2155,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);
}