1
0
Fork 0
mirror of https://github.com/syncthing/syncthing-android.git synced 2024-11-26 22:31:16 +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) @TargetApi(21)
public boolean shouldRun() { public boolean shouldRun() {
PowerManager pm = (PowerManager) mContext.getSystemService(Context.POWER_SERVICE); 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; return false;
} }
else if (!ContentResolver.getMasterSyncAutomatically()) { else if (!ContentResolver.getMasterSyncAutomatically()) {