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

Commit ed7ae746 authored by Milton Wu's avatar Milton Wu
Browse files

Fix non-protected broadcast NO_ACTION

UsbPermissionActivityTest sends a broadcast intent w/o package, and it
causes an error log message from ActivityManager "Sending non-protected
broadcast NO_ACTION from system uid"

Bug: 202067864
Test: atest com.android.systemui.usb.UsbPermissionActivityTest (and make
sure no error log starting with "Sending non-protected broadcast
NO_ACTION from system uid ")

Change-Id: Ie2305ae1f48dcfc2f39c15072e9d40e53a554fac
parent 5c3c912a
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -31,7 +31,6 @@ import org.junit.Before
import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith
import java.lang.Exception

/**
 * UsbPermissionActivityTest
@@ -54,7 +53,9 @@ class UsbPermissionActivityTest : SysuiTestCase() {
                putExtra(Intent.EXTRA_INTENT, PendingIntent.getBroadcast(
                        mContext,
                        334,
                        Intent("NO_ACTION"),
                        Intent("NO_ACTION").apply {
                                setPackage("com.android.systemui.tests")
                        },
                        PendingIntent.FLAG_MUTABLE))
                putExtra(UsbManager.EXTRA_ACCESSORY, UsbAccessory(
                        "manufacturer",