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

Commit 378c4815 authored by Songchun Fan's avatar Songchun Fan
Browse files

[pm] merge CommitRequest, PrepareResult, ReconcileRequest into InstallRequest

BUG: 238678399
Test: atest com.android.server.pm.ScanTests
Change-Id: I9f7d17d458318da89a6e47cdf9a0989825b1dbe5
parent 4f1033f7
Loading
Loading
Loading
Loading
+0 −35
Original line number Diff line number Diff line
/*
 * Copyright (C) 2021 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.android.server.pm;

import android.annotation.NonNull;

import java.util.Map;

/**
 * Package state to commit to memory and disk after reconciliation has completed.
 */
final class CommitRequest {
    final Map<String, ReconciledPackage> mReconciledPackages;
    @NonNull final int[] mAllUsers;

    CommitRequest(Map<String, ReconciledPackage> reconciledPackages,
            @NonNull int[] allUsers) {
        mReconciledPackages = reconciledPackages;
        mAllUsers = allUsers;
    }
}
+1 −2
Original line number Diff line number Diff line
@@ -352,8 +352,7 @@ final class InitAppsHelper {
    }

    @GuardedBy({"mPm.mInstallLock", "mPm.mLock"})
    private void scanDirTracedLI(File scanDir,
            int parseFlags, int scanFlags,
    private void scanDirTracedLI(File scanDir, int parseFlags, int scanFlags,
            PackageParser2 packageParser, ExecutorService executorService) {
        Trace.traceBegin(TRACE_TAG_PACKAGE_MANAGER, "scanDir [" + scanDir.getAbsolutePath() + "]");
        try {
Loading