Sync extras bundle comparison can throw NPE am: 2f137b7705

am: 294611faa8

* commit '294611faa8bd1bdbf75adc3cee835b69d348df86':
  Sync extras bundle comparison can throw NPE
This commit is contained in:
Shreyas Basarge
2015-11-13 01:50:02 +00:00
committed by android-build-merger

View File

@@ -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.
*/
@@ -147,7 +149,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;
}
}