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
This commit is contained in:
@@ -11728,6 +11728,7 @@ package android.content.pm {
|
||||
method public boolean isResourceOverlay();
|
||||
method public boolean isVirtualPreload();
|
||||
method public CharSequence loadDescription(android.content.pm.PackageManager);
|
||||
field public static final int CATEGORY_ACCESSIBILITY = 8; // 0x8
|
||||
field public static final int CATEGORY_AUDIO = 1; // 0x1
|
||||
field public static final int CATEGORY_GAME = 0; // 0x0
|
||||
field public static final int CATEGORY_IMAGE = 3; // 0x3
|
||||
|
||||
@@ -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 {
|
||||
@@ -1272,6 +1273,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
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -1773,6 +1773,8 @@
|
||||
<enum name="maps" value="6" />
|
||||
<!-- Apps which are primarily productivity apps, such as cloud storage or workplace apps. -->
|
||||
<enum name="productivity" value="7" />
|
||||
<!-- Apps which are primarily accessibility apps, such as screen-readers. -->
|
||||
<enum name="accessibility" value="8" />
|
||||
</attr>
|
||||
|
||||
<!-- Declares the kind of classloader this application's classes must be loaded with -->
|
||||
|
||||
@@ -5187,6 +5187,8 @@
|
||||
<string name="app_category_maps">Maps & Navigation</string>
|
||||
<!-- Category title for apps which are primarily productivity apps, such as cloud storage or workplace apps. [CHAR LIMIT=32] -->
|
||||
<string name="app_category_productivity">Productivity</string>
|
||||
<!-- Category title for apps which are primarily accessibility apps, such as screen-readers. [CHAR LIMIT=32] -->
|
||||
<string name="app_category_accessibility">Accessibility</string>
|
||||
|
||||
<!-- Channel name for DeviceStorageMonitor notifications -->
|
||||
<string name="device_storage_monitor_notification_channel">Device storage</string>
|
||||
|
||||
@@ -3290,6 +3290,7 @@
|
||||
<java-symbol type="string" name="app_category_news" />
|
||||
<java-symbol type="string" name="app_category_maps" />
|
||||
<java-symbol type="string" name="app_category_productivity" />
|
||||
<java-symbol type="string" name="app_category_accessibility" />
|
||||
|
||||
<java-symbol type="raw" name="fallback_categories" />
|
||||
|
||||
|
||||
Reference in New Issue
Block a user