Add A11y Slices

Add AccessibilityPreferenceController, which wraps all a11y settings
since they are share common infrastructure for enabling, current value,
and availability.

We add an overlay for OEMs to declare their bundled a11y services.
This is the only list of services that will be possible to enabled via
Settings slices.

Accessibility Slices are built by getting a list of valid services,
and indexing the service names as a key in the Slices DB. When they are
built at runtime, they use the generic A11yPrefController to get the status
and enable/disable the service.

Bug: 67997836
Bug: 67997672
Test: robotests
Change-Id: I66f905bf1c55eecb937945c4675c12bcbc96d698
This commit is contained in:
Matthew Fritze
2018-03-01 19:02:07 -08:00
parent d743f20618
commit a711ed8330
14 changed files with 467 additions and 49 deletions

View File

@@ -57,7 +57,7 @@ public class SliceData {
private final String mSummary;
private final String mScreenTitle;
private final CharSequence mScreenTitle;
private final int mIconResource;
@@ -84,7 +84,7 @@ public class SliceData {
return mSummary;
}
public String getScreenTitle() {
public CharSequence getScreenTitle() {
return mScreenTitle;
}
@@ -146,7 +146,7 @@ public class SliceData {
private String mSummary;
private String mScreenTitle;
private CharSequence mScreenTitle;
private int mIconResource;
@@ -175,7 +175,7 @@ public class SliceData {
return this;
}
public Builder setScreenTitle(String screenTitle) {
public Builder setScreenTitle(CharSequence screenTitle) {
mScreenTitle = screenTitle;
return this;
}