mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-01 08:16:49 +00:00
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.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user