Skip to content

Crash when searching without call log or contact permission #408

@Helium314

Description

@Helium314

Checklist

  • I am using the latest version - 1.4.3 (F-Droid)
  • I checked, but didn't find any duplicates (open OR closed) of this issue in the repo. - App crashes when trying to search for contacts, when permission isn't granted. #254 is simiar, but should already be fixed
  • [?] This issue contains only one bug. I will open one issue for every bug report I want to file.
    Actually it might be two bugs, one because contacts permission is not checked before searching, and one because call log permission is not checked.

Steps to reproduce the bug

  1. Install from F-Droid
  2. Start app
  3. (optional) Deny contacts permission
  4. Do not set as default app
  5. Enter something in search field

Actual behaviour

Crash because no READ_CONTACTS or WRITE_CONTACTS permission is granted.
If the permission is granted: Crash because no READ_CALL_LOG or WRITE_CALL_LOG permission is granted.

Expected behavior

Either the app asking for permissions, or explain that search is not possible without permissions.
User should be asked to grant call log permission (currently only asking for contacts).

Logs

In both cases the first occurrence of app code is in

context.contentResolver.registerContentObserver(contentResolver.finalUri, true, observer)

I can add full logs if necessary.

Device info

  • Android version/Custom ROM version: LineageOS 16.0 / Android 9
  • Device model: Samsung Galaxy S4 Mini Plus (9195I)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions