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:
@@ -87,6 +87,8 @@ public final class InstalledAppDetailsTest {
|
||||
private BatteryStatsHelper mBatteryStatsHelper;
|
||||
@Mock
|
||||
private BatteryStats.Uid mUid;
|
||||
@Mock
|
||||
private PackageManager mPackageManager;
|
||||
|
||||
private InstalledAppDetails mAppDetail;
|
||||
private Context mShadowContext;
|
||||
@@ -94,14 +96,15 @@ public final class InstalledAppDetailsTest {
|
||||
@Before
|
||||
public void setUp() {
|
||||
MockitoAnnotations.initMocks(this);
|
||||
mShadowContext = RuntimeEnvironment.application;
|
||||
|
||||
mShadowContext = RuntimeEnvironment.application;
|
||||
mAppDetail = spy(new InstalledAppDetails());
|
||||
|
||||
mBatterySipper.drainType = BatterySipper.DrainType.IDLE;
|
||||
mBatterySipper.uidObj = mUid;
|
||||
doReturn(mActivity).when(mAppDetail).getActivity();
|
||||
doReturn(mShadowContext).when(mAppDetail).getContext();
|
||||
doReturn(mPackageManager).when(mActivity).getPackageManager();
|
||||
|
||||
// Default to not considering any apps to be instant (individual tests can override this).
|
||||
ReflectionHelpers.setStaticField(AppUtils.class, "sInstantAppDataProvider",
|
||||
|
Reference in New Issue
Block a user