The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 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; |
Todd Kennedy | 9106c64 | 2017-02-08 14:16:53 -0800 | [diff] [blame] | 25 | import android.content.pm.ChangedPackages; |
Svetoslav Ganov | 096d304 | 2017-01-30 16:34:13 -0800 | [diff] [blame] | 26 | import android.content.pm.InstantAppInfo; |
Dianne Hackborn | 4923734 | 2009-08-27 20:08:01 -0700 | [diff] [blame] | 27 | import android.content.pm.FeatureInfo; |
Calin Juravle | 3d2af7f | 2017-04-19 19:56:21 -0700 | [diff] [blame] | 28 | import android.content.pm.IDexModuleRegisterCallback; |
Jeff Sharkey | 3a44f3f | 2014-04-28 17:36:31 -0700 | [diff] [blame] | 29 | import android.content.pm.IPackageInstaller; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 30 | import android.content.pm.IPackageDeleteObserver; |
Jeff Sharkey | fbd0e9f | 2014-08-06 16:34:34 -0700 | [diff] [blame] | 31 | import android.content.pm.IPackageDeleteObserver2; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 32 | import android.content.pm.IPackageDataObserver; |
Suchi Amalapurapu | 8946dd3 | 2010-02-19 09:19:34 -0800 | [diff] [blame] | 33 | import android.content.pm.IPackageMoveObserver; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 34 | import android.content.pm.IPackageStatsObserver; |
Svetoslav | f7c06eb | 2015-06-10 18:43:22 -0700 | [diff] [blame] | 35 | import android.content.pm.IOnPermissionsChangeListener; |
Fabrice Di Meglio | 1c1b471 | 2014-11-19 17:12:32 -0800 | [diff] [blame] | 36 | import android.content.pm.IntentFilterVerificationInfo; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 37 | import android.content.pm.InstrumentationInfo; |
dcashman | c6f2249 | 2014-08-14 09:54:51 -0700 | [diff] [blame] | 38 | import android.content.pm.KeySet; |
Narayan Kamath | 2c828c1d | 2018-12-10 17:36:31 +0000 | [diff] [blame] | 39 | import android.content.pm.ModuleInfo; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 40 | import android.content.pm.PackageInfo; |
Kenny Root | 0e2c0f3 | 2011-04-15 17:50:10 -0700 | [diff] [blame] | 41 | import android.content.pm.ParceledListSlice; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 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; |
Suprabh Shukla | 389cb6f | 2018-10-01 18:20:39 -0700 | [diff] [blame] | 47 | import android.content.pm.SuspendDialogInfo; |
Amith Yamasani | 0b28549 | 2011-04-14 17:35:23 -0700 | [diff] [blame] | 48 | import android.content.pm.UserInfo; |
Kenny Root | 0aaa0d9 | 2011-09-12 16:42:55 -0700 | [diff] [blame] | 49 | import android.content.pm.VerifierDeviceIdentity; |
Svet Ganov | 6788212 | 2016-12-11 16:36:34 -0800 | [diff] [blame] | 50 | import android.content.pm.VersionedPackage; |
Calin Juravle | 45f8b29 | 2017-11-07 18:49:43 -0800 | [diff] [blame] | 51 | import android.content.pm.dex.IArtManager; |
Svet Ganov | 2acf063 | 2015-11-24 19:10:59 -0800 | [diff] [blame] | 52 | import android.graphics.Bitmap; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 53 | import android.net.Uri; |
Amith Yamasani | b8151ec | 2012-04-18 18:02:48 -0700 | [diff] [blame] | 54 | import android.os.ParcelFileDescriptor; |
Suprabh Shukla | 021b57a | 2018-03-08 18:21:50 -0800 | [diff] [blame] | 55 | import android.os.PersistableBundle; |
Suchi Amalapurapu | 1ccac75 | 2009-06-12 10:09:58 -0700 | [diff] [blame] | 56 | import android.content.IntentSender; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 57 | |
| 58 | /** |
| 59 | * See {@link PackageManager} for documentation on most of the APIs |
| 60 | * here. |
Svetoslav | c6d1c34 | 2015-02-26 14:44:43 -0800 | [diff] [blame] | 61 | * |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 62 | * {@hide} |
| 63 | */ |
| 64 | interface IPackageManager { |
Jeff Sharkey | 8924e87 | 2015-11-30 12:52:10 -0700 | [diff] [blame] | 65 | void checkPackageStartable(String packageName, int userId); |
Christopher Tate | ba629da | 2013-11-13 17:42:28 -0800 | [diff] [blame] | 66 | boolean isPackageAvailable(String packageName, int userId); |
Amith Yamasani | 483f3b0 | 2012-03-13 16:08:00 -0700 | [diff] [blame] | 67 | PackageInfo getPackageInfo(String packageName, int flags, int userId); |
Svet Ganov | 6788212 | 2016-12-11 16:36:34 -0800 | [diff] [blame] | 68 | PackageInfo getPackageInfoVersioned(in VersionedPackage versionedPackage, |
| 69 | int flags, int userId); |
Jeff Sharkey | cd65448 | 2016-01-08 17:42:11 -0700 | [diff] [blame] | 70 | int getPackageUid(String packageName, int flags, int userId); |
| 71 | int[] getPackageGids(String packageName, int flags, int userId); |
Svetoslav | c6d1c34 | 2015-02-26 14:44:43 -0800 | [diff] [blame] | 72 | |
Dianne Hackborn | 4709693 | 2010-02-11 15:57:09 -0800 | [diff] [blame] | 73 | String[] currentToCanonicalPackageNames(in String[] names); |
| 74 | String[] canonicalToCurrentPackageNames(in String[] names); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 75 | |
Svetoslav Ganov | adb8c52 | 2017-07-28 05:46:53 +0000 | [diff] [blame] | 76 | PermissionInfo getPermissionInfo(String name, String packageName, int flags); |
Svetoslav | c6d1c34 | 2015-02-26 14:44:43 -0800 | [diff] [blame] | 77 | |
Jeff Sharkey | d589663 | 2016-03-04 16:16:00 -0700 | [diff] [blame] | 78 | ParceledListSlice queryPermissionsByGroup(String group, int flags); |
Svetoslav | c6d1c34 | 2015-02-26 14:44:43 -0800 | [diff] [blame] | 79 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 80 | PermissionGroupInfo getPermissionGroupInfo(String name, int flags); |
Svetoslav | c6d1c34 | 2015-02-26 14:44:43 -0800 | [diff] [blame] | 81 | |
Jeff Sharkey | d589663 | 2016-03-04 16:16:00 -0700 | [diff] [blame] | 82 | ParceledListSlice getAllPermissionGroups(int flags); |
Svetoslav | c6d1c34 | 2015-02-26 14:44:43 -0800 | [diff] [blame] | 83 | |
Amith Yamasani | 483f3b0 | 2012-03-13 16:08:00 -0700 | [diff] [blame] | 84 | ApplicationInfo getApplicationInfo(String packageName, int flags ,int userId); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 85 | |
Amith Yamasani | 483f3b0 | 2012-03-13 16:08:00 -0700 | [diff] [blame] | 86 | ActivityInfo getActivityInfo(in ComponentName className, int flags, int userId); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 87 | |
Dianne Hackborn | 91097de | 2014-04-04 18:02:06 -0700 | [diff] [blame] | 88 | boolean activitySupportsIntent(in ComponentName className, in Intent intent, |
| 89 | String resolvedType); |
| 90 | |
Amith Yamasani | 483f3b0 | 2012-03-13 16:08:00 -0700 | [diff] [blame] | 91 | ActivityInfo getReceiverInfo(in ComponentName className, int flags, int userId); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 92 | |
Amith Yamasani | 483f3b0 | 2012-03-13 16:08:00 -0700 | [diff] [blame] | 93 | ServiceInfo getServiceInfo(in ComponentName className, int flags, int userId); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 94 | |
Amith Yamasani | 483f3b0 | 2012-03-13 16:08:00 -0700 | [diff] [blame] | 95 | ProviderInfo getProviderInfo(in ComponentName className, int flags, int userId); |
Dianne Hackborn | 361199b | 2010-08-30 17:42:07 -0700 | [diff] [blame] | 96 | |
Svetoslav | c6d1c34 | 2015-02-26 14:44:43 -0800 | [diff] [blame] | 97 | int checkPermission(String permName, String pkgName, int userId); |
| 98 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 99 | int checkUidPermission(String permName, int uid); |
Svetoslav | c6d1c34 | 2015-02-26 14:44:43 -0800 | [diff] [blame] | 100 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 101 | boolean addPermission(in PermissionInfo info); |
Svetoslav | c6d1c34 | 2015-02-26 14:44:43 -0800 | [diff] [blame] | 102 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 103 | void removePermission(String name); |
Dianne Hackborn | e639da7 | 2012-02-21 15:11:13 -0800 | [diff] [blame] | 104 | |
Svet Ganov | 8c7f700 | 2015-05-07 10:48:44 -0700 | [diff] [blame] | 105 | void grantRuntimePermission(String packageName, String permissionName, int userId); |
Dianne Hackborn | e639da7 | 2012-02-21 15:11:13 -0800 | [diff] [blame] | 106 | |
Svet Ganov | 8c7f700 | 2015-05-07 10:48:44 -0700 | [diff] [blame] | 107 | void revokeRuntimePermission(String packageName, String permissionName, int userId); |
| 108 | |
Dianne Hackborn | ca8e6da | 2015-06-24 15:19:17 -0700 | [diff] [blame] | 109 | void resetRuntimePermissions(); |
| 110 | |
Svet Ganov | 8c7f700 | 2015-05-07 10:48:44 -0700 | [diff] [blame] | 111 | int getPermissionFlags(String permissionName, String packageName, int userId); |
| 112 | |
| 113 | void updatePermissionFlags(String permissionName, String packageName, int flagMask, |
Philip P. Moltmann | 2a537a6 | 2019-02-08 13:07:57 -0800 | [diff] [blame] | 114 | int flagValues, boolean checkAdjustPolicyFlagPermission, int userId); |
Dianne Hackborn | e639da7 | 2012-02-21 15:11:13 -0800 | [diff] [blame] | 115 | |
Amith Yamasani | 0bf8f7c | 2015-06-22 13:00:32 -0700 | [diff] [blame] | 116 | void updatePermissionFlagsForAllApps(int flagMask, int flagValues, int userId); |
| 117 | |
Svetoslav | 20770dd | 2015-05-29 15:43:04 -0700 | [diff] [blame] | 118 | boolean shouldShowRequestPermissionRationale(String permissionName, |
| 119 | String packageName, int userId); |
| 120 | |
Dianne Hackborn | 854060af | 2009-07-09 18:14:31 -0700 | [diff] [blame] | 121 | boolean isProtectedBroadcast(String actionName); |
Svetoslav | c6d1c34 | 2015-02-26 14:44:43 -0800 | [diff] [blame] | 122 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 123 | int checkSignatures(String pkg1, String pkg2); |
Svetoslav | c6d1c34 | 2015-02-26 14:44:43 -0800 | [diff] [blame] | 124 | |
Dianne Hackborn | 766cbfe | 2009-08-12 18:33:39 -0700 | [diff] [blame] | 125 | int checkUidSignatures(int uid1, int uid2); |
Svetoslav | c6d1c34 | 2015-02-26 14:44:43 -0800 | [diff] [blame] | 126 | |
David Brazdil | 990fb6b | 2016-03-01 10:02:27 +0000 | [diff] [blame] | 127 | List<String> getAllPackages(); |
| 128 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 129 | String[] getPackagesForUid(int uid); |
Svetoslav | c6d1c34 | 2015-02-26 14:44:43 -0800 | [diff] [blame] | 130 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 131 | String getNameForUid(int uid); |
Todd Kennedy | ad192a3 | 2017-08-02 07:51:57 -0700 | [diff] [blame] | 132 | String[] getNamesForUids(in int[] uids); |
Svetoslav | c6d1c34 | 2015-02-26 14:44:43 -0800 | [diff] [blame] | 133 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 134 | int getUidForSharedUser(String sharedUserName); |
Ben Gruver | dd72c9e | 2013-08-06 12:34:17 -0700 | [diff] [blame] | 135 | |
| 136 | int getFlagsForUid(int uid); |
| 137 | |
Alex Klyubin | b9f8a52 | 2015-02-03 11:12:59 -0800 | [diff] [blame] | 138 | int getPrivateFlagsForUid(int uid); |
| 139 | |
Dianne Hackborn | 2d7576b | 2014-10-03 16:26:04 -0700 | [diff] [blame] | 140 | boolean isUidPrivileged(int uid); |
| 141 | |
Dianne Hackborn | 33f5ddd | 2014-07-21 15:35:45 -0700 | [diff] [blame] | 142 | String[] getAppOpPermissionPackages(String permissionName); |
| 143 | |
Amith Yamasani | 483f3b0 | 2012-03-13 16:08:00 -0700 | [diff] [blame] | 144 | ResolveInfo resolveIntent(in Intent intent, String resolvedType, int flags, int userId); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 145 | |
Bartosz Fabianowski | d9fa667 | 2017-01-18 18:22:26 +0100 | [diff] [blame] | 146 | ResolveInfo findPersistentPreferredActivity(in Intent intent, int userId); |
| 147 | |
Nicolas Prevot | 8194899 | 2014-05-16 18:25:26 +0100 | [diff] [blame] | 148 | boolean canForwardTo(in Intent intent, String resolvedType, int sourceUserId, int targetUserId); |
Nicolas Prevot | 10fa67c | 2014-03-24 13:44:38 +0000 | [diff] [blame] | 149 | |
Jeff Sharkey | d589663 | 2016-03-04 16:16:00 -0700 | [diff] [blame] | 150 | ParceledListSlice queryIntentActivities(in Intent intent, |
Amith Yamasani | 483f3b0 | 2012-03-13 16:08:00 -0700 | [diff] [blame] | 151 | String resolvedType, int flags, int userId); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 152 | |
Jeff Sharkey | d589663 | 2016-03-04 16:16:00 -0700 | [diff] [blame] | 153 | ParceledListSlice queryIntentActivityOptions( |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 154 | in ComponentName caller, in Intent[] specifics, |
| 155 | in String[] specificTypes, in Intent intent, |
Amith Yamasani | 483f3b0 | 2012-03-13 16:08:00 -0700 | [diff] [blame] | 156 | String resolvedType, int flags, int userId); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 157 | |
Jeff Sharkey | d589663 | 2016-03-04 16:16:00 -0700 | [diff] [blame] | 158 | ParceledListSlice queryIntentReceivers(in Intent intent, |
Amith Yamasani | 483f3b0 | 2012-03-13 16:08:00 -0700 | [diff] [blame] | 159 | String resolvedType, int flags, int userId); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 160 | |
| 161 | ResolveInfo resolveService(in Intent intent, |
Amith Yamasani | 483f3b0 | 2012-03-13 16:08:00 -0700 | [diff] [blame] | 162 | String resolvedType, int flags, int userId); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 163 | |
Jeff Sharkey | d589663 | 2016-03-04 16:16:00 -0700 | [diff] [blame] | 164 | ParceledListSlice queryIntentServices(in Intent intent, |
Amith Yamasani | 483f3b0 | 2012-03-13 16:08:00 -0700 | [diff] [blame] | 165 | String resolvedType, int flags, int userId); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 166 | |
Jeff Sharkey | d589663 | 2016-03-04 16:16:00 -0700 | [diff] [blame] | 167 | ParceledListSlice queryIntentContentProviders(in Intent intent, |
Jeff Sharkey | 85f5f81 | 2013-10-07 10:16:12 -0700 | [diff] [blame] | 168 | String resolvedType, int flags, int userId); |
| 169 | |
Kenny Root | 0e2c0f3 | 2011-04-15 17:50:10 -0700 | [diff] [blame] | 170 | /** |
| 171 | * This implements getInstalledPackages 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 | */ |
Dianne Hackborn | d8e1dbb | 2013-01-17 17:47:37 -0800 | [diff] [blame] | 176 | ParceledListSlice getInstalledPackages(int flags, in int userId); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 177 | |
Kenny Root | 0e2c0f3 | 2011-04-15 17:50:10 -0700 | [diff] [blame] | 178 | /** |
Dianne Hackborn | e799175 | 2013-01-16 17:56:46 -0800 | [diff] [blame] | 179 | * This implements getPackagesHoldingPermissions via a "last returned row" |
| 180 | * mechanism that is not exposed in the API. This is to get around the IPC |
| 181 | * limit that kicks in when flags are included that bloat up the data |
| 182 | * returned. |
| 183 | */ |
| 184 | ParceledListSlice getPackagesHoldingPermissions(in String[] permissions, |
Dianne Hackborn | d8e1dbb | 2013-01-17 17:47:37 -0800 | [diff] [blame] | 185 | int flags, int userId); |
Dianne Hackborn | e799175 | 2013-01-16 17:56:46 -0800 | [diff] [blame] | 186 | |
| 187 | /** |
Kenny Root | 0e2c0f3 | 2011-04-15 17:50:10 -0700 | [diff] [blame] | 188 | * This implements getInstalledApplications via a "last returned row" |
| 189 | * mechanism that is not exposed in the API. This is to get around the IPC |
| 190 | * limit that kicks in when flags are included that bloat up the data |
| 191 | * returned. |
| 192 | */ |
Dianne Hackborn | d8e1dbb | 2013-01-17 17:47:37 -0800 | [diff] [blame] | 193 | ParceledListSlice getInstalledApplications(int flags, int userId); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 194 | |
| 195 | /** |
| 196 | * Retrieve all applications that are marked as persistent. |
Svetoslav | c6d1c34 | 2015-02-26 14:44:43 -0800 | [diff] [blame] | 197 | * |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 198 | * @return A List<applicationInfo> containing one entry for each persistent |
| 199 | * application. |
| 200 | */ |
Jeff Sharkey | d589663 | 2016-03-04 16:16:00 -0700 | [diff] [blame] | 201 | ParceledListSlice getPersistentApplications(int flags); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 202 | |
Amith Yamasani | 483f3b0 | 2012-03-13 16:08:00 -0700 | [diff] [blame] | 203 | ProviderInfo resolveContentProvider(String name, int flags, int userId); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 204 | |
| 205 | /** |
| 206 | * Retrieve sync information for all content providers. |
Svetoslav | c6d1c34 | 2015-02-26 14:44:43 -0800 | [diff] [blame] | 207 | * |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 208 | * @param outNames Filled in with a list of the root names of the content |
| 209 | * providers that can sync. |
| 210 | * @param outInfo Filled in with a list of the ProviderInfo for each |
| 211 | * name in 'outNames'. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 212 | */ |
| 213 | void querySyncProviders(inout List<String> outNames, |
| 214 | inout List<ProviderInfo> outInfo); |
| 215 | |
Dianne Hackborn | 28ec27c | 2015-08-03 15:28:28 -0700 | [diff] [blame] | 216 | ParceledListSlice queryContentProviders( |
Makoto Onuki | 3275729 | 2017-02-22 14:36:59 -0800 | [diff] [blame] | 217 | String processName, int uid, int flags, String metaDataKey); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 218 | |
| 219 | InstrumentationInfo getInstrumentationInfo( |
| 220 | in ComponentName className, int flags); |
| 221 | |
Jeff Sharkey | d589663 | 2016-03-04 16:16:00 -0700 | [diff] [blame] | 222 | ParceledListSlice queryInstrumentation( |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 223 | String targetPackage, int flags); |
| 224 | |
Christopher Tate | 5cf5578 | 2016-04-25 17:08:56 -0700 | [diff] [blame] | 225 | void finishPackageInstall(int token, boolean didLaunch); |
Christopher Tate | 1bb6906 | 2010-02-19 17:02:12 -0800 | [diff] [blame] | 226 | |
Dianne Hackborn | 880119b | 2010-11-18 22:26:40 -0800 | [diff] [blame] | 227 | void setInstallerPackageName(in String targetPackage, in String installerPackageName); |
| 228 | |
Jeff Sharkey | 9bc89af | 2017-01-11 11:25:50 -0700 | [diff] [blame] | 229 | void setApplicationCategoryHint(String packageName, int categoryHint, String callerPackageName); |
| 230 | |
Jeff Sharkey | fbd0e9f | 2014-08-06 16:34:34 -0700 | [diff] [blame] | 231 | /** @deprecated rawr, don't call AIDL methods directly! */ |
Svet Ganov | 6788212 | 2016-12-11 16:36:34 -0800 | [diff] [blame] | 232 | void deletePackageAsUser(in String packageName, int versionCode, |
| 233 | IPackageDeleteObserver observer, int userId, int flags); |
Jeff Sharkey | fbd0e9f | 2014-08-06 16:34:34 -0700 | [diff] [blame] | 234 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 235 | /** |
Amith Yamasani | 67df64b | 2012-12-14 12:09:36 -0800 | [diff] [blame] | 236 | * Delete a package for a specific user. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 237 | * |
Svet Ganov | 6788212 | 2016-12-11 16:36:34 -0800 | [diff] [blame] | 238 | * @param versionedPackage The package to delete. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 239 | * @param observer a callback to use to notify when the package deletion in finished. |
Amith Yamasani | 67df64b | 2012-12-14 12:09:36 -0800 | [diff] [blame] | 240 | * @param userId the id of the user for whom to delete the package |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 241 | * @param flags - possible values: {@link #DONT_DELETE_DATA} |
| 242 | */ |
Svet Ganov | 6788212 | 2016-12-11 16:36:34 -0800 | [diff] [blame] | 243 | void deletePackageVersioned(in VersionedPackage versionedPackage, |
| 244 | IPackageDeleteObserver2 observer, int userId, int flags); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 245 | |
Jacek Surazski | 65e1317 | 2009-04-28 15:26:38 +0200 | [diff] [blame] | 246 | String getInstallerPackageName(in String packageName); |
| 247 | |
Svet Ganov | 9c8b8ab | 2015-07-23 09:32:26 -0700 | [diff] [blame] | 248 | void resetApplicationPreferences(int userId); |
Dianne Hackborn | 8a2ed1d | 2013-01-29 15:18:29 -0800 | [diff] [blame] | 249 | |
Amith Yamasani | e9ecc8b | 2013-08-22 11:16:27 -0700 | [diff] [blame] | 250 | ResolveInfo getLastChosenActivity(in Intent intent, |
| 251 | String resolvedType, int flags); |
| 252 | |
| 253 | void setLastChosenActivity(in Intent intent, String resolvedType, int flags, |
| 254 | in IntentFilter filter, int match, in ComponentName activity); |
| 255 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 256 | void addPreferredActivity(in IntentFilter filter, int match, |
Amith Yamasani | a3f133a | 2012-08-09 17:11:28 -0700 | [diff] [blame] | 257 | in ComponentName[] set, in ComponentName activity, int userId); |
Satish Sampath | 8dbe612 | 2009-06-02 23:35:54 +0100 | [diff] [blame] | 258 | |
| 259 | void replacePreferredActivity(in IntentFilter filter, int match, |
Amith Yamasani | 41c1ded | 2014-08-05 11:15:05 -0700 | [diff] [blame] | 260 | in ComponentName[] set, in ComponentName activity, int userId); |
Satish Sampath | 8dbe612 | 2009-06-02 23:35:54 +0100 | [diff] [blame] | 261 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 262 | void clearPackagePreferredActivities(String packageName); |
Satish Sampath | 8dbe612 | 2009-06-02 23:35:54 +0100 | [diff] [blame] | 263 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 264 | int getPreferredActivities(out List<IntentFilter> outFilters, |
| 265 | out List<ComponentName> outActivities, String packageName); |
Amith Yamasani | e9ecc8b | 2013-08-22 11:16:27 -0700 | [diff] [blame] | 266 | |
Sander Alewijnse | f475ca3 | 2014-02-17 15:13:58 +0000 | [diff] [blame] | 267 | void addPersistentPreferredActivity(in IntentFilter filter, in ComponentName activity, int userId); |
| 268 | |
| 269 | void clearPackagePersistentPreferredActivities(String packageName, int userId); |
| 270 | |
Nicolas Prevot | 3f7777f | 2014-07-24 15:58:39 +0100 | [diff] [blame] | 271 | void addCrossProfileIntentFilter(in IntentFilter intentFilter, String ownerPackage, |
Nicolas Prevot | 4b8d582 | 2015-03-05 15:20:49 +0000 | [diff] [blame] | 272 | int sourceUserId, int targetUserId, int flags); |
Nicolas Prevot | 10fa67c | 2014-03-24 13:44:38 +0000 | [diff] [blame] | 273 | |
Nicolas Prevot | 4b8d582 | 2015-03-05 15:20:49 +0000 | [diff] [blame] | 274 | void clearCrossProfileIntentFilters(int sourceUserId, String ownerPackage); |
Nicolas Prevot | 10fa67c | 2014-03-24 13:44:38 +0000 | [diff] [blame] | 275 | |
Suprabh Shukla | 7900049 | 2018-12-24 17:03:02 -0800 | [diff] [blame] | 276 | String[] setDistractingPackageRestrictionsAsUser(in String[] packageNames, int restrictionFlags, |
| 277 | int userId); |
| 278 | |
Suprabh Shukla | 021b57a | 2018-03-08 18:21:50 -0800 | [diff] [blame] | 279 | String[] setPackagesSuspendedAsUser(in String[] packageNames, boolean suspended, |
Suprabh Shukla | 3c3af14 | 2018-03-30 00:28:37 -0700 | [diff] [blame] | 280 | in PersistableBundle appExtras, in PersistableBundle launcherExtras, |
Suprabh Shukla | 389cb6f | 2018-10-01 18:20:39 -0700 | [diff] [blame] | 281 | in SuspendDialogInfo dialogInfo, String callingPackage, int userId); |
Suprabh Shukla | 021b57a | 2018-03-08 18:21:50 -0800 | [diff] [blame] | 282 | |
Suprabh Shukla | 436d093ba | 2018-12-12 16:01:41 +0000 | [diff] [blame] | 283 | String[] getUnsuspendablePackagesForUser(in String[] packageNames, int userId); |
Suprabh Shukla | 1f1de70 | 2018-11-09 22:49:23 -0800 | [diff] [blame] | 284 | |
Andrei Stingaceanu | 355b232 | 2016-02-12 16:43:51 +0000 | [diff] [blame] | 285 | boolean isPackageSuspendedForUser(String packageName, int userId); |
Andrei Stingaceanu | 1e28391 | 2015-11-26 15:26:28 +0000 | [diff] [blame] | 286 | |
Suprabh Shukla | 2fd43ba | 2018-03-22 16:57:49 -0700 | [diff] [blame] | 287 | PersistableBundle getSuspendedPackageAppExtras(String packageName, int userId); |
Suprabh Shukla | 021b57a | 2018-03-08 18:21:50 -0800 | [diff] [blame] | 288 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 289 | /** |
Christopher Tate | e012a23 | 2015-04-01 17:18:50 -0700 | [diff] [blame] | 290 | * Backup/restore support - only the system uid may use these. |
| 291 | */ |
| 292 | byte[] getPreferredActivityBackup(int userId); |
| 293 | void restorePreferredActivities(in byte[] backup, int userId); |
Christopher Tate | 6038d15 | 2015-06-17 13:07:46 -0700 | [diff] [blame] | 294 | byte[] getDefaultAppsBackup(int userId); |
| 295 | void restoreDefaultApps(in byte[] backup, int userId); |
| 296 | byte[] getIntentFilterVerificationBackup(int userId); |
| 297 | void restoreIntentFilterVerification(in byte[] backup, int userId); |
Christopher Tate | e012a23 | 2015-04-01 17:18:50 -0700 | [diff] [blame] | 298 | |
| 299 | /** |
Christopher Tate | a2a0850d | 2013-09-05 16:38:58 -0700 | [diff] [blame] | 300 | * Report the set of 'Home' activity candidates, plus (if any) which of them |
| 301 | * is the current "always use this one" setting. |
| 302 | */ |
| 303 | ComponentName getHomeActivities(out List<ResolveInfo> outHomeCandidates); |
| 304 | |
Makoto Onuki | 4828a59 | 2016-03-15 18:06:57 -0700 | [diff] [blame] | 305 | void setHomeActivity(in ComponentName className, int userId); |
| 306 | |
Christopher Tate | a2a0850d | 2013-09-05 16:38:58 -0700 | [diff] [blame] | 307 | /** |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 308 | * As per {@link android.content.pm.PackageManager#setComponentEnabledSetting}. |
| 309 | */ |
| 310 | void setComponentEnabledSetting(in ComponentName componentName, |
Amith Yamasani | 483f3b0 | 2012-03-13 16:08:00 -0700 | [diff] [blame] | 311 | in int newState, in int flags, int userId); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 312 | |
| 313 | /** |
| 314 | * As per {@link android.content.pm.PackageManager#getComponentEnabledSetting}. |
| 315 | */ |
Amith Yamasani | 483f3b0 | 2012-03-13 16:08:00 -0700 | [diff] [blame] | 316 | int getComponentEnabledSetting(in ComponentName componentName, int userId); |
Jeff Davidson | 2a88031 | 2015-06-22 16:54:34 -0700 | [diff] [blame] | 317 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 318 | /** |
| 319 | * As per {@link android.content.pm.PackageManager#setApplicationEnabledSetting}. |
| 320 | */ |
Dianne Hackborn | 3fa3c28a | 2013-03-26 16:15:41 -0700 | [diff] [blame] | 321 | void setApplicationEnabledSetting(in String packageName, in int newState, int flags, |
| 322 | int userId, String callingPackage); |
Jeff Davidson | 2a88031 | 2015-06-22 16:54:34 -0700 | [diff] [blame] | 323 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 324 | /** |
| 325 | * As per {@link android.content.pm.PackageManager#getApplicationEnabledSetting}. |
| 326 | */ |
Amith Yamasani | 483f3b0 | 2012-03-13 16:08:00 -0700 | [diff] [blame] | 327 | int getApplicationEnabledSetting(in String packageName, int userId); |
Jeff Davidson | 2a88031 | 2015-06-22 16:54:34 -0700 | [diff] [blame] | 328 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 329 | /** |
Michal Karpinski | b52a461 | 2016-03-21 13:39:42 +0000 | [diff] [blame] | 330 | * Logs process start information (including APK hash) to the security log. |
| 331 | */ |
| 332 | void logAppProcessStartIfNeeded(String processName, int uid, String seinfo, String apkFile, |
| 333 | int pid); |
| 334 | |
| 335 | /** |
Sudheer Shanka | bbb3ff2 | 2015-07-09 15:39:23 +0100 | [diff] [blame] | 336 | * As per {@link android.content.pm.PackageManager#flushPackageRestrictionsAsUser}. |
| 337 | */ |
| 338 | void flushPackageRestrictionsAsUser(in int userId); |
| 339 | |
| 340 | /** |
Dianne Hackborn | e7f9721 | 2011-02-24 14:40:20 -0800 | [diff] [blame] | 341 | * Set whether the given package should be considered stopped, making |
| 342 | * it not visible to implicit intents that filter out stopped packages. |
| 343 | */ |
Amith Yamasani | 483f3b0 | 2012-03-13 16:08:00 -0700 | [diff] [blame] | 344 | void setPackageStoppedState(String packageName, boolean stopped, int userId); |
Dianne Hackborn | e7f9721 | 2011-02-24 14:40:20 -0800 | [diff] [blame] | 345 | |
| 346 | /** |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 347 | * Free storage by deleting LRU sorted list of cache files across |
| 348 | * all applications. If the currently available free storage |
| 349 | * on the device is greater than or equal to the requested |
| 350 | * free storage, no cache files are cleared. If the currently |
| 351 | * available storage on the device is less than the requested |
| 352 | * free storage, some or all of the cache files across |
| 353 | * all applications are deleted (based on last accessed time) |
| 354 | * to increase the free storage space on the device to |
| 355 | * the requested value. There is no guarantee that clearing all |
| 356 | * the cache files from all applications will clear up |
| 357 | * enough storage to achieve the desired value. |
| 358 | * @param freeStorageSize The number of bytes of storage to be |
| 359 | * freed by the system. Say if freeStorageSize is XX, |
| 360 | * and the current free storage is YY, |
| 361 | * if XX is less than YY, just return. if not free XX-YY number |
| 362 | * of bytes if possible. |
| 363 | * @param observer call back used to notify when |
| 364 | * the operation is completed |
| 365 | */ |
Jeff Sharkey | 529f91f | 2015-04-18 20:23:13 -0700 | [diff] [blame] | 366 | void freeStorageAndNotify(in String volumeUuid, in long freeStorageSize, |
Jeff Sharkey | ddff807 | 2017-05-26 13:10:46 -0600 | [diff] [blame] | 367 | int storageFlags, IPackageDataObserver observer); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 368 | |
| 369 | /** |
| 370 | * Free storage by deleting LRU sorted list of cache files across |
| 371 | * all applications. If the currently available free storage |
| 372 | * on the device is greater than or equal to the requested |
| 373 | * free storage, no cache files are cleared. If the currently |
| 374 | * available storage on the device is less than the requested |
| 375 | * free storage, some or all of the cache files across |
| 376 | * all applications are deleted (based on last accessed time) |
| 377 | * to increase the free storage space on the device to |
| 378 | * the requested value. There is no guarantee that clearing all |
| 379 | * the cache files from all applications will clear up |
| 380 | * enough storage to achieve the desired value. |
| 381 | * @param freeStorageSize The number of bytes of storage to be |
| 382 | * freed by the system. Say if freeStorageSize is XX, |
| 383 | * and the current free storage is YY, |
| 384 | * if XX is less than YY, just return. if not free XX-YY number |
| 385 | * of bytes if possible. |
Suchi Amalapurapu | 1ccac75 | 2009-06-12 10:09:58 -0700 | [diff] [blame] | 386 | * @param pi IntentSender call back used to |
| 387 | * notify when the operation is completed.May be null |
| 388 | * to indicate that no call back is desired. |
| 389 | */ |
Jeff Sharkey | 529f91f | 2015-04-18 20:23:13 -0700 | [diff] [blame] | 390 | void freeStorage(in String volumeUuid, in long freeStorageSize, |
Jeff Sharkey | ddff807 | 2017-05-26 13:10:46 -0600 | [diff] [blame] | 391 | int storageFlags, in IntentSender pi); |
Jeff Davidson | 2a88031 | 2015-06-22 16:54:34 -0700 | [diff] [blame] | 392 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 393 | /** |
| 394 | * Delete all the cache files in an applications cache directory |
| 395 | * @param packageName The package name of the application whose cache |
| 396 | * files need to be deleted |
| 397 | * @param observer a callback used to notify when the deletion is finished. |
| 398 | */ |
| 399 | void deleteApplicationCacheFiles(in String packageName, IPackageDataObserver observer); |
Jeff Davidson | 2a88031 | 2015-06-22 16:54:34 -0700 | [diff] [blame] | 400 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 401 | /** |
Suprabh Shukla | 78c9eb8 | 2016-04-12 15:51:35 -0700 | [diff] [blame] | 402 | * Delete all the cache files in an applications cache directory |
| 403 | * @param packageName The package name of the application whose cache |
| 404 | * files need to be deleted |
| 405 | * @param userId the user to delete application cache for |
| 406 | * @param observer a callback used to notify when the deletion is finished. |
| 407 | */ |
| 408 | void deleteApplicationCacheFilesAsUser(in String packageName, int userId, IPackageDataObserver observer); |
| 409 | |
| 410 | /** |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 411 | * Clear the user data directory of an application. |
| 412 | * @param packageName The package name of the application whose cache |
| 413 | * files need to be deleted |
| 414 | * @param observer a callback used to notify when the operation is completed. |
| 415 | */ |
Amith Yamasani | 483f3b0 | 2012-03-13 16:08:00 -0700 | [diff] [blame] | 416 | void clearApplicationUserData(in String packageName, IPackageDataObserver observer, int userId); |
Jeff Davidson | 2a88031 | 2015-06-22 16:54:34 -0700 | [diff] [blame] | 417 | |
David Brazdil | 9aa6db0 | 2016-03-08 12:57:12 +0000 | [diff] [blame] | 418 | /** |
| 419 | * Clear the profile data of an application. |
| 420 | * @param packageName The package name of the application whose profile data |
| 421 | * need to be deleted |
| 422 | */ |
| 423 | void clearApplicationProfileData(in String packageName); |
| 424 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 425 | /** |
| 426 | * Get package statistics including the code, data and cache size for |
| 427 | * an already installed package |
| 428 | * @param packageName The package name of the application |
Dianne Hackborn | 0c38049 | 2012-08-20 17:23:30 -0700 | [diff] [blame] | 429 | * @param userHandle Which user the size should be retrieved for |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 430 | * @param observer a callback to use to notify when the asynchronous |
| 431 | * retrieval of information is complete. |
| 432 | */ |
Dianne Hackborn | 0c38049 | 2012-08-20 17:23:30 -0700 | [diff] [blame] | 433 | void getPackageSizeInfo(in String packageName, int userHandle, IPackageStatsObserver observer); |
Jeff Davidson | 2a88031 | 2015-06-22 16:54:34 -0700 | [diff] [blame] | 434 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 435 | /** |
| 436 | * Get a list of shared libraries that are available on the |
| 437 | * system. |
| 438 | */ |
| 439 | String[] getSystemSharedLibraryNames(); |
| 440 | |
Dianne Hackborn | 4923734 | 2009-08-27 20:08:01 -0700 | [diff] [blame] | 441 | /** |
| 442 | * Get a list of features that are available on the |
| 443 | * system. |
| 444 | */ |
Jeff Sharkey | d589663 | 2016-03-04 16:16:00 -0700 | [diff] [blame] | 445 | ParceledListSlice getSystemAvailableFeatures(); |
Dianne Hackborn | 4923734 | 2009-08-27 20:08:01 -0700 | [diff] [blame] | 446 | |
Jeff Sharkey | 115d2c1 | 2016-02-15 17:25:57 -0700 | [diff] [blame] | 447 | boolean hasSystemFeature(String name, int version); |
Jeff Davidson | 2a88031 | 2015-06-22 16:54:34 -0700 | [diff] [blame] | 448 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 449 | void enterSafeMode(); |
| 450 | boolean isSafeMode(); |
| 451 | void systemReady(); |
| 452 | boolean hasSystemUidErrors(); |
Dianne Hackborn | 661cd52 | 2011-08-22 00:26:20 -0700 | [diff] [blame] | 453 | |
| 454 | /** |
Nicolas Geoffray | 27c0737 | 2015-11-05 16:54:09 +0000 | [diff] [blame] | 455 | * Ask the package manager to fstrim the disk if needed. |
Dianne Hackborn | 661cd52 | 2011-08-22 00:26:20 -0700 | [diff] [blame] | 456 | */ |
Nicolas Geoffray | 27c0737 | 2015-11-05 16:54:09 +0000 | [diff] [blame] | 457 | void performFstrimIfNeeded(); |
| 458 | |
| 459 | /** |
David Brazdil | f5c444f | 2016-03-30 11:45:52 +0100 | [diff] [blame] | 460 | * Ask the package manager to update packages if needed. |
David Brazdil | a0e1043 | 2016-01-20 14:04:40 +0000 | [diff] [blame] | 461 | */ |
David Brazdil | f5c444f | 2016-03-30 11:45:52 +0100 | [diff] [blame] | 462 | void updatePackagesIfNeeded(); |
David Brazdil | a0e1043 | 2016-01-20 14:04:40 +0000 | [diff] [blame] | 463 | |
| 464 | /** |
Brian Carlstrom | ca82e61 | 2016-04-19 23:16:08 -0700 | [diff] [blame] | 465 | * Notify the package manager that a package is going to be used and why. |
| 466 | * |
| 467 | * See PackageManager.NOTIFY_PACKAGE_USE_* for reasons. |
Nicolas Geoffray | 27c0737 | 2015-11-05 16:54:09 +0000 | [diff] [blame] | 468 | */ |
Calin Juravle | 0a3693c | 2017-05-01 19:49:21 -0700 | [diff] [blame] | 469 | oneway void notifyPackageUse(String packageName, int reason); |
Dianne Hackborn | 661cd52 | 2011-08-22 00:26:20 -0700 | [diff] [blame] | 470 | |
Dianne Hackborn | 5c1e00b | 2009-06-18 17:10:57 -0700 | [diff] [blame] | 471 | /** |
Calin Juravle | 8d2a51f | 2016-11-23 19:50:58 +0000 | [diff] [blame] | 472 | * Notify the package manager that a list of dex files have been loaded. |
| 473 | * |
| 474 | * @param loadingPackageName the name of the package who performs the load |
Calin Juravle | f1ff36f | 2017-07-22 12:33:41 -0700 | [diff] [blame] | 475 | * @param classLoadersNames the names of the class loaders present in the loading chain. The |
| 476 | * list encodes the class loader chain in the natural order. The first class loader has |
| 477 | * the second one as its parent and so on. The dex files present in the class path of the |
| 478 | * first class loader will be recorded in the usage file. |
| 479 | * @param classPaths the class paths corresponding to the class loaders names from |
| 480 | * {@param classLoadersNames}. The the first element corresponds to the first class loader |
| 481 | * and so on. A classpath is represented as a list of dex files separated by |
Alan Stokes | b6c3a60 | 2018-11-02 12:10:42 +0000 | [diff] [blame] | 482 | * {@code File.pathSeparator}, or null if the class loader's classpath is not known. |
Calin Juravle | f1ff36f | 2017-07-22 12:33:41 -0700 | [diff] [blame] | 483 | * The dex files found in the first class path will be recorded in the usage file. |
Calin Juravle | 8d2a51f | 2016-11-23 19:50:58 +0000 | [diff] [blame] | 484 | * @param loaderIsa the ISA of the loader process |
| 485 | */ |
Calin Juravle | f1ff36f | 2017-07-22 12:33:41 -0700 | [diff] [blame] | 486 | oneway void notifyDexLoad(String loadingPackageName, in List<String> classLoadersNames, |
| 487 | in List<String> classPaths, String loaderIsa); |
Calin Juravle | 8d2a51f | 2016-11-23 19:50:58 +0000 | [diff] [blame] | 488 | |
| 489 | /** |
Calin Juravle | 3d2af7f | 2017-04-19 19:56:21 -0700 | [diff] [blame] | 490 | * Register an application dex module with the package manager. |
| 491 | * The package manager will keep track of the given module for future optimizations. |
| 492 | * |
| 493 | * Dex module optimizations will disable the classpath checking at runtime. The client bares |
| 494 | * the responsibility to ensure that the static assumptions on classes in the optimized code |
| 495 | * hold at runtime (e.g. there's no duplicate classes in the classpath). |
| 496 | * |
| 497 | * Note that the package manager already keeps track of dex modules loaded with |
| 498 | * {@link dalvik.system.DexClassLoader} and {@link dalvik.system.PathClassLoader}. |
| 499 | * This can be called for an eager registration. |
| 500 | * |
| 501 | * The call might take a while and the results will be posted on the main thread, using |
| 502 | * the given callback. |
| 503 | * |
| 504 | * If the module is intended to be shared with other apps, make sure that the file |
| 505 | * permissions allow for it. |
| 506 | * If at registration time the permissions allow for others to read it, the module would |
| 507 | * be marked as a shared module which might undergo a different optimization strategy. |
| 508 | * (usually shared modules will generated larger optimizations artifacts, |
| 509 | * taking more disk space). |
| 510 | * |
| 511 | * @param packageName the package name to which the dex module belongs |
| 512 | * @param dexModulePath the absolute path of the dex module. |
| 513 | * @param isSharedModule whether or not the module is intended to be used by other apps. |
| 514 | * @param callback if not null, |
| 515 | * {@link android.content.pm.IDexModuleRegisterCallback.IDexModuleRegisterCallback#onDexModuleRegistered} |
| 516 | * will be called once the registration finishes. |
| 517 | */ |
Calin Juravle | 0ace6ac | 2017-05-01 19:19:34 -0700 | [diff] [blame] | 518 | oneway void registerDexModule(in String packageName, in String dexModulePath, |
Calin Juravle | 3d2af7f | 2017-04-19 19:56:21 -0700 | [diff] [blame] | 519 | in boolean isSharedModule, IDexModuleRegisterCallback callback); |
| 520 | |
| 521 | /** |
Andreas Gampe | bdd30d8 | 2016-03-20 11:32:11 -0700 | [diff] [blame] | 522 | * Ask the package manager to perform a dex-opt with the given compiler filter. |
| 523 | * |
| 524 | * Note: exposed only for the shell command to allow moving packages explicitly to a |
| 525 | * definite state. |
| 526 | */ |
Nicolas Geoffray | fb6cf77 | 2016-05-27 13:09:19 +0100 | [diff] [blame] | 527 | boolean performDexOptMode(String packageName, boolean checkProfiles, |
Calin Juravle | b6f844d | 2017-07-17 15:23:21 -0700 | [diff] [blame] | 528 | String targetCompilerFilter, boolean force, boolean bootComplete, String splitName); |
David Brazdil | 493411a | 2016-02-01 13:48:46 +0000 | [diff] [blame] | 529 | |
David Sehr | a877708 | 2016-05-24 15:25:23 -0700 | [diff] [blame] | 530 | /** |
Calin Juravle | c22c30e | 2017-01-16 19:18:48 -0800 | [diff] [blame] | 531 | * Ask the package manager to perform a dex-opt with the given compiler filter on the |
| 532 | * secondary dex files belonging to the given package. |
| 533 | * |
| 534 | * Note: exposed only for the shell command to allow moving packages explicitly to a |
| 535 | * definite state. |
| 536 | */ |
| 537 | boolean performDexOptSecondary(String packageName, |
| 538 | String targetCompilerFilter, boolean force); |
| 539 | |
| 540 | /** |
Eric Holk | a1485f6 | 2019-01-07 13:58:25 -0800 | [diff] [blame] | 541 | * Ask the package manager to compile layouts in the given package. |
| 542 | */ |
| 543 | boolean compileLayouts(String packageName); |
| 544 | |
| 545 | /** |
David Sehr | a877708 | 2016-05-24 15:25:23 -0700 | [diff] [blame] | 546 | * Ask the package manager to dump profiles associated with a package. |
| 547 | */ |
| 548 | void dumpProfiles(String packageName); |
| 549 | |
Jeff Sharkey | 20e0c50 | 2014-07-25 14:09:37 -0700 | [diff] [blame] | 550 | void forceDexOpt(String packageName); |
| 551 | |
Suchi Amalapurapu | af8e9f4 | 2010-01-12 10:17:28 -0800 | [diff] [blame] | 552 | /** |
Arthur Eubanks | 09dd1ec | 2017-09-15 09:28:51 -0700 | [diff] [blame] | 553 | * Execute the background dexopt job immediately on packages in packageNames. |
| 554 | * If null, then execute on all packages. |
Calin Juravle | cb5f41e | 2017-01-25 17:16:08 -0800 | [diff] [blame] | 555 | */ |
Arthur Eubanks | 09dd1ec | 2017-09-15 09:28:51 -0700 | [diff] [blame] | 556 | boolean runBackgroundDexoptJob(in List<String> packageNames); |
Calin Juravle | cb5f41e | 2017-01-25 17:16:08 -0800 | [diff] [blame] | 557 | |
| 558 | /** |
Calin Juravle | 1aa5f88 | 2017-01-25 01:05:50 -0800 | [diff] [blame] | 559 | * Reconcile the information we have about the secondary dex files belonging to |
| 560 | * {@code packagName} and the actual dex files. For all dex files that were |
| 561 | * deleted, update the internal records and delete the generated oat files. |
| 562 | */ |
| 563 | void reconcileSecondaryDexFiles(String packageName); |
| 564 | |
Jeff Sharkey | 620b32b | 2015-04-23 19:36:02 -0700 | [diff] [blame] | 565 | int getMoveStatus(int moveId); |
| 566 | |
| 567 | void registerMoveCallback(in IPackageMoveObserver callback); |
| 568 | void unregisterMoveCallback(in IPackageMoveObserver callback); |
| 569 | |
| 570 | int movePackage(in String packageName, in String volumeUuid); |
| 571 | int movePrimaryStorage(in String volumeUuid); |
Jeff Sharkey | b2b9ab8 | 2015-04-05 21:10:42 -0700 | [diff] [blame] | 572 | |
Dianne Hackborn | d7c0968 | 2010-03-30 10:42:20 -0700 | [diff] [blame] | 573 | boolean addPermissionAsync(in PermissionInfo info); |
Suchi Amalapurapu | 40e4725 | 2010-04-07 16:15:50 -0700 | [diff] [blame] | 574 | |
| 575 | boolean setInstallLocation(int loc); |
| 576 | int getInstallLocation(); |
Amith Yamasani | 0b28549 | 2011-04-14 17:35:23 -0700 | [diff] [blame] | 577 | |
Todd Kennedy | be0b889 | 2017-02-15 14:13:52 -0800 | [diff] [blame] | 578 | int installExistingPackageAsUser(String packageName, int userId, int installFlags, |
| 579 | int installReason); |
Dianne Hackborn | 7767eac | 2012-08-23 18:25:40 -0700 | [diff] [blame] | 580 | |
Kenny Root | 3a9b5fb | 2011-09-20 14:15:38 -0700 | [diff] [blame] | 581 | void verifyPendingInstall(int id, int verificationCode); |
rich cannings | d9ef3e5 | 2012-08-22 14:28:05 -0700 | [diff] [blame] | 582 | void extendVerificationTimeout(int id, int verificationCodeAtTimeout, long millisecondsToDelay); |
Kenny Root | 0aaa0d9 | 2011-09-12 16:42:55 -0700 | [diff] [blame] | 583 | |
Fabrice Di Meglio | d3d8a32 | 2015-04-01 15:58:47 -0700 | [diff] [blame] | 584 | void verifyIntentFilter(int id, int verificationCode, in List<String> failedDomains); |
Fabrice Di Meglio | 1c1b471 | 2014-11-19 17:12:32 -0800 | [diff] [blame] | 585 | int getIntentVerificationStatus(String packageName, int userId); |
| 586 | boolean updateIntentVerificationStatus(String packageName, int status, int userId); |
Jeff Sharkey | d589663 | 2016-03-04 16:16:00 -0700 | [diff] [blame] | 587 | ParceledListSlice getIntentFilterVerifications(String packageName); |
| 588 | ParceledListSlice getAllIntentFilters(String packageName); |
Fabrice Di Meglio | 1c1b471 | 2014-11-19 17:12:32 -0800 | [diff] [blame] | 589 | |
Fabrice Di Meglio | 6227172 | 2015-04-10 17:24:02 -0700 | [diff] [blame] | 590 | boolean setDefaultBrowserPackageName(String packageName, int userId); |
| 591 | String getDefaultBrowserPackageName(int userId); |
| 592 | |
Kenny Root | 0aaa0d9 | 2011-09-12 16:42:55 -0700 | [diff] [blame] | 593 | VerifierDeviceIdentity getVerifierDeviceIdentity(); |
Dianne Hackborn | 58f42a5 | 2011-10-10 13:46:34 -0700 | [diff] [blame] | 594 | |
| 595 | boolean isFirstBoot(); |
Dianne Hackborn | 13579ed | 2012-11-28 18:05:36 -0800 | [diff] [blame] | 596 | boolean isOnlyCoreApps(); |
Jeff Hao | 9f60c08 | 2014-10-28 18:51:07 -0700 | [diff] [blame] | 597 | boolean isUpgrade(); |
Amith Yamasani | 742a671 | 2011-05-04 14:49:28 -0700 | [diff] [blame] | 598 | |
Jeff Sharkey | 5d32e77 | 2012-04-12 15:59:23 -0700 | [diff] [blame] | 599 | void setPermissionEnforced(String permission, boolean enforced); |
| 600 | boolean isPermissionEnforced(String permission); |
Jeff Sharkey | f6f7f1d | 2012-06-12 17:12:08 -0700 | [diff] [blame] | 601 | |
| 602 | /** Reflects current DeviceStorageMonitorService state */ |
| 603 | boolean isStorageLow(); |
Amith Yamasani | 655d0e2 | 2013-06-12 14:19:10 -0700 | [diff] [blame] | 604 | |
Amith Yamasani | e5bcff6 | 2014-07-19 15:44:09 -0700 | [diff] [blame] | 605 | boolean setApplicationHiddenSettingAsUser(String packageName, boolean hidden, int userId); |
| 606 | boolean getApplicationHiddenSettingAsUser(String packageName, int userId); |
Jeff Sharkey | 3a44f3f | 2014-04-28 17:36:31 -0700 | [diff] [blame] | 607 | |
Rhed Jao | cd47c26 | 2018-06-13 11:16:16 +0800 | [diff] [blame] | 608 | void setSystemAppHiddenUntilInstalled(String packageName, boolean hidden); |
| 609 | boolean setSystemAppInstallState(String packageName, boolean installed, int userId); |
| 610 | |
Jeff Sharkey | 3a44f3f | 2014-04-28 17:36:31 -0700 | [diff] [blame] | 611 | IPackageInstaller getPackageInstaller(); |
Kenny Guy | c13053b | 2014-05-29 14:17:17 +0100 | [diff] [blame] | 612 | |
| 613 | boolean setBlockUninstallForUser(String packageName, boolean blockUninstall, int userId); |
| 614 | boolean getBlockUninstallForUser(String packageName, int userId); |
dcashman | 9d2f441 | 2014-06-09 09:27:54 -0700 | [diff] [blame] | 615 | |
dcashman | c6f2249 | 2014-08-14 09:54:51 -0700 | [diff] [blame] | 616 | KeySet getKeySetByAlias(String packageName, String alias); |
| 617 | KeySet getSigningKeySet(String packageName); |
| 618 | boolean isPackageSignedByKeySet(String packageName, in KeySet ks); |
| 619 | boolean isPackageSignedByKeySetExactly(String packageName, in KeySet ks); |
Svetoslav | f7c06eb | 2015-06-10 18:43:22 -0700 | [diff] [blame] | 620 | |
| 621 | void addOnPermissionsChangeListener(in IOnPermissionsChangeListener listener); |
| 622 | void removeOnPermissionsChangeListener(in IOnPermissionsChangeListener listener); |
Svetoslav | cdfd230 | 2015-06-25 19:07:31 -0700 | [diff] [blame] | 623 | void grantDefaultPermissionsToEnabledCarrierApps(in String[] packageNames, int userId); |
Brad Ebinger | f477979 | 2017-01-23 16:44:23 -0800 | [diff] [blame] | 624 | void grantDefaultPermissionsToEnabledImsServices(in String[] packageNames, int userId); |
Nathan Harold | 76ad1a3 | 2018-02-20 14:31:09 -0800 | [diff] [blame] | 625 | void grantDefaultPermissionsToEnabledTelephonyDataServices( |
| 626 | in String[] packageNames, int userId); |
| 627 | void revokeDefaultPermissionsFromDisabledTelephonyDataServices( |
| 628 | in String[] packageNames, int userId); |
Holly Jiuyu Sun | 349e214 | 2018-03-26 15:29:42 -0700 | [diff] [blame] | 629 | void grantDefaultPermissionsToActiveLuiApp(in String packageName, int userId); |
| 630 | void revokeDefaultPermissionsFromLuiApps(in String[] packageNames, int userId); |
Svet Ganov | ad3b297 | 2015-07-07 22:49:17 -0700 | [diff] [blame] | 631 | |
| 632 | boolean isPermissionRevokedByPolicy(String permission, String packageName, int userId); |
Svet Ganov | f1b7f20 | 2015-07-29 08:33:42 -0700 | [diff] [blame] | 633 | |
| 634 | String getPermissionControllerPackageName(); |
Svet Ganov | 2acf063 | 2015-11-24 19:10:59 -0800 | [diff] [blame] | 635 | |
Svetoslav Ganov | 096d304 | 2017-01-30 16:34:13 -0800 | [diff] [blame] | 636 | ParceledListSlice getInstantApps(int userId); |
| 637 | byte[] getInstantAppCookie(String packageName, int userId); |
| 638 | boolean setInstantAppCookie(String packageName, in byte[] cookie, int userId); |
| 639 | Bitmap getInstantAppIcon(String packageName, int userId); |
| 640 | boolean isInstantApp(String packageName, int userId); |
Fyodor Kupolov | bdbc969 | 2015-12-14 13:11:13 -0800 | [diff] [blame] | 641 | |
| 642 | boolean setRequiredForSystemUser(String packageName, boolean systemUserApp); |
Svet Ganov | d7b1f411 | 2016-02-09 18:49:23 -0800 | [diff] [blame] | 643 | |
Todd Kennedy | ab53289 | 2017-03-08 14:19:49 -0800 | [diff] [blame] | 644 | /** |
| 645 | * Sets whether or not an update is available. Ostensibly for instant apps |
| 646 | * to force exteranl resolution. |
| 647 | */ |
| 648 | void setUpdateAvailable(String packageName, boolean updateAvaialble); |
| 649 | |
Svet Ganov | d7b1f411 | 2016-02-09 18:49:23 -0800 | [diff] [blame] | 650 | String getServicesSystemSharedLibraryPackageName(); |
Svetoslav Ganov | a9c2500 | 2016-04-13 19:25:56 -0700 | [diff] [blame] | 651 | String getSharedSystemSharedLibraryPackageName(); |
Makoto Onuki | f34db0a | 2016-02-17 11:17:15 -0800 | [diff] [blame] | 652 | |
Todd Kennedy | 9106c64 | 2017-02-08 14:16:53 -0800 | [diff] [blame] | 653 | ChangedPackages getChangedPackages(int sequenceNumber, int userId); |
| 654 | |
Makoto Onuki | f34db0a | 2016-02-17 11:17:15 -0800 | [diff] [blame] | 655 | boolean isPackageDeviceAdminOnAnyUser(String packageName); |
Todd Kennedy | 39bfee5 | 2016-02-24 10:28:21 -0800 | [diff] [blame] | 656 | |
Bartosz Fabianowski | a34f53f | 2017-01-11 18:08:47 +0100 | [diff] [blame] | 657 | int getInstallReason(String packageName, int userId); |
Svet Ganov | 6788212 | 2016-12-11 16:36:34 -0800 | [diff] [blame] | 658 | |
Svet Ganov | 58c99f0 | 2017-05-15 14:07:17 -0700 | [diff] [blame] | 659 | ParceledListSlice getSharedLibraries(in String packageName, int flags, int userId); |
Suprabh Shukla | aef2513 | 2017-01-23 18:09:03 -0800 | [diff] [blame] | 660 | |
| 661 | boolean canRequestPackageInstalls(String packageName, int userId); |
Fyodor Kupolov | 935618a | 2017-03-22 16:50:44 -0700 | [diff] [blame] | 662 | |
| 663 | void deletePreloadsFileCache(); |
Chad Brubaker | 336ae5b | 2017-03-24 15:53:09 -0700 | [diff] [blame] | 664 | |
Todd Kennedy | 0a3f081 | 2017-05-08 14:43:15 -0700 | [diff] [blame] | 665 | ComponentName getInstantAppResolverComponent(); |
| 666 | |
Chad Brubaker | 336ae5b | 2017-03-24 15:53:09 -0700 | [diff] [blame] | 667 | ComponentName getInstantAppResolverSettingsComponent(); |
Todd Kennedy | 801e659 | 2017-04-12 14:10:12 -0700 | [diff] [blame] | 668 | |
| 669 | ComponentName getInstantAppInstallerComponent(); |
Chad Brubaker | 0d277a7 | 2017-04-12 16:56:53 -0700 | [diff] [blame] | 670 | |
| 671 | String getInstantAppAndroidId(String packageName, int userId); |
Calin Juravle | 45f8b29 | 2017-11-07 18:49:43 -0800 | [diff] [blame] | 672 | |
| 673 | IArtManager getArtManager(); |
Ben Gruver | 1ab3d6e | 2017-12-07 13:45:08 -0800 | [diff] [blame] | 674 | |
| 675 | void setHarmfulAppWarning(String packageName, CharSequence warning, int userId); |
| 676 | |
| 677 | CharSequence getHarmfulAppWarning(String packageName, int userId); |
Daniel Cashman | 5cdda34 | 2018-01-19 07:22:52 -0800 | [diff] [blame] | 678 | |
| 679 | boolean hasSigningCertificate(String packageName, in byte[] signingCertificate, int flags); |
| 680 | |
| 681 | boolean hasUidSigningCertificate(int uid, in byte[] signingCertificate, int flags); |
Makoto Onuki | 700feef | 2018-02-15 10:59:41 -0800 | [diff] [blame] | 682 | |
| 683 | String getSystemTextClassifierPackageName(); |
Benjamin Franz | 7cc9a81 | 2018-03-22 10:11:29 +0000 | [diff] [blame] | 684 | |
Varun Shah | 5f30365 | 2018-11-16 18:11:19 -0800 | [diff] [blame] | 685 | String getWellbeingPackageName(); |
| 686 | |
George Hodulik | cd7695d | 2019-01-29 18:17:05 -0800 | [diff] [blame] | 687 | String getAppPredictionServicePackageName(); |
| 688 | |
Nadav Bar | 6d79ab7 | 2019-01-10 10:52:11 +0200 | [diff] [blame] | 689 | String getContentCaptureServicePackageName(); |
| 690 | |
Joe Onorato | 5a15b55 | 2018-12-18 10:40:04 -0800 | [diff] [blame] | 691 | String getIncidentReportApproverPackageName(); |
| 692 | |
Benjamin Franz | 7cc9a81 | 2018-03-22 10:11:29 +0000 | [diff] [blame] | 693 | boolean isPackageStateProtected(String packageName, int userId); |
MÃ¥rten Kongstad | fd20b83 | 2018-10-26 15:36:20 +0200 | [diff] [blame] | 694 | |
| 695 | void sendDeviceCustomizationReadyBroadcast(); |
Narayan Kamath | 2c828c1d | 2018-12-10 17:36:31 +0000 | [diff] [blame] | 696 | |
| 697 | List<ModuleInfo> getInstalledModules(int flags); |
| 698 | |
| 699 | ModuleInfo getModuleInfo(String packageName, int flags); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 700 | } |