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