OSDN Git Service

Conflict resolution CL to ag/868720 when cp'ing to mnc-mr1-release
authorZach Jang <zachjang@google.com>
Sat, 27 Feb 2016 00:06:28 +0000 (16:06 -0800)
committerZach Jang <zachjang@google.com>
Sat, 27 Feb 2016 00:11:56 +0000 (00:11 +0000)
Change-Id: I3efe5476ebd758fc567bfdb035583a01c45aea8b

services/core/java/com/android/server/content/SyncStorageEngine.java

index cca0c16..a2f0e4e 100644 (file)
@@ -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;
@@ -1892,8 +1893,13 @@ public class SyncStorageEngine extends Handler {
                             if ("authority".equals(tagName)) {
                                 authority = parseAuthority(parser, version);
                                 periodicSync = null;
-                                if (authority.ident > highestAuthorityId) {
-                                    highestAuthorityId = authority.ident;
+                                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);