diff options
| author | 2021-07-21 10:08:04 -0400 | |
|---|---|---|
| committer | 2021-07-22 13:04:01 +0000 | |
| commit | c279a42a3f2b4dd067074010fd5308d6ec1853f6 (patch) | |
| tree | bbe4100e75930096a4d94ccd115d0ba7f9c22b49 | |
| parent | 2e440eb0a859eeb0f2c48b72e389d68c0be8df04 (diff) | |
Guard DISABLE_PLUGIN with PLUGIN permission.
Fixes a p0 security bug. We already have the plugin permission
defined in our manifest. Ensure that senders of the DISABLE_PLUGIN
broadcast have that permission.
Bug: 193444889
Test: manual
Change-Id: Iebaba435c17c5644c5357c0683858447f5ffb897
Merged-In: Iebaba435c17c5644c5357c0683858447f5ffb897
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/plugins/PluginManagerImpl.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/plugins/PluginManagerImpl.java b/packages/SystemUI/src/com/android/systemui/plugins/PluginManagerImpl.java index 2a17e35f00dd..d9fd0a659605 100644 --- a/packages/SystemUI/src/com/android/systemui/plugins/PluginManagerImpl.java +++ b/packages/SystemUI/src/com/android/systemui/plugins/PluginManagerImpl.java @@ -183,10 +183,12 @@ public class PluginManagerImpl extends BroadcastReceiver implements PluginManage IntentFilter filter = new IntentFilter(Intent.ACTION_PACKAGE_ADDED); filter.addAction(Intent.ACTION_PACKAGE_CHANGED); filter.addAction(Intent.ACTION_PACKAGE_REMOVED); + filter.addDataScheme("package"); + mContext.registerReceiver(this, filter); filter.addAction(PLUGIN_CHANGED); filter.addAction(DISABLE_PLUGIN); filter.addDataScheme("package"); - mContext.registerReceiver(this, filter); + mContext.registerReceiver(this, filter, PluginInstanceManager.PLUGIN_PERMISSION, null); filter = new IntentFilter(Intent.ACTION_USER_UNLOCKED); mContext.registerReceiver(this, filter); } |