The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2008 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | package android.test.mock; |
| 18 | |
Christopher Tate | f1977b4 | 2014-03-24 16:25:51 -0700 | [diff] [blame] | 19 | import android.app.PackageInstallObserver; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 20 | import android.content.ComponentName; |
| 21 | import android.content.Intent; |
| 22 | import android.content.IntentFilter; |
Suchi Amalapurapu | 1ccac75 | 2009-06-12 10:09:58 -0700 | [diff] [blame] | 23 | import android.content.IntentSender; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 24 | import android.content.pm.ActivityInfo; |
| 25 | import android.content.pm.ApplicationInfo; |
Anonymous Coward | ceb1b0b | 2012-04-24 10:35:16 -0700 | [diff] [blame] | 26 | import android.content.pm.ContainerEncryptionParams; |
Dianne Hackborn | 4923734 | 2009-08-27 20:08:01 -0700 | [diff] [blame] | 27 | import android.content.pm.FeatureInfo; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 28 | import android.content.pm.IPackageDataObserver; |
Amith Yamasani | 4b2e934 | 2011-03-31 12:38:53 -0700 | [diff] [blame] | 29 | import android.content.pm.IPackageDeleteObserver; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 30 | import android.content.pm.IPackageInstallObserver; |
Suchi Amalapurapu | 8946dd3 | 2010-02-19 09:19:34 -0800 | [diff] [blame] | 31 | import android.content.pm.IPackageMoveObserver; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 32 | import android.content.pm.IPackageStatsObserver; |
| 33 | import android.content.pm.InstrumentationInfo; |
dcashman | 9d2f441 | 2014-06-09 09:27:54 -0700 | [diff] [blame] | 34 | import android.content.pm.KeySet; |
Anonymous Coward | ceb1b0b | 2012-04-24 10:35:16 -0700 | [diff] [blame] | 35 | import android.content.pm.ManifestDigest; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 36 | import android.content.pm.PackageInfo; |
Jeff Sharkey | 3a44f3f | 2014-04-28 17:36:31 -0700 | [diff] [blame] | 37 | import android.content.pm.PackageInstaller; |
Nicolas Prevot | 7f7b0c7 | 2014-06-23 15:59:38 +0100 | [diff] [blame] | 38 | import android.content.pm.PackageItemInfo; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 39 | import android.content.pm.PackageManager; |
| 40 | import android.content.pm.PermissionGroupInfo; |
| 41 | import android.content.pm.PermissionInfo; |
| 42 | import android.content.pm.ProviderInfo; |
| 43 | import android.content.pm.ResolveInfo; |
| 44 | import android.content.pm.ServiceInfo; |
rich cannings | 706e8ba | 2012-08-20 13:20:14 -0700 | [diff] [blame] | 45 | import android.content.pm.VerificationParams; |
Kenny Root | 0aaa0d9 | 2011-09-12 16:42:55 -0700 | [diff] [blame] | 46 | import android.content.pm.VerifierDeviceIdentity; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 47 | import android.content.res.Resources; |
| 48 | import android.content.res.XmlResourceParser; |
Svetoslav | c7d62f0 | 2014-09-04 15:39:54 -0700 | [diff] [blame] | 49 | import android.graphics.Rect; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 50 | import android.graphics.drawable.Drawable; |
| 51 | import android.net.Uri; |
Amith Yamasani | 655d0e2 | 2013-06-12 14:19:10 -0700 | [diff] [blame] | 52 | import android.os.UserHandle; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 53 | |
| 54 | import java.util.List; |
| 55 | |
| 56 | /** |
| 57 | * A mock {@link android.content.pm.PackageManager} class. All methods are non-functional and throw |
Amith Yamasani | 4b2e934 | 2011-03-31 12:38:53 -0700 | [diff] [blame] | 58 | * {@link java.lang.UnsupportedOperationException}. Override it to provide the operations that you |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 59 | * need. |
| 60 | */ |
| 61 | public class MockPackageManager extends PackageManager { |
| 62 | |
| 63 | @Override |
| 64 | public PackageInfo getPackageInfo(String packageName, int flags) |
| 65 | throws NameNotFoundException { |
| 66 | throw new UnsupportedOperationException(); |
| 67 | } |
| 68 | |
| 69 | @Override |
Dianne Hackborn | 4709693 | 2010-02-11 15:57:09 -0800 | [diff] [blame] | 70 | public String[] currentToCanonicalPackageNames(String[] names) { |
| 71 | throw new UnsupportedOperationException(); |
| 72 | } |
Amith Yamasani | 4b2e934 | 2011-03-31 12:38:53 -0700 | [diff] [blame] | 73 | |
Dianne Hackborn | 4709693 | 2010-02-11 15:57:09 -0800 | [diff] [blame] | 74 | @Override |
| 75 | public String[] canonicalToCurrentPackageNames(String[] names) { |
| 76 | throw new UnsupportedOperationException(); |
| 77 | } |
Amith Yamasani | 4b2e934 | 2011-03-31 12:38:53 -0700 | [diff] [blame] | 78 | |
Dianne Hackborn | 4709693 | 2010-02-11 15:57:09 -0800 | [diff] [blame] | 79 | @Override |
Mihai Preda | eae850c | 2009-05-13 10:13:48 +0200 | [diff] [blame] | 80 | public Intent getLaunchIntentForPackage(String packageName) { |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 81 | throw new UnsupportedOperationException(); |
| 82 | } |
Mihai Preda | eae850c | 2009-05-13 10:13:48 +0200 | [diff] [blame] | 83 | |
| 84 | @Override |
Jose Lima | 970417c | 2014-04-10 10:42:19 -0700 | [diff] [blame] | 85 | public Intent getLeanbackLaunchIntentForPackage(String packageName) { |
| 86 | throw new UnsupportedOperationException(); |
| 87 | } |
| 88 | |
| 89 | @Override |
| 90 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 91 | public int[] getPackageGids(String packageName) throws NameNotFoundException { |
| 92 | throw new UnsupportedOperationException(); |
| 93 | } |
| 94 | |
Dianne Hackborn | a06de0f | 2012-12-11 16:34:47 -0800 | [diff] [blame] | 95 | /** @hide */ |
| 96 | @Override |
| 97 | public int getPackageUid(String packageName, int userHandle) |
| 98 | throws NameNotFoundException { |
| 99 | throw new UnsupportedOperationException(); |
| 100 | } |
| 101 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 102 | @Override |
| 103 | public PermissionInfo getPermissionInfo(String name, int flags) |
| 104 | throws NameNotFoundException { |
| 105 | throw new UnsupportedOperationException(); |
| 106 | } |
| 107 | |
| 108 | @Override |
| 109 | public List<PermissionInfo> queryPermissionsByGroup(String group, int flags) |
| 110 | throws NameNotFoundException { |
| 111 | throw new UnsupportedOperationException(); |
| 112 | } |
| 113 | |
| 114 | @Override |
| 115 | public PermissionGroupInfo getPermissionGroupInfo(String name, |
| 116 | int flags) throws NameNotFoundException { |
| 117 | throw new UnsupportedOperationException(); |
| 118 | } |
| 119 | |
| 120 | @Override |
| 121 | public List<PermissionGroupInfo> getAllPermissionGroups(int flags) { |
| 122 | throw new UnsupportedOperationException(); |
| 123 | } |
Amith Yamasani | 4b2e934 | 2011-03-31 12:38:53 -0700 | [diff] [blame] | 124 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 125 | @Override |
| 126 | public ApplicationInfo getApplicationInfo(String packageName, int flags) |
| 127 | throws NameNotFoundException { |
| 128 | throw new UnsupportedOperationException(); |
| 129 | } |
| 130 | |
| 131 | @Override |
| 132 | public ActivityInfo getActivityInfo(ComponentName className, int flags) |
| 133 | throws NameNotFoundException { |
| 134 | throw new UnsupportedOperationException(); |
| 135 | } |
| 136 | |
| 137 | @Override |
| 138 | public ActivityInfo getReceiverInfo(ComponentName className, int flags) |
| 139 | throws NameNotFoundException { |
| 140 | throw new UnsupportedOperationException(); |
| 141 | } |
| 142 | |
| 143 | @Override |
| 144 | public ServiceInfo getServiceInfo(ComponentName className, int flags) |
| 145 | throws NameNotFoundException { |
| 146 | throw new UnsupportedOperationException(); |
| 147 | } |
| 148 | |
| 149 | @Override |
Dianne Hackborn | 361199b | 2010-08-30 17:42:07 -0700 | [diff] [blame] | 150 | public ProviderInfo getProviderInfo(ComponentName className, int flags) |
| 151 | throws NameNotFoundException { |
| 152 | throw new UnsupportedOperationException(); |
| 153 | } |
| 154 | |
| 155 | @Override |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 156 | public List<PackageInfo> getInstalledPackages(int flags) { |
| 157 | throw new UnsupportedOperationException(); |
| 158 | } |
| 159 | |
Dianne Hackborn | e799175 | 2013-01-16 17:56:46 -0800 | [diff] [blame] | 160 | @Override |
| 161 | public List<PackageInfo> getPackagesHoldingPermissions(String[] permissions, |
| 162 | int flags) { |
| 163 | throw new UnsupportedOperationException(); |
| 164 | } |
| 165 | |
Amith Yamasani | 151ec4c | 2012-09-07 19:25:16 -0700 | [diff] [blame] | 166 | /** @hide */ |
| 167 | @Override |
| 168 | public List<PackageInfo> getInstalledPackages(int flags, int userId) { |
| 169 | throw new UnsupportedOperationException(); |
| 170 | } |
| 171 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 172 | @Override |
| 173 | public int checkPermission(String permName, String pkgName) { |
| 174 | throw new UnsupportedOperationException(); |
| 175 | } |
| 176 | |
| 177 | @Override |
| 178 | public boolean addPermission(PermissionInfo info) { |
| 179 | throw new UnsupportedOperationException(); |
| 180 | } |
| 181 | |
| 182 | @Override |
Dianne Hackborn | d7c0968 | 2010-03-30 10:42:20 -0700 | [diff] [blame] | 183 | public boolean addPermissionAsync(PermissionInfo info) { |
| 184 | throw new UnsupportedOperationException(); |
| 185 | } |
| 186 | |
| 187 | @Override |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 188 | public void removePermission(String name) { |
| 189 | throw new UnsupportedOperationException(); |
| 190 | } |
| 191 | |
Dianne Hackborn | e639da7 | 2012-02-21 15:11:13 -0800 | [diff] [blame] | 192 | /** @hide */ |
| 193 | @Override |
| 194 | public void grantPermission(String packageName, String permissionName) { |
| 195 | throw new UnsupportedOperationException(); |
| 196 | } |
| 197 | |
| 198 | /** @hide */ |
| 199 | @Override |
| 200 | public void revokePermission(String packageName, String permissionName) { |
| 201 | throw new UnsupportedOperationException(); |
| 202 | } |
| 203 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 204 | @Override |
| 205 | public int checkSignatures(String pkg1, String pkg2) { |
| 206 | throw new UnsupportedOperationException(); |
| 207 | } |
| 208 | |
| 209 | @Override |
Dianne Hackborn | 766cbfe | 2009-08-12 18:33:39 -0700 | [diff] [blame] | 210 | public int checkSignatures(int uid1, int uid2) { |
| 211 | throw new UnsupportedOperationException(); |
| 212 | } |
| 213 | |
| 214 | @Override |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 215 | public String[] getPackagesForUid(int uid) { |
| 216 | throw new UnsupportedOperationException(); |
| 217 | } |
| 218 | |
| 219 | @Override |
| 220 | public String getNameForUid(int uid) { |
| 221 | throw new UnsupportedOperationException(); |
| 222 | } |
Amith Yamasani | 4b2e934 | 2011-03-31 12:38:53 -0700 | [diff] [blame] | 223 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 224 | /** |
| 225 | * @hide - to match hiding in superclass |
| 226 | */ |
| 227 | @Override |
| 228 | public int getUidForSharedUser(String sharedUserName) { |
| 229 | throw new UnsupportedOperationException(); |
| 230 | } |
| 231 | |
| 232 | @Override |
| 233 | public List<ApplicationInfo> getInstalledApplications(int flags) { |
| 234 | throw new UnsupportedOperationException(); |
| 235 | } |
| 236 | |
| 237 | @Override |
| 238 | public ResolveInfo resolveActivity(Intent intent, int flags) { |
| 239 | throw new UnsupportedOperationException(); |
| 240 | } |
| 241 | |
Svetoslav Ganov | 58d37b5 | 2012-09-18 12:04:19 -0700 | [diff] [blame] | 242 | /** @hide */ |
| 243 | @Override |
| 244 | public ResolveInfo resolveActivityAsUser(Intent intent, int flags, int userId) { |
| 245 | throw new UnsupportedOperationException(); |
| 246 | } |
| 247 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 248 | @Override |
| 249 | public List<ResolveInfo> queryIntentActivities(Intent intent, int flags) { |
| 250 | throw new UnsupportedOperationException(); |
| 251 | } |
| 252 | |
Amith Yamasani | 151ec4c | 2012-09-07 19:25:16 -0700 | [diff] [blame] | 253 | /** @hide */ |
| 254 | @Override |
Svetoslav Ganov | 58d37b5 | 2012-09-18 12:04:19 -0700 | [diff] [blame] | 255 | public List<ResolveInfo> queryIntentActivitiesAsUser(Intent intent, |
Amith Yamasani | 151ec4c | 2012-09-07 19:25:16 -0700 | [diff] [blame] | 256 | int flags, int userId) { |
| 257 | throw new UnsupportedOperationException(); |
| 258 | } |
| 259 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 260 | @Override |
| 261 | public List<ResolveInfo> queryIntentActivityOptions(ComponentName caller, |
| 262 | Intent[] specifics, Intent intent, int flags) { |
| 263 | throw new UnsupportedOperationException(); |
| 264 | } |
| 265 | |
| 266 | @Override |
| 267 | public List<ResolveInfo> queryBroadcastReceivers(Intent intent, int flags) { |
| 268 | throw new UnsupportedOperationException(); |
| 269 | } |
| 270 | |
Amith Yamasani | f203aee | 2012-08-29 18:41:53 -0700 | [diff] [blame] | 271 | /** @hide */ |
| 272 | @Override |
| 273 | public List<ResolveInfo> queryBroadcastReceivers(Intent intent, int flags, int userId) { |
| 274 | throw new UnsupportedOperationException(); |
| 275 | } |
| 276 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 277 | @Override |
| 278 | public ResolveInfo resolveService(Intent intent, int flags) { |
| 279 | throw new UnsupportedOperationException(); |
| 280 | } |
| 281 | |
| 282 | @Override |
| 283 | public List<ResolveInfo> queryIntentServices(Intent intent, int flags) { |
| 284 | throw new UnsupportedOperationException(); |
| 285 | } |
| 286 | |
Svetoslav Ganov | 58d37b5 | 2012-09-18 12:04:19 -0700 | [diff] [blame] | 287 | /** @hide */ |
| 288 | @Override |
| 289 | public List<ResolveInfo> queryIntentServicesAsUser(Intent intent, int flags, int userId) { |
| 290 | throw new UnsupportedOperationException(); |
| 291 | } |
| 292 | |
Jeff Sharkey | 85f5f81 | 2013-10-07 10:16:12 -0700 | [diff] [blame] | 293 | /** @hide */ |
| 294 | @Override |
| 295 | public List<ResolveInfo> queryIntentContentProvidersAsUser( |
| 296 | Intent intent, int flags, int userId) { |
| 297 | throw new UnsupportedOperationException(); |
| 298 | } |
| 299 | |
| 300 | @Override |
| 301 | public List<ResolveInfo> queryIntentContentProviders(Intent intent, int flags) { |
| 302 | throw new UnsupportedOperationException(); |
| 303 | } |
| 304 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 305 | @Override |
| 306 | public ProviderInfo resolveContentProvider(String name, int flags) { |
| 307 | throw new UnsupportedOperationException(); |
| 308 | } |
| 309 | |
Alexandra Gherghina | 0363c3e | 2014-06-23 13:34:59 +0100 | [diff] [blame] | 310 | /** @hide */ |
| 311 | @Override |
| 312 | public ProviderInfo resolveContentProviderAsUser(String name, int flags, int userId) { |
| 313 | throw new UnsupportedOperationException(); |
| 314 | } |
| 315 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 316 | @Override |
| 317 | public List<ProviderInfo> queryContentProviders(String processName, int uid, int flags) { |
| 318 | throw new UnsupportedOperationException(); |
| 319 | } |
| 320 | |
| 321 | @Override |
| 322 | public InstrumentationInfo getInstrumentationInfo(ComponentName className, int flags) |
| 323 | throws NameNotFoundException { |
| 324 | throw new UnsupportedOperationException(); |
| 325 | } |
| 326 | |
| 327 | @Override |
| 328 | public List<InstrumentationInfo> queryInstrumentation( |
| 329 | String targetPackage, int flags) { |
| 330 | throw new UnsupportedOperationException(); |
| 331 | } |
| 332 | |
| 333 | @Override |
| 334 | public Drawable getDrawable(String packageName, int resid, ApplicationInfo appInfo) { |
| 335 | throw new UnsupportedOperationException(); |
| 336 | } |
| 337 | |
| 338 | @Override |
| 339 | public Drawable getActivityIcon(ComponentName activityName) |
| 340 | throws NameNotFoundException { |
| 341 | throw new UnsupportedOperationException(); |
| 342 | } |
| 343 | |
| 344 | @Override |
| 345 | public Drawable getActivityIcon(Intent intent) throws NameNotFoundException { |
| 346 | throw new UnsupportedOperationException(); |
| 347 | } |
| 348 | |
| 349 | @Override |
| 350 | public Drawable getDefaultActivityIcon() { |
| 351 | throw new UnsupportedOperationException(); |
| 352 | } |
| 353 | |
| 354 | @Override |
Jose Lima | f78e312 | 2014-03-06 12:13:15 -0800 | [diff] [blame] | 355 | public Drawable getActivityBanner(ComponentName activityName) |
| 356 | throws NameNotFoundException { |
| 357 | throw new UnsupportedOperationException(); |
| 358 | } |
| 359 | |
| 360 | @Override |
| 361 | public Drawable getActivityBanner(Intent intent) throws NameNotFoundException { |
| 362 | throw new UnsupportedOperationException(); |
| 363 | } |
| 364 | |
| 365 | @Override |
| 366 | public Drawable getApplicationBanner(ApplicationInfo info) { |
| 367 | throw new UnsupportedOperationException(); |
| 368 | } |
| 369 | |
| 370 | @Override |
| 371 | public Drawable getApplicationBanner(String packageName) throws NameNotFoundException { |
| 372 | throw new UnsupportedOperationException(); |
| 373 | } |
| 374 | |
| 375 | @Override |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 376 | public Drawable getApplicationIcon(ApplicationInfo info) { |
| 377 | throw new UnsupportedOperationException(); |
| 378 | } |
| 379 | |
| 380 | @Override |
| 381 | public Drawable getApplicationIcon(String packageName) throws NameNotFoundException { |
| 382 | throw new UnsupportedOperationException(); |
| 383 | } |
Amith Yamasani | 4b2e934 | 2011-03-31 12:38:53 -0700 | [diff] [blame] | 384 | |
Adam Powell | 81cd2e9 | 2010-04-21 16:35:18 -0700 | [diff] [blame] | 385 | @Override |
| 386 | public Drawable getActivityLogo(ComponentName activityName) throws NameNotFoundException { |
| 387 | throw new UnsupportedOperationException(); |
| 388 | } |
| 389 | |
| 390 | @Override |
| 391 | public Drawable getActivityLogo(Intent intent) throws NameNotFoundException { |
| 392 | throw new UnsupportedOperationException(); |
| 393 | } |
| 394 | |
| 395 | @Override |
| 396 | public Drawable getApplicationLogo(ApplicationInfo info) { |
| 397 | throw new UnsupportedOperationException(); |
| 398 | } |
| 399 | |
| 400 | @Override |
| 401 | public Drawable getApplicationLogo(String packageName) throws NameNotFoundException { |
| 402 | throw new UnsupportedOperationException(); |
| 403 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 404 | |
| 405 | @Override |
Svetoslav | c7d62f0 | 2014-09-04 15:39:54 -0700 | [diff] [blame] | 406 | public Drawable getUserBadgedIcon(Drawable icon, UserHandle user) { |
| 407 | throw new UnsupportedOperationException(); |
| 408 | } |
| 409 | |
| 410 | @Override |
| 411 | public Drawable getUserBadgedDrawableForDensity(Drawable drawable, UserHandle user, |
| 412 | Rect badgeLocation, |
| 413 | int badgeDensity) { |
| 414 | throw new UnsupportedOperationException(); |
| 415 | } |
| 416 | |
| 417 | /** @hide */ |
| 418 | @Override |
| 419 | public Drawable getUserBadgeForDensity(UserHandle user, int density) { |
| 420 | throw new UnsupportedOperationException(); |
| 421 | } |
| 422 | |
| 423 | @Override |
| 424 | public CharSequence getUserBadgedLabel(CharSequence label, UserHandle user) { |
| 425 | throw new UnsupportedOperationException(); |
| 426 | } |
| 427 | |
| 428 | @Override |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 429 | public CharSequence getText(String packageName, int resid, ApplicationInfo appInfo) { |
| 430 | throw new UnsupportedOperationException(); |
| 431 | } |
| 432 | |
| 433 | @Override |
| 434 | public XmlResourceParser getXml(String packageName, int resid, |
| 435 | ApplicationInfo appInfo) { |
| 436 | throw new UnsupportedOperationException(); |
| 437 | } |
| 438 | |
| 439 | @Override |
| 440 | public CharSequence getApplicationLabel(ApplicationInfo info) { |
| 441 | throw new UnsupportedOperationException(); |
| 442 | } |
| 443 | |
| 444 | @Override |
| 445 | public Resources getResourcesForActivity(ComponentName activityName) |
| 446 | throws NameNotFoundException { |
| 447 | throw new UnsupportedOperationException(); |
| 448 | } |
| 449 | |
| 450 | @Override |
| 451 | public Resources getResourcesForApplication(ApplicationInfo app) { |
| 452 | throw new UnsupportedOperationException(); |
| 453 | } |
| 454 | |
| 455 | @Override |
| 456 | public Resources getResourcesForApplication(String appPackageName) |
| 457 | throws NameNotFoundException { |
| 458 | throw new UnsupportedOperationException(); |
| 459 | } |
| 460 | |
Amith Yamasani | 98edc95 | 2012-09-25 14:09:27 -0700 | [diff] [blame] | 461 | /** @hide */ |
| 462 | @Override |
| 463 | public Resources getResourcesForApplicationAsUser(String appPackageName, int userId) { |
| 464 | throw new UnsupportedOperationException(); |
| 465 | } |
| 466 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 467 | @Override |
| 468 | public PackageInfo getPackageArchiveInfo(String archiveFilePath, int flags) { |
| 469 | throw new UnsupportedOperationException(); |
| 470 | } |
| 471 | |
Dianne Hackborn | ade3eca | 2009-05-11 18:54:45 -0700 | [diff] [blame] | 472 | /** |
| 473 | * @hide - to match hiding in superclass |
| 474 | */ |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 475 | @Override |
| 476 | public void installPackage(Uri packageURI, IPackageInstallObserver observer, |
Jacek Surazski | 65e1317 | 2009-04-28 15:26:38 +0200 | [diff] [blame] | 477 | int flags, String installerPackageName) { |
| 478 | throw new UnsupportedOperationException(); |
| 479 | } |
Suchi Amalapurapu | 8946dd3 | 2010-02-19 09:19:34 -0800 | [diff] [blame] | 480 | |
Dianne Hackborn | 880119b | 2010-11-18 22:26:40 -0800 | [diff] [blame] | 481 | @Override |
| 482 | public void setInstallerPackageName(String targetPackage, |
| 483 | String installerPackageName) { |
| 484 | throw new UnsupportedOperationException(); |
| 485 | } |
| 486 | |
Suchi Amalapurapu | 8946dd3 | 2010-02-19 09:19:34 -0800 | [diff] [blame] | 487 | /** |
| 488 | * @hide - to match hiding in superclass |
| 489 | */ |
| 490 | @Override |
| 491 | public void movePackage(String packageName, IPackageMoveObserver observer, int flags) { |
| 492 | throw new UnsupportedOperationException(); |
| 493 | } |
Amith Yamasani | 4b2e934 | 2011-03-31 12:38:53 -0700 | [diff] [blame] | 494 | |
Jacek Surazski | 65e1317 | 2009-04-28 15:26:38 +0200 | [diff] [blame] | 495 | @Override |
| 496 | public String getInstallerPackageName(String packageName) { |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 497 | throw new UnsupportedOperationException(); |
| 498 | } |
| 499 | |
| 500 | /** |
| 501 | * @hide - to match hiding in superclass |
| 502 | */ |
| 503 | @Override |
| 504 | public void clearApplicationUserData( |
| 505 | String packageName, IPackageDataObserver observer) { |
| 506 | throw new UnsupportedOperationException(); |
| 507 | } |
Amith Yamasani | 4b2e934 | 2011-03-31 12:38:53 -0700 | [diff] [blame] | 508 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 509 | /** |
| 510 | * @hide - to match hiding in superclass |
| 511 | */ |
| 512 | @Override |
| 513 | public void deleteApplicationCacheFiles( |
| 514 | String packageName, IPackageDataObserver observer) { |
| 515 | throw new UnsupportedOperationException(); |
| 516 | } |
Amith Yamasani | 4b2e934 | 2011-03-31 12:38:53 -0700 | [diff] [blame] | 517 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 518 | /** |
| 519 | * @hide - to match hiding in superclass |
| 520 | */ |
| 521 | @Override |
| 522 | public void freeStorageAndNotify( |
| 523 | long idealStorageSize, IPackageDataObserver observer) { |
| 524 | throw new UnsupportedOperationException(); |
| 525 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 526 | |
| 527 | /** |
| 528 | * @hide - to match hiding in superclass |
| 529 | */ |
| 530 | @Override |
Suchi Amalapurapu | bc806f6 | 2009-06-17 15:18:19 -0700 | [diff] [blame] | 531 | public void freeStorage( |
Suchi Amalapurapu | 1ccac75 | 2009-06-12 10:09:58 -0700 | [diff] [blame] | 532 | long idealStorageSize, IntentSender pi) { |
| 533 | throw new UnsupportedOperationException(); |
| 534 | } |
| 535 | |
| 536 | /** |
| 537 | * @hide - to match hiding in superclass |
| 538 | */ |
| 539 | @Override |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 540 | public void deletePackage( |
| 541 | String packageName, IPackageDeleteObserver observer, int flags) { |
| 542 | throw new UnsupportedOperationException(); |
| 543 | } |
| 544 | |
| 545 | @Override |
| 546 | public void addPackageToPreferred(String packageName) { |
| 547 | throw new UnsupportedOperationException(); |
| 548 | } |
| 549 | |
| 550 | @Override |
| 551 | public void removePackageFromPreferred(String packageName) { |
| 552 | throw new UnsupportedOperationException(); |
| 553 | } |
| 554 | |
| 555 | @Override |
| 556 | public List<PackageInfo> getPreferredPackages(int flags) { |
| 557 | throw new UnsupportedOperationException(); |
| 558 | } |
| 559 | |
| 560 | @Override |
| 561 | public void setComponentEnabledSetting(ComponentName componentName, |
| 562 | int newState, int flags) { |
| 563 | throw new UnsupportedOperationException(); |
| 564 | } |
| 565 | |
| 566 | @Override |
| 567 | public int getComponentEnabledSetting(ComponentName componentName) { |
| 568 | throw new UnsupportedOperationException(); |
| 569 | } |
| 570 | |
| 571 | @Override |
| 572 | public void setApplicationEnabledSetting(String packageName, int newState, int flags) { |
| 573 | throw new UnsupportedOperationException(); |
| 574 | } |
Amith Yamasani | 4b2e934 | 2011-03-31 12:38:53 -0700 | [diff] [blame] | 575 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 576 | @Override |
| 577 | public int getApplicationEnabledSetting(String packageName) { |
| 578 | throw new UnsupportedOperationException(); |
| 579 | } |
| 580 | |
| 581 | @Override |
| 582 | public void addPreferredActivity(IntentFilter filter, |
| 583 | int match, ComponentName[] set, ComponentName activity) { |
| 584 | throw new UnsupportedOperationException(); |
| 585 | } |
Amith Yamasani | 4b2e934 | 2011-03-31 12:38:53 -0700 | [diff] [blame] | 586 | |
Satish Sampath | 8dbe612 | 2009-06-02 23:35:54 +0100 | [diff] [blame] | 587 | /** |
| 588 | * @hide - to match hiding in superclass |
| 589 | */ |
| 590 | @Override |
| 591 | public void replacePreferredActivity(IntentFilter filter, |
| 592 | int match, ComponentName[] set, ComponentName activity) { |
| 593 | throw new UnsupportedOperationException(); |
| 594 | } |
| 595 | |
| 596 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 597 | @Override |
| 598 | public void clearPackagePreferredActivities(String packageName) { |
| 599 | throw new UnsupportedOperationException(); |
| 600 | } |
| 601 | |
| 602 | /** |
| 603 | * @hide - to match hiding in superclass |
| 604 | */ |
| 605 | @Override |
Dianne Hackborn | 0c38049 | 2012-08-20 17:23:30 -0700 | [diff] [blame] | 606 | public void getPackageSizeInfo(String packageName, int userHandle, |
| 607 | IPackageStatsObserver observer) { |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 608 | throw new UnsupportedOperationException(); |
| 609 | } |
| 610 | |
| 611 | @Override |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 612 | public int getPreferredActivities(List<IntentFilter> outFilters, |
| 613 | List<ComponentName> outActivities, String packageName) { |
| 614 | throw new UnsupportedOperationException(); |
| 615 | } |
Amith Yamasani | 4b2e934 | 2011-03-31 12:38:53 -0700 | [diff] [blame] | 616 | |
Christopher Tate | a2a0850 | 2013-09-05 16:38:58 -0700 | [diff] [blame] | 617 | /** @hide - hidden in superclass */ |
| 618 | @Override |
| 619 | public ComponentName getHomeActivities(List<ResolveInfo> outActivities) { |
| 620 | throw new UnsupportedOperationException(); |
| 621 | } |
| 622 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 623 | @Override |
| 624 | public String[] getSystemSharedLibraryNames() { |
| 625 | throw new UnsupportedOperationException(); |
| 626 | } |
Amith Yamasani | 4b2e934 | 2011-03-31 12:38:53 -0700 | [diff] [blame] | 627 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 628 | @Override |
Dianne Hackborn | 4923734 | 2009-08-27 20:08:01 -0700 | [diff] [blame] | 629 | public FeatureInfo[] getSystemAvailableFeatures() { |
| 630 | throw new UnsupportedOperationException(); |
| 631 | } |
Amith Yamasani | 4b2e934 | 2011-03-31 12:38:53 -0700 | [diff] [blame] | 632 | |
Dianne Hackborn | 4923734 | 2009-08-27 20:08:01 -0700 | [diff] [blame] | 633 | @Override |
Dianne Hackborn | 039c68e | 2009-09-26 16:39:23 -0700 | [diff] [blame] | 634 | public boolean hasSystemFeature(String name) { |
| 635 | throw new UnsupportedOperationException(); |
| 636 | } |
Amith Yamasani | 4b2e934 | 2011-03-31 12:38:53 -0700 | [diff] [blame] | 637 | |
Dianne Hackborn | 039c68e | 2009-09-26 16:39:23 -0700 | [diff] [blame] | 638 | @Override |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 639 | public boolean isSafeMode() { |
| 640 | throw new UnsupportedOperationException(); |
| 641 | } |
Amith Yamasani | 4b2e934 | 2011-03-31 12:38:53 -0700 | [diff] [blame] | 642 | |
dcashman | c6f2249 | 2014-08-14 09:54:51 -0700 | [diff] [blame] | 643 | /** @hide */ |
dcashman | 9d2f441 | 2014-06-09 09:27:54 -0700 | [diff] [blame] | 644 | @Override |
| 645 | public KeySet getKeySetByAlias(String packageName, String alias) { |
| 646 | throw new UnsupportedOperationException(); |
| 647 | } |
| 648 | |
dcashman | c6f2249 | 2014-08-14 09:54:51 -0700 | [diff] [blame] | 649 | /** @hide */ |
dcashman | 9d2f441 | 2014-06-09 09:27:54 -0700 | [diff] [blame] | 650 | @Override |
| 651 | public KeySet getSigningKeySet(String packageName) { |
| 652 | throw new UnsupportedOperationException(); |
| 653 | } |
| 654 | |
dcashman | c6f2249 | 2014-08-14 09:54:51 -0700 | [diff] [blame] | 655 | /** @hide */ |
dcashman | 9d2f441 | 2014-06-09 09:27:54 -0700 | [diff] [blame] | 656 | @Override |
| 657 | public boolean isSignedBy(String packageName, KeySet ks) { |
| 658 | throw new UnsupportedOperationException(); |
| 659 | } |
| 660 | |
dcashman | c6f2249 | 2014-08-14 09:54:51 -0700 | [diff] [blame] | 661 | /** @hide */ |
dcashman | 9d2f441 | 2014-06-09 09:27:54 -0700 | [diff] [blame] | 662 | @Override |
| 663 | public boolean isSignedByExactly(String packageName, KeySet ks) { |
| 664 | throw new UnsupportedOperationException(); |
| 665 | } |
| 666 | |
Amith Yamasani | 4b2e934 | 2011-03-31 12:38:53 -0700 | [diff] [blame] | 667 | /** |
| 668 | * @hide |
| 669 | */ |
| 670 | @Override |
Kenny Root | 5ab2157 | 2011-07-27 11:11:19 -0700 | [diff] [blame] | 671 | public void installPackageWithVerification(Uri packageURI, IPackageInstallObserver observer, |
| 672 | int flags, String installerPackageName, Uri verificationURI, |
Rich Cannings | e1d7c71 | 2012-08-08 12:46:06 -0700 | [diff] [blame] | 673 | ManifestDigest manifestDigest, ContainerEncryptionParams encryptionParams) { |
Kenny Root | 5ab2157 | 2011-07-27 11:11:19 -0700 | [diff] [blame] | 674 | throw new UnsupportedOperationException(); |
| 675 | } |
| 676 | |
rich cannings | 706e8ba | 2012-08-20 13:20:14 -0700 | [diff] [blame] | 677 | /** |
| 678 | * @hide |
| 679 | */ |
| 680 | @Override |
| 681 | public void installPackageWithVerificationAndEncryption(Uri packageURI, |
| 682 | IPackageInstallObserver observer, int flags, String installerPackageName, |
| 683 | VerificationParams verificationParams, ContainerEncryptionParams encryptionParams) { |
| 684 | throw new UnsupportedOperationException(); |
| 685 | } |
| 686 | |
Dianne Hackborn | 7767eac | 2012-08-23 18:25:40 -0700 | [diff] [blame] | 687 | /** |
| 688 | * @hide |
| 689 | */ |
| 690 | @Override |
Amith Yamasani | e5bcff6 | 2014-07-19 15:44:09 -0700 | [diff] [blame] | 691 | public boolean setApplicationHiddenSettingAsUser(String packageName, boolean hidden, |
Amith Yamasani | 655d0e2 | 2013-06-12 14:19:10 -0700 | [diff] [blame] | 692 | UserHandle user) { |
| 693 | return false; |
| 694 | } |
| 695 | |
| 696 | /** |
| 697 | * @hide |
| 698 | */ |
| 699 | @Override |
Amith Yamasani | e5bcff6 | 2014-07-19 15:44:09 -0700 | [diff] [blame] | 700 | public boolean getApplicationHiddenSettingAsUser(String packageName, UserHandle user) { |
Amith Yamasani | 655d0e2 | 2013-06-12 14:19:10 -0700 | [diff] [blame] | 701 | return false; |
| 702 | } |
| 703 | |
| 704 | /** |
| 705 | * @hide |
| 706 | */ |
| 707 | @Override |
Dianne Hackborn | 7767eac | 2012-08-23 18:25:40 -0700 | [diff] [blame] | 708 | public int installExistingPackage(String packageName) |
| 709 | throws NameNotFoundException { |
| 710 | throw new UnsupportedOperationException(); |
| 711 | } |
| 712 | |
Kenny Root | 5ab2157 | 2011-07-27 11:11:19 -0700 | [diff] [blame] | 713 | @Override |
Kenny Root | 3a9b5fb | 2011-09-20 14:15:38 -0700 | [diff] [blame] | 714 | public void verifyPendingInstall(int id, int verificationCode) { |
Kenny Root | 5ab2157 | 2011-07-27 11:11:19 -0700 | [diff] [blame] | 715 | throw new UnsupportedOperationException(); |
| 716 | } |
Kenny Root | 0aaa0d9 | 2011-09-12 16:42:55 -0700 | [diff] [blame] | 717 | |
rich cannings | d9ef3e5 | 2012-08-22 14:28:05 -0700 | [diff] [blame] | 718 | @Override |
| 719 | public void extendVerificationTimeout(int id, int verificationCodeAtTimeout, |
| 720 | long millisecondsToDelay) { |
| 721 | throw new UnsupportedOperationException(); |
| 722 | } |
| 723 | |
Kenny Root | 0aaa0d9 | 2011-09-12 16:42:55 -0700 | [diff] [blame] | 724 | /** |
| 725 | * @hide |
| 726 | */ |
| 727 | @Override |
| 728 | public VerifierDeviceIdentity getVerifierDeviceIdentity() { |
| 729 | throw new UnsupportedOperationException(); |
| 730 | } |
Christopher Tate | f1977b4 | 2014-03-24 16:25:51 -0700 | [diff] [blame] | 731 | |
| 732 | /** |
| 733 | * @hide |
| 734 | */ |
| 735 | @Override |
| 736 | public void installPackage(Uri packageURI, PackageInstallObserver observer, |
| 737 | int flags, String installerPackageName) { |
| 738 | throw new UnsupportedOperationException(); |
| 739 | } |
| 740 | |
| 741 | /** |
| 742 | * @hide |
| 743 | */ |
| 744 | @Override |
| 745 | public void installPackageWithVerification(Uri packageURI, |
| 746 | PackageInstallObserver observer, int flags, String installerPackageName, |
| 747 | Uri verificationURI, ManifestDigest manifestDigest, |
| 748 | ContainerEncryptionParams encryptionParams) { |
| 749 | throw new UnsupportedOperationException(); |
| 750 | } |
| 751 | |
| 752 | /** |
| 753 | * @hide |
| 754 | */ |
| 755 | @Override |
| 756 | public void installPackageWithVerificationAndEncryption(Uri packageURI, |
| 757 | PackageInstallObserver observer, int flags, String installerPackageName, |
| 758 | VerificationParams verificationParams, ContainerEncryptionParams encryptionParams) { |
| 759 | throw new UnsupportedOperationException(); |
| 760 | } |
Nicolas Prevot | c79586e | 2014-05-06 12:47:57 +0100 | [diff] [blame] | 761 | |
| 762 | /** |
| 763 | * @hide |
| 764 | */ |
| 765 | @Override |
Nicolas Prevot | 63798c5 | 2014-05-27 13:22:38 +0100 | [diff] [blame] | 766 | public void addCrossProfileIntentFilter(IntentFilter filter, int sourceUserId, int targetUserId, |
| 767 | int flags) { |
Nicolas Prevot | 8194899 | 2014-05-16 18:25:26 +0100 | [diff] [blame] | 768 | throw new UnsupportedOperationException(); |
| 769 | } |
| 770 | |
| 771 | /** |
| 772 | * @hide |
| 773 | */ |
| 774 | @Override |
| 775 | public void clearCrossProfileIntentFilters(int sourceUserId) { |
| 776 | throw new UnsupportedOperationException(); |
| 777 | } |
| 778 | |
Jeff Sharkey | 3a44f3f | 2014-04-28 17:36:31 -0700 | [diff] [blame] | 779 | /** {@hide} */ |
Jeff Sharkey | 16c8e3f | 2014-07-24 17:08:17 -0700 | [diff] [blame] | 780 | public PackageInstaller getPackageInstaller() { |
Jeff Sharkey | 6c833e0 | 2014-07-14 22:44:30 -0700 | [diff] [blame] | 781 | throw new UnsupportedOperationException(); |
| 782 | } |
| 783 | |
| 784 | /** {@hide} */ |
| 785 | @Override |
| 786 | public boolean isPackageAvailable(String packageName) { |
Jeff Sharkey | 3a44f3f | 2014-04-28 17:36:31 -0700 | [diff] [blame] | 787 | throw new UnsupportedOperationException(); |
| 788 | } |
Alexandra Gherghina | 6e2ae25 | 2014-06-12 16:03:58 +0100 | [diff] [blame] | 789 | |
| 790 | /** |
| 791 | * @hide |
| 792 | */ |
Nicolas Prevot | 7f7b0c7 | 2014-06-23 15:59:38 +0100 | [diff] [blame] | 793 | public Drawable loadItemIcon(PackageItemInfo itemInfo, ApplicationInfo appInfo) { |
Nicolas Prevot | 88cc346 | 2014-05-14 14:51:48 +0100 | [diff] [blame] | 794 | throw new UnsupportedOperationException(); |
| 795 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 796 | } |