Roll android_tools support library to 25.1.0
[android_tools.git] / sdk / sources / android-23 / com / android / internal / telephony / PhoneSubInfoProxy.java
blob82376d17501df8e4d2437d0329fecfc9e949d029
1 /*
2 * Copyright (C) 2006 The Android Open Source Project
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 package com.android.internal.telephony;
19 import java.io.FileDescriptor;
20 import java.io.PrintWriter;
22 import android.os.RemoteException;
23 import android.os.ServiceManager;
26 public class PhoneSubInfoProxy extends IPhoneSubInfo.Stub {
27 private PhoneSubInfo mPhoneSubInfo;
29 public PhoneSubInfoProxy(PhoneSubInfo phoneSubInfo) {
30 mPhoneSubInfo = phoneSubInfo;
33 public void setmPhoneSubInfo(PhoneSubInfo phoneSubInfo) {
34 mPhoneSubInfo = phoneSubInfo;
37 @Override
38 public String getDeviceId(String callingPackage) {
39 return mPhoneSubInfo.getDeviceId(callingPackage);
42 public String getImei(String callingPackage) {
43 return mPhoneSubInfo.getImei(callingPackage);
46 public String getNai(String callingPackage) {
47 return mPhoneSubInfo.getNai(callingPackage);
50 @Override
51 public String getDeviceSvn(String callingPackage) {
52 return mPhoneSubInfo.getDeviceSvn(callingPackage);
55 /**
56 * Retrieves the unique subscriber ID, e.g., IMSI for GSM phones.
58 @Override
59 public String getSubscriberId(String callingPackage) {
60 return mPhoneSubInfo.getSubscriberId(callingPackage);
63 /**
64 * Retrieves the Group Identifier Level1 for GSM phones.
66 public String getGroupIdLevel1(String callingPackage) {
67 return mPhoneSubInfo.getGroupIdLevel1(callingPackage);
70 /**
71 * Retrieves the serial number of the ICC, if applicable.
73 @Override
74 public String getIccSerialNumber(String callingPackage) {
75 return mPhoneSubInfo.getIccSerialNumber(callingPackage);
78 /**
79 * Retrieves the phone number string for line 1.
81 @Override
82 public String getLine1Number(String callingPackage) {
83 return mPhoneSubInfo.getLine1Number(callingPackage);
86 /**
87 * Retrieves the alpha identifier for line 1.
89 @Override
90 public String getLine1AlphaTag(String callingPackage) {
91 return mPhoneSubInfo.getLine1AlphaTag(callingPackage);
94 /**
95 * Retrieves the MSISDN Number.
97 @Override
98 public String getMsisdn(String callingPackage) {
99 return mPhoneSubInfo.getMsisdn(callingPackage);
103 * Retrieves the voice mail number.
105 @Override
106 public String getVoiceMailNumber(String callingPackage) {
107 return mPhoneSubInfo.getVoiceMailNumber(callingPackage);
111 * Retrieves the complete voice mail number.
113 @Override
114 public String getCompleteVoiceMailNumber() {
115 return mPhoneSubInfo.getCompleteVoiceMailNumber();
119 * Retrieves the alpha identifier associated with the voice mail number.
121 @Override
122 public String getVoiceMailAlphaTag(String callingPackage) {
123 return mPhoneSubInfo.getVoiceMailAlphaTag(callingPackage);
127 * Returns the IMS private user identity (IMPI) that was loaded from the ISIM.
128 * @return the IMPI, or null if not present or not loaded
130 @Override
131 public String getIsimImpi() {
132 return mPhoneSubInfo.getIsimImpi();
136 * Returns the IMS home network domain name that was loaded from the ISIM.
137 * @return the IMS domain name, or null if not present or not loaded
139 @Override
140 public String getIsimDomain() {
141 return mPhoneSubInfo.getIsimDomain();
145 * Returns the IMS public user identities (IMPU) that were loaded from the ISIM.
146 * @return an array of IMPU strings, with one IMPU per string, or null if
147 * not present or not loaded
149 @Override
150 public String[] getIsimImpu() {
151 return mPhoneSubInfo.getIsimImpu();
154 @Override
155 public String getDeviceIdForPhone(int phoneId) throws RemoteException {
156 // FIXME: getDeviceIdForPhone
157 return null;
160 @Override
161 public String getImeiForSubscriber(int subId, String callingPackage) throws RemoteException {
162 // FIXME: getImeiForSubscriber
163 return null;
166 @Override
167 public String getDeviceSvnUsingSubId(int subId, String callingPackage) throws RemoteException {
168 // FIXME: getDeviceSvnUsingSubId
169 return null;
172 @Override
173 public String getNaiForSubscriber(int subId, String callingPackage) throws RemoteException {
174 // FIXME: NaiForSubscriber
175 return null;
178 @Override
179 public String getSubscriberIdForSubscriber(int subId, String callingPackage)
180 throws RemoteException {
181 // FIXME: getSubscriberIdForSubscriber
182 return null;
185 @Override
186 public String getGroupIdLevel1ForSubscriber(int subId, String callingPackage)
187 throws RemoteException {
188 // FIXME: getGroupIdLevel1ForSubscriber
189 return null;
192 @Override
193 public String getIccSerialNumberForSubscriber(int subId, String callingPackage)
194 throws RemoteException {
195 // FIXME: getIccSerialNumberForSubscriber
196 return null;
199 @Override
200 public String getLine1NumberForSubscriber(int subId, String callingPackage) throws RemoteException {
201 // FIXME: getLine1NumberForSubscriber
202 return null;
205 @Override
206 public String getLine1AlphaTagForSubscriber(int subId, String callingPackage) throws RemoteException {
207 // FIXME: getLine1AlphaTagForSubscriber
208 return null;
211 @Override
212 public String getMsisdnForSubscriber(int subId, String callingPackage) throws RemoteException {
213 // FIXME: getMsisdnForSubscriber
214 return null;
217 @Override
218 public String getVoiceMailNumberForSubscriber(int subId, String callingPackage) throws RemoteException {
219 // FIXME: getVoiceMailNumberForSubscriber
220 return null;
223 @Override
224 public String getCompleteVoiceMailNumberForSubscriber(int subId) throws RemoteException {
225 // FIXME: getCompleteVoiceMailNumberForSubscriber
226 return null;
229 @Override
230 public String getVoiceMailAlphaTagForSubscriber(int subId, String callingPackage) throws RemoteException {
231 // FIXME: getVoiceMailAlphaTagForSubscriber
232 return null;
236 * Returns the IMS Service Table (IST) that was loaded from the ISIM.
237 * @return IMS Service Table or null if not present or not loaded
239 @Override
240 public String getIsimIst() {
241 return mPhoneSubInfo.getIsimIst();
245 * Returns the IMS Proxy Call Session Control Function(PCSCF) that were loaded from the ISIM.
246 * @return an array of PCSCF strings with one PCSCF per string, or null if
247 * not present or not loaded
249 @Override
250 public String[] getIsimPcscf() {
251 return mPhoneSubInfo.getIsimPcscf();
255 * Returns the response of ISIM Authetification through RIL.
256 * Returns null if the Authentification hasn't been successed or isn't present iphonesubinfo.
257 * @return the response of ISIM Authetification, or null if not available
258 * @deprecated
259 * @see #getIccSimChallengeResponse
261 public String getIsimChallengeResponse(String nonce) {
262 return mPhoneSubInfo.getIsimChallengeResponse(nonce);
266 * Returns the response of the SIM application on the UICC to authentication
267 * challenge/response algorithm. The data string and challenge response are
268 * Base64 encoded Strings.
269 * Can support EAP-SIM, EAP-AKA with results encoded per 3GPP TS 31.102.
271 * @param appType ICC application type (@see com.android.internal.telephony.PhoneConstants#APPTYPE_xxx)
272 * @param data authentication challenge data
273 * @return challenge response
275 public String getIccSimChallengeResponse(int subId, int appType, String data) {
276 return mPhoneSubInfo.getIccSimChallengeResponse(subId, appType, data);
279 @Override
280 protected void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
281 mPhoneSubInfo.dump(fd, pw, args);