Merge "Fix testUidCache_switchLocale_shouldCleanCache in BatteryEntryTest" into udc-qpr-dev am: b544871b38
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/24002332 Change-Id: I67b7e296e56e50c9745ca36e5994f06663ccb56d Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -51,8 +51,6 @@ import org.mockito.junit.MockitoRule;
|
||||
import org.robolectric.RobolectricTestRunner;
|
||||
import org.robolectric.RuntimeEnvironment;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
@RunWith(RobolectricTestRunner.class)
|
||||
public class BatteryEntryTest {
|
||||
|
||||
@@ -234,17 +232,6 @@ public class BatteryEntryTest {
|
||||
}
|
||||
|
||||
@Ignore
|
||||
@Test
|
||||
public void testUidCache_switchLocale_shouldCleanCache() {
|
||||
Locale.setDefault(new Locale("en_US"));
|
||||
BatteryEntry.sUidCache.put(Integer.toString(APP_UID), null);
|
||||
assertThat(BatteryEntry.sUidCache).isNotEmpty();
|
||||
|
||||
Locale.setDefault(new Locale("zh_TW"));
|
||||
createBatteryEntryForApp(null, null, HIGH_DRAIN_PACKAGE);
|
||||
assertThat(BatteryEntry.sUidCache).isEmpty(); // check if cache is clear
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getKey_UidBatteryConsumer() {
|
||||
final BatteryEntry entry = createBatteryEntryForApp(null, null, null);
|
||||
|
Reference in New Issue
Block a user