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