GrapheneOS / os-issue-tracker

Issue tracker for GrapheneOS Android Open Source Project hardening work. Standalone projects like Auditor, AttestationServer and hardened_malloc have their own dedicated trackers.
https://grapheneos.org/
363 stars 21 forks source link

Can't set Contact Scope without permission controller crashing #4318

Open mrxx0 opened 1 week ago

mrxx0 commented 1 week ago

Context

When trying to set contact scope to an app (tested with Molly and stock dialer) by denying acccess to contact and then trying to set up contact scope, the permission controller will crash

Steps to reproduce

App info on stock dialer -> Permissions -> Contacts -> Set to not autorized (+ Contact Scopes) -> Click on contact scope to set it up -> Crash

Logs

type: crash
osVersion: google/husky/husky:15/AP3A.241105.007/2024110700:user/release-keys
package: com.android.permissioncontroller:330000000, targetSdk 35
process: com.android.permissioncontroller
processUptime: 6041 + 358 ms

java.lang.IllegalArgumentException: Unknown authority com.android.contacts.scoped
    at android.content.ContentResolver.call(ContentResolver.java:2491)
    at com.android.permissioncontroller.cscopes.ContactScopesFragment.callScopedContactsProvider(ContactScopesFragment.kt:281)
    at com.android.permissioncontroller.cscopes.ContactScopesFragment.callScopedContactsProvider$default(ContactScopesFragment.kt:280)
    at com.android.permissioncontroller.cscopes.ContactScopesFragment.updateCategories(ContactScopesFragment.kt:146)
    at com.android.permissioncontroller.cscopes.ContactScopesFragment.update(ContactScopesFragment.kt:119)
    at com.android.permissioncontroller.cscopes.ContactScopesFragment.onCreate(ContactScopesFragment.kt:96)
    at androidx.fragment.app.Fragment.performCreate(Fragment.java:3095)
    at androidx.fragment.app.FragmentStateManager.create(FragmentStateManager.java:516)
    at androidx.fragment.app.FragmentStateManager.moveToExpectedState(FragmentStateManager.java:274)
    at androidx.fragment.app.FragmentManager.executeOpsTogether(FragmentManager.java:2152)
    at androidx.fragment.app.FragmentManager.removeRedundantOperationsAndExecute(FragmentManager.java:2047)
    at androidx.fragment.app.FragmentManager.execPendingActions(FragmentManager.java:1990)
    at androidx.fragment.app.FragmentManager.dispatchStateChange(FragmentManager.java:3255)
    at androidx.fragment.app.FragmentManager.dispatchActivityCreated(FragmentManager.java:3165)
    at androidx.fragment.app.Fragment.performActivityCreated(Fragment.java:3163)
    at androidx.fragment.app.FragmentStateManager.activityCreated(FragmentStateManager.java:631)
    at androidx.fragment.app.FragmentStateManager.moveToExpectedState(FragmentStateManager.java:281)
    at androidx.fragment.app.FragmentManager.executeOpsTogether(FragmentManager.java:2152)
    at androidx.fragment.app.FragmentManager.removeRedundantOperationsAndExecute(FragmentManager.java:2053)
    at androidx.fragment.app.FragmentManager.execPendingActions(FragmentManager.java:1990)
    at androidx.fragment.app.FragmentManager$5.run(FragmentManager.java:702)
    at android.os.Handler.handleCallback(Handler.java:959)
    at android.os.Handler.dispatchMessage(Handler.java:100)
    at android.os.Looper.loopOnce(Looper.java:232)
    at android.os.Looper.loop(Looper.java:317)
    at android.app.ActivityThread.main(ActivityThread.java:8744)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:580)
    at com.android.internal.os.ExecInit.main(ExecInit.java:50)
    at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
    at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:369)

Edit : wording