Loading packages/SystemUI/src/com/android/systemui/power/PowerNotificationWarnings.java +1 −1 Original line number Diff line number Diff line Loading @@ -547,7 +547,7 @@ public class PowerNotificationWarnings implements PowerUI.WarningsUI { return; } final SystemUIDialog d = new SystemUIDialog(mContext, R.style.Theme_SystemUI_Dialog_Alert); final SystemUIDialog d = mSystemUIDialogFactory.create(); d.setCancelable(false); d.setIconAttribute(android.R.attr.alertDialogIcon); d.setTitle(R.string.high_temp_alarm_title); Loading packages/SystemUI/tests/src/com/android/systemui/power/PowerNotificationWarningsTest.java +7 −0 Original line number Diff line number Diff line Loading @@ -43,6 +43,7 @@ import android.os.Bundle; import android.os.Handler; import android.os.UserHandle; import android.testing.TestableLooper; import android.view.Window; import androidx.test.ext.junit.runners.AndroidJUnit4; import androidx.test.filters.SmallTest; Loading Loading @@ -97,6 +98,10 @@ public class PowerNotificationWarningsTest extends SysuiTestCase { @Mock private SystemUIDialog mSystemUIDialog; @Mock private Window mDialogWindow; @Mock private BroadcastReceiver mReceiver; @Before Loading @@ -123,6 +128,7 @@ public class PowerNotificationWarningsTest extends SysuiTestCase { when(mUserTracker.getUserHandle()).thenReturn( UserHandle.of(ActivityManager.getCurrentUser())); when(mSystemUIDialogFactory.create()).thenReturn(mSystemUIDialog); when(mSystemUIDialog.getWindow()).thenReturn(mDialogWindow); mPowerNotificationWarnings = new PowerNotificationWarnings( wrapper, starter, Loading Loading @@ -236,6 +242,7 @@ public class PowerNotificationWarningsTest extends SysuiTestCase { assertThat(mPowerNotificationWarnings.mUsbHighTempDialog).isNotNull(); mPowerNotificationWarnings.mUsbHighTempDialog.dismiss(); waitForIdleSync(mContext.getMainThreadHandler()); } @Test Loading Loading
packages/SystemUI/src/com/android/systemui/power/PowerNotificationWarnings.java +1 −1 Original line number Diff line number Diff line Loading @@ -547,7 +547,7 @@ public class PowerNotificationWarnings implements PowerUI.WarningsUI { return; } final SystemUIDialog d = new SystemUIDialog(mContext, R.style.Theme_SystemUI_Dialog_Alert); final SystemUIDialog d = mSystemUIDialogFactory.create(); d.setCancelable(false); d.setIconAttribute(android.R.attr.alertDialogIcon); d.setTitle(R.string.high_temp_alarm_title); Loading
packages/SystemUI/tests/src/com/android/systemui/power/PowerNotificationWarningsTest.java +7 −0 Original line number Diff line number Diff line Loading @@ -43,6 +43,7 @@ import android.os.Bundle; import android.os.Handler; import android.os.UserHandle; import android.testing.TestableLooper; import android.view.Window; import androidx.test.ext.junit.runners.AndroidJUnit4; import androidx.test.filters.SmallTest; Loading Loading @@ -97,6 +98,10 @@ public class PowerNotificationWarningsTest extends SysuiTestCase { @Mock private SystemUIDialog mSystemUIDialog; @Mock private Window mDialogWindow; @Mock private BroadcastReceiver mReceiver; @Before Loading @@ -123,6 +128,7 @@ public class PowerNotificationWarningsTest extends SysuiTestCase { when(mUserTracker.getUserHandle()).thenReturn( UserHandle.of(ActivityManager.getCurrentUser())); when(mSystemUIDialogFactory.create()).thenReturn(mSystemUIDialog); when(mSystemUIDialog.getWindow()).thenReturn(mDialogWindow); mPowerNotificationWarnings = new PowerNotificationWarnings( wrapper, starter, Loading Loading @@ -236,6 +242,7 @@ public class PowerNotificationWarningsTest extends SysuiTestCase { assertThat(mPowerNotificationWarnings.mUsbHighTempDialog).isNotNull(); mPowerNotificationWarnings.mUsbHighTempDialog.dismiss(); waitForIdleSync(mContext.getMainThreadHandler()); } @Test Loading