public class SyncAdapterType extends Object implements Parcelable
equals(java.lang.Object)
and
hashCode()
, making it suitable for use as the key of a Map
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
String |
accountType |
String |
authority |
static Parcelable.Creator<SyncAdapterType> |
CREATOR |
boolean |
isKey |
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Constructor and Description |
---|
SyncAdapterType(Parcel source) |
SyncAdapterType(String authority,
String accountType,
boolean userVisible,
boolean supportsUploading) |
SyncAdapterType(String authority,
String accountType,
boolean userVisible,
boolean supportsUploading,
boolean isAlwaysSyncable,
boolean allowParallelSyncs,
String settingsActivity) |
Modifier and Type | Method and Description |
---|---|
boolean |
allowParallelSyncs() |
int |
describeContents()
Describe the kinds of special objects contained in this Parcelable's
marshalled representation.
|
boolean |
equals(Object o)
Compares this instance with the specified object and indicates if they
are equal.
|
String |
getSettingsActivity() |
int |
hashCode()
Returns an integer hash code for this object.
|
boolean |
isAlwaysSyncable()
If true then the SyncManager will never issue an initialization sync to the SyncAdapter
and will instead automatically call
ContentResolver.setIsSyncable(android.accounts.Account, String, int) with a
value of 1 for each account and provider that this sync adapter supports. |
boolean |
isUserVisible() |
static SyncAdapterType |
newKey(String authority,
String accountType) |
boolean |
supportsUploading() |
String |
toString()
Returns a string containing a concise, human-readable description of this
object.
|
void |
writeToParcel(Parcel dest,
int flags)
Flatten this object in to a Parcel.
|
public final String authority
public final String accountType
public final boolean isKey
public static final Parcelable.Creator<SyncAdapterType> CREATOR
public SyncAdapterType(String authority, String accountType, boolean userVisible, boolean supportsUploading)
public SyncAdapterType(String authority, String accountType, boolean userVisible, boolean supportsUploading, boolean isAlwaysSyncable, boolean allowParallelSyncs, String settingsActivity)
public SyncAdapterType(Parcel source)
public boolean supportsUploading()
public boolean isUserVisible()
public boolean allowParallelSyncs()
public boolean isAlwaysSyncable()
ContentResolver.setIsSyncable(android.accounts.Account, String, int)
with a
value of 1 for each account and provider that this sync adapter supports.public String getSettingsActivity()
public static SyncAdapterType newKey(String authority, String accountType)
public boolean equals(Object o)
Object
o
must represent the same object
as this instance using a class-specific comparison. The general contract
is that this comparison should be reflexive, symmetric, and transitive.
Also, no object reference other than null is equal to null.
The default implementation returns true
only if this ==
o
. See Writing a correct
equals
method
if you intend implementing your own equals
method.
The general contract for the equals
and Object.hashCode()
methods is that if equals
returns true
for
any two objects, then hashCode()
must return the same value for
these objects. This means that subclasses of Object
usually
override either both methods or neither of them.
equals
in class Object
o
- the object to compare this instance with.true
if the specified object is equal to this Object
; false
otherwise.Object.hashCode()
public int hashCode()
Object
Object.equals(java.lang.Object)
returns true
must return
the same hash code value. This means that subclasses of Object
usually override both methods or neither method.
Note that hash values must not change over time unless information used in equals comparisons also changes.
See Writing a correct
hashCode
method
if you intend implementing your own hashCode
method.
hashCode
in class Object
Object.equals(java.lang.Object)
public String toString()
Object
getClass().getName() + '@' + Integer.toHexString(hashCode())
See Writing a useful
toString
method
if you intend implementing your own toString
method.
public int describeContents()
Parcelable
describeContents
in interface Parcelable
public void writeToParcel(Parcel dest, int flags)
Parcelable
writeToParcel
in interface Parcelable
dest
- The Parcel in which the object should be written.flags
- Additional flags about how the object should be written.
May be 0 or Parcelable.PARCELABLE_WRITE_RETURN_VALUE
.