blob: c37534aa0334c804f128ac5c3cf61cbcb940fdfe [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;
Anonymous Cowardceb1b0b2012-04-24 10:35:16 -070025import android.content.pm.ContainerEncryptionParams;
Dianne Hackborn49237342009-08-27 20:08:01 -070026import android.content.pm.FeatureInfo;
Christopher Tatef1977b42014-03-24 16:25:51 -070027import android.content.pm.IPackageInstallObserver2;
Jeff Sharkey3a44f3f2014-04-28 17:36:31 -070028import android.content.pm.IPackageInstaller;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080029import android.content.pm.IPackageDeleteObserver;
Jeff Sharkeyfbd0e9f2014-08-06 16:34:34 -070030import android.content.pm.IPackageDeleteObserver2;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080031import android.content.pm.IPackageDataObserver;
Suchi Amalapurapu8946dd32010-02-19 09:19:34 -080032import android.content.pm.IPackageMoveObserver;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080033import android.content.pm.IPackageStatsObserver;
34import android.content.pm.InstrumentationInfo;
dcashmanc6f22492014-08-14 09:54:51 -070035import android.content.pm.KeySet;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080036import android.content.pm.PackageInfo;
Kenny Root5ab21572011-07-27 11:11:19 -070037import android.content.pm.ManifestDigest;
Dianne Hackborn7767eac2012-08-23 18:25:40 -070038import android.content.pm.PackageCleanItem;
Kenny Root0e2c0f32011-04-15 17:50:10 -070039import android.content.pm.ParceledListSlice;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080040import android.content.pm.ProviderInfo;
41import android.content.pm.PermissionGroupInfo;
42import android.content.pm.PermissionInfo;
43import android.content.pm.ResolveInfo;
44import android.content.pm.ServiceInfo;
Amith Yamasani0b285492011-04-14 17:35:23 -070045import android.content.pm.UserInfo;
rich cannings706e8ba2012-08-20 13:20:14 -070046import android.content.pm.VerificationParams;
Kenny Root0aaa0d92011-09-12 16:42:55 -070047import android.content.pm.VerifierDeviceIdentity;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080048import android.net.Uri;
Amith Yamasanib8151ec2012-04-18 18:02:48 -070049import android.os.ParcelFileDescriptor;
Suchi Amalapurapu1ccac752009-06-12 10:09:58 -070050import android.content.IntentSender;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080051
52/**
53 * See {@link PackageManager} for documentation on most of the APIs
54 * here.
55 *
56 * {@hide}
57 */
58interface IPackageManager {
Christopher Tateba629da2013-11-13 17:42:28 -080059 boolean isPackageAvailable(String packageName, int userId);
Amith Yamasani483f3b02012-03-13 16:08:00 -070060 PackageInfo getPackageInfo(String packageName, int flags, int userId);
61 int getPackageUid(String packageName, int userId);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080062 int[] getPackageGids(String packageName);
Dianne Hackborn47096932010-02-11 15:57:09 -080063
64 String[] currentToCanonicalPackageNames(in String[] names);
65 String[] canonicalToCurrentPackageNames(in String[] names);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080066
67 PermissionInfo getPermissionInfo(String name, int flags);
68
69 List<PermissionInfo> queryPermissionsByGroup(String group, int flags);
70
71 PermissionGroupInfo getPermissionGroupInfo(String name, int flags);
72
73 List<PermissionGroupInfo> getAllPermissionGroups(int flags);
74
Amith Yamasani483f3b02012-03-13 16:08:00 -070075 ApplicationInfo getApplicationInfo(String packageName, int flags ,int userId);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080076
Amith Yamasani483f3b02012-03-13 16:08:00 -070077 ActivityInfo getActivityInfo(in ComponentName className, int flags, int userId);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080078
Dianne Hackborn91097de2014-04-04 18:02:06 -070079 boolean activitySupportsIntent(in ComponentName className, in Intent intent,
80 String resolvedType);
81
Amith Yamasani483f3b02012-03-13 16:08:00 -070082 ActivityInfo getReceiverInfo(in ComponentName className, int flags, int userId);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080083
Amith Yamasani483f3b02012-03-13 16:08:00 -070084 ServiceInfo getServiceInfo(in ComponentName className, int flags, int userId);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080085
Amith Yamasani483f3b02012-03-13 16:08:00 -070086 ProviderInfo getProviderInfo(in ComponentName className, int flags, int userId);
Dianne Hackborn361199b2010-08-30 17:42:07 -070087
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080088 int checkPermission(String permName, String pkgName);
89
90 int checkUidPermission(String permName, int uid);
91
92 boolean addPermission(in PermissionInfo info);
93
94 void removePermission(String name);
Dianne Hackborne639da72012-02-21 15:11:13 -080095
96 void grantPermission(String packageName, String permissionName);
97
98 void revokePermission(String packageName, String permissionName);
99
Dianne Hackborn854060a2009-07-09 18:14:31 -0700100 boolean isProtectedBroadcast(String actionName);
101
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800102 int checkSignatures(String pkg1, String pkg2);
103
Dianne Hackborn766cbfe2009-08-12 18:33:39 -0700104 int checkUidSignatures(int uid1, int uid2);
105
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800106 String[] getPackagesForUid(int uid);
107
108 String getNameForUid(int uid);
109
110 int getUidForSharedUser(String sharedUserName);
Ben Gruverdd72c9e2013-08-06 12:34:17 -0700111
112 int getFlagsForUid(int uid);
113
Dianne Hackborn2d7576b2014-10-03 16:26:04 -0700114 boolean isUidPrivileged(int uid);
115
Dianne Hackborn33f5ddd2014-07-21 15:35:45 -0700116 String[] getAppOpPermissionPackages(String permissionName);
117
Amith Yamasani483f3b02012-03-13 16:08:00 -0700118 ResolveInfo resolveIntent(in Intent intent, String resolvedType, int flags, int userId);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800119
Nicolas Prevot81948992014-05-16 18:25:26 +0100120 boolean canForwardTo(in Intent intent, String resolvedType, int sourceUserId, int targetUserId);
Nicolas Prevot10fa67c2014-03-24 13:44:38 +0000121
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800122 List<ResolveInfo> queryIntentActivities(in Intent intent,
Amith Yamasani483f3b02012-03-13 16:08:00 -0700123 String resolvedType, int flags, int userId);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800124
125 List<ResolveInfo> queryIntentActivityOptions(
126 in ComponentName caller, in Intent[] specifics,
127 in String[] specificTypes, in Intent intent,
Amith Yamasani483f3b02012-03-13 16:08:00 -0700128 String resolvedType, int flags, int userId);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800129
130 List<ResolveInfo> queryIntentReceivers(in Intent intent,
Amith Yamasani483f3b02012-03-13 16:08:00 -0700131 String resolvedType, int flags, int userId);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800132
133 ResolveInfo resolveService(in Intent intent,
Amith Yamasani483f3b02012-03-13 16:08:00 -0700134 String resolvedType, int flags, int userId);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800135
136 List<ResolveInfo> queryIntentServices(in Intent intent,
Amith Yamasani483f3b02012-03-13 16:08:00 -0700137 String resolvedType, int flags, int userId);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800138
Jeff Sharkey85f5f812013-10-07 10:16:12 -0700139 List<ResolveInfo> queryIntentContentProviders(in Intent intent,
140 String resolvedType, int flags, int userId);
141
Kenny Root0e2c0f32011-04-15 17:50:10 -0700142 /**
143 * This implements getInstalledPackages via a "last returned row"
144 * mechanism that is not exposed in the API. This is to get around the IPC
145 * limit that kicks in when flags are included that bloat up the data
146 * returned.
147 */
Dianne Hackbornd8e1dbb2013-01-17 17:47:37 -0800148 ParceledListSlice getInstalledPackages(int flags, in int userId);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800149
Kenny Root0e2c0f32011-04-15 17:50:10 -0700150 /**
Dianne Hackborne7991752013-01-16 17:56:46 -0800151 * This implements getPackagesHoldingPermissions via a "last returned row"
152 * mechanism that is not exposed in the API. This is to get around the IPC
153 * limit that kicks in when flags are included that bloat up the data
154 * returned.
155 */
156 ParceledListSlice getPackagesHoldingPermissions(in String[] permissions,
Dianne Hackbornd8e1dbb2013-01-17 17:47:37 -0800157 int flags, int userId);
Dianne Hackborne7991752013-01-16 17:56:46 -0800158
159 /**
Kenny Root0e2c0f32011-04-15 17:50:10 -0700160 * This implements getInstalledApplications via a "last returned row"
161 * mechanism that is not exposed in the API. This is to get around the IPC
162 * limit that kicks in when flags are included that bloat up the data
163 * returned.
164 */
Dianne Hackbornd8e1dbb2013-01-17 17:47:37 -0800165 ParceledListSlice getInstalledApplications(int flags, int userId);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800166
167 /**
168 * Retrieve all applications that are marked as persistent.
169 *
170 * @return A List&lt;applicationInfo> containing one entry for each persistent
171 * application.
172 */
173 List<ApplicationInfo> getPersistentApplications(int flags);
174
Amith Yamasani483f3b02012-03-13 16:08:00 -0700175 ProviderInfo resolveContentProvider(String name, int flags, int userId);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800176
177 /**
178 * Retrieve sync information for all content providers.
179 *
180 * @param outNames Filled in with a list of the root names of the content
181 * providers that can sync.
182 * @param outInfo Filled in with a list of the ProviderInfo for each
183 * name in 'outNames'.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800184 */
185 void querySyncProviders(inout List<String> outNames,
186 inout List<ProviderInfo> outInfo);
187
188 List<ProviderInfo> queryContentProviders(
189 String processName, int uid, int flags);
190
191 InstrumentationInfo getInstrumentationInfo(
192 in ComponentName className, int flags);
193
194 List<InstrumentationInfo> queryInstrumentation(
195 String targetPackage, int flags);
196
Jeff Sharkey513a0742014-07-08 17:10:32 -0700197 void installPackage(in String originPath,
198 in IPackageInstallObserver2 observer,
199 int flags,
200 in String installerPackageName,
201 in VerificationParams verificationParams,
202 in String packageAbiOverride);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800203
Amith Yamasanidda003f2014-08-28 18:06:51 -0700204 void installPackageAsUser(in String originPath,
205 in IPackageInstallObserver2 observer,
206 int flags,
207 in String installerPackageName,
208 in VerificationParams verificationParams,
209 in String packageAbiOverride,
210 int userId);
211
Christopher Tate1bb69062010-02-19 17:02:12 -0800212 void finishPackageInstall(int token);
213
Dianne Hackborn880119b2010-11-18 22:26:40 -0800214 void setInstallerPackageName(in String targetPackage, in String installerPackageName);
215
Jeff Sharkeyfbd0e9f2014-08-06 16:34:34 -0700216 /** @deprecated rawr, don't call AIDL methods directly! */
217 void deletePackageAsUser(in String packageName, IPackageDeleteObserver observer,
218 int userId, int flags);
219
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800220 /**
Amith Yamasani67df64b2012-12-14 12:09:36 -0800221 * Delete a package for a specific user.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800222 *
223 * @param packageName The fully qualified name of the package to delete.
224 * @param observer a callback to use to notify when the package deletion in finished.
Amith Yamasani67df64b2012-12-14 12:09:36 -0800225 * @param userId the id of the user for whom to delete the package
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800226 * @param flags - possible values: {@link #DONT_DELETE_DATA}
227 */
Jeff Sharkeyfbd0e9f2014-08-06 16:34:34 -0700228 void deletePackage(in String packageName, IPackageDeleteObserver2 observer, int userId, int flags);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800229
Jacek Surazski65e13172009-04-28 15:26:38 +0200230 String getInstallerPackageName(in String packageName);
231
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800232 void addPackageToPreferred(String packageName);
Amith Yamasani67df64b2012-12-14 12:09:36 -0800233
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800234 void removePackageFromPreferred(String packageName);
Amith Yamasani67df64b2012-12-14 12:09:36 -0800235
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800236 List<PackageInfo> getPreferredPackages(int flags);
237
Dianne Hackborn8a2ed1d2013-01-29 15:18:29 -0800238 void resetPreferredActivities(int userId);
239
Amith Yamasanie9ecc8b2013-08-22 11:16:27 -0700240 ResolveInfo getLastChosenActivity(in Intent intent,
241 String resolvedType, int flags);
242
243 void setLastChosenActivity(in Intent intent, String resolvedType, int flags,
244 in IntentFilter filter, int match, in ComponentName activity);
245
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800246 void addPreferredActivity(in IntentFilter filter, int match,
Amith Yamasania3f133a2012-08-09 17:11:28 -0700247 in ComponentName[] set, in ComponentName activity, int userId);
Satish Sampath8dbe6122009-06-02 23:35:54 +0100248
249 void replacePreferredActivity(in IntentFilter filter, int match,
Amith Yamasani41c1ded2014-08-05 11:15:05 -0700250 in ComponentName[] set, in ComponentName activity, int userId);
Satish Sampath8dbe6122009-06-02 23:35:54 +0100251
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800252 void clearPackagePreferredActivities(String packageName);
Satish Sampath8dbe6122009-06-02 23:35:54 +0100253
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800254 int getPreferredActivities(out List<IntentFilter> outFilters,
255 out List<ComponentName> outActivities, String packageName);
Amith Yamasanie9ecc8b2013-08-22 11:16:27 -0700256
Sander Alewijnsef475ca32014-02-17 15:13:58 +0000257 void addPersistentPreferredActivity(in IntentFilter filter, in ComponentName activity, int userId);
258
259 void clearPackagePersistentPreferredActivities(String packageName, int userId);
260
Nicolas Prevot3f7777f2014-07-24 15:58:39 +0100261 void addCrossProfileIntentFilter(in IntentFilter intentFilter, String ownerPackage,
262 int ownerUserId, int sourceUserId, int targetUserId, int flags);
Nicolas Prevot10fa67c2014-03-24 13:44:38 +0000263
Nicolas Prevot3f7777f2014-07-24 15:58:39 +0100264 void clearCrossProfileIntentFilters(int sourceUserId, String ownerPackage, int ownerUserId);
Nicolas Prevot10fa67c2014-03-24 13:44:38 +0000265
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800266 /**
Christopher Tatea2a08502013-09-05 16:38:58 -0700267 * Report the set of 'Home' activity candidates, plus (if any) which of them
268 * is the current "always use this one" setting.
269 */
270 ComponentName getHomeActivities(out List<ResolveInfo> outHomeCandidates);
271
272 /**
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800273 * As per {@link android.content.pm.PackageManager#setComponentEnabledSetting}.
274 */
275 void setComponentEnabledSetting(in ComponentName componentName,
Amith Yamasani483f3b02012-03-13 16:08:00 -0700276 in int newState, in int flags, int userId);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800277
278 /**
279 * As per {@link android.content.pm.PackageManager#getComponentEnabledSetting}.
280 */
Amith Yamasani483f3b02012-03-13 16:08:00 -0700281 int getComponentEnabledSetting(in ComponentName componentName, int userId);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800282
283 /**
284 * As per {@link android.content.pm.PackageManager#setApplicationEnabledSetting}.
285 */
Dianne Hackborn3fa3c28a2013-03-26 16:15:41 -0700286 void setApplicationEnabledSetting(in String packageName, in int newState, int flags,
287 int userId, String callingPackage);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800288
289 /**
290 * As per {@link android.content.pm.PackageManager#getApplicationEnabledSetting}.
291 */
Amith Yamasani483f3b02012-03-13 16:08:00 -0700292 int getApplicationEnabledSetting(in String packageName, int userId);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800293
294 /**
Dianne Hackborne7f97212011-02-24 14:40:20 -0800295 * Set whether the given package should be considered stopped, making
296 * it not visible to implicit intents that filter out stopped packages.
297 */
Amith Yamasani483f3b02012-03-13 16:08:00 -0700298 void setPackageStoppedState(String packageName, boolean stopped, int userId);
Dianne Hackborne7f97212011-02-24 14:40:20 -0800299
300 /**
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800301 * Free storage by deleting LRU sorted list of cache files across
302 * all applications. If the currently available free storage
303 * on the device is greater than or equal to the requested
304 * free storage, no cache files are cleared. If the currently
305 * available storage on the device is less than the requested
306 * free storage, some or all of the cache files across
307 * all applications are deleted (based on last accessed time)
308 * to increase the free storage space on the device to
309 * the requested value. There is no guarantee that clearing all
310 * the cache files from all applications will clear up
311 * enough storage to achieve the desired value.
312 * @param freeStorageSize The number of bytes of storage to be
313 * freed by the system. Say if freeStorageSize is XX,
314 * and the current free storage is YY,
315 * if XX is less than YY, just return. if not free XX-YY number
316 * of bytes if possible.
317 * @param observer call back used to notify when
318 * the operation is completed
319 */
320 void freeStorageAndNotify(in long freeStorageSize,
321 IPackageDataObserver observer);
322
323 /**
324 * Free storage by deleting LRU sorted list of cache files across
325 * all applications. If the currently available free storage
326 * on the device is greater than or equal to the requested
327 * free storage, no cache files are cleared. If the currently
328 * available storage on the device is less than the requested
329 * free storage, some or all of the cache files across
330 * all applications are deleted (based on last accessed time)
331 * to increase the free storage space on the device to
332 * the requested value. There is no guarantee that clearing all
333 * the cache files from all applications will clear up
334 * enough storage to achieve the desired value.
335 * @param freeStorageSize The number of bytes of storage to be
336 * freed by the system. Say if freeStorageSize is XX,
337 * and the current free storage is YY,
338 * if XX is less than YY, just return. if not free XX-YY number
339 * of bytes if possible.
Suchi Amalapurapu1ccac752009-06-12 10:09:58 -0700340 * @param pi IntentSender call back used to
341 * notify when the operation is completed.May be null
342 * to indicate that no call back is desired.
343 */
Suchi Amalapurapubc806f62009-06-17 15:18:19 -0700344 void freeStorage(in long freeStorageSize,
Suchi Amalapurapu1ccac752009-06-12 10:09:58 -0700345 in IntentSender pi);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800346
347 /**
348 * Delete all the cache files in an applications cache directory
349 * @param packageName The package name of the application whose cache
350 * files need to be deleted
351 * @param observer a callback used to notify when the deletion is finished.
352 */
353 void deleteApplicationCacheFiles(in String packageName, IPackageDataObserver observer);
354
355 /**
356 * Clear the user data directory of an application.
357 * @param packageName The package name of the application whose cache
358 * files need to be deleted
359 * @param observer a callback used to notify when the operation is completed.
360 */
Amith Yamasani483f3b02012-03-13 16:08:00 -0700361 void clearApplicationUserData(in String packageName, IPackageDataObserver observer, int userId);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800362
363 /**
364 * Get package statistics including the code, data and cache size for
365 * an already installed package
366 * @param packageName The package name of the application
Dianne Hackborn0c380492012-08-20 17:23:30 -0700367 * @param userHandle Which user the size should be retrieved for
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800368 * @param observer a callback to use to notify when the asynchronous
369 * retrieval of information is complete.
370 */
Dianne Hackborn0c380492012-08-20 17:23:30 -0700371 void getPackageSizeInfo(in String packageName, int userHandle, IPackageStatsObserver observer);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800372
373 /**
374 * Get a list of shared libraries that are available on the
375 * system.
376 */
377 String[] getSystemSharedLibraryNames();
378
Dianne Hackborn49237342009-08-27 20:08:01 -0700379 /**
380 * Get a list of features that are available on the
381 * system.
382 */
383 FeatureInfo[] getSystemAvailableFeatures();
384
Dianne Hackborn039c68e2009-09-26 16:39:23 -0700385 boolean hasSystemFeature(String name);
386
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800387 void enterSafeMode();
388 boolean isSafeMode();
389 void systemReady();
390 boolean hasSystemUidErrors();
Dianne Hackborn661cd522011-08-22 00:26:20 -0700391
392 /**
393 * Ask the package manager to perform boot-time dex-opt of all
394 * existing packages.
395 */
396 void performBootDexOpt();
397
Dianne Hackborn5c1e00b2009-06-18 17:10:57 -0700398 /**
399 * Ask the package manager to perform dex-opt (if needed) on the given
Narayan Kamath20531682014-07-14 13:18:43 +0100400 * package and for the given instruction set if it already hasn't done
401 * so.
402 *
403 * If the supplied instructionSet is null, the package manager will use
404 * the packages default instruction set.
405 *
406 * In most cases, apps are dexopted in advance and this function will
407 * be a no-op.
Dianne Hackborn5c1e00b2009-06-18 17:10:57 -0700408 */
Narayan Kamath20531682014-07-14 13:18:43 +0100409 boolean performDexOptIfNeeded(String packageName, String instructionSet);
Suchi Amalapurapuaf8e9f42010-01-12 10:17:28 -0800410
Jeff Sharkey20e0c502014-07-25 14:09:37 -0700411 void forceDexOpt(String packageName);
412
Suchi Amalapurapuaf8e9f42010-01-12 10:17:28 -0800413 /**
414 * Update status of external media on the package manager to scan and
415 * install packages installed on the external media. Like say the
416 * MountService uses this to call into the package manager to update
417 * status of sdcard.
418 */
Suchi Amalapurapue99bb5f2010-03-19 14:36:49 -0700419 void updateExternalMediaStatus(boolean mounted, boolean reportStatus);
Suchi Amalapurapuaf8e9f42010-01-12 10:17:28 -0800420
Dianne Hackborn7767eac2012-08-23 18:25:40 -0700421 PackageCleanItem nextPackageToClean(in PackageCleanItem lastPackage);
Suchi Amalapurapu8946dd32010-02-19 09:19:34 -0800422
423 void movePackage(String packageName, IPackageMoveObserver observer, int flags);
Rich Canningse1d7c712012-08-08 12:46:06 -0700424
Dianne Hackbornd7c09682010-03-30 10:42:20 -0700425 boolean addPermissionAsync(in PermissionInfo info);
Suchi Amalapurapu40e47252010-04-07 16:15:50 -0700426
427 boolean setInstallLocation(int loc);
428 int getInstallLocation();
Amith Yamasani0b285492011-04-14 17:35:23 -0700429
Amith Yamasani67df64b2012-12-14 12:09:36 -0800430 int installExistingPackageAsUser(String packageName, int userId);
Dianne Hackborn7767eac2012-08-23 18:25:40 -0700431
Kenny Root3a9b5fb2011-09-20 14:15:38 -0700432 void verifyPendingInstall(int id, int verificationCode);
rich canningsd9ef3e52012-08-22 14:28:05 -0700433 void extendVerificationTimeout(int id, int verificationCodeAtTimeout, long millisecondsToDelay);
Kenny Root0aaa0d92011-09-12 16:42:55 -0700434
435 VerifierDeviceIdentity getVerifierDeviceIdentity();
Dianne Hackborn58f42a52011-10-10 13:46:34 -0700436
437 boolean isFirstBoot();
Dianne Hackborn13579ed2012-11-28 18:05:36 -0800438 boolean isOnlyCoreApps();
Amith Yamasani742a6712011-05-04 14:49:28 -0700439
Jeff Sharkey5d32e772012-04-12 15:59:23 -0700440 void setPermissionEnforced(String permission, boolean enforced);
441 boolean isPermissionEnforced(String permission);
Jeff Sharkeyf6f7f1d2012-06-12 17:12:08 -0700442
443 /** Reflects current DeviceStorageMonitorService state */
444 boolean isStorageLow();
Amith Yamasani655d0e22013-06-12 14:19:10 -0700445
Amith Yamasanie5bcff62014-07-19 15:44:09 -0700446 boolean setApplicationHiddenSettingAsUser(String packageName, boolean hidden, int userId);
447 boolean getApplicationHiddenSettingAsUser(String packageName, int userId);
Jeff Sharkey3a44f3f2014-04-28 17:36:31 -0700448
449 IPackageInstaller getPackageInstaller();
Kenny Guyc13053b2014-05-29 14:17:17 +0100450
451 boolean setBlockUninstallForUser(String packageName, boolean blockUninstall, int userId);
452 boolean getBlockUninstallForUser(String packageName, int userId);
dcashman9d2f4412014-06-09 09:27:54 -0700453
dcashmanc6f22492014-08-14 09:54:51 -0700454 KeySet getKeySetByAlias(String packageName, String alias);
455 KeySet getSigningKeySet(String packageName);
456 boolean isPackageSignedByKeySet(String packageName, in KeySet ks);
457 boolean isPackageSignedByKeySetExactly(String packageName, in KeySet ks);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800458}