1 package com.android.cts.verifier.nfc.hce;
2 
3 import android.content.ComponentName;
4 
5 public class LargeNumAidsService extends HceService {
6     static final String TAG = "LargeNumAidsService";
7 
8     static final ComponentName COMPONENT =
9             new ComponentName("com.android.cts.verifier",
10             LargeNumAidsService.class.getName());
11 
getCommandSequence()12     public static final CommandApdu[] getCommandSequence() {
13         CommandApdu[] commands = new CommandApdu[256];
14         for (int i = 0; i < 256; i++) {
15             commands[i] = HceUtils.buildSelectApdu(HceUtils.LARGE_NUM_AIDS_PREFIX + String.format("%02X", i) +
16                     HceUtils.LARGE_NUM_AIDS_POSTFIX, true);
17         }
18         return commands;
19     }
20 
getResponseSequence()21     public static final String[] getResponseSequence() {
22         String[] responses = new String[256];
23         for (int i = 0; i < 256; i++) {
24             responses[i] = "9000" + String.format("%02X", i);
25         }
26         return responses;
27     }
28 
LargeNumAidsService()29     public LargeNumAidsService() {
30         initialize(getCommandSequence(), getResponseSequence());
31     }
32 
33     @Override
getComponent()34     public ComponentName getComponent() {
35         return COMPONENT;
36     }
37 }