Properly handle deny contact permissions

pull/192/head
M66B 4 years ago
parent 507c098a4c
commit 1b65c7a40e

@ -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);
}
setContactsPermission(grantResults[i] == PackageManager.PERMISSION_GRANTED);
}
private void setContactsPermission(boolean granted) {

Loading…
Cancel
Save