Loading quickstep/tests/multivalentScreenshotTests/src/com/android/launcher3/taskbar/bubbles/BubbleViewScreenshotTest.kt +7 −3 Original line number Diff line number Diff line Loading @@ -15,6 +15,7 @@ */ package com.android.launcher3.taskbar.bubbles import android.app.Notification import android.content.Context import android.graphics.Bitmap import android.graphics.Canvas Loading Loading @@ -72,7 +73,7 @@ class BubbleViewScreenshotTest(emulationSpec: DeviceEmulationSpec) { fun bubbleView_seen() { screenshotRule.screenshotTest("bubbleView_seen") { activity -> activity.actionBar?.hide() setupBubbleView().apply { markSeen() } setupBubbleView(suppressNotification = true) } } Loading @@ -84,7 +85,7 @@ class BubbleViewScreenshotTest(emulationSpec: DeviceEmulationSpec) { } } private fun setupBubbleView(): BubbleView { private fun setupBubbleView(suppressNotification: Boolean = false): BubbleView { val inflater = LayoutInflater.from(context) val iconSize = 100 Loading @@ -95,7 +96,10 @@ class BubbleViewScreenshotTest(emulationSpec: DeviceEmulationSpec) { val icon = createCircleBitmap(radius = iconSize / 2, color = Color.LTGRAY) val badge = createCircleBitmap(radius = badgeRadius.toInt(), color = Color.RED) val bubbleInfo = BubbleInfo("key", 0, null, null, 0, context.packageName, null, null, false) val flags = if (suppressNotification) Notification.BubbleMetadata.FLAG_SUPPRESS_NOTIFICATION else 0 val bubbleInfo = BubbleInfo("key", flags, null, null, 0, context.packageName, null, null, false) val bubbleView = inflater.inflate(R.layout.bubblebar_item_view, null) as BubbleView val dotPath = PathParser.createPathFromPathData( Loading Loading
quickstep/tests/multivalentScreenshotTests/src/com/android/launcher3/taskbar/bubbles/BubbleViewScreenshotTest.kt +7 −3 Original line number Diff line number Diff line Loading @@ -15,6 +15,7 @@ */ package com.android.launcher3.taskbar.bubbles import android.app.Notification import android.content.Context import android.graphics.Bitmap import android.graphics.Canvas Loading Loading @@ -72,7 +73,7 @@ class BubbleViewScreenshotTest(emulationSpec: DeviceEmulationSpec) { fun bubbleView_seen() { screenshotRule.screenshotTest("bubbleView_seen") { activity -> activity.actionBar?.hide() setupBubbleView().apply { markSeen() } setupBubbleView(suppressNotification = true) } } Loading @@ -84,7 +85,7 @@ class BubbleViewScreenshotTest(emulationSpec: DeviceEmulationSpec) { } } private fun setupBubbleView(): BubbleView { private fun setupBubbleView(suppressNotification: Boolean = false): BubbleView { val inflater = LayoutInflater.from(context) val iconSize = 100 Loading @@ -95,7 +96,10 @@ class BubbleViewScreenshotTest(emulationSpec: DeviceEmulationSpec) { val icon = createCircleBitmap(radius = iconSize / 2, color = Color.LTGRAY) val badge = createCircleBitmap(radius = badgeRadius.toInt(), color = Color.RED) val bubbleInfo = BubbleInfo("key", 0, null, null, 0, context.packageName, null, null, false) val flags = if (suppressNotification) Notification.BubbleMetadata.FLAG_SUPPRESS_NOTIFICATION else 0 val bubbleInfo = BubbleInfo("key", flags, null, null, 0, context.packageName, null, null, false) val bubbleView = inflater.inflate(R.layout.bubblebar_item_view, null) as BubbleView val dotPath = PathParser.createPathFromPathData( Loading