• 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.pkg.mutate;
18 
19 import android.annotation.NonNull;
20 import android.annotation.Nullable;
21 import android.content.ComponentName;
22 import android.content.pm.PackageManager;
23 import android.content.pm.overlay.OverlayPaths;
24 
25 import com.android.server.pm.pkg.SuspendParams;
26 
27 public interface PackageUserStateWrite {
28 
29     @NonNull
setInstalled(boolean installed)30     PackageUserStateWrite setInstalled(boolean installed);
31 
32     @NonNull
setUninstallReason(@ackageManager.UninstallReason int reason)33     PackageUserStateWrite setUninstallReason(@PackageManager.UninstallReason int reason);
34 
35     @NonNull
setDistractionFlags( @ackageManager.DistractionRestriction int restrictionFlags)36     PackageUserStateWrite setDistractionFlags(
37             @PackageManager.DistractionRestriction int restrictionFlags);
38 
39     @NonNull
putSuspendParams(@onNull String suspendingPackage, @Nullable SuspendParams suspendParams)40     PackageUserStateWrite putSuspendParams(@NonNull String suspendingPackage,
41             @Nullable SuspendParams suspendParams);
42 
43     @NonNull
removeSuspension(@onNull String suspendingPackage)44     PackageUserStateWrite removeSuspension(@NonNull String suspendingPackage);
45 
46     @NonNull
setHidden(boolean hidden)47     PackageUserStateWrite setHidden(boolean hidden);
48 
49     @NonNull
setStopped(boolean stopped)50     PackageUserStateWrite setStopped(boolean stopped);
51 
52     @NonNull
setNotLaunched(boolean notLaunched)53     PackageUserStateWrite setNotLaunched(boolean notLaunched);
54 
55     @NonNull
setOverlayPaths(@ullable OverlayPaths overlayPaths)56     PackageUserStateWrite setOverlayPaths(@Nullable OverlayPaths overlayPaths);
57 
58     @NonNull
setOverlayPathsForLibrary(@onNull String libraryName, @Nullable OverlayPaths overlayPaths)59     PackageUserStateWrite setOverlayPathsForLibrary(@NonNull String libraryName,
60             @Nullable OverlayPaths overlayPaths);
61 
62     @NonNull
setHarmfulAppWarning(@ullable String warning)63     PackageUserStateWrite setHarmfulAppWarning(@Nullable String warning);
64 
65     @NonNull
setSplashScreenTheme(@ullable String theme)66     PackageUserStateWrite setSplashScreenTheme(@Nullable String theme);
67 
68     @NonNull
setComponentLabelIcon(@onNull ComponentName componentName, @Nullable String nonLocalizedLabel, @Nullable Integer icon)69     PackageUserStateWrite setComponentLabelIcon(@NonNull ComponentName componentName,
70             @Nullable String nonLocalizedLabel, @Nullable Integer icon);
71 }
72