[RESTRICT AUTOMERGE] Updated CTS test for Android Security b/147310271

Bug: 147310271
Bug: 149329823
Test: Ran the new testcase on android-9.0.0_r1 with/without patch

Change-Id: I7a38a27b0f70da2d99dfb00095af6bb0c8c5a8ce
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2020-0072/Android.mk b/hostsidetests/securitybulletin/securityPatch/CVE-2020-0072/Android.mk
index 999e981..5d11728 100644
--- a/hostsidetests/securitybulletin/securityPatch/CVE-2020-0072/Android.mk
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2020-0072/Android.mk
@@ -26,6 +26,7 @@
 LOCAL_C_INCLUDES_64 += system/nfc/src/gki/ulinux
 LOCAL_C_INCLUDES_64 += system/nfc/src/include
 LOCAL_SHARED_LIBRARIES_64 := libnfc-nci
+LOCAL_SHARED_LIBRARIES_64 += liblog
 
 # Tag this module as a cts test artifact
 LOCAL_COMPATIBILITY_SUITE := cts sts vts
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2020-0072/poc.cpp b/hostsidetests/securitybulletin/securityPatch/CVE-2020-0072/poc.cpp
index 3ddc4d3..1841619 100644
--- a/hostsidetests/securitybulletin/securityPatch/CVE-2020-0072/poc.cpp
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2020-0072/poc.cpp
@@ -16,6 +16,7 @@
 
 #include <stdlib.h>
 #include "../includes/common.h"
+#include <log/log.h>
 
 #include <nfc_api.h>
 #include <rw_int.h>
@@ -32,7 +33,15 @@
 }
 
 int main() {
-
+    tNFC_ACTIVATE_DEVT p_activate_params = {};
+    p_activate_params.protocol = NFC_PROTOCOL_ISO_DEP;
+    p_activate_params.rf_tech_param.mode = NFC_DISCOVERY_TYPE_POLL_A;
+    RW_SetActivatedTagType(&p_activate_params, &poc_cback);
+    if(rw_cb.p_cback != &poc_cback) {
+        ALOGE("Structure tRW_CB mismatch rw_cb.p_cback=%p poc_cback=%p\n",\
+            rw_cb.p_cback, poc_cback);
+        return EXIT_FAILURE;
+    }
     tRW_T2T_CB* p_t2t = &rw_cb.tcb.t2t;
     rw_init();
     rw_cb.p_cback = &poc_cback;
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2020_0072.java b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2020_0072.java
index 4f355d3..0feca95 100644
--- a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2020_0072.java
+++ b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2020_0072.java
@@ -16,6 +16,7 @@
 
 package android.security.cts;
 
+import android.platform.test.annotations.AsbSecurityTest;
 import android.platform.test.annotations.SecurityTest;
 import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
 import org.junit.Test;
@@ -28,10 +29,12 @@
      * b/147310271
      * Vulnerability Behaviour: EXIT_VULNERABLE (113)
      */
+    @AsbSecurityTest(cveBugId = 147310271)
     @SecurityTest(minPatchLevel = "2020-04")
     @Test
     public void testPocCVE_2020_0072() throws Exception {
         AdbUtils.assumeHasNfc(getDevice());
+        assumeIsSupportedNfcDevice(getDevice());
         pocPusher.only64();
         AdbUtils.pocConfig testConfig = new AdbUtils.pocConfig("CVE-2020-0072", getDevice());
         testConfig.checkCrash = false;