diff options
author | Fred Quintana <fredq@google.com> | 2009-06-22 18:00:59 -0700 |
---|---|---|
committer | Fred Quintana <fredq@google.com> | 2009-06-23 15:53:16 -0700 |
commit | ac9385ef3105fb7464e1f46049c62755a8b7f0e9 (patch) | |
tree | 922fb69a8ec88aaa1ade3be16a9f7aa0d46fa25b /core/java/android/content/SyncAdapterType.java | |
parent | f86a58ff3d14fa6af3fa447809b45895bbb365f6 (diff) | |
download | frameworks_base-ac9385ef3105fb7464e1f46049c62755a8b7f0e9.zip frameworks_base-ac9385ef3105fb7464e1f46049c62755a8b7f0e9.tar.gz frameworks_base-ac9385ef3105fb7464e1f46049c62755a8b7f0e9.tar.bz2 |
- clean up the sync settings names to:
(get|set)SyncAutomatically
(get|set)MasterSyncAutomatically
- change SYNC_EXTRAS_FORCE to SYNC_EXTRAS_MANUAL to mace clear that
this overrides the .*SyncAutomatically settings
- make ContentResolver methods that call the sync controls methods
in IContentService so that SDK users can use them
- rename startSync to requestSync to reinforce the fact that a sync
is not immediately or always started when this method is called
- add an Account parameter to all the sync settings and control methods
- change the sync control methods to take a String authority rather than a Uri uri
Diffstat (limited to 'core/java/android/content/SyncAdapterType.java')
-rw-r--r-- | core/java/android/content/SyncAdapterType.java | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/core/java/android/content/SyncAdapterType.java b/core/java/android/content/SyncAdapterType.java index 368a879..5a96003 100644 --- a/core/java/android/content/SyncAdapterType.java +++ b/core/java/android/content/SyncAdapterType.java @@ -17,12 +17,14 @@ package android.content; import android.text.TextUtils; +import android.os.Parcelable; +import android.os.Parcel; /** * Value type that represents a SyncAdapterType. This object overrides {@link #equals} and * {@link #hashCode}, making it suitable for use as the key of a {@link java.util.Map} */ -public class SyncAdapterType { +public class SyncAdapterType implements Parcelable { public final String authority; public final String accountType; @@ -54,4 +56,27 @@ public class SyncAdapterType { public String toString() { return "SyncAdapterType {name=" + authority + ", type=" + accountType + "}"; } + + public int describeContents() { + return 0; + } + + public void writeToParcel(Parcel dest, int flags) { + dest.writeString(authority); + dest.writeString(accountType); + } + + public SyncAdapterType(Parcel source) { + this(source.readString(), source.readString()); + } + + public static final Creator<SyncAdapterType> CREATOR = new Creator<SyncAdapterType>() { + public SyncAdapterType createFromParcel(Parcel source) { + return new SyncAdapterType(source); + } + + public SyncAdapterType[] newArray(int size) { + return new SyncAdapterType[size]; + } + }; }
\ No newline at end of file |