Remove GAIA string

This commit is contained in:
Costin Manolache
2009-09-29 18:58:36 -07:00
parent b4ee8349cc
commit 3348f14b3d
8 changed files with 19 additions and 13 deletions

View File

@@ -73,7 +73,7 @@ import com.android.internal.R;
public class AccountManagerService
extends IAccountManager.Stub
implements RegisteredServicesCacheListener {
private static final String GOOGLE_ACCOUNT_TYPE = "com.google.GAIA";
private static final String GOOGLE_ACCOUNT_TYPE = "com.google";
private static final String NO_BROADCAST_FLAG = "nobroadcast";
@@ -81,7 +81,7 @@ public class AccountManagerService
private static final int TIMEOUT_DELAY_MS = 1000 * 60;
private static final String DATABASE_NAME = "accounts.db";
private static final int DATABASE_VERSION = 3;
private static final int DATABASE_VERSION = 4;
private final Context mContext;
@@ -852,7 +852,7 @@ public class AccountManagerService
try {
new Session(response, accountType, expectActivityLaunch) {
public void run() throws RemoteException {
mAuthenticator.addAccount(this, mAccountType, authTokenType, requiredFeatures,
mAuthenticator.addAccount(this, mAccountType, authTokenType, requiredFeatures,
options);
}
@@ -1287,7 +1287,7 @@ public class AccountManagerService
MessageHandler(Looper looper) {
super(looper);
}
public void handleMessage(Message msg) {
if (mBindHelper.handleMessage(msg)) {
return;
@@ -1379,6 +1379,12 @@ public class AccountManagerService
createAccountsDeletionTrigger(db);
oldVersion++;
}
if (oldVersion == 3) {
db.execSQL("UPDATE " + TABLE_ACCOUNTS + " SET " + ACCOUNTS_TYPE +
" = 'com.google' WHERE " + ACCOUNTS_TYPE + " == 'com.google.GAIA'");
oldVersion++;
}
}
@Override
@@ -1417,7 +1423,7 @@ public class AccountManagerService
filter.addAction(Intent.ACTION_DEVICE_STORAGE_OK);
context.registerReceiver(this, filter);
}
/**
* Compare the IMSI to the one stored in the login service's
* database. If they differ, erase all passwords and

View File

@@ -170,7 +170,7 @@ public abstract class AbstractSyncableContentProvider extends SyncableContentPro
// AbstractGDataSyncAdapter, which will put acore into a crash loop
ArrayList<Account> gaiaAccounts = new ArrayList<Account>();
for (Account acct: accounts) {
if (acct.type.equals("com.google.GAIA")) {
if (acct.type.equals("com.google")) {
gaiaAccounts.add(acct);
}
}

View File

@@ -903,7 +903,7 @@ public abstract class ContentResolver {
if (extras != null) {
String accountName = extras.getString(SYNC_EXTRAS_ACCOUNT);
if (!TextUtils.isEmpty(accountName)) {
account = new Account(accountName, "com.google.GAIA");
account = new Account(accountName, "com.google");
}
extras.remove(SYNC_EXTRAS_ACCOUNT);
}

View File

@@ -1104,7 +1104,7 @@ public class SyncStorageEngine extends Handler {
String accountType = parser.getAttributeValue(
null, "type");
if (accountType == null) {
accountType = "com.google.GAIA";
accountType = "com.google";
}
String authorityName = parser.getAttributeValue(
null, "authority");
@@ -1272,7 +1272,7 @@ public class SyncStorageEngine extends Handler {
String accountType = hasType
? c.getString(c.getColumnIndex("account_type")) : null;
if (accountType == null) {
accountType = "com.google.GAIA";
accountType = "com.google";
}
String authorityName = c.getString(c.getColumnIndex("authority"));
AuthorityInfo authority = this.getOrCreateAuthorityLocked(

View File

@@ -1123,7 +1123,7 @@ public class ContactStruct {
}
// From GoogleSource.java in Contacts app.
private static final String ACCOUNT_TYPE_GOOGLE = "com.google.GAIA";
private static final String ACCOUNT_TYPE_GOOGLE = "com.google";
private static final String GOOGLE_MY_CONTACTS_GROUP = "System Group: My Contacts";
public void pushIntoContentResolver(ContentResolver resolver) {

View File

@@ -111,7 +111,7 @@ public class SubscribedFeedsIntentService extends IntentService {
+ "and " + SubscribedFeeds.Feeds.FEED + "= ?";
try {
// TODO(fredq) fix the hardcoded type
final Account account = new Account(accountName, "com.google.GAIA");
final Account account = new Account(accountName, "com.google");
c = context.getContentResolver().query(SubscribedFeeds.Feeds.CONTENT_URI,
null, where, new String[]{account.name, account.type, feed}, null);
if (c.getCount() == 0) {

View File

@@ -127,7 +127,7 @@ public class SubscribedFeedsProvider extends AbstractSyncableContentProvider {
protected void onAccountsChanged(Account[] accountsArray) {
super.onAccountsChanged(accountsArray);
for (Account account : accountsArray) {
if (account.type.equals("com.google.GAIA")) {
if (account.type.equals("com.google")) {
ContentResolver.setSyncAutomatically(account, "subscribedfeeds", true);
}
}

View File

@@ -47,7 +47,7 @@ public class SyncBaseInstrumentation extends InstrumentationTestCase {
protected void syncProvider(Uri uri, String accountName, String authority) throws Exception {
Bundle extras = new Bundle();
extras.putBoolean(ContentResolver.SYNC_EXTRAS_MANUAL, true);
Account account = new Account(accountName, "com.google.GAIA");
Account account = new Account(accountName, "com.google");
ContentResolver.requestSync(account, authority, extras);
long startTimeInMillis = SystemClock.elapsedRealtime();