Merge "Add new application category for accessibility" into sc-dev
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user