blob: 6cb781f341f8d3c4a958e5e7cac6d1974ee083fb [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;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080027import android.content.pm.IPackageInstallObserver;
Christopher Tatef1977b42014-03-24 16:25:51 -070028import android.content.pm.IPackageInstallObserver2;
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;
31import 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;
35import android.content.pm.PackageInfo;
Kenny Root5ab21572011-07-27 11:11:19 -070036import android.content.pm.ManifestDigest;
Dianne Hackborn7767eac2012-08-23 18:25:40 -070037import android.content.pm.PackageCleanItem;
Kenny Root0e2c0f32011-04-15 17:50:10 -070038import android.content.pm.ParceledListSlice;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080039import android.content.pm.ProviderInfo;
40import android.content.pm.PermissionGroupInfo;
41import android.content.pm.PermissionInfo;
42import android.content.pm.ResolveInfo;
43import android.content.pm.ServiceInfo;
Amith Yamasani0b285492011-04-14 17:35:23 -070044import android.content.pm.UserInfo;
rich cannings706e8ba2012-08-20 13:20:14 -070045import android.content.pm.VerificationParams;
Kenny Root0aaa0d92011-09-12 16:42:55 -070046import android.content.pm.VerifierDeviceIdentity;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080047import android.net.Uri;
Amith Yamasanib8151ec2012-04-18 18:02:48 -070048import android.os.ParcelFileDescriptor;
Suchi Amalapurapu1ccac752009-06-12 10:09:58 -070049import android.content.IntentSender;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080050
51/**
52 * See {@link PackageManager} for documentation on most of the APIs
53 * here.
54 *
55 * {@hide}
56 */
57interface IPackageManager {
Christopher Tateba629da2013-11-13 17:42:28 -080058 boolean isPackageAvailable(String packageName, int userId);
Amith Yamasani483f3b02012-03-13 16:08:00 -070059 PackageInfo getPackageInfo(String packageName, int flags, int userId);
60 int getPackageUid(String packageName, int userId);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080061 int[] getPackageGids(String packageName);
Dianne Hackborn47096932010-02-11 15:57:09 -080062
63 String[] currentToCanonicalPackageNames(in String[] names);
64 String[] canonicalToCurrentPackageNames(in String[] names);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080065
66 PermissionInfo getPermissionInfo(String name, int flags);
67
68 List<PermissionInfo> queryPermissionsByGroup(String group, int flags);
69
70 PermissionGroupInfo getPermissionGroupInfo(String name, int flags);
71
72 List<PermissionGroupInfo> getAllPermissionGroups(int flags);
73
Amith Yamasani483f3b02012-03-13 16:08:00 -070074 ApplicationInfo getApplicationInfo(String packageName, int flags ,int userId);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080075
Amith Yamasani483f3b02012-03-13 16:08:00 -070076 ActivityInfo getActivityInfo(in ComponentName className, int flags, int userId);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080077
Dianne Hackborn91097de2014-04-04 18:02:06 -070078 boolean activitySupportsIntent(in ComponentName className, in Intent intent,
79 String resolvedType);
80
Amith Yamasani483f3b02012-03-13 16:08:00 -070081 ActivityInfo getReceiverInfo(in ComponentName className, int flags, int userId);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080082
Amith Yamasani483f3b02012-03-13 16:08:00 -070083 ServiceInfo getServiceInfo(in ComponentName className, int flags, int userId);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080084
Amith Yamasani483f3b02012-03-13 16:08:00 -070085 ProviderInfo getProviderInfo(in ComponentName className, int flags, int userId);
Dianne Hackborn361199b2010-08-30 17:42:07 -070086
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080087 int checkPermission(String permName, String pkgName);
88
89 int checkUidPermission(String permName, int uid);
90
91 boolean addPermission(in PermissionInfo info);
92
93 void removePermission(String name);
Dianne Hackborne639da72012-02-21 15:11:13 -080094
95 void grantPermission(String packageName, String permissionName);
96
97 void revokePermission(String packageName, String permissionName);
98
Dianne Hackborn854060af2009-07-09 18:14:31 -070099 boolean isProtectedBroadcast(String actionName);
100
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800101 int checkSignatures(String pkg1, String pkg2);
102
Dianne Hackborn766cbfe2009-08-12 18:33:39 -0700103 int checkUidSignatures(int uid1, int uid2);
104
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800105 String[] getPackagesForUid(int uid);
106
107 String getNameForUid(int uid);
108
109 int getUidForSharedUser(String sharedUserName);
Ben Gruverdd72c9e2013-08-06 12:34:17 -0700110
111 int getFlagsForUid(int uid);
112
Amith Yamasani483f3b02012-03-13 16:08:00 -0700113 ResolveInfo resolveIntent(in Intent intent, String resolvedType, int flags, int userId);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800114
Nicolas Prevot10fa67c2014-03-24 13:44:38 +0000115 boolean canForwardTo(in Intent intent, String resolvedType, int userIdFrom, int userIdDest);
116
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800117 List<ResolveInfo> queryIntentActivities(in Intent intent,
Amith Yamasani483f3b02012-03-13 16:08:00 -0700118 String resolvedType, int flags, int userId);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800119
120 List<ResolveInfo> queryIntentActivityOptions(
121 in ComponentName caller, in Intent[] specifics,
122 in String[] specificTypes, 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> queryIntentReceivers(in Intent intent,
Amith Yamasani483f3b02012-03-13 16:08:00 -0700126 String resolvedType, int flags, int userId);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800127
128 ResolveInfo resolveService(in Intent intent,
Amith Yamasani483f3b02012-03-13 16:08:00 -0700129 String resolvedType, int flags, int userId);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800130
131 List<ResolveInfo> queryIntentServices(in Intent intent,
Amith Yamasani483f3b02012-03-13 16:08:00 -0700132 String resolvedType, int flags, int userId);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800133
Jeff Sharkey85f5f812013-10-07 10:16:12 -0700134 List<ResolveInfo> queryIntentContentProviders(in Intent intent,
135 String resolvedType, int flags, int userId);
136
Kenny Root0e2c0f32011-04-15 17:50:10 -0700137 /**
138 * This implements getInstalledPackages via a "last returned row"
139 * mechanism that is not exposed in the API. This is to get around the IPC
140 * limit that kicks in when flags are included that bloat up the data
141 * returned.
142 */
Dianne Hackbornd8e1dbb2013-01-17 17:47:37 -0800143 ParceledListSlice getInstalledPackages(int flags, in int userId);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800144
Kenny Root0e2c0f32011-04-15 17:50:10 -0700145 /**
Dianne Hackborne7991752013-01-16 17:56:46 -0800146 * This implements getPackagesHoldingPermissions via a "last returned row"
147 * mechanism that is not exposed in the API. This is to get around the IPC
148 * limit that kicks in when flags are included that bloat up the data
149 * returned.
150 */
151 ParceledListSlice getPackagesHoldingPermissions(in String[] permissions,
Dianne Hackbornd8e1dbb2013-01-17 17:47:37 -0800152 int flags, int userId);
Dianne Hackborne7991752013-01-16 17:56:46 -0800153
154 /**
Kenny Root0e2c0f32011-04-15 17:50:10 -0700155 * This implements getInstalledApplications via a "last returned row"
156 * mechanism that is not exposed in the API. This is to get around the IPC
157 * limit that kicks in when flags are included that bloat up the data
158 * returned.
159 */
Dianne Hackbornd8e1dbb2013-01-17 17:47:37 -0800160 ParceledListSlice getInstalledApplications(int flags, int userId);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800161
162 /**
163 * Retrieve all applications that are marked as persistent.
164 *
165 * @return A List&lt;applicationInfo> containing one entry for each persistent
166 * application.
167 */
168 List<ApplicationInfo> getPersistentApplications(int flags);
169
Amith Yamasani483f3b02012-03-13 16:08:00 -0700170 ProviderInfo resolveContentProvider(String name, int flags, int userId);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800171
172 /**
173 * Retrieve sync information for all content providers.
174 *
175 * @param outNames Filled in with a list of the root names of the content
176 * providers that can sync.
177 * @param outInfo Filled in with a list of the ProviderInfo for each
178 * name in 'outNames'.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800179 */
180 void querySyncProviders(inout List<String> outNames,
181 inout List<ProviderInfo> outInfo);
182
183 List<ProviderInfo> queryContentProviders(
184 String processName, int uid, int flags);
185
186 InstrumentationInfo getInstrumentationInfo(
187 in ComponentName className, int flags);
188
189 List<InstrumentationInfo> queryInstrumentation(
190 String targetPackage, int flags);
191
192 /**
193 * Install a package.
194 *
195 * @param packageURI The location of the package file to install.
196 * @param observer a callback to use to notify when the package installation in finished.
197 * @param flags - possible values: {@link #FORWARD_LOCK_PACKAGE},
198 * {@link #REPLACE_EXISITING_PACKAGE}
Jacek Surazski65e13172009-04-28 15:26:38 +0200199 * @param installerPackageName Optional package name of the application that is performing the
200 * installation. This identifies which market the package came from.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800201 */
Jacek Surazski65e13172009-04-28 15:26:38 +0200202 void installPackage(in Uri packageURI, IPackageInstallObserver observer, int flags,
203 in String installerPackageName);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800204
Christopher Tate1bb69062010-02-19 17:02:12 -0800205 void finishPackageInstall(int token);
206
Dianne Hackborn880119b2010-11-18 22:26:40 -0800207 void setInstallerPackageName(in String targetPackage, in String installerPackageName);
208
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800209 /**
Amith Yamasani67df64b2012-12-14 12:09:36 -0800210 * Delete a package for a specific user.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800211 *
212 * @param packageName The fully qualified name of the package to delete.
213 * @param observer a callback to use to notify when the package deletion in finished.
Amith Yamasani67df64b2012-12-14 12:09:36 -0800214 * @param userId the id of the user for whom to delete the package
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800215 * @param flags - possible values: {@link #DONT_DELETE_DATA}
216 */
Amith Yamasani67df64b2012-12-14 12:09:36 -0800217 void deletePackageAsUser(in String packageName, IPackageDeleteObserver observer,
218 int userId, int flags);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800219
Jacek Surazski65e13172009-04-28 15:26:38 +0200220 String getInstallerPackageName(in String packageName);
221
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800222 void addPackageToPreferred(String packageName);
Amith Yamasani67df64b2012-12-14 12:09:36 -0800223
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800224 void removePackageFromPreferred(String packageName);
Amith Yamasani67df64b2012-12-14 12:09:36 -0800225
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800226 List<PackageInfo> getPreferredPackages(int flags);
227
Dianne Hackborn8a2ed1d2013-01-29 15:18:29 -0800228 void resetPreferredActivities(int userId);
229
Amith Yamasanie9ecc8b2013-08-22 11:16:27 -0700230 ResolveInfo getLastChosenActivity(in Intent intent,
231 String resolvedType, int flags);
232
233 void setLastChosenActivity(in Intent intent, String resolvedType, int flags,
234 in IntentFilter filter, int match, in ComponentName activity);
235
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800236 void addPreferredActivity(in IntentFilter filter, int match,
Amith Yamasania3f133a2012-08-09 17:11:28 -0700237 in ComponentName[] set, in ComponentName activity, int userId);
Satish Sampath8dbe6122009-06-02 23:35:54 +0100238
239 void replacePreferredActivity(in IntentFilter filter, int match,
240 in ComponentName[] set, in ComponentName activity);
241
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800242 void clearPackagePreferredActivities(String packageName);
Satish Sampath8dbe6122009-06-02 23:35:54 +0100243
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800244 int getPreferredActivities(out List<IntentFilter> outFilters,
245 out List<ComponentName> outActivities, String packageName);
Amith Yamasanie9ecc8b2013-08-22 11:16:27 -0700246
Sander Alewijnsef475ca32014-02-17 15:13:58 +0000247 void addPersistentPreferredActivity(in IntentFilter filter, in ComponentName activity, int userId);
248
249 void clearPackagePersistentPreferredActivities(String packageName, int userId);
250
Nicolas Prevot6fee7d42014-05-01 16:16:46 +0100251 void addForwardingIntentFilter(in IntentFilter filter, boolean removable, int userIdOrig,
252 int userIdDest);
Nicolas Prevot10fa67c2014-03-24 13:44:38 +0000253
254 void clearForwardingIntentFilters(int userIdOrig);
255
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800256 /**
Christopher Tatea2a0850d2013-09-05 16:38:58 -0700257 * Report the set of 'Home' activity candidates, plus (if any) which of them
258 * is the current "always use this one" setting.
259 */
260 ComponentName getHomeActivities(out List<ResolveInfo> outHomeCandidates);
261
262 /**
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800263 * As per {@link android.content.pm.PackageManager#setComponentEnabledSetting}.
264 */
265 void setComponentEnabledSetting(in ComponentName componentName,
Amith Yamasani483f3b02012-03-13 16:08:00 -0700266 in int newState, in int flags, int userId);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800267
268 /**
269 * As per {@link android.content.pm.PackageManager#getComponentEnabledSetting}.
270 */
Amith Yamasani483f3b02012-03-13 16:08:00 -0700271 int getComponentEnabledSetting(in ComponentName componentName, int userId);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800272
273 /**
274 * As per {@link android.content.pm.PackageManager#setApplicationEnabledSetting}.
275 */
Dianne Hackborn3fa3c28a2013-03-26 16:15:41 -0700276 void setApplicationEnabledSetting(in String packageName, in int newState, int flags,
277 int userId, String callingPackage);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800278
279 /**
280 * As per {@link android.content.pm.PackageManager#getApplicationEnabledSetting}.
281 */
Amith Yamasani483f3b02012-03-13 16:08:00 -0700282 int getApplicationEnabledSetting(in String packageName, int userId);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800283
284 /**
Dianne Hackborne7f97212011-02-24 14:40:20 -0800285 * Set whether the given package should be considered stopped, making
286 * it not visible to implicit intents that filter out stopped packages.
287 */
Amith Yamasani483f3b02012-03-13 16:08:00 -0700288 void setPackageStoppedState(String packageName, boolean stopped, int userId);
Dianne Hackborne7f97212011-02-24 14:40:20 -0800289
290 /**
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800291 * Free storage by deleting LRU sorted list of cache files across
292 * all applications. If the currently available free storage
293 * on the device is greater than or equal to the requested
294 * free storage, no cache files are cleared. If the currently
295 * available storage on the device is less than the requested
296 * free storage, some or all of the cache files across
297 * all applications are deleted (based on last accessed time)
298 * to increase the free storage space on the device to
299 * the requested value. There is no guarantee that clearing all
300 * the cache files from all applications will clear up
301 * enough storage to achieve the desired value.
302 * @param freeStorageSize The number of bytes of storage to be
303 * freed by the system. Say if freeStorageSize is XX,
304 * and the current free storage is YY,
305 * if XX is less than YY, just return. if not free XX-YY number
306 * of bytes if possible.
307 * @param observer call back used to notify when
308 * the operation is completed
309 */
310 void freeStorageAndNotify(in long freeStorageSize,
311 IPackageDataObserver observer);
312
313 /**
314 * Free storage by deleting LRU sorted list of cache files across
315 * all applications. If the currently available free storage
316 * on the device is greater than or equal to the requested
317 * free storage, no cache files are cleared. If the currently
318 * available storage on the device is less than the requested
319 * free storage, some or all of the cache files across
320 * all applications are deleted (based on last accessed time)
321 * to increase the free storage space on the device to
322 * the requested value. There is no guarantee that clearing all
323 * the cache files from all applications will clear up
324 * enough storage to achieve the desired value.
325 * @param freeStorageSize The number of bytes of storage to be
326 * freed by the system. Say if freeStorageSize is XX,
327 * and the current free storage is YY,
328 * if XX is less than YY, just return. if not free XX-YY number
329 * of bytes if possible.
Suchi Amalapurapu1ccac752009-06-12 10:09:58 -0700330 * @param pi IntentSender call back used to
331 * notify when the operation is completed.May be null
332 * to indicate that no call back is desired.
333 */
Suchi Amalapurapubc806f62009-06-17 15:18:19 -0700334 void freeStorage(in long freeStorageSize,
Suchi Amalapurapu1ccac752009-06-12 10:09:58 -0700335 in IntentSender pi);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800336
337 /**
338 * Delete all the cache files in an applications cache directory
339 * @param packageName The package name of the application whose cache
340 * files need to be deleted
341 * @param observer a callback used to notify when the deletion is finished.
342 */
343 void deleteApplicationCacheFiles(in String packageName, IPackageDataObserver observer);
344
345 /**
346 * Clear the user data directory of an application.
347 * @param packageName The package name of the application whose cache
348 * files need to be deleted
349 * @param observer a callback used to notify when the operation is completed.
350 */
Amith Yamasani483f3b02012-03-13 16:08:00 -0700351 void clearApplicationUserData(in String packageName, IPackageDataObserver observer, int userId);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800352
353 /**
354 * Get package statistics including the code, data and cache size for
355 * an already installed package
356 * @param packageName The package name of the application
Dianne Hackborn0c380492012-08-20 17:23:30 -0700357 * @param userHandle Which user the size should be retrieved for
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800358 * @param observer a callback to use to notify when the asynchronous
359 * retrieval of information is complete.
360 */
Dianne Hackborn0c380492012-08-20 17:23:30 -0700361 void getPackageSizeInfo(in String packageName, int userHandle, IPackageStatsObserver observer);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800362
363 /**
364 * Get a list of shared libraries that are available on the
365 * system.
366 */
367 String[] getSystemSharedLibraryNames();
368
Dianne Hackborn49237342009-08-27 20:08:01 -0700369 /**
370 * Get a list of features that are available on the
371 * system.
372 */
373 FeatureInfo[] getSystemAvailableFeatures();
374
Dianne Hackborn039c68e2009-09-26 16:39:23 -0700375 boolean hasSystemFeature(String name);
376
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800377 void enterSafeMode();
378 boolean isSafeMode();
379 void systemReady();
380 boolean hasSystemUidErrors();
Dianne Hackborn661cd522011-08-22 00:26:20 -0700381
382 /**
383 * Ask the package manager to perform boot-time dex-opt of all
384 * existing packages.
385 */
386 void performBootDexOpt();
387
Dianne Hackborn5c1e00b2009-06-18 17:10:57 -0700388 /**
389 * Ask the package manager to perform dex-opt (if needed) on the given
390 * package, if it already hasn't done mode. Only does this if running
391 * in the special development "no pre-dexopt" mode.
392 */
393 boolean performDexOpt(String packageName);
Suchi Amalapurapuaf8e9f42010-01-12 10:17:28 -0800394
395 /**
396 * Update status of external media on the package manager to scan and
397 * install packages installed on the external media. Like say the
398 * MountService uses this to call into the package manager to update
399 * status of sdcard.
400 */
Suchi Amalapurapue99bb5f2010-03-19 14:36:49 -0700401 void updateExternalMediaStatus(boolean mounted, boolean reportStatus);
Suchi Amalapurapuaf8e9f42010-01-12 10:17:28 -0800402
Dianne Hackborn7767eac2012-08-23 18:25:40 -0700403 PackageCleanItem nextPackageToClean(in PackageCleanItem lastPackage);
Suchi Amalapurapu8946dd32010-02-19 09:19:34 -0800404
405 void movePackage(String packageName, IPackageMoveObserver observer, int flags);
Rich Canningse1d7c712012-08-08 12:46:06 -0700406
Dianne Hackbornd7c09682010-03-30 10:42:20 -0700407 boolean addPermissionAsync(in PermissionInfo info);
Suchi Amalapurapu40e47252010-04-07 16:15:50 -0700408
409 boolean setInstallLocation(int loc);
410 int getInstallLocation();
Amith Yamasani0b285492011-04-14 17:35:23 -0700411
Kenny Root5ab21572011-07-27 11:11:19 -0700412 void installPackageWithVerification(in Uri packageURI, in IPackageInstallObserver observer,
413 int flags, in String installerPackageName, in Uri verificationURI,
Rich Canningse1d7c712012-08-08 12:46:06 -0700414 in ManifestDigest manifestDigest, in ContainerEncryptionParams encryptionParams);
Kenny Root5ab21572011-07-27 11:11:19 -0700415
rich cannings706e8ba2012-08-20 13:20:14 -0700416 void installPackageWithVerificationAndEncryption(in Uri packageURI,
417 in IPackageInstallObserver observer, int flags, in String installerPackageName,
418 in VerificationParams verificationParams,
419 in ContainerEncryptionParams encryptionParams);
420
Christopher Tatef1977b42014-03-24 16:25:51 -0700421 /** Expanded observer versions */
422 void installPackageEtc(in Uri packageURI, IPackageInstallObserver observer,
423 IPackageInstallObserver2 observer2, int flags, in String installerPackageName);
424
425 void installPackageWithVerificationEtc(in Uri packageURI,
426 in IPackageInstallObserver observer, IPackageInstallObserver2 observer2,
427 int flags, in String installerPackageName, in Uri verificationURI,
428 in ManifestDigest manifestDigest, in ContainerEncryptionParams encryptionParams);
429
430 void installPackageWithVerificationAndEncryptionEtc(in Uri packageURI,
431 in IPackageInstallObserver observer, in IPackageInstallObserver2 observer2,
432 int flags, in String installerPackageName,
433 in VerificationParams verificationParams,
434 in ContainerEncryptionParams encryptionParams);
435
Amith Yamasani67df64b2012-12-14 12:09:36 -0800436 int installExistingPackageAsUser(String packageName, int userId);
Dianne Hackborn7767eac2012-08-23 18:25:40 -0700437
Kenny Root3a9b5fb2011-09-20 14:15:38 -0700438 void verifyPendingInstall(int id, int verificationCode);
rich canningsd9ef3e52012-08-22 14:28:05 -0700439 void extendVerificationTimeout(int id, int verificationCodeAtTimeout, long millisecondsToDelay);
Kenny Root0aaa0d92011-09-12 16:42:55 -0700440
441 VerifierDeviceIdentity getVerifierDeviceIdentity();
Dianne Hackborn58f42a52011-10-10 13:46:34 -0700442
443 boolean isFirstBoot();
Dianne Hackborn13579ed2012-11-28 18:05:36 -0800444 boolean isOnlyCoreApps();
Amith Yamasani742a6712011-05-04 14:49:28 -0700445
Jeff Sharkey5d32e772012-04-12 15:59:23 -0700446 void setPermissionEnforced(String permission, boolean enforced);
447 boolean isPermissionEnforced(String permission);
Jeff Sharkeyf6f7f1d2012-06-12 17:12:08 -0700448
449 /** Reflects current DeviceStorageMonitorService state */
450 boolean isStorageLow();
Amith Yamasani655d0e22013-06-12 14:19:10 -0700451
452 boolean setApplicationBlockedSettingAsUser(String packageName, boolean blocked, int userId);
453 boolean getApplicationBlockedSettingAsUser(String packageName, int userId);
Jeff Sharkey3a44f3f2014-04-28 17:36:31 -0700454
455 IPackageInstaller getPackageInstaller();
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800456}