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

Commit e32a151e authored by mpodolian's avatar mpodolian Committed by Mykola Podolian
Browse files

Updated package name retrieval in shell.

Flag: com.android.wm.shell.enable_create_any_bubble
Test: atest com.android.wm.shell.bubbles.BubbleTest
Fixes: 400801286
Change-Id: Ib6a025bd28381976e59fea97efc3ca0134d732c7
parent 81bc5631
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -375,7 +375,7 @@ public class Bubble implements BubbleViewProvider {
                user,
                icon,
                BubbleType.TYPE_APP,
                getAppBubbleKeyForApp(intent.getPackage(), user),
                getAppBubbleKeyForApp(ComponentUtils.getPackageName(intent), user),
                mainExecutor, bgExecutor);
    }

+2 −1
Original line number Diff line number Diff line
@@ -25,7 +25,8 @@ import com.android.wm.shell.ShellTaskOrganizer
object ComponentUtils {
    /** Retrieves the package name from an [Intent].  */
    @JvmStatic
    fun getPackageName(intent: Intent?): String? = intent?.component?.packageName
    fun getPackageName(intent: Intent?): String? =
        intent?.component?.packageName ?: intent?.`package`

    /** Retrieves the package name from a [PendingIntent].  */
    @JvmStatic