diff options
-rw-r--r-- | core/java/android/nfc/Tag.java | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/core/java/android/nfc/Tag.java b/core/java/android/nfc/Tag.java index 54583d6..a73067a 100644 --- a/core/java/android/nfc/Tag.java +++ b/core/java/android/nfc/Tag.java @@ -313,14 +313,16 @@ public final class Tag implements Parcelable { */ @Override public String toString() { - StringBuilder sb = new StringBuilder("TAG ") - .append("uid = ") - .append(mId) - .append(" Tech ["); - for (int i : mTechList) { - sb.append(i) - .append(", "); + StringBuilder sb = new StringBuilder("TAG: Tech ["); + String[] techList = getTechList(); + int length = techList.length; + for (int i = 0; i < length; i++) { + sb.append(techList[i]); + if (i < length - 1) { + sb.append(", "); + } } + sb.append("]"); return sb.toString(); } |