Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 294611fa authored by Shreyas Basarge's avatar Shreyas Basarge Committed by android-build-merger
Browse files

Sync extras bundle comparison can throw NPE

am: 2f137b77

* commit '2f137b77':
  Sync extras bundle comparison can throw NPE
parents cff4e09e 2f137b77
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -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;
            }
        }