[pm] new APIs for ApplictaionInfo/PackageInfo/ComponentInfo/ResolveInfo flags
We are running out of int flags for public API methods such as PackageManager.getPackageInfo(String packageName, int flags). As a solution, we will change the flags param to Flags objects. At the same time, we deprecate the old methods that directly use int flags. The new flags classes are: ApplicationInfoFlags, PackageInfoFlags, ComponentInfoFlags and ResolveInfoFlags. Because there are already annotations of the same names, we renamed the annotations to *FlagsBits. Old API usage example: getPackageInfo(pkgName, MATCH_UNINSTALLED_PACKAGES) New API usage example: getPackageInfo(pkgName, PackageInfoFlags.of(MATCH_UNINSTALLED_PACKAGES)) See b/204433742 for discussions. CTS-Coverage-Bug: 206147270 BUG: 204432643 BUG: 204433659 Test: manual Change-Id: I8ab2adad6907670c5879c043d170c950afefe46c
Showing
- core/api/current.txt 66 additions, 23 deletionscore/api/current.txt
- core/api/system-current.txt 14 additions, 7 deletionscore/api/system-current.txt
- core/api/test-current.txt 2 additions, 1 deletioncore/api/test-current.txt
- core/java/android/app/ApplicationPackageManager.java 288 additions, 55 deletionscore/java/android/app/ApplicationPackageManager.java
- core/java/android/app/PendingIntent.java 2 additions, 2 deletionscore/java/android/app/PendingIntent.java
- core/java/android/content/Intent.java 2 additions, 2 deletionscore/java/android/content/Intent.java
- core/java/android/content/pm/LauncherApps.java 2 additions, 2 deletionscore/java/android/content/pm/LauncherApps.java
- core/java/android/content/pm/PackageManager.java 682 additions, 68 deletionscore/java/android/content/pm/PackageManager.java
- core/java/android/content/pm/parsing/PackageInfoWithoutStateUtils.java 28 additions, 27 deletions...roid/content/pm/parsing/PackageInfoWithoutStateUtils.java
- core/java/com/android/internal/util/AnnotationValidations.java 9 additions, 4 deletions...java/com/android/internal/util/AnnotationValidations.java
- packages/SettingsLib/tests/robotests/src/com/android/settingslib/applications/ApplicationsStateRoboTest.java 1 addition, 1 deletion...d/settingslib/applications/ApplicationsStateRoboTest.java
- packages/SystemUI/shared/src/com/android/systemui/shared/system/PackageManagerWrapper.java 2 additions, 2 deletions...android/systemui/shared/system/PackageManagerWrapper.java
- services/core/java/android/content/pm/PackageManagerInternal.java 20 additions, 19 deletions.../core/java/android/content/pm/PackageManagerInternal.java
- services/core/java/com/android/server/pm/Computer.java 15 additions, 14 deletionsservices/core/java/com/android/server/pm/Computer.java
- services/core/java/com/android/server/pm/ComputerEngine.java 44 additions, 41 deletionsservices/core/java/com/android/server/pm/ComputerEngine.java
- services/core/java/com/android/server/pm/ComputerLocked.java 14 additions, 11 deletionsservices/core/java/com/android/server/pm/ComputerLocked.java
- services/core/java/com/android/server/pm/ComputerTracker.java 31 additions, 28 deletions...ices/core/java/com/android/server/pm/ComputerTracker.java
- services/core/java/com/android/server/pm/PackageManagerService.java 51 additions, 50 deletions...ore/java/com/android/server/pm/PackageManagerService.java
- services/core/java/com/android/server/pm/PackageManagerServiceUtils.java 1 addition, 1 deletion...ava/com/android/server/pm/PackageManagerServiceUtils.java
- services/core/java/com/android/server/pm/PreferredActivityHelper.java 3 additions, 3 deletions...e/java/com/android/server/pm/PreferredActivityHelper.java
Loading
Please register or sign in to comment