Debian Codegraph @

core/java/android/content/pm/IPackageManager.aidl

raw
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.ChangedPackages;
26 import android.content.pm.InstantAppInfo;
27 import android.content.pm.FeatureInfo;
28 import android.content.pm.IDexModuleRegisterCallback;
29 import android.content.pm.InstallSourceInfo;
30 import android.content.pm.IOnChecksumsReadyListener;
31 import android.content.pm.IPackageInstaller;
32 import android.content.pm.IPackageDeleteObserver;
33 import android.content.pm.IPackageDeleteObserver2;
34 import android.content.pm.IPackageDataObserver;
35 import android.content.pm.IPackageMoveObserver;
36 import android.content.pm.IPackageStatsObserver;
37 import android.content.pm.IntentFilterVerificationInfo;
38 import android.content.pm.InstrumentationInfo;
39 import android.content.pm.KeySet;
40 import android.content.pm.ModuleInfo;
41 import android.content.pm.PackageInfo;
42 import android.content.pm.PackageManager;
43 import android.content.pm.PackageManager.ComponentEnabledSetting;
44 import android.content.pm.ParceledListSlice;
45 import android.content.pm.ProviderInfo;
46 import android.content.pm.PermissionGroupInfo;
47 import android.content.pm.PermissionInfo;
48 import android.content.pm.ResolveInfo;
49 import android.content.pm.ServiceInfo;
50 import android.content.pm.SuspendDialogInfo;
51 import android.content.pm.UserInfo;
52 import android.content.pm.VerifierDeviceIdentity;
53 import android.content.pm.VersionedPackage;
54 import android.content.pm.dex.IArtManager;
55 import android.graphics.Bitmap;
56 import android.net.Uri;
57 import android.os.Bundle;
58 import android.os.ParcelFileDescriptor;
59 import android.os.PersistableBundle;
60 import android.content.IntentSender;
61
62 /**
63 * See {@link PackageManager} for documentation on most of the APIs
64 * here.
65 *
66 * {@hide}
67 */
68 interface IPackageManager {
69 void checkPackageStartable(String packageName, int userId);
70 @UnsupportedAppUsage(trackingBug = 171933273)
71 boolean isPackageAvailable(String packageName, int userId);
72 PackageInfo getPackageInfo(String packageName, long flags, int userId);
73 PackageInfo getPackageInfoVersioned(in VersionedPackage versionedPackage,
74 long flags, int userId);
75 int getPackageUid(String packageName, long flags, int userId);
76 int[] getPackageGids(String packageName, long flags, int userId);
77
78 @UnsupportedAppUsage
79 String[] currentToCanonicalPackageNames(in String[] names);
80 @UnsupportedAppUsage
81 String[] canonicalToCurrentPackageNames(in String[] names);
82
83 ApplicationInfo getApplicationInfo(String packageName, long flags, int userId);
84
85 /**
86 * @return the target SDK for the given package name, or -1 if it cannot be retrieved
87 */
88 int getTargetSdkVersion(String packageName);
89
90 ActivityInfo getActivityInfo(in ComponentName className, long flags, int userId);
91
92 boolean activitySupportsIntent(in ComponentName className, in Intent intent,
93 String resolvedType);
94
95 ActivityInfo getReceiverInfo(in ComponentName className, long flags, int userId);
96
97 ServiceInfo getServiceInfo(in ComponentName className, long flags, int userId);
98
99 ProviderInfo getProviderInfo(in ComponentName className, long flags, int userId);
100
101 boolean isProtectedBroadcast(String actionName);
102
103 @UnsupportedAppUsage
104 int checkSignatures(String pkg1, String pkg2);
105
106 @UnsupportedAppUsage
107 int checkUidSignatures(int uid1, int uid2);
108
109 List<String> getAllPackages();
110
111 @UnsupportedAppUsage
112 String[] getPackagesForUid(int uid);
113
114 @UnsupportedAppUsage
115 String getNameForUid(int uid);
116 String[] getNamesForUids(in int[] uids);
117
118 @UnsupportedAppUsage
119 int getUidForSharedUser(String sharedUserName);
120
121 @UnsupportedAppUsage
122 int getFlagsForUid(int uid);
123
124 int getPrivateFlagsForUid(int uid);
125
126 @UnsupportedAppUsage
127 boolean isUidPrivileged(int uid);
128
129 ResolveInfo resolveIntent(in Intent intent, String resolvedType, long flags, int userId);
130
131 ResolveInfo findPersistentPreferredActivity(in Intent intent, int userId);
132
133 boolean canForwardTo(in Intent intent, String resolvedType, int sourceUserId, int targetUserId);
134
135 ParceledListSlice queryIntentActivities(in Intent intent,
136 String resolvedType, long flags, int userId);
137
138 ParceledListSlice queryIntentActivityOptions(
139 in ComponentName caller, in Intent[] specifics,
140 in String[] specificTypes, in Intent intent,
141 String resolvedType, long flags, int userId);
142
143 ParceledListSlice queryIntentReceivers(in Intent intent,
144 String resolvedType, long flags, int userId);
145
146 ResolveInfo resolveService(in Intent intent,
147 String resolvedType, long flags, int userId);
148
149 ParceledListSlice queryIntentServices(in Intent intent,
150 String resolvedType, long flags, int userId);
151
152 ParceledListSlice queryIntentContentProviders(in Intent intent,
153 String resolvedType, long flags, int userId);
154
155 /**
156 * This implements getInstalledPackages via a "last returned row"
157 * mechanism that is not exposed in the API. This is to get around the IPC
158 * limit that kicks in when flags are included that bloat up the data
159 * returned.
160 */
161 ParceledListSlice getInstalledPackages(long flags, in int userId);
162
163 /**
164 * This implements getPackagesHoldingPermissions 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 */
169 ParceledListSlice getPackagesHoldingPermissions(in String[] permissions,
170 long flags, int userId);
171
172 /**
173 * This implements getInstalledApplications via a "last returned row"
174 * mechanism that is not exposed in the API. This is to get around the IPC
175 * limit that kicks in when flags are included that bloat up the data
176 * returned.
177 */
178 ParceledListSlice getInstalledApplications(long flags, int userId);
179
180 /**
181 * Retrieve all applications that are marked as persistent.
182 *
183 * @return A List<ApplicationInfo> containing one entry for each persistent
184 * application.
185 */
186 ParceledListSlice getPersistentApplications(int flags);
187
188 ProviderInfo resolveContentProvider(String name, long flags, int userId);
189
190 /**
191 * Retrieve sync information for all content providers.
192 *
193 * @param outNames Filled in with a list of the root names of the content
194 * providers that can sync.
195 * @param outInfo Filled in with a list of the ProviderInfo for each
196 * name in 'outNames'.
197 */
198 @UnsupportedAppUsage(maxTargetSdk = 30, trackingBug = 170729553)
199 void querySyncProviders(inout List<String> outNames,
200 inout List<ProviderInfo> outInfo);
201
202 ParceledListSlice queryContentProviders(
203 String processName, int uid, long flags, String metaDataKey);
204
205 @UnsupportedAppUsage
206 InstrumentationInfo getInstrumentationInfo(
207 in ComponentName className, int flags);
208
209 @UnsupportedAppUsage(maxTargetSdk = 30, trackingBug = 170729553)
210 ParceledListSlice queryInstrumentation(
211 String targetPackage, int flags);
212
213 void finishPackageInstall(int token, boolean didLaunch);
214
215 @UnsupportedAppUsage
216 void setInstallerPackageName(in String targetPackage, in String installerPackageName);
217
218 void setApplicationCategoryHint(String packageName, int categoryHint, String callerPackageName);
219
220 /** @deprecated rawr, don't call AIDL methods directly! */
221 void deletePackageAsUser(in String packageName, int versionCode,
222 IPackageDeleteObserver observer, int userId, int flags);
223
224 /**
225 * Delete a package for a specific user.
226 *
227 * @param versionedPackage The package to delete.
228 * @param observer a callback to use to notify when the package deletion in finished.
229 * @param userId the id of the user for whom to delete the package
230 * @param flags - possible values: {@link #DELETE_KEEP_DATA}
231 */
232 void deletePackageVersioned(in VersionedPackage versionedPackage,
233 IPackageDeleteObserver2 observer, int userId, int flags);
234
235 /**
236 * Delete a package for a specific user.
237 *
238 * @param versionedPackage The package to delete.
239 * @param observer a callback to use to notify when the package deletion in finished.
240 * @param userId the id of the user for whom to delete the package
241 */
242 void deleteExistingPackageAsUser(in VersionedPackage versionedPackage,
243 IPackageDeleteObserver2 observer, int userId);
244
245 @UnsupportedAppUsage
246 String getInstallerPackageName(in String packageName);
247
248 InstallSourceInfo getInstallSourceInfo(in String packageName);
249
250 void resetApplicationPreferences(int userId);
251
252 @UnsupportedAppUsage
253 ResolveInfo getLastChosenActivity(in Intent intent,
254 String resolvedType, int flags);
255
256 @UnsupportedAppUsage
257 void setLastChosenActivity(in Intent intent, String resolvedType, int flags,
258 in IntentFilter filter, int match, in ComponentName activity);
259
260 void addPreferredActivity(in IntentFilter filter, int match,
261 in ComponentName[] set, in ComponentName activity, int userId, boolean removeExisting);
262
263 @UnsupportedAppUsage
264 void replacePreferredActivity(in IntentFilter filter, int match,
265 in ComponentName[] set, in ComponentName activity, int userId);
266
267 @UnsupportedAppUsage
268 void clearPackagePreferredActivities(String packageName);
269
270 @UnsupportedAppUsage
271 int getPreferredActivities(out List<IntentFilter> outFilters,
272 out List<ComponentName> outActivities, String packageName);
273
274 void addPersistentPreferredActivity(in IntentFilter filter, in ComponentName activity, int userId);
275
276 void clearPackagePersistentPreferredActivities(String packageName, int userId);
277
278 void addCrossProfileIntentFilter(in IntentFilter intentFilter, String ownerPackage,
279 int sourceUserId, int targetUserId, int flags);
280
281 void clearCrossProfileIntentFilters(int sourceUserId, String ownerPackage);
282
283 String[] setDistractingPackageRestrictionsAsUser(in String[] packageNames, int restrictionFlags,
284 int userId);
285
286 String[] setPackagesSuspendedAsUser(in String[] packageNames, boolean suspended,
287 in PersistableBundle appExtras, in PersistableBundle launcherExtras,
288 in SuspendDialogInfo dialogInfo, String callingPackage, int userId);
289
290 String[] getUnsuspendablePackagesForUser(in String[] packageNames, int userId);
291
292 boolean isPackageSuspendedForUser(String packageName, int userId);
293
294 Bundle getSuspendedPackageAppExtras(String packageName, int userId);
295
296 /**
297 * Backup/restore support - only the system uid may use these.
298 */
299 byte[] getPreferredActivityBackup(int userId);
300 void restorePreferredActivities(in byte[] backup, int userId);
301 byte[] getDefaultAppsBackup(int userId);
302 void restoreDefaultApps(in byte[] backup, int userId);
303 byte[] getDomainVerificationBackup(int userId);
304 void restoreDomainVerification(in byte[] backup, int userId);
305
306 /**
307 * Report the set of 'Home' activity candidates, plus (if any) which of them
308 * is the current "always use this one" setting.
309 */
310 @UnsupportedAppUsage
311 ComponentName getHomeActivities(out List<ResolveInfo> outHomeCandidates);
312
313 void setHomeActivity(in ComponentName className, int userId);
314
315 /**
316 * Overrides the label and icon of the component specified by the component name. The component
317 * must belong to the calling app.
318 *
319 * These changes will be reset on the next boot and whenever the package is updated.
320 *
321 * Only the app defined as com.android.internal.R.config_overrideComponentUiPackage is allowed
322 * to call this.
323 *
324 * @param componentName The component name to override the label/icon of.
325 * @param nonLocalizedLabel The label to be displayed.
326 * @param icon The icon to be displayed.
327 * @param userId The user id.
328 */
329 void overrideLabelAndIcon(in ComponentName componentName, String nonLocalizedLabel,
330 int icon, int userId);
331
332 /**
333 * Restores the label and icon of the activity specified by the component name if either has
334 * been overridden. The component must belong to the calling app.
335 *
336 * Only the app defined as com.android.internal.R.config_overrideComponentUiPackage is allowed
337 * to call this.
338 *
339 * @param componentName The component name.
340 * @param userId The user id.
341 */
342 void restoreLabelAndIcon(in ComponentName componentName, int userId);
343
344 /**
345 * As per {@link android.content.pm.PackageManager#setComponentEnabledSetting}.
346 */
347 @UnsupportedAppUsage
348 void setComponentEnabledSetting(in ComponentName componentName,
349 in int newState, in int flags, int userId);
350
351 /**
352 * As per {@link android.content.pm.PackageManager#setComponentEnabledSettings}.
353 */
354 void setComponentEnabledSettings(in List<ComponentEnabledSetting> settings, int userId);
355
356 /**
357 * As per {@link android.content.pm.PackageManager#getComponentEnabledSetting}.
358 */
359 @UnsupportedAppUsage
360 int getComponentEnabledSetting(in ComponentName componentName, int userId);
361
362 /**
363 * As per {@link android.content.pm.PackageManager#setApplicationEnabledSetting}.
364 */
365 @UnsupportedAppUsage
366 void setApplicationEnabledSetting(in String packageName, in int newState, int flags,
367 int userId, String callingPackage);
368
369 /**
370 * As per {@link android.content.pm.PackageManager#getApplicationEnabledSetting}.
371 */
372 @UnsupportedAppUsage
373 int getApplicationEnabledSetting(in String packageName, int userId);
374
375 /**
376 * Logs process start information (including APK hash) to the security log.
377 */
378 void logAppProcessStartIfNeeded(String packageName, String processName, int uid, String seinfo, String apkFile, int pid);
379
380 /**
381 * As per {@link android.content.pm.PackageManager#flushPackageRestrictionsAsUser}.
382 */
383 void flushPackageRestrictionsAsUser(in int userId);
384
385 /**
386 * Set whether the given package should be considered stopped, making
387 * it not visible to implicit intents that filter out stopped packages.
388 */
389 @UnsupportedAppUsage
390 void setPackageStoppedState(String packageName, boolean stopped, int userId);
391
392 /**
393 * Free storage by deleting LRU sorted list of cache files across
394 * all applications. If the currently available free storage
395 * on the device is greater than or equal to the requested
396 * free storage, no cache files are cleared. If the currently
397 * available storage on the device is less than the requested
398 * free storage, some or all of the cache files across
399 * all applications are deleted (based on last accessed time)
400 * to increase the free storage space on the device to
401 * the requested value. There is no guarantee that clearing all
402 * the cache files from all applications will clear up
403 * enough storage to achieve the desired value.
404 * @param freeStorageSize The number of bytes of storage to be
405 * freed by the system. Say if freeStorageSize is XX,
406 * and the current free storage is YY,
407 * if XX is less than YY, just return. if not free XX-YY number
408 * of bytes if possible.
409 * @param observer call back used to notify when
410 * the operation is completed
411 */
412 void freeStorageAndNotify(in String volumeUuid, in long freeStorageSize,
413 int storageFlags, IPackageDataObserver observer);
414
415 /**
416 * Free storage by deleting LRU sorted list of cache files across
417 * all applications. If the currently available free storage
418 * on the device is greater than or equal to the requested
419 * free storage, no cache files are cleared. If the currently
420 * available storage on the device is less than the requested
421 * free storage, some or all of the cache files across
422 * all applications are deleted (based on last accessed time)
423 * to increase the free storage space on the device to
424 * the requested value. There is no guarantee that clearing all
425 * the cache files from all applications will clear up
426 * enough storage to achieve the desired value.
427 * @param freeStorageSize The number of bytes of storage to be
428 * freed by the system. Say if freeStorageSize is XX,
429 * and the current free storage is YY,
430 * if XX is less than YY, just return. if not free XX-YY number
431 * of bytes if possible.
432 * @param pi IntentSender call back used to
433 * notify when the operation is completed.May be null
434 * to indicate that no call back is desired.
435 */
436 void freeStorage(in String volumeUuid, in long freeStorageSize,
437 int storageFlags, in IntentSender pi);
438
439 /**
440 * Delete all the cache files in an applications cache directory
441 * @param packageName The package name of the application whose cache
442 * files need to be deleted
443 * @param observer a callback used to notify when the deletion is finished.
444 */
445 @UnsupportedAppUsage
446 void deleteApplicationCacheFiles(in String packageName, IPackageDataObserver observer);
447
448 /**
449 * Delete all the cache files in an applications cache directory
450 * @param packageName The package name of the application whose cache
451 * files need to be deleted
452 * @param userId the user to delete application cache for
453 * @param observer a callback used to notify when the deletion is finished.
454 */
455 void deleteApplicationCacheFilesAsUser(in String packageName, int userId, IPackageDataObserver observer);
456
457 /**
458 * Clear the user data directory of an application.
459 * @param packageName The package name of the application whose cache
460 * files need to be deleted
461 * @param observer a callback used to notify when the operation is completed.
462 */
463 void clearApplicationUserData(in String packageName, IPackageDataObserver observer, int userId);
464
465 /**
466 * Clear the profile data of an application.
467 * @param packageName The package name of the application whose profile data
468 * need to be deleted
469 */
470 void clearApplicationProfileData(in String packageName);
471
472 /**
473 * Get package statistics including the code, data and cache size for
474 * an already installed package
475 * @param packageName The package name of the application
476 * @param userHandle Which user the size should be retrieved for
477 * @param observer a callback to use to notify when the asynchronous
478 * retrieval of information is complete.
479 */
480 void getPackageSizeInfo(in String packageName, int userHandle, IPackageStatsObserver observer);
481
482 /**
483 * Get a list of shared libraries that are available on the
484 * system.
485 */
486 @UnsupportedAppUsage
487 String[] getSystemSharedLibraryNames();
488
489 /**
490 * Get a list of features that are available on the
491 * system.
492 */
493 ParceledListSlice getSystemAvailableFeatures();
494
495 boolean hasSystemFeature(String name, int version);
496
497 void enterSafeMode();
498 @UnsupportedAppUsage
499 boolean isSafeMode();
500 @UnsupportedAppUsage
501 boolean hasSystemUidErrors();
502
503 /**
504 * Notify the package manager that a package is going to be used and why.
505 *
506 * See PackageManager.NOTIFY_PACKAGE_USE_* for reasons.
507 */
508 oneway void notifyPackageUse(String packageName, int reason);
509
510 /**
511 * Notify the package manager that a list of dex files have been loaded.
512 *
513 * @param loadingPackageName the name of the package who performs the load
514 * @param classLoaderContextMap a map from file paths to dex files that have been loaded to
515 * the class loader context that was used to load them.
516 * @param loaderIsa the ISA of the loader process
517 */
518 oneway void notifyDexLoad(String loadingPackageName,
519 in Map<String, String> classLoaderContextMap, String loaderIsa);
520
521 /**
522 * Register an application dex module with the package manager.
523 * The package manager will keep track of the given module for future optimizations.
524 *
525 * Dex module optimizations will disable the classpath checking at runtime. The client bares
526 * the responsibility to ensure that the static assumptions on classes in the optimized code
527 * hold at runtime (e.g. there's no duplicate classes in the classpath).
528 *
529 * Note that the package manager already keeps track of dex modules loaded with
530 * {@link dalvik.system.DexClassLoader} and {@link dalvik.system.PathClassLoader}.
531 * This can be called for an eager registration.
532 *
533 * The call might take a while and the results will be posted on the main thread, using
534 * the given callback.
535 *
536 * If the module is intended to be shared with other apps, make sure that the file
537 * permissions allow for it.
538 * If at registration time the permissions allow for others to read it, the module would
539 * be marked as a shared module which might undergo a different optimization strategy.
540 * (usually shared modules will generated larger optimizations artifacts,
541 * taking more disk space).
542 *
543 * @param packageName the package name to which the dex module belongs
544 * @param dexModulePath the absolute path of the dex module.
545 * @param isSharedModule whether or not the module is intended to be used by other apps.
546 * @param callback if not null,
547 * {@link android.content.pm.IDexModuleRegisterCallback.IDexModuleRegisterCallback#onDexModuleRegistered}
548 * will be called once the registration finishes.
549 */
550 oneway void registerDexModule(in String packageName, in String dexModulePath,
551 in boolean isSharedModule, IDexModuleRegisterCallback callback);
552
553 /**
554 * Ask the package manager to perform a dex-opt with the given compiler filter.
555 *
556 * Note: exposed only for the shell command to allow moving packages explicitly to a
557 * definite state.
558 */
559 boolean performDexOptMode(String packageName, boolean checkProfiles,
560 String targetCompilerFilter, boolean force, boolean bootComplete, String splitName);
561
562 /**
563 * Ask the package manager to perform a dex-opt with the given compiler filter on the
564 * secondary dex files belonging to the given package.
565 *
566 * Note: exposed only for the shell command to allow moving packages explicitly to a
567 * definite state.
568 */
569 boolean performDexOptSecondary(String packageName,
570 String targetCompilerFilter, boolean force);
571
572 /**
573 * Ask the package manager to dump profiles associated with a package.
574 *
575 * @param packageName The name of the package to dump.
576 * @param dumpClassesAndMethods If false, pass {@code --dump-only} to profman to dump the
577 * profile in a human readable form intended for debugging. If true, pass
578 * {@code --dump-classes-and-methods} to profman to dump a sorted list of classes and methods
579 * in a human readable form that is valid input for {@code profman --create-profile-from}.
580 */
581 void dumpProfiles(String packageName, boolean dumpClassesAndMethods);
582
583 void forceDexOpt(String packageName);
584
585 /**
586 * Reconcile the information we have about the secondary dex files belonging to
587 * {@code packagName} and the actual dex files. For all dex files that were
588 * deleted, update the internal records and delete the generated oat files.
589 */
590 void reconcileSecondaryDexFiles(String packageName);
591
592 int getMoveStatus(int moveId);
593
594 void registerMoveCallback(in IPackageMoveObserver callback);
595 void unregisterMoveCallback(in IPackageMoveObserver callback);
596
597 int movePackage(in String packageName, in String volumeUuid);
598 int movePrimaryStorage(in String volumeUuid);
599
600 boolean setInstallLocation(int loc);
601 @UnsupportedAppUsage
602 int getInstallLocation();
603
604 int installExistingPackageAsUser(String packageName, int userId, int installFlags,
605 int installReason, in List<String> whiteListedPermissions);
606
607 void verifyPendingInstall(int id, int verificationCode);
608 void extendVerificationTimeout(int id, int verificationCodeAtTimeout, long millisecondsToDelay);
609
610 /** @deprecated */
611 void verifyIntentFilter(int id, int verificationCode, in List<String> failedDomains);
612 /** @deprecated */
613 int getIntentVerificationStatus(String packageName, int userId);
614 /** @deprecated */
615 boolean updateIntentVerificationStatus(String packageName, int status, int userId);
616 /** @deprecated */
617 ParceledListSlice getIntentFilterVerifications(String packageName);
618 ParceledListSlice getAllIntentFilters(String packageName);
619
620 VerifierDeviceIdentity getVerifierDeviceIdentity();
621
622 boolean isFirstBoot();
623 boolean isOnlyCoreApps();
624 boolean isDeviceUpgrading();
625
626 /** Reflects current DeviceStorageMonitorService state */
627 @UnsupportedAppUsage
628 boolean isStorageLow();
629
630 @UnsupportedAppUsage
631 boolean setApplicationHiddenSettingAsUser(String packageName, boolean hidden, int userId);
632 boolean getApplicationHiddenSettingAsUser(String packageName, int userId);
633
634 void setSystemAppHiddenUntilInstalled(String packageName, boolean hidden);
635 boolean setSystemAppInstallState(String packageName, boolean installed, int userId);
636
637 @UnsupportedAppUsage(maxTargetSdk = 30, trackingBug = 170729553)
638 IPackageInstaller getPackageInstaller();
639
640 boolean setBlockUninstallForUser(String packageName, boolean blockUninstall, int userId);
641 @UnsupportedAppUsage
642 boolean getBlockUninstallForUser(String packageName, int userId);
643
644 KeySet getKeySetByAlias(String packageName, String alias);
645 KeySet getSigningKeySet(String packageName);
646 boolean isPackageSignedByKeySet(String packageName, in KeySet ks);
647 boolean isPackageSignedByKeySetExactly(String packageName, in KeySet ks);
648
649 @UnsupportedAppUsage(maxTargetSdk = 30, trackingBug = 170729553)
650 String getPermissionControllerPackageName();
651 String getSdkSandboxPackageName();
652
653 ParceledListSlice getInstantApps(int userId);
654 byte[] getInstantAppCookie(String packageName, int userId);
655 boolean setInstantAppCookie(String packageName, in byte[] cookie, int userId);
656 Bitmap getInstantAppIcon(String packageName, int userId);
657 boolean isInstantApp(String packageName, int userId);
658
659 boolean setRequiredForSystemUser(String packageName, boolean systemUserApp);
660
661 /**
662 * Sets whether or not an update is available. Ostensibly for instant apps
663 * to force exteranl resolution.
664 */
665 void setUpdateAvailable(String packageName, boolean updateAvaialble);
666
667 @UnsupportedAppUsage(maxTargetSdk = 30, trackingBug = 170729553)
668 String getServicesSystemSharedLibraryPackageName();
669 @UnsupportedAppUsage(maxTargetSdk = 30, trackingBug = 170729553)
670 String getSharedSystemSharedLibraryPackageName();
671
672 ChangedPackages getChangedPackages(int sequenceNumber, int userId);
673
674 boolean isPackageDeviceAdminOnAnyUser(String packageName);
675
676 int getInstallReason(String packageName, int userId);
677
678 ParceledListSlice getSharedLibraries(in String packageName, long flags, int userId);
679
680 ParceledListSlice getDeclaredSharedLibraries(in String packageName, long flags, int userId);
681
682 boolean canRequestPackageInstalls(String packageName, int userId);
683
684 void deletePreloadsFileCache();
685
686 ComponentName getInstantAppResolverComponent();
687
688 ComponentName getInstantAppResolverSettingsComponent();
689
690 ComponentName getInstantAppInstallerComponent();
691
692 String getInstantAppAndroidId(String packageName, int userId);
693
694 IArtManager getArtManager();
695
696 void setHarmfulAppWarning(String packageName, CharSequence warning, int userId);
697
698 CharSequence getHarmfulAppWarning(String packageName, int userId);
699
700 boolean hasSigningCertificate(String packageName, in byte[] signingCertificate, int flags);
701
702 boolean hasUidSigningCertificate(int uid, in byte[] signingCertificate, int flags);
703
704 String getDefaultTextClassifierPackageName();
705
706 String getSystemTextClassifierPackageName();
707
708 String getAttentionServicePackageName();
709
710 String getRotationResolverPackageName();
711
712 String getWellbeingPackageName();
713
714 String getAppPredictionServicePackageName();
715
716 String getSystemCaptionsServicePackageName();
717
718 String getSetupWizardPackageName();
719
720 String getIncidentReportApproverPackageName();
721
722 String getContentCaptureServicePackageName();
723
724 boolean isPackageStateProtected(String packageName, int userId);
725
726 void sendDeviceCustomizationReadyBroadcast();
727
728 List<ModuleInfo> getInstalledModules(int flags);
729
730 ModuleInfo getModuleInfo(String packageName, int flags);
731
732 int getRuntimePermissionsVersion(int userId);
733
734 void setRuntimePermissionsVersion(int version, int userId);
735
736 void notifyPackagesReplacedReceived(in String[] packages);
737
738 void requestPackageChecksums(in String packageName, boolean includeSplits, int optional, int required, in List trustedInstallers, in IOnChecksumsReadyListener onChecksumsReadyListener, int userId);
739
740 IntentSender getLaunchIntentSenderForPackage(String packageName, String callingPackage,
741 String featureId, int userId);
742
743 //------------------------------------------------------------------------
744 //
745 // The following binder interfaces have been moved to IPermissionManager
746 //
747 //------------------------------------------------------------------------
748
749 //------------------------------------------------------------------------
750 // We need to keep these in IPackageManager for app compatibility
751 //------------------------------------------------------------------------
752 @UnsupportedAppUsage(maxTargetSdk = 30, trackingBug = 170729553)
753 String[] getAppOpPermissionPackages(String permissionName);
754
755 @UnsupportedAppUsage
756 PermissionGroupInfo getPermissionGroupInfo(String name, int flags);
757
758 @UnsupportedAppUsage
759 boolean addPermission(in PermissionInfo info);
760
761 @UnsupportedAppUsage
762 boolean addPermissionAsync(in PermissionInfo info);
763
764 @UnsupportedAppUsage
765 void removePermission(String name);
766
767 @UnsupportedAppUsage(maxTargetSdk = 30, trackingBug = 170729553)
768 int checkPermission(String permName, String pkgName, int userId);
769
770 @UnsupportedAppUsage(maxTargetSdk = 30, trackingBug = 170729553)
771 void grantRuntimePermission(String packageName, String permissionName, int userId);
772
773 //------------------------------------------------------------------------
774 // We need to keep these in IPackageManager for convenience in splitting
775 // out the permission manager. This should be cleaned up, but, will require
776 // a large change that modifies many repos.
777 //------------------------------------------------------------------------
778 int checkUidPermission(String permName, int uid);
779
780 void setMimeGroup(String packageName, String group, in List<String> mimeTypes);
781
782 String getSplashScreenTheme(String packageName, int userId);
783
784 void setSplashScreenTheme(String packageName, String themeName, int userId);
785
786 List<String> getMimeGroup(String packageName, String group);
787
788 boolean isAutoRevokeWhitelisted(String packageName);
789
790 void makeProviderVisible(int recipientAppId, String visibleAuthority);
791
792 @JavaPassthrough(annotation = "@android.annotation.RequiresPermission(android.Manifest"
793 + ".permission.MAKE_UID_VISIBLE)")
794 void makeUidVisible(int recipientAppId, int visibleUid);
795
796 IBinder getHoldLockToken();
797
798 void holdLock(in IBinder token, in int durationMs);
799
800 PackageManager.Property getProperty(String propertyName, String packageName, String className);
801 ParceledListSlice queryProperty(String propertyName, int componentType);
802
803 void setKeepUninstalledPackages(in List<String> packageList);
804
805 boolean canPackageQuery(String sourcePackageName, String targetPackageName, int userId);
806 }