@@ -1415,6 +1415,8 @@ public static SyncAdapterType[] getSyncAdapterTypes() {
14151415
14161416 /**
14171417 * Check if the provider should be synced when a network tickle is received
1418+ * <p>This method requires the caller to hold the permission
1419+ * {@link android.Manifest.permission#READ_SYNC_SETTINGS}.
14181420 *
14191421 * @param account the account whose setting we are querying
14201422 * @param authority the provider whose setting we are querying
@@ -1430,6 +1432,8 @@ public static boolean getSyncAutomatically(Account account, String authority) {
14301432
14311433 /**
14321434 * Set whether or not the provider is synced when it receives a network tickle.
1435+ * <p>This method requires the caller to hold the permission
1436+ * {@link android.Manifest.permission#WRITE_SYNC_SETTINGS}.
14331437 *
14341438 * @param account the account whose setting we are querying
14351439 * @param authority the provider whose behavior is being controlled
@@ -1461,6 +1465,9 @@ public static void setSyncAutomatically(Account account, String authority, boole
14611465 * {@link #SYNC_EXTRAS_EXPEDITED}, {@link #SYNC_EXTRAS_MANUAL} set to true.
14621466 * If any are supplied then an {@link IllegalArgumentException} will be thrown.
14631467 *
1468+ * <p>This method requires the caller to hold the permission
1469+ * {@link android.Manifest.permission#WRITE_SYNC_SETTINGS}.
1470+ *
14641471 * @param account the account to specify in the sync
14651472 * @param authority the provider to specify in the sync request
14661473 * @param extras extra parameters to go along with the sync request
@@ -1497,6 +1504,8 @@ public static void addPeriodicSync(Account account, String authority, Bundle ext
14971504 /**
14981505 * Remove a periodic sync. Has no affect if account, authority and extras don't match
14991506 * an existing periodic sync.
1507+ * <p>This method requires the caller to hold the permission
1508+ * {@link android.Manifest.permission#WRITE_SYNC_SETTINGS}.
15001509 *
15011510 * @param account the account of the periodic sync to remove
15021511 * @param authority the provider of the periodic sync to remove
@@ -1519,6 +1528,8 @@ public static void removePeriodicSync(Account account, String authority, Bundle
15191528
15201529 /**
15211530 * Get the list of information about the periodic syncs for the given account and authority.
1531+ * <p>This method requires the caller to hold the permission
1532+ * {@link android.Manifest.permission#READ_SYNC_SETTINGS}.
15221533 *
15231534 * @param account the account whose periodic syncs we are querying
15241535 * @param authority the provider whose periodic syncs we are querying
@@ -1540,6 +1551,8 @@ public static List<PeriodicSync> getPeriodicSyncs(Account account, String author
15401551
15411552 /**
15421553 * Check if this account/provider is syncable.
1554+ * <p>This method requires the caller to hold the permission
1555+ * {@link android.Manifest.permission#READ_SYNC_SETTINGS}.
15431556 * @return >0 if it is syncable, 0 if not, and <0 if the state isn't known yet.
15441557 */
15451558 public static int getIsSyncable (Account account , String authority ) {
@@ -1552,6 +1565,8 @@ public static int getIsSyncable(Account account, String authority) {
15521565
15531566 /**
15541567 * Set whether this account/provider is syncable.
1568+ * <p>This method requires the caller to hold the permission
1569+ * {@link android.Manifest.permission#WRITE_SYNC_SETTINGS}.
15551570 * @param syncable >0 denotes syncable, 0 means not syncable, <0 means unknown
15561571 */
15571572 public static void setIsSyncable (Account account , String authority , int syncable ) {
@@ -1566,6 +1581,8 @@ public static void setIsSyncable(Account account, String authority, int syncable
15661581 /**
15671582 * Gets the master auto-sync setting that applies to all the providers and accounts.
15681583 * If this is false then the per-provider auto-sync setting is ignored.
1584+ * <p>This method requires the caller to hold the permission
1585+ * {@link android.Manifest.permission#READ_SYNC_SETTINGS}.
15691586 *
15701587 * @return the master auto-sync setting that applies to all the providers and accounts
15711588 */
@@ -1580,6 +1597,8 @@ public static boolean getMasterSyncAutomatically() {
15801597 /**
15811598 * Sets the master auto-sync setting that applies to all the providers and accounts.
15821599 * If this is false then the per-provider auto-sync setting is ignored.
1600+ * <p>This method requires the caller to hold the permission
1601+ * {@link android.Manifest.permission#WRITE_SYNC_SETTINGS}.
15831602 *
15841603 * @param sync the master auto-sync setting that applies to all the providers and accounts
15851604 */
@@ -1595,6 +1614,8 @@ public static void setMasterSyncAutomatically(boolean sync) {
15951614 /**
15961615 * Returns true if there is currently a sync operation for the given
15971616 * account or authority in the pending list, or actively being processed.
1617+ * <p>This method requires the caller to hold the permission
1618+ * {@link android.Manifest.permission#READ_SYNC_STATS}.
15981619 * @param account the account whose setting we are querying
15991620 * @param authority the provider whose behavior is being queried
16001621 * @return true if a sync is active for the given account or authority.
@@ -1610,6 +1631,9 @@ public static boolean isSyncActive(Account account, String authority) {
16101631 /**
16111632 * If a sync is active returns the information about it, otherwise returns null.
16121633 * <p>
1634+ * This method requires the caller to hold the permission
1635+ * {@link android.Manifest.permission#READ_SYNC_STATS}.
1636+ * <p>
16131637 * @return the SyncInfo for the currently active sync or null if one is not active.
16141638 * @deprecated
16151639 * Since multiple concurrent syncs are now supported you should use
@@ -1633,6 +1657,10 @@ public static SyncInfo getCurrentSync() {
16331657 /**
16341658 * Returns a list with information about all the active syncs. This list will be empty
16351659 * if there are no active syncs.
1660+ * <p>
1661+ * This method requires the caller to hold the permission
1662+ * {@link android.Manifest.permission#READ_SYNC_STATS}.
1663+ * <p>
16361664 * @return a List of SyncInfo objects for the currently active syncs.
16371665 */
16381666 public static List <SyncInfo > getCurrentSyncs () {
@@ -1660,6 +1688,8 @@ public static SyncStatusInfo getSyncStatus(Account account, String authority) {
16601688
16611689 /**
16621690 * Return true if the pending status is true of any matching authorities.
1691+ * <p>This method requires the caller to hold the permission
1692+ * {@link android.Manifest.permission#READ_SYNC_STATS}.
16631693 * @param account the account whose setting we are querying
16641694 * @param authority the provider whose behavior is being queried
16651695 * @return true if there is a pending sync with the matching account and authority
0 commit comments