mirror of
https://github.com/M66B/FairEmail.git
synced 2024-12-31 20:25:38 +00:00
Properly handle deny contact permissions
This commit is contained in:
parent
507c098a4c
commit
1b65c7a40e
1 changed files with 2 additions and 4 deletions
|
@ -446,10 +446,8 @@ public class FragmentSetup extends FragmentBase {
|
|||
@Override
|
||||
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
|
||||
for (int i = 0; i < permissions.length; i++)
|
||||
if (grantResults[i] == PackageManager.PERMISSION_GRANTED) {
|
||||
if (Manifest.permission.READ_CONTACTS.equals(permissions[i]))
|
||||
setContactsPermission(true);
|
||||
}
|
||||
if (Manifest.permission.READ_CONTACTS.equals(permissions[i]))
|
||||
setContactsPermission(grantResults[i] == PackageManager.PERMISSION_GRANTED);
|
||||
}
|
||||
|
||||
private void setContactsPermission(boolean granted) {
|
||||
|
|
Loading…
Reference in a new issue