Add TtsSpan for formatted time.

Talk back will read "Used for 3m" as "Used for 3 meters", but
it will read "Used for 3h 3m" correctly.

This cl add specific Ttsspan if the time only contains "minute"

Bug: 36379530
Test: Run SettingsRoboTests

Change-Id: I033575938cce24221980dddd9d66be4e18804541
This commit is contained in:
jackqdyulei
2017-03-31 12:57:10 -07:00
parent 9e89d528f6
commit f4c1cef322
13 changed files with 142 additions and 63 deletions

View File

@@ -79,11 +79,15 @@ public class PowerGaugePreference extends TintablePreference {
return mProgress.toString();
}
public void setSubtitle(String subtitle) {
public void setSubtitle(CharSequence subtitle) {
mProgress = subtitle;
notifyChanged();
}
public CharSequence getSubtitle() {
return mProgress;
}
BatteryEntry getInfo() {
return mInfo;
}