1
0
Fork 0
mirror of https://github.com/M66B/NetGuard.git synced 2024-12-23 08:17:51 +00:00

Enable power save mode only when not installed from the Play store

This commit is contained in:
M66B 2016-03-14 08:41:12 +01:00
parent 0a0f216861
commit 96bac0489a

View file

@ -1674,7 +1674,7 @@ public class ServiceSinkhole extends VpnService implements SharedPreferences.OnS
registerReceiver(interactiveStateReceiver, ifInteractive);
// Listen for power save mode
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP && !Util.isPlayStoreInstall(this)) {
PowerManager pm = (PowerManager) getSystemService(POWER_SERVICE);
powersaving = pm.isPowerSaveMode();
IntentFilter ifPower = new IntentFilter();