Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 88065994 authored by Alex Buynytskyy's avatar Alex Buynytskyy
Browse files

Remove restriction on new installs before previous is done.

Bug: 160634487
Test: atest PackageManagerShellCommandTest PackageManagerShellCommandIncrementalTest IncrementalServiceTest PackageManagerServiceTest ChecksumsTest
Change-Id: I1ef1ab39903976bbf4679d148a0ab844402c334e
parent fd857e37
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -51,6 +51,8 @@ import java.util.UUID;
public final class IncrementalFileStorages {
    private static final String TAG = "IncrementalFileStorages";

    private static final String SYSTEM_DATA_LOADER_PACKAGE = "android";

    private @NonNull final IncrementalManager mIncrementalManager;
    private @NonNull final File mStageDir;
    private @Nullable IncrementalStorage mInheritedStorage;
@@ -116,7 +118,10 @@ public final class IncrementalFileStorages {
                mInheritedStorage = mIncrementalManager.openStorage(
                        inheritedDir.getAbsolutePath());
                if (mInheritedStorage != null) {
                    if (!mInheritedStorage.isFullyLoaded()) {
                    boolean systemDataLoader = SYSTEM_DATA_LOADER_PACKAGE.equals(
                            dataLoaderParams.getComponentName().getPackageName());
                    if (systemDataLoader && !mInheritedStorage.isFullyLoaded()) {
                        // System data loader does not support incomplete storages.
                        throw new IOException("Inherited storage has missing pages.");
                    }