1
0
Fork 0
mirror of https://github.com/syncthing/syncthing-android.git synced 2024-12-27 13:21:30 +00:00

Fixed wrong Android version constant for isPowerSaveMode()

This commit is contained in:
Felix Ableitner 2016-08-16 17:35:49 +02:00
parent d5501f5696
commit d33b9a2c56

View file

@ -112,7 +112,7 @@ public class DeviceStateHolder extends BroadcastReceiver {
@TargetApi(21)
public boolean shouldRun() {
PowerManager pm = (PowerManager) mContext.getSystemService(Context.POWER_SERVICE);
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.HONEYCOMB && pm.isPowerSaveMode()) {
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.LOLLIPOP && pm.isPowerSaveMode()) {
return false;
}
else if (!ContentResolver.getMasterSyncAutomatically()) {