diff options
author | Hamster Tian <haotia@gmail.com> | 2016-06-30 13:44:54 +0800 |
---|---|---|
committer | Hamster Tian <haotia@gmail.com> | 2016-10-09 19:35:38 -0700 |
commit | 3982619f5c203676e6d66dcc02dd42d15cb8c38f (patch) | |
tree | 098559c8c34f7c9a8508259ab99ee0248f9ba7f6 | |
parent | 8504d88601671fdbd1fda0d7cc5b22531ceab025 (diff) | |
download | android_packages_apps_Nfc-cm-14.0.tar.gz android_packages_apps_Nfc-cm-14.0.tar.bz2 android_packages_apps_Nfc-cm-14.0.zip |
Nfc: read extra properties of Mifare Classiccm-14.0
* Fixes NFC TagInfo crash with MFC and native NFC stack.
Change-Id: Ib5042f6969d34070fbf0b54b26596b86eda1cd26
(cherry picked from commit 018ec89d460f8b6389b4ffe787d293090dcc0bdd)
-rwxr-xr-x | nci/src/com/android/nfc/dhimpl/NativeNfcTag.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/nci/src/com/android/nfc/dhimpl/NativeNfcTag.java b/nci/src/com/android/nfc/dhimpl/NativeNfcTag.java index c121a622..8752c5bd 100755 --- a/nci/src/com/android/nfc/dhimpl/NativeNfcTag.java +++ b/nci/src/com/android/nfc/dhimpl/NativeNfcTag.java @@ -720,6 +720,17 @@ public class NativeNfcTag implements TagEndpoint { break; } + case TagTechnology.MIFARE_CLASSIC: { + byte[] actBytes = mTechActBytes[i]; + if ((actBytes != null) && (actBytes.length > 0)) { + extras.putShort(NfcA.EXTRA_SAK, (short) (actBytes[0] & (short) 0xFF)); + } else { + // ignore this case. + } + extras.putByteArray(NfcA.EXTRA_ATQA, mTechPollBytes[i]); + break; + } + case TagTechnology.NFC_BARCODE: { // hard code this for now, this is the only valid type extras.putInt(NfcBarcode.EXTRA_BARCODE_TYPE, NfcBarcode.TYPE_KOVIO); |