summaryrefslogtreecommitdiffstats
path: root/core/java/android/content/ContentResolver.java
diff options
context:
space:
mode:
authorMatthew Williams <mjwilliams@google.com>2013-10-14 10:39:41 -0700
committerMatthew Williams <mjwilliams@google.com>2013-10-14 10:39:41 -0700
commitd08d6686c5e16cedc23cd9bc836a28d629b8622c (patch)
treea2ef9a87b326d3d5715fd0cb309fee5a78199ea8 /core/java/android/content/ContentResolver.java
parent8f7b859a7dffc1526a7e357c9d0ec6e1a7854da9 (diff)
parent94b518101c2b2587cb60664dde8931b11f154ec0 (diff)
downloadframeworks_base-d08d6686c5e16cedc23cd9bc836a28d629b8622c.zip
frameworks_base-d08d6686c5e16cedc23cd9bc836a28d629b8622c.tar.gz
frameworks_base-d08d6686c5e16cedc23cd9bc836a28d629b8622c.tar.bz2
resolved conflicts for merge of 94b51810 to master
Change-Id: Ida818f066b66c356a84c80e5eab0a4e2cf4ebd49
Diffstat (limited to 'core/java/android/content/ContentResolver.java')
-rw-r--r--core/java/android/content/ContentResolver.java26
1 files changed, 7 insertions, 19 deletions
diff --git a/core/java/android/content/ContentResolver.java b/core/java/android/content/ContentResolver.java
index 40e8d39..656597e 100644
--- a/core/java/android/content/ContentResolver.java
+++ b/core/java/android/content/ContentResolver.java
@@ -1922,13 +1922,13 @@ public abstract class ContentResolver {
public static void addPeriodicSync(Account account, String authority, Bundle extras,
long pollFrequency) {
validateSyncExtrasBundle(extras);
- if (account == null) {
- throw new IllegalArgumentException("account must not be null");
- }
- if (authority == null) {
- throw new IllegalArgumentException("authority must not be null");
- }
- if (invalidPeriodicExtras(extras)) {
+ if (extras.getBoolean(SYNC_EXTRAS_MANUAL, false)
+ || extras.getBoolean(SYNC_EXTRAS_DO_NOT_RETRY, false)
+ || extras.getBoolean(SYNC_EXTRAS_IGNORE_BACKOFF, false)
+ || extras.getBoolean(SYNC_EXTRAS_IGNORE_SETTINGS, false)
+ || extras.getBoolean(SYNC_EXTRAS_INITIALIZE, false)
+ || extras.getBoolean(SYNC_EXTRAS_FORCE, false)
+ || extras.getBoolean(SYNC_EXTRAS_EXPEDITED, false)) {
throw new IllegalArgumentException("illegal extras were set");
}
try {
@@ -1971,12 +1971,6 @@ public abstract class ContentResolver {
*/
public static void removePeriodicSync(Account account, String authority, Bundle extras) {
validateSyncExtrasBundle(extras);
- if (account == null) {
- throw new IllegalArgumentException("account must not be null");
- }
- if (authority == null) {
- throw new IllegalArgumentException("authority must not be null");
- }
try {
getContentService().removePeriodicSync(account, authority, extras);
} catch (RemoteException e) {
@@ -2019,12 +2013,6 @@ public abstract class ContentResolver {
* @return a list of PeriodicSync objects. This list may be empty but will never be null.
*/
public static List<PeriodicSync> getPeriodicSyncs(Account account, String authority) {
- if (account == null) {
- throw new IllegalArgumentException("account must not be null");
- }
- if (authority == null) {
- throw new IllegalArgumentException("authority must not be null");
- }
try {
return getContentService().getPeriodicSyncs(account, authority, null);
} catch (RemoteException e) {