• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2 **
3 ** Copyright 2007, The Android Open Source Project
4 **
5 ** Licensed under the Apache License, Version 2.0 (the "License");
6 ** you may not use this file except in compliance with the License.
7 ** You may obtain a copy of the License at
8 **
9 **     http://www.apache.org/licenses/LICENSE-2.0
10 **
11 ** Unless required by applicable law or agreed to in writing, software
12 ** distributed under the License is distributed on an "AS IS" BASIS,
13 ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 ** See the License for the specific language governing permissions and
15 ** limitations under the License.
16 */
17 
18 package android.content.pm;
19 
20 import android.content.ComponentName;
21 import android.content.Intent;
22 import android.content.IntentFilter;
23 import android.content.pm.ActivityInfo;
24 import android.content.pm.ApplicationInfo;
25 import android.content.pm.ContainerEncryptionParams;
26 import android.content.pm.FeatureInfo;
27 import android.content.pm.IPackageInstallObserver2;
28 import android.content.pm.IPackageInstaller;
29 import android.content.pm.IPackageDeleteObserver;
30 import android.content.pm.IPackageDeleteObserver2;
31 import android.content.pm.IPackageDataObserver;
32 import android.content.pm.IPackageMoveObserver;
33 import android.content.pm.IPackageStatsObserver;
34 import android.content.pm.IOnPermissionsChangeListener;
35 import android.content.pm.IntentFilterVerificationInfo;
36 import android.content.pm.InstrumentationInfo;
37 import android.content.pm.KeySet;
38 import android.content.pm.PackageInfo;
39 import android.content.pm.ManifestDigest;
40 import android.content.pm.PackageCleanItem;
41 import android.content.pm.ParceledListSlice;
42 import android.content.pm.ProviderInfo;
43 import android.content.pm.PermissionGroupInfo;
44 import android.content.pm.PermissionInfo;
45 import android.content.pm.ResolveInfo;
46 import android.content.pm.ServiceInfo;
47 import android.content.pm.UserInfo;
48 import android.content.pm.VerificationParams;
49 import android.content.pm.VerifierDeviceIdentity;
50 import android.net.Uri;
51 import android.os.Bundle;
52 import android.os.ParcelFileDescriptor;
53 import android.content.IntentSender;
54 
55 /**
56  *  See {@link PackageManager} for documentation on most of the APIs
57  *  here.
58  *
59  *  {@hide}
60  */
61 interface IPackageManager {
isPackageFrozen(String packageName)62     boolean isPackageFrozen(String packageName);
isPackageAvailable(String packageName, int userId)63     boolean isPackageAvailable(String packageName, int userId);
getPackageInfo(String packageName, int flags, int userId)64     PackageInfo getPackageInfo(String packageName, int flags, int userId);
getPackageUid(String packageName, int userId)65     int getPackageUid(String packageName, int userId);
getPackageUidEtc(String packageName, int flags, int userId)66     int getPackageUidEtc(String packageName, int flags, int userId);
getPackageGids(String packageName, int userId)67     int[] getPackageGids(String packageName, int userId);
getPackageGidsEtc(String packageName, int flags, int userId)68     int[] getPackageGidsEtc(String packageName, int flags, int userId);
69 
currentToCanonicalPackageNames(in String[] names)70     String[] currentToCanonicalPackageNames(in String[] names);
canonicalToCurrentPackageNames(in String[] names)71     String[] canonicalToCurrentPackageNames(in String[] names);
72 
getPermissionInfo(String name, int flags)73     PermissionInfo getPermissionInfo(String name, int flags);
74 
queryPermissionsByGroup(String group, int flags)75     List<PermissionInfo> queryPermissionsByGroup(String group, int flags);
76 
getPermissionGroupInfo(String name, int flags)77     PermissionGroupInfo getPermissionGroupInfo(String name, int flags);
78 
getAllPermissionGroups(int flags)79     List<PermissionGroupInfo> getAllPermissionGroups(int flags);
80 
getApplicationInfo(String packageName, int flags ,int userId)81     ApplicationInfo getApplicationInfo(String packageName, int flags ,int userId);
82 
getActivityInfo(in ComponentName className, int flags, int userId)83     ActivityInfo getActivityInfo(in ComponentName className, int flags, int userId);
84 
activitySupportsIntent(in ComponentName className, in Intent intent, String resolvedType)85     boolean activitySupportsIntent(in ComponentName className, in Intent intent,
86             String resolvedType);
87 
getReceiverInfo(in ComponentName className, int flags, int userId)88     ActivityInfo getReceiverInfo(in ComponentName className, int flags, int userId);
89 
getServiceInfo(in ComponentName className, int flags, int userId)90     ServiceInfo getServiceInfo(in ComponentName className, int flags, int userId);
91 
getProviderInfo(in ComponentName className, int flags, int userId)92     ProviderInfo getProviderInfo(in ComponentName className, int flags, int userId);
93 
checkPermission(String permName, String pkgName, int userId)94     int checkPermission(String permName, String pkgName, int userId);
95 
checkUidPermission(String permName, int uid)96     int checkUidPermission(String permName, int uid);
97 
addPermission(in PermissionInfo info)98     boolean addPermission(in PermissionInfo info);
99 
removePermission(String name)100     void removePermission(String name);
101 
grantRuntimePermission(String packageName, String permissionName, int userId)102     void grantRuntimePermission(String packageName, String permissionName, int userId);
103 
revokeRuntimePermission(String packageName, String permissionName, int userId)104     void revokeRuntimePermission(String packageName, String permissionName, int userId);
105 
resetRuntimePermissions()106     void resetRuntimePermissions();
107 
getPermissionFlags(String permissionName, String packageName, int userId)108     int getPermissionFlags(String permissionName, String packageName, int userId);
109 
updatePermissionFlags(String permissionName, String packageName, int flagMask, int flagValues, int userId)110     void updatePermissionFlags(String permissionName, String packageName, int flagMask,
111             int flagValues, int userId);
112 
updatePermissionFlagsForAllApps(int flagMask, int flagValues, int userId)113     void updatePermissionFlagsForAllApps(int flagMask, int flagValues, int userId);
114 
shouldShowRequestPermissionRationale(String permissionName, String packageName, int userId)115     boolean shouldShowRequestPermissionRationale(String permissionName,
116             String packageName, int userId);
117 
isProtectedBroadcast(String actionName)118     boolean isProtectedBroadcast(String actionName);
119 
checkSignatures(String pkg1, String pkg2)120     int checkSignatures(String pkg1, String pkg2);
121 
checkUidSignatures(int uid1, int uid2)122     int checkUidSignatures(int uid1, int uid2);
123 
getPackagesForUid(int uid)124     String[] getPackagesForUid(int uid);
125 
getNameForUid(int uid)126     String getNameForUid(int uid);
127 
getUidForSharedUser(String sharedUserName)128     int getUidForSharedUser(String sharedUserName);
129 
getFlagsForUid(int uid)130     int getFlagsForUid(int uid);
131 
getPrivateFlagsForUid(int uid)132     int getPrivateFlagsForUid(int uid);
133 
isUidPrivileged(int uid)134     boolean isUidPrivileged(int uid);
135 
getAppOpPermissionPackages(String permissionName)136     String[] getAppOpPermissionPackages(String permissionName);
137 
resolveIntent(in Intent intent, String resolvedType, int flags, int userId)138     ResolveInfo resolveIntent(in Intent intent, String resolvedType, int flags, int userId);
139 
canForwardTo(in Intent intent, String resolvedType, int sourceUserId, int targetUserId)140     boolean canForwardTo(in Intent intent, String resolvedType, int sourceUserId, int targetUserId);
141 
queryIntentActivities(in Intent intent, String resolvedType, int flags, int userId)142     List<ResolveInfo> queryIntentActivities(in Intent intent,
143             String resolvedType, int flags, int userId);
144 
queryIntentActivityOptions( in ComponentName caller, in Intent[] specifics, in String[] specificTypes, in Intent intent, String resolvedType, int flags, int userId)145     List<ResolveInfo> queryIntentActivityOptions(
146             in ComponentName caller, in Intent[] specifics,
147             in String[] specificTypes, in Intent intent,
148             String resolvedType, int flags, int userId);
149 
queryIntentReceivers(in Intent intent, String resolvedType, int flags, int userId)150     List<ResolveInfo> queryIntentReceivers(in Intent intent,
151             String resolvedType, int flags, int userId);
152 
resolveService(in Intent intent, String resolvedType, int flags, int userId)153     ResolveInfo resolveService(in Intent intent,
154             String resolvedType, int flags, int userId);
155 
queryIntentServices(in Intent intent, String resolvedType, int flags, int userId)156     List<ResolveInfo> queryIntentServices(in Intent intent,
157             String resolvedType, int flags, int userId);
158 
queryIntentContentProviders(in Intent intent, String resolvedType, int flags, int userId)159     List<ResolveInfo> queryIntentContentProviders(in Intent intent,
160             String resolvedType, int flags, int userId);
161 
162     /**
163      * This implements getInstalledPackages via a "last returned row"
164      * mechanism that is not exposed in the API. This is to get around the IPC
165      * limit that kicks in when flags are included that bloat up the data
166      * returned.
167      */
getInstalledPackages(int flags, in int userId)168     ParceledListSlice getInstalledPackages(int flags, in int userId);
169 
170     /**
171      * This implements getPackagesHoldingPermissions via a "last returned row"
172      * mechanism that is not exposed in the API. This is to get around the IPC
173      * limit that kicks in when flags are included that bloat up the data
174      * returned.
175      */
getPackagesHoldingPermissions(in String[] permissions, int flags, int userId)176     ParceledListSlice getPackagesHoldingPermissions(in String[] permissions,
177             int flags, int userId);
178 
179     /**
180      * This implements getInstalledApplications via a "last returned row"
181      * mechanism that is not exposed in the API. This is to get around the IPC
182      * limit that kicks in when flags are included that bloat up the data
183      * returned.
184      */
getInstalledApplications(int flags, int userId)185     ParceledListSlice getInstalledApplications(int flags, int userId);
186 
187     /**
188      * Retrieve all applications that are marked as persistent.
189      *
190      * @return A List&lt;applicationInfo> containing one entry for each persistent
191      *         application.
192      */
getPersistentApplications(int flags)193     List<ApplicationInfo> getPersistentApplications(int flags);
194 
resolveContentProvider(String name, int flags, int userId)195     ProviderInfo resolveContentProvider(String name, int flags, int userId);
196 
197     /**
198      * Retrieve sync information for all content providers.
199      *
200      * @param outNames Filled in with a list of the root names of the content
201      *                 providers that can sync.
202      * @param outInfo Filled in with a list of the ProviderInfo for each
203      *                name in 'outNames'.
204      */
querySyncProviders(inout List<String> outNames, inout List<ProviderInfo> outInfo)205     void querySyncProviders(inout List<String> outNames,
206             inout List<ProviderInfo> outInfo);
207 
queryContentProviders( String processName, int uid, int flags)208     ParceledListSlice queryContentProviders(
209             String processName, int uid, int flags);
210 
getInstrumentationInfo( in ComponentName className, int flags)211     InstrumentationInfo getInstrumentationInfo(
212             in ComponentName className, int flags);
213 
queryInstrumentation( String targetPackage, int flags)214     List<InstrumentationInfo> queryInstrumentation(
215             String targetPackage, int flags);
216 
installPackage(in String originPath, in IPackageInstallObserver2 observer, int flags, in String installerPackageName, in VerificationParams verificationParams, in String packageAbiOverride)217     void installPackage(in String originPath,
218             in IPackageInstallObserver2 observer,
219             int flags,
220             in String installerPackageName,
221             in VerificationParams verificationParams,
222             in String packageAbiOverride);
223 
installPackageAsUser(in String originPath, in IPackageInstallObserver2 observer, int flags, in String installerPackageName, in VerificationParams verificationParams, in String packageAbiOverride, int userId)224     void installPackageAsUser(in String originPath,
225             in IPackageInstallObserver2 observer,
226             int flags,
227             in String installerPackageName,
228             in VerificationParams verificationParams,
229             in String packageAbiOverride,
230             int userId);
231 
finishPackageInstall(int token)232     void finishPackageInstall(int token);
233 
setInstallerPackageName(in String targetPackage, in String installerPackageName)234     void setInstallerPackageName(in String targetPackage, in String installerPackageName);
235 
236     /** @deprecated rawr, don't call AIDL methods directly! */
deletePackageAsUser(in String packageName, IPackageDeleteObserver observer, int userId, int flags)237     void deletePackageAsUser(in String packageName, IPackageDeleteObserver observer,
238             int userId, int flags);
239 
240     /**
241      * Delete a package for a specific user.
242      *
243      * @param packageName The fully qualified name of the package to delete.
244      * @param observer a callback to use to notify when the package deletion in finished.
245      * @param userId the id of the user for whom to delete the package
246      * @param flags - possible values: {@link #DONT_DELETE_DATA}
247      */
deletePackage(in String packageName, IPackageDeleteObserver2 observer, int userId, int flags)248     void deletePackage(in String packageName, IPackageDeleteObserver2 observer, int userId, int flags);
249 
getInstallerPackageName(in String packageName)250     String getInstallerPackageName(in String packageName);
251 
addPackageToPreferred(String packageName)252     void addPackageToPreferred(String packageName);
253 
removePackageFromPreferred(String packageName)254     void removePackageFromPreferred(String packageName);
255 
getPreferredPackages(int flags)256     List<PackageInfo> getPreferredPackages(int flags);
257 
resetApplicationPreferences(int userId)258     void resetApplicationPreferences(int userId);
259 
getLastChosenActivity(in Intent intent, String resolvedType, int flags)260     ResolveInfo getLastChosenActivity(in Intent intent,
261             String resolvedType, int flags);
262 
setLastChosenActivity(in Intent intent, String resolvedType, int flags, in IntentFilter filter, int match, in ComponentName activity)263     void setLastChosenActivity(in Intent intent, String resolvedType, int flags,
264             in IntentFilter filter, int match, in ComponentName activity);
265 
addPreferredActivity(in IntentFilter filter, int match, in ComponentName[] set, in ComponentName activity, int userId)266     void addPreferredActivity(in IntentFilter filter, int match,
267             in ComponentName[] set, in ComponentName activity, int userId);
268 
replacePreferredActivity(in IntentFilter filter, int match, in ComponentName[] set, in ComponentName activity, int userId)269     void replacePreferredActivity(in IntentFilter filter, int match,
270             in ComponentName[] set, in ComponentName activity, int userId);
271 
clearPackagePreferredActivities(String packageName)272     void clearPackagePreferredActivities(String packageName);
273 
getPreferredActivities(out List<IntentFilter> outFilters, out List<ComponentName> outActivities, String packageName)274     int getPreferredActivities(out List<IntentFilter> outFilters,
275             out List<ComponentName> outActivities, String packageName);
276 
addPersistentPreferredActivity(in IntentFilter filter, in ComponentName activity, int userId)277     void addPersistentPreferredActivity(in IntentFilter filter, in ComponentName activity, int userId);
278 
clearPackagePersistentPreferredActivities(String packageName, int userId)279     void clearPackagePersistentPreferredActivities(String packageName, int userId);
280 
addCrossProfileIntentFilter(in IntentFilter intentFilter, String ownerPackage, int sourceUserId, int targetUserId, int flags)281     void addCrossProfileIntentFilter(in IntentFilter intentFilter, String ownerPackage,
282             int sourceUserId, int targetUserId, int flags);
283 
clearCrossProfileIntentFilters(int sourceUserId, String ownerPackage)284     void clearCrossProfileIntentFilters(int sourceUserId, String ownerPackage);
285 
286     /**
287      * Backup/restore support - only the system uid may use these.
288      */
getPreferredActivityBackup(int userId)289     byte[] getPreferredActivityBackup(int userId);
restorePreferredActivities(in byte[] backup, int userId)290     void restorePreferredActivities(in byte[] backup, int userId);
getDefaultAppsBackup(int userId)291     byte[] getDefaultAppsBackup(int userId);
restoreDefaultApps(in byte[] backup, int userId)292     void restoreDefaultApps(in byte[] backup, int userId);
getIntentFilterVerificationBackup(int userId)293     byte[] getIntentFilterVerificationBackup(int userId);
restoreIntentFilterVerification(in byte[] backup, int userId)294     void restoreIntentFilterVerification(in byte[] backup, int userId);
295 
296     /**
297      * Report the set of 'Home' activity candidates, plus (if any) which of them
298      * is the current "always use this one" setting.
299      */
getHomeActivities(out List<ResolveInfo> outHomeCandidates)300      ComponentName getHomeActivities(out List<ResolveInfo> outHomeCandidates);
301 
302     /**
303      * As per {@link android.content.pm.PackageManager#setComponentEnabledSetting}.
304      */
setComponentEnabledSetting(in ComponentName componentName, in int newState, in int flags, int userId)305     void setComponentEnabledSetting(in ComponentName componentName,
306             in int newState, in int flags, int userId);
307 
308     /**
309      * As per {@link android.content.pm.PackageManager#getComponentEnabledSetting}.
310      */
getComponentEnabledSetting(in ComponentName componentName, int userId)311     int getComponentEnabledSetting(in ComponentName componentName, int userId);
312 
313     /**
314      * As per {@link android.content.pm.PackageManager#setApplicationEnabledSetting}.
315      */
setApplicationEnabledSetting(in String packageName, in int newState, int flags, int userId, String callingPackage)316     void setApplicationEnabledSetting(in String packageName, in int newState, int flags,
317             int userId, String callingPackage);
318 
319     /**
320      * As per {@link android.content.pm.PackageManager#getApplicationEnabledSetting}.
321      */
getApplicationEnabledSetting(in String packageName, int userId)322     int getApplicationEnabledSetting(in String packageName, int userId);
323 
324     /**
325      * Set whether the given package should be considered stopped, making
326      * it not visible to implicit intents that filter out stopped packages.
327      */
setPackageStoppedState(String packageName, boolean stopped, int userId)328     void setPackageStoppedState(String packageName, boolean stopped, int userId);
329 
330     /**
331      * Free storage by deleting LRU sorted list of cache files across
332      * all applications. If the currently available free storage
333      * on the device is greater than or equal to the requested
334      * free storage, no cache files are cleared. If the currently
335      * available storage on the device is less than the requested
336      * free storage, some or all of the cache files across
337      * all applications are deleted (based on last accessed time)
338      * to increase the free storage space on the device to
339      * the requested value. There is no guarantee that clearing all
340      * the cache files from all applications will clear up
341      * enough storage to achieve the desired value.
342      * @param freeStorageSize The number of bytes of storage to be
343      * freed by the system. Say if freeStorageSize is XX,
344      * and the current free storage is YY,
345      * if XX is less than YY, just return. if not free XX-YY number
346      * of bytes if possible.
347      * @param observer call back used to notify when
348      * the operation is completed
349      */
freeStorageAndNotify(in String volumeUuid, in long freeStorageSize, IPackageDataObserver observer)350      void freeStorageAndNotify(in String volumeUuid, in long freeStorageSize,
351              IPackageDataObserver observer);
352 
353     /**
354      * Free storage by deleting LRU sorted list of cache files across
355      * all applications. If the currently available free storage
356      * on the device is greater than or equal to the requested
357      * free storage, no cache files are cleared. If the currently
358      * available storage on the device is less than the requested
359      * free storage, some or all of the cache files across
360      * all applications are deleted (based on last accessed time)
361      * to increase the free storage space on the device to
362      * the requested value. There is no guarantee that clearing all
363      * the cache files from all applications will clear up
364      * enough storage to achieve the desired value.
365      * @param freeStorageSize The number of bytes of storage to be
366      * freed by the system. Say if freeStorageSize is XX,
367      * and the current free storage is YY,
368      * if XX is less than YY, just return. if not free XX-YY number
369      * of bytes if possible.
370      * @param pi IntentSender call back used to
371      * notify when the operation is completed.May be null
372      * to indicate that no call back is desired.
373      */
freeStorage(in String volumeUuid, in long freeStorageSize, in IntentSender pi)374      void freeStorage(in String volumeUuid, in long freeStorageSize,
375              in IntentSender pi);
376 
377     /**
378      * Delete all the cache files in an applications cache directory
379      * @param packageName The package name of the application whose cache
380      * files need to be deleted
381      * @param observer a callback used to notify when the deletion is finished.
382      */
deleteApplicationCacheFiles(in String packageName, IPackageDataObserver observer)383     void deleteApplicationCacheFiles(in String packageName, IPackageDataObserver observer);
384 
385     /**
386      * Clear the user data directory of an application.
387      * @param packageName The package name of the application whose cache
388      * files need to be deleted
389      * @param observer a callback used to notify when the operation is completed.
390      */
clearApplicationUserData(in String packageName, IPackageDataObserver observer, int userId)391     void clearApplicationUserData(in String packageName, IPackageDataObserver observer, int userId);
392 
393    /**
394      * Get package statistics including the code, data and cache size for
395      * an already installed package
396      * @param packageName The package name of the application
397      * @param userHandle Which user the size should be retrieved for
398      * @param observer a callback to use to notify when the asynchronous
399      * retrieval of information is complete.
400      */
getPackageSizeInfo(in String packageName, int userHandle, IPackageStatsObserver observer)401     void getPackageSizeInfo(in String packageName, int userHandle, IPackageStatsObserver observer);
402 
403     /**
404      * Get a list of shared libraries that are available on the
405      * system.
406      */
getSystemSharedLibraryNames()407     String[] getSystemSharedLibraryNames();
408 
409     /**
410      * Get a list of features that are available on the
411      * system.
412      */
getSystemAvailableFeatures()413     FeatureInfo[] getSystemAvailableFeatures();
414 
hasSystemFeature(String name)415     boolean hasSystemFeature(String name);
416 
enterSafeMode()417     void enterSafeMode();
isSafeMode()418     boolean isSafeMode();
systemReady()419     void systemReady();
hasSystemUidErrors()420     boolean hasSystemUidErrors();
421 
422     /**
423      * Ask the package manager to perform boot-time dex-opt of all
424      * existing packages.
425      */
performBootDexOpt()426     void performBootDexOpt();
427 
428     /**
429      * Ask the package manager to perform dex-opt (if needed) on the given
430      * package and for the given instruction set if it already hasn't done
431      * so.
432      *
433      * If the supplied instructionSet is null, the package manager will use
434      * the packages default instruction set.
435      *
436      * In most cases, apps are dexopted in advance and this function will
437      * be a no-op.
438      */
performDexOptIfNeeded(String packageName, String instructionSet)439     boolean performDexOptIfNeeded(String packageName, String instructionSet);
440 
forceDexOpt(String packageName)441     void forceDexOpt(String packageName);
442 
443     /**
444      * Update status of external media on the package manager to scan and
445      * install packages installed on the external media. Like say the
446      * MountService uses this to call into the package manager to update
447      * status of sdcard.
448      */
updateExternalMediaStatus(boolean mounted, boolean reportStatus)449     void updateExternalMediaStatus(boolean mounted, boolean reportStatus);
450 
nextPackageToClean(in PackageCleanItem lastPackage)451     PackageCleanItem nextPackageToClean(in PackageCleanItem lastPackage);
452 
getMoveStatus(int moveId)453     int getMoveStatus(int moveId);
454 
registerMoveCallback(in IPackageMoveObserver callback)455     void registerMoveCallback(in IPackageMoveObserver callback);
unregisterMoveCallback(in IPackageMoveObserver callback)456     void unregisterMoveCallback(in IPackageMoveObserver callback);
457 
movePackage(in String packageName, in String volumeUuid)458     int movePackage(in String packageName, in String volumeUuid);
movePrimaryStorage(in String volumeUuid)459     int movePrimaryStorage(in String volumeUuid);
460 
addPermissionAsync(in PermissionInfo info)461     boolean addPermissionAsync(in PermissionInfo info);
462 
setInstallLocation(int loc)463     boolean setInstallLocation(int loc);
getInstallLocation()464     int getInstallLocation();
465 
installExistingPackageAsUser(String packageName, int userId)466     int installExistingPackageAsUser(String packageName, int userId);
467 
verifyPendingInstall(int id, int verificationCode)468     void verifyPendingInstall(int id, int verificationCode);
extendVerificationTimeout(int id, int verificationCodeAtTimeout, long millisecondsToDelay)469     void extendVerificationTimeout(int id, int verificationCodeAtTimeout, long millisecondsToDelay);
470 
verifyIntentFilter(int id, int verificationCode, in List<String> failedDomains)471     void verifyIntentFilter(int id, int verificationCode, in List<String> failedDomains);
getIntentVerificationStatus(String packageName, int userId)472     int getIntentVerificationStatus(String packageName, int userId);
updateIntentVerificationStatus(String packageName, int status, int userId)473     boolean updateIntentVerificationStatus(String packageName, int status, int userId);
getIntentFilterVerifications(String packageName)474     List<IntentFilterVerificationInfo> getIntentFilterVerifications(String packageName);
getAllIntentFilters(String packageName)475     List<IntentFilter> getAllIntentFilters(String packageName);
476 
setDefaultBrowserPackageName(String packageName, int userId)477     boolean setDefaultBrowserPackageName(String packageName, int userId);
getDefaultBrowserPackageName(int userId)478     String getDefaultBrowserPackageName(int userId);
479 
getVerifierDeviceIdentity()480     VerifierDeviceIdentity getVerifierDeviceIdentity();
481 
isFirstBoot()482     boolean isFirstBoot();
isOnlyCoreApps()483     boolean isOnlyCoreApps();
isUpgrade()484     boolean isUpgrade();
485 
setPermissionEnforced(String permission, boolean enforced)486     void setPermissionEnforced(String permission, boolean enforced);
isPermissionEnforced(String permission)487     boolean isPermissionEnforced(String permission);
488 
489     /** Reflects current DeviceStorageMonitorService state */
isStorageLow()490     boolean isStorageLow();
491 
setApplicationHiddenSettingAsUser(String packageName, boolean hidden, int userId)492     boolean setApplicationHiddenSettingAsUser(String packageName, boolean hidden, int userId);
getApplicationHiddenSettingAsUser(String packageName, int userId)493     boolean getApplicationHiddenSettingAsUser(String packageName, int userId);
494 
getPackageInstaller()495     IPackageInstaller getPackageInstaller();
496 
setBlockUninstallForUser(String packageName, boolean blockUninstall, int userId)497     boolean setBlockUninstallForUser(String packageName, boolean blockUninstall, int userId);
getBlockUninstallForUser(String packageName, int userId)498     boolean getBlockUninstallForUser(String packageName, int userId);
499 
getKeySetByAlias(String packageName, String alias)500     KeySet getKeySetByAlias(String packageName, String alias);
getSigningKeySet(String packageName)501     KeySet getSigningKeySet(String packageName);
isPackageSignedByKeySet(String packageName, in KeySet ks)502     boolean isPackageSignedByKeySet(String packageName, in KeySet ks);
isPackageSignedByKeySetExactly(String packageName, in KeySet ks)503     boolean isPackageSignedByKeySetExactly(String packageName, in KeySet ks);
504 
addOnPermissionsChangeListener(in IOnPermissionsChangeListener listener)505     void addOnPermissionsChangeListener(in IOnPermissionsChangeListener listener);
removeOnPermissionsChangeListener(in IOnPermissionsChangeListener listener)506     void removeOnPermissionsChangeListener(in IOnPermissionsChangeListener listener);
grantDefaultPermissionsToEnabledCarrierApps(in String[] packageNames, int userId)507     void grantDefaultPermissionsToEnabledCarrierApps(in String[] packageNames, int userId);
508 
isPermissionRevokedByPolicy(String permission, String packageName, int userId)509     boolean isPermissionRevokedByPolicy(String permission, String packageName, int userId);
510 
getPermissionControllerPackageName()511     String getPermissionControllerPackageName();
512 }
513