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