The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1 | /* |
| 2 | ** |
| 3 | ** Copyright 2007, The Android Open Source Project |
| 4 | ** |
| 5 | ** Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | ** you may not use this file except in compliance with the License. |
| 7 | ** You may obtain a copy of the License at |
| 8 | ** |
| 9 | ** http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | ** |
| 11 | ** Unless required by applicable law or agreed to in writing, software |
| 12 | ** distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | ** See the License for the specific language governing permissions and |
| 15 | ** limitations under the License. |
| 16 | */ |
| 17 | |
| 18 | package android.content.pm; |
| 19 | |
| 20 | import android.content.ComponentName; |
| 21 | import android.content.Intent; |
| 22 | import android.content.IntentFilter; |
| 23 | import android.content.pm.ActivityInfo; |
| 24 | import android.content.pm.ApplicationInfo; |
Anonymous Coward | ceb1b0b | 2012-04-24 10:35:16 -0700 | [diff] [blame] | 25 | import android.content.pm.ContainerEncryptionParams; |
Svet Ganov | 2acf063 | 2015-11-24 19:10:59 -0800 | [diff] [blame] | 26 | import android.content.pm.EphemeralApplicationInfo; |
Dianne Hackborn | 4923734 | 2009-08-27 20:08:01 -0700 | [diff] [blame] | 27 | import android.content.pm.FeatureInfo; |
Christopher Tate | f1977b4 | 2014-03-24 16:25:51 -0700 | [diff] [blame] | 28 | import android.content.pm.IPackageInstallObserver2; |
Jeff Sharkey | 3a44f3f | 2014-04-28 17:36:31 -0700 | [diff] [blame] | 29 | import android.content.pm.IPackageInstaller; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 30 | import android.content.pm.IPackageDeleteObserver; |
Jeff Sharkey | fbd0e9f | 2014-08-06 16:34:34 -0700 | [diff] [blame] | 31 | import android.content.pm.IPackageDeleteObserver2; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 32 | import android.content.pm.IPackageDataObserver; |
Suchi Amalapurapu | 8946dd3 | 2010-02-19 09:19:34 -0800 | [diff] [blame] | 33 | import android.content.pm.IPackageMoveObserver; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 34 | import android.content.pm.IPackageStatsObserver; |
Svetoslav | f7c06eb | 2015-06-10 18:43:22 -0700 | [diff] [blame] | 35 | import android.content.pm.IOnPermissionsChangeListener; |
Fabrice Di Meglio | 1c1b471 | 2014-11-19 17:12:32 -0800 | [diff] [blame] | 36 | import android.content.pm.IntentFilterVerificationInfo; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 37 | import android.content.pm.InstrumentationInfo; |
dcashman | c6f2249 | 2014-08-14 09:54:51 -0700 | [diff] [blame] | 38 | import android.content.pm.KeySet; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 39 | import android.content.pm.PackageInfo; |
Kenny Root | 5ab2157 | 2011-07-27 11:11:19 -0700 | [diff] [blame] | 40 | import android.content.pm.ManifestDigest; |
Dianne Hackborn | 7767eac | 2012-08-23 18:25:40 -0700 | [diff] [blame] | 41 | import android.content.pm.PackageCleanItem; |
Kenny Root | 0e2c0f3 | 2011-04-15 17:50:10 -0700 | [diff] [blame] | 42 | import android.content.pm.ParceledListSlice; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 43 | import android.content.pm.ProviderInfo; |
| 44 | import android.content.pm.PermissionGroupInfo; |
| 45 | import android.content.pm.PermissionInfo; |
| 46 | import android.content.pm.ResolveInfo; |
| 47 | import android.content.pm.ServiceInfo; |
Amith Yamasani | 0b28549 | 2011-04-14 17:35:23 -0700 | [diff] [blame] | 48 | import android.content.pm.UserInfo; |
Kenny Root | 0aaa0d9 | 2011-09-12 16:42:55 -0700 | [diff] [blame] | 49 | import android.content.pm.VerifierDeviceIdentity; |
Svet Ganov | 2acf063 | 2015-11-24 19:10:59 -0800 | [diff] [blame] | 50 | import android.graphics.Bitmap; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 51 | import android.net.Uri; |
Svetoslav | c6d1c34 | 2015-02-26 14:44:43 -0800 | [diff] [blame] | 52 | import android.os.Bundle; |
Amith Yamasani | b8151ec | 2012-04-18 18:02:48 -0700 | [diff] [blame] | 53 | import android.os.ParcelFileDescriptor; |
Suchi Amalapurapu | 1ccac75 | 2009-06-12 10:09:58 -0700 | [diff] [blame] | 54 | import android.content.IntentSender; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 55 | |
| 56 | /** |
| 57 | * See {@link PackageManager} for documentation on most of the APIs |
| 58 | * here. |
Svetoslav | c6d1c34 | 2015-02-26 14:44:43 -0800 | [diff] [blame] | 59 | * |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 60 | * {@hide} |
| 61 | */ |
| 62 | interface IPackageManager { |
Jeff Sharkey | 8924e87 | 2015-11-30 12:52:10 -0700 | [diff] [blame] | 63 | void checkPackageStartable(String packageName, int userId); |
Christopher Tate | ba629da | 2013-11-13 17:42:28 -0800 | [diff] [blame] | 64 | boolean isPackageAvailable(String packageName, int userId); |
Amith Yamasani | 483f3b0 | 2012-03-13 16:08:00 -0700 | [diff] [blame] | 65 | PackageInfo getPackageInfo(String packageName, int flags, int userId); |
Jeff Sharkey | cd65448 | 2016-01-08 17:42:11 -0700 | [diff] [blame] | 66 | int getPackageUid(String packageName, int flags, int userId); |
| 67 | int[] getPackageGids(String packageName, int flags, int userId); |
Svetoslav | c6d1c34 | 2015-02-26 14:44:43 -0800 | [diff] [blame] | 68 | |
Dianne Hackborn | 4709693 | 2010-02-11 15:57:09 -0800 | [diff] [blame] | 69 | String[] currentToCanonicalPackageNames(in String[] names); |
| 70 | String[] canonicalToCurrentPackageNames(in String[] names); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 71 | |
| 72 | PermissionInfo getPermissionInfo(String name, int flags); |
Svetoslav | c6d1c34 | 2015-02-26 14:44:43 -0800 | [diff] [blame] | 73 | |
Jeff Sharkey | d589663 | 2016-03-04 16:16:00 -0700 | [diff] [blame] | 74 | ParceledListSlice queryPermissionsByGroup(String group, int flags); |
Svetoslav | c6d1c34 | 2015-02-26 14:44:43 -0800 | [diff] [blame] | 75 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 76 | PermissionGroupInfo getPermissionGroupInfo(String name, int flags); |
Svetoslav | c6d1c34 | 2015-02-26 14:44:43 -0800 | [diff] [blame] | 77 | |
Jeff Sharkey | d589663 | 2016-03-04 16:16:00 -0700 | [diff] [blame] | 78 | ParceledListSlice getAllPermissionGroups(int flags); |
Svetoslav | c6d1c34 | 2015-02-26 14:44:43 -0800 | [diff] [blame] | 79 | |
Amith Yamasani | 483f3b0 | 2012-03-13 16:08:00 -0700 | [diff] [blame] | 80 | ApplicationInfo getApplicationInfo(String packageName, int flags ,int userId); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 81 | |
Amith Yamasani | 483f3b0 | 2012-03-13 16:08:00 -0700 | [diff] [blame] | 82 | ActivityInfo getActivityInfo(in ComponentName className, int flags, int userId); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 83 | |
Dianne Hackborn | 91097de | 2014-04-04 18:02:06 -0700 | [diff] [blame] | 84 | boolean activitySupportsIntent(in ComponentName className, in Intent intent, |
| 85 | String resolvedType); |
| 86 | |
Amith Yamasani | 483f3b0 | 2012-03-13 16:08:00 -0700 | [diff] [blame] | 87 | ActivityInfo getReceiverInfo(in ComponentName className, int flags, int userId); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 88 | |
Amith Yamasani | 483f3b0 | 2012-03-13 16:08:00 -0700 | [diff] [blame] | 89 | ServiceInfo getServiceInfo(in ComponentName className, int flags, int userId); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 90 | |
Amith Yamasani | 483f3b0 | 2012-03-13 16:08:00 -0700 | [diff] [blame] | 91 | ProviderInfo getProviderInfo(in ComponentName className, int flags, int userId); |
Dianne Hackborn | 361199b | 2010-08-30 17:42:07 -0700 | [diff] [blame] | 92 | |
Svetoslav | c6d1c34 | 2015-02-26 14:44:43 -0800 | [diff] [blame] | 93 | int checkPermission(String permName, String pkgName, int userId); |
| 94 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 95 | int checkUidPermission(String permName, int uid); |
Svetoslav | c6d1c34 | 2015-02-26 14:44:43 -0800 | [diff] [blame] | 96 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 97 | boolean addPermission(in PermissionInfo info); |
Svetoslav | c6d1c34 | 2015-02-26 14:44:43 -0800 | [diff] [blame] | 98 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 99 | void removePermission(String name); |
Dianne Hackborn | e639da7 | 2012-02-21 15:11:13 -0800 | [diff] [blame] | 100 | |
Svet Ganov | 8c7f700 | 2015-05-07 10:48:44 -0700 | [diff] [blame] | 101 | void grantRuntimePermission(String packageName, String permissionName, int userId); |
Dianne Hackborn | e639da7 | 2012-02-21 15:11:13 -0800 | [diff] [blame] | 102 | |
Svet Ganov | 8c7f700 | 2015-05-07 10:48:44 -0700 | [diff] [blame] | 103 | void revokeRuntimePermission(String packageName, String permissionName, int userId); |
| 104 | |
Dianne Hackborn | ca8e6da | 2015-06-24 15:19:17 -0700 | [diff] [blame] | 105 | void resetRuntimePermissions(); |
| 106 | |
Svet Ganov | 8c7f700 | 2015-05-07 10:48:44 -0700 | [diff] [blame] | 107 | int getPermissionFlags(String permissionName, String packageName, int userId); |
| 108 | |
| 109 | void updatePermissionFlags(String permissionName, String packageName, int flagMask, |
| 110 | int flagValues, int userId); |
Dianne Hackborn | e639da7 | 2012-02-21 15:11:13 -0800 | [diff] [blame] | 111 | |
Amith Yamasani | 0bf8f7c | 2015-06-22 13:00:32 -0700 | [diff] [blame] | 112 | void updatePermissionFlagsForAllApps(int flagMask, int flagValues, int userId); |
| 113 | |
Svetoslav | 20770dd | 2015-05-29 15:43:04 -0700 | [diff] [blame] | 114 | boolean shouldShowRequestPermissionRationale(String permissionName, |
| 115 | String packageName, int userId); |
| 116 | |
Dianne Hackborn | 854060af | 2009-07-09 18:14:31 -0700 | [diff] [blame] | 117 | boolean isProtectedBroadcast(String actionName); |
Svetoslav | c6d1c34 | 2015-02-26 14:44:43 -0800 | [diff] [blame] | 118 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 119 | int checkSignatures(String pkg1, String pkg2); |
Svetoslav | c6d1c34 | 2015-02-26 14:44:43 -0800 | [diff] [blame] | 120 | |
Dianne Hackborn | 766cbfe | 2009-08-12 18:33:39 -0700 | [diff] [blame] | 121 | int checkUidSignatures(int uid1, int uid2); |
Svetoslav | c6d1c34 | 2015-02-26 14:44:43 -0800 | [diff] [blame] | 122 | |
David Brazdil | 990fb6b | 2016-03-01 10:02:27 +0000 | [diff] [blame] | 123 | List<String> getAllPackages(); |
| 124 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 125 | String[] getPackagesForUid(int uid); |
Svetoslav | c6d1c34 | 2015-02-26 14:44:43 -0800 | [diff] [blame] | 126 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 127 | String getNameForUid(int uid); |
Svetoslav | c6d1c34 | 2015-02-26 14:44:43 -0800 | [diff] [blame] | 128 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 129 | int getUidForSharedUser(String sharedUserName); |
Ben Gruver | dd72c9e | 2013-08-06 12:34:17 -0700 | [diff] [blame] | 130 | |
| 131 | int getFlagsForUid(int uid); |
| 132 | |
Alex Klyubin | b9f8a52 | 2015-02-03 11:12:59 -0800 | [diff] [blame] | 133 | int getPrivateFlagsForUid(int uid); |
| 134 | |
Dianne Hackborn | 2d7576b | 2014-10-03 16:26:04 -0700 | [diff] [blame] | 135 | boolean isUidPrivileged(int uid); |
| 136 | |
Dianne Hackborn | 33f5ddd | 2014-07-21 15:35:45 -0700 | [diff] [blame] | 137 | String[] getAppOpPermissionPackages(String permissionName); |
| 138 | |
Amith Yamasani | 483f3b0 | 2012-03-13 16:08:00 -0700 | [diff] [blame] | 139 | ResolveInfo resolveIntent(in Intent intent, String resolvedType, int flags, int userId); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 140 | |
Nicolas Prevot | 8194899 | 2014-05-16 18:25:26 +0100 | [diff] [blame] | 141 | boolean canForwardTo(in Intent intent, String resolvedType, int sourceUserId, int targetUserId); |
Nicolas Prevot | 10fa67c | 2014-03-24 13:44:38 +0000 | [diff] [blame] | 142 | |
Jeff Sharkey | d589663 | 2016-03-04 16:16:00 -0700 | [diff] [blame] | 143 | ParceledListSlice queryIntentActivities(in Intent intent, |
Amith Yamasani | 483f3b0 | 2012-03-13 16:08:00 -0700 | [diff] [blame] | 144 | String resolvedType, int flags, int userId); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 145 | |
Jeff Sharkey | d589663 | 2016-03-04 16:16:00 -0700 | [diff] [blame] | 146 | ParceledListSlice queryIntentActivityOptions( |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 147 | in ComponentName caller, in Intent[] specifics, |
| 148 | in String[] specificTypes, in Intent intent, |
Amith Yamasani | 483f3b0 | 2012-03-13 16:08:00 -0700 | [diff] [blame] | 149 | String resolvedType, int flags, int userId); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 150 | |
Jeff Sharkey | d589663 | 2016-03-04 16:16:00 -0700 | [diff] [blame] | 151 | ParceledListSlice queryIntentReceivers(in Intent intent, |
Amith Yamasani | 483f3b0 | 2012-03-13 16:08:00 -0700 | [diff] [blame] | 152 | String resolvedType, int flags, int userId); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 153 | |
| 154 | ResolveInfo resolveService(in Intent intent, |
Amith Yamasani | 483f3b0 | 2012-03-13 16:08:00 -0700 | [diff] [blame] | 155 | String resolvedType, int flags, int userId); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 156 | |
Jeff Sharkey | d589663 | 2016-03-04 16:16:00 -0700 | [diff] [blame] | 157 | ParceledListSlice queryIntentServices(in Intent intent, |
Amith Yamasani | 483f3b0 | 2012-03-13 16:08:00 -0700 | [diff] [blame] | 158 | String resolvedType, int flags, int userId); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 159 | |
Jeff Sharkey | d589663 | 2016-03-04 16:16:00 -0700 | [diff] [blame] | 160 | ParceledListSlice queryIntentContentProviders(in Intent intent, |
Jeff Sharkey | 85f5f81 | 2013-10-07 10:16:12 -0700 | [diff] [blame] | 161 | String resolvedType, int flags, int userId); |
| 162 | |
Kenny Root | 0e2c0f3 | 2011-04-15 17:50:10 -0700 | [diff] [blame] | 163 | /** |
| 164 | * This implements getInstalledPackages via a "last returned row" |
| 165 | * mechanism that is not exposed in the API. This is to get around the IPC |
| 166 | * limit that kicks in when flags are included that bloat up the data |
| 167 | * returned. |
| 168 | */ |
Dianne Hackborn | d8e1dbb | 2013-01-17 17:47:37 -0800 | [diff] [blame] | 169 | ParceledListSlice getInstalledPackages(int flags, in int userId); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 170 | |
Kenny Root | 0e2c0f3 | 2011-04-15 17:50:10 -0700 | [diff] [blame] | 171 | /** |
Dianne Hackborn | e799175 | 2013-01-16 17:56:46 -0800 | [diff] [blame] | 172 | * This implements getPackagesHoldingPermissions via a "last returned row" |
| 173 | * mechanism that is not exposed in the API. This is to get around the IPC |
| 174 | * limit that kicks in when flags are included that bloat up the data |
| 175 | * returned. |
| 176 | */ |
| 177 | ParceledListSlice getPackagesHoldingPermissions(in String[] permissions, |
Dianne Hackborn | d8e1dbb | 2013-01-17 17:47:37 -0800 | [diff] [blame] | 178 | int flags, int userId); |
Dianne Hackborn | e799175 | 2013-01-16 17:56:46 -0800 | [diff] [blame] | 179 | |
| 180 | /** |
Kenny Root | 0e2c0f3 | 2011-04-15 17:50:10 -0700 | [diff] [blame] | 181 | * This implements getInstalledApplications via a "last returned row" |
| 182 | * mechanism that is not exposed in the API. This is to get around the IPC |
| 183 | * limit that kicks in when flags are included that bloat up the data |
| 184 | * returned. |
| 185 | */ |
Dianne Hackborn | d8e1dbb | 2013-01-17 17:47:37 -0800 | [diff] [blame] | 186 | ParceledListSlice getInstalledApplications(int flags, int userId); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 187 | |
| 188 | /** |
| 189 | * Retrieve all applications that are marked as persistent. |
Svetoslav | c6d1c34 | 2015-02-26 14:44:43 -0800 | [diff] [blame] | 190 | * |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 191 | * @return A List<applicationInfo> containing one entry for each persistent |
| 192 | * application. |
| 193 | */ |
Jeff Sharkey | d589663 | 2016-03-04 16:16:00 -0700 | [diff] [blame] | 194 | ParceledListSlice getPersistentApplications(int flags); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 195 | |
Amith Yamasani | 483f3b0 | 2012-03-13 16:08:00 -0700 | [diff] [blame] | 196 | ProviderInfo resolveContentProvider(String name, int flags, int userId); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 197 | |
| 198 | /** |
| 199 | * Retrieve sync information for all content providers. |
Svetoslav | c6d1c34 | 2015-02-26 14:44:43 -0800 | [diff] [blame] | 200 | * |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 201 | * @param outNames Filled in with a list of the root names of the content |
| 202 | * providers that can sync. |
| 203 | * @param outInfo Filled in with a list of the ProviderInfo for each |
| 204 | * name in 'outNames'. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 205 | */ |
| 206 | void querySyncProviders(inout List<String> outNames, |
| 207 | inout List<ProviderInfo> outInfo); |
| 208 | |
Dianne Hackborn | 28ec27c | 2015-08-03 15:28:28 -0700 | [diff] [blame] | 209 | ParceledListSlice queryContentProviders( |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 210 | String processName, int uid, int flags); |
| 211 | |
| 212 | InstrumentationInfo getInstrumentationInfo( |
| 213 | in ComponentName className, int flags); |
| 214 | |
Jeff Sharkey | d589663 | 2016-03-04 16:16:00 -0700 | [diff] [blame] | 215 | ParceledListSlice queryInstrumentation( |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 216 | String targetPackage, int flags); |
| 217 | |
Todd Kennedy | a679323 | 2016-02-24 22:46:00 +0000 | [diff] [blame] | 218 | /** @deprecated Use PackageInstaller instead */ |
Amith Yamasani | dda003f | 2014-08-28 18:06:51 -0700 | [diff] [blame] | 219 | void installPackageAsUser(in String originPath, |
| 220 | in IPackageInstallObserver2 observer, |
| 221 | int flags, |
| 222 | in String installerPackageName, |
Amith Yamasani | dda003f | 2014-08-28 18:06:51 -0700 | [diff] [blame] | 223 | int userId); |
| 224 | |
Christopher Tate | 1bb6906 | 2010-02-19 17:02:12 -0800 | [diff] [blame] | 225 | void finishPackageInstall(int token); |
| 226 | |
Dianne Hackborn | 880119b | 2010-11-18 22:26:40 -0800 | [diff] [blame] | 227 | void setInstallerPackageName(in String targetPackage, in String installerPackageName); |
| 228 | |
Jeff Sharkey | fbd0e9f | 2014-08-06 16:34:34 -0700 | [diff] [blame] | 229 | /** @deprecated rawr, don't call AIDL methods directly! */ |
| 230 | void deletePackageAsUser(in String packageName, IPackageDeleteObserver observer, |
| 231 | int userId, int flags); |
| 232 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 233 | /** |
Amith Yamasani | 67df64b | 2012-12-14 12:09:36 -0800 | [diff] [blame] | 234 | * Delete a package for a specific user. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 235 | * |
| 236 | * @param packageName The fully qualified name of the package to delete. |
| 237 | * @param observer a callback to use to notify when the package deletion in finished. |
Amith Yamasani | 67df64b | 2012-12-14 12:09:36 -0800 | [diff] [blame] | 238 | * @param userId the id of the user for whom to delete the package |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 239 | * @param flags - possible values: {@link #DONT_DELETE_DATA} |
| 240 | */ |
Jeff Sharkey | fbd0e9f | 2014-08-06 16:34:34 -0700 | [diff] [blame] | 241 | void deletePackage(in String packageName, IPackageDeleteObserver2 observer, int userId, int flags); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 242 | |
Jacek Surazski | 65e1317 | 2009-04-28 15:26:38 +0200 | [diff] [blame] | 243 | String getInstallerPackageName(in String packageName); |
| 244 | |
Svet Ganov | 9c8b8ab | 2015-07-23 09:32:26 -0700 | [diff] [blame] | 245 | void resetApplicationPreferences(int userId); |
Dianne Hackborn | 8a2ed1d | 2013-01-29 15:18:29 -0800 | [diff] [blame] | 246 | |
Amith Yamasani | e9ecc8b | 2013-08-22 11:16:27 -0700 | [diff] [blame] | 247 | ResolveInfo getLastChosenActivity(in Intent intent, |
| 248 | String resolvedType, int flags); |
| 249 | |
| 250 | void setLastChosenActivity(in Intent intent, String resolvedType, int flags, |
| 251 | in IntentFilter filter, int match, in ComponentName activity); |
| 252 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 253 | void addPreferredActivity(in IntentFilter filter, int match, |
Amith Yamasani | a3f133a | 2012-08-09 17:11:28 -0700 | [diff] [blame] | 254 | in ComponentName[] set, in ComponentName activity, int userId); |
Satish Sampath | 8dbe612 | 2009-06-02 23:35:54 +0100 | [diff] [blame] | 255 | |
| 256 | void replacePreferredActivity(in IntentFilter filter, int match, |
Amith Yamasani | 41c1ded | 2014-08-05 11:15:05 -0700 | [diff] [blame] | 257 | in ComponentName[] set, in ComponentName activity, int userId); |
Satish Sampath | 8dbe612 | 2009-06-02 23:35:54 +0100 | [diff] [blame] | 258 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 259 | void clearPackagePreferredActivities(String packageName); |
Satish Sampath | 8dbe612 | 2009-06-02 23:35:54 +0100 | [diff] [blame] | 260 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 261 | int getPreferredActivities(out List<IntentFilter> outFilters, |
| 262 | out List<ComponentName> outActivities, String packageName); |
Amith Yamasani | e9ecc8b | 2013-08-22 11:16:27 -0700 | [diff] [blame] | 263 | |
Sander Alewijnse | f475ca3 | 2014-02-17 15:13:58 +0000 | [diff] [blame] | 264 | void addPersistentPreferredActivity(in IntentFilter filter, in ComponentName activity, int userId); |
| 265 | |
| 266 | void clearPackagePersistentPreferredActivities(String packageName, int userId); |
| 267 | |
Nicolas Prevot | 3f7777f | 2014-07-24 15:58:39 +0100 | [diff] [blame] | 268 | void addCrossProfileIntentFilter(in IntentFilter intentFilter, String ownerPackage, |
Nicolas Prevot | 4b8d582 | 2015-03-05 15:20:49 +0000 | [diff] [blame] | 269 | int sourceUserId, int targetUserId, int flags); |
Nicolas Prevot | 10fa67c | 2014-03-24 13:44:38 +0000 | [diff] [blame] | 270 | |
Nicolas Prevot | 4b8d582 | 2015-03-05 15:20:49 +0000 | [diff] [blame] | 271 | void clearCrossProfileIntentFilters(int sourceUserId, String ownerPackage); |
Nicolas Prevot | 10fa67c | 2014-03-24 13:44:38 +0000 | [diff] [blame] | 272 | |
Andrei Stingaceanu | eb84b18 | 2016-01-26 18:39:55 +0000 | [diff] [blame] | 273 | String[] setPackagesSuspendedAsUser(in String[] packageNames, boolean suspended, int userId); |
Andrei Stingaceanu | 355b232 | 2016-02-12 16:43:51 +0000 | [diff] [blame] | 274 | boolean isPackageSuspendedForUser(String packageName, int userId); |
Andrei Stingaceanu | 1e28391 | 2015-11-26 15:26:28 +0000 | [diff] [blame] | 275 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 276 | /** |
Christopher Tate | e012a23 | 2015-04-01 17:18:50 -0700 | [diff] [blame] | 277 | * Backup/restore support - only the system uid may use these. |
| 278 | */ |
| 279 | byte[] getPreferredActivityBackup(int userId); |
| 280 | void restorePreferredActivities(in byte[] backup, int userId); |
Christopher Tate | 6038d15 | 2015-06-17 13:07:46 -0700 | [diff] [blame] | 281 | byte[] getDefaultAppsBackup(int userId); |
| 282 | void restoreDefaultApps(in byte[] backup, int userId); |
| 283 | byte[] getIntentFilterVerificationBackup(int userId); |
| 284 | void restoreIntentFilterVerification(in byte[] backup, int userId); |
Christopher Tate | e9fd1fa | 2015-09-15 16:43:07 -0700 | [diff] [blame] | 285 | byte[] getPermissionGrantBackup(int userId); |
| 286 | void restorePermissionGrants(in byte[] backup, int userId); |
Christopher Tate | e012a23 | 2015-04-01 17:18:50 -0700 | [diff] [blame] | 287 | |
| 288 | /** |
Christopher Tate | a2a0850d | 2013-09-05 16:38:58 -0700 | [diff] [blame] | 289 | * Report the set of 'Home' activity candidates, plus (if any) which of them |
| 290 | * is the current "always use this one" setting. |
| 291 | */ |
| 292 | ComponentName getHomeActivities(out List<ResolveInfo> outHomeCandidates); |
| 293 | |
Makoto Onuki | 4828a59 | 2016-03-15 18:06:57 -0700 | [diff] [blame] | 294 | void setHomeActivity(in ComponentName className, int userId); |
| 295 | |
Christopher Tate | a2a0850d | 2013-09-05 16:38:58 -0700 | [diff] [blame] | 296 | /** |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 297 | * As per {@link android.content.pm.PackageManager#setComponentEnabledSetting}. |
| 298 | */ |
| 299 | void setComponentEnabledSetting(in ComponentName componentName, |
Amith Yamasani | 483f3b0 | 2012-03-13 16:08:00 -0700 | [diff] [blame] | 300 | in int newState, in int flags, int userId); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 301 | |
| 302 | /** |
| 303 | * As per {@link android.content.pm.PackageManager#getComponentEnabledSetting}. |
| 304 | */ |
Amith Yamasani | 483f3b0 | 2012-03-13 16:08:00 -0700 | [diff] [blame] | 305 | int getComponentEnabledSetting(in ComponentName componentName, int userId); |
Jeff Davidson | 2a88031 | 2015-06-22 16:54:34 -0700 | [diff] [blame] | 306 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 307 | /** |
| 308 | * As per {@link android.content.pm.PackageManager#setApplicationEnabledSetting}. |
| 309 | */ |
Dianne Hackborn | 3fa3c28a | 2013-03-26 16:15:41 -0700 | [diff] [blame] | 310 | void setApplicationEnabledSetting(in String packageName, in int newState, int flags, |
| 311 | int userId, String callingPackage); |
Jeff Davidson | 2a88031 | 2015-06-22 16:54:34 -0700 | [diff] [blame] | 312 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 313 | /** |
| 314 | * As per {@link android.content.pm.PackageManager#getApplicationEnabledSetting}. |
| 315 | */ |
Amith Yamasani | 483f3b0 | 2012-03-13 16:08:00 -0700 | [diff] [blame] | 316 | int getApplicationEnabledSetting(in String packageName, int userId); |
Jeff Davidson | 2a88031 | 2015-06-22 16:54:34 -0700 | [diff] [blame] | 317 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 318 | /** |
Michal Karpinski | b52a461 | 2016-03-21 13:39:42 +0000 | [diff] [blame] | 319 | * Logs process start information (including APK hash) to the security log. |
| 320 | */ |
| 321 | void logAppProcessStartIfNeeded(String processName, int uid, String seinfo, String apkFile, |
| 322 | int pid); |
| 323 | |
| 324 | /** |
Sudheer Shanka | bbb3ff2 | 2015-07-09 15:39:23 +0100 | [diff] [blame] | 325 | * As per {@link android.content.pm.PackageManager#flushPackageRestrictionsAsUser}. |
| 326 | */ |
| 327 | void flushPackageRestrictionsAsUser(in int userId); |
| 328 | |
| 329 | /** |
Dianne Hackborn | e7f9721 | 2011-02-24 14:40:20 -0800 | [diff] [blame] | 330 | * Set whether the given package should be considered stopped, making |
| 331 | * it not visible to implicit intents that filter out stopped packages. |
| 332 | */ |
Amith Yamasani | 483f3b0 | 2012-03-13 16:08:00 -0700 | [diff] [blame] | 333 | void setPackageStoppedState(String packageName, boolean stopped, int userId); |
Dianne Hackborn | e7f9721 | 2011-02-24 14:40:20 -0800 | [diff] [blame] | 334 | |
| 335 | /** |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 336 | * Free storage by deleting LRU sorted list of cache files across |
| 337 | * all applications. If the currently available free storage |
| 338 | * on the device is greater than or equal to the requested |
| 339 | * free storage, no cache files are cleared. If the currently |
| 340 | * available storage on the device is less than the requested |
| 341 | * free storage, some or all of the cache files across |
| 342 | * all applications are deleted (based on last accessed time) |
| 343 | * to increase the free storage space on the device to |
| 344 | * the requested value. There is no guarantee that clearing all |
| 345 | * the cache files from all applications will clear up |
| 346 | * enough storage to achieve the desired value. |
| 347 | * @param freeStorageSize The number of bytes of storage to be |
| 348 | * freed by the system. Say if freeStorageSize is XX, |
| 349 | * and the current free storage is YY, |
| 350 | * if XX is less than YY, just return. if not free XX-YY number |
| 351 | * of bytes if possible. |
| 352 | * @param observer call back used to notify when |
| 353 | * the operation is completed |
| 354 | */ |
Jeff Sharkey | 529f91f | 2015-04-18 20:23:13 -0700 | [diff] [blame] | 355 | void freeStorageAndNotify(in String volumeUuid, in long freeStorageSize, |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 356 | IPackageDataObserver observer); |
| 357 | |
| 358 | /** |
| 359 | * Free storage by deleting LRU sorted list of cache files across |
| 360 | * all applications. If the currently available free storage |
| 361 | * on the device is greater than or equal to the requested |
| 362 | * free storage, no cache files are cleared. If the currently |
| 363 | * available storage on the device is less than the requested |
| 364 | * free storage, some or all of the cache files across |
| 365 | * all applications are deleted (based on last accessed time) |
| 366 | * to increase the free storage space on the device to |
| 367 | * the requested value. There is no guarantee that clearing all |
| 368 | * the cache files from all applications will clear up |
| 369 | * enough storage to achieve the desired value. |
| 370 | * @param freeStorageSize The number of bytes of storage to be |
| 371 | * freed by the system. Say if freeStorageSize is XX, |
| 372 | * and the current free storage is YY, |
| 373 | * if XX is less than YY, just return. if not free XX-YY number |
| 374 | * of bytes if possible. |
Suchi Amalapurapu | 1ccac75 | 2009-06-12 10:09:58 -0700 | [diff] [blame] | 375 | * @param pi IntentSender call back used to |
| 376 | * notify when the operation is completed.May be null |
| 377 | * to indicate that no call back is desired. |
| 378 | */ |
Jeff Sharkey | 529f91f | 2015-04-18 20:23:13 -0700 | [diff] [blame] | 379 | void freeStorage(in String volumeUuid, in long freeStorageSize, |
Suchi Amalapurapu | 1ccac75 | 2009-06-12 10:09:58 -0700 | [diff] [blame] | 380 | in IntentSender pi); |
Jeff Davidson | 2a88031 | 2015-06-22 16:54:34 -0700 | [diff] [blame] | 381 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 382 | /** |
| 383 | * Delete all the cache files in an applications cache directory |
| 384 | * @param packageName The package name of the application whose cache |
| 385 | * files need to be deleted |
| 386 | * @param observer a callback used to notify when the deletion is finished. |
| 387 | */ |
| 388 | void deleteApplicationCacheFiles(in String packageName, IPackageDataObserver observer); |
Jeff Davidson | 2a88031 | 2015-06-22 16:54:34 -0700 | [diff] [blame] | 389 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 390 | /** |
| 391 | * Clear the user data directory of an application. |
| 392 | * @param packageName The package name of the application whose cache |
| 393 | * files need to be deleted |
| 394 | * @param observer a callback used to notify when the operation is completed. |
| 395 | */ |
Amith Yamasani | 483f3b0 | 2012-03-13 16:08:00 -0700 | [diff] [blame] | 396 | void clearApplicationUserData(in String packageName, IPackageDataObserver observer, int userId); |
Jeff Davidson | 2a88031 | 2015-06-22 16:54:34 -0700 | [diff] [blame] | 397 | |
David Brazdil | 9aa6db0 | 2016-03-08 12:57:12 +0000 | [diff] [blame] | 398 | /** |
| 399 | * Clear the profile data of an application. |
| 400 | * @param packageName The package name of the application whose profile data |
| 401 | * need to be deleted |
| 402 | */ |
| 403 | void clearApplicationProfileData(in String packageName); |
| 404 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 405 | /** |
| 406 | * Get package statistics including the code, data and cache size for |
| 407 | * an already installed package |
| 408 | * @param packageName The package name of the application |
Dianne Hackborn | 0c38049 | 2012-08-20 17:23:30 -0700 | [diff] [blame] | 409 | * @param userHandle Which user the size should be retrieved for |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 410 | * @param observer a callback to use to notify when the asynchronous |
| 411 | * retrieval of information is complete. |
| 412 | */ |
Dianne Hackborn | 0c38049 | 2012-08-20 17:23:30 -0700 | [diff] [blame] | 413 | void getPackageSizeInfo(in String packageName, int userHandle, IPackageStatsObserver observer); |
Jeff Davidson | 2a88031 | 2015-06-22 16:54:34 -0700 | [diff] [blame] | 414 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 415 | /** |
| 416 | * Get a list of shared libraries that are available on the |
| 417 | * system. |
| 418 | */ |
| 419 | String[] getSystemSharedLibraryNames(); |
| 420 | |
Dianne Hackborn | 4923734 | 2009-08-27 20:08:01 -0700 | [diff] [blame] | 421 | /** |
| 422 | * Get a list of features that are available on the |
| 423 | * system. |
| 424 | */ |
Jeff Sharkey | d589663 | 2016-03-04 16:16:00 -0700 | [diff] [blame] | 425 | ParceledListSlice getSystemAvailableFeatures(); |
Dianne Hackborn | 4923734 | 2009-08-27 20:08:01 -0700 | [diff] [blame] | 426 | |
Jeff Sharkey | 115d2c1 | 2016-02-15 17:25:57 -0700 | [diff] [blame] | 427 | boolean hasSystemFeature(String name, int version); |
Jeff Davidson | 2a88031 | 2015-06-22 16:54:34 -0700 | [diff] [blame] | 428 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 429 | void enterSafeMode(); |
| 430 | boolean isSafeMode(); |
| 431 | void systemReady(); |
| 432 | boolean hasSystemUidErrors(); |
Dianne Hackborn | 661cd52 | 2011-08-22 00:26:20 -0700 | [diff] [blame] | 433 | |
| 434 | /** |
Nicolas Geoffray | 27c0737 | 2015-11-05 16:54:09 +0000 | [diff] [blame] | 435 | * Ask the package manager to fstrim the disk if needed. |
Dianne Hackborn | 661cd52 | 2011-08-22 00:26:20 -0700 | [diff] [blame] | 436 | */ |
Nicolas Geoffray | 27c0737 | 2015-11-05 16:54:09 +0000 | [diff] [blame] | 437 | void performFstrimIfNeeded(); |
| 438 | |
| 439 | /** |
David Brazdil | f5c444f | 2016-03-30 11:45:52 +0100 | [diff] [blame^] | 440 | * Ask the package manager to update packages if needed. |
David Brazdil | a0e1043 | 2016-01-20 14:04:40 +0000 | [diff] [blame] | 441 | */ |
David Brazdil | f5c444f | 2016-03-30 11:45:52 +0100 | [diff] [blame^] | 442 | void updatePackagesIfNeeded(); |
David Brazdil | a0e1043 | 2016-01-20 14:04:40 +0000 | [diff] [blame] | 443 | |
| 444 | /** |
Nicolas Geoffray | 27c0737 | 2015-11-05 16:54:09 +0000 | [diff] [blame] | 445 | * Notify the package manager that a package is going to be used. |
| 446 | */ |
| 447 | void notifyPackageUse(String packageName); |
Dianne Hackborn | 661cd52 | 2011-08-22 00:26:20 -0700 | [diff] [blame] | 448 | |
Dianne Hackborn | 5c1e00b | 2009-06-18 17:10:57 -0700 | [diff] [blame] | 449 | /** |
| 450 | * Ask the package manager to perform dex-opt (if needed) on the given |
Narayan Kamath | 2053168 | 2014-07-14 13:18:43 +0100 | [diff] [blame] | 451 | * package and for the given instruction set if it already hasn't done |
| 452 | * so. |
| 453 | * |
| 454 | * If the supplied instructionSet is null, the package manager will use |
| 455 | * the packages default instruction set. |
| 456 | * |
| 457 | * In most cases, apps are dexopted in advance and this function will |
| 458 | * be a no-op. |
Dianne Hackborn | 5c1e00b | 2009-06-18 17:10:57 -0700 | [diff] [blame] | 459 | */ |
Narayan Kamath | 2053168 | 2014-07-14 13:18:43 +0100 | [diff] [blame] | 460 | boolean performDexOptIfNeeded(String packageName, String instructionSet); |
Suchi Amalapurapu | af8e9f4 | 2010-01-12 10:17:28 -0800 | [diff] [blame] | 461 | |
Andreas Gampe | bdd30d8 | 2016-03-20 11:32:11 -0700 | [diff] [blame] | 462 | /** |
| 463 | * Ask the package manager to perform a dex-opt for the given reason. The package |
| 464 | * manager will map the reason to a compiler filter according to the current system |
| 465 | * configuration. |
| 466 | */ |
| 467 | boolean performDexOpt(String packageName, String instructionSet, boolean checkProfiles, |
| 468 | int compileReason, boolean force); |
| 469 | /** |
| 470 | * Ask the package manager to perform a dex-opt with the given compiler filter. |
| 471 | * |
| 472 | * Note: exposed only for the shell command to allow moving packages explicitly to a |
| 473 | * definite state. |
| 474 | */ |
| 475 | boolean performDexOptMode(String packageName, String instructionSet, boolean checkProfiles, |
| 476 | String targetCompilerFilter, boolean force); |
David Brazdil | 493411a | 2016-02-01 13:48:46 +0000 | [diff] [blame] | 477 | |
Jeff Sharkey | 20e0c50 | 2014-07-25 14:09:37 -0700 | [diff] [blame] | 478 | void forceDexOpt(String packageName); |
| 479 | |
Suchi Amalapurapu | af8e9f4 | 2010-01-12 10:17:28 -0800 | [diff] [blame] | 480 | /** |
| 481 | * Update status of external media on the package manager to scan and |
| 482 | * install packages installed on the external media. Like say the |
| 483 | * MountService uses this to call into the package manager to update |
| 484 | * status of sdcard. |
| 485 | */ |
Suchi Amalapurapu | e99bb5f | 2010-03-19 14:36:49 -0700 | [diff] [blame] | 486 | void updateExternalMediaStatus(boolean mounted, boolean reportStatus); |
Suchi Amalapurapu | af8e9f4 | 2010-01-12 10:17:28 -0800 | [diff] [blame] | 487 | |
Dianne Hackborn | 7767eac | 2012-08-23 18:25:40 -0700 | [diff] [blame] | 488 | PackageCleanItem nextPackageToClean(in PackageCleanItem lastPackage); |
Suchi Amalapurapu | 8946dd3 | 2010-02-19 09:19:34 -0800 | [diff] [blame] | 489 | |
Jeff Sharkey | 620b32b | 2015-04-23 19:36:02 -0700 | [diff] [blame] | 490 | int getMoveStatus(int moveId); |
| 491 | |
| 492 | void registerMoveCallback(in IPackageMoveObserver callback); |
| 493 | void unregisterMoveCallback(in IPackageMoveObserver callback); |
| 494 | |
| 495 | int movePackage(in String packageName, in String volumeUuid); |
| 496 | int movePrimaryStorage(in String volumeUuid); |
Jeff Sharkey | b2b9ab8 | 2015-04-05 21:10:42 -0700 | [diff] [blame] | 497 | |
Dianne Hackborn | d7c0968 | 2010-03-30 10:42:20 -0700 | [diff] [blame] | 498 | boolean addPermissionAsync(in PermissionInfo info); |
Suchi Amalapurapu | 40e4725 | 2010-04-07 16:15:50 -0700 | [diff] [blame] | 499 | |
| 500 | boolean setInstallLocation(int loc); |
| 501 | int getInstallLocation(); |
Amith Yamasani | 0b28549 | 2011-04-14 17:35:23 -0700 | [diff] [blame] | 502 | |
Amith Yamasani | 67df64b | 2012-12-14 12:09:36 -0800 | [diff] [blame] | 503 | int installExistingPackageAsUser(String packageName, int userId); |
Dianne Hackborn | 7767eac | 2012-08-23 18:25:40 -0700 | [diff] [blame] | 504 | |
Kenny Root | 3a9b5fb | 2011-09-20 14:15:38 -0700 | [diff] [blame] | 505 | void verifyPendingInstall(int id, int verificationCode); |
rich cannings | d9ef3e5 | 2012-08-22 14:28:05 -0700 | [diff] [blame] | 506 | void extendVerificationTimeout(int id, int verificationCodeAtTimeout, long millisecondsToDelay); |
Kenny Root | 0aaa0d9 | 2011-09-12 16:42:55 -0700 | [diff] [blame] | 507 | |
Fabrice Di Meglio | d3d8a32 | 2015-04-01 15:58:47 -0700 | [diff] [blame] | 508 | void verifyIntentFilter(int id, int verificationCode, in List<String> failedDomains); |
Fabrice Di Meglio | 1c1b471 | 2014-11-19 17:12:32 -0800 | [diff] [blame] | 509 | int getIntentVerificationStatus(String packageName, int userId); |
| 510 | boolean updateIntentVerificationStatus(String packageName, int status, int userId); |
Jeff Sharkey | d589663 | 2016-03-04 16:16:00 -0700 | [diff] [blame] | 511 | ParceledListSlice getIntentFilterVerifications(String packageName); |
| 512 | ParceledListSlice getAllIntentFilters(String packageName); |
Fabrice Di Meglio | 1c1b471 | 2014-11-19 17:12:32 -0800 | [diff] [blame] | 513 | |
Fabrice Di Meglio | 6227172 | 2015-04-10 17:24:02 -0700 | [diff] [blame] | 514 | boolean setDefaultBrowserPackageName(String packageName, int userId); |
| 515 | String getDefaultBrowserPackageName(int userId); |
| 516 | |
Kenny Root | 0aaa0d9 | 2011-09-12 16:42:55 -0700 | [diff] [blame] | 517 | VerifierDeviceIdentity getVerifierDeviceIdentity(); |
Dianne Hackborn | 58f42a5 | 2011-10-10 13:46:34 -0700 | [diff] [blame] | 518 | |
| 519 | boolean isFirstBoot(); |
Dianne Hackborn | 13579ed | 2012-11-28 18:05:36 -0800 | [diff] [blame] | 520 | boolean isOnlyCoreApps(); |
Jeff Hao | 9f60c08 | 2014-10-28 18:51:07 -0700 | [diff] [blame] | 521 | boolean isUpgrade(); |
Amith Yamasani | 742a671 | 2011-05-04 14:49:28 -0700 | [diff] [blame] | 522 | |
Jeff Sharkey | 5d32e77 | 2012-04-12 15:59:23 -0700 | [diff] [blame] | 523 | void setPermissionEnforced(String permission, boolean enforced); |
| 524 | boolean isPermissionEnforced(String permission); |
Jeff Sharkey | f6f7f1d | 2012-06-12 17:12:08 -0700 | [diff] [blame] | 525 | |
| 526 | /** Reflects current DeviceStorageMonitorService state */ |
| 527 | boolean isStorageLow(); |
Amith Yamasani | 655d0e2 | 2013-06-12 14:19:10 -0700 | [diff] [blame] | 528 | |
Amith Yamasani | e5bcff6 | 2014-07-19 15:44:09 -0700 | [diff] [blame] | 529 | boolean setApplicationHiddenSettingAsUser(String packageName, boolean hidden, int userId); |
| 530 | boolean getApplicationHiddenSettingAsUser(String packageName, int userId); |
Jeff Sharkey | 3a44f3f | 2014-04-28 17:36:31 -0700 | [diff] [blame] | 531 | |
| 532 | IPackageInstaller getPackageInstaller(); |
Kenny Guy | c13053b | 2014-05-29 14:17:17 +0100 | [diff] [blame] | 533 | |
| 534 | boolean setBlockUninstallForUser(String packageName, boolean blockUninstall, int userId); |
| 535 | boolean getBlockUninstallForUser(String packageName, int userId); |
dcashman | 9d2f441 | 2014-06-09 09:27:54 -0700 | [diff] [blame] | 536 | |
dcashman | c6f2249 | 2014-08-14 09:54:51 -0700 | [diff] [blame] | 537 | KeySet getKeySetByAlias(String packageName, String alias); |
| 538 | KeySet getSigningKeySet(String packageName); |
| 539 | boolean isPackageSignedByKeySet(String packageName, in KeySet ks); |
| 540 | boolean isPackageSignedByKeySetExactly(String packageName, in KeySet ks); |
Svetoslav | f7c06eb | 2015-06-10 18:43:22 -0700 | [diff] [blame] | 541 | |
| 542 | void addOnPermissionsChangeListener(in IOnPermissionsChangeListener listener); |
| 543 | void removeOnPermissionsChangeListener(in IOnPermissionsChangeListener listener); |
Svetoslav | cdfd230 | 2015-06-25 19:07:31 -0700 | [diff] [blame] | 544 | void grantDefaultPermissionsToEnabledCarrierApps(in String[] packageNames, int userId); |
Svet Ganov | ad3b297 | 2015-07-07 22:49:17 -0700 | [diff] [blame] | 545 | |
| 546 | boolean isPermissionRevokedByPolicy(String permission, String packageName, int userId); |
Svet Ganov | f1b7f20 | 2015-07-29 08:33:42 -0700 | [diff] [blame] | 547 | |
| 548 | String getPermissionControllerPackageName(); |
Svet Ganov | 2acf063 | 2015-11-24 19:10:59 -0800 | [diff] [blame] | 549 | |
| 550 | ParceledListSlice getEphemeralApplications(int userId); |
| 551 | byte[] getEphemeralApplicationCookie(String packageName, int userId); |
| 552 | boolean setEphemeralApplicationCookie(String packageName, in byte[] cookie, int userId); |
| 553 | Bitmap getEphemeralApplicationIcon(String packageName, int userId); |
| 554 | boolean isEphemeralApplication(String packageName, int userId); |
Fyodor Kupolov | bdbc969 | 2015-12-14 13:11:13 -0800 | [diff] [blame] | 555 | |
| 556 | boolean setRequiredForSystemUser(String packageName, boolean systemUserApp); |
Svet Ganov | d7b1f411 | 2016-02-09 18:49:23 -0800 | [diff] [blame] | 557 | |
| 558 | String getServicesSystemSharedLibraryPackageName(); |
Makoto Onuki | f34db0a | 2016-02-17 11:17:15 -0800 | [diff] [blame] | 559 | |
| 560 | boolean isPackageDeviceAdminOnAnyUser(String packageName); |
Todd Kennedy | 39bfee5 | 2016-02-24 10:28:21 -0800 | [diff] [blame] | 561 | |
| 562 | List<String> getPreviousCodePaths(in String packageName); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 563 | } |