mirror of
https://github.com/M66B/FairEmail.git
synced 2025-01-19 05:38:31 +00:00
Select account improvements
This commit is contained in:
parent
1514bca3dd
commit
28aaf8ee05
1 changed files with 14 additions and 11 deletions
|
@ -109,17 +109,20 @@ public class FragmentGmail extends FragmentBase {
|
||||||
if (TextUtils.isEmpty(name))
|
if (TextUtils.isEmpty(name))
|
||||||
throw new IllegalArgumentException(getString(R.string.title_no_name));
|
throw new IllegalArgumentException(getString(R.string.title_no_name));
|
||||||
|
|
||||||
startActivityForResult(
|
|
||||||
Helper.getChooser(getContext(), newChooseAccountIntent(
|
Intent intent = newChooseAccountIntent(
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
new String[]{"com.google"},
|
new String[]{"com.google"},
|
||||||
false,
|
false,
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
null)),
|
null);
|
||||||
ActivitySetup.REQUEST_CHOOSE_ACCOUNT);
|
PackageManager pm = getContext().getPackageManager();
|
||||||
|
if (intent.resolveActivity(pm) == null)
|
||||||
|
throw new IllegalArgumentException(getString(R.string.title_no_viewer, intent));
|
||||||
|
startActivityForResult(intent, ActivitySetup.REQUEST_CHOOSE_ACCOUNT);
|
||||||
} catch (Throwable ex) {
|
} catch (Throwable ex) {
|
||||||
if (ex instanceof IllegalArgumentException)
|
if (ex instanceof IllegalArgumentException)
|
||||||
tvError.setText(ex.getMessage());
|
tvError.setText(ex.getMessage());
|
||||||
|
|
Loading…
Reference in a new issue