diff options
8 files changed, 19 insertions, 13 deletions
diff --git a/core/java/android/accounts/AccountManagerService.java b/core/java/android/accounts/AccountManagerService.java index 3b39ae4..6dea023 100644 --- a/core/java/android/accounts/AccountManagerService.java +++ b/core/java/android/accounts/AccountManagerService.java @@ -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 diff --git a/core/java/android/content/AbstractSyncableContentProvider.java b/core/java/android/content/AbstractSyncableContentProvider.java index 808f30c..fc3acc5 100644 --- a/core/java/android/content/AbstractSyncableContentProvider.java +++ b/core/java/android/content/AbstractSyncableContentProvider.java @@ -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); } } diff --git a/core/java/android/content/ContentResolver.java b/core/java/android/content/ContentResolver.java index 307899a..c9edc41 100644 --- a/core/java/android/content/ContentResolver.java +++ b/core/java/android/content/ContentResolver.java @@ -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); } diff --git a/core/java/android/content/SyncStorageEngine.java b/core/java/android/content/SyncStorageEngine.java index fbdd5ae..11d984d 100644 --- a/core/java/android/content/SyncStorageEngine.java +++ b/core/java/android/content/SyncStorageEngine.java @@ -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( diff --git a/core/java/android/pim/vcard/ContactStruct.java b/core/java/android/pim/vcard/ContactStruct.java index 915f09e..e87c796 100644 --- a/core/java/android/pim/vcard/ContactStruct.java +++ b/core/java/android/pim/vcard/ContactStruct.java @@ -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) { diff --git a/packages/SubscribedFeedsProvider/src/com/android/providers/subscribedfeeds/SubscribedFeedsIntentService.java b/packages/SubscribedFeedsProvider/src/com/android/providers/subscribedfeeds/SubscribedFeedsIntentService.java index b854f86..2e910b7 100644 --- a/packages/SubscribedFeedsProvider/src/com/android/providers/subscribedfeeds/SubscribedFeedsIntentService.java +++ b/packages/SubscribedFeedsProvider/src/com/android/providers/subscribedfeeds/SubscribedFeedsIntentService.java @@ -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) { diff --git a/packages/SubscribedFeedsProvider/src/com/android/providers/subscribedfeeds/SubscribedFeedsProvider.java b/packages/SubscribedFeedsProvider/src/com/android/providers/subscribedfeeds/SubscribedFeedsProvider.java index 2647752..8585082 100644 --- a/packages/SubscribedFeedsProvider/src/com/android/providers/subscribedfeeds/SubscribedFeedsProvider.java +++ b/packages/SubscribedFeedsProvider/src/com/android/providers/subscribedfeeds/SubscribedFeedsProvider.java @@ -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); } } diff --git a/test-runner/android/test/SyncBaseInstrumentation.java b/test-runner/android/test/SyncBaseInstrumentation.java index a860bb3..e8d72d9 100644 --- a/test-runner/android/test/SyncBaseInstrumentation.java +++ b/test-runner/android/test/SyncBaseInstrumentation.java @@ -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(); |