Loading services/core/java/com/android/server/DeviceIdleController.java +28 −28 Original line number Diff line number Diff line Loading @@ -2726,12 +2726,12 @@ public class DeviceIdleController extends SystemService } } } else if ("whitelist".equals(cmd)) { long token = Binder.clearCallingIdentity(); try { String arg = shell.getNextArg(); if (arg != null) { getContext().enforceCallingOrSelfPermission( android.Manifest.permission.DEVICE_POWER, null); long token = Binder.clearCallingIdentity(); try { do { if (arg.length() < 1 || (arg.charAt(0) != '-' && arg.charAt(0) != '+' && arg.charAt(0) != '=')) { Loading @@ -2754,6 +2754,9 @@ public class DeviceIdleController extends SystemService pw.println(getPowerSaveWhitelistAppInternal(pkg)); } } while ((arg=shell.getNextArg()) != null); } finally { Binder.restoreCallingIdentity(token); } } else { synchronized (this) { for (int j=0; j<mPowerSaveWhitelistAppsExceptIdle.size(); j++) { Loading @@ -2776,9 +2779,6 @@ public class DeviceIdleController extends SystemService } } } } finally { Binder.restoreCallingIdentity(token); } } else if ("tempwhitelist".equals(cmd)) { String opt; while ((opt=shell.getNextOption()) != null) { Loading Loading
services/core/java/com/android/server/DeviceIdleController.java +28 −28 Original line number Diff line number Diff line Loading @@ -2726,12 +2726,12 @@ public class DeviceIdleController extends SystemService } } } else if ("whitelist".equals(cmd)) { long token = Binder.clearCallingIdentity(); try { String arg = shell.getNextArg(); if (arg != null) { getContext().enforceCallingOrSelfPermission( android.Manifest.permission.DEVICE_POWER, null); long token = Binder.clearCallingIdentity(); try { do { if (arg.length() < 1 || (arg.charAt(0) != '-' && arg.charAt(0) != '+' && arg.charAt(0) != '=')) { Loading @@ -2754,6 +2754,9 @@ public class DeviceIdleController extends SystemService pw.println(getPowerSaveWhitelistAppInternal(pkg)); } } while ((arg=shell.getNextArg()) != null); } finally { Binder.restoreCallingIdentity(token); } } else { synchronized (this) { for (int j=0; j<mPowerSaveWhitelistAppsExceptIdle.size(); j++) { Loading @@ -2776,9 +2779,6 @@ public class DeviceIdleController extends SystemService } } } } finally { Binder.restoreCallingIdentity(token); } } else if ("tempwhitelist".equals(cmd)) { String opt; while ((opt=shell.getNextOption()) != null) { Loading