| package com.android.cts.verifier.nfc.hce; |
| |
| import android.content.ComponentName; |
| import android.content.Context; |
| import android.content.Intent; |
| import android.os.Bundle; |
| |
| import com.android.cts.verifier.R; |
| import com.android.cts.verifier.nfc.NfcDialogs; |
| |
| public class DefaultRouteEmulatorActivity extends BaseEmulatorActivity { |
| public static final String[] APDU_COMMAND_SEQUENCE = { |
| HceUtils.buildSelectApdu("A000000476416E64726F6964484345"), |
| }; |
| public static final String[] APDU_RESPONSE_SEQUENCE = { |
| "148100009000" |
| }; |
| |
| @Override |
| protected void onCreate(Bundle savedInstanceState) { |
| super.onCreate(savedInstanceState); |
| setContentView(R.layout.pass_fail_text); |
| setPassFailButtonClickListeners(); |
| } |
| |
| @Override |
| protected void onResume() { |
| super.onResume(); |
| } |
| |
| @Override |
| void onServicesSetup(boolean result) { |
| NfcDialogs.createHceTapReaderDialog(this, |
| getString(R.string.nfc_hce_default_route_emulator_help)).show(); |
| } |
| |
| public static Intent buildReaderIntent(Context context) { |
| Intent readerIntent = new Intent(context, SimpleReaderActivity.class); |
| readerIntent.putExtra(SimpleReaderActivity.EXTRA_APDUS, APDU_COMMAND_SEQUENCE); |
| readerIntent.putExtra(SimpleReaderActivity.EXTRA_RESPONSES, APDU_RESPONSE_SEQUENCE); |
| readerIntent.putExtra(SimpleReaderActivity.EXTRA_LABEL, |
| context.getString(R.string.nfc_hce_default_route_reader)); |
| return readerIntent; |
| } |
| |
| @Override |
| void onApduSequenceComplete(ComponentName component, long duration) { |
| } |
| } |