1 package com.android.cts.verifier.nfc.hce; 2 3 import android.annotation.TargetApi; 4 import android.content.ComponentName; 5 import android.content.Context; 6 import android.content.Intent; 7 import android.os.Bundle; 8 9 import com.android.cts.verifier.R; 10 import com.android.cts.verifier.nfc.NfcDialogs; 11 12 @TargetApi(19) 13 public class OffHostEmulatorActivity extends BaseEmulatorActivity { 14 @Override onCreate(Bundle savedInstanceState)15 protected void onCreate(Bundle savedInstanceState) { 16 super.onCreate(savedInstanceState); 17 setContentView(R.layout.pass_fail_text); 18 setPassFailButtonClickListeners(); 19 setupServices(this, OffHostService.COMPONENT); 20 } 21 22 @Override onResume()23 protected void onResume() { 24 super.onResume(); 25 } 26 27 @Override onServicesSetup(boolean result)28 void onServicesSetup(boolean result) { 29 NfcDialogs.createHceTapReaderDialog(this, getString(R.string.nfc_hce_offhost_emulator_help)).show(); 30 } 31 buildReaderIntent(Context context)32 public static Intent buildReaderIntent(Context context) { 33 Intent readerIntent = new Intent(context, SimpleReaderActivity.class); 34 readerIntent.putExtra(SimpleReaderActivity.EXTRA_APDUS, 35 OffHostService.APDU_COMMAND_SEQUENCE); 36 readerIntent.putExtra(SimpleReaderActivity.EXTRA_RESPONSES, 37 OffHostService.APDU_RESPOND_SEQUENCE); 38 readerIntent.putExtra(SimpleReaderActivity.EXTRA_LABEL, 39 context.getString(R.string.nfc_hce_offhost_service_reader)); 40 return readerIntent; 41 } 42 43 @Override onApduSequenceComplete(ComponentName component, long duration)44 void onApduSequenceComplete(ComponentName component, long duration) { 45 } 46 } 47