summaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorBrad Fitzpatrick <bradfitz@android.com>2010-08-27 15:52:56 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2010-08-27 15:52:56 -0700
commitc026d5cf2fde3006d05bf7fa8b2f61e61afc1d95 (patch)
treec5e2c8a91936ad01a43ca2e5cd42562bb1d27040 /packages
parentbfa6d1dbe495fcf4f74f1995d54ec191e6671b5c (diff)
parent603a1f59703109c89ec0fdeceb0f8d28c7cede22 (diff)
downloadframeworks_base-c026d5cf2fde3006d05bf7fa8b2f61e61afc1d95.zip
frameworks_base-c026d5cf2fde3006d05bf7fa8b2f61e61afc1d95.tar.gz
frameworks_base-c026d5cf2fde3006d05bf7fa8b2f61e61afc1d95.tar.bz2
am 603a1f59: am cc033bd3: Merge "Fix some bugs in SettingsProvider that I introduced the other day." into gingerbread
Merge commit '603a1f59703109c89ec0fdeceb0f8d28c7cede22' * commit '603a1f59703109c89ec0fdeceb0f8d28c7cede22': Fix some bugs in SettingsProvider that I introduced the other day.
Diffstat (limited to 'packages')
-rw-r--r--packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
index 81d82de..ade93da 100644
--- a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
+++ b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
@@ -311,7 +311,7 @@ public class SettingsProvider extends ContentProvider {
cache.setFullyMatchesDisk(false);
Log.d(TAG, "row count exceeds max cache entries for table " + table);
}
- Log.d(TAG, "cache for settings table '" + table + "' fullycached=" +
+ Log.d(TAG, "cache for settings table '" + table + "' rows=" + rows + "; fullycached=" +
cache.fullyMatchesDisk());
}
} finally {
@@ -598,7 +598,7 @@ public class SettingsProvider extends ContentProvider {
int count = db.delete(args.table, args.where, args.args);
sKnownMutationsInFlight.decrementAndGet();
if (count > 0) {
- SettingsCache.wipe(args.table); // before we notify
+ SettingsCache.invalidate(args.table); // before we notify
sendNotify(url);
}
startAsyncCachePopulation();
@@ -616,10 +616,10 @@ public class SettingsProvider extends ContentProvider {
sKnownMutationsInFlight.incrementAndGet();
SQLiteDatabase db = mOpenHelper.getWritableDatabase();
- sKnownMutationsInFlight.decrementAndGet();
int count = db.update(args.table, initialValues, args.where, args.args);
+ sKnownMutationsInFlight.decrementAndGet();
if (count > 0) {
- SettingsCache.wipe(args.table); // before we notify
+ SettingsCache.invalidate(args.table); // before we notify
sendNotify(url);
}
startAsyncCachePopulation();
@@ -828,14 +828,14 @@ public class SettingsProvider extends ContentProvider {
* Used for wiping a whole cache on deletes when we're not
* sure what exactly was deleted or changed.
*/
- public static void wipe(String tableName) {
+ public static void invalidate(String tableName) {
SettingsCache cache = SettingsCache.forTable(tableName);
if (cache == null) {
return;
}
synchronized (cache) {
cache.clear();
- cache.mCacheFullyMatchesDisk = true;
+ cache.mCacheFullyMatchesDisk = false;
}
}