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
This commit is contained in:
committed by
Michael Groover
parent
4134ebd21f
commit
5d9f23f406
@@ -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,
|
||||
|
||||
@@ -174,7 +174,8 @@ public class SystemActions extends SystemUI {
|
||||
mReceiver,
|
||||
mReceiver.createIntentFilter(),
|
||||
PERMISSION_SELF,
|
||||
null);
|
||||
null,
|
||||
Context.RECEIVER_EXPORTED);
|
||||
registerActions();
|
||||
}
|
||||
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user