blob: abcf77b64b87df09d1ed2d6078c3e46f132ad460 [file] [log] [blame]
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001/*
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
18package android.content.pm;
19
20import android.content.ComponentName;
21import android.content.Intent;
22import android.content.IntentFilter;
23import android.content.pm.ActivityInfo;
24import android.content.pm.ApplicationInfo;
Todd Kennedy9106c642017-02-08 14:16:53 -080025import android.content.pm.ChangedPackages;
Svetoslav Ganov096d3042017-01-30 16:34:13 -080026import android.content.pm.InstantAppInfo;
Dianne Hackborn49237342009-08-27 20:08:01 -070027import android.content.pm.FeatureInfo;
Calin Juravle3d2af7f2017-04-19 19:56:21 -070028import android.content.pm.IDexModuleRegisterCallback;
Jeff Sharkey3a44f3f2014-04-28 17:36:31 -070029import android.content.pm.IPackageInstaller;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080030import android.content.pm.IPackageDeleteObserver;
Jeff Sharkeyfbd0e9f2014-08-06 16:34:34 -070031import android.content.pm.IPackageDeleteObserver2;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080032import android.content.pm.IPackageDataObserver;
Suchi Amalapurapu8946dd32010-02-19 09:19:34 -080033import android.content.pm.IPackageMoveObserver;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080034import android.content.pm.IPackageStatsObserver;
Svetoslavf7c06eb2015-06-10 18:43:22 -070035import android.content.pm.IOnPermissionsChangeListener;
Fabrice Di Meglio1c1b4712014-11-19 17:12:32 -080036import android.content.pm.IntentFilterVerificationInfo;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080037import android.content.pm.InstrumentationInfo;
dcashmanc6f22492014-08-14 09:54:51 -070038import android.content.pm.KeySet;
Narayan Kamath2c828c1d2018-12-10 17:36:31 +000039import android.content.pm.ModuleInfo;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080040import android.content.pm.PackageInfo;
Kenny Root0e2c0f32011-04-15 17:50:10 -070041import android.content.pm.ParceledListSlice;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080042import android.content.pm.ProviderInfo;
43import android.content.pm.PermissionGroupInfo;
44import android.content.pm.PermissionInfo;
45import android.content.pm.ResolveInfo;
46import android.content.pm.ServiceInfo;
Anthony Hugh6f5eadc2019-08-22 15:35:48 -070047import android.content.pm.permission.SplitPermissionInfoParcelable;
Suprabh Shukla389cb6f2018-10-01 18:20:39 -070048import android.content.pm.SuspendDialogInfo;
Amith Yamasani0b285492011-04-14 17:35:23 -070049import android.content.pm.UserInfo;
Kenny Root0aaa0d92011-09-12 16:42:55 -070050import android.content.pm.VerifierDeviceIdentity;
Svet Ganov67882122016-12-11 16:36:34 -080051import android.content.pm.VersionedPackage;
Calin Juravle45f8b292017-11-07 18:49:43 -080052import android.content.pm.dex.IArtManager;
Svet Ganov2acf0632015-11-24 19:10:59 -080053import android.graphics.Bitmap;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080054import android.net.Uri;
Amith Yamasanib8151ec2012-04-18 18:02:48 -070055import android.os.ParcelFileDescriptor;
Suprabh Shukla021b57a2018-03-08 18:21:50 -080056import android.os.PersistableBundle;
Suchi Amalapurapu1ccac752009-06-12 10:09:58 -070057import android.content.IntentSender;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080058
59/**
60 * See {@link PackageManager} for documentation on most of the APIs
61 * here.
Svetoslavc6d1c342015-02-26 14:44:43 -080062 *
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080063 * {@hide}
64 */
65interface IPackageManager {
Jeff Sharkey8924e872015-11-30 12:52:10 -070066 void checkPackageStartable(String packageName, int userId);
Andrei Oneaf650e3c2019-02-25 13:15:54 +000067 @UnsupportedAppUsage
Christopher Tateba629da2013-11-13 17:42:28 -080068 boolean isPackageAvailable(String packageName, int userId);
Andrei Oneaf650e3c2019-02-25 13:15:54 +000069 @UnsupportedAppUsage
Amith Yamasani483f3b02012-03-13 16:08:00 -070070 PackageInfo getPackageInfo(String packageName, int flags, int userId);
Svet Ganov67882122016-12-11 16:36:34 -080071 PackageInfo getPackageInfoVersioned(in VersionedPackage versionedPackage,
72 int flags, int userId);
Andrei Oneaf650e3c2019-02-25 13:15:54 +000073 @UnsupportedAppUsage
Jeff Sharkeycd654482016-01-08 17:42:11 -070074 int getPackageUid(String packageName, int flags, int userId);
75 int[] getPackageGids(String packageName, int flags, int userId);
Svetoslavc6d1c342015-02-26 14:44:43 -080076
Andrei Oneaf650e3c2019-02-25 13:15:54 +000077 @UnsupportedAppUsage
Dianne Hackborn47096932010-02-11 15:57:09 -080078 String[] currentToCanonicalPackageNames(in String[] names);
Andrei Oneaf650e3c2019-02-25 13:15:54 +000079 @UnsupportedAppUsage
Dianne Hackborn47096932010-02-11 15:57:09 -080080 String[] canonicalToCurrentPackageNames(in String[] names);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080081
Svetoslav Ganovadb8c522017-07-28 05:46:53 +000082 PermissionInfo getPermissionInfo(String name, String packageName, int flags);
Svetoslavc6d1c342015-02-26 14:44:43 -080083
Jeff Sharkeyd5896632016-03-04 16:16:00 -070084 ParceledListSlice queryPermissionsByGroup(String group, int flags);
Svetoslavc6d1c342015-02-26 14:44:43 -080085
Andrei Oneaf650e3c2019-02-25 13:15:54 +000086 @UnsupportedAppUsage
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080087 PermissionGroupInfo getPermissionGroupInfo(String name, int flags);
Svetoslavc6d1c342015-02-26 14:44:43 -080088
Jeff Sharkeyd5896632016-03-04 16:16:00 -070089 ParceledListSlice getAllPermissionGroups(int flags);
Svetoslavc6d1c342015-02-26 14:44:43 -080090
Andrei Oneaf650e3c2019-02-25 13:15:54 +000091 @UnsupportedAppUsage
Amith Yamasani483f3b02012-03-13 16:08:00 -070092 ApplicationInfo getApplicationInfo(String packageName, int flags ,int userId);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080093
Andrei Oneaf650e3c2019-02-25 13:15:54 +000094 @UnsupportedAppUsage
Amith Yamasani483f3b02012-03-13 16:08:00 -070095 ActivityInfo getActivityInfo(in ComponentName className, int flags, int userId);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080096
Dianne Hackborn91097de2014-04-04 18:02:06 -070097 boolean activitySupportsIntent(in ComponentName className, in Intent intent,
98 String resolvedType);
99
Andrei Oneaf650e3c2019-02-25 13:15:54 +0000100 @UnsupportedAppUsage
Amith Yamasani483f3b02012-03-13 16:08:00 -0700101 ActivityInfo getReceiverInfo(in ComponentName className, int flags, int userId);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800102
Andrei Oneaf650e3c2019-02-25 13:15:54 +0000103 @UnsupportedAppUsage
Amith Yamasani483f3b02012-03-13 16:08:00 -0700104 ServiceInfo getServiceInfo(in ComponentName className, int flags, int userId);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800105
Andrei Oneaf650e3c2019-02-25 13:15:54 +0000106 @UnsupportedAppUsage
Amith Yamasani483f3b02012-03-13 16:08:00 -0700107 ProviderInfo getProviderInfo(in ComponentName className, int flags, int userId);
Dianne Hackborn361199b2010-08-30 17:42:07 -0700108
Andrei Oneaf650e3c2019-02-25 13:15:54 +0000109 @UnsupportedAppUsage
Svetoslavc6d1c342015-02-26 14:44:43 -0800110 int checkPermission(String permName, String pkgName, int userId);
111
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800112 int checkUidPermission(String permName, int uid);
Svetoslavc6d1c342015-02-26 14:44:43 -0800113
Andrei Oneaf650e3c2019-02-25 13:15:54 +0000114 @UnsupportedAppUsage
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800115 boolean addPermission(in PermissionInfo info);
Svetoslavc6d1c342015-02-26 14:44:43 -0800116
Andrei Oneaf650e3c2019-02-25 13:15:54 +0000117 @UnsupportedAppUsage
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800118 void removePermission(String name);
Dianne Hackborne639da72012-02-21 15:11:13 -0800119
Andrei Oneaf650e3c2019-02-25 13:15:54 +0000120 @UnsupportedAppUsage
Svet Ganov8c7f7002015-05-07 10:48:44 -0700121 void grantRuntimePermission(String packageName, String permissionName, int userId);
Dianne Hackborne639da72012-02-21 15:11:13 -0800122
Svet Ganov8c7f7002015-05-07 10:48:44 -0700123 void revokeRuntimePermission(String packageName, String permissionName, int userId);
124
Dianne Hackbornca8e6da2015-06-24 15:19:17 -0700125 void resetRuntimePermissions();
126
Svet Ganov8c7f7002015-05-07 10:48:44 -0700127 int getPermissionFlags(String permissionName, String packageName, int userId);
128
129 void updatePermissionFlags(String permissionName, String packageName, int flagMask,
Philip P. Moltmann2a537a62019-02-08 13:07:57 -0800130 int flagValues, boolean checkAdjustPolicyFlagPermission, int userId);
Dianne Hackborne639da72012-02-21 15:11:13 -0800131
Amith Yamasani0bf8f7c2015-06-22 13:00:32 -0700132 void updatePermissionFlagsForAllApps(int flagMask, int flagValues, int userId);
133
Svet Ganovd8eb8b22019-04-05 18:52:08 -0700134 List<String> getWhitelistedRestrictedPermissions(String packageName, int flags,
135 int userId);
136
137 boolean addWhitelistedRestrictedPermission(String packageName, String permission,
138 int whitelistFlags, int userId);
139
140 boolean removeWhitelistedRestrictedPermission(String packageName, String permission,
141 int whitelistFlags, int userId);
142
Svetoslav20770dd2015-05-29 15:43:04 -0700143 boolean shouldShowRequestPermissionRationale(String permissionName,
144 String packageName, int userId);
145
Dianne Hackborn854060af2009-07-09 18:14:31 -0700146 boolean isProtectedBroadcast(String actionName);
Svetoslavc6d1c342015-02-26 14:44:43 -0800147
Andrei Oneaf650e3c2019-02-25 13:15:54 +0000148 @UnsupportedAppUsage
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800149 int checkSignatures(String pkg1, String pkg2);
Svetoslavc6d1c342015-02-26 14:44:43 -0800150
Andrei Oneaf650e3c2019-02-25 13:15:54 +0000151 @UnsupportedAppUsage
Dianne Hackborn766cbfe2009-08-12 18:33:39 -0700152 int checkUidSignatures(int uid1, int uid2);
Svetoslavc6d1c342015-02-26 14:44:43 -0800153
David Brazdil990fb6b2016-03-01 10:02:27 +0000154 List<String> getAllPackages();
155
Andrei Oneaf650e3c2019-02-25 13:15:54 +0000156 @UnsupportedAppUsage
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800157 String[] getPackagesForUid(int uid);
Svetoslavc6d1c342015-02-26 14:44:43 -0800158
Andrei Oneaf650e3c2019-02-25 13:15:54 +0000159 @UnsupportedAppUsage
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800160 String getNameForUid(int uid);
Todd Kennedyad192a32017-08-02 07:51:57 -0700161 String[] getNamesForUids(in int[] uids);
Svetoslavc6d1c342015-02-26 14:44:43 -0800162
Andrei Oneaf650e3c2019-02-25 13:15:54 +0000163 @UnsupportedAppUsage
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800164 int getUidForSharedUser(String sharedUserName);
Ben Gruverdd72c9e2013-08-06 12:34:17 -0700165
Andrei Oneaf650e3c2019-02-25 13:15:54 +0000166 @UnsupportedAppUsage
Ben Gruverdd72c9e2013-08-06 12:34:17 -0700167 int getFlagsForUid(int uid);
168
Alex Klyubinb9f8a522015-02-03 11:12:59 -0800169 int getPrivateFlagsForUid(int uid);
170
Andrei Oneaf650e3c2019-02-25 13:15:54 +0000171 @UnsupportedAppUsage
Dianne Hackborn2d7576b2014-10-03 16:26:04 -0700172 boolean isUidPrivileged(int uid);
173
Andrei Oneaf650e3c2019-02-25 13:15:54 +0000174 @UnsupportedAppUsage
Dianne Hackborn33f5ddd2014-07-21 15:35:45 -0700175 String[] getAppOpPermissionPackages(String permissionName);
176
Andrei Oneaf650e3c2019-02-25 13:15:54 +0000177 @UnsupportedAppUsage
Amith Yamasani483f3b02012-03-13 16:08:00 -0700178 ResolveInfo resolveIntent(in Intent intent, String resolvedType, int flags, int userId);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800179
Bartosz Fabianowskid9fa6672017-01-18 18:22:26 +0100180 ResolveInfo findPersistentPreferredActivity(in Intent intent, int userId);
181
Nicolas Prevot81948992014-05-16 18:25:26 +0100182 boolean canForwardTo(in Intent intent, String resolvedType, int sourceUserId, int targetUserId);
Nicolas Prevot10fa67c2014-03-24 13:44:38 +0000183
Andrei Oneaf650e3c2019-02-25 13:15:54 +0000184 @UnsupportedAppUsage
Jeff Sharkeyd5896632016-03-04 16:16:00 -0700185 ParceledListSlice queryIntentActivities(in Intent intent,
Amith Yamasani483f3b02012-03-13 16:08:00 -0700186 String resolvedType, int flags, int userId);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800187
Jeff Sharkeyd5896632016-03-04 16:16:00 -0700188 ParceledListSlice queryIntentActivityOptions(
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800189 in ComponentName caller, in Intent[] specifics,
190 in String[] specificTypes, in Intent intent,
Amith Yamasani483f3b02012-03-13 16:08:00 -0700191 String resolvedType, int flags, int userId);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800192
Jeff Sharkeyd5896632016-03-04 16:16:00 -0700193 ParceledListSlice queryIntentReceivers(in Intent intent,
Amith Yamasani483f3b02012-03-13 16:08:00 -0700194 String resolvedType, int flags, int userId);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800195
196 ResolveInfo resolveService(in Intent intent,
Amith Yamasani483f3b02012-03-13 16:08:00 -0700197 String resolvedType, int flags, int userId);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800198
Jeff Sharkeyd5896632016-03-04 16:16:00 -0700199 ParceledListSlice queryIntentServices(in Intent intent,
Amith Yamasani483f3b02012-03-13 16:08:00 -0700200 String resolvedType, int flags, int userId);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800201
Jeff Sharkeyd5896632016-03-04 16:16:00 -0700202 ParceledListSlice queryIntentContentProviders(in Intent intent,
Jeff Sharkey85f5f812013-10-07 10:16:12 -0700203 String resolvedType, int flags, int userId);
204
Kenny Root0e2c0f32011-04-15 17:50:10 -0700205 /**
206 * This implements getInstalledPackages via a "last returned row"
207 * mechanism that is not exposed in the API. This is to get around the IPC
208 * limit that kicks in when flags are included that bloat up the data
209 * returned.
210 */
Andrei Oneaf650e3c2019-02-25 13:15:54 +0000211 @UnsupportedAppUsage
Dianne Hackbornd8e1dbb2013-01-17 17:47:37 -0800212 ParceledListSlice getInstalledPackages(int flags, in int userId);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800213
Kenny Root0e2c0f32011-04-15 17:50:10 -0700214 /**
Dianne Hackborne7991752013-01-16 17:56:46 -0800215 * This implements getPackagesHoldingPermissions via a "last returned row"
216 * mechanism that is not exposed in the API. This is to get around the IPC
217 * limit that kicks in when flags are included that bloat up the data
218 * returned.
219 */
220 ParceledListSlice getPackagesHoldingPermissions(in String[] permissions,
Dianne Hackbornd8e1dbb2013-01-17 17:47:37 -0800221 int flags, int userId);
Dianne Hackborne7991752013-01-16 17:56:46 -0800222
223 /**
Kenny Root0e2c0f32011-04-15 17:50:10 -0700224 * This implements getInstalledApplications via a "last returned row"
225 * mechanism that is not exposed in the API. This is to get around the IPC
226 * limit that kicks in when flags are included that bloat up the data
227 * returned.
228 */
Andrei Oneaf650e3c2019-02-25 13:15:54 +0000229 @UnsupportedAppUsage
Dianne Hackbornd8e1dbb2013-01-17 17:47:37 -0800230 ParceledListSlice getInstalledApplications(int flags, int userId);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800231
232 /**
233 * Retrieve all applications that are marked as persistent.
Svetoslavc6d1c342015-02-26 14:44:43 -0800234 *
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800235 * @return A List&lt;applicationInfo> containing one entry for each persistent
236 * application.
237 */
Jeff Sharkeyd5896632016-03-04 16:16:00 -0700238 ParceledListSlice getPersistentApplications(int flags);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800239
Amith Yamasani483f3b02012-03-13 16:08:00 -0700240 ProviderInfo resolveContentProvider(String name, int flags, int userId);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800241
242 /**
243 * Retrieve sync information for all content providers.
Svetoslavc6d1c342015-02-26 14:44:43 -0800244 *
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800245 * @param outNames Filled in with a list of the root names of the content
246 * providers that can sync.
247 * @param outInfo Filled in with a list of the ProviderInfo for each
248 * name in 'outNames'.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800249 */
Andrei Oneaf650e3c2019-02-25 13:15:54 +0000250 @UnsupportedAppUsage
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800251 void querySyncProviders(inout List<String> outNames,
252 inout List<ProviderInfo> outInfo);
253
Dianne Hackborn28ec27c2015-08-03 15:28:28 -0700254 ParceledListSlice queryContentProviders(
Makoto Onuki32757292017-02-22 14:36:59 -0800255 String processName, int uid, int flags, String metaDataKey);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800256
Andrei Oneaf650e3c2019-02-25 13:15:54 +0000257 @UnsupportedAppUsage
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800258 InstrumentationInfo getInstrumentationInfo(
259 in ComponentName className, int flags);
260
Andrei Oneaf650e3c2019-02-25 13:15:54 +0000261 @UnsupportedAppUsage
Jeff Sharkeyd5896632016-03-04 16:16:00 -0700262 ParceledListSlice queryInstrumentation(
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800263 String targetPackage, int flags);
264
Christopher Tate5cf55782016-04-25 17:08:56 -0700265 void finishPackageInstall(int token, boolean didLaunch);
Christopher Tate1bb69062010-02-19 17:02:12 -0800266
Andrei Oneaf650e3c2019-02-25 13:15:54 +0000267 @UnsupportedAppUsage
Dianne Hackborn880119b2010-11-18 22:26:40 -0800268 void setInstallerPackageName(in String targetPackage, in String installerPackageName);
269
Jeff Sharkey9bc89af2017-01-11 11:25:50 -0700270 void setApplicationCategoryHint(String packageName, int categoryHint, String callerPackageName);
271
Jeff Sharkeyfbd0e9f2014-08-06 16:34:34 -0700272 /** @deprecated rawr, don't call AIDL methods directly! */
Svet Ganov67882122016-12-11 16:36:34 -0800273 void deletePackageAsUser(in String packageName, int versionCode,
274 IPackageDeleteObserver observer, int userId, int flags);
Jeff Sharkeyfbd0e9f2014-08-06 16:34:34 -0700275
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800276 /**
Amith Yamasani67df64b2012-12-14 12:09:36 -0800277 * Delete a package for a specific user.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800278 *
Svet Ganov67882122016-12-11 16:36:34 -0800279 * @param versionedPackage The package to delete.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800280 * @param observer a callback to use to notify when the package deletion in finished.
Amith Yamasani67df64b2012-12-14 12:09:36 -0800281 * @param userId the id of the user for whom to delete the package
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800282 * @param flags - possible values: {@link #DONT_DELETE_DATA}
283 */
Svet Ganov67882122016-12-11 16:36:34 -0800284 void deletePackageVersioned(in VersionedPackage versionedPackage,
285 IPackageDeleteObserver2 observer, int userId, int flags);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800286
Andrei Oneaf650e3c2019-02-25 13:15:54 +0000287 @UnsupportedAppUsage
Jacek Surazski65e13172009-04-28 15:26:38 +0200288 String getInstallerPackageName(in String packageName);
289
Svet Ganov9c8b8ab2015-07-23 09:32:26 -0700290 void resetApplicationPreferences(int userId);
Dianne Hackborn8a2ed1d2013-01-29 15:18:29 -0800291
Andrei Oneaf650e3c2019-02-25 13:15:54 +0000292 @UnsupportedAppUsage
Amith Yamasanie9ecc8b2013-08-22 11:16:27 -0700293 ResolveInfo getLastChosenActivity(in Intent intent,
294 String resolvedType, int flags);
295
Andrei Oneaf650e3c2019-02-25 13:15:54 +0000296 @UnsupportedAppUsage
Amith Yamasanie9ecc8b2013-08-22 11:16:27 -0700297 void setLastChosenActivity(in Intent intent, String resolvedType, int flags,
298 in IntentFilter filter, int match, in ComponentName activity);
299
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800300 void addPreferredActivity(in IntentFilter filter, int match,
Amith Yamasania3f133a2012-08-09 17:11:28 -0700301 in ComponentName[] set, in ComponentName activity, int userId);
Satish Sampath8dbe6122009-06-02 23:35:54 +0100302
Andrei Oneaf650e3c2019-02-25 13:15:54 +0000303 @UnsupportedAppUsage
Satish Sampath8dbe6122009-06-02 23:35:54 +0100304 void replacePreferredActivity(in IntentFilter filter, int match,
Amith Yamasani41c1ded2014-08-05 11:15:05 -0700305 in ComponentName[] set, in ComponentName activity, int userId);
Satish Sampath8dbe6122009-06-02 23:35:54 +0100306
Andrei Oneaf650e3c2019-02-25 13:15:54 +0000307 @UnsupportedAppUsage
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800308 void clearPackagePreferredActivities(String packageName);
Satish Sampath8dbe6122009-06-02 23:35:54 +0100309
Andrei Oneaf650e3c2019-02-25 13:15:54 +0000310 @UnsupportedAppUsage
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800311 int getPreferredActivities(out List<IntentFilter> outFilters,
312 out List<ComponentName> outActivities, String packageName);
Amith Yamasanie9ecc8b2013-08-22 11:16:27 -0700313
Sander Alewijnsef475ca32014-02-17 15:13:58 +0000314 void addPersistentPreferredActivity(in IntentFilter filter, in ComponentName activity, int userId);
315
316 void clearPackagePersistentPreferredActivities(String packageName, int userId);
317
Nicolas Prevot3f7777f2014-07-24 15:58:39 +0100318 void addCrossProfileIntentFilter(in IntentFilter intentFilter, String ownerPackage,
Nicolas Prevot4b8d5822015-03-05 15:20:49 +0000319 int sourceUserId, int targetUserId, int flags);
Nicolas Prevot10fa67c2014-03-24 13:44:38 +0000320
Nicolas Prevot4b8d5822015-03-05 15:20:49 +0000321 void clearCrossProfileIntentFilters(int sourceUserId, String ownerPackage);
Nicolas Prevot10fa67c2014-03-24 13:44:38 +0000322
Suprabh Shukla79000492018-12-24 17:03:02 -0800323 String[] setDistractingPackageRestrictionsAsUser(in String[] packageNames, int restrictionFlags,
324 int userId);
325
Suprabh Shukla021b57a2018-03-08 18:21:50 -0800326 String[] setPackagesSuspendedAsUser(in String[] packageNames, boolean suspended,
Suprabh Shukla3c3af142018-03-30 00:28:37 -0700327 in PersistableBundle appExtras, in PersistableBundle launcherExtras,
Suprabh Shukla389cb6f2018-10-01 18:20:39 -0700328 in SuspendDialogInfo dialogInfo, String callingPackage, int userId);
Suprabh Shukla021b57a2018-03-08 18:21:50 -0800329
Suprabh Shukla436d093ba2018-12-12 16:01:41 +0000330 String[] getUnsuspendablePackagesForUser(in String[] packageNames, int userId);
Suprabh Shukla1f1de702018-11-09 22:49:23 -0800331
Andrei Stingaceanu355b2322016-02-12 16:43:51 +0000332 boolean isPackageSuspendedForUser(String packageName, int userId);
Andrei Stingaceanu1e283912015-11-26 15:26:28 +0000333
Suprabh Shukla2fd43ba2018-03-22 16:57:49 -0700334 PersistableBundle getSuspendedPackageAppExtras(String packageName, int userId);
Suprabh Shukla021b57a2018-03-08 18:21:50 -0800335
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800336 /**
Christopher Tatee012a232015-04-01 17:18:50 -0700337 * Backup/restore support - only the system uid may use these.
338 */
339 byte[] getPreferredActivityBackup(int userId);
340 void restorePreferredActivities(in byte[] backup, int userId);
Christopher Tate6038d152015-06-17 13:07:46 -0700341 byte[] getDefaultAppsBackup(int userId);
342 void restoreDefaultApps(in byte[] backup, int userId);
343 byte[] getIntentFilterVerificationBackup(int userId);
344 void restoreIntentFilterVerification(in byte[] backup, int userId);
Christopher Tatee012a232015-04-01 17:18:50 -0700345
346 /**
Christopher Tatea2a0850d2013-09-05 16:38:58 -0700347 * Report the set of 'Home' activity candidates, plus (if any) which of them
348 * is the current "always use this one" setting.
349 */
Andrei Oneaf650e3c2019-02-25 13:15:54 +0000350 @UnsupportedAppUsage
Christopher Tatea2a0850d2013-09-05 16:38:58 -0700351 ComponentName getHomeActivities(out List<ResolveInfo> outHomeCandidates);
352
Makoto Onuki4828a592016-03-15 18:06:57 -0700353 void setHomeActivity(in ComponentName className, int userId);
354
Christopher Tatea2a0850d2013-09-05 16:38:58 -0700355 /**
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800356 * As per {@link android.content.pm.PackageManager#setComponentEnabledSetting}.
357 */
Andrei Oneaf650e3c2019-02-25 13:15:54 +0000358 @UnsupportedAppUsage
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800359 void setComponentEnabledSetting(in ComponentName componentName,
Amith Yamasani483f3b02012-03-13 16:08:00 -0700360 in int newState, in int flags, int userId);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800361
362 /**
363 * As per {@link android.content.pm.PackageManager#getComponentEnabledSetting}.
364 */
Andrei Oneaf650e3c2019-02-25 13:15:54 +0000365 @UnsupportedAppUsage
Amith Yamasani483f3b02012-03-13 16:08:00 -0700366 int getComponentEnabledSetting(in ComponentName componentName, int userId);
Jeff Davidson2a880312015-06-22 16:54:34 -0700367
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800368 /**
369 * As per {@link android.content.pm.PackageManager#setApplicationEnabledSetting}.
370 */
Andrei Oneaf650e3c2019-02-25 13:15:54 +0000371 @UnsupportedAppUsage
Dianne Hackborn3fa3c28a2013-03-26 16:15:41 -0700372 void setApplicationEnabledSetting(in String packageName, in int newState, int flags,
373 int userId, String callingPackage);
Jeff Davidson2a880312015-06-22 16:54:34 -0700374
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800375 /**
376 * As per {@link android.content.pm.PackageManager#getApplicationEnabledSetting}.
377 */
Andrei Oneaf650e3c2019-02-25 13:15:54 +0000378 @UnsupportedAppUsage
Amith Yamasani483f3b02012-03-13 16:08:00 -0700379 int getApplicationEnabledSetting(in String packageName, int userId);
Jeff Davidson2a880312015-06-22 16:54:34 -0700380
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800381 /**
Michal Karpinskib52a4612016-03-21 13:39:42 +0000382 * Logs process start information (including APK hash) to the security log.
383 */
384 void logAppProcessStartIfNeeded(String processName, int uid, String seinfo, String apkFile,
385 int pid);
386
387 /**
Sudheer Shankabbb3ff22015-07-09 15:39:23 +0100388 * As per {@link android.content.pm.PackageManager#flushPackageRestrictionsAsUser}.
389 */
390 void flushPackageRestrictionsAsUser(in int userId);
391
392 /**
Dianne Hackborne7f97212011-02-24 14:40:20 -0800393 * Set whether the given package should be considered stopped, making
394 * it not visible to implicit intents that filter out stopped packages.
395 */
Andrei Oneaf650e3c2019-02-25 13:15:54 +0000396 @UnsupportedAppUsage
Amith Yamasani483f3b02012-03-13 16:08:00 -0700397 void setPackageStoppedState(String packageName, boolean stopped, int userId);
Dianne Hackborne7f97212011-02-24 14:40:20 -0800398
399 /**
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800400 * Free storage by deleting LRU sorted list of cache files across
401 * all applications. If the currently available free storage
402 * on the device is greater than or equal to the requested
403 * free storage, no cache files are cleared. If the currently
404 * available storage on the device is less than the requested
405 * free storage, some or all of the cache files across
406 * all applications are deleted (based on last accessed time)
407 * to increase the free storage space on the device to
408 * the requested value. There is no guarantee that clearing all
409 * the cache files from all applications will clear up
410 * enough storage to achieve the desired value.
411 * @param freeStorageSize The number of bytes of storage to be
412 * freed by the system. Say if freeStorageSize is XX,
413 * and the current free storage is YY,
414 * if XX is less than YY, just return. if not free XX-YY number
415 * of bytes if possible.
416 * @param observer call back used to notify when
417 * the operation is completed
418 */
Jeff Sharkey529f91f2015-04-18 20:23:13 -0700419 void freeStorageAndNotify(in String volumeUuid, in long freeStorageSize,
Jeff Sharkeyddff8072017-05-26 13:10:46 -0600420 int storageFlags, IPackageDataObserver observer);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800421
422 /**
423 * Free storage by deleting LRU sorted list of cache files across
424 * all applications. If the currently available free storage
425 * on the device is greater than or equal to the requested
426 * free storage, no cache files are cleared. If the currently
427 * available storage on the device is less than the requested
428 * free storage, some or all of the cache files across
429 * all applications are deleted (based on last accessed time)
430 * to increase the free storage space on the device to
431 * the requested value. There is no guarantee that clearing all
432 * the cache files from all applications will clear up
433 * enough storage to achieve the desired value.
434 * @param freeStorageSize The number of bytes of storage to be
435 * freed by the system. Say if freeStorageSize is XX,
436 * and the current free storage is YY,
437 * if XX is less than YY, just return. if not free XX-YY number
438 * of bytes if possible.
Suchi Amalapurapu1ccac752009-06-12 10:09:58 -0700439 * @param pi IntentSender call back used to
440 * notify when the operation is completed.May be null
441 * to indicate that no call back is desired.
442 */
Jeff Sharkey529f91f2015-04-18 20:23:13 -0700443 void freeStorage(in String volumeUuid, in long freeStorageSize,
Jeff Sharkeyddff8072017-05-26 13:10:46 -0600444 int storageFlags, in IntentSender pi);
Jeff Davidson2a880312015-06-22 16:54:34 -0700445
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800446 /**
447 * Delete all the cache files in an applications cache directory
448 * @param packageName The package name of the application whose cache
449 * files need to be deleted
450 * @param observer a callback used to notify when the deletion is finished.
451 */
Andrei Oneaf650e3c2019-02-25 13:15:54 +0000452 @UnsupportedAppUsage
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800453 void deleteApplicationCacheFiles(in String packageName, IPackageDataObserver observer);
Jeff Davidson2a880312015-06-22 16:54:34 -0700454
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800455 /**
Suprabh Shukla78c9eb82016-04-12 15:51:35 -0700456 * Delete all the cache files in an applications cache directory
457 * @param packageName The package name of the application whose cache
458 * files need to be deleted
459 * @param userId the user to delete application cache for
460 * @param observer a callback used to notify when the deletion is finished.
461 */
462 void deleteApplicationCacheFilesAsUser(in String packageName, int userId, IPackageDataObserver observer);
463
464 /**
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800465 * Clear the user data directory of an application.
466 * @param packageName The package name of the application whose cache
467 * files need to be deleted
468 * @param observer a callback used to notify when the operation is completed.
469 */
Amith Yamasani483f3b02012-03-13 16:08:00 -0700470 void clearApplicationUserData(in String packageName, IPackageDataObserver observer, int userId);
Jeff Davidson2a880312015-06-22 16:54:34 -0700471
David Brazdil9aa6db02016-03-08 12:57:12 +0000472 /**
473 * Clear the profile data of an application.
474 * @param packageName The package name of the application whose profile data
475 * need to be deleted
476 */
477 void clearApplicationProfileData(in String packageName);
478
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800479 /**
480 * Get package statistics including the code, data and cache size for
481 * an already installed package
482 * @param packageName The package name of the application
Dianne Hackborn0c380492012-08-20 17:23:30 -0700483 * @param userHandle Which user the size should be retrieved for
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800484 * @param observer a callback to use to notify when the asynchronous
485 * retrieval of information is complete.
486 */
Dianne Hackborn0c380492012-08-20 17:23:30 -0700487 void getPackageSizeInfo(in String packageName, int userHandle, IPackageStatsObserver observer);
Jeff Davidson2a880312015-06-22 16:54:34 -0700488
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800489 /**
490 * Get a list of shared libraries that are available on the
491 * system.
492 */
Andrei Oneaf650e3c2019-02-25 13:15:54 +0000493 @UnsupportedAppUsage
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800494 String[] getSystemSharedLibraryNames();
495
Dianne Hackborn49237342009-08-27 20:08:01 -0700496 /**
497 * Get a list of features that are available on the
498 * system.
499 */
Jeff Sharkeyd5896632016-03-04 16:16:00 -0700500 ParceledListSlice getSystemAvailableFeatures();
Dianne Hackborn49237342009-08-27 20:08:01 -0700501
Jeff Sharkey115d2c12016-02-15 17:25:57 -0700502 boolean hasSystemFeature(String name, int version);
Jeff Davidson2a880312015-06-22 16:54:34 -0700503
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800504 void enterSafeMode();
Andrei Oneaf650e3c2019-02-25 13:15:54 +0000505 @UnsupportedAppUsage
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800506 boolean isSafeMode();
507 void systemReady();
Andrei Oneaf650e3c2019-02-25 13:15:54 +0000508 @UnsupportedAppUsage
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800509 boolean hasSystemUidErrors();
Dianne Hackborn661cd522011-08-22 00:26:20 -0700510
511 /**
Nicolas Geoffray27c07372015-11-05 16:54:09 +0000512 * Ask the package manager to fstrim the disk if needed.
Dianne Hackborn661cd522011-08-22 00:26:20 -0700513 */
Nicolas Geoffray27c07372015-11-05 16:54:09 +0000514 void performFstrimIfNeeded();
515
516 /**
David Brazdilf5c444f2016-03-30 11:45:52 +0100517 * Ask the package manager to update packages if needed.
David Brazdila0e10432016-01-20 14:04:40 +0000518 */
David Brazdilf5c444f2016-03-30 11:45:52 +0100519 void updatePackagesIfNeeded();
David Brazdila0e10432016-01-20 14:04:40 +0000520
521 /**
Brian Carlstromca82e612016-04-19 23:16:08 -0700522 * Notify the package manager that a package is going to be used and why.
523 *
524 * See PackageManager.NOTIFY_PACKAGE_USE_* for reasons.
Nicolas Geoffray27c07372015-11-05 16:54:09 +0000525 */
Calin Juravle0a3693c2017-05-01 19:49:21 -0700526 oneway void notifyPackageUse(String packageName, int reason);
Dianne Hackborn661cd522011-08-22 00:26:20 -0700527
Dianne Hackborn5c1e00b2009-06-18 17:10:57 -0700528 /**
Calin Juravle8d2a51f2016-11-23 19:50:58 +0000529 * Notify the package manager that a list of dex files have been loaded.
530 *
531 * @param loadingPackageName the name of the package who performs the load
Calin Juravlef1ff36f2017-07-22 12:33:41 -0700532 * @param classLoadersNames the names of the class loaders present in the loading chain. The
533 * list encodes the class loader chain in the natural order. The first class loader has
534 * the second one as its parent and so on. The dex files present in the class path of the
535 * first class loader will be recorded in the usage file.
536 * @param classPaths the class paths corresponding to the class loaders names from
537 * {@param classLoadersNames}. The the first element corresponds to the first class loader
538 * and so on. A classpath is represented as a list of dex files separated by
Alan Stokesb6c3a602018-11-02 12:10:42 +0000539 * {@code File.pathSeparator}, or null if the class loader's classpath is not known.
Calin Juravlef1ff36f2017-07-22 12:33:41 -0700540 * The dex files found in the first class path will be recorded in the usage file.
Calin Juravle8d2a51f2016-11-23 19:50:58 +0000541 * @param loaderIsa the ISA of the loader process
542 */
Calin Juravlef1ff36f2017-07-22 12:33:41 -0700543 oneway void notifyDexLoad(String loadingPackageName, in List<String> classLoadersNames,
544 in List<String> classPaths, String loaderIsa);
Calin Juravle8d2a51f2016-11-23 19:50:58 +0000545
546 /**
Calin Juravle3d2af7f2017-04-19 19:56:21 -0700547 * Register an application dex module with the package manager.
548 * The package manager will keep track of the given module for future optimizations.
549 *
550 * Dex module optimizations will disable the classpath checking at runtime. The client bares
551 * the responsibility to ensure that the static assumptions on classes in the optimized code
552 * hold at runtime (e.g. there's no duplicate classes in the classpath).
553 *
554 * Note that the package manager already keeps track of dex modules loaded with
555 * {@link dalvik.system.DexClassLoader} and {@link dalvik.system.PathClassLoader}.
556 * This can be called for an eager registration.
557 *
558 * The call might take a while and the results will be posted on the main thread, using
559 * the given callback.
560 *
561 * If the module is intended to be shared with other apps, make sure that the file
562 * permissions allow for it.
563 * If at registration time the permissions allow for others to read it, the module would
564 * be marked as a shared module which might undergo a different optimization strategy.
565 * (usually shared modules will generated larger optimizations artifacts,
566 * taking more disk space).
567 *
568 * @param packageName the package name to which the dex module belongs
569 * @param dexModulePath the absolute path of the dex module.
570 * @param isSharedModule whether or not the module is intended to be used by other apps.
571 * @param callback if not null,
572 * {@link android.content.pm.IDexModuleRegisterCallback.IDexModuleRegisterCallback#onDexModuleRegistered}
573 * will be called once the registration finishes.
574 */
Calin Juravle0ace6ac2017-05-01 19:19:34 -0700575 oneway void registerDexModule(in String packageName, in String dexModulePath,
Calin Juravle3d2af7f2017-04-19 19:56:21 -0700576 in boolean isSharedModule, IDexModuleRegisterCallback callback);
577
578 /**
Andreas Gampebdd30d82016-03-20 11:32:11 -0700579 * Ask the package manager to perform a dex-opt with the given compiler filter.
580 *
581 * Note: exposed only for the shell command to allow moving packages explicitly to a
582 * definite state.
583 */
Nicolas Geoffrayfb6cf772016-05-27 13:09:19 +0100584 boolean performDexOptMode(String packageName, boolean checkProfiles,
Calin Juravleb6f844d2017-07-17 15:23:21 -0700585 String targetCompilerFilter, boolean force, boolean bootComplete, String splitName);
David Brazdil493411a2016-02-01 13:48:46 +0000586
David Sehra8777082016-05-24 15:25:23 -0700587 /**
Calin Juravlec22c30e2017-01-16 19:18:48 -0800588 * Ask the package manager to perform a dex-opt with the given compiler filter on the
589 * secondary dex files belonging to the given package.
590 *
591 * Note: exposed only for the shell command to allow moving packages explicitly to a
592 * definite state.
593 */
594 boolean performDexOptSecondary(String packageName,
595 String targetCompilerFilter, boolean force);
596
597 /**
Eric Holka1485f62019-01-07 13:58:25 -0800598 * Ask the package manager to compile layouts in the given package.
599 */
600 boolean compileLayouts(String packageName);
601
602 /**
David Sehra8777082016-05-24 15:25:23 -0700603 * Ask the package manager to dump profiles associated with a package.
604 */
605 void dumpProfiles(String packageName);
606
Jeff Sharkey20e0c502014-07-25 14:09:37 -0700607 void forceDexOpt(String packageName);
608
Suchi Amalapurapuaf8e9f42010-01-12 10:17:28 -0800609 /**
Arthur Eubanks09dd1ec2017-09-15 09:28:51 -0700610 * Execute the background dexopt job immediately on packages in packageNames.
611 * If null, then execute on all packages.
Calin Juravlecb5f41e2017-01-25 17:16:08 -0800612 */
Arthur Eubanks09dd1ec2017-09-15 09:28:51 -0700613 boolean runBackgroundDexoptJob(in List<String> packageNames);
Calin Juravlecb5f41e2017-01-25 17:16:08 -0800614
615 /**
Calin Juravle1aa5f882017-01-25 01:05:50 -0800616 * Reconcile the information we have about the secondary dex files belonging to
617 * {@code packagName} and the actual dex files. For all dex files that were
618 * deleted, update the internal records and delete the generated oat files.
619 */
620 void reconcileSecondaryDexFiles(String packageName);
621
Jeff Sharkey620b32b2015-04-23 19:36:02 -0700622 int getMoveStatus(int moveId);
623
624 void registerMoveCallback(in IPackageMoveObserver callback);
625 void unregisterMoveCallback(in IPackageMoveObserver callback);
626
627 int movePackage(in String packageName, in String volumeUuid);
628 int movePrimaryStorage(in String volumeUuid);
Jeff Sharkeyb2b9ab82015-04-05 21:10:42 -0700629
Andrei Oneaf650e3c2019-02-25 13:15:54 +0000630 @UnsupportedAppUsage
Dianne Hackbornd7c09682010-03-30 10:42:20 -0700631 boolean addPermissionAsync(in PermissionInfo info);
Suchi Amalapurapu40e47252010-04-07 16:15:50 -0700632
633 boolean setInstallLocation(int loc);
Andrei Oneaf650e3c2019-02-25 13:15:54 +0000634 @UnsupportedAppUsage
Suchi Amalapurapu40e47252010-04-07 16:15:50 -0700635 int getInstallLocation();
Amith Yamasani0b285492011-04-14 17:35:23 -0700636
Todd Kennedybe0b8892017-02-15 14:13:52 -0800637 int installExistingPackageAsUser(String packageName, int userId, int installFlags,
Philip P. Moltmanna4bd1502019-05-13 17:10:46 -0700638 int installReason, in List<String> whiteListedPermissions);
Dianne Hackborn7767eac2012-08-23 18:25:40 -0700639
Kenny Root3a9b5fb2011-09-20 14:15:38 -0700640 void verifyPendingInstall(int id, int verificationCode);
rich canningsd9ef3e52012-08-22 14:28:05 -0700641 void extendVerificationTimeout(int id, int verificationCodeAtTimeout, long millisecondsToDelay);
Kenny Root0aaa0d92011-09-12 16:42:55 -0700642
Fabrice Di Megliod3d8a322015-04-01 15:58:47 -0700643 void verifyIntentFilter(int id, int verificationCode, in List<String> failedDomains);
Fabrice Di Meglio1c1b4712014-11-19 17:12:32 -0800644 int getIntentVerificationStatus(String packageName, int userId);
645 boolean updateIntentVerificationStatus(String packageName, int status, int userId);
Jeff Sharkeyd5896632016-03-04 16:16:00 -0700646 ParceledListSlice getIntentFilterVerifications(String packageName);
647 ParceledListSlice getAllIntentFilters(String packageName);
Fabrice Di Meglio1c1b4712014-11-19 17:12:32 -0800648
Fabrice Di Meglio62271722015-04-10 17:24:02 -0700649 boolean setDefaultBrowserPackageName(String packageName, int userId);
650 String getDefaultBrowserPackageName(int userId);
651
Kenny Root0aaa0d92011-09-12 16:42:55 -0700652 VerifierDeviceIdentity getVerifierDeviceIdentity();
Dianne Hackborn58f42a52011-10-10 13:46:34 -0700653
654 boolean isFirstBoot();
Dianne Hackborn13579ed2012-11-28 18:05:36 -0800655 boolean isOnlyCoreApps();
Svet Ganovd8eb8b22019-04-05 18:52:08 -0700656 boolean isDeviceUpgrading();
Amith Yamasani742a6712011-05-04 14:49:28 -0700657
Jeff Sharkey5d32e772012-04-12 15:59:23 -0700658 void setPermissionEnforced(String permission, boolean enforced);
659 boolean isPermissionEnforced(String permission);
Jeff Sharkeyf6f7f1d2012-06-12 17:12:08 -0700660
661 /** Reflects current DeviceStorageMonitorService state */
Andrei Oneaf650e3c2019-02-25 13:15:54 +0000662 @UnsupportedAppUsage
Jeff Sharkeyf6f7f1d2012-06-12 17:12:08 -0700663 boolean isStorageLow();
Amith Yamasani655d0e22013-06-12 14:19:10 -0700664
Andrei Oneaf650e3c2019-02-25 13:15:54 +0000665 @UnsupportedAppUsage
Amith Yamasanie5bcff62014-07-19 15:44:09 -0700666 boolean setApplicationHiddenSettingAsUser(String packageName, boolean hidden, int userId);
667 boolean getApplicationHiddenSettingAsUser(String packageName, int userId);
Jeff Sharkey3a44f3f2014-04-28 17:36:31 -0700668
Rhed Jaocd47c262018-06-13 11:16:16 +0800669 void setSystemAppHiddenUntilInstalled(String packageName, boolean hidden);
670 boolean setSystemAppInstallState(String packageName, boolean installed, int userId);
671
Andrei Oneaf650e3c2019-02-25 13:15:54 +0000672 @UnsupportedAppUsage
Jeff Sharkey3a44f3f2014-04-28 17:36:31 -0700673 IPackageInstaller getPackageInstaller();
Kenny Guyc13053b2014-05-29 14:17:17 +0100674
675 boolean setBlockUninstallForUser(String packageName, boolean blockUninstall, int userId);
Andrei Oneaf650e3c2019-02-25 13:15:54 +0000676 @UnsupportedAppUsage
Kenny Guyc13053b2014-05-29 14:17:17 +0100677 boolean getBlockUninstallForUser(String packageName, int userId);
dcashman9d2f4412014-06-09 09:27:54 -0700678
dcashmanc6f22492014-08-14 09:54:51 -0700679 KeySet getKeySetByAlias(String packageName, String alias);
680 KeySet getSigningKeySet(String packageName);
681 boolean isPackageSignedByKeySet(String packageName, in KeySet ks);
682 boolean isPackageSignedByKeySetExactly(String packageName, in KeySet ks);
Svetoslavf7c06eb2015-06-10 18:43:22 -0700683
684 void addOnPermissionsChangeListener(in IOnPermissionsChangeListener listener);
685 void removeOnPermissionsChangeListener(in IOnPermissionsChangeListener listener);
Svetoslavcdfd2302015-06-25 19:07:31 -0700686 void grantDefaultPermissionsToEnabledCarrierApps(in String[] packageNames, int userId);
Brad Ebingerf4779792017-01-23 16:44:23 -0800687 void grantDefaultPermissionsToEnabledImsServices(in String[] packageNames, int userId);
Nathan Harold76ad1a32018-02-20 14:31:09 -0800688 void grantDefaultPermissionsToEnabledTelephonyDataServices(
689 in String[] packageNames, int userId);
690 void revokeDefaultPermissionsFromDisabledTelephonyDataServices(
691 in String[] packageNames, int userId);
Holly Jiuyu Sun349e2142018-03-26 15:29:42 -0700692 void grantDefaultPermissionsToActiveLuiApp(in String packageName, int userId);
693 void revokeDefaultPermissionsFromLuiApps(in String[] packageNames, int userId);
Svet Ganovad3b2972015-07-07 22:49:17 -0700694
695 boolean isPermissionRevokedByPolicy(String permission, String packageName, int userId);
Svet Ganovf1b7f202015-07-29 08:33:42 -0700696
Andrei Oneaf650e3c2019-02-25 13:15:54 +0000697 @UnsupportedAppUsage
Svet Ganovf1b7f202015-07-29 08:33:42 -0700698 String getPermissionControllerPackageName();
Svet Ganov2acf0632015-11-24 19:10:59 -0800699
Svetoslav Ganov096d3042017-01-30 16:34:13 -0800700 ParceledListSlice getInstantApps(int userId);
701 byte[] getInstantAppCookie(String packageName, int userId);
702 boolean setInstantAppCookie(String packageName, in byte[] cookie, int userId);
703 Bitmap getInstantAppIcon(String packageName, int userId);
704 boolean isInstantApp(String packageName, int userId);
Fyodor Kupolovbdbc9692015-12-14 13:11:13 -0800705
706 boolean setRequiredForSystemUser(String packageName, boolean systemUserApp);
Svet Ganovd7b1f4112016-02-09 18:49:23 -0800707
Todd Kennedyab532892017-03-08 14:19:49 -0800708 /**
709 * Sets whether or not an update is available. Ostensibly for instant apps
710 * to force exteranl resolution.
711 */
712 void setUpdateAvailable(String packageName, boolean updateAvaialble);
713
Andrei Oneaf650e3c2019-02-25 13:15:54 +0000714 @UnsupportedAppUsage
Svet Ganovd7b1f4112016-02-09 18:49:23 -0800715 String getServicesSystemSharedLibraryPackageName();
Andrei Oneaf650e3c2019-02-25 13:15:54 +0000716 @UnsupportedAppUsage
Svetoslav Ganova9c25002016-04-13 19:25:56 -0700717 String getSharedSystemSharedLibraryPackageName();
Makoto Onukif34db0a2016-02-17 11:17:15 -0800718
Todd Kennedy9106c642017-02-08 14:16:53 -0800719 ChangedPackages getChangedPackages(int sequenceNumber, int userId);
720
Makoto Onukif34db0a2016-02-17 11:17:15 -0800721 boolean isPackageDeviceAdminOnAnyUser(String packageName);
Todd Kennedy39bfee52016-02-24 10:28:21 -0800722
Bartosz Fabianowskia34f53f2017-01-11 18:08:47 +0100723 int getInstallReason(String packageName, int userId);
Svet Ganov67882122016-12-11 16:36:34 -0800724
Svet Ganov58c99f02017-05-15 14:07:17 -0700725 ParceledListSlice getSharedLibraries(in String packageName, int flags, int userId);
Suprabh Shuklaaef25132017-01-23 18:09:03 -0800726
Hai Zhang1ad238f2019-03-20 16:11:07 -0700727 ParceledListSlice getDeclaredSharedLibraries(in String packageName, int flags, int userId);
728
Suprabh Shuklaaef25132017-01-23 18:09:03 -0800729 boolean canRequestPackageInstalls(String packageName, int userId);
Fyodor Kupolov935618a2017-03-22 16:50:44 -0700730
731 void deletePreloadsFileCache();
Chad Brubaker336ae5b2017-03-24 15:53:09 -0700732
Todd Kennedy0a3f0812017-05-08 14:43:15 -0700733 ComponentName getInstantAppResolverComponent();
734
Chad Brubaker336ae5b2017-03-24 15:53:09 -0700735 ComponentName getInstantAppResolverSettingsComponent();
Todd Kennedy801e6592017-04-12 14:10:12 -0700736
737 ComponentName getInstantAppInstallerComponent();
Chad Brubaker0d277a72017-04-12 16:56:53 -0700738
739 String getInstantAppAndroidId(String packageName, int userId);
Calin Juravle45f8b292017-11-07 18:49:43 -0800740
741 IArtManager getArtManager();
Ben Gruver1ab3d6e2017-12-07 13:45:08 -0800742
743 void setHarmfulAppWarning(String packageName, CharSequence warning, int userId);
744
745 CharSequence getHarmfulAppWarning(String packageName, int userId);
Daniel Cashman5cdda342018-01-19 07:22:52 -0800746
747 boolean hasSigningCertificate(String packageName, in byte[] signingCertificate, int flags);
748
749 boolean hasUidSigningCertificate(int uid, in byte[] signingCertificate, int flags);
Makoto Onuki700feef2018-02-15 10:59:41 -0800750
751 String getSystemTextClassifierPackageName();
Benjamin Franz7cc9a812018-03-22 10:11:29 +0000752
Yi Jiang8915b352019-03-21 12:02:53 -0700753 String getAttentionServicePackageName();
754
Varun Shah5f303652018-11-16 18:11:19 -0800755 String getWellbeingPackageName();
756
George Hodulikcd7695d2019-01-29 18:17:05 -0800757 String getAppPredictionServicePackageName();
758
Nadav Bar1a1f5a212019-03-17 16:15:14 +0200759 String getSystemCaptionsServicePackageName();
Nadav Bar6d79ab72019-01-10 10:52:11 +0200760
Joe Onorato5a15b552018-12-18 10:40:04 -0800761 String getIncidentReportApproverPackageName();
762
Benjamin Franz7cc9a812018-03-22 10:11:29 +0000763 boolean isPackageStateProtected(String packageName, int userId);
MÃ¥rten Kongstadfd20b832018-10-26 15:36:20 +0200764
765 void sendDeviceCustomizationReadyBroadcast();
Narayan Kamath2c828c1d2018-12-10 17:36:31 +0000766
767 List<ModuleInfo> getInstalledModules(int flags);
768
769 ModuleInfo getModuleInfo(String packageName, int flags);
Svet Ganovd8eb8b22019-04-05 18:52:08 -0700770
771 int getRuntimePermissionsVersion(int userId);
772
773 void setRuntimePermissionsVersion(int version, int userId);
Winson23863be2019-04-04 17:41:28 -0700774
775 void notifyPackagesReplacedReceived(in String[] packages);
Anthony Hugh6f5eadc2019-08-22 15:35:48 -0700776
777 List<SplitPermissionInfoParcelable> getSplitPermissions();
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800778}