Loading core/java/android/os/incremental/IIncrementalService.aidl +5 −0 Original line number Diff line number Diff line Loading @@ -52,6 +52,11 @@ interface IIncrementalService { in IStorageHealthListener healthListener, in PerUidReadTimeouts[] perUidReadTimeouts); /** * PM/system is done with this storage, ok to increase timeouts. */ void onInstallationComplete(int storageId); /** * Bind-mounts a path under a storage to a full path. Can be permanent or temporary. */ Loading core/java/android/os/incremental/IncrementalFileStorages.java +15 −5 Original line number Diff line number Diff line Loading @@ -205,16 +205,26 @@ public final class IncrementalFileStorages { /** * Resets the states and unbinds storage instances for an installation session. */ public void cleanUp() { if (mDefaultStorage == null) { return; public void cleanUpAndMarkComplete() { IncrementalStorage defaultStorage = cleanUp(); if (defaultStorage != null) { defaultStorage.onInstallationComplete(); } } private IncrementalStorage cleanUp() { IncrementalStorage defaultStorage = mDefaultStorage; mInheritedStorage = null; mDefaultStorage = null; if (defaultStorage == null) { return null; } try { mIncrementalManager.unregisterLoadingProgressCallbacks(mStageDir.getAbsolutePath()); mDefaultStorage.unBind(mStageDir.getAbsolutePath()); defaultStorage.unBind(mStageDir.getAbsolutePath()); } catch (IOException ignored) { } mDefaultStorage = null; return defaultStorage; } } core/java/android/os/incremental/IncrementalStorage.java +13 −1 Original line number Diff line number Diff line Loading @@ -398,7 +398,7 @@ public final class IncrementalStorage { } /** * Iinitializes and starts the DataLoader. * Initializes and starts the DataLoader. * This makes sure all install-time parameters are applied. * Does not affect persistent DataLoader params. * @return True if start request was successfully queued. Loading @@ -419,6 +419,18 @@ public final class IncrementalStorage { } } /** * Marks the completion of installation. */ public void onInstallationComplete() { try { mService.onInstallationComplete(mId); } catch (RemoteException e) { e.rethrowFromSystemServer(); } } private static final int UUID_BYTE_SIZE = 16; /** Loading services/core/java/com/android/server/pm/PackageInstallerSession.java +2 −2 Original line number Diff line number Diff line Loading @@ -4157,7 +4157,7 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub { if (stageDir != null && !params.isStaged) { try { if (incrementalFileStorages != null) { incrementalFileStorages.cleanUp(); incrementalFileStorages.cleanUpAndMarkComplete(); } mPm.mInstaller.rmPackageDir(stageDir.getAbsolutePath()); } catch (InstallerException ignored) { Loading @@ -4183,7 +4183,7 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub { } try { if (incrementalFileStorages != null) { incrementalFileStorages.cleanUp(); incrementalFileStorages.cleanUpAndMarkComplete(); } mPm.mInstaller.rmPackageDir(stageDir.getAbsolutePath()); } catch (InstallerException ignored) { Loading services/incremental/BinderIncrementalService.cpp +5 −0 Original line number Diff line number Diff line Loading @@ -150,6 +150,11 @@ binder::Status BinderIncrementalService::startLoading( return ok(); } binder::Status BinderIncrementalService::onInstallationComplete(int32_t storageId) { mImpl.onInstallationComplete(storageId); return ok(); } binder::Status BinderIncrementalService::makeBindMount(int32_t storageId, const std::string& sourcePath, const std::string& targetFullPath, Loading Loading
core/java/android/os/incremental/IIncrementalService.aidl +5 −0 Original line number Diff line number Diff line Loading @@ -52,6 +52,11 @@ interface IIncrementalService { in IStorageHealthListener healthListener, in PerUidReadTimeouts[] perUidReadTimeouts); /** * PM/system is done with this storage, ok to increase timeouts. */ void onInstallationComplete(int storageId); /** * Bind-mounts a path under a storage to a full path. Can be permanent or temporary. */ Loading
core/java/android/os/incremental/IncrementalFileStorages.java +15 −5 Original line number Diff line number Diff line Loading @@ -205,16 +205,26 @@ public final class IncrementalFileStorages { /** * Resets the states and unbinds storage instances for an installation session. */ public void cleanUp() { if (mDefaultStorage == null) { return; public void cleanUpAndMarkComplete() { IncrementalStorage defaultStorage = cleanUp(); if (defaultStorage != null) { defaultStorage.onInstallationComplete(); } } private IncrementalStorage cleanUp() { IncrementalStorage defaultStorage = mDefaultStorage; mInheritedStorage = null; mDefaultStorage = null; if (defaultStorage == null) { return null; } try { mIncrementalManager.unregisterLoadingProgressCallbacks(mStageDir.getAbsolutePath()); mDefaultStorage.unBind(mStageDir.getAbsolutePath()); defaultStorage.unBind(mStageDir.getAbsolutePath()); } catch (IOException ignored) { } mDefaultStorage = null; return defaultStorage; } }
core/java/android/os/incremental/IncrementalStorage.java +13 −1 Original line number Diff line number Diff line Loading @@ -398,7 +398,7 @@ public final class IncrementalStorage { } /** * Iinitializes and starts the DataLoader. * Initializes and starts the DataLoader. * This makes sure all install-time parameters are applied. * Does not affect persistent DataLoader params. * @return True if start request was successfully queued. Loading @@ -419,6 +419,18 @@ public final class IncrementalStorage { } } /** * Marks the completion of installation. */ public void onInstallationComplete() { try { mService.onInstallationComplete(mId); } catch (RemoteException e) { e.rethrowFromSystemServer(); } } private static final int UUID_BYTE_SIZE = 16; /** Loading
services/core/java/com/android/server/pm/PackageInstallerSession.java +2 −2 Original line number Diff line number Diff line Loading @@ -4157,7 +4157,7 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub { if (stageDir != null && !params.isStaged) { try { if (incrementalFileStorages != null) { incrementalFileStorages.cleanUp(); incrementalFileStorages.cleanUpAndMarkComplete(); } mPm.mInstaller.rmPackageDir(stageDir.getAbsolutePath()); } catch (InstallerException ignored) { Loading @@ -4183,7 +4183,7 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub { } try { if (incrementalFileStorages != null) { incrementalFileStorages.cleanUp(); incrementalFileStorages.cleanUpAndMarkComplete(); } mPm.mInstaller.rmPackageDir(stageDir.getAbsolutePath()); } catch (InstallerException ignored) { Loading
services/incremental/BinderIncrementalService.cpp +5 −0 Original line number Diff line number Diff line Loading @@ -150,6 +150,11 @@ binder::Status BinderIncrementalService::startLoading( return ok(); } binder::Status BinderIncrementalService::onInstallationComplete(int32_t storageId) { mImpl.onInstallationComplete(storageId); return ok(); } binder::Status BinderIncrementalService::makeBindMount(int32_t storageId, const std::string& sourcePath, const std::string& targetFullPath, Loading