Skip to content

Commit

Permalink
Add a getter method for accounts chooser intent
Browse files Browse the repository at this point in the history
  • Loading branch information
shobhitagarwal1612 committed Mar 28, 2019
1 parent 4977b8e commit 7238927
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,14 @@ public void setListener(@Nullable GoogleAccountSelectionListener listener) {
this.listener = listener;
}

public Intent getAccountChooserIntent() {
Account selectedAccount = getAccountPickerCurrentAccount();
intentChooseAccount.putExtra("selectedAccount", selectedAccount);
intentChooseAccount.putExtra("overrideTheme", themeUtils.getAccountPickerTheme());
intentChooseAccount.putExtra("overrideCustomTheme", 0);
return intentChooseAccount;
}

public interface GoogleAccountSelectionListener {
void onGoogleAccountSelected(String accountName);
}
Expand Down

0 comments on commit 7238927

Please sign in to comment.