FileDocCategorySizeDatePackage
IContentService.javaAPI DocAndroid 5.1 API54741Sat Mar 14 05:48:00 GMT 2015android.content

IContentService

public interface IContentService implements android.os.IInterface
hide

Fields Summary
Constructors Summary
Methods Summary
public voidaddPeriodicSync(android.accounts.Account account, java.lang.String providerName, android.os.Bundle extras, long pollFrequency)
Set whether or not the provider is to be synced on a periodic basis.

param
providerName the provider whose behavior is being controlled
param
pollFrequency the period that a sync should be performed, in seconds. If this is zero or less then no periodic syncs will be performed.

public voidaddStatusChangeListener(int mask, android.content.ISyncStatusObserver callback)

public voidcancelRequest(android.content.SyncRequest request)
Cancel a sync, providing information about the sync to be cancelled.

public voidcancelSync(android.accounts.Account account, java.lang.String authority, android.content.ComponentName cname)

public voidcancelSyncAsUser(android.accounts.Account account, java.lang.String authority, android.content.ComponentName cname, int userId)

public java.util.ListgetCurrentSyncs()

public java.util.ListgetCurrentSyncsAsUser(int userId)

public intgetIsSyncable(android.accounts.Account account, java.lang.String providerName)
Check if this account/provider is syncable.

return
>0 if it is syncable, 0 if not, and <0 if the state isn't known yet.

public intgetIsSyncableAsUser(android.accounts.Account account, java.lang.String providerName, int userId)

public booleangetMasterSyncAutomatically()

public booleangetMasterSyncAutomaticallyAsUser(int userId)

public java.util.ListgetPeriodicSyncs(android.accounts.Account account, java.lang.String providerName, android.content.ComponentName cname)
Get a list of periodic operations for a specified authority, or service.

param
account account for authority, must be null if cname is non-null.
param
providerName name of provider, must be null if cname is non-null.
param
cname component to identify sync service, must be null if account/providerName are non-null.

public android.content.SyncAdapterType[]getSyncAdapterTypes()
Returns the types of the SyncAdapters that are registered with the system.

return
Returns the types of the SyncAdapters that are registered with the system.

public android.content.SyncAdapterType[]getSyncAdapterTypesAsUser(int userId)

public booleangetSyncAutomatically(android.accounts.Account account, java.lang.String providerName)
Check if the provider should be synced when a network tickle is received

param
providerName the provider whose setting we are querying
return
true if the provider should be synced when a network tickle is received

public booleangetSyncAutomaticallyAsUser(android.accounts.Account account, java.lang.String providerName, int userId)

public android.content.SyncStatusInfogetSyncStatus(android.accounts.Account account, java.lang.String authority, android.content.ComponentName cname)
Returns the status that matches the authority. If there are multiples accounts for the authority, the one with the latest "lastSuccessTime" status is returned.

param
account account for authority, must be null if cname is non-null.
param
providerName name of provider, must be null if cname is non-null.
param
cname component to identify sync service, must be null if account/providerName are non-null.

public android.content.SyncStatusInfogetSyncStatusAsUser(android.accounts.Account account, java.lang.String authority, android.content.ComponentName cname, int userId)

public booleanisSyncActive(android.accounts.Account account, java.lang.String authority, android.content.ComponentName cname)
Returns true if there is currently a operation for the given account/authority or service actively being processed.

param
account account for authority, must be null if cname is non-null.
param
providerName name of provider, must be null if cname is non-null.
param
cname component to identify sync service, must be null if account/providerName are non-null.

public booleanisSyncPending(android.accounts.Account account, java.lang.String authority, android.content.ComponentName cname)
Return true if the pending status is true of any matching authorities.

param
account account for authority, must be null if cname is non-null.
param
providerName name of provider, must be null if cname is non-null.
param
cname component to identify sync service, must be null if account/providerName are non-null.

public booleanisSyncPendingAsUser(android.accounts.Account account, java.lang.String authority, android.content.ComponentName cname, int userId)

public voidnotifyChange(android.net.Uri uri, android.database.IContentObserver observer, boolean observerWantsSelfNotifications, boolean syncToNetwork, int userHandle)
Notify observers of a particular user's view of the provider.

param
userHandle the user whose view of the provider is to be notified. May be the calling user without requiring any permission, otherwise the caller needs to hold the INTERACT_ACROSS_USERS_FULL permission. Pseudousers USER_ALL USER_CURRENT are properly interpreted.

public voidregisterContentObserver(android.net.Uri uri, boolean notifyForDescendants, android.database.IContentObserver observer, int userHandle)
Register a content observer tied to a specific user's view of the provider.

param
userHandle the user whose view of the provider is to be observed. May be the calling user without requiring any permission, otherwise the caller needs to hold the INTERACT_ACROSS_USERS_FULL permission. Pseudousers USER_ALL and USER_CURRENT are properly handled.

public voidremovePeriodicSync(android.accounts.Account account, java.lang.String providerName, android.os.Bundle extras)
Set whether or not the provider is to be synced on a periodic basis.

param
providerName the provider whose behavior is being controlled
param
pollFrequency the period that a sync should be performed, in seconds. If this is zero or less then no periodic syncs will be performed.

public voidremoveStatusChangeListener(android.content.ISyncStatusObserver callback)

public voidrequestSync(android.accounts.Account account, java.lang.String authority, android.os.Bundle extras)

public voidsetIsSyncable(android.accounts.Account account, java.lang.String providerName, int syncable)
Set whether this account/provider is syncable.

param
syncable, >0 denotes syncable, 0 means not syncable, <0 means unknown

public voidsetMasterSyncAutomatically(boolean flag)

public voidsetMasterSyncAutomaticallyAsUser(boolean flag, int userId)

public voidsetSyncAutomatically(android.accounts.Account account, java.lang.String providerName, boolean sync)
Set whether or not the provider is synced when it receives a network tickle.

param
providerName the provider whose behavior is being controlled
param
sync true if the provider should be synced when tickles are received for it

public voidsetSyncAutomaticallyAsUser(android.accounts.Account account, java.lang.String providerName, boolean sync, int userId)

public voidsync(android.content.SyncRequest request)
Start a sync given a request.

public voidsyncAsUser(android.content.SyncRequest request, int userId)

public voidunregisterContentObserver(android.database.IContentObserver observer)