Home | History | Annotate | Download | only in hce
      1 package com.android.cts.verifier.nfc.hce;
      2 
      3 import android.content.ComponentName;
      4 import android.content.Context;
      5 import android.content.Intent;
      6 import android.os.Bundle;
      7 
      8 import com.android.cts.verifier.R;
      9 import com.android.cts.verifier.nfc.NfcDialogs;
     10 
     11 public class DefaultRouteEmulatorActivity extends BaseEmulatorActivity {
     12     public static final CommandApdu[] APDU_COMMAND_SEQUENCE = {
     13         HceUtils.buildSelectApdu("A000000476416E64726F6964484345", true),
     14     };
     15     public static final String[] APDU_RESPONSE_SEQUENCE = {
     16         "148100009000"
     17     };
     18 
     19     @Override
     20     protected void onCreate(Bundle savedInstanceState) {
     21         super.onCreate(savedInstanceState);
     22         setContentView(R.layout.pass_fail_text);
     23         setPassFailButtonClickListeners();
     24     }
     25 
     26     @Override
     27     protected void onResume() {
     28         super.onResume();
     29     }
     30 
     31     @Override
     32     void onServicesSetup(boolean result) {
     33         NfcDialogs.createHceTapReaderDialog(this,
     34                 getString(R.string.nfc_hce_default_route_emulator_help)).show();
     35     }
     36 
     37     public static Intent buildReaderIntent(Context context) {
     38         Intent readerIntent = new Intent(context, SimpleReaderActivity.class);
     39         readerIntent.putExtra(SimpleReaderActivity.EXTRA_APDUS, APDU_COMMAND_SEQUENCE);
     40         readerIntent.putExtra(SimpleReaderActivity.EXTRA_RESPONSES, APDU_RESPONSE_SEQUENCE);
     41         readerIntent.putExtra(SimpleReaderActivity.EXTRA_LABEL,
     42                 context.getString(R.string.nfc_hce_default_route_reader));
     43         return readerIntent;
     44     }
     45 
     46     @Override
     47     void onApduSequenceComplete(ComponentName component, long duration) {
     48     }
     49 }
     50