Merge "Add new application category for accessibility" into sc-dev

This commit is contained in:
Ryan Lin
2021-03-04 02:18:22 +00:00
committed by Android (Google) Code Review
5 changed files with 17 additions and 1 deletions

View File

@@ -1205,7 +1205,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 {
@@ -1280,6 +1281,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
@@ -1305,6 +1313,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;
}