Support the rich content for accessibility service (1/n)
Goal: 1. let third party developer can use html text that include from their local image file and animated image instead of only plain text to rich their content. 2. Avoid malicious links made by third party developer Action: 1. Add html, static text, and animated image preferences. 2. Add android:AnimatedImageDrawable, and android:htmlDescription attributes. 3. Fine-tune interface and integration 4. Add custom tag filter Bug: 136292241 Test: Maunal & make RunSettingsRoboTests Change-Id: I82cd5319efb7faa1ff7e8354a279828fce5135b8
This commit is contained in:
@@ -111,6 +111,8 @@ public class AccessibilitySettings extends DashboardFragment {
|
||||
static final String EXTRA_SETTINGS_COMPONENT_NAME = "settings_component_name";
|
||||
static final String EXTRA_VIDEO_RAW_RESOURCE_ID = "video_resource";
|
||||
static final String EXTRA_LAUNCHED_FROM_SUW = "from_suw";
|
||||
static final String EXTRA_ANIMATED_IMAGE_RES = "animated_image_res";
|
||||
static final String EXTRA_HTML_DESCRIPTION = "html_description";
|
||||
|
||||
// Timeout before we update the services if packages are added/removed
|
||||
// since the AccessibilityManagerService has to do that processing first
|
||||
@@ -409,6 +411,10 @@ public class AccessibilitySettings extends DashboardFragment {
|
||||
extras.putString(EXTRA_TITLE, title);
|
||||
extras.putParcelable(EXTRA_RESOLVE_INFO, resolveInfo);
|
||||
extras.putString(EXTRA_SUMMARY, description);
|
||||
extras.putInt(EXTRA_ANIMATED_IMAGE_RES, info.getAnimatedImageRes());
|
||||
|
||||
final String htmlDescription = info.loadHtmlDescription(getPackageManager());
|
||||
extras.putString(AccessibilitySettings.EXTRA_HTML_DESCRIPTION, htmlDescription);
|
||||
|
||||
final String settingsClassName = info.getSettingsActivityName();
|
||||
if (!TextUtils.isEmpty(settingsClassName)) {
|
||||
|
Reference in New Issue
Block a user