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 getInstantAppCookieMaxBytes() { 375 throw new UnsupportedOperationException(); 376 } 377 378 /** @hide */ 379 @Override 380 public int getInstantAppCookieMaxSize() { 381 throw new UnsupportedOperationException(); 382 } 383 384 /** @hide */ 385 @Override 386 public void clearInstantAppCookie() { 387 throw new UnsupportedOperationException(); 388 } 389 390 /** @hide */ 391 @Override 392 public void updateInstantAppCookie(@NonNull byte[] cookie) { 393 throw new UnsupportedOperationException(); 394 } 395 396 /** @hide */ 397 @Override 398 public boolean setInstantAppCookie(@NonNull byte[] cookie) { 399 throw new UnsupportedOperationException(); 400 } 401 402 /** @hide */ 403 @Override 404 public ChangedPackages getChangedPackages(int sequenceNumber) { 405 throw new UnsupportedOperationException(); 406 } 407 408 @Override 409 public ResolveInfo resolveActivity(Intent intent, int flags) { 410 throw new UnsupportedOperationException(); 411 } 412 413 /** @hide */ 414 @Override 415 public ResolveInfo resolveActivityAsUser(Intent intent, int flags, int userId) { 416 throw new UnsupportedOperationException(); 417 } 418 419 @Override 420 public List<ResolveInfo> queryIntentActivities(Intent intent, int flags) { 421 throw new UnsupportedOperationException(); 422 } 423 424 /** @hide */ 425 @Override 426 public List<ResolveInfo> queryIntentActivitiesAsUser(Intent intent, 427 int flags, int userId) { 428 throw new UnsupportedOperationException(); 429 } 430 431 @Override 432 public List<ResolveInfo> queryIntentActivityOptions(ComponentName caller, 433 Intent[] specifics, Intent intent, int flags) { 434 throw new UnsupportedOperationException(); 435 } 436 437 @Override 438 public List<ResolveInfo> queryBroadcastReceivers(Intent intent, int flags) { 439 throw new UnsupportedOperationException(); 440 } 441 442 /** @hide */ 443 @Override 444 public List<ResolveInfo> queryBroadcastReceiversAsUser(Intent intent, int flags, int userId) { 445 throw new UnsupportedOperationException(); 446 } 447 448 @Override 449 public ResolveInfo resolveService(Intent intent, int flags) { 450 throw new UnsupportedOperationException(); 451 } 452 453 @Override 454 public List<ResolveInfo> queryIntentServices(Intent intent, int flags) { 455 throw new UnsupportedOperationException(); 456 } 457 458 /** @hide */ 459 @Override 460 public List<ResolveInfo> queryIntentServicesAsUser(Intent intent, int flags, int userId) { 461 throw new UnsupportedOperationException(); 462 } 463 464 /** @hide */ 465 @Override 466 public List<ResolveInfo> queryIntentContentProvidersAsUser( 467 Intent intent, int flags, int userId) { 468 throw new UnsupportedOperationException(); 469 } 470 471 @Override 472 public List<ResolveInfo> queryIntentContentProviders(Intent intent, int flags) { 473 throw new UnsupportedOperationException(); 474 } 475 476 @Override 477 public ProviderInfo resolveContentProvider(String name, int flags) { 478 throw new UnsupportedOperationException(); 479 } 480 481 /** @hide */ 482 @Override 483 public ProviderInfo resolveContentProviderAsUser(String name, int flags, int userId) { 484 throw new UnsupportedOperationException(); 485 } 486 487 @Override 488 public List<ProviderInfo> queryContentProviders(String processName, int uid, int flags) { 489 throw new UnsupportedOperationException(); 490 } 491 492 @Override 493 public InstrumentationInfo getInstrumentationInfo(ComponentName className, int flags) 494 throws NameNotFoundException { 495 throw new UnsupportedOperationException(); 496 } 497 498 @Override 499 public List<InstrumentationInfo> queryInstrumentation( 500 String targetPackage, int flags) { 501 throw new UnsupportedOperationException(); 502 } 503 504 @Override 505 public Drawable getDrawable(String packageName, int resid, ApplicationInfo appInfo) { 506 throw new UnsupportedOperationException(); 507 } 508 509 @Override 510 public Drawable getActivityIcon(ComponentName activityName) 511 throws NameNotFoundException { 512 throw new UnsupportedOperationException(); 513 } 514 515 @Override 516 public Drawable getActivityIcon(Intent intent) throws NameNotFoundException { 517 throw new UnsupportedOperationException(); 518 } 519 520 @Override 521 public Drawable getDefaultActivityIcon() { 522 throw new UnsupportedOperationException(); 523 } 524 525 @Override 526 public Drawable getActivityBanner(ComponentName activityName) 527 throws NameNotFoundException { 528 throw new UnsupportedOperationException(); 529 } 530 531 @Override 532 public Drawable getActivityBanner(Intent intent) throws NameNotFoundException { 533 throw new UnsupportedOperationException(); 534 } 535 536 @Override 537 public Drawable getApplicationBanner(ApplicationInfo info) { 538 throw new UnsupportedOperationException(); 539 } 540 541 @Override 542 public Drawable getApplicationBanner(String packageName) throws NameNotFoundException { 543 throw new UnsupportedOperationException(); 544 } 545 546 @Override 547 public Drawable getApplicationIcon(ApplicationInfo info) { 548 throw new UnsupportedOperationException(); 549 } 550 551 @Override 552 public Drawable getApplicationIcon(String packageName) throws NameNotFoundException { 553 throw new UnsupportedOperationException(); 554 } 555 556 @Override 557 public Drawable getActivityLogo(ComponentName activityName) throws NameNotFoundException { 558 throw new UnsupportedOperationException(); 559 } 560 561 @Override 562 public Drawable getActivityLogo(Intent intent) throws NameNotFoundException { 563 throw new UnsupportedOperationException(); 564 } 565 566 @Override 567 public Drawable getApplicationLogo(ApplicationInfo info) { 568 throw new UnsupportedOperationException(); 569 } 570 571 @Override 572 public Drawable getApplicationLogo(String packageName) throws NameNotFoundException { 573 throw new UnsupportedOperationException(); 574 } 575 576 @Override 577 public Drawable getUserBadgedIcon(Drawable icon, UserHandle user) { 578 throw new UnsupportedOperationException(); 579 } 580 581 @Override 582 public Drawable getUserBadgedDrawableForDensity(Drawable drawable, UserHandle user, 583 Rect badgeLocation, 584 int badgeDensity) { 585 throw new UnsupportedOperationException(); 586 } 587 588 /** @hide */ 589 @Override 590 public Drawable getUserBadgeForDensity(UserHandle user, int density) { 591 throw new UnsupportedOperationException(); 592 } 593 594 /** @hide */ 595 @Override 596 public Drawable getUserBadgeForDensityNoBackground(UserHandle user, int density) { 597 throw new UnsupportedOperationException(); 598 } 599 600 @Override 601 public CharSequence getUserBadgedLabel(CharSequence label, UserHandle user) { 602 throw new UnsupportedOperationException(); 603 } 604 605 @Override 606 public CharSequence getText(String packageName, int resid, ApplicationInfo appInfo) { 607 throw new UnsupportedOperationException(); 608 } 609 610 @Override 611 public XmlResourceParser getXml(String packageName, int resid, 612 ApplicationInfo appInfo) { 613 throw new UnsupportedOperationException(); 614 } 615 616 @Override 617 public CharSequence getApplicationLabel(ApplicationInfo info) { 618 throw new UnsupportedOperationException(); 619 } 620 621 @Override 622 public Resources getResourcesForActivity(ComponentName activityName) 623 throws NameNotFoundException { 624 throw new UnsupportedOperationException(); 625 } 626 627 @Override 628 public Resources getResourcesForApplication(ApplicationInfo app) { 629 throw new UnsupportedOperationException(); 630 } 631 632 @Override 633 public Resources getResourcesForApplication(String appPackageName) 634 throws NameNotFoundException { 635 throw new UnsupportedOperationException(); 636 } 637 638 /** @hide */ 639 @Override 640 public Resources getResourcesForApplicationAsUser(String appPackageName, int userId) { 641 throw new UnsupportedOperationException(); 642 } 643 644 @Override 645 public PackageInfo getPackageArchiveInfo(String archiveFilePath, int flags) { 646 throw new UnsupportedOperationException(); 647 } 648 649 /** 650 * @hide - to match hiding in superclass 651 */ 652 @Override 653 public void installPackage(Uri packageURI, IPackageInstallObserver observer, 654 int flags, String installerPackageName) { 655 throw new UnsupportedOperationException(); 656 } 657 658 @Override 659 public void setInstallerPackageName(String targetPackage, 660 String installerPackageName) { 661 throw new UnsupportedOperationException(); 662 } 663 664 /** @hide */ 665 @Override 666 public void setUpdateAvailable(String packageName, boolean updateAvailable) { 667 throw new UnsupportedOperationException(); 668 } 669 670 @Override 671 public String getInstallerPackageName(String packageName) { 672 throw new UnsupportedOperationException(); 673 } 674 675 /** {@hide} */ 676 @Override 677 public int getMoveStatus(int moveId) { 678 throw new UnsupportedOperationException(); 679 } 680 681 /** {@hide} */ 682 @Override 683 public void registerMoveCallback(MoveCallback callback, Handler handler) { 684 throw new UnsupportedOperationException(); 685 } 686 687 /** {@hide} */ 688 @Override 689 public void unregisterMoveCallback(MoveCallback callback) { 690 throw new UnsupportedOperationException(); 691 } 692 693 /** {@hide} */ 694 @Override 695 public int movePackage(String packageName, VolumeInfo vol) { 696 throw new UnsupportedOperationException(); 697 } 698 699 /** {@hide} */ 700 @Override 701 public VolumeInfo getPackageCurrentVolume(ApplicationInfo app) { 702 throw new UnsupportedOperationException(); 703 } 704 705 /** {@hide} */ 706 @Override 707 public List<VolumeInfo> getPackageCandidateVolumes(ApplicationInfo app) { 708 throw new UnsupportedOperationException(); 709 } 710 711 /** {@hide} */ 712 @Override 713 public int movePrimaryStorage(VolumeInfo vol) { 714 throw new UnsupportedOperationException(); 715 } 716 717 /** {@hide} */ 718 @Override 719 public VolumeInfo getPrimaryStorageCurrentVolume() { 720 throw new UnsupportedOperationException(); 721 } 722 723 /** {@hide} */ 724 @Override 725 public List<VolumeInfo> getPrimaryStorageCandidateVolumes() { 726 throw new UnsupportedOperationException(); 727 } 728 729 /** 730 * @hide - to match hiding in superclass 731 */ 732 @Override 733 public void clearApplicationUserData( 734 String packageName, IPackageDataObserver observer) { 735 throw new UnsupportedOperationException(); 736 } 737 738 /** 739 * @hide - to match hiding in superclass 740 */ 741 @Override 742 public void deleteApplicationCacheFiles( 743 String packageName, IPackageDataObserver observer) { 744 throw new UnsupportedOperationException(); 745 } 746 747 /** 748 * @hide - to match hiding in superclass 749 */ 750 @Override 751 public void deleteApplicationCacheFilesAsUser(String packageName, int userId, 752 IPackageDataObserver observer) { 753 throw new UnsupportedOperationException(); 754 } 755 756 /** {@hide} */ 757 @Override 758 public void freeStorageAndNotify(String volumeUuid, long idealStorageSize, 759 IPackageDataObserver observer) { 760 throw new UnsupportedOperationException(); 761 } 762 763 /** {@hide} */ 764 @Override 765 public void freeStorage(String volumeUuid, long idealStorageSize, IntentSender pi) { 766 throw new UnsupportedOperationException(); 767 } 768 769 /** 770 * @hide - to match hiding in superclass 771 */ 772 @Override 773 public void deletePackage(String packageName, IPackageDeleteObserver observer, int flags) { 774 throw new UnsupportedOperationException(); 775 } 776 777 /** 778 * @hide - to match hiding in superclass 779 */ 780 @Override 781 public void deletePackageAsUser(String packageName, IPackageDeleteObserver observer, 782 int flags, int userId) { 783 throw new UnsupportedOperationException(); 784 } 785 786 @Override 787 public void addPackageToPreferred(String packageName) { 788 throw new UnsupportedOperationException(); 789 } 790 791 @Override 792 public void removePackageFromPreferred(String packageName) { 793 throw new UnsupportedOperationException(); 794 } 795 796 @Override 797 public List<PackageInfo> getPreferredPackages(int flags) { 798 throw new UnsupportedOperationException(); 799 } 800 801 @Override 802 public void setComponentEnabledSetting(ComponentName componentName, 803 int newState, int flags) { 804 throw new UnsupportedOperationException(); 805 } 806 807 @Override 808 public int getComponentEnabledSetting(ComponentName componentName) { 809 throw new UnsupportedOperationException(); 810 } 811 812 @Override 813 public void setApplicationEnabledSetting(String packageName, int newState, int flags) { 814 throw new UnsupportedOperationException(); 815 } 816 817 @Override 818 public int getApplicationEnabledSetting(String packageName) { 819 throw new UnsupportedOperationException(); 820 } 821 822 /** @hide */ 823 @Override 824 public void flushPackageRestrictionsAsUser(int userId) { 825 throw new UnsupportedOperationException(); 826 } 827 828 @Override 829 public void addPreferredActivity(IntentFilter filter, 830 int match, ComponentName[] set, ComponentName activity) { 831 throw new UnsupportedOperationException(); 832 } 833 834 /** 835 * @hide - to match hiding in superclass 836 */ 837 @Override 838 public void replacePreferredActivity(IntentFilter filter, 839 int match, ComponentName[] set, ComponentName activity) { 840 throw new UnsupportedOperationException(); 841 } 842 843 844 @Override 845 public void clearPackagePreferredActivities(String packageName) { 846 throw new UnsupportedOperationException(); 847 } 848 849 /** 850 * @hide - to match hiding in superclass 851 */ 852 @Override 853 public void getPackageSizeInfoAsUser(String packageName, int userHandle, 854 IPackageStatsObserver observer) { 855 throw new UnsupportedOperationException(); 856 } 857 858 @Override 859 public int getPreferredActivities(List<IntentFilter> outFilters, 860 List<ComponentName> outActivities, String packageName) { 861 throw new UnsupportedOperationException(); 862 } 863 864 /** @hide - hidden in superclass */ 865 @Override 866 public ComponentName getHomeActivities(List<ResolveInfo> outActivities) { 867 throw new UnsupportedOperationException(); 868 } 869 870 @Override 871 public String[] getSystemSharedLibraryNames() { 872 throw new UnsupportedOperationException(); 873 } 874 875 @Override 876 public @NonNull List<SharedLibraryInfo> getSharedLibraries(int flags) { 877 throw new UnsupportedOperationException(); 878 } 879 880 /** @hide */ 881 @Override 882 public @NonNull List<SharedLibraryInfo> getSharedLibrariesAsUser(int flags, int userId) { 883 throw new UnsupportedOperationException(); 884 } 885 886 /** @hide */ 887 @Override 888 public @NonNull String getServicesSystemSharedLibraryPackageName() { 889 throw new UnsupportedOperationException(); 890 } 891 892 /** @hide */ 893 @Override 894 public @NonNull String getSharedSystemSharedLibraryPackageName() { 895 throw new UnsupportedOperationException(); 896 } 897 898 @Override 899 public FeatureInfo[] getSystemAvailableFeatures() { 900 throw new UnsupportedOperationException(); 901 } 902 903 @Override 904 public boolean hasSystemFeature(String name) { 905 throw new UnsupportedOperationException(); 906 } 907 908 @Override 909 public boolean hasSystemFeature(String name, int version) { 910 throw new UnsupportedOperationException(); 911 } 912 913 @Override 914 public boolean isSafeMode() { 915 throw new UnsupportedOperationException(); 916 } 917 918 /** @hide */ 919 @Override 920 public KeySet getKeySetByAlias(String packageName, String alias) { 921 throw new UnsupportedOperationException(); 922 } 923 924 /** @hide */ 925 @Override 926 public KeySet getSigningKeySet(String packageName) { 927 throw new UnsupportedOperationException(); 928 } 929 930 /** @hide */ 931 @Override 932 public boolean isSignedBy(String packageName, KeySet ks) { 933 throw new UnsupportedOperationException(); 934 } 935 936 /** @hide */ 937 @Override 938 public boolean isSignedByExactly(String packageName, KeySet ks) { 939 throw new UnsupportedOperationException(); 940 } 941 942 /** @hide */ 943 @Override 944 public String[] setPackagesSuspendedAsUser(String[] packageNames, boolean hidden, int userId) { 945 throw new UnsupportedOperationException(); 946 } 947 948 /** @hide */ 949 @Override 950 public boolean isPackageSuspendedForUser(String packageName, int userId) { 951 throw new UnsupportedOperationException(); 952 } 953 954 /** @hide */ 955 @Override 956 public void setApplicationCategoryHint(String packageName, int categoryHint) { 957 throw new UnsupportedOperationException(); 958 } 959 960 /** 961 * @hide 962 */ 963 @Override 964 public boolean setApplicationHiddenSettingAsUser(String packageName, boolean hidden, 965 UserHandle user) { 966 return false; 967 } 968 969 /** 970 * @hide 971 */ 972 @Override 973 public boolean getApplicationHiddenSettingAsUser(String packageName, UserHandle user) { 974 return false; 975 } 976 977 /** 978 * @hide 979 */ 980 @Override 981 public int installExistingPackage(String packageName) throws NameNotFoundException { 982 throw new UnsupportedOperationException(); 983 } 984 985 /** 986 * @hide 987 */ 988 @Override 989 public int installExistingPackage(String packageName, int installReason) 990 throws NameNotFoundException { 991 throw new UnsupportedOperationException(); 992 } 993 994 /** 995 * @hide 996 */ 997 @Override 998 public int installExistingPackageAsUser(String packageName, int userId) 999 throws NameNotFoundException { 1000 throw new UnsupportedOperationException(); 1001 } 1002 1003 @Override 1004 public void verifyPendingInstall(int id, int verificationCode) { 1005 throw new UnsupportedOperationException(); 1006 } 1007 1008 @Override 1009 public void extendVerificationTimeout(int id, int verificationCodeAtTimeout, 1010 long millisecondsToDelay) { 1011 throw new UnsupportedOperationException(); 1012 } 1013 1014 /** 1015 * @hide 1016 */ 1017 @Override 1018 public void verifyIntentFilter(int id, int verificationCode, List<String> outFailedDomains) { 1019 throw new UnsupportedOperationException(); 1020 } 1021 1022 /** 1023 * @hide 1024 */ 1025 @Override 1026 public int getIntentVerificationStatusAsUser(String packageName, int userId) { 1027 throw new UnsupportedOperationException(); 1028 } 1029 1030 /** 1031 * @hide 1032 */ 1033 @Override 1034 public boolean updateIntentVerificationStatusAsUser(String packageName, int status, int userId) { 1035 throw new UnsupportedOperationException(); 1036 } 1037 1038 /** 1039 * @hide 1040 */ 1041 @Override 1042 public List<IntentFilterVerificationInfo> getIntentFilterVerifications(String packageName) { 1043 throw new UnsupportedOperationException(); 1044 } 1045 1046 @Override 1047 public List<IntentFilter> getAllIntentFilters(String packageName) { 1048 throw new UnsupportedOperationException(); 1049 } 1050 1051 /** {@removed} */ 1052 @Deprecated 1053 public String getDefaultBrowserPackageName(int userId) { 1054 throw new UnsupportedOperationException(); 1055 } 1056 1057 /** {@hide} */ 1058 @Override 1059 public String getDefaultBrowserPackageNameAsUser(int userId) { 1060 throw new UnsupportedOperationException(); 1061 } 1062 1063 /** {@removed} */ 1064 @Deprecated 1065 public boolean setDefaultBrowserPackageName(String packageName, int userId) { 1066 throw new UnsupportedOperationException(); 1067 } 1068 1069 /** {@hide} */ 1070 @Override 1071 public boolean setDefaultBrowserPackageNameAsUser(String packageName, int userId) { 1072 throw new UnsupportedOperationException(); 1073 } 1074 1075 /** 1076 * @hide 1077 */ 1078 @Override 1079 public VerifierDeviceIdentity getVerifierDeviceIdentity() { 1080 throw new UnsupportedOperationException(); 1081 } 1082 1083 /** 1084 * @hide 1085 */ 1086 @Override 1087 public boolean isUpgrade() { 1088 throw new UnsupportedOperationException(); 1089 } 1090 1091 /** 1092 * @hide 1093 */ 1094 @Override 1095 public void installPackage(Uri packageURI, PackageInstallObserver observer, 1096 int flags, String installerPackageName) { 1097 throw new UnsupportedOperationException(); 1098 } 1099 1100 /** 1101 * @hide 1102 */ 1103 @Override 1104 public void addCrossProfileIntentFilter(IntentFilter filter, int sourceUserId, int targetUserId, 1105 int flags) { 1106 throw new UnsupportedOperationException(); 1107 } 1108 1109 /** 1110 * @hide 1111 */ 1112 @Override 1113 public void clearCrossProfileIntentFilters(int sourceUserId) { 1114 throw new UnsupportedOperationException(); 1115 } 1116 1117 /** {@hide} */ 1118 public PackageInstaller getPackageInstaller() { 1119 throw new UnsupportedOperationException(); 1120 } 1121 1122 /** {@hide} */ 1123 @Override 1124 public boolean isPackageAvailable(String packageName) { 1125 throw new UnsupportedOperationException(); 1126 } 1127 1128 /** 1129 * @hide 1130 */ 1131 public Drawable loadItemIcon(PackageItemInfo itemInfo, ApplicationInfo appInfo) { 1132 throw new UnsupportedOperationException(); 1133 } 1134 1135 /** 1136 * @hide 1137 */ 1138 public Drawable loadUnbadgedItemIcon(PackageItemInfo itemInfo, ApplicationInfo appInfo) { 1139 throw new UnsupportedOperationException(); 1140 } 1141 1142 /** 1143 * @hide 1144 */ 1145 public int getInstallReason(String packageName, UserHandle user) { 1146 throw new UnsupportedOperationException(); 1147 } 1148 1149 /** 1150 * @hide 1151 */ 1152 @Override 1153 public ComponentName getInstantAppResolverSettingsComponent() { 1154 throw new UnsupportedOperationException(); 1155 } 1156 1157 /** 1158 * @hide 1159 */ 1160 @Override 1161 public ComponentName getInstantAppInstallerComponent() { 1162 throw new UnsupportedOperationException(); 1163 } 1164 1165 /** 1166 * @hide 1167 */ 1168 public String getInstantAppAndroidId(String packageName, UserHandle user) { 1169 throw new UnsupportedOperationException(); 1170 } 1171} 1172