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

Commit 17ff0d81 authored by Alex Buynytskyy's avatar Alex Buynytskyy Committed by Android (Google) Code Review
Browse files

Merge "Remove restriction on new installs before previous is done." into sc-dev

parents af8edd8e 88065994
Loading
Loading
Loading
Loading
+6 −1
Original line number Original line Diff line number Diff line
@@ -51,6 +51,8 @@ import java.util.UUID;
public final class IncrementalFileStorages {
public final class IncrementalFileStorages {
    private static final String TAG = "IncrementalFileStorages";
    private static final String TAG = "IncrementalFileStorages";


    private static final String SYSTEM_DATA_LOADER_PACKAGE = "android";

    private @NonNull final IncrementalManager mIncrementalManager;
    private @NonNull final IncrementalManager mIncrementalManager;
    private @NonNull final File mStageDir;
    private @NonNull final File mStageDir;
    private @Nullable IncrementalStorage mInheritedStorage;
    private @Nullable IncrementalStorage mInheritedStorage;
@@ -116,7 +118,10 @@ public final class IncrementalFileStorages {
                mInheritedStorage = mIncrementalManager.openStorage(
                mInheritedStorage = mIncrementalManager.openStorage(
                        inheritedDir.getAbsolutePath());
                        inheritedDir.getAbsolutePath());
                if (mInheritedStorage != null) {
                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.");
                        throw new IOException("Inherited storage has missing pages.");
                    }
                    }