diff options
author | Wink Saville <wink@google.com> | 2011-11-10 07:20:55 -0800 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-11-10 07:20:55 -0800 |
commit | e562287c85662457864255028cd4bc3b04f13750 (patch) | |
tree | 493842fd0b26280c27e15042626b1623d324a218 /telephony | |
parent | b96194308dc8678e99564f038872061e4881e65a (diff) | |
parent | f08455451c5cca9b7e1bc22409df774c47b85e06 (diff) | |
download | frameworks_base-e562287c85662457864255028cd4bc3b04f13750.zip frameworks_base-e562287c85662457864255028cd4bc3b04f13750.tar.gz frameworks_base-e562287c85662457864255028cd4bc3b04f13750.tar.bz2 |
Merge "[maguro] Update COMPREHENSION-TLV parser in CAT" into ics-mr0
Diffstat (limited to 'telephony')
-rw-r--r-- | telephony/java/com/android/internal/telephony/cat/ComprehensionTlv.java | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/telephony/java/com/android/internal/telephony/cat/ComprehensionTlv.java b/telephony/java/com/android/internal/telephony/cat/ComprehensionTlv.java index 99f662d..e5a2d31 100644 --- a/telephony/java/com/android/internal/telephony/cat/ComprehensionTlv.java +++ b/telephony/java/com/android/internal/telephony/cat/ComprehensionTlv.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006 The Android Open Source Project + * Copyright (C) 2011 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -28,6 +28,7 @@ import java.util.List; * {@hide} */ class ComprehensionTlv { + private static final String LOG_TAG = "ComprehensionTlv"; private int mTag; private boolean mCr; private int mLength; @@ -88,8 +89,13 @@ class ComprehensionTlv { int endIndex = data.length; while (startIndex < endIndex) { ComprehensionTlv ctlv = ComprehensionTlv.decode(data, startIndex); - items.add(ctlv); - startIndex = ctlv.mValueIndex + ctlv.mLength; + if (ctlv != null) { + items.add(ctlv); + startIndex = ctlv.mValueIndex + ctlv.mLength; + } else { + CatLog.d(LOG_TAG, "decodeMany: ctlv is null, stop decoding"); + break; + } } return items; |