am 3348f14b: Remove GAIA string
Merge commit '3348f14b3d46b172a5b557f81aac526b7e8bf5fb' into eclair-plus-aosp * commit '3348f14b3d46b172a5b557f81aac526b7e8bf5fb': Remove GAIA string
This commit is contained in:
@@ -73,7 +73,7 @@ import com.android.internal.R;
|
|||||||
public class AccountManagerService
|
public class AccountManagerService
|
||||||
extends IAccountManager.Stub
|
extends IAccountManager.Stub
|
||||||
implements RegisteredServicesCacheListener {
|
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";
|
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 int TIMEOUT_DELAY_MS = 1000 * 60;
|
||||||
private static final String DATABASE_NAME = "accounts.db";
|
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;
|
private final Context mContext;
|
||||||
|
|
||||||
@@ -852,7 +852,7 @@ public class AccountManagerService
|
|||||||
try {
|
try {
|
||||||
new Session(response, accountType, expectActivityLaunch) {
|
new Session(response, accountType, expectActivityLaunch) {
|
||||||
public void run() throws RemoteException {
|
public void run() throws RemoteException {
|
||||||
mAuthenticator.addAccount(this, mAccountType, authTokenType, requiredFeatures,
|
mAuthenticator.addAccount(this, mAccountType, authTokenType, requiredFeatures,
|
||||||
options);
|
options);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1287,7 +1287,7 @@ public class AccountManagerService
|
|||||||
MessageHandler(Looper looper) {
|
MessageHandler(Looper looper) {
|
||||||
super(looper);
|
super(looper);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void handleMessage(Message msg) {
|
public void handleMessage(Message msg) {
|
||||||
if (mBindHelper.handleMessage(msg)) {
|
if (mBindHelper.handleMessage(msg)) {
|
||||||
return;
|
return;
|
||||||
@@ -1379,6 +1379,12 @@ public class AccountManagerService
|
|||||||
createAccountsDeletionTrigger(db);
|
createAccountsDeletionTrigger(db);
|
||||||
oldVersion++;
|
oldVersion++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (oldVersion == 3) {
|
||||||
|
db.execSQL("UPDATE " + TABLE_ACCOUNTS + " SET " + ACCOUNTS_TYPE +
|
||||||
|
" = 'com.google' WHERE " + ACCOUNTS_TYPE + " == 'com.google.GAIA'");
|
||||||
|
oldVersion++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -1417,7 +1423,7 @@ public class AccountManagerService
|
|||||||
filter.addAction(Intent.ACTION_DEVICE_STORAGE_OK);
|
filter.addAction(Intent.ACTION_DEVICE_STORAGE_OK);
|
||||||
context.registerReceiver(this, filter);
|
context.registerReceiver(this, filter);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Compare the IMSI to the one stored in the login service's
|
* Compare the IMSI to the one stored in the login service's
|
||||||
* database. If they differ, erase all passwords and
|
* database. If they differ, erase all passwords and
|
||||||
|
|||||||
@@ -170,7 +170,7 @@ public abstract class AbstractSyncableContentProvider extends SyncableContentPro
|
|||||||
// AbstractGDataSyncAdapter, which will put acore into a crash loop
|
// AbstractGDataSyncAdapter, which will put acore into a crash loop
|
||||||
ArrayList<Account> gaiaAccounts = new ArrayList<Account>();
|
ArrayList<Account> gaiaAccounts = new ArrayList<Account>();
|
||||||
for (Account acct: accounts) {
|
for (Account acct: accounts) {
|
||||||
if (acct.type.equals("com.google.GAIA")) {
|
if (acct.type.equals("com.google")) {
|
||||||
gaiaAccounts.add(acct);
|
gaiaAccounts.add(acct);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -903,7 +903,7 @@ public abstract class ContentResolver {
|
|||||||
if (extras != null) {
|
if (extras != null) {
|
||||||
String accountName = extras.getString(SYNC_EXTRAS_ACCOUNT);
|
String accountName = extras.getString(SYNC_EXTRAS_ACCOUNT);
|
||||||
if (!TextUtils.isEmpty(accountName)) {
|
if (!TextUtils.isEmpty(accountName)) {
|
||||||
account = new Account(accountName, "com.google.GAIA");
|
account = new Account(accountName, "com.google");
|
||||||
}
|
}
|
||||||
extras.remove(SYNC_EXTRAS_ACCOUNT);
|
extras.remove(SYNC_EXTRAS_ACCOUNT);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1104,7 +1104,7 @@ public class SyncStorageEngine extends Handler {
|
|||||||
String accountType = parser.getAttributeValue(
|
String accountType = parser.getAttributeValue(
|
||||||
null, "type");
|
null, "type");
|
||||||
if (accountType == null) {
|
if (accountType == null) {
|
||||||
accountType = "com.google.GAIA";
|
accountType = "com.google";
|
||||||
}
|
}
|
||||||
String authorityName = parser.getAttributeValue(
|
String authorityName = parser.getAttributeValue(
|
||||||
null, "authority");
|
null, "authority");
|
||||||
@@ -1272,7 +1272,7 @@ public class SyncStorageEngine extends Handler {
|
|||||||
String accountType = hasType
|
String accountType = hasType
|
||||||
? c.getString(c.getColumnIndex("account_type")) : null;
|
? c.getString(c.getColumnIndex("account_type")) : null;
|
||||||
if (accountType == null) {
|
if (accountType == null) {
|
||||||
accountType = "com.google.GAIA";
|
accountType = "com.google";
|
||||||
}
|
}
|
||||||
String authorityName = c.getString(c.getColumnIndex("authority"));
|
String authorityName = c.getString(c.getColumnIndex("authority"));
|
||||||
AuthorityInfo authority = this.getOrCreateAuthorityLocked(
|
AuthorityInfo authority = this.getOrCreateAuthorityLocked(
|
||||||
|
|||||||
@@ -1123,7 +1123,7 @@ public class ContactStruct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// From GoogleSource.java in Contacts app.
|
// 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";
|
private static final String GOOGLE_MY_CONTACTS_GROUP = "System Group: My Contacts";
|
||||||
|
|
||||||
public void pushIntoContentResolver(ContentResolver resolver) {
|
public void pushIntoContentResolver(ContentResolver resolver) {
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ public class SubscribedFeedsIntentService extends IntentService {
|
|||||||
+ "and " + SubscribedFeeds.Feeds.FEED + "= ?";
|
+ "and " + SubscribedFeeds.Feeds.FEED + "= ?";
|
||||||
try {
|
try {
|
||||||
// TODO(fredq) fix the hardcoded type
|
// 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,
|
c = context.getContentResolver().query(SubscribedFeeds.Feeds.CONTENT_URI,
|
||||||
null, where, new String[]{account.name, account.type, feed}, null);
|
null, where, new String[]{account.name, account.type, feed}, null);
|
||||||
if (c.getCount() == 0) {
|
if (c.getCount() == 0) {
|
||||||
|
|||||||
@@ -127,7 +127,7 @@ public class SubscribedFeedsProvider extends AbstractSyncableContentProvider {
|
|||||||
protected void onAccountsChanged(Account[] accountsArray) {
|
protected void onAccountsChanged(Account[] accountsArray) {
|
||||||
super.onAccountsChanged(accountsArray);
|
super.onAccountsChanged(accountsArray);
|
||||||
for (Account account : accountsArray) {
|
for (Account account : accountsArray) {
|
||||||
if (account.type.equals("com.google.GAIA")) {
|
if (account.type.equals("com.google")) {
|
||||||
ContentResolver.setSyncAutomatically(account, "subscribedfeeds", true);
|
ContentResolver.setSyncAutomatically(account, "subscribedfeeds", true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ public class SyncBaseInstrumentation extends InstrumentationTestCase {
|
|||||||
protected void syncProvider(Uri uri, String accountName, String authority) throws Exception {
|
protected void syncProvider(Uri uri, String accountName, String authority) throws Exception {
|
||||||
Bundle extras = new Bundle();
|
Bundle extras = new Bundle();
|
||||||
extras.putBoolean(ContentResolver.SYNC_EXTRAS_MANUAL, true);
|
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);
|
ContentResolver.requestSync(account, authority, extras);
|
||||||
long startTimeInMillis = SystemClock.elapsedRealtime();
|
long startTimeInMillis = SystemClock.elapsedRealtime();
|
||||||
|
|||||||
Reference in New Issue
Block a user