Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6233898e authored by Liefu Liu's avatar Liefu Liu
Browse files

Updated the SET_DEFAULT_ACCOUNT_FOR_CONTACTS's permission protection

level to knownSigner.

Bug: 378012462
Test: Tested on device
Flag: android.provider.new_default_account_api_enabled

	modified:   res/AndroidManifest.xml
	modified:   res/res/values/config.xml

Change-Id: I618ebb3debd5cc2422111190392531f8f42edf96
parent 4aab2303
Loading
Loading
Loading
Loading
+15 −2
Original line number Diff line number Diff line
@@ -920,7 +920,20 @@
        @hide
    -->
    <permission android:name="android.permission.SET_DEFAULT_ACCOUNT_FOR_CONTACTS"
        android:protectionLevel="internal|role" />
        android:protectionLevel="internal|role"
        android:featureFlag="!android.provider.new_default_account_api_enabled"/>

    <!-- Allows an application to set default account for new contacts.
        <p>This permission is only granted to system applications fulfilling the Contacts app role
        and the application with known signers.
        <p>Protection level: internal|role|knownSigner
        @SystemApi
        @hide
    -->
    <permission android:name="android.permission.SET_DEFAULT_ACCOUNT_FOR_CONTACTS"
        android:protectionLevel="internal|role|knownSigner"
        android:knownCerts="@array/config_setContactsDefaultAccountKnownSigners"
        android:featureFlag="android.provider.new_default_account_api_enabled"/>

    <!-- ====================================================================== -->
    <!-- Permissions for accessing user's calendar                              -->
+5 −0
Original line number Diff line number Diff line
@@ -5898,6 +5898,11 @@
        <!-- <item>com.android.settings</item> -->
    </string-array>

    <!-- Certificate digests for trusted apps that will be allowed to obtain the knownSigner
         SET_DEFAULT_ACCOUNT_FOR_CONTACTS permissions. The digest should be computed over the DER
         encoding of the trusted certificate using the SHA-256 digest algorithm. -->
    <string-array name="config_setContactsDefaultAccountKnownSigners">
    </string-array>

    <!-- Class name of the custom country detector to be used. -->
    <string name="config_customCountryDetector" translatable="false">com.android.server.location.ComprehensiveCountryDetector</string>