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

Commit b410c974 authored by Tyler Gunn's avatar Tyler Gunn
Browse files

Grant call log permissions to the contacts provider.

This is required so that the OP_READ_CALL_LOG and OP_WRITE_CALL_LOG
AppOps are granted to the CallLogProvider, which is required to read
from the shadow call log and write to the main system call log.

Flag: Unflagged due to regression
Test: Manual regression testing.
Bug: 352400424
Change-Id: I8865076d9951e8a0241f4f1dd62490280dfb87e5
parent c7aa0be4
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -149,6 +149,13 @@ final class DefaultPermissionGrantPolicy {
        CONTACTS_PERMISSIONS.add(Manifest.permission.GET_ACCOUNTS);
    }

    private static final Set<String> CALL_LOG_PERMISSIONS = new ArraySet<>();
    static {
        CALL_LOG_PERMISSIONS.add(Manifest.permission.READ_CALL_LOG);
        CALL_LOG_PERMISSIONS.add(Manifest.permission.WRITE_CALL_LOG);
    }


    private static final Set<String> ALWAYS_LOCATION_PERMISSIONS = new ArraySet<>();
    static {
        ALWAYS_LOCATION_PERMISSIONS.add(Manifest.permission.ACCESS_FINE_LOCATION);
@@ -753,7 +760,7 @@ final class DefaultPermissionGrantPolicy {
        String contactsProviderPackage =
                getDefaultProviderAuthorityPackage(ContactsContract.AUTHORITY, userId);
        grantSystemFixedPermissionsToSystemPackage(pm, contactsProviderPackage, userId,
                CONTACTS_PERMISSIONS, PHONE_PERMISSIONS);
                CONTACTS_PERMISSIONS, PHONE_PERMISSIONS, CALL_LOG_PERMISSIONS);
        grantPermissionsToSystemPackage(pm, contactsProviderPackage, userId, STORAGE_PERMISSIONS);

        // Device provisioning