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

Commit 59be5850 authored by Liran Binyamin's avatar Liran Binyamin
Browse files

Some Kotlin cleanup in bubbles

Bug: 281083629
Flag: EXEMPT cleanup
Test: treehugger
Change-Id: I4aed49f52dee7a149fb33613522f152ee13904c2
parent c5e8aa35
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -36,7 +36,7 @@ import com.android.wm.shell.ShellTaskOrganizer
import com.android.wm.shell.taskview.TaskView
import com.android.wm.shell.taskview.TaskViewController
import com.android.wm.shell.taskview.TaskViewTaskController
import com.android.wm.shell.bubbles.util.verifyEnterBubbleTransaction
import com.android.wm.shell.bubbles.util.BubbleTestUtils.verifyEnterBubbleTransaction
import com.google.common.truth.Truth.assertThat
import com.google.common.util.concurrent.MoreExecutors.directExecutor
import org.junit.Before
+1 −1
Original line number Diff line number Diff line
@@ -35,7 +35,7 @@ import com.android.wm.shell.Flags.FLAG_ENABLE_BUBBLE_ANYTHING
import com.android.wm.shell.Flags.FLAG_ENABLE_BUBBLE_APP_COMPAT_FIXES
import com.android.wm.shell.Flags.FLAG_ENABLE_CREATE_ANY_BUBBLE
import com.android.wm.shell.ShellTaskOrganizer
import com.android.wm.shell.bubbles.util.verifyExitBubbleTransaction
import com.android.wm.shell.bubbles.util.BubbleTestUtils.verifyExitBubbleTransaction
import com.android.wm.shell.taskview.TaskView
import com.android.wm.shell.taskview.TaskViewTaskController
import com.android.wm.shell.splitscreen.SplitScreenController
+1 −1
Original line number Diff line number Diff line
@@ -48,7 +48,7 @@ import com.android.wm.shell.Flags.FLAG_ENABLE_CREATE_ANY_BUBBLE
import com.android.wm.shell.R
import com.android.wm.shell.ShellTaskOrganizer
import com.android.wm.shell.bubbles.Bubbles.BubbleMetadataFlagListener
import com.android.wm.shell.bubbles.util.verifyEnterBubbleTransaction
import com.android.wm.shell.bubbles.util.BubbleTestUtils.verifyEnterBubbleTransaction
import com.android.wm.shell.common.TestShellExecutor
import com.android.wm.shell.taskview.TaskView
import com.android.wm.shell.taskview.TaskViewController
+1 −1
Original line number Diff line number Diff line
@@ -26,7 +26,7 @@ import static android.view.ViewGroup.LayoutParams.WRAP_CONTENT;
import static com.android.wm.shell.bubbles.BubbleDebugConfig.TAG_BUBBLES;
import static com.android.wm.shell.bubbles.BubbleDebugConfig.TAG_WITH_CLASS_NAME;
import static com.android.wm.shell.bubbles.BubblePositioner.MAX_HEIGHT;
import static com.android.wm.shell.bubbles.util.BubbleUtilsKt.getEnterBubbleTransaction;
import static com.android.wm.shell.bubbles.util.BubbleUtils.getEnterBubbleTransaction;
import static com.android.wm.shell.protolog.ShellProtoLogGroup.WM_SHELL_BUBBLES;
import static com.android.wm.shell.shared.TypefaceUtils.setTypeface;

+8 −24
Original line number Diff line number Diff line
@@ -204,29 +204,17 @@ class BubbleOverflow(private val context: Context, private val positioner: Bubbl

    override fun getBubbleBarExpandedView(): BubbleBarExpandedView? = bubbleBarExpandedView

    override fun getDotColor(): Int {
        return dotColor
    }
    override fun getDotColor() = dotColor

    override fun getAppBadge(): Bitmap? {
        return null
    }
    override fun getAppBadge() = null

    override fun getRawAppBadge(): Bitmap? {
        return null
    }
    override fun getRawAppBadge() = null

    override fun getBubbleIcon(): Bitmap {
        return bitmap
    }
    override fun getBubbleIcon() = bitmap

    override fun showDot(): Boolean {
        return showDot
    }
    override fun showDot() = showDot

    override fun getDotPath(): Path? {
        return dotPath
    }
    override fun getDotPath() = dotPath

    override fun setTaskViewVisibility(visible: Boolean) {
        // Overflow does not have a TaskView.
@@ -250,13 +238,9 @@ class BubbleOverflow(private val context: Context, private val positioner: Bubbl
        return overflowBtn
    }

    override fun getKey(): String {
        return KEY
    }
    override fun getKey() = KEY

    override fun getTaskId(): Int {
        return if (expandedView != null) expandedView!!.taskId else INVALID_TASK_ID
    }
    override fun getTaskId() = INVALID_TASK_ID

    companion object {
        const val KEY = "Overflow"
Loading