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