CTS Verifier: hide AID prefix reader test if no support

The reader side of the AID prefix test works also on devices
without AID prefix registration support. However to some
it seems confusing as this makes them look for the emulator
side tests.

Hence removing also the test on the reader side when the
device denies the capability via supportsAidPrefixRegistration()

Bug: 18147492
Change-Id: I0da2ebd56045104d46b363c43b1d2397b472fb99
diff --git a/apps/CtsVerifier/src/com/android/cts/verifier/nfc/hce/HceReaderTestActivity.java b/apps/CtsVerifier/src/com/android/cts/verifier/nfc/hce/HceReaderTestActivity.java
index f628fb7..8beacd3 100644
--- a/apps/CtsVerifier/src/com/android/cts/verifier/nfc/hce/HceReaderTestActivity.java
+++ b/apps/CtsVerifier/src/com/android/cts/verifier/nfc/hce/HceReaderTestActivity.java
@@ -101,21 +101,23 @@
                     SimpleReaderActivity.class.getName(),
                     DynamicAidEmulatorActivity.buildReaderIntent(this), null));
 
-            adapter.add(TestListItem.newTest(this, R.string.nfc_hce_payment_prefix_aids_reader,
-                    SimpleReaderActivity.class.getName(),
-                    PrefixPaymentEmulatorActivity.buildReaderIntent(this), null));
+            if (cardEmulation.supportsAidPrefixRegistration()) {
+                adapter.add(TestListItem.newTest(this, R.string.nfc_hce_payment_prefix_aids_reader,
+                        SimpleReaderActivity.class.getName(),
+                        PrefixPaymentEmulatorActivity.buildReaderIntent(this), null));
 
-            adapter.add(TestListItem.newTest(this, R.string.nfc_hce_payment_prefix_aids_reader_2,
-                    SimpleReaderActivity.class.getName(),
-                    PrefixPaymentEmulator2Activity.buildReaderIntent(this), null));
+                adapter.add(TestListItem.newTest(this, R.string.nfc_hce_payment_prefix_aids_reader_2,
+                        SimpleReaderActivity.class.getName(),
+                        PrefixPaymentEmulator2Activity.buildReaderIntent(this), null));
 
-            adapter.add(TestListItem.newTest(this, R.string.nfc_hce_other_prefix_aids_reader,
-                    SimpleReaderActivity.class.getName(),
-                    DualNonPaymentPrefixEmulatorActivity.buildReaderIntent(this), null));
+                adapter.add(TestListItem.newTest(this, R.string.nfc_hce_other_prefix_aids_reader,
+                        SimpleReaderActivity.class.getName(),
+                        DualNonPaymentPrefixEmulatorActivity.buildReaderIntent(this), null));
 
-            adapter.add(TestListItem.newTest(this, R.string.nfc_hce_other_conflicting_prefix_aids_reader,
-                    SimpleReaderActivity.class.getName(),
-                    ConflictingNonPaymentPrefixEmulatorActivity.buildReaderIntent(this), null));
+                adapter.add(TestListItem.newTest(this, R.string.nfc_hce_other_conflicting_prefix_aids_reader,
+                        SimpleReaderActivity.class.getName(),
+                        ConflictingNonPaymentPrefixEmulatorActivity.buildReaderIntent(this), null));
+            }
         }
 
         setTestListAdapter(adapter);