Debian Codegraph @

test-mock/src/android/test/mock/MockPackageManager.java

raw symbols SCIP
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
19 import android.annotation.NonNull;
20 import android.annotation.Nullable;
21 import android.content.ComponentName;
22 import android.content.Intent;
23 import android.content.IntentFilter;
24 import android.content.IntentSender;
25 import android.content.pm.ActivityInfo;
26 import android.content.pm.ApplicationInfo;
27 import android.content.pm.ChangedPackages;
28 import android.content.pm.FeatureInfo;
29 import android.content.pm.IPackageDataObserver;
30 import android.content.pm.IPackageDeleteObserver;
31 import android.content.pm.IPackageStatsObserver;
32 import android.content.pm.InstantAppInfo;
33 import android.content.pm.InstrumentationInfo;
34 import android.content.pm.IntentFilterVerificationInfo;
35 import android.content.pm.KeySet;
36 import android.content.pm.PackageInfo;
37 import android.content.pm.PackageInstaller;
38 import android.content.pm.PackageItemInfo;
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;
45 import android.content.pm.SharedLibraryInfo;
46 import android.content.pm.VerifierDeviceIdentity;
47 import android.content.pm.VersionedPackage;
48 import android.content.pm.dex.ArtManager;
49 import android.content.res.Resources;
50 import android.content.res.XmlResourceParser;
51 import android.graphics.Rect;
52 import android.graphics.drawable.Drawable;
53 import android.os.Handler;
54 import android.os.PersistableBundle;
55 import android.os.UserHandle;
56 import android.os.storage.VolumeInfo;
57
58 import java.util.List;
59 import java.util.Set;
60
61 /**
62 * A mock {@link android.content.pm.PackageManager} class. All methods are non-functional and throw
63 * {@link java.lang.UnsupportedOperationException}. Override it to provide the operations that you
64 * need.
65 *
66 * @deprecated Use a mocking framework like <a href="https://github.com/mockito/mockito">Mockito</a>.
67 * New tests should be written using the
68 * <a href="{@docRoot}tools/testing-support-library/index.html">Android Testing Support Library</a>.
69 */
70 @Deprecated
71 public class MockPackageManager extends PackageManager {
72
73 @Override
74 public PackageInfo getPackageInfo(String packageName, int flags) throws NameNotFoundException {
75 throw new UnsupportedOperationException();
76 }
77
78 @Override
79 public PackageInfo getPackageInfo(VersionedPackage versionedPackage,
80 int flags) throws NameNotFoundException {
81 throw new UnsupportedOperationException();
82 }
83
84 /** @hide */
85 @Override
86 public PackageInfo getPackageInfoAsUser(String packageName, int flags, int userId)
87 throws NameNotFoundException {
88 throw new UnsupportedOperationException();
89 }
90
91 @Override
92 public String[] currentToCanonicalPackageNames(String[] names) {
93 throw new UnsupportedOperationException();
94 }
95
96 @Override
97 public String[] canonicalToCurrentPackageNames(String[] names) {
98 throw new UnsupportedOperationException();
99 }
100
101 @Override
102 public Intent getLaunchIntentForPackage(String packageName) {
103 throw new UnsupportedOperationException();
104 }
105
106 @Override
107 public Intent getLeanbackLaunchIntentForPackage(String packageName) {
108 throw new UnsupportedOperationException();
109 }
110
111 /** @hide */
112 @Override
113 public Intent getCarLaunchIntentForPackage(String packageName) {
114 throw new UnsupportedOperationException();
115 }
116
117 @Override
118 public int[] getPackageGids(String packageName) throws NameNotFoundException {
119 throw new UnsupportedOperationException();
120 }
121
122 @Override
123 public int[] getPackageGids(String packageName, int flags) throws NameNotFoundException {
124 throw new UnsupportedOperationException();
125 }
126
127 @Override
128 public int getPackageUid(String packageName, int flags) throws NameNotFoundException {
129 throw new UnsupportedOperationException();
130 }
131
132 /** @hide */
133 @Override
134 public int getPackageUidAsUser(String packageName, int flags, int userHandle)
135 throws NameNotFoundException {
136 throw new UnsupportedOperationException();
137 }
138
139 /** @hide */
140 @Override
141 public int getPackageUidAsUser(String packageName, int userHandle)
142 throws NameNotFoundException {
143 throw new UnsupportedOperationException();
144 }
145
146 @Override
147 public PermissionInfo getPermissionInfo(String name, int flags)
148 throws NameNotFoundException {
149 throw new UnsupportedOperationException();
150 }
151
152 @Override
153 public List<PermissionInfo> queryPermissionsByGroup(String group, int flags)
154 throws NameNotFoundException {
155 throw new UnsupportedOperationException();
156 }
157
158 /** @hide */
159 @Override
160 public boolean arePermissionsIndividuallyControlled() {
161 return false;
162 }
163
164 /** @hide */
165 @Override
166 public boolean isWirelessConsentModeEnabled() {
167 return false;
168 }
169
170 @Override
171 public PermissionGroupInfo getPermissionGroupInfo(String name,
172 int flags) throws NameNotFoundException {
173 throw new UnsupportedOperationException();
174 }
175
176 @Override
177 public List<PermissionGroupInfo> getAllPermissionGroups(int flags) {
178 throw new UnsupportedOperationException();
179 }
180
181 @Override
182 public ApplicationInfo getApplicationInfo(String packageName, int flags)
183 throws NameNotFoundException {
184 throw new UnsupportedOperationException();
185 }
186
187 /** @hide */
188 @Override
189 public ApplicationInfo getApplicationInfoAsUser(String packageName, int flags, int userId)
190 throws NameNotFoundException {
191 throw new UnsupportedOperationException();
192 }
193
194 @Override
195 public ActivityInfo getActivityInfo(ComponentName className, int flags)
196 throws NameNotFoundException {
197 throw new UnsupportedOperationException();
198 }
199
200 @Override
201 public ActivityInfo getReceiverInfo(ComponentName className, int flags)
202 throws NameNotFoundException {
203 throw new UnsupportedOperationException();
204 }
205
206 @Override
207 public ServiceInfo getServiceInfo(ComponentName className, int flags)
208 throws NameNotFoundException {
209 throw new UnsupportedOperationException();
210 }
211
212 @Override
213 public ProviderInfo getProviderInfo(ComponentName className, int flags)
214 throws NameNotFoundException {
215 throw new UnsupportedOperationException();
216 }
217
218 @Override
219 public List<PackageInfo> getInstalledPackages(int flags) {
220 throw new UnsupportedOperationException();
221 }
222
223 @Override
224 public List<PackageInfo> getPackagesHoldingPermissions(String[] permissions,
225 int flags) {
226 throw new UnsupportedOperationException();
227 }
228
229 /** @hide */
230 @Override
231 public List<PackageInfo> getInstalledPackagesAsUser(int flags, int userId) {
232 throw new UnsupportedOperationException();
233 }
234
235 @Override
236 public int checkPermission(String permName, String pkgName) {
237 throw new UnsupportedOperationException();
238 }
239
240 @Override
241 public boolean canRequestPackageInstalls() {
242 throw new UnsupportedOperationException();
243 }
244
245 @Override
246 public boolean isPermissionRevokedByPolicy(String permName, String pkgName) {
247 throw new UnsupportedOperationException();
248 }
249
250 /** @hide */
251 @Override
252 public String getPermissionControllerPackageName() {
253 throw new UnsupportedOperationException();
254 }
255
256 @Override
257 public boolean addPermission(PermissionInfo info) {
258 throw new UnsupportedOperationException();
259 }
260
261 @Override
262 public boolean addPermissionAsync(PermissionInfo info) {
263 throw new UnsupportedOperationException();
264 }
265
266 @Override
267 public void removePermission(String name) {
268 throw new UnsupportedOperationException();
269 }
270
271 /** @hide */
272 @Override
273 public void grantRuntimePermission(String packageName, String permissionName,
274 UserHandle user) {
275 throw new UnsupportedOperationException();
276 }
277
278 /** @hide */
279 @Override
280 public void revokeRuntimePermission(String packageName, String permissionName,
281 UserHandle user) {
282 throw new UnsupportedOperationException();
283 }
284
285 /** @hide */
286 @Override
287 public int getPermissionFlags(String permissionName, String packageName, UserHandle user) {
288 throw new UnsupportedOperationException();
289 }
290
291 /** @hide */
292 @Override
293 public void updatePermissionFlags(String permissionName, String packageName,
294 int flagMask, int flagValues, UserHandle user) {
295 throw new UnsupportedOperationException();
296 }
297
298 /** @hide */
299 @Override
300 public @NonNull Set<String> getWhitelistedRestrictedPermissions(
301 @NonNull String packageName, @PermissionWhitelistFlags int whitelistFlags) {
302 throw new UnsupportedOperationException();
303 }
304
305 /** @hide */
306 @Override
307 public boolean addWhitelistedRestrictedPermission(@NonNull String packageName,
308 @NonNull String permission, @PermissionWhitelistFlags int whitelistFlags) {
309 throw new UnsupportedOperationException();
310 }
311
312 /** @hide */
313 @Override
314 public boolean removeWhitelistedRestrictedPermission(@NonNull String packageName,
315 @NonNull String permission, @PermissionWhitelistFlags int whitelistFlags) {
316 throw new UnsupportedOperationException();
317 }
318
319 /** @hide */
320 @Override
321 public boolean shouldShowRequestPermissionRationale(String permission) {
322 throw new UnsupportedOperationException();
323 }
324
325 /** @hide */
326 @Override
327 public void addOnPermissionsChangeListener(OnPermissionsChangedListener listener) {
328 throw new UnsupportedOperationException();
329 }
330
331 /** @hide */
332 @Override
333 public void removeOnPermissionsChangeListener(OnPermissionsChangedListener listener) {
334 throw new UnsupportedOperationException();
335 }
336
337 @Override
338 public int checkSignatures(String pkg1, String pkg2) {
339 throw new UnsupportedOperationException();
340 }
341
342 @Override
343 public int checkSignatures(int uid1, int uid2) {
344 throw new UnsupportedOperationException();
345 }
346
347 @Override
348 public String[] getPackagesForUid(int uid) {
349 throw new UnsupportedOperationException();
350 }
351
352 @Override
353 public String getNameForUid(int uid) {
354 throw new UnsupportedOperationException();
355 }
356
357 /** @hide */
358 @Override
359 public String[] getNamesForUids(int uid[]) {
360 throw new UnsupportedOperationException();
361 }
362
363 /**
364 * @hide - to match hiding in superclass
365 */
366 @Override
367 public int getUidForSharedUser(String sharedUserName) {
368 throw new UnsupportedOperationException();
369 }
370
371 @Override
372 public List<ApplicationInfo> getInstalledApplications(int flags) {
373 throw new UnsupportedOperationException();
374 }
375
376 /** @hide */
377 @Override
378 public List<ApplicationInfo> getInstalledApplicationsAsUser(int flags, int userId) {
379 throw new UnsupportedOperationException();
380 }
381
382 /** @hide */
383 @Override
384 public List<InstantAppInfo> getInstantApps() {
385 throw new UnsupportedOperationException();
386 }
387
388 /** @hide */
389 @Override
390 public Drawable getInstantAppIcon(String packageName) {
391 throw new UnsupportedOperationException();
392 }
393
394 /** @hide */
395 @Override
396 public byte[] getInstantAppCookie() {
397 throw new UnsupportedOperationException();
398 }
399
400 /** @hide */
401 @Override
402 public boolean isInstantApp() {
403 throw new UnsupportedOperationException();
404 }
405
406 /** @hide */
407 @Override
408 public boolean isInstantApp(String packageName) {
409 throw new UnsupportedOperationException();
410 }
411
412 /** @hide */
413 @Override
414 public int getInstantAppCookieMaxBytes() {
415 throw new UnsupportedOperationException();
416 }
417
418 /** @hide */
419 @Override
420 public int getInstantAppCookieMaxSize() {
421 throw new UnsupportedOperationException();
422 }
423
424 /** @hide */
425 @Override
426 public void clearInstantAppCookie() {
427 throw new UnsupportedOperationException();
428 }
429
430 /** @hide */
431 @Override
432 public void updateInstantAppCookie(@NonNull byte[] cookie) {
433 throw new UnsupportedOperationException();
434 }
435
436 /** @hide */
437 @Override
438 public boolean setInstantAppCookie(@NonNull byte[] cookie) {
439 throw new UnsupportedOperationException();
440 }
441
442 /** @hide */
443 @Override
444 public ChangedPackages getChangedPackages(int sequenceNumber) {
445 throw new UnsupportedOperationException();
446 }
447
448 @Override
449 public ResolveInfo resolveActivity(Intent intent, int flags) {
450 throw new UnsupportedOperationException();
451 }
452
453 /** @hide */
454 @Override
455 public ResolveInfo resolveActivityAsUser(Intent intent, int flags, int userId) {
456 throw new UnsupportedOperationException();
457 }
458
459 @Override
460 public List<ResolveInfo> queryIntentActivities(Intent intent, int flags) {
461 throw new UnsupportedOperationException();
462 }
463
464 /** @hide */
465 @Override
466 public List<ResolveInfo> queryIntentActivitiesAsUser(Intent intent,
467 int flags, int userId) {
468 throw new UnsupportedOperationException();
469 }
470
471 @Override
472 public List<ResolveInfo> queryIntentActivityOptions(ComponentName caller,
473 Intent[] specifics, Intent intent, int flags) {
474 throw new UnsupportedOperationException();
475 }
476
477 @Override
478 public List<ResolveInfo> queryBroadcastReceivers(Intent intent, int flags) {
479 throw new UnsupportedOperationException();
480 }
481
482 /** @hide */
483 @Override
484 public List<ResolveInfo> queryBroadcastReceiversAsUser(Intent intent, int flags, int userId) {
485 throw new UnsupportedOperationException();
486 }
487
488 @Override
489 public ResolveInfo resolveService(Intent intent, int flags) {
490 throw new UnsupportedOperationException();
491 }
492
493 @Override
494 public ResolveInfo resolveServiceAsUser(Intent intent, int flags, int userId) {
495 throw new UnsupportedOperationException();
496 }
497
498 @Override
499 public List<ResolveInfo> queryIntentServices(Intent intent, int flags) {
500 throw new UnsupportedOperationException();
501 }
502
503 /** @hide */
504 @Override
505 public List<ResolveInfo> queryIntentServicesAsUser(Intent intent, int flags, int userId) {
506 throw new UnsupportedOperationException();
507 }
508
509 /** @hide */
510 @Override
511 public List<ResolveInfo> queryIntentContentProvidersAsUser(
512 Intent intent, int flags, int userId) {
513 throw new UnsupportedOperationException();
514 }
515
516 @Override
517 public List<ResolveInfo> queryIntentContentProviders(Intent intent, int flags) {
518 throw new UnsupportedOperationException();
519 }
520
521 @Override
522 public ProviderInfo resolveContentProvider(String name, int flags) {
523 throw new UnsupportedOperationException();
524 }
525
526 /** @hide */
527 @Override
528 public ProviderInfo resolveContentProviderAsUser(String name, int flags, int userId) {
529 throw new UnsupportedOperationException();
530 }
531
532 @Override
533 public List<ProviderInfo> queryContentProviders(String processName, int uid, int flags) {
534 throw new UnsupportedOperationException();
535 }
536
537 @Override
538 public InstrumentationInfo getInstrumentationInfo(ComponentName className, int flags)
539 throws NameNotFoundException {
540 throw new UnsupportedOperationException();
541 }
542
543 @Override
544 public List<InstrumentationInfo> queryInstrumentation(
545 String targetPackage, int flags) {
546 throw new UnsupportedOperationException();
547 }
548
549 @Override
550 public Drawable getDrawable(String packageName, int resid, ApplicationInfo appInfo) {
551 throw new UnsupportedOperationException();
552 }
553
554 @Override
555 public Drawable getActivityIcon(ComponentName activityName)
556 throws NameNotFoundException {
557 throw new UnsupportedOperationException();
558 }
559
560 @Override
561 public Drawable getActivityIcon(Intent intent) throws NameNotFoundException {
562 throw new UnsupportedOperationException();
563 }
564
565 @Override
566 public Drawable getDefaultActivityIcon() {
567 throw new UnsupportedOperationException();
568 }
569
570 @Override
571 public Drawable getActivityBanner(ComponentName activityName)
572 throws NameNotFoundException {
573 throw new UnsupportedOperationException();
574 }
575
576 @Override
577 public Drawable getActivityBanner(Intent intent) throws NameNotFoundException {
578 throw new UnsupportedOperationException();
579 }
580
581 @Override
582 public Drawable getApplicationBanner(ApplicationInfo info) {
583 throw new UnsupportedOperationException();
584 }
585
586 @Override
587 public Drawable getApplicationBanner(String packageName) throws NameNotFoundException {
588 throw new UnsupportedOperationException();
589 }
590
591 @Override
592 public Drawable getApplicationIcon(ApplicationInfo info) {
593 throw new UnsupportedOperationException();
594 }
595
596 @Override
597 public Drawable getApplicationIcon(String packageName) throws NameNotFoundException {
598 throw new UnsupportedOperationException();
599 }
600
601 @Override
602 public Drawable getActivityLogo(ComponentName activityName) throws NameNotFoundException {
603 throw new UnsupportedOperationException();
604 }
605
606 @Override
607 public Drawable getActivityLogo(Intent intent) throws NameNotFoundException {
608 throw new UnsupportedOperationException();
609 }
610
611 @Override
612 public Drawable getApplicationLogo(ApplicationInfo info) {
613 throw new UnsupportedOperationException();
614 }
615
616 @Override
617 public Drawable getApplicationLogo(String packageName) throws NameNotFoundException {
618 throw new UnsupportedOperationException();
619 }
620
621 @Override
622 public Drawable getUserBadgedIcon(Drawable icon, UserHandle user) {
623 throw new UnsupportedOperationException();
624 }
625
626 @Override
627 public Drawable getUserBadgedDrawableForDensity(Drawable drawable, UserHandle user,
628 Rect badgeLocation,
629 int badgeDensity) {
630 throw new UnsupportedOperationException();
631 }
632
633 /** @hide */
634 @Override
635 public Drawable getUserBadgeForDensity(UserHandle user, int density) {
636 throw new UnsupportedOperationException();
637 }
638
639 /** @hide */
640 @Override
641 public Drawable getUserBadgeForDensityNoBackground(UserHandle user, int density) {
642 throw new UnsupportedOperationException();
643 }
644
645 @Override
646 public CharSequence getUserBadgedLabel(CharSequence label, UserHandle user) {
647 throw new UnsupportedOperationException();
648 }
649
650 @Override
651 public CharSequence getText(String packageName, int resid, ApplicationInfo appInfo) {
652 throw new UnsupportedOperationException();
653 }
654
655 @Override
656 public XmlResourceParser getXml(String packageName, int resid,
657 ApplicationInfo appInfo) {
658 throw new UnsupportedOperationException();
659 }
660
661 @Override
662 public CharSequence getApplicationLabel(ApplicationInfo info) {
663 throw new UnsupportedOperationException();
664 }
665
666 @Override
667 public Resources getResourcesForActivity(ComponentName activityName)
668 throws NameNotFoundException {
669 throw new UnsupportedOperationException();
670 }
671
672 @Override
673 public Resources getResourcesForApplication(ApplicationInfo app) {
674 throw new UnsupportedOperationException();
675 }
676
677 @Override
678 public Resources getResourcesForApplication(String appPackageName)
679 throws NameNotFoundException {
680 throw new UnsupportedOperationException();
681 }
682
683 /** @hide */
684 @Override
685 public Resources getResourcesForApplicationAsUser(String appPackageName, int userId) {
686 throw new UnsupportedOperationException();
687 }
688
689 @Override
690 public PackageInfo getPackageArchiveInfo(String archiveFilePath, int flags) {
691 throw new UnsupportedOperationException();
692 }
693
694 @Override
695 public void setInstallerPackageName(String targetPackage,
696 String installerPackageName) {
697 throw new UnsupportedOperationException();
698 }
699
700 /** @hide */
701 @Override
702 public void setUpdateAvailable(String packageName, boolean updateAvailable) {
703 throw new UnsupportedOperationException();
704 }
705
706 @Override
707 public String getInstallerPackageName(String packageName) {
708 throw new UnsupportedOperationException();
709 }
710
711 /** {@hide} */
712 @Override
713 public int getMoveStatus(int moveId) {
714 throw new UnsupportedOperationException();
715 }
716
717 /** {@hide} */
718 @Override
719 public void registerMoveCallback(MoveCallback callback, Handler handler) {
720 throw new UnsupportedOperationException();
721 }
722
723 /** {@hide} */
724 @Override
725 public void unregisterMoveCallback(MoveCallback callback) {
726 throw new UnsupportedOperationException();
727 }
728
729 /** {@hide} */
730 @Override
731 public int movePackage(String packageName, VolumeInfo vol) {
732 throw new UnsupportedOperationException();
733 }
734
735 /** {@hide} */
736 @Override
737 public VolumeInfo getPackageCurrentVolume(ApplicationInfo app) {
738 throw new UnsupportedOperationException();
739 }
740
741 /** {@hide} */
742 @Override
743 public List<VolumeInfo> getPackageCandidateVolumes(ApplicationInfo app) {
744 throw new UnsupportedOperationException();
745 }
746
747 /** {@hide} */
748 @Override
749 public int movePrimaryStorage(VolumeInfo vol) {
750 throw new UnsupportedOperationException();
751 }
752
753 /** {@hide} */
754 @Override
755 public VolumeInfo getPrimaryStorageCurrentVolume() {
756 throw new UnsupportedOperationException();
757 }
758
759 /** {@hide} */
760 @Override
761 public List<VolumeInfo> getPrimaryStorageCandidateVolumes() {
762 throw new UnsupportedOperationException();
763 }
764
765 /**
766 * @hide - to match hiding in superclass
767 */
768 @Override
769 public void clearApplicationUserData(
770 String packageName, IPackageDataObserver observer) {
771 throw new UnsupportedOperationException();
772 }
773
774 /**
775 * @hide - to match hiding in superclass
776 */
777 @Override
778 public void deleteApplicationCacheFiles(
779 String packageName, IPackageDataObserver observer) {
780 throw new UnsupportedOperationException();
781 }
782
783 /**
784 * @hide - to match hiding in superclass
785 */
786 @Override
787 public void deleteApplicationCacheFilesAsUser(String packageName, int userId,
788 IPackageDataObserver observer) {
789 throw new UnsupportedOperationException();
790 }
791
792 /** {@hide} */
793 @Override
794 public void freeStorageAndNotify(String volumeUuid, long idealStorageSize,
795 IPackageDataObserver observer) {
796 throw new UnsupportedOperationException();
797 }
798
799 /** {@hide} */
800 @Override
801 public void freeStorage(String volumeUuid, long idealStorageSize, IntentSender pi) {
802 throw new UnsupportedOperationException();
803 }
804
805 /**
806 * @hide - to match hiding in superclass
807 */
808 @Override
809 public void deletePackage(String packageName, IPackageDeleteObserver observer, int flags) {
810 throw new UnsupportedOperationException();
811 }
812
813 /**
814 * @hide - to match hiding in superclass
815 */
816 @Override
817 public void deletePackageAsUser(String packageName, IPackageDeleteObserver observer,
818 int flags, int userId) {
819 throw new UnsupportedOperationException();
820 }
821
822 @Override
823 public void addPackageToPreferred(String packageName) {
824 throw new UnsupportedOperationException();
825 }
826
827 @Override
828 public void removePackageFromPreferred(String packageName) {
829 throw new UnsupportedOperationException();
830 }
831
832 @Override
833 public List<PackageInfo> getPreferredPackages(int flags) {
834 throw new UnsupportedOperationException();
835 }
836
837 @Override
838 public void setComponentEnabledSetting(ComponentName componentName,
839 int newState, int flags) {
840 throw new UnsupportedOperationException();
841 }
842
843 @Override
844 public int getComponentEnabledSetting(ComponentName componentName) {
845 throw new UnsupportedOperationException();
846 }
847
848 @Override
849 public void setApplicationEnabledSetting(String packageName, int newState, int flags) {
850 throw new UnsupportedOperationException();
851 }
852
853 @Override
854 public int getApplicationEnabledSetting(String packageName) {
855 throw new UnsupportedOperationException();
856 }
857
858 /** @hide */
859 @Override
860 public void flushPackageRestrictionsAsUser(int userId) {
861 throw new UnsupportedOperationException();
862 }
863
864 @Override
865 public void addPreferredActivity(IntentFilter filter,
866 int match, ComponentName[] set, ComponentName activity) {
867 throw new UnsupportedOperationException();
868 }
869
870 /**
871 * @hide - to match hiding in superclass
872 */
873 @Override
874 public void replacePreferredActivity(IntentFilter filter,
875 int match, ComponentName[] set, ComponentName activity) {
876 throw new UnsupportedOperationException();
877 }
878
879
880 @Override
881 public void clearPackagePreferredActivities(String packageName) {
882 throw new UnsupportedOperationException();
883 }
884
885 /**
886 * @hide - to match hiding in superclass
887 */
888 @Override
889 public void getPackageSizeInfoAsUser(String packageName, int userHandle,
890 IPackageStatsObserver observer) {
891 throw new UnsupportedOperationException();
892 }
893
894 @Override
895 public int getPreferredActivities(List<IntentFilter> outFilters,
896 List<ComponentName> outActivities, String packageName) {
897 throw new UnsupportedOperationException();
898 }
899
900 /** @hide - hidden in superclass */
901 @Override
902 public ComponentName getHomeActivities(List<ResolveInfo> outActivities) {
903 throw new UnsupportedOperationException();
904 }
905
906 @Override
907 public String[] getSystemSharedLibraryNames() {
908 throw new UnsupportedOperationException();
909 }
910
911 @Override
912 public @NonNull List<SharedLibraryInfo> getSharedLibraries(int flags) {
913 throw new UnsupportedOperationException();
914 }
915
916 /** @hide */
917 @Override
918 public @NonNull List<SharedLibraryInfo> getSharedLibrariesAsUser(int flags, int userId) {
919 throw new UnsupportedOperationException();
920 }
921
922 /** @hide */
923 @Override
924 public @NonNull String getServicesSystemSharedLibraryPackageName() {
925 throw new UnsupportedOperationException();
926 }
927
928 /** @hide */
929 @Override
930 public @NonNull String getSharedSystemSharedLibraryPackageName() {
931 throw new UnsupportedOperationException();
932 }
933
934 @Override
935 public FeatureInfo[] getSystemAvailableFeatures() {
936 throw new UnsupportedOperationException();
937 }
938
939 @Override
940 public boolean hasSystemFeature(String name) {
941 throw new UnsupportedOperationException();
942 }
943
944 @Override
945 public boolean hasSystemFeature(String name, int version) {
946 throw new UnsupportedOperationException();
947 }
948
949 @Override
950 public boolean isSafeMode() {
951 throw new UnsupportedOperationException();
952 }
953
954 /** @hide */
955 @Override
956 public KeySet getKeySetByAlias(String packageName, String alias) {
957 throw new UnsupportedOperationException();
958 }
959
960 /** @hide */
961 @Override
962 public KeySet getSigningKeySet(String packageName) {
963 throw new UnsupportedOperationException();
964 }
965
966 /** @hide */
967 @Override
968 public boolean isSignedBy(String packageName, KeySet ks) {
969 throw new UnsupportedOperationException();
970 }
971
972 /** @hide */
973 @Override
974 public boolean isSignedByExactly(String packageName, KeySet ks) {
975 throw new UnsupportedOperationException();
976 }
977
978 /** @hide */
979 @Override
980 public String[] setPackagesSuspended(String[] packageNames, boolean hidden,
981 PersistableBundle appExtras, PersistableBundle launcherExtras, String dialogMessage) {
982 throw new UnsupportedOperationException();
983 }
984
985 /** @hide */
986 @Override
987 public boolean isPackageSuspendedForUser(String packageName, int userId) {
988 throw new UnsupportedOperationException();
989 }
990
991 /** @hide */
992 @Override
993 public void setApplicationCategoryHint(String packageName, int categoryHint) {
994 throw new UnsupportedOperationException();
995 }
996
997 /**
998 * @hide
999 */
1000 @Override
1001 public boolean setApplicationHiddenSettingAsUser(String packageName, boolean hidden,
1002 UserHandle user) {
1003 return false;
1004 }
1005
1006 /**
1007 * @hide
1008 */
1009 @Override
1010 public boolean getApplicationHiddenSettingAsUser(String packageName, UserHandle user) {
1011 return false;
1012 }
1013
1014 /**
1015 * @hide
1016 */
1017 @Override
1018 public int installExistingPackage(String packageName) throws NameNotFoundException {
1019 throw new UnsupportedOperationException();
1020 }
1021
1022 /**
1023 * @hide
1024 */
1025 @Override
1026 public int installExistingPackage(String packageName, int installReason)
1027 throws NameNotFoundException {
1028 throw new UnsupportedOperationException();
1029 }
1030
1031 /**
1032 * @hide
1033 */
1034 @Override
1035 public int installExistingPackageAsUser(String packageName, int userId)
1036 throws NameNotFoundException {
1037 throw new UnsupportedOperationException();
1038 }
1039
1040 @Override
1041 public void verifyPendingInstall(int id, int verificationCode) {
1042 throw new UnsupportedOperationException();
1043 }
1044
1045 @Override
1046 public void extendVerificationTimeout(int id, int verificationCodeAtTimeout,
1047 long millisecondsToDelay) {
1048 throw new UnsupportedOperationException();
1049 }
1050
1051 /**
1052 * @hide
1053 */
1054 @Override
1055 public void verifyIntentFilter(int id, int verificationCode, List<String> outFailedDomains) {
1056 throw new UnsupportedOperationException();
1057 }
1058
1059 /**
1060 * @hide
1061 */
1062 @Override
1063 public int getIntentVerificationStatusAsUser(String packageName, int userId) {
1064 throw new UnsupportedOperationException();
1065 }
1066
1067 /**
1068 * @hide
1069 */
1070 @Override
1071 public boolean updateIntentVerificationStatusAsUser(String packageName, int status, int userId) {
1072 throw new UnsupportedOperationException();
1073 }
1074
1075 /**
1076 * @hide
1077 */
1078 @Override
1079 public List<IntentFilterVerificationInfo> getIntentFilterVerifications(String packageName) {
1080 throw new UnsupportedOperationException();
1081 }
1082
1083 @Override
1084 public List<IntentFilter> getAllIntentFilters(String packageName) {
1085 throw new UnsupportedOperationException();
1086 }
1087
1088 /** {@removed} */
1089 @Deprecated
1090 public String getDefaultBrowserPackageName(int userId) {
1091 throw new UnsupportedOperationException();
1092 }
1093
1094 /** {@hide} */
1095 @Override
1096 public String getDefaultBrowserPackageNameAsUser(int userId) {
1097 throw new UnsupportedOperationException();
1098 }
1099
1100 /** {@removed} */
1101 @Deprecated
1102 public boolean setDefaultBrowserPackageName(String packageName, int userId) {
1103 throw new UnsupportedOperationException();
1104 }
1105
1106 /** {@hide} */
1107 @Override
1108 public boolean setDefaultBrowserPackageNameAsUser(String packageName, int userId) {
1109 throw new UnsupportedOperationException();
1110 }
1111
1112 /**
1113 * @hide
1114 */
1115 @Override
1116 public VerifierDeviceIdentity getVerifierDeviceIdentity() {
1117 throw new UnsupportedOperationException();
1118 }
1119
1120 /**
1121 * @hide
1122 */
1123 @Override
1124 public boolean isUpgrade() {
1125 throw new UnsupportedOperationException();
1126 }
1127
1128 /**
1129 * @hide
1130 */
1131 @Override
1132 public boolean isDeviceUpgrading() {
1133 throw new UnsupportedOperationException();
1134 }
1135
1136 /**
1137 * @hide
1138 */
1139 @Override
1140 public void addCrossProfileIntentFilter(IntentFilter filter, int sourceUserId, int targetUserId,
1141 int flags) {
1142 throw new UnsupportedOperationException();
1143 }
1144
1145 /**
1146 * @hide
1147 */
1148 @Override
1149 public void clearCrossProfileIntentFilters(int sourceUserId) {
1150 throw new UnsupportedOperationException();
1151 }
1152
1153 /** {@hide} */
1154 public PackageInstaller getPackageInstaller() {
1155 throw new UnsupportedOperationException();
1156 }
1157
1158 /** {@hide} */
1159 @Override
1160 public boolean isPackageAvailable(String packageName) {
1161 throw new UnsupportedOperationException();
1162 }
1163
1164 /**
1165 * @hide
1166 */
1167 public Drawable loadItemIcon(PackageItemInfo itemInfo, ApplicationInfo appInfo) {
1168 throw new UnsupportedOperationException();
1169 }
1170
1171 /**
1172 * @hide
1173 */
1174 public Drawable loadUnbadgedItemIcon(PackageItemInfo itemInfo, ApplicationInfo appInfo) {
1175 throw new UnsupportedOperationException();
1176 }
1177
1178 /**
1179 * @hide
1180 */
1181 public int getInstallReason(String packageName, UserHandle user) {
1182 throw new UnsupportedOperationException();
1183 }
1184
1185 /**
1186 * @hide
1187 */
1188 @Override
1189 public ComponentName getInstantAppResolverSettingsComponent() {
1190 throw new UnsupportedOperationException();
1191 }
1192
1193 /**
1194 * @hide
1195 */
1196 @Override
1197 public ComponentName getInstantAppInstallerComponent() {
1198 throw new UnsupportedOperationException();
1199 }
1200
1201 /**
1202 * @hide
1203 */
1204 public String getInstantAppAndroidId(String packageName, UserHandle user) {
1205 throw new UnsupportedOperationException();
1206 }
1207
1208 /**
1209 * @hide
1210 */
1211 @Override
1212 public void registerDexModule(String dexModulePath,
1213 @Nullable DexModuleRegisterCallback callback) {
1214 throw new UnsupportedOperationException();
1215 }
1216
1217 /**
1218 * @hide
1219 */
1220 @Override
1221 public ArtManager getArtManager() {
1222 throw new UnsupportedOperationException();
1223 }
1224
1225 /**
1226 * @hide
1227 */
1228 @Override
1229 public void setHarmfulAppWarning(String packageName, CharSequence warning) {
1230 throw new UnsupportedOperationException();
1231 }
1232
1233 /**
1234 * @hide
1235 */
1236 @Override
1237 public CharSequence getHarmfulAppWarning(String packageName) {
1238 throw new UnsupportedOperationException();
1239 }
1240
1241 @Override
1242 public boolean hasSigningCertificate(
1243 String packageName, byte[] certificate, @PackageManager.CertificateInputType int type) {
1244 throw new UnsupportedOperationException();
1245 }
1246
1247 @Override
1248 public boolean hasSigningCertificate(
1249 int uid, byte[] certificate, @PackageManager.CertificateInputType int type) {
1250 throw new UnsupportedOperationException();
1251 }
1252 }