From 2660514eeabd7c4bdef1861a2752e6ceff69a478 Mon Sep 17 00:00:00 2001 From: Joshua Trask Date: Tue, 16 Nov 2021 14:16:36 -0500 Subject: [PATCH] Add priv-app allow-listing for unbundled chooser. These two permissions are required for the most basic ChooserActivity flows (as determined by runtime exceptions during prototyping). Without this allow-listing, the unbundled chooser's intent resolvers fail to register at startup, and the device boot-loops. Among the privileges that might require allow-listing, these two in particular were sufficient for showing a basic Chooser UI and launching the user-selected target. More complex Chooser flows may turn out to require additional permissions later on. Test: manual testing as described above, but requires several local-only changes to exercise the flow, and this CL has to be the first to go in (but has no side-effects of its own). Change-Id: I6a24a46a91199e8b3fb643f047a9b9412b19eb8d --- data/etc/Android.bp | 8 +++++++- data/etc/com.android.intentresolver.xml | 22 ++++++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 data/etc/com.android.intentresolver.xml diff --git a/data/etc/Android.bp b/data/etc/Android.bp index be1e2b2247fb2..88228f26f17e3 100644 --- a/data/etc/Android.bp +++ b/data/etc/Android.bp @@ -12,7 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. - // Sysconfig files package { @@ -118,6 +117,13 @@ prebuilt_etc { filename_from_src: true, } +prebuilt_etc { + name: "privapp_whitelist_com.android.intentresolver", + sub_dir: "permissions", + src: "com.android.intentresolver.xml", + filename_from_src: true, +} + prebuilt_etc { name: "privapp_whitelist_com.android.launcher3", system_ext_specific: true, diff --git a/data/etc/com.android.intentresolver.xml b/data/etc/com.android.intentresolver.xml new file mode 100644 index 0000000000000..0f1c4673562e6 --- /dev/null +++ b/data/etc/com.android.intentresolver.xml @@ -0,0 +1,22 @@ + + + + + + + +