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

Commit 339c4f2b authored by Shreyas Basarge's avatar Shreyas Basarge Committed by android-build-merger
Browse files

NPE fix for SyncStorageEngine read authority

am: a962d9eb

* commit 'a962d9eb':
  NPE fix for SyncStorageEngine read authority
parents 06ef7dfd a962d9eb
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -41,6 +41,7 @@ import android.util.Log;
import android.util.Pair;
import android.util.SparseArray;
import android.util.Xml;
import android.util.EventLog;

import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.util.ArrayUtils;
@@ -1746,9 +1747,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);
                            }