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