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:
@@ -46,6 +46,7 @@ import android.graphics.drawable.Drawable;
|
||||
import android.graphics.drawable.PaintDrawable;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.PowerManager;
|
||||
import android.os.Process;
|
||||
import android.text.Spannable;
|
||||
import android.text.SpannableString;
|
||||
@@ -805,4 +806,10 @@ public final class Utilities {
|
||||
return context.getSharedPreferences(
|
||||
LauncherFiles.SHARED_PREFERENCES_KEY, Context.MODE_PRIVATE);
|
||||
}
|
||||
|
||||
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
|
||||
public static boolean isPowerSaverOn(Context context) {
|
||||
PowerManager powerManager = (PowerManager) context.getSystemService(Context.POWER_SERVICE);
|
||||
return ATLEAST_LOLLIPOP && powerManager.isPowerSaveMode();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user