• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2007 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 package com.android.internal.telephony;
18 
19 import android.telephony.ImsiEncryptionInfo;
20 
21 /**
22  * Interface used to retrieve various phone-related subscriber information.
23  *
24  */
25 interface IPhoneSubInfo {
26 
27     /**
28      * Retrieves the unique device ID, e.g., IMEI for GSM phones.
29      */
getDeviceId(String callingPackage)30     String getDeviceId(String callingPackage);
31 
32      /**
33      * Retrieves the unique Network Access ID
34      */
getNaiForSubscriber(int subId, String callingPackage)35     String getNaiForSubscriber(int subId, String callingPackage);
36 
37     /**
38      * Retrieves the unique device ID of a phone for the device, e.g., IMEI
39      * for GSM phones.
40      */
getDeviceIdForPhone(int phoneId, String callingPackage)41     String getDeviceIdForPhone(int phoneId, String callingPackage);
42 
43     /**
44      * Retrieves the IMEI.
45      */
getImeiForSubscriber(int subId, String callingPackage)46     String getImeiForSubscriber(int subId, String callingPackage);
47 
48     /**
49      * Retrieves the software version number for the device, e.g., IMEI/SV
50      * for GSM phones.
51      */
getDeviceSvn(String callingPackage)52     String getDeviceSvn(String callingPackage);
53 
54     /**
55      * Retrieves the software version number of a subId for the device, e.g., IMEI/SV
56      * for GSM phones.
57      */
getDeviceSvnUsingSubId(int subId, String callingPackage)58     String getDeviceSvnUsingSubId(int subId, String callingPackage);
59 
60     /**
61      * Retrieves the unique sbuscriber ID, e.g., IMSI for GSM phones.
62      */
63     @UnsupportedAppUsage
getSubscriberId(String callingPackage)64     String getSubscriberId(String callingPackage);
65 
66     /**
67      * Retrieves the unique subscriber ID of a given subId, e.g., IMSI for GSM phones.
68      */
getSubscriberIdForSubscriber(int subId, String callingPackage)69     String getSubscriberIdForSubscriber(int subId, String callingPackage);
70 
71     /**
72      * Retrieves the Group Identifier Level1 for GSM phones of a subId.
73      */
getGroupIdLevel1ForSubscriber(int subId, String callingPackage)74     String getGroupIdLevel1ForSubscriber(int subId, String callingPackage);
75 
76     /**
77      * Retrieves the serial number of the ICC, if applicable.
78      */
79     @UnsupportedAppUsage
getIccSerialNumber(String callingPackage)80     String getIccSerialNumber(String callingPackage);
81 
82     /**
83      * Retrieves the serial number of a given subId.
84      */
getIccSerialNumberForSubscriber(int subId, String callingPackage)85     String getIccSerialNumberForSubscriber(int subId, String callingPackage);
86 
87     /**
88      * Retrieves the phone number string for line 1.
89      */
getLine1Number(String callingPackage)90     String getLine1Number(String callingPackage);
91 
92     /**
93      * Retrieves the phone number string for line 1 of a subcription.
94      */
getLine1NumberForSubscriber(int subId, String callingPackage)95     String getLine1NumberForSubscriber(int subId, String callingPackage);
96 
97 
98     /**
99      * Retrieves the alpha identifier for line 1.
100      */
getLine1AlphaTag(String callingPackage)101     String getLine1AlphaTag(String callingPackage);
102 
103     /**
104      * Retrieves the alpha identifier for line 1 of a subId.
105      */
getLine1AlphaTagForSubscriber(int subId, String callingPackage)106     String getLine1AlphaTagForSubscriber(int subId, String callingPackage);
107 
108 
109     /**
110      * Retrieves MSISDN Number.
111      */
getMsisdn(String callingPackage)112     String getMsisdn(String callingPackage);
113 
114     /**
115      * Retrieves the Msisdn of a subId.
116      */
getMsisdnForSubscriber(int subId, String callingPackage)117     String getMsisdnForSubscriber(int subId, String callingPackage);
118 
119     /**
120      * Retrieves the voice mail number.
121      */
getVoiceMailNumber(String callingPackage)122     String getVoiceMailNumber(String callingPackage);
123 
124     /**
125      * Retrieves the voice mail number of a given subId.
126      */
getVoiceMailNumberForSubscriber(int subId, String callingPackage)127     String getVoiceMailNumberForSubscriber(int subId, String callingPackage);
128 
129     /**
130      * Retrieves the Carrier information used to encrypt IMSI and IMPI.
131      */
getCarrierInfoForImsiEncryption(int subId, int keyType, String callingPackage)132     ImsiEncryptionInfo getCarrierInfoForImsiEncryption(int subId, int keyType,
133     String callingPackage);
134 
135     /**
136      * Stores the Carrier information used to encrypt IMSI and IMPI.
137      */
setCarrierInfoForImsiEncryption(int subId, String callingPackage, in ImsiEncryptionInfo imsiEncryptionInfo)138     void setCarrierInfoForImsiEncryption(int subId, String callingPackage,
139     in ImsiEncryptionInfo imsiEncryptionInfo);
140 
141     /**
142      * Resets the Carrier Keys in the database. This involves 2 steps:
143      *  1. Delete the keys from the database.
144      *  2. Send an intent to download new Certificates.
145      */
resetCarrierKeysForImsiEncryption(int subId, String callingPackage)146     void resetCarrierKeysForImsiEncryption(int subId, String callingPackage);
147 
148     /**
149      * Retrieves the alpha identifier associated with the voice mail number.
150      */
getVoiceMailAlphaTag(String callingPackage)151     String getVoiceMailAlphaTag(String callingPackage);
152 
153     /**
154      * Retrieves the alpha identifier associated with the voice mail number
155      * of a subId.
156      */
getVoiceMailAlphaTagForSubscriber(int subId, String callingPackage)157     String getVoiceMailAlphaTagForSubscriber(int subId, String callingPackage);
158 
159     /**
160      * Returns the IMS private user identity (IMPI) that was loaded from the ISIM.
161      * @return the IMPI, or null if not present or not loaded
162      */
getIsimImpi(int subId)163     String getIsimImpi(int subId);
164 
165     /**
166      * Returns the IMS home network domain name that was loaded from the ISIM.
167      * @return the IMS domain name, or null if not present or not loaded
168      */
getIsimDomain(int subId)169     String getIsimDomain(int subId);
170 
171     /**
172      * Returns the IMS public user identities (IMPU) that were loaded from the ISIM.
173      * @return an array of IMPU strings, with one IMPU per string, or null if
174      *      not present or not loaded
175      */
getIsimImpu(int subId)176     String[] getIsimImpu(int subId);
177 
178     /**
179      * Returns the IMS Service Table (IST) that was loaded from the ISIM.
180      * @return IMS Service Table or null if not present or not loaded
181      */
getIsimIst(int subId)182     String getIsimIst(int subId);
183 
184     /**
185      * Returns the IMS Proxy Call Session Control Function(PCSCF) that were loaded from the ISIM.
186      * @return an array of PCSCF strings with one PCSCF per string, or null if
187      *      not present or not loaded
188      */
getIsimPcscf(int subId)189     String[] getIsimPcscf(int subId);
190 
191     /**
192      * Returns the response of the SIM application on the UICC to authentication
193      * challenge/response algorithm. The data string and challenge response are
194      * Base64 encoded Strings.
195      * Can support EAP-SIM, EAP-AKA with results encoded per 3GPP TS 31.102.
196      *
197      * @param subId subscription ID to be queried
198      * @param appType ICC application type (@see com.android.internal.telephony.PhoneConstants#APPTYPE_xxx)
199      * @param authType Authentication type, see PhoneConstants#AUTHTYPE_xxx
200      * @param data authentication challenge data
201      * @return challenge response
202      */
getIccSimChallengeResponse(int subId, int appType, int authType, String data)203     String getIccSimChallengeResponse(int subId, int appType, int authType, String data);
204 }
205