Explain why permissions are needed

pull/162/head
M66B 5 years ago
parent 6f20a4d3a5
commit 176ede10c3

@ -464,8 +464,17 @@ public class FragmentSetup extends FragmentBase {
if (granted)
selectAccount();
else
new AlertDialog.Builder(getContext())
.setMessage(R.string.title_setup_gmail_rationale)
.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
requestPermissions(permissions.toArray(new String[0]), ActivitySetup.REQUEST_CHOOSE_ACCOUNT);
}
})
.setNegativeButton(android.R.string.cancel, null)
.show();
}
private void selectAccount() {
Log.i("Select account");

@ -137,7 +137,7 @@
<string name="title_setup_wizard">Wizard</string>
<string name="title_setup_gmail" translatable="false">Gmail</string>
<string name="title_setup_other">Other provider</string>
<string name="title_authorizing">Authorizing &#8230;</string>
<string name="title_setup_gmail_rationale">Please grant permissions to select an account and read your name</string>
<string name="title_setup_instructions">Setup instructions</string>
<string name="title_setup_no_settings">No settings found for domain \'%1$s\'</string>
<string name="title_setup_quick_success">An account and an identity have successfully been added</string>
@ -419,6 +419,7 @@
<string name="title_activesync_support">ActiveSync is not supported</string>
<string name="title_oauth_support">OAuth is not supported</string>
<string name="title_authorize">Authorize</string>
<string name="title_authorizing">Authorizing &#8230;</string>
<string name="title_synchronize_now">Synchronize now</string>
<string name="title_synchronize_all">Synchronize all messages</string>

Loading…
Cancel
Save