From 8cf4996fdf20326f406daeda642fe27ed49ca79b Mon Sep 17 00:00:00 2001 From: Beverly Date: Wed, 30 Oct 2019 16:34:16 -0400 Subject: [PATCH] Set a good example - don't export ExamplePlugin Plugins should never be exported because this would allow other packages installed on the device to attempt to launch it via Context#startService which can crash SystemUI. By default, if a service has an intent-filter, exported is set to true. Therefore, we must explicitly set exported=false. Test: n/a Bug: 142012333 Change-Id: Iaf4191ee3006cc07eb0309f068854c103683e99d --- packages/SystemUI/plugin/ExamplePlugin/AndroidManifest.xml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/SystemUI/plugin/ExamplePlugin/AndroidManifest.xml b/packages/SystemUI/plugin/ExamplePlugin/AndroidManifest.xml index ff89bbcb455f3..e9e844124e436 100644 --- a/packages/SystemUI/plugin/ExamplePlugin/AndroidManifest.xml +++ b/packages/SystemUI/plugin/ExamplePlugin/AndroidManifest.xml @@ -22,14 +22,16 @@ + android:label="@string/plugin_label" + android:exported="false"> + android:label="@string/plugin_label" + android:exported="false">