NPE fix for SyncStorageEngine read authority am: a962d9eba7 am: 339c4f2b05 am: 58048c1f17 am: eec587edf1 am: 6fc321a66d am: 5e4e02b009
am: 242bdb6d5b
* commit '242bdb6d5bec6e42b7caf42fd08ded0accc70fb8':
NPE fix for SyncStorageEngine read authority
This commit is contained in:
@@ -44,6 +44,7 @@ import android.util.Pair;
|
|||||||
import android.util.SparseArray;
|
import android.util.SparseArray;
|
||||||
import android.util.ArrayMap;
|
import android.util.ArrayMap;
|
||||||
import android.util.Xml;
|
import android.util.Xml;
|
||||||
|
import android.util.EventLog;
|
||||||
|
|
||||||
import com.android.internal.annotations.VisibleForTesting;
|
import com.android.internal.annotations.VisibleForTesting;
|
||||||
import com.android.internal.util.ArrayUtils;
|
import com.android.internal.util.ArrayUtils;
|
||||||
@@ -1868,8 +1869,13 @@ public class SyncStorageEngine extends Handler {
|
|||||||
if ("authority".equals(tagName)) {
|
if ("authority".equals(tagName)) {
|
||||||
authority = parseAuthority(parser, version);
|
authority = parseAuthority(parser, version);
|
||||||
periodicSync = null;
|
periodicSync = null;
|
||||||
if (authority.ident > highestAuthorityId) {
|
if (authority != null) {
|
||||||
highestAuthorityId = authority.ident;
|
if (authority.ident > highestAuthorityId) {
|
||||||
|
highestAuthorityId = authority.ident;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
EventLog.writeEvent(0x534e4554, "26513719", -1,
|
||||||
|
"Malformed authority");
|
||||||
}
|
}
|
||||||
} else if (XML_TAG_LISTEN_FOR_TICKLES.equals(tagName)) {
|
} else if (XML_TAG_LISTEN_FOR_TICKLES.equals(tagName)) {
|
||||||
parseListenForTickles(parser);
|
parseListenForTickles(parser);
|
||||||
|
|||||||
Reference in New Issue
Block a user