diff options
author | Dianne Hackborn <hackbod@google.com> | 2009-04-27 17:10:36 -0700 |
---|---|---|
committer | Dianne Hackborn <hackbod@google.com> | 2009-05-05 15:40:53 -0700 |
commit | 231cc608d06ffc31c24bf8aa8c8275bdd2636581 (patch) | |
tree | 9b435c670f0f16751a21ae4678bfbed7d8e159b4 /tools | |
parent | 06d96020c35dac2bf1651cb8bd4cfced911f1142 (diff) | |
download | frameworks_base-231cc608d06ffc31c24bf8aa8c8275bdd2636581.zip frameworks_base-231cc608d06ffc31c24bf8aa8c8275bdd2636581.tar.gz frameworks_base-231cc608d06ffc31c24bf8aa8c8275bdd2636581.tar.bz2 |
Rewrite SyncStorageEngine to use flat files and in-memory data structures.
The previous implementation used a database for storing all of its state, which could cause
a significant amount of IO activity as its tables were updated through the stages of a sync.
This new implementation replaces that in-memory data structures, with hand-written code
for writing them to persistent storage.
There are now 4 files associated with this class, holding various pieces of its state that
should be consistent. These are everything from a main XML file of account information that
must always be retained, to a binary file of per-day statistics that can be thrown away at
any time. Writes of these files as scheduled at various times based on their importance of
the frequency at which they change.
Because the database no longer exists, there needs to be a new explicit interface for
interacting with the sync manager database. This is provided by new APIs on IContentService,
with a hidden method on ContentResolver to retrieve the IContentService so that various
system entities can use it. Other changes in other projects are required to update to the
new API.
The goal here is to have as little an impact on the code and functionality outside of
SyncStorageEngine, though due to the necessary change in API it is still somewhat extensive.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/layoutlib/bridge/src/com/android/layoutlib/bridge/BridgeContentResolver.java | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/BridgeContentResolver.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/BridgeContentResolver.java index 727d6f2..cfab90a 100644 --- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/BridgeContentResolver.java +++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/BridgeContentResolver.java @@ -17,7 +17,6 @@ package com.android.layoutlib.bridge; import android.content.ContentResolver; -import android.content.ContentServiceNative; import android.content.Context; import android.content.IContentProvider; import android.database.ContentObserver; @@ -51,9 +50,6 @@ public class BridgeContentResolver extends ContentResolver { /** * Stub for the layoutlib bridge content resolver. - * <p/> - * The super implementation accesses the {@link ContentServiceNative#getDefault()} - * which returns null and would make the call crash. Instead we do nothing. */ @Override public void registerContentObserver(Uri uri, boolean notifyForDescendents, @@ -63,9 +59,6 @@ public class BridgeContentResolver extends ContentResolver { /** * Stub for the layoutlib bridge content resolver. - * <p/> - * The super implementation accesses the {@link ContentServiceNative#getDefault()} - * which returns null and would make the call crash. Instead we do nothing. */ @Override public void unregisterContentObserver(ContentObserver observer) { @@ -74,9 +67,6 @@ public class BridgeContentResolver extends ContentResolver { /** * Stub for the layoutlib bridge content resolver. - * <p/> - * The super implementation accesses the {@link ContentServiceNative#getDefault()} - * which returns null and would make the call crash. Instead we do nothing. */ @Override public void notifyChange(Uri uri, ContentObserver observer, boolean syncToNetwork) { @@ -85,9 +75,6 @@ public class BridgeContentResolver extends ContentResolver { /** * Stub for the layoutlib bridge content resolver. - * <p/> - * The super implementation accesses the {@link ContentServiceNative#getDefault()} - * which returns null and would make the call crash. Instead we do nothing. */ @Override public void startSync(Uri uri, Bundle extras) { @@ -96,9 +83,6 @@ public class BridgeContentResolver extends ContentResolver { /** * Stub for the layoutlib bridge content resolver. - * <p/> - * The super implementation accesses the {@link ContentServiceNative#getDefault()} - * which returns null and would make the call crash. Instead we do nothing. */ @Override public void cancelSync(Uri uri) { |