1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2025-01-03 21:55:13 +00:00

Improved logging

This commit is contained in:
M66B 2021-05-04 19:31:36 +02:00
parent 3c2b4c6f70
commit 22c283f351

View file

@ -218,7 +218,7 @@ public class FragmentGmail extends FragmentBase {
if (resultCode == RESULT_OK && data != null)
onAccountSelected(data);
else
onNoAccountSelected();
onNoAccountSelected(resultCode, data);
break;
case ActivitySetup.REQUEST_DONE:
finish();
@ -258,11 +258,11 @@ public class FragmentGmail extends FragmentBase {
});
}
private void onNoAccountSelected() {
private void onNoAccountSelected(int resultCode, Intent data) {
AccountManager am = AccountManager.get(getContext());
Account[] accounts = am.getAccountsByType(TYPE_GOOGLE);
if (accounts.length == 0) {
Log.e("newChooseAccountIntent without result");
Log.e("newChooseAccountIntent without result=" + resultCode + " data=" + data);
ToastEx.makeText(getContext(), R.string.title_no_account, Toast.LENGTH_LONG).show();
}
}