summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author wayneyang <wayneyang@google.com> 2023-02-24 06:42:58 +0000
committer WAYNE YANG <wayneyang@google.com> 2023-02-28 07:48:11 +0000
commit222a0079746398920faf58d758988c8d34733394 (patch)
tree523d465bdc73a700355f135b951e784ecb08e0d4
parente997a46fd0a16d503acfb35a603e7fcf3cef7359 (diff)
Adds the knownSigner protection level to the permission of
the demo device provisioning. The security review: b/267405430 Bug: 213131927 Test: manual Change-Id: Icfa32e6ef55618197647a3958368a7a9d4caefd3
-rw-r--r--core/res/AndroidManifest.xml3
-rw-r--r--core/res/res/values/arrays.xml6
2 files changed, 8 insertions, 1 deletions
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
index 16db81825dd2..9725c377f975 100644
--- a/core/res/AndroidManifest.xml
+++ b/core/res/AndroidManifest.xml
@@ -3707,7 +3707,8 @@
<!-- @SystemApi @hide Allows an application to set a device owner on retail demo devices.-->
<permission android:name="android.permission.PROVISION_DEMO_DEVICE"
- android:protectionLevel="signature|setup" />
+ android:protectionLevel="signature|setup|knownSigner"
+ android:knownCerts="@array/demo_device_provisioning_known_signers" />
<!-- @TestApi @hide Allows an application to reset the record of previous system update freeze
periods. -->
diff --git a/core/res/res/values/arrays.xml b/core/res/res/values/arrays.xml
index 4468ebe90ba0..b35481d3c31b 100644
--- a/core/res/res/values/arrays.xml
+++ b/core/res/res/values/arrays.xml
@@ -227,4 +227,10 @@
<string-array name="device_state_notification_thermal_contents">
<item>@string/concurrent_display_notification_thermal_content</item>
</string-array>
+
+ <!-- Certificate digests for trusted apps that will be allowed to obtain the knownSigner of the
+ demo device provisioning permissions. -->
+ <string-array name="demo_device_provisioning_known_signers">
+ <item>@string/config_retailDemoPackageSignature</item>
+ </string-array>
</resources>