Subscribe to subscribedfeeds whenever the accounts change, this is basically a giant hack to let the gsync server know about the subscriptions for accounts.

This commit is contained in:
Cynthia Wong
2009-08-24 14:26:46 -07:00
parent 7bc08e9d51
commit cb7d38380c

View File

@@ -16,6 +16,7 @@
package com.android.providers.subscribedfeeds;
import android.accounts.Account;
import android.content.UriMatcher;
import android.content.*;
import android.database.Cursor;
@@ -122,6 +123,14 @@ public class SubscribedFeedsProvider extends AbstractSyncableContentProvider {
"UNIQUE(_sync_id))");
}
@Override
protected void onAccountsChanged(Account[] accountsArray) {
super.onAccountsChanged(accountsArray);
for (Account account : accountsArray) {
ContentResolver.setSyncAutomatically(account, "subscribedfeeds", true);
}
}
@Override
protected void onDatabaseOpened(SQLiteDatabase db) {
db.markTableSyncable("feeds", "_deleted_feeds");