Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ba3992ed authored by András Kurucz's avatar András Kurucz
Browse files

Make NotificationMemoryViewWalkerTest pass on cf tablet

Reduce the sizes of bitmaps used by this test to make them pass with the
latest cuttlefish screen configurations. Currently they are failing,
because these devices have a density, which makes to resize these
bitmaps as their size is bigger than a max dimens value in pixels.

Bug: 306164991

Test: abtd runs on different targets
Change-Id: I2cc55c27cedb7066089e110257dac0170a32e9f1
parent 955f9d2d
Loading
Loading
Loading
Loading
+7 −7
Original line number Diff line number Diff line
@@ -50,8 +50,8 @@ class NotificationMemoryViewWalkerTest : SysuiTestCase() {

    @Test
    fun testViewWalker_plainNotification_withPublicView() {
        val icon = Icon.createWithBitmap(Bitmap.createBitmap(20, 20, Bitmap.Config.ARGB_8888))
        val publicIcon = Icon.createWithBitmap(Bitmap.createBitmap(40, 40, Bitmap.Config.ARGB_8888))
        val icon = Icon.createWithBitmap(Bitmap.createBitmap(10, 10, Bitmap.Config.ARGB_8888))
        val publicIcon = Icon.createWithBitmap(Bitmap.createBitmap(20, 20, Bitmap.Config.ARGB_8888))
        testHelper.setDefaultInflationFlags(NotificationRowContentBinder.FLAG_CONTENT_VIEW_ALL)
        val row =
            testHelper.createRow(
@@ -122,9 +122,9 @@ class NotificationMemoryViewWalkerTest : SysuiTestCase() {

    @Test
    fun testViewWalker_bigPictureNotification() {
        val bigPicture = Bitmap.createBitmap(300, 300, Bitmap.Config.ARGB_8888)
        val icon = Icon.createWithBitmap(Bitmap.createBitmap(20, 20, Bitmap.Config.ARGB_8888))
        val largeIcon = Icon.createWithBitmap(Bitmap.createBitmap(60, 60, Bitmap.Config.ARGB_8888))
        val bigPicture = Bitmap.createBitmap(200, 200, Bitmap.Config.ARGB_8888)
        val icon = Icon.createWithBitmap(Bitmap.createBitmap(10, 10, Bitmap.Config.ARGB_8888))
        val largeIcon = Icon.createWithBitmap(Bitmap.createBitmap(30, 30, Bitmap.Config.ARGB_8888))
        val row =
            testHelper.createRow(
                Notification.Builder(mContext)
@@ -182,8 +182,8 @@ class NotificationMemoryViewWalkerTest : SysuiTestCase() {

    @Test
    fun testViewWalker_customView() {
        val icon = Icon.createWithBitmap(Bitmap.createBitmap(20, 20, Bitmap.Config.ARGB_8888))
        val bitmap = Bitmap.createBitmap(300, 300, Bitmap.Config.ARGB_8888)
        val icon = Icon.createWithBitmap(Bitmap.createBitmap(10, 10, Bitmap.Config.ARGB_8888))
        val bitmap = Bitmap.createBitmap(200, 200, Bitmap.Config.ARGB_8888)

        val views = RemoteViews(mContext.packageName, R.layout.custom_view_dark)
        views.setImageViewBitmap(R.id.custom_view_dark_image, bitmap)