Loading services/core/java/com/android/server/pm/Installer.java +12 −2 Original line number Original line Diff line number Diff line Loading @@ -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, public void dexopt(String apkPath, int uid, @Nullable String pkgName, String instructionSet, int dexoptNeeded, @Nullable String outputPath, int dexFlags, int dexoptNeeded, @Nullable String outputPath, int dexFlags, String compilerFilter, @Nullable String volumeUuid, @Nullable String sharedLibraries) String compilerFilter, @Nullable String volumeUuid, @Nullable String sharedLibraries) Loading Loading @@ -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; if (!checkBeforeRemote()) return; try { try { mInstalld.freeCache(uuid, freeStorageSize); mInstalld.freeCache(uuid, freeStorageSize, flags); } catch (Exception e) { } catch (Exception e) { throw InstallerException.from(e); throw InstallerException.from(e); } } Loading services/core/java/com/android/server/pm/PackageManagerService.java +4 −4 Original line number Original line Diff line number Diff line Loading @@ -3395,7 +3395,7 @@ public class PackageManagerService extends IPackageManager.Stub { boolean success = true; boolean success = true; synchronized (mInstallLock) { synchronized (mInstallLock) { try { try { mInstaller.freeCache(volumeUuid, freeStorageSize); mInstaller.freeCache(volumeUuid, freeStorageSize, 0); } catch (InstallerException e) { } catch (InstallerException e) { Slog.w(TAG, "Couldn't clear application caches: " + e); Slog.w(TAG, "Couldn't clear application caches: " + e); success = false; success = false; Loading Loading @@ -3424,7 +3424,7 @@ public class PackageManagerService extends IPackageManager.Stub { boolean success = true; boolean success = true; synchronized (mInstallLock) { synchronized (mInstallLock) { try { try { mInstaller.freeCache(volumeUuid, freeStorageSize); mInstaller.freeCache(volumeUuid, freeStorageSize, 0); } catch (InstallerException e) { } catch (InstallerException e) { Slog.w(TAG, "Couldn't clear application caches: " + e); Slog.w(TAG, "Couldn't clear application caches: " + e); success = false; success = false; Loading @@ -3447,7 +3447,7 @@ public class PackageManagerService extends IPackageManager.Stub { void freeStorage(String volumeUuid, long freeStorageSize) throws IOException { void freeStorage(String volumeUuid, long freeStorageSize) throws IOException { synchronized (mInstallLock) { synchronized (mInstallLock) { try { try { mInstaller.freeCache(volumeUuid, freeStorageSize); mInstaller.freeCache(volumeUuid, freeStorageSize, 0); } catch (InstallerException e) { } catch (InstallerException e) { throw new IOException("Failed to free enough space", e); throw new IOException("Failed to free enough space", e); } } Loading Loading @@ -13030,7 +13030,7 @@ public class PackageManagerService extends IPackageManager.Stub { origin.resolvedPath, isForwardLocked(), packageAbiOverride); origin.resolvedPath, isForwardLocked(), packageAbiOverride); try { try { mInstaller.freeCache(null, sizeBytes + lowThreshold); mInstaller.freeCache(null, sizeBytes + lowThreshold, 0); pkgLite = mContainerService.getMinimalPackageInfo(origin.resolvedPath, pkgLite = mContainerService.getMinimalPackageInfo(origin.resolvedPath, installFlags, packageAbiOverride); installFlags, packageAbiOverride); } catch (InstallerException e) { } catch (InstallerException e) { Loading
services/core/java/com/android/server/pm/Installer.java +12 −2 Original line number Original line Diff line number Diff line Loading @@ -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, public void dexopt(String apkPath, int uid, @Nullable String pkgName, String instructionSet, int dexoptNeeded, @Nullable String outputPath, int dexFlags, int dexoptNeeded, @Nullable String outputPath, int dexFlags, String compilerFilter, @Nullable String volumeUuid, @Nullable String sharedLibraries) String compilerFilter, @Nullable String volumeUuid, @Nullable String sharedLibraries) Loading Loading @@ -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; if (!checkBeforeRemote()) return; try { try { mInstalld.freeCache(uuid, freeStorageSize); mInstalld.freeCache(uuid, freeStorageSize, flags); } catch (Exception e) { } catch (Exception e) { throw InstallerException.from(e); throw InstallerException.from(e); } } Loading
services/core/java/com/android/server/pm/PackageManagerService.java +4 −4 Original line number Original line Diff line number Diff line Loading @@ -3395,7 +3395,7 @@ public class PackageManagerService extends IPackageManager.Stub { boolean success = true; boolean success = true; synchronized (mInstallLock) { synchronized (mInstallLock) { try { try { mInstaller.freeCache(volumeUuid, freeStorageSize); mInstaller.freeCache(volumeUuid, freeStorageSize, 0); } catch (InstallerException e) { } catch (InstallerException e) { Slog.w(TAG, "Couldn't clear application caches: " + e); Slog.w(TAG, "Couldn't clear application caches: " + e); success = false; success = false; Loading Loading @@ -3424,7 +3424,7 @@ public class PackageManagerService extends IPackageManager.Stub { boolean success = true; boolean success = true; synchronized (mInstallLock) { synchronized (mInstallLock) { try { try { mInstaller.freeCache(volumeUuid, freeStorageSize); mInstaller.freeCache(volumeUuid, freeStorageSize, 0); } catch (InstallerException e) { } catch (InstallerException e) { Slog.w(TAG, "Couldn't clear application caches: " + e); Slog.w(TAG, "Couldn't clear application caches: " + e); success = false; success = false; Loading @@ -3447,7 +3447,7 @@ public class PackageManagerService extends IPackageManager.Stub { void freeStorage(String volumeUuid, long freeStorageSize) throws IOException { void freeStorage(String volumeUuid, long freeStorageSize) throws IOException { synchronized (mInstallLock) { synchronized (mInstallLock) { try { try { mInstaller.freeCache(volumeUuid, freeStorageSize); mInstaller.freeCache(volumeUuid, freeStorageSize, 0); } catch (InstallerException e) { } catch (InstallerException e) { throw new IOException("Failed to free enough space", e); throw new IOException("Failed to free enough space", e); } } Loading Loading @@ -13030,7 +13030,7 @@ public class PackageManagerService extends IPackageManager.Stub { origin.resolvedPath, isForwardLocked(), packageAbiOverride); origin.resolvedPath, isForwardLocked(), packageAbiOverride); try { try { mInstaller.freeCache(null, sizeBytes + lowThreshold); mInstaller.freeCache(null, sizeBytes + lowThreshold, 0); pkgLite = mContainerService.getMinimalPackageInfo(origin.resolvedPath, pkgLite = mContainerService.getMinimalPackageInfo(origin.resolvedPath, installFlags, packageAbiOverride); installFlags, packageAbiOverride); } catch (InstallerException e) { } catch (InstallerException e) {