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

Commit 20c51881 authored by Shreyas Basarge's avatar Shreyas Basarge Committed by android-build-merger
Browse files

NPE fix for SyncStorageEngine read authority am: a962d9eb am: 339c4f2b am:...

NPE fix for SyncStorageEngine read authority am: a962d9eb am: 339c4f2b am: 58048c1f am: eec587ed am: 6fc321a6 am: 5e4e02b0 am: 242bdb6d am: 4aa78554
am: 20339172

* commit '20339172':
  NPE fix for SyncStorageEngine read authority
parents 7a313a63 20339172
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -45,6 +45,7 @@ import android.util.Pair;
import android.util.SparseArray;
import android.util.ArrayMap;
import android.util.Xml;
import android.util.EventLog;

import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.util.ArrayUtils;
@@ -1900,9 +1901,14 @@ public class SyncStorageEngine extends Handler {
                            if ("authority".equals(tagName)) {
                                authority = parseAuthority(parser, version);
                                periodicSync = null;
                                if (authority != null) {
                                    if (authority.ident > highestAuthorityId) {
                                        highestAuthorityId = authority.ident;
                                    }
                                } else {
                                    EventLog.writeEvent(0x534e4554, "26513719", -1,
                                            "Malformed authority");
                                }
                            } else if (XML_TAG_LISTEN_FOR_TICKLES.equals(tagName)) {
                                parseListenForTickles(parser);
                            }