Make historical op getters async for real
The system server side was doing the work async and the binder call was not oneway resulting in sync behavior for APIs desinged to be async. bug:147435904 Test: atest android.app.appops.cts.HistoricalAppopsTest Change-Id: Ib184302798b58934ba9a0617a6a407f3aaa469af
This commit is contained in:
@@ -1759,8 +1759,9 @@ public class AppOpsService extends IAppOpsService.Stub {
|
||||
? opNames.toArray(new String[opNames.size()]) : null;
|
||||
|
||||
// Must not hold the appops lock
|
||||
mHistoricalRegistry.getHistoricalOps(uid, packageName, featureId, opNamesArray, filter,
|
||||
beginTimeMillis, endTimeMillis, flags, callback);
|
||||
mHandler.post(PooledLambda.obtainRunnable(HistoricalRegistry::getHistoricalOps,
|
||||
mHistoricalRegistry, uid, packageName, featureId, opNamesArray, filter,
|
||||
beginTimeMillis, endTimeMillis, flags, callback).recycleOnUse());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1778,8 +1779,9 @@ public class AppOpsService extends IAppOpsService.Stub {
|
||||
? opNames.toArray(new String[opNames.size()]) : null;
|
||||
|
||||
// Must not hold the appops lock
|
||||
mHistoricalRegistry.getHistoricalOpsFromDiskRaw(uid, packageName, featureId, opNamesArray,
|
||||
filter, beginTimeMillis, endTimeMillis, flags, callback);
|
||||
mHandler.post(PooledLambda.obtainRunnable(HistoricalRegistry::getHistoricalOpsFromDiskRaw,
|
||||
mHistoricalRegistry, uid, packageName, featureId, opNamesArray,
|
||||
filter, beginTimeMillis, endTimeMillis, flags, callback).recycleOnUse());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user