You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What steps will reproduce the problem?
1. Create a Dropbox account on your Android device using the same email address
as one of your Google accounts.
2. Run the YTD sample app
3. Select the "duplicate" Google/Dropbox account
4. The getAccount method in GlsAuthorizer does not check to determine which
account is being returned.
What is the expected output? What do you see instead?
getAccount should include an additional check:
private Account getAccount(String name) {
Account[] accounts = accountManager.getAccounts();
for (Account account : accounts) {
if (account.name.equals(name) && account.type.equals("com.google")) {
return account;
}
}
return null;
}
What version of the product are you using? On what operating system?
* r15 of the ytd-android project
Please provide any additional information below.
As mentioned above, I have two accounts on my device that have the same account
name, essentially my Gmail address. One @gmail.com address is tied to my
Google account and that same email address is the account name for my Dropbox
account. So, I have a com.google account type and a com.android.dropbox
account type. When the Dropbox account is returned by getAccount, it does not
have the proper
authToken for the callback in fetchAuthToken.
A simple fix of checking the account type should resolve this issue.
Original issue reported on code.google.com by parkbsu on 9 Jul 2012 at 7:42
The text was updated successfully, but these errors were encountered:
Original issue reported on code.google.com by
parkbsu
on 9 Jul 2012 at 7:42The text was updated successfully, but these errors were encountered: