Merge "Hook up the cache quota query."

This commit is contained in:
Daniel Nishi
2017-03-13 22:08:10 +00:00
committed by Android (Google) Code Review
5 changed files with 56 additions and 4 deletions

View File

@@ -24,6 +24,7 @@ interface IStorageStatsManager {
boolean isQuotaSupported(String volumeUuid, String callingPackage);
long getTotalBytes(String volumeUuid, String callingPackage);
long getFreeBytes(String volumeUuid, String callingPackage);
long getCacheQuotaBytes(String volumeUuid, int uid, String callingPackage);
StorageStats queryStatsForPackage(String volumeUuid, String packageName, int userId, String callingPackage);
StorageStats queryStatsForUid(String volumeUuid, int uid, String callingPackage);
StorageStats queryStatsForUser(String volumeUuid, int userId, String callingPackage);

View File

@@ -195,4 +195,13 @@ public class StorageStatsManager {
throw e.rethrowFromSystemServer();
}
}
/** {@hide} */
public long getCacheQuotaBytes(String volumeUuid, int uid) {
try {
return mService.getCacheQuotaBytes(volumeUuid, uid, mContext.getOpPackageName());
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
}
}