Loading core/tests/coretests/src/android/app/AutomaticZenRuleTest.java +2 −0 Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ import android.content.ComponentName; import android.net.Uri; import android.os.Parcel; import android.platform.test.annotations.EnableFlags; import android.platform.test.annotations.Presubmit; import android.platform.test.flag.junit.SetFlagsRule; import androidx.test.ext.junit.runners.AndroidJUnit4; Loading @@ -39,6 +40,7 @@ import org.junit.runner.RunWith; import java.lang.reflect.Field; @RunWith(AndroidJUnit4.class) @Presubmit @SmallTest public class AutomaticZenRuleTest { private static final String CLASS = "android.app.AutomaticZenRule"; Loading core/tests/coretests/src/android/app/NotificationChannelGroupTest.java +2 −1 Original line number Diff line number Diff line Loading @@ -20,7 +20,7 @@ import static junit.framework.TestCase.assertEquals; import static junit.framework.TestCase.assertTrue; import android.os.Parcel; import android.test.AndroidTestCase; import android.platform.test.annotations.Presubmit; import android.text.TextUtils; import androidx.test.filters.SmallTest; Loading @@ -35,6 +35,7 @@ import java.lang.reflect.Field; @RunWith(AndroidJUnit4.class) @SmallTest @Presubmit public class NotificationChannelGroupTest { private final String CLASS = "android.app.NotificationChannelGroup"; Loading core/tests/coretests/src/android/app/NotificationChannelTest.java +2 −0 Original line number Diff line number Diff line Loading @@ -46,6 +46,7 @@ import android.os.Parcel; import android.os.RemoteCallback; import android.os.RemoteException; import android.os.VibrationEffect; import android.platform.test.annotations.Presubmit; import android.platform.test.flag.junit.SetFlagsRule; import android.provider.MediaStore.Audio.AudioColumns; import android.test.mock.MockContentResolver; Loading Loading @@ -74,6 +75,7 @@ import java.util.function.Consumer; @RunWith(AndroidJUnit4.class) @SmallTest @Presubmit public class NotificationChannelTest { @Rule public final SetFlagsRule mSetFlagsRule = new SetFlagsRule(); Loading core/tests/coretests/src/android/app/NotificationHistoryTest.java +12 −4 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ import static com.google.common.truth.Truth.assertThat; import android.app.NotificationHistory.HistoricalNotification; import android.graphics.drawable.Icon; import android.os.Parcel; import android.platform.test.annotations.Presubmit; import androidx.test.InstrumentationRegistry; import androidx.test.runner.AndroidJUnit4; Loading @@ -35,13 +36,19 @@ import java.util.List; import java.util.Set; @RunWith(AndroidJUnit4.class) @Presubmit public class NotificationHistoryTest { private HistoricalNotification getHistoricalNotification(int index) { private static HistoricalNotification getHistoricalNotification(int index) { return getHistoricalNotification("package" + index, index); } private HistoricalNotification getHistoricalNotification(String packageName, int index) { private static HistoricalNotification getHistoricalNotification(String packageName, int index) { return getHistoricalNotification(packageName, index, /* includeIcon= */ true); } private static HistoricalNotification getHistoricalNotification(String packageName, int index, boolean includeIcon) { String expectedChannelName = "channelName" + index; String expectedChannelId = "channelId" + index; int expectedUid = 1123456 + index; Loading @@ -65,7 +72,7 @@ public class NotificationHistoryTest { .setPostedTimeMs(expectedPostTime) .setTitle(expectedTitle) .setText(expectedText) .setIcon(expectedIcon) .setIcon(includeIcon ? expectedIcon : null) .setConversationId(conversationId) .build(); } Loading Loading @@ -376,7 +383,8 @@ public class NotificationHistoryTest { List<HistoricalNotification> expectedEntries = new ArrayList<>(); for (int i = 10; i >= 1; i--) { HistoricalNotification n = getHistoricalNotification(i); HistoricalNotification n = getHistoricalNotification("packageName" + i, i, /* includeIcon= */ false); expectedEntries.add(n); history.addNotificationToWrite(n); } Loading core/tests/coretests/src/android/app/NotificationTest.java +7 −0 Original line number Diff line number Diff line Loading @@ -85,6 +85,7 @@ import android.os.Bundle; import android.os.Parcel; import android.os.Parcelable; import android.os.SystemProperties; import android.platform.test.annotations.Presubmit; import android.text.Spannable; import android.text.SpannableString; import android.text.SpannableStringBuilder; Loading @@ -107,6 +108,7 @@ import junit.framework.Assert; import libcore.junit.util.compat.CoreCompatChangeRule; import org.junit.Before; import org.junit.Ignore; import org.junit.Rule; import org.junit.Test; import org.junit.rules.TestRule; Loading @@ -117,6 +119,7 @@ import java.util.function.Consumer; @RunWith(AndroidJUnit4.class) @SmallTest @Presubmit public class NotificationTest { private Context mContext; Loading Loading @@ -768,6 +771,7 @@ public class NotificationTest { } @Test @Ignore // TODO: b/329389261 - Restore or delete public void testColors_ensureColors_dayMode_producesValidPalette() { Notification.Colors c = new Notification.Colors(); boolean colorized = false; Loading Loading @@ -796,6 +800,7 @@ public class NotificationTest { } @Test @Ignore // TODO: b/329389261 - Restore or delete public void testColors_ensureColors_colorized_producesValidPalette_red() { validateColorizedPaletteForColor(Color.RED); } Loading Loading @@ -1244,6 +1249,7 @@ public class NotificationTest { } @Test @Ignore // TODO: b/329402256 - Restore or delete public void testBigPictureStyle_setExtras_pictureIconNull_pictureIconKeyNull() { Notification.BigPictureStyle bpStyle = new Notification.BigPictureStyle(); bpStyle.bigPicture((Bitmap) null); Loading @@ -1257,6 +1263,7 @@ public class NotificationTest { } @Test @Ignore // TODO: b/329402256 - Restore or delete public void testBigPictureStyle_setExtras_pictureIconNull_pictureKeyNull() { Notification.BigPictureStyle bpStyle = new Notification.BigPictureStyle(); bpStyle.bigPicture((Bitmap) null); Loading Loading
core/tests/coretests/src/android/app/AutomaticZenRuleTest.java +2 −0 Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ import android.content.ComponentName; import android.net.Uri; import android.os.Parcel; import android.platform.test.annotations.EnableFlags; import android.platform.test.annotations.Presubmit; import android.platform.test.flag.junit.SetFlagsRule; import androidx.test.ext.junit.runners.AndroidJUnit4; Loading @@ -39,6 +40,7 @@ import org.junit.runner.RunWith; import java.lang.reflect.Field; @RunWith(AndroidJUnit4.class) @Presubmit @SmallTest public class AutomaticZenRuleTest { private static final String CLASS = "android.app.AutomaticZenRule"; Loading
core/tests/coretests/src/android/app/NotificationChannelGroupTest.java +2 −1 Original line number Diff line number Diff line Loading @@ -20,7 +20,7 @@ import static junit.framework.TestCase.assertEquals; import static junit.framework.TestCase.assertTrue; import android.os.Parcel; import android.test.AndroidTestCase; import android.platform.test.annotations.Presubmit; import android.text.TextUtils; import androidx.test.filters.SmallTest; Loading @@ -35,6 +35,7 @@ import java.lang.reflect.Field; @RunWith(AndroidJUnit4.class) @SmallTest @Presubmit public class NotificationChannelGroupTest { private final String CLASS = "android.app.NotificationChannelGroup"; Loading
core/tests/coretests/src/android/app/NotificationChannelTest.java +2 −0 Original line number Diff line number Diff line Loading @@ -46,6 +46,7 @@ import android.os.Parcel; import android.os.RemoteCallback; import android.os.RemoteException; import android.os.VibrationEffect; import android.platform.test.annotations.Presubmit; import android.platform.test.flag.junit.SetFlagsRule; import android.provider.MediaStore.Audio.AudioColumns; import android.test.mock.MockContentResolver; Loading Loading @@ -74,6 +75,7 @@ import java.util.function.Consumer; @RunWith(AndroidJUnit4.class) @SmallTest @Presubmit public class NotificationChannelTest { @Rule public final SetFlagsRule mSetFlagsRule = new SetFlagsRule(); Loading
core/tests/coretests/src/android/app/NotificationHistoryTest.java +12 −4 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ import static com.google.common.truth.Truth.assertThat; import android.app.NotificationHistory.HistoricalNotification; import android.graphics.drawable.Icon; import android.os.Parcel; import android.platform.test.annotations.Presubmit; import androidx.test.InstrumentationRegistry; import androidx.test.runner.AndroidJUnit4; Loading @@ -35,13 +36,19 @@ import java.util.List; import java.util.Set; @RunWith(AndroidJUnit4.class) @Presubmit public class NotificationHistoryTest { private HistoricalNotification getHistoricalNotification(int index) { private static HistoricalNotification getHistoricalNotification(int index) { return getHistoricalNotification("package" + index, index); } private HistoricalNotification getHistoricalNotification(String packageName, int index) { private static HistoricalNotification getHistoricalNotification(String packageName, int index) { return getHistoricalNotification(packageName, index, /* includeIcon= */ true); } private static HistoricalNotification getHistoricalNotification(String packageName, int index, boolean includeIcon) { String expectedChannelName = "channelName" + index; String expectedChannelId = "channelId" + index; int expectedUid = 1123456 + index; Loading @@ -65,7 +72,7 @@ public class NotificationHistoryTest { .setPostedTimeMs(expectedPostTime) .setTitle(expectedTitle) .setText(expectedText) .setIcon(expectedIcon) .setIcon(includeIcon ? expectedIcon : null) .setConversationId(conversationId) .build(); } Loading Loading @@ -376,7 +383,8 @@ public class NotificationHistoryTest { List<HistoricalNotification> expectedEntries = new ArrayList<>(); for (int i = 10; i >= 1; i--) { HistoricalNotification n = getHistoricalNotification(i); HistoricalNotification n = getHistoricalNotification("packageName" + i, i, /* includeIcon= */ false); expectedEntries.add(n); history.addNotificationToWrite(n); } Loading
core/tests/coretests/src/android/app/NotificationTest.java +7 −0 Original line number Diff line number Diff line Loading @@ -85,6 +85,7 @@ import android.os.Bundle; import android.os.Parcel; import android.os.Parcelable; import android.os.SystemProperties; import android.platform.test.annotations.Presubmit; import android.text.Spannable; import android.text.SpannableString; import android.text.SpannableStringBuilder; Loading @@ -107,6 +108,7 @@ import junit.framework.Assert; import libcore.junit.util.compat.CoreCompatChangeRule; import org.junit.Before; import org.junit.Ignore; import org.junit.Rule; import org.junit.Test; import org.junit.rules.TestRule; Loading @@ -117,6 +119,7 @@ import java.util.function.Consumer; @RunWith(AndroidJUnit4.class) @SmallTest @Presubmit public class NotificationTest { private Context mContext; Loading Loading @@ -768,6 +771,7 @@ public class NotificationTest { } @Test @Ignore // TODO: b/329389261 - Restore or delete public void testColors_ensureColors_dayMode_producesValidPalette() { Notification.Colors c = new Notification.Colors(); boolean colorized = false; Loading Loading @@ -796,6 +800,7 @@ public class NotificationTest { } @Test @Ignore // TODO: b/329389261 - Restore or delete public void testColors_ensureColors_colorized_producesValidPalette_red() { validateColorizedPaletteForColor(Color.RED); } Loading Loading @@ -1244,6 +1249,7 @@ public class NotificationTest { } @Test @Ignore // TODO: b/329402256 - Restore or delete public void testBigPictureStyle_setExtras_pictureIconNull_pictureIconKeyNull() { Notification.BigPictureStyle bpStyle = new Notification.BigPictureStyle(); bpStyle.bigPicture((Bitmap) null); Loading @@ -1257,6 +1263,7 @@ public class NotificationTest { } @Test @Ignore // TODO: b/329402256 - Restore or delete public void testBigPictureStyle_setExtras_pictureIconNull_pictureKeyNull() { Notification.BigPictureStyle bpStyle = new Notification.BigPictureStyle(); bpStyle.bigPicture((Bitmap) null); Loading