• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2021 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 package com.android.server.pm;
18 
19 import android.annotation.Nullable;
20 
21 import com.android.server.pm.parsing.pkg.AndroidPackage;
22 import com.android.server.pm.parsing.pkg.ParsedPackage;
23 
24 /**
25  * The set of data needed to successfully install the prepared package. This includes data that
26  * will be used to scan and reconcile the package.
27  */
28 final class PrepareResult {
29     public final boolean mReplace;
30     public final int mScanFlags;
31     public final int mParseFlags;
32     @Nullable /* The original Package if it is being replaced, otherwise {@code null} */
33     public final AndroidPackage mExistingPackage;
34     public final ParsedPackage mPackageToScan;
35     public final boolean mClearCodeCache;
36     public final boolean mSystem;
37     public final PackageSetting mOriginalPs;
38     public final PackageSetting mDisabledPs;
39 
PrepareResult(boolean replace, int scanFlags, int parseFlags, AndroidPackage existingPackage, ParsedPackage packageToScan, boolean clearCodeCache, boolean system, PackageSetting originalPs, PackageSetting disabledPs)40     PrepareResult(boolean replace, int scanFlags,
41             int parseFlags, AndroidPackage existingPackage,
42             ParsedPackage packageToScan, boolean clearCodeCache, boolean system,
43             PackageSetting originalPs, PackageSetting disabledPs) {
44         mReplace = replace;
45         mScanFlags = scanFlags;
46         mParseFlags = parseFlags;
47         mExistingPackage = existingPackage;
48         mPackageToScan = packageToScan;
49         mClearCodeCache = clearCodeCache;
50         mSystem = system;
51         mOriginalPs = originalPs;
52         mDisabledPs = disabledPs;
53     }
54 }
55