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

Commit 5d9f23f4 authored by Jacob Hobbie's avatar Jacob Hobbie Committed by Michael Groover
Browse files

Add flags to permission protected SysUI broadcasts

Since these receivers are permission protected,
their callers will also need the permission which already restricts
access, and marking dynamic receivers that are
permission protected as exported is consistent with the pattern in static receivers.

Test: no-op
Bug: 161145287
Change-Id: I8a155551d306ee2a7213125e69a561232bf72bae
parent 4134ebd2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -144,7 +144,7 @@ public class PipMediaController {
        mediaControlFilter.addAction(ACTION_NEXT);
        mediaControlFilter.addAction(ACTION_PREV);
        mContext.registerReceiverForAllUsers(mMediaActionReceiver, mediaControlFilter,
                SYSTEMUI_PERMISSION, mainHandler);
                SYSTEMUI_PERMISSION, mainHandler, Context.RECEIVER_EXPORTED);

        // Creates the standard media buttons that we may show.
        mPauseAction = getDefaultRemoteAction(R.string.pip_pause,
+2 −1
Original line number Diff line number Diff line
@@ -174,7 +174,8 @@ public class SystemActions extends SystemUI {
                mReceiver,
                mReceiver.createIntentFilter(),
                PERMISSION_SELF,
                null);
                null,
                Context.RECEIVER_EXPORTED);
        registerActions();
    }

+1 −1
Original line number Diff line number Diff line
@@ -81,7 +81,7 @@ class DemoModeController constructor(
        val demoFilter = IntentFilter()
        demoFilter.addAction(ACTION_DEMO)
        context.registerReceiverAsUser(broadcastReceiver, UserHandle.ALL, demoFilter,
                android.Manifest.permission.DUMP, null)
                android.Manifest.permission.DUMP, null, Context.RECEIVER_EXPORTED)
    }

    override fun addCallback(listener: DemoMode) {
+1 −1
Original line number Diff line number Diff line
@@ -749,7 +749,7 @@ public class PowerNotificationWarnings implements PowerUI.WarningsUI {
            filter.addAction(ACTION_AUTO_SAVER_NO_THANKS);
            filter.addAction(ACTION_DISMISS_AUTO_SAVER_SUGGESTION);
            mContext.registerReceiverAsUser(this, UserHandle.ALL, filter,
                    android.Manifest.permission.DEVICE_POWER, mHandler);
                    android.Manifest.permission.DEVICE_POWER, mHandler, Context.RECEIVER_EXPORTED);
        }

        @Override