diff options
| author | 2013-09-09 14:35:27 -0700 | |
|---|---|---|
| committer | 2013-09-09 14:35:27 -0700 | |
| commit | d8abd6a163f8ab4332b88035e77080c48b4b71b9 (patch) | |
| tree | 849b3b6d2cc7fc77e101e51d4da560d00a634ff6 | |
| parent | 30590646d6846a4db76d416c70ee68a3f9f359b5 (diff) | |
Preserve CTS fail behaviour on null bundle for old API
For ContentResolver.requestSync() a null bundle should not be
allowed. However we don't want to enforce this for the new API,
so we remove this check from the SyncRequest.Builder#build()
Change-Id: I69353d24edbd686da6ded2856c0920315cb76e85
| -rw-r--r-- | core/java/android/content/ContentResolver.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/core/java/android/content/ContentResolver.java b/core/java/android/content/ContentResolver.java index 9f462aab54f9..e91460407522 100644 --- a/core/java/android/content/ContentResolver.java +++ b/core/java/android/content/ContentResolver.java @@ -1745,6 +1745,9 @@ public abstract class ContentResolver { * @param extras any extras to pass to the SyncAdapter. */ public static void requestSync(Account account, String authority, Bundle extras) { + if (extras == null) { + throw new IllegalArgumentException("Must specify extras."); + } SyncRequest request = new SyncRequest.Builder() .setSyncAdapter(account, authority) |