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:
@@ -15,14 +15,13 @@
|
||||
*/
|
||||
package com.android.settings.fuelgauge;
|
||||
|
||||
import android.annotation.IntDef;
|
||||
import android.content.Context;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.os.BatteryStats;
|
||||
import android.os.SystemClock;
|
||||
import android.support.annotation.IntDef;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.annotation.VisibleForTesting;
|
||||
import android.text.format.DateUtils;
|
||||
import android.util.Log;
|
||||
|
||||
import com.android.internal.os.BatterySipper;
|
||||
@@ -64,7 +63,8 @@ public class BatteryUtils {
|
||||
return sInstance;
|
||||
}
|
||||
|
||||
private BatteryUtils(Context context) {
|
||||
@VisibleForTesting
|
||||
BatteryUtils(Context context) {
|
||||
mPackageManager = context.getPackageManager();
|
||||
mPowerUsageFeatureProvider = FeatureFactory.getFactory(
|
||||
context).getPowerUsageFeatureProvider(context);
|
||||
|
Reference in New Issue
Block a user