Merge "Follow installd API changes." am: 915f279556 am: 6b662722f0

am: 5e17fe3e8c

Change-Id: I4b812be109896a3574b1034033c163d8f2872e59
This commit is contained in:
Jeff Sharkey
2017-01-19 16:30:42 +00:00
committed by android-build-merger
2 changed files with 16 additions and 6 deletions

View File

@@ -242,6 +242,16 @@ public class Installer extends SystemService {
}
}
public void setAppQuota(String uuid, int userId, int appId, long cacheQuota)
throws InstallerException {
if (!checkBeforeRemote()) return;
try {
mInstalld.setAppQuota(uuid, userId, appId, cacheQuota);
} catch (Exception e) {
throw InstallerException.from(e);
}
}
public void dexopt(String apkPath, int uid, @Nullable String pkgName, String instructionSet,
int dexoptNeeded, @Nullable String outputPath, int dexFlags,
String compilerFilter, @Nullable String volumeUuid, @Nullable String sharedLibraries)
@@ -351,10 +361,10 @@ public class Installer extends SystemService {
}
}
public void freeCache(String uuid, long freeStorageSize) throws InstallerException {
public void freeCache(String uuid, long freeStorageSize, int flags) throws InstallerException {
if (!checkBeforeRemote()) return;
try {
mInstalld.freeCache(uuid, freeStorageSize);
mInstalld.freeCache(uuid, freeStorageSize, flags);
} catch (Exception e) {
throw InstallerException.from(e);
}

View File

@@ -3419,7 +3419,7 @@ public class PackageManagerService extends IPackageManager.Stub {
boolean success = true;
synchronized (mInstallLock) {
try {
mInstaller.freeCache(volumeUuid, freeStorageSize);
mInstaller.freeCache(volumeUuid, freeStorageSize, 0);
} catch (InstallerException e) {
Slog.w(TAG, "Couldn't clear application caches: " + e);
success = false;
@@ -3448,7 +3448,7 @@ public class PackageManagerService extends IPackageManager.Stub {
boolean success = true;
synchronized (mInstallLock) {
try {
mInstaller.freeCache(volumeUuid, freeStorageSize);
mInstaller.freeCache(volumeUuid, freeStorageSize, 0);
} catch (InstallerException e) {
Slog.w(TAG, "Couldn't clear application caches: " + e);
success = false;
@@ -3471,7 +3471,7 @@ public class PackageManagerService extends IPackageManager.Stub {
void freeStorage(String volumeUuid, long freeStorageSize) throws IOException {
synchronized (mInstallLock) {
try {
mInstaller.freeCache(volumeUuid, freeStorageSize);
mInstaller.freeCache(volumeUuid, freeStorageSize, 0);
} catch (InstallerException e) {
throw new IOException("Failed to free enough space", e);
}
@@ -13080,7 +13080,7 @@ public class PackageManagerService extends IPackageManager.Stub {
origin.resolvedPath, isForwardLocked(), packageAbiOverride);
try {
mInstaller.freeCache(null, sizeBytes + lowThreshold);
mInstaller.freeCache(null, sizeBytes + lowThreshold, 0);
pkgLite = mContainerService.getMinimalPackageInfo(origin.resolvedPath,
installFlags, packageAbiOverride);
} catch (InstallerException e) {