• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 public class ScreenOnOnlyOffHostEmulatorActivity extends BaseEmulatorActivity {
13     @Override
onCreate(Bundle savedInstanceState)14     protected void onCreate(Bundle savedInstanceState) {
15         super.onCreate(savedInstanceState);
16         setContentView(R.layout.pass_fail_text);
17         setPassFailButtonClickListeners();
18         setupServices(this, ScreenOnOnlyOffHostService.COMPONENT);
19     }
20 
21     @Override
onResume()22     protected void onResume() {
23         super.onResume();
24     }
25 
26     @Override
onServicesSetup(boolean result)27     void onServicesSetup(boolean result) {
28         NfcDialogs.createHceTapReaderDialog(this, getString(R.string.nfc_screen_on_only_offhost_help)).show();
29     }
30 
buildReaderIntent(Context context)31     public static Intent buildReaderIntent(Context context) {
32         Intent readerIntent = new Intent(context, SimpleReaderActivity.class);
33         readerIntent.putExtra(SimpleReaderActivity.EXTRA_APDUS,
34                 ScreenOnOnlyOffHostService.APDU_COMMAND_SEQUENCE);
35         readerIntent.putExtra(SimpleReaderActivity.EXTRA_RESPONSES,
36                 ScreenOnOnlyOffHostService.APDU_RESPOND_SEQUENCE);
37         readerIntent.putExtra(SimpleReaderActivity.EXTRA_LABEL,
38                 context.getString(R.string.nfc_screen_on_only_offhost_reader));
39         return readerIntent;
40     }
41 
42     @Override
onApduSequenceComplete(ComponentName component, long duration)43     void onApduSequenceComplete(ComponentName component, long duration) {
44     }
45 }
46