1 /* 2 * Copyright (C) 2017, The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 /* 17 * Copyright (c) 2015-2017, The Linux Foundation. 18 */ 19 /* 20 * Contributed by: Giesecke & Devrient GmbH. 21 */ 22 23 package android.se.omapi; 24 25 import android.se.omapi.ISecureElementReader; 26 27 /** 28 * SecureElement service interface. 29 * @hide 30 */ 31 @VintfStability 32 interface ISecureElementService { 33 34 /** 35 * Returns the friendly names of available Secure Element readers. 36 * <ul> 37 * <li>If the reader is a SIM reader, then its name must be "SIM[Slot]".</li> 38 * <li>If the reader is a SD or micro SD reader, then its name must be "SD[Slot]"</li> 39 * <li>If the reader is a embedded SE reader, then its name must be "eSE[Slot]"</li> 40 * </ul> 41 * Slot is a decimal number without leading zeros. The Numbering must start with 1 42 * (e.g. SIM1, SIM2, ... or SD1, SD2, ... or eSE1, eSE2, ...). 43 */ getReaders()44 String[] getReaders(); 45 46 /** 47 * Returns SecureElement Service reader object to the given name. 48 */ getReader(in String reader)49 ISecureElementReader getReader(in String reader); 50 51 /** 52 * Checks if the application defined by the package name is allowed to 53 * receive NFC transaction events for the defined AID. 54 */ isNfcEventAllowed(in String reader, in byte[] aid, in String[] packageNames, in int userId)55 boolean[] isNfcEventAllowed(in String reader, in byte[] aid, 56 in String[] packageNames, in int userId); 57 58 } 59