blob: e851c8d784f329181f4a009d78a28c0b687b344c [file] [log] [blame]
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001/*
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
17package android.test.mock;
18
Svet Ganov2acf0632015-11-24 19:10:59 -080019import android.annotation.NonNull;
Svet Ganovd7b1f4112016-02-09 18:49:23 -080020import android.annotation.Nullable;
Christopher Tatef1977b42014-03-24 16:25:51 -070021import android.app.PackageInstallObserver;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080022import android.content.ComponentName;
23import android.content.Intent;
24import android.content.IntentFilter;
Suchi Amalapurapu1ccac752009-06-12 10:09:58 -070025import android.content.IntentSender;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080026import android.content.pm.ActivityInfo;
27import android.content.pm.ApplicationInfo;
Svet Ganov2acf0632015-11-24 19:10:59 -080028import android.content.pm.EphemeralApplicationInfo;
Dianne Hackborn49237342009-08-27 20:08:01 -070029import android.content.pm.FeatureInfo;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080030import android.content.pm.IPackageDataObserver;
Amith Yamasani4b2e9342011-03-31 12:38:53 -070031import android.content.pm.IPackageDeleteObserver;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080032import android.content.pm.IPackageInstallObserver;
33import android.content.pm.IPackageStatsObserver;
34import android.content.pm.InstrumentationInfo;
Fabrice Di Meglio1c1b4712014-11-19 17:12:32 -080035import android.content.pm.IntentFilterVerificationInfo;
dcashman9d2f4412014-06-09 09:27:54 -070036import android.content.pm.KeySet;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080037import android.content.pm.PackageInfo;
Jeff Sharkey3a44f3f2014-04-28 17:36:31 -070038import android.content.pm.PackageInstaller;
Nicolas Prevot7f7b0c72014-06-23 15:59:38 +010039import android.content.pm.PackageItemInfo;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080040import android.content.pm.PackageManager;
41import android.content.pm.PermissionGroupInfo;
42import android.content.pm.PermissionInfo;
43import android.content.pm.ProviderInfo;
44import android.content.pm.ResolveInfo;
45import android.content.pm.ServiceInfo;
Kenny Root0aaa0d92011-09-12 16:42:55 -070046import android.content.pm.VerifierDeviceIdentity;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080047import android.content.res.Resources;
48import android.content.res.XmlResourceParser;
Svetoslavc7d62f02014-09-04 15:39:54 -070049import android.graphics.Rect;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080050import android.graphics.drawable.Drawable;
51import android.net.Uri;
Jeff Sharkey620b32b2015-04-23 19:36:02 -070052import android.os.Handler;
Amith Yamasani655d0e22013-06-12 14:19:10 -070053import android.os.UserHandle;
Jeff Sharkeye2d45be2015-04-15 17:14:12 -070054import android.os.storage.VolumeInfo;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080055
56import java.util.List;
57
58/**
59 * A mock {@link android.content.pm.PackageManager} class. All methods are non-functional and throw
Amith Yamasani4b2e9342011-03-31 12:38:53 -070060 * {@link java.lang.UnsupportedOperationException}. Override it to provide the operations that you
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080061 * need.
Stephan Linznerb51617f2016-01-27 18:09:50 -080062 *
63 * @deprecated Use a mocking framework like <a href="https://github.com/mockito/mockito">Mockito</a>.
64 * New tests should be written using the
65 * <a href="{@docRoot}tools/testing-support-library/index.html">Android Testing Support Library</a>.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080066 */
Stephan Linznerb51617f2016-01-27 18:09:50 -080067@Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080068public class MockPackageManager extends PackageManager {
69
70 @Override
Nicolas Prevot9a80e532015-09-23 15:49:28 +010071 public PackageInfo getPackageInfo(String packageName, int flags) throws NameNotFoundException {
72 throw new UnsupportedOperationException();
73 }
74
75 /** @hide */
76 @Override
77 public PackageInfo getPackageInfoAsUser(String packageName, int flags, int userId)
78 throws NameNotFoundException {
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080079 throw new UnsupportedOperationException();
80 }
81
82 @Override
Dianne Hackborn47096932010-02-11 15:57:09 -080083 public String[] currentToCanonicalPackageNames(String[] names) {
84 throw new UnsupportedOperationException();
85 }
Amith Yamasani4b2e9342011-03-31 12:38:53 -070086
Dianne Hackborn47096932010-02-11 15:57:09 -080087 @Override
88 public String[] canonicalToCurrentPackageNames(String[] names) {
89 throw new UnsupportedOperationException();
90 }
Amith Yamasani4b2e9342011-03-31 12:38:53 -070091
Dianne Hackborn47096932010-02-11 15:57:09 -080092 @Override
Mihai Predaeae850c2009-05-13 10:13:48 +020093 public Intent getLaunchIntentForPackage(String packageName) {
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080094 throw new UnsupportedOperationException();
95 }
Mihai Predaeae850c2009-05-13 10:13:48 +020096
97 @Override
Jose Lima970417c2014-04-10 10:42:19 -070098 public Intent getLeanbackLaunchIntentForPackage(String packageName) {
99 throw new UnsupportedOperationException();
100 }
101
102 @Override
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800103 public int[] getPackageGids(String packageName) throws NameNotFoundException {
104 throw new UnsupportedOperationException();
105 }
106
Jeff Sharkey8588bc12016-01-06 16:47:42 -0700107 @Override
108 public int[] getPackageGids(String packageName, int flags) throws NameNotFoundException {
109 throw new UnsupportedOperationException();
110 }
111
112 @Override
113 public int getPackageUid(String packageName, int flags) throws NameNotFoundException {
114 throw new UnsupportedOperationException();
115 }
116
117 /** @hide */
118 @Override
119 public int getPackageUidAsUser(String packageName, int flags, int userHandle)
120 throws NameNotFoundException {
121 throw new UnsupportedOperationException();
122 }
123
Dianne Hackborna06de0f2012-12-11 16:34:47 -0800124 /** @hide */
125 @Override
Jeff Sharkeye06b4d12016-01-06 14:51:50 -0700126 public int getPackageUidAsUser(String packageName, int userHandle)
Dianne Hackborna06de0f2012-12-11 16:34:47 -0800127 throws NameNotFoundException {
128 throw new UnsupportedOperationException();
129 }
130
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800131 @Override
132 public PermissionInfo getPermissionInfo(String name, int flags)
133 throws NameNotFoundException {
134 throw new UnsupportedOperationException();
135 }
136
137 @Override
138 public List<PermissionInfo> queryPermissionsByGroup(String group, int flags)
139 throws NameNotFoundException {
140 throw new UnsupportedOperationException();
141 }
142
143 @Override
144 public PermissionGroupInfo getPermissionGroupInfo(String name,
145 int flags) throws NameNotFoundException {
146 throw new UnsupportedOperationException();
147 }
148
149 @Override
150 public List<PermissionGroupInfo> getAllPermissionGroups(int flags) {
151 throw new UnsupportedOperationException();
152 }
Amith Yamasani4b2e9342011-03-31 12:38:53 -0700153
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800154 @Override
155 public ApplicationInfo getApplicationInfo(String packageName, int flags)
Jeff Sharkeycd654482016-01-08 17:42:11 -0700156 throws NameNotFoundException {
157 throw new UnsupportedOperationException();
158 }
159
160 /** @hide */
161 @Override
162 public ApplicationInfo getApplicationInfoAsUser(String packageName, int flags, int userId)
163 throws NameNotFoundException {
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800164 throw new UnsupportedOperationException();
165 }
166
167 @Override
168 public ActivityInfo getActivityInfo(ComponentName className, int flags)
169 throws NameNotFoundException {
170 throw new UnsupportedOperationException();
171 }
172
173 @Override
174 public ActivityInfo getReceiverInfo(ComponentName className, int flags)
175 throws NameNotFoundException {
176 throw new UnsupportedOperationException();
177 }
178
179 @Override
180 public ServiceInfo getServiceInfo(ComponentName className, int flags)
181 throws NameNotFoundException {
182 throw new UnsupportedOperationException();
183 }
184
185 @Override
Dianne Hackborn361199b2010-08-30 17:42:07 -0700186 public ProviderInfo getProviderInfo(ComponentName className, int flags)
187 throws NameNotFoundException {
188 throw new UnsupportedOperationException();
189 }
190
191 @Override
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800192 public List<PackageInfo> getInstalledPackages(int flags) {
193 throw new UnsupportedOperationException();
194 }
195
Dianne Hackborne7991752013-01-16 17:56:46 -0800196 @Override
197 public List<PackageInfo> getPackagesHoldingPermissions(String[] permissions,
198 int flags) {
199 throw new UnsupportedOperationException();
200 }
201
Amith Yamasani151ec4c2012-09-07 19:25:16 -0700202 /** @hide */
203 @Override
Jeff Sharkeye06b4d12016-01-06 14:51:50 -0700204 public List<PackageInfo> getInstalledPackagesAsUser(int flags, int userId) {
Amith Yamasani151ec4c2012-09-07 19:25:16 -0700205 throw new UnsupportedOperationException();
206 }
207
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800208 @Override
209 public int checkPermission(String permName, String pkgName) {
210 throw new UnsupportedOperationException();
211 }
212
213 @Override
Svet Ganovad3b2972015-07-07 22:49:17 -0700214 public boolean isPermissionRevokedByPolicy(String permName, String pkgName) {
215 throw new UnsupportedOperationException();
216 }
217
Svet Ganovf1b7f202015-07-29 08:33:42 -0700218 /** @hide */
219 @Override
220 public String getPermissionControllerPackageName() {
221 throw new UnsupportedOperationException();
222 }
223
Svet Ganovad3b2972015-07-07 22:49:17 -0700224 @Override
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800225 public boolean addPermission(PermissionInfo info) {
226 throw new UnsupportedOperationException();
227 }
228
229 @Override
Dianne Hackbornd7c09682010-03-30 10:42:20 -0700230 public boolean addPermissionAsync(PermissionInfo info) {
231 throw new UnsupportedOperationException();
232 }
233
234 @Override
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800235 public void removePermission(String name) {
236 throw new UnsupportedOperationException();
237 }
238
Dianne Hackborne639da72012-02-21 15:11:13 -0800239 /** @hide */
240 @Override
Svet Ganov8c7f7002015-05-07 10:48:44 -0700241 public void grantRuntimePermission(String packageName, String permissionName,
242 UserHandle user) {
Dianne Hackborne639da72012-02-21 15:11:13 -0800243 throw new UnsupportedOperationException();
244 }
245
246 /** @hide */
247 @Override
Svet Ganov8c7f7002015-05-07 10:48:44 -0700248 public void revokeRuntimePermission(String packageName, String permissionName,
249 UserHandle user) {
250 throw new UnsupportedOperationException();
251 }
252
253 /** @hide */
254 @Override
255 public int getPermissionFlags(String permissionName, String packageName, UserHandle user) {
256 throw new UnsupportedOperationException();
257 }
258
259 /** @hide */
260 @Override
261 public void updatePermissionFlags(String permissionName, String packageName,
262 int flagMask, int flagValues, UserHandle user) {
Dianne Hackborne639da72012-02-21 15:11:13 -0800263 throw new UnsupportedOperationException();
264 }
265
Svetoslav20770dd2015-05-29 15:43:04 -0700266 /** @hide */
267 @Override
268 public boolean shouldShowRequestPermissionRationale(String permission) {
269 throw new UnsupportedOperationException();
270 }
271
Svetoslavf7c06eb2015-06-10 18:43:22 -0700272 /** @hide */
273 @Override
274 public void addOnPermissionsChangeListener(OnPermissionsChangedListener listener) {
275 throw new UnsupportedOperationException();
276 }
277
278 /** @hide */
279 @Override
280 public void removeOnPermissionsChangeListener(OnPermissionsChangedListener listener) {
281 throw new UnsupportedOperationException();
282 }
283
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800284 @Override
285 public int checkSignatures(String pkg1, String pkg2) {
286 throw new UnsupportedOperationException();
287 }
288
289 @Override
Dianne Hackborn766cbfe2009-08-12 18:33:39 -0700290 public int checkSignatures(int uid1, int uid2) {
291 throw new UnsupportedOperationException();
292 }
293
294 @Override
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800295 public String[] getPackagesForUid(int uid) {
296 throw new UnsupportedOperationException();
297 }
298
299 @Override
300 public String getNameForUid(int uid) {
301 throw new UnsupportedOperationException();
302 }
Amith Yamasani4b2e9342011-03-31 12:38:53 -0700303
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800304 /**
305 * @hide - to match hiding in superclass
306 */
307 @Override
308 public int getUidForSharedUser(String sharedUserName) {
309 throw new UnsupportedOperationException();
310 }
311
312 @Override
313 public List<ApplicationInfo> getInstalledApplications(int flags) {
314 throw new UnsupportedOperationException();
315 }
316
Svet Ganov2acf0632015-11-24 19:10:59 -0800317 /** @hide */
318 @Override
319 public List<EphemeralApplicationInfo> getEphemeralApplications() {
320 throw new UnsupportedOperationException();
321 }
322
323 /** @hide */
324 @Override
325 public Drawable getEphemeralApplicationIcon(String packageName) {
326 throw new UnsupportedOperationException();
327 }
328
Todd Kennedy12705132016-01-05 15:17:57 -0800329 /** @hide */
Svet Ganov2acf0632015-11-24 19:10:59 -0800330 @Override
331 public byte[] getEphemeralCookie() {
332 return new byte[0];
333 }
334
Todd Kennedy12705132016-01-05 15:17:57 -0800335 /** @hide */
Svet Ganov2acf0632015-11-24 19:10:59 -0800336 @Override
337 public boolean isEphemeralApplication() {
338 return false;
339 }
340
Todd Kennedy12705132016-01-05 15:17:57 -0800341 /** @hide */
Svet Ganov2acf0632015-11-24 19:10:59 -0800342 @Override
343 public int getEphemeralCookieMaxSizeBytes() {
344 return 0;
345 }
346
Todd Kennedy12705132016-01-05 15:17:57 -0800347 /** @hide */
Svet Ganov2acf0632015-11-24 19:10:59 -0800348 @Override
349 public boolean setEphemeralCookie(@NonNull byte[] cookie) {
350 return false;
351 }
352
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800353 @Override
354 public ResolveInfo resolveActivity(Intent intent, int flags) {
355 throw new UnsupportedOperationException();
356 }
357
Svetoslav Ganov58d37b52012-09-18 12:04:19 -0700358 /** @hide */
359 @Override
360 public ResolveInfo resolveActivityAsUser(Intent intent, int flags, int userId) {
361 throw new UnsupportedOperationException();
362 }
363
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800364 @Override
365 public List<ResolveInfo> queryIntentActivities(Intent intent, int flags) {
366 throw new UnsupportedOperationException();
367 }
368
Amith Yamasani151ec4c2012-09-07 19:25:16 -0700369 /** @hide */
370 @Override
Svetoslav Ganov58d37b52012-09-18 12:04:19 -0700371 public List<ResolveInfo> queryIntentActivitiesAsUser(Intent intent,
Amith Yamasani151ec4c2012-09-07 19:25:16 -0700372 int flags, int userId) {
373 throw new UnsupportedOperationException();
374 }
375
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800376 @Override
377 public List<ResolveInfo> queryIntentActivityOptions(ComponentName caller,
378 Intent[] specifics, Intent intent, int flags) {
379 throw new UnsupportedOperationException();
380 }
381
382 @Override
383 public List<ResolveInfo> queryBroadcastReceivers(Intent intent, int flags) {
384 throw new UnsupportedOperationException();
385 }
386
Amith Yamasanif203aee2012-08-29 18:41:53 -0700387 /** @hide */
388 @Override
Jeff Sharkeye06b4d12016-01-06 14:51:50 -0700389 public List<ResolveInfo> queryBroadcastReceiversAsUser(Intent intent, int flags, int userId) {
Amith Yamasanif203aee2012-08-29 18:41:53 -0700390 throw new UnsupportedOperationException();
391 }
392
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800393 @Override
394 public ResolveInfo resolveService(Intent intent, int flags) {
395 throw new UnsupportedOperationException();
396 }
397
398 @Override
399 public List<ResolveInfo> queryIntentServices(Intent intent, int flags) {
400 throw new UnsupportedOperationException();
401 }
402
Svetoslav Ganov58d37b52012-09-18 12:04:19 -0700403 /** @hide */
404 @Override
405 public List<ResolveInfo> queryIntentServicesAsUser(Intent intent, int flags, int userId) {
406 throw new UnsupportedOperationException();
407 }
408
Jeff Sharkey85f5f812013-10-07 10:16:12 -0700409 /** @hide */
410 @Override
411 public List<ResolveInfo> queryIntentContentProvidersAsUser(
412 Intent intent, int flags, int userId) {
413 throw new UnsupportedOperationException();
414 }
415
416 @Override
417 public List<ResolveInfo> queryIntentContentProviders(Intent intent, int flags) {
418 throw new UnsupportedOperationException();
419 }
420
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800421 @Override
422 public ProviderInfo resolveContentProvider(String name, int flags) {
423 throw new UnsupportedOperationException();
424 }
425
Alexandra Gherghina0363c3e2014-06-23 13:34:59 +0100426 /** @hide */
427 @Override
428 public ProviderInfo resolveContentProviderAsUser(String name, int flags, int userId) {
429 throw new UnsupportedOperationException();
430 }
431
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800432 @Override
433 public List<ProviderInfo> queryContentProviders(String processName, int uid, int flags) {
434 throw new UnsupportedOperationException();
435 }
436
437 @Override
438 public InstrumentationInfo getInstrumentationInfo(ComponentName className, int flags)
439 throws NameNotFoundException {
440 throw new UnsupportedOperationException();
441 }
442
443 @Override
444 public List<InstrumentationInfo> queryInstrumentation(
445 String targetPackage, int flags) {
446 throw new UnsupportedOperationException();
447 }
448
449 @Override
450 public Drawable getDrawable(String packageName, int resid, ApplicationInfo appInfo) {
451 throw new UnsupportedOperationException();
452 }
453
454 @Override
455 public Drawable getActivityIcon(ComponentName activityName)
456 throws NameNotFoundException {
457 throw new UnsupportedOperationException();
458 }
459
460 @Override
461 public Drawable getActivityIcon(Intent intent) throws NameNotFoundException {
462 throw new UnsupportedOperationException();
463 }
464
465 @Override
466 public Drawable getDefaultActivityIcon() {
467 throw new UnsupportedOperationException();
468 }
469
470 @Override
Jose Limaf78e3122014-03-06 12:13:15 -0800471 public Drawable getActivityBanner(ComponentName activityName)
472 throws NameNotFoundException {
473 throw new UnsupportedOperationException();
474 }
475
476 @Override
477 public Drawable getActivityBanner(Intent intent) throws NameNotFoundException {
478 throw new UnsupportedOperationException();
479 }
480
481 @Override
482 public Drawable getApplicationBanner(ApplicationInfo info) {
483 throw new UnsupportedOperationException();
484 }
485
486 @Override
487 public Drawable getApplicationBanner(String packageName) throws NameNotFoundException {
488 throw new UnsupportedOperationException();
489 }
490
491 @Override
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800492 public Drawable getApplicationIcon(ApplicationInfo info) {
493 throw new UnsupportedOperationException();
494 }
495
496 @Override
497 public Drawable getApplicationIcon(String packageName) throws NameNotFoundException {
498 throw new UnsupportedOperationException();
499 }
Amith Yamasani4b2e9342011-03-31 12:38:53 -0700500
Adam Powell81cd2e92010-04-21 16:35:18 -0700501 @Override
502 public Drawable getActivityLogo(ComponentName activityName) throws NameNotFoundException {
503 throw new UnsupportedOperationException();
504 }
505
506 @Override
507 public Drawable getActivityLogo(Intent intent) throws NameNotFoundException {
508 throw new UnsupportedOperationException();
509 }
510
511 @Override
512 public Drawable getApplicationLogo(ApplicationInfo info) {
513 throw new UnsupportedOperationException();
514 }
515
516 @Override
517 public Drawable getApplicationLogo(String packageName) throws NameNotFoundException {
518 throw new UnsupportedOperationException();
519 }
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800520
Vadim Tryshev66ae66a2016-02-18 15:41:21 -0800521 /** @hide */
522 @Override
523 public Drawable getManagedUserBadgedDrawable(Drawable drawable, Rect badgeLocation,
524 int badgeDensity) {
525 throw new UnsupportedOperationException();
526 }
527
528
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800529 @Override
Svetoslavc7d62f02014-09-04 15:39:54 -0700530 public Drawable getUserBadgedIcon(Drawable icon, UserHandle user) {
531 throw new UnsupportedOperationException();
532 }
533
534 @Override
535 public Drawable getUserBadgedDrawableForDensity(Drawable drawable, UserHandle user,
536 Rect badgeLocation,
537 int badgeDensity) {
538 throw new UnsupportedOperationException();
539 }
540
541 /** @hide */
542 @Override
543 public Drawable getUserBadgeForDensity(UserHandle user, int density) {
544 throw new UnsupportedOperationException();
545 }
546
Selim Cineke6ff9462016-01-15 15:07:06 -0800547 /** @hide */
548 @Override
549 public Drawable getUserBadgeForDensityNoBackground(UserHandle user, int density) {
550 throw new UnsupportedOperationException();
551 }
552
Svetoslavc7d62f02014-09-04 15:39:54 -0700553 @Override
554 public CharSequence getUserBadgedLabel(CharSequence label, UserHandle user) {
555 throw new UnsupportedOperationException();
556 }
557
558 @Override
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800559 public CharSequence getText(String packageName, int resid, ApplicationInfo appInfo) {
560 throw new UnsupportedOperationException();
561 }
562
563 @Override
564 public XmlResourceParser getXml(String packageName, int resid,
565 ApplicationInfo appInfo) {
566 throw new UnsupportedOperationException();
567 }
568
569 @Override
570 public CharSequence getApplicationLabel(ApplicationInfo info) {
571 throw new UnsupportedOperationException();
572 }
573
574 @Override
575 public Resources getResourcesForActivity(ComponentName activityName)
576 throws NameNotFoundException {
577 throw new UnsupportedOperationException();
578 }
579
580 @Override
581 public Resources getResourcesForApplication(ApplicationInfo app) {
582 throw new UnsupportedOperationException();
583 }
584
585 @Override
586 public Resources getResourcesForApplication(String appPackageName)
587 throws NameNotFoundException {
588 throw new UnsupportedOperationException();
589 }
590
Amith Yamasani98edc952012-09-25 14:09:27 -0700591 /** @hide */
592 @Override
593 public Resources getResourcesForApplicationAsUser(String appPackageName, int userId) {
594 throw new UnsupportedOperationException();
595 }
596
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800597 @Override
598 public PackageInfo getPackageArchiveInfo(String archiveFilePath, int flags) {
599 throw new UnsupportedOperationException();
600 }
601
Dianne Hackbornade3eca2009-05-11 18:54:45 -0700602 /**
603 * @hide - to match hiding in superclass
604 */
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800605 @Override
606 public void installPackage(Uri packageURI, IPackageInstallObserver observer,
Jacek Surazski65e13172009-04-28 15:26:38 +0200607 int flags, String installerPackageName) {
608 throw new UnsupportedOperationException();
609 }
Suchi Amalapurapu8946dd32010-02-19 09:19:34 -0800610
Dianne Hackborn880119b2010-11-18 22:26:40 -0800611 @Override
612 public void setInstallerPackageName(String targetPackage,
613 String installerPackageName) {
614 throw new UnsupportedOperationException();
615 }
616
Jacek Surazski65e13172009-04-28 15:26:38 +0200617 @Override
618 public String getInstallerPackageName(String packageName) {
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800619 throw new UnsupportedOperationException();
620 }
621
Jeff Sharkey620b32b2015-04-23 19:36:02 -0700622 /** {@hide} */
623 @Override
624 public int getMoveStatus(int moveId) {
625 throw new UnsupportedOperationException();
626 }
627
628 /** {@hide} */
629 @Override
630 public void registerMoveCallback(MoveCallback callback, Handler handler) {
631 throw new UnsupportedOperationException();
632 }
633
634 /** {@hide} */
635 @Override
636 public void unregisterMoveCallback(MoveCallback callback) {
637 throw new UnsupportedOperationException();
638 }
639
640 /** {@hide} */
641 @Override
642 public int movePackage(String packageName, VolumeInfo vol) {
643 throw new UnsupportedOperationException();
644 }
645
646 /** {@hide} */
647 @Override
648 public VolumeInfo getPackageCurrentVolume(ApplicationInfo app) {
649 throw new UnsupportedOperationException();
650 }
651
652 /** {@hide} */
653 @Override
654 public List<VolumeInfo> getPackageCandidateVolumes(ApplicationInfo app) {
655 throw new UnsupportedOperationException();
656 }
657
658 /** {@hide} */
659 @Override
660 public int movePrimaryStorage(VolumeInfo vol) {
661 throw new UnsupportedOperationException();
662 }
663
664 /** {@hide} */
665 @Override
666 public VolumeInfo getPrimaryStorageCurrentVolume() {
667 throw new UnsupportedOperationException();
668 }
669
670 /** {@hide} */
671 @Override
672 public List<VolumeInfo> getPrimaryStorageCandidateVolumes() {
673 throw new UnsupportedOperationException();
674 }
675
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800676 /**
677 * @hide - to match hiding in superclass
678 */
679 @Override
680 public void clearApplicationUserData(
681 String packageName, IPackageDataObserver observer) {
682 throw new UnsupportedOperationException();
683 }
Amith Yamasani4b2e9342011-03-31 12:38:53 -0700684
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800685 /**
686 * @hide - to match hiding in superclass
687 */
688 @Override
689 public void deleteApplicationCacheFiles(
690 String packageName, IPackageDataObserver observer) {
691 throw new UnsupportedOperationException();
692 }
Amith Yamasani4b2e9342011-03-31 12:38:53 -0700693
Jeff Sharkey529f91f2015-04-18 20:23:13 -0700694 /** {@hide} */
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800695 @Override
Jeff Sharkey529f91f2015-04-18 20:23:13 -0700696 public void freeStorageAndNotify(String volumeUuid, long idealStorageSize,
697 IPackageDataObserver observer) {
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800698 throw new UnsupportedOperationException();
699 }
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800700
Jeff Sharkey529f91f2015-04-18 20:23:13 -0700701 /** {@hide} */
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800702 @Override
Jeff Sharkey529f91f2015-04-18 20:23:13 -0700703 public void freeStorage(String volumeUuid, long idealStorageSize, IntentSender pi) {
Suchi Amalapurapu1ccac752009-06-12 10:09:58 -0700704 throw new UnsupportedOperationException();
705 }
706
707 /**
708 * @hide - to match hiding in superclass
709 */
710 @Override
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800711 public void deletePackage(
712 String packageName, IPackageDeleteObserver observer, int flags) {
713 throw new UnsupportedOperationException();
714 }
715
Nicolas Prevot9a80e532015-09-23 15:49:28 +0100716 /**
717 * @hide - to match hiding in superclass
718 */
719 @Override
720 public void deletePackageAsUser(
721 String packageName, IPackageDeleteObserver observer, int flags, int userId) {
722 throw new UnsupportedOperationException();
723 }
724
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800725 @Override
726 public void addPackageToPreferred(String packageName) {
727 throw new UnsupportedOperationException();
728 }
729
730 @Override
731 public void removePackageFromPreferred(String packageName) {
732 throw new UnsupportedOperationException();
733 }
734
735 @Override
736 public List<PackageInfo> getPreferredPackages(int flags) {
737 throw new UnsupportedOperationException();
738 }
739
740 @Override
741 public void setComponentEnabledSetting(ComponentName componentName,
742 int newState, int flags) {
743 throw new UnsupportedOperationException();
744 }
745
746 @Override
747 public int getComponentEnabledSetting(ComponentName componentName) {
748 throw new UnsupportedOperationException();
749 }
750
751 @Override
752 public void setApplicationEnabledSetting(String packageName, int newState, int flags) {
753 throw new UnsupportedOperationException();
754 }
Amith Yamasani4b2e9342011-03-31 12:38:53 -0700755
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800756 @Override
757 public int getApplicationEnabledSetting(String packageName) {
758 throw new UnsupportedOperationException();
759 }
760
761 @Override
762 public void addPreferredActivity(IntentFilter filter,
763 int match, ComponentName[] set, ComponentName activity) {
764 throw new UnsupportedOperationException();
765 }
Amith Yamasani4b2e9342011-03-31 12:38:53 -0700766
Satish Sampath8dbe6122009-06-02 23:35:54 +0100767 /**
768 * @hide - to match hiding in superclass
769 */
770 @Override
771 public void replacePreferredActivity(IntentFilter filter,
772 int match, ComponentName[] set, ComponentName activity) {
773 throw new UnsupportedOperationException();
774 }
775
776
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800777 @Override
778 public void clearPackagePreferredActivities(String packageName) {
779 throw new UnsupportedOperationException();
780 }
781
782 /**
783 * @hide - to match hiding in superclass
784 */
785 @Override
Jeff Sharkeye06b4d12016-01-06 14:51:50 -0700786 public void getPackageSizeInfoAsUser(String packageName, int userHandle,
Dianne Hackborn0c380492012-08-20 17:23:30 -0700787 IPackageStatsObserver observer) {
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800788 throw new UnsupportedOperationException();
789 }
790
791 @Override
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800792 public int getPreferredActivities(List<IntentFilter> outFilters,
793 List<ComponentName> outActivities, String packageName) {
794 throw new UnsupportedOperationException();
795 }
Amith Yamasani4b2e9342011-03-31 12:38:53 -0700796
Christopher Tatea2a0850d2013-09-05 16:38:58 -0700797 /** @hide - hidden in superclass */
798 @Override
799 public ComponentName getHomeActivities(List<ResolveInfo> outActivities) {
800 throw new UnsupportedOperationException();
801 }
802
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800803 @Override
804 public String[] getSystemSharedLibraryNames() {
805 throw new UnsupportedOperationException();
806 }
Amith Yamasani4b2e9342011-03-31 12:38:53 -0700807
Svet Ganovd7b1f4112016-02-09 18:49:23 -0800808 /** @hide */
809 @Override
810 public @Nullable String getServicesSystemSharedLibraryPackageName() {
811 throw new UnsupportedOperationException();
812 }
813
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800814 @Override
Dianne Hackborn49237342009-08-27 20:08:01 -0700815 public FeatureInfo[] getSystemAvailableFeatures() {
816 throw new UnsupportedOperationException();
817 }
Amith Yamasani4b2e9342011-03-31 12:38:53 -0700818
Dianne Hackborn49237342009-08-27 20:08:01 -0700819 @Override
Dianne Hackborn039c68e2009-09-26 16:39:23 -0700820 public boolean hasSystemFeature(String name) {
821 throw new UnsupportedOperationException();
822 }
Amith Yamasani4b2e9342011-03-31 12:38:53 -0700823
Dianne Hackborn039c68e2009-09-26 16:39:23 -0700824 @Override
Jeff Sharkey115d2c12016-02-15 17:25:57 -0700825 public boolean hasSystemFeature(String name, int version) {
826 throw new UnsupportedOperationException();
827 }
828
829 @Override
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800830 public boolean isSafeMode() {
831 throw new UnsupportedOperationException();
832 }
Amith Yamasani4b2e9342011-03-31 12:38:53 -0700833
dcashmanc6f22492014-08-14 09:54:51 -0700834 /** @hide */
dcashman9d2f4412014-06-09 09:27:54 -0700835 @Override
836 public KeySet getKeySetByAlias(String packageName, String alias) {
837 throw new UnsupportedOperationException();
838 }
839
dcashmanc6f22492014-08-14 09:54:51 -0700840 /** @hide */
dcashman9d2f4412014-06-09 09:27:54 -0700841 @Override
842 public KeySet getSigningKeySet(String packageName) {
843 throw new UnsupportedOperationException();
844 }
845
dcashmanc6f22492014-08-14 09:54:51 -0700846 /** @hide */
dcashman9d2f4412014-06-09 09:27:54 -0700847 @Override
848 public boolean isSignedBy(String packageName, KeySet ks) {
849 throw new UnsupportedOperationException();
850 }
851
dcashmanc6f22492014-08-14 09:54:51 -0700852 /** @hide */
dcashman9d2f4412014-06-09 09:27:54 -0700853 @Override
854 public boolean isSignedByExactly(String packageName, KeySet ks) {
855 throw new UnsupportedOperationException();
856 }
857
Andrei Stingaceanu1e283912015-11-26 15:26:28 +0000858 /** @hide */
859 @Override
Andrei Stingaceanueb84b182016-01-26 18:39:55 +0000860 public String[] setPackagesSuspendedAsUser(String[] packageNames, boolean hidden, int userId) {
Andrei Stingaceanu355b2322016-02-12 16:43:51 +0000861 throw new UnsupportedOperationException();
862 }
863
864 /** @hide */
865 @Override
866 public boolean isPackageSuspendedForUser(String packageName, int userId) {
867 throw new UnsupportedOperationException();
Andrei Stingaceanu1e283912015-11-26 15:26:28 +0000868 }
869
Amith Yamasani4b2e9342011-03-31 12:38:53 -0700870 /**
871 * @hide
872 */
873 @Override
Amith Yamasanie5bcff62014-07-19 15:44:09 -0700874 public boolean setApplicationHiddenSettingAsUser(String packageName, boolean hidden,
Amith Yamasani655d0e22013-06-12 14:19:10 -0700875 UserHandle user) {
876 return false;
877 }
878
879 /**
880 * @hide
881 */
882 @Override
Amith Yamasanie5bcff62014-07-19 15:44:09 -0700883 public boolean getApplicationHiddenSettingAsUser(String packageName, UserHandle user) {
Amith Yamasani655d0e22013-06-12 14:19:10 -0700884 return false;
885 }
886
887 /**
888 * @hide
889 */
890 @Override
Nicolas Prevot9a80e532015-09-23 15:49:28 +0100891 public int installExistingPackage(String packageName) throws NameNotFoundException {
892 throw new UnsupportedOperationException();
893 }
894
895 /**
896 * @hide
897 */
898 @Override
899 public int installExistingPackageAsUser(String packageName, int userId)
Dianne Hackborn7767eac2012-08-23 18:25:40 -0700900 throws NameNotFoundException {
901 throw new UnsupportedOperationException();
902 }
903
Kenny Root5ab21572011-07-27 11:11:19 -0700904 @Override
Kenny Root3a9b5fb2011-09-20 14:15:38 -0700905 public void verifyPendingInstall(int id, int verificationCode) {
Kenny Root5ab21572011-07-27 11:11:19 -0700906 throw new UnsupportedOperationException();
907 }
Kenny Root0aaa0d92011-09-12 16:42:55 -0700908
rich canningsd9ef3e52012-08-22 14:28:05 -0700909 @Override
910 public void extendVerificationTimeout(int id, int verificationCodeAtTimeout,
911 long millisecondsToDelay) {
912 throw new UnsupportedOperationException();
913 }
914
Kenny Root0aaa0d92011-09-12 16:42:55 -0700915 /**
916 * @hide
917 */
918 @Override
Fabrice Di Meglio1c1b4712014-11-19 17:12:32 -0800919 public void verifyIntentFilter(int id, int verificationCode, List<String> outFailedDomains) {
920 throw new UnsupportedOperationException();
921 }
922
923 /**
924 * @hide
925 */
926 @Override
Jeff Sharkeye06b4d12016-01-06 14:51:50 -0700927 public int getIntentVerificationStatusAsUser(String packageName, int userId) {
Fabrice Di Meglio1c1b4712014-11-19 17:12:32 -0800928 throw new UnsupportedOperationException();
929 }
930
931 /**
932 * @hide
933 */
934 @Override
Jeff Sharkeye06b4d12016-01-06 14:51:50 -0700935 public boolean updateIntentVerificationStatusAsUser(String packageName, int status, int userId) {
Fabrice Di Meglio1c1b4712014-11-19 17:12:32 -0800936 throw new UnsupportedOperationException();
937 }
938
939 /**
940 * @hide
941 */
942 @Override
943 public List<IntentFilterVerificationInfo> getIntentFilterVerifications(String packageName) {
944 throw new UnsupportedOperationException();
945 }
946
Fabrice Di Meglio07885952015-04-06 19:41:28 -0700947 @Override
948 public List<IntentFilter> getAllIntentFilters(String packageName) {
949 throw new UnsupportedOperationException();
950 }
951
Jeff Sharkeye06b4d12016-01-06 14:51:50 -0700952 /** {@removed} */
953 @Deprecated
Fabrice Di Meglio62271722015-04-10 17:24:02 -0700954 public String getDefaultBrowserPackageName(int userId) {
955 throw new UnsupportedOperationException();
956 }
957
Jeff Sharkeye06b4d12016-01-06 14:51:50 -0700958 /** {@hide} */
Fabrice Di Meglio62271722015-04-10 17:24:02 -0700959 @Override
Jeff Sharkeye06b4d12016-01-06 14:51:50 -0700960 public String getDefaultBrowserPackageNameAsUser(int userId) {
961 throw new UnsupportedOperationException();
962 }
963
964 /** {@removed} */
965 @Deprecated
Fabrice Di Meglio62271722015-04-10 17:24:02 -0700966 public boolean setDefaultBrowserPackageName(String packageName, int userId) {
967 throw new UnsupportedOperationException();
968 }
969
Jeff Sharkeye06b4d12016-01-06 14:51:50 -0700970 /** {@hide} */
971 @Override
972 public boolean setDefaultBrowserPackageNameAsUser(String packageName, int userId) {
973 throw new UnsupportedOperationException();
974 }
975
Fabrice Di Meglio1c1b4712014-11-19 17:12:32 -0800976 /**
977 * @hide
978 */
979 @Override
Kenny Root0aaa0d92011-09-12 16:42:55 -0700980 public VerifierDeviceIdentity getVerifierDeviceIdentity() {
981 throw new UnsupportedOperationException();
982 }
Christopher Tatef1977b42014-03-24 16:25:51 -0700983
984 /**
985 * @hide
986 */
987 @Override
Jeff Hao9f60c082014-10-28 18:51:07 -0700988 public boolean isUpgrade() {
989 throw new UnsupportedOperationException();
990 }
991
992 /**
993 * @hide
994 */
995 @Override
Christopher Tatef1977b42014-03-24 16:25:51 -0700996 public void installPackage(Uri packageURI, PackageInstallObserver observer,
997 int flags, String installerPackageName) {
998 throw new UnsupportedOperationException();
999 }
1000
1001 /**
1002 * @hide
1003 */
1004 @Override
Nicolas Prevot63798c52014-05-27 13:22:38 +01001005 public void addCrossProfileIntentFilter(IntentFilter filter, int sourceUserId, int targetUserId,
1006 int flags) {
Nicolas Prevot81948992014-05-16 18:25:26 +01001007 throw new UnsupportedOperationException();
1008 }
1009
1010 /**
1011 * @hide
1012 */
1013 @Override
1014 public void clearCrossProfileIntentFilters(int sourceUserId) {
1015 throw new UnsupportedOperationException();
1016 }
1017
Jeff Sharkey3a44f3f2014-04-28 17:36:31 -07001018 /** {@hide} */
Jeff Sharkey16c8e3f2014-07-24 17:08:17 -07001019 public PackageInstaller getPackageInstaller() {
Jeff Sharkey6c833e02014-07-14 22:44:30 -07001020 throw new UnsupportedOperationException();
1021 }
1022
1023 /** {@hide} */
1024 @Override
1025 public boolean isPackageAvailable(String packageName) {
Jeff Sharkey3a44f3f2014-04-28 17:36:31 -07001026 throw new UnsupportedOperationException();
1027 }
Alexandra Gherghina6e2ae252014-06-12 16:03:58 +01001028
1029 /**
1030 * @hide
1031 */
Nicolas Prevot7f7b0c72014-06-23 15:59:38 +01001032 public Drawable loadItemIcon(PackageItemInfo itemInfo, ApplicationInfo appInfo) {
Nicolas Prevot88cc3462014-05-14 14:51:48 +01001033 throw new UnsupportedOperationException();
1034 }
Benjamin Franzec2d48b2014-10-01 15:38:43 +01001035
1036 /**
1037 * @hide
1038 */
1039 public Drawable loadUnbadgedItemIcon(PackageItemInfo itemInfo, ApplicationInfo appInfo) {
1040 throw new UnsupportedOperationException();
1041 }
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001042}