diff options
author | Matthew Williams <mjwilliams@google.com> | 2013-08-20 15:32:20 -0700 |
---|---|---|
committer | Matthew Williams <mjwilliams@google.com> | 2013-08-30 21:28:53 +0000 |
commit | 6222288bfbae46550b4914ef1eb12c69dc1f716c (patch) | |
tree | aaba6a3c0cf4ad8fee6b6e19522520dcf8b01ae6 /core/java/android/content/ContentResolver.java | |
parent | 4b2993123bf9a1c56d0a16b032612834dd418520 (diff) | |
download | frameworks_base-6222288bfbae46550b4914ef1eb12c69dc1f716c.zip frameworks_base-6222288bfbae46550b4914ef1eb12c69dc1f716c.tar.gz frameworks_base-6222288bfbae46550b4914ef1eb12c69dc1f716c.tar.bz2 |
DO NOT MERGE. Remove service component for KLP.
1) As discussed, lack of internal clients -> remove SyncService
component from KLP. This CL reverts that addition.
2) Also includes javadoc cleanup of existing API.
3) Fix naming of allowMetered() -> disallowMetered() in API
4) Removed one-off sync in the future, as it doesn't make sense
for sync adapters.
Change-Id: I1b17094e6edafb2955cdfb99f39b44274fbe86f9
Diffstat (limited to 'core/java/android/content/ContentResolver.java')
-rw-r--r-- | core/java/android/content/ContentResolver.java | 26 |
1 files changed, 8 insertions, 18 deletions
diff --git a/core/java/android/content/ContentResolver.java b/core/java/android/content/ContentResolver.java index a761a89..8a5a56c 100644 --- a/core/java/android/content/ContentResolver.java +++ b/core/java/android/content/ContentResolver.java @@ -141,7 +141,7 @@ public abstract class ContentResolver { public static final String SYNC_EXTRAS_PRIORITY = "sync_priority"; /** {@hide} Flag to allow sync to occur on metered network. */ - public static final String SYNC_EXTRAS_ALLOW_METERED = "allow_metered"; + public static final String SYNC_EXTRAS_DISALLOW_METERED = "disallow_metered"; /** * Set by the SyncManager to request that the SyncAdapter initialize itself for @@ -1669,7 +1669,7 @@ public abstract class ContentResolver { new SyncRequest.Builder() .setSyncAdapter(account, authority) .setExtras(extras) - .syncOnce(0, 0) // Immediate sync. + .syncOnce() .build(); requestSync(request); } @@ -1677,6 +1677,9 @@ public abstract class ContentResolver { /** * Register a sync with the SyncManager. These requests are built using the * {@link SyncRequest.Builder}. + * + * @param request The immutable SyncRequest object containing the sync parameters. Use + * {@link SyncRequest.Builder} to construct these. */ public static void requestSync(SyncRequest request) { try { @@ -1812,6 +1815,9 @@ public abstract class ContentResolver { * {@link #SYNC_EXTRAS_INITIALIZE}, {@link #SYNC_EXTRAS_FORCE}, * {@link #SYNC_EXTRAS_EXPEDITED}, {@link #SYNC_EXTRAS_MANUAL} set to true. * If any are supplied then an {@link IllegalArgumentException} will be thrown. + * <p>As of API level 19 this function introduces a default flexibility of ~4% (up to a maximum + * of one hour in the day) into the requested period. Use + * {@link SyncRequest.Builder#syncPeriodic(long, long)} to set this flexibility manually. * * <p>This method requires the caller to hold the permission * {@link android.Manifest.permission#WRITE_SYNC_SETTINGS}. @@ -1875,22 +1881,6 @@ public abstract class ContentResolver { } /** - * Remove the specified sync. This will remove any syncs that have been scheduled to run, but - * will not cancel any running syncs. - * <p>This method requires the caller to hold the permission</p> - * If the request is for a periodic sync this will cancel future occurrences of the sync. - * - * It is possible to cancel a sync using a SyncRequest object that is different from the object - * with which you requested the sync. Do so by building a SyncRequest with exactly the same - * service/adapter, frequency, <b>and</b> extras bundle. - * - * @param request SyncRequest object containing information about sync to cancel. - */ - public static void cancelSync(SyncRequest request) { - // TODO: Finish this implementation. - } - - /** * Get the list of information about the periodic syncs for the given account and authority. * <p>This method requires the caller to hold the permission * {@link android.Manifest.permission#READ_SYNC_SETTINGS}. |