From f5d6d5c1a8956f80b92931edd9f64178a529f814 Mon Sep 17 00:00:00 2001 From: Love Khanna Date: Tue, 1 Aug 2017 18:32:59 +0530 Subject: [PATCH] Set default value for T3T_PMM. If HCEF Application does not provide the T3T PMM value, set the default value (FFFFFFFFFFFFFFFF) as per NCI specification. Bug: 64112415 Test: CTS Verifier; HCE-F Reader/Emulator Test Change-Id: I24f212d9bebd978342e4dd04d618572132e7eb4b (cherry picked from commit 20a77e973f62f145ab7b3a4822ce34407c0ca476) --- core/java/android/nfc/cardemulation/NfcFServiceInfo.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/core/java/android/nfc/cardemulation/NfcFServiceInfo.java b/core/java/android/nfc/cardemulation/NfcFServiceInfo.java index 4201935241d93..1d3f9c2e346e8 100644 --- a/core/java/android/nfc/cardemulation/NfcFServiceInfo.java +++ b/core/java/android/nfc/cardemulation/NfcFServiceInfo.java @@ -44,6 +44,8 @@ import java.io.PrintWriter; public final class NfcFServiceInfo implements Parcelable { static final String TAG = "NfcFServiceInfo"; + private static final String DEFAULT_T3T_PMM = "FFFFFFFFFFFFFFFF"; + /** * The service that implements this */ @@ -173,16 +175,12 @@ public final class NfcFServiceInfo implements Parcelable { com.android.internal.R.styleable.T3tPmmFilter); t3tPmm = a.getString( com.android.internal.R.styleable.T3tPmmFilter_name).toUpperCase(); - if (t3tPmm == null) { - String defaultT3tPmm = "FFFFFFFFFFFFFFFF"; - t3tPmm = defaultT3tPmm; - } a.recycle(); } } mSystemCode = (systemCode == null ? "NULL" : systemCode); mNfcid2 = (nfcid2 == null ? "NULL" : nfcid2); - mT3tPmm = (t3tPmm == null ? "NULL" : t3tPmm); + mT3tPmm = (t3tPmm == null ? DEFAULT_T3T_PMM : t3tPmm); } catch (NameNotFoundException e) { throw new XmlPullParserException("Unable to create context for: " + si.packageName); } finally {