Loading services/tests/uiservicestests/src/com/android/server/notification/ZenModeFilteringTest.java +2 −11 Original line number Diff line number Diff line Loading @@ -31,9 +31,11 @@ import static org.mockito.Mockito.when; import android.app.Notification; import android.app.NotificationChannel; import android.app.NotificationManager; import android.app.NotificationManager.Policy; import android.media.AudioAttributes; import android.service.notification.StatusBarNotification; import android.service.notification.ZenModeConfig; import android.test.suitebuilder.annotation.SmallTest; import android.testing.AndroidTestingRunner; import android.testing.TestableLooper; Loading @@ -43,7 +45,6 @@ import com.android.internal.util.NotificationMessagingUtil; import com.android.server.UiServiceTestCase; import org.junit.Before; import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; Loading Loading @@ -75,7 +76,6 @@ public class ZenModeFilteringTest extends UiServiceTestCase { return new NotificationRecord(mContext, sbn, c); } @Ignore @Test public void testIsMessage() { NotificationRecord r = getNotificationRecord(); Loading @@ -87,7 +87,6 @@ public class ZenModeFilteringTest extends UiServiceTestCase { assertFalse(mZenModeFiltering.isMessage(r)); } @Ignore @Test public void testIsAlarm() { NotificationChannel c = mock(NotificationChannel.class); Loading @@ -102,7 +101,6 @@ public class ZenModeFilteringTest extends UiServiceTestCase { assertTrue(mZenModeFiltering.isAlarm(r)); } @Ignore @Test public void testIsAlarm_wrongCategory() { NotificationRecord r = getNotificationRecord(); Loading @@ -110,7 +108,6 @@ public class ZenModeFilteringTest extends UiServiceTestCase { assertFalse(mZenModeFiltering.isAlarm(r)); } @Ignore @Test public void testIsAlarm_wrongUsage() { NotificationChannel c = mock(NotificationChannel.class); Loading @@ -121,7 +118,6 @@ public class ZenModeFilteringTest extends UiServiceTestCase { assertFalse(mZenModeFiltering.isAlarm(r)); } @Ignore @Test public void testSuppressDNDInfo_yes_VisEffectsAllowed() { NotificationRecord r = getNotificationRecord(); Loading @@ -133,7 +129,6 @@ public class ZenModeFilteringTest extends UiServiceTestCase { assertTrue(mZenModeFiltering.shouldIntercept(ZEN_MODE_IMPORTANT_INTERRUPTIONS, policy, r)); } @Ignore @Test public void testSuppressDNDInfo_yes_WrongId() { NotificationRecord r = getNotificationRecord(); Loading @@ -144,7 +139,6 @@ public class ZenModeFilteringTest extends UiServiceTestCase { assertTrue(mZenModeFiltering.shouldIntercept(ZEN_MODE_IMPORTANT_INTERRUPTIONS, policy, r)); } @Ignore @Test public void testSuppressDNDInfo_yes_WrongPackage() { NotificationRecord r = getNotificationRecord(); Loading @@ -155,7 +149,6 @@ public class ZenModeFilteringTest extends UiServiceTestCase { assertTrue(mZenModeFiltering.shouldIntercept(ZEN_MODE_IMPORTANT_INTERRUPTIONS, policy, r)); } @Ignore @Test public void testSuppressDNDInfo_no() { NotificationRecord r = getNotificationRecord(); Loading @@ -168,7 +161,6 @@ public class ZenModeFilteringTest extends UiServiceTestCase { assertFalse(mZenModeFiltering.shouldIntercept(ZEN_MODE_NO_INTERRUPTIONS, policy, r)); } @Ignore @Test public void testSuppressAnything_yes_ZenModeOff() { NotificationRecord r = getNotificationRecord(); Loading @@ -178,7 +170,6 @@ public class ZenModeFilteringTest extends UiServiceTestCase { assertFalse(mZenModeFiltering.shouldIntercept(ZEN_MODE_OFF, policy, r)); } @Ignore @Test public void testSuppressAnything_bypass_ZenModeOn() { NotificationRecord r = getNotificationRecord(); Loading Loading
services/tests/uiservicestests/src/com/android/server/notification/ZenModeFilteringTest.java +2 −11 Original line number Diff line number Diff line Loading @@ -31,9 +31,11 @@ import static org.mockito.Mockito.when; import android.app.Notification; import android.app.NotificationChannel; import android.app.NotificationManager; import android.app.NotificationManager.Policy; import android.media.AudioAttributes; import android.service.notification.StatusBarNotification; import android.service.notification.ZenModeConfig; import android.test.suitebuilder.annotation.SmallTest; import android.testing.AndroidTestingRunner; import android.testing.TestableLooper; Loading @@ -43,7 +45,6 @@ import com.android.internal.util.NotificationMessagingUtil; import com.android.server.UiServiceTestCase; import org.junit.Before; import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; Loading Loading @@ -75,7 +76,6 @@ public class ZenModeFilteringTest extends UiServiceTestCase { return new NotificationRecord(mContext, sbn, c); } @Ignore @Test public void testIsMessage() { NotificationRecord r = getNotificationRecord(); Loading @@ -87,7 +87,6 @@ public class ZenModeFilteringTest extends UiServiceTestCase { assertFalse(mZenModeFiltering.isMessage(r)); } @Ignore @Test public void testIsAlarm() { NotificationChannel c = mock(NotificationChannel.class); Loading @@ -102,7 +101,6 @@ public class ZenModeFilteringTest extends UiServiceTestCase { assertTrue(mZenModeFiltering.isAlarm(r)); } @Ignore @Test public void testIsAlarm_wrongCategory() { NotificationRecord r = getNotificationRecord(); Loading @@ -110,7 +108,6 @@ public class ZenModeFilteringTest extends UiServiceTestCase { assertFalse(mZenModeFiltering.isAlarm(r)); } @Ignore @Test public void testIsAlarm_wrongUsage() { NotificationChannel c = mock(NotificationChannel.class); Loading @@ -121,7 +118,6 @@ public class ZenModeFilteringTest extends UiServiceTestCase { assertFalse(mZenModeFiltering.isAlarm(r)); } @Ignore @Test public void testSuppressDNDInfo_yes_VisEffectsAllowed() { NotificationRecord r = getNotificationRecord(); Loading @@ -133,7 +129,6 @@ public class ZenModeFilteringTest extends UiServiceTestCase { assertTrue(mZenModeFiltering.shouldIntercept(ZEN_MODE_IMPORTANT_INTERRUPTIONS, policy, r)); } @Ignore @Test public void testSuppressDNDInfo_yes_WrongId() { NotificationRecord r = getNotificationRecord(); Loading @@ -144,7 +139,6 @@ public class ZenModeFilteringTest extends UiServiceTestCase { assertTrue(mZenModeFiltering.shouldIntercept(ZEN_MODE_IMPORTANT_INTERRUPTIONS, policy, r)); } @Ignore @Test public void testSuppressDNDInfo_yes_WrongPackage() { NotificationRecord r = getNotificationRecord(); Loading @@ -155,7 +149,6 @@ public class ZenModeFilteringTest extends UiServiceTestCase { assertTrue(mZenModeFiltering.shouldIntercept(ZEN_MODE_IMPORTANT_INTERRUPTIONS, policy, r)); } @Ignore @Test public void testSuppressDNDInfo_no() { NotificationRecord r = getNotificationRecord(); Loading @@ -168,7 +161,6 @@ public class ZenModeFilteringTest extends UiServiceTestCase { assertFalse(mZenModeFiltering.shouldIntercept(ZEN_MODE_NO_INTERRUPTIONS, policy, r)); } @Ignore @Test public void testSuppressAnything_yes_ZenModeOff() { NotificationRecord r = getNotificationRecord(); Loading @@ -178,7 +170,6 @@ public class ZenModeFilteringTest extends UiServiceTestCase { assertFalse(mZenModeFiltering.shouldIntercept(ZEN_MODE_OFF, policy, r)); } @Ignore @Test public void testSuppressAnything_bypass_ZenModeOn() { NotificationRecord r = getNotificationRecord(); Loading