diff options
author | Matthew Williams <mjwilliams@google.com> | 2015-10-16 12:01:31 -0700 |
---|---|---|
committer | Matthew Williams <mjwilliams@google.com> | 2015-10-20 18:55:30 +0000 |
commit | 7d7a2254bc41d2dfc34fbb8693cb0dad2ccd528a (patch) | |
tree | ddba8db034a618312524d6cf1252d766990d96c8 /core | |
parent | cfea184d6c0268b92ed55276d2b686962c8ee531 (diff) | |
download | frameworks_base-7d7a2254bc41d2dfc34fbb8693cb0dad2ccd528a.zip frameworks_base-7d7a2254bc41d2dfc34fbb8693cb0dad2ccd528a.tar.gz frameworks_base-7d7a2254bc41d2dfc34fbb8693cb0dad2ccd528a.tar.bz2 |
DO NOT MERGE Sync extras bundle comparison can throw NPE
BUG: 23591205
Change-Id: Ic6404c0befe70c34b078e0eae6a627826173d82c
(cherry picked from commit 9ad2c8403354a985258c098681067e74b9e2f638)
Diffstat (limited to 'core')
-rw-r--r-- | core/java/android/content/PeriodicSync.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/core/java/android/content/PeriodicSync.java b/core/java/android/content/PeriodicSync.java index 3efd89a..0441ccc 100644 --- a/core/java/android/content/PeriodicSync.java +++ b/core/java/android/content/PeriodicSync.java @@ -21,6 +21,8 @@ import android.os.Bundle; import android.os.Parcel; import android.accounts.Account; +import java.util.Objects; + /** * Value type that contains information about a periodic sync. */ @@ -144,7 +146,9 @@ public class PeriodicSync implements Parcelable { if (!b2.containsKey(key)) { return false; } - if (!b1.get(key).equals(b2.get(key))) { + // Null check. According to ContentResolver#validateSyncExtrasBundle null-valued keys + // are allowed in the bundle. + if (!Objects.equals(b1.get(key), b2.get(key))) { return false; } } |