mirror of
https://github.com/M66B/FairEmail.git
synced 2025-02-24 07:01:05 +00:00
Handle rule / pick contact security exception
This commit is contained in:
parent
5d14122b1b
commit
62d9f85405
1 changed files with 9 additions and 1 deletions
|
@ -915,7 +915,15 @@ public class FragmentRule extends FragmentBase {
|
|||
et.setText(cursor.getString(0));
|
||||
} catch (Throwable ex) {
|
||||
Log.e(ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
if (ex instanceof SecurityException)
|
||||
try {
|
||||
String permission = android.Manifest.permission.READ_CONTACTS;
|
||||
requestPermissions(new String[]{permission}, REQUEST_PERMISSIONS);
|
||||
} catch (Throwable ex1) {
|
||||
Log.unexpectedError(getParentFragmentManager(), ex1);
|
||||
}
|
||||
else
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue