interface IPowerManager
{
- // WARNING: The first three methods must remain the first three methods because their
+ // WARNING: The first four methods must remain the first three methods because their
// transaction numbers must not change unless IPowerManager.cpp is also updated.
void acquireWakeLock(IBinder lock, int flags, String tag, String packageName, in WorkSource ws);
void acquireWakeLockWithUid(IBinder lock, int flags, String tag, String packageName, int uidtoblame);
void releaseWakeLock(IBinder lock, int flags);
+ void updateWakeLockUids(IBinder lock, in int[] uids);
void updateWakeLockWorkSource(IBinder lock, in WorkSource ws);
boolean isWakeLockLevelSupported(int level);
}
@Override // Binder call
+ public void updateWakeLockUids(IBinder lock, int[] uids) {
+ WorkSource ws = null;
+
+ if (uids != null) {
+ ws = new WorkSource();
+ // XXX should WorkSource have a way to set uids as an int[] instead of adding them
+ // one at a time?
+ for (int i = 0; i < uids.length; i++) {
+ ws.add(uids[i]);
+ }
+ }
+ updateWakeLockWorkSource(lock, ws);
+ }
+
+ @Override // Binder call
public void updateWakeLockWorkSource(IBinder lock, WorkSource ws) {
if (lock == null) {
throw new IllegalArgumentException("lock must not be null");