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:
@@ -28,6 +28,7 @@ import android.os.UserManager;
|
||||
import android.support.annotation.VisibleForTesting;
|
||||
import android.support.v14.preference.PreferenceFragment;
|
||||
import android.support.v7.preference.Preference;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
|
||||
import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
|
||||
@@ -82,6 +83,8 @@ public class AdvancedPowerUsageDetail extends PowerUsageBase implements
|
||||
ApplicationsState mState;
|
||||
@VisibleForTesting
|
||||
ApplicationsState.AppEntry mAppEntry;
|
||||
@VisibleForTesting
|
||||
BatteryUtils mBatteryUtils;
|
||||
|
||||
private Preference mForegroundPreference;
|
||||
private Preference mBackgroundPreference;
|
||||
@@ -136,6 +139,7 @@ public class AdvancedPowerUsageDetail extends PowerUsageBase implements
|
||||
(DevicePolicyManager) activity.getSystemService(Context.DEVICE_POLICY_SERVICE));
|
||||
mUserManager = (UserManager) activity.getSystemService(Context.USER_SERVICE);
|
||||
mPackageManager = activity.getPackageManager();
|
||||
mBatteryUtils = BatteryUtils.getInstance(getContext());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user