diff options
| author | ryanlwlin <ryanlwlin@google.com> | 2021-01-21 20:19:52 +0800 |
|---|---|---|
| committer | ryanlwlin <ryanlwlin@google.com> | 2021-02-22 14:39:28 +0800 |
| commit | 0eaebf0c8498943e889f8722d84d7924d5ff9b55 (patch) | |
| tree | 15d8cde3d4db1201050e1ccd76be25c789ffa792 /core/java/android | |
| parent | c1d7c4d6ab76715d928b487dc40a552f74ebfdb6 (diff) | |
Add new application category for accessibility
This category is used to cluster the apps built for accessibility.
Developers could set it in the manifest.
Bug: 180871558
Test: full build
Change-Id: I94b294b46852ca1efc31b2d79275f98ba6db85d9
Diffstat (limited to 'core/java/android')
| -rw-r--r-- | core/java/android/content/pm/ApplicationInfo.java | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/core/java/android/content/pm/ApplicationInfo.java b/core/java/android/content/pm/ApplicationInfo.java index 01ff4326a800..b80690fbad29 100644 --- a/core/java/android/content/pm/ApplicationInfo.java +++ b/core/java/android/content/pm/ApplicationInfo.java @@ -1197,7 +1197,8 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { CATEGORY_SOCIAL, CATEGORY_NEWS, CATEGORY_MAPS, - CATEGORY_PRODUCTIVITY + CATEGORY_PRODUCTIVITY, + CATEGORY_ACCESSIBILITY }) @Retention(RetentionPolicy.SOURCE) public @interface Category { @@ -1273,6 +1274,13 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { public static final int CATEGORY_PRODUCTIVITY = 7; /** + * Category for apps which are primarily accessibility apps, such as screen-readers. + * + * @see #category + */ + public static final int CATEGORY_ACCESSIBILITY = 8; + + /** * Return a concise, localized title for the given * {@link ApplicationInfo#category} value, or {@code null} for unknown * values such as {@link #CATEGORY_UNDEFINED}. @@ -1297,6 +1305,8 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { return context.getText(com.android.internal.R.string.app_category_maps); case ApplicationInfo.CATEGORY_PRODUCTIVITY: return context.getText(com.android.internal.R.string.app_category_productivity); + case ApplicationInfo.CATEGORY_ACCESSIBILITY: + return context.getText(com.android.internal.R.string.app_category_accessibility); default: return null; } |
