1 /* 2 * Copyright (C) 2022 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 android.content.pm.pkg; 18 19 import android.annotation.NonNull; 20 import android.annotation.Nullable; 21 import android.content.pm.PackageManager; 22 import android.content.pm.overlay.OverlayPaths; 23 24 import java.util.Map; 25 import java.util.Set; 26 27 /** 28 * A framework copy of the services PackageUserState, which acts as compatibility layer for existing 29 * usages of PackageUserState in the framework. One day this can hopefully be removed. 30 * 31 * See the services variant for method documentation. 32 * 33 * @hide 34 * @deprecated Unused by framework. 35 */ 36 @Deprecated 37 public interface FrameworkPackageUserState { 38 39 FrameworkPackageUserState DEFAULT = new FrameworkPackageUserStateDefault(); 40 41 @Nullable getAllOverlayPaths()42 OverlayPaths getAllOverlayPaths(); 43 getCeDataInode()44 long getCeDataInode(); 45 46 @NonNull getDisabledComponents()47 Set<String> getDisabledComponents(); 48 49 @PackageManager.DistractionRestriction getDistractionFlags()50 int getDistractionFlags(); 51 52 @NonNull getEnabledComponents()53 Set<String> getEnabledComponents(); 54 55 @PackageManager.EnabledState getEnabledState()56 int getEnabledState(); 57 58 @Nullable getHarmfulAppWarning()59 String getHarmfulAppWarning(); 60 61 @PackageManager.InstallReason getInstallReason()62 int getInstallReason(); 63 64 @Nullable getLastDisableAppCaller()65 String getLastDisableAppCaller(); 66 67 @Nullable getOverlayPaths()68 OverlayPaths getOverlayPaths(); 69 70 @NonNull getSharedLibraryOverlayPaths()71 Map<String, OverlayPaths> getSharedLibraryOverlayPaths(); 72 73 @PackageManager.UninstallReason getUninstallReason()74 int getUninstallReason(); 75 isComponentEnabled(@onNull String componentName)76 boolean isComponentEnabled(@NonNull String componentName); isComponentDisabled(@onNull String componentName)77 boolean isComponentDisabled(@NonNull String componentName); isHidden()78 boolean isHidden(); isInstalled()79 boolean isInstalled(); isInstantApp()80 boolean isInstantApp(); isNotLaunched()81 boolean isNotLaunched(); isStopped()82 boolean isStopped(); isSuspended()83 boolean isSuspended(); isVirtualPreload()84 boolean isVirtualPreload(); 85 86 @Nullable getSplashScreenTheme()87 String getSplashScreenTheme(); 88 } 89