diff options
Diffstat (limited to 'packages/SystemUI/tests/src/com/android/systemui/power/PowerUITest.java')
-rw-r--r-- | packages/SystemUI/tests/src/com/android/systemui/power/PowerUITest.java | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/packages/SystemUI/tests/src/com/android/systemui/power/PowerUITest.java b/packages/SystemUI/tests/src/com/android/systemui/power/PowerUITest.java index 054bdee9fd97..96a97372c5cf 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/power/PowerUITest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/power/PowerUITest.java @@ -49,6 +49,8 @@ import com.android.systemui.statusbar.phone.StatusBar; import java.time.Duration; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; + +import org.junit.After; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; @@ -92,6 +94,11 @@ public class PowerUITest extends SysuiTestCase { createPowerUi(); } + @After + public void tearDown() throws Exception { + mPowerUI = null; + } + @Test public void testNoConfig_NoWarnings() { setOverThreshold(); @@ -203,20 +210,6 @@ public class PowerUITest extends SysuiTestCase { } @Test - public void testConfig_alarmsWithBeepSound() { - setOverThreshold(); - final Boolean overheat = true; - final Boolean shouldBeepSound = true; - TestableResources resources = mContext.getOrCreateTestableResources(); - resources.addOverride(R.integer.config_showTemperatureAlarm, 1); - resources.addOverride(R.integer.config_alarmTemperature, 58); - resources.addOverride(R.bool.config_alarmTemperatureBeepSound, shouldBeepSound); - - mPowerUI.start(); - verify(mMockWarnings).notifyHighTemperatureAlarm(overheat, shouldBeepSound); - } - - @Test public void testHardPropsThrottlingThreshold_alarms() { setThrottlingThreshold(DEFAULT_OVERHEAT_ALARM_THRESHOLD); setOverThreshold(); |