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
;
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
);
51 public String
getDeviceSvn(String callingPackage
) {
52 return mPhoneSubInfo
.getDeviceSvn(callingPackage
);
56 * Retrieves the unique subscriber ID, e.g., IMSI for GSM phones.
59 public String
getSubscriberId(String callingPackage
) {
60 return mPhoneSubInfo
.getSubscriberId(callingPackage
);
64 * Retrieves the Group Identifier Level1 for GSM phones.
66 public String
getGroupIdLevel1(String callingPackage
) {
67 return mPhoneSubInfo
.getGroupIdLevel1(callingPackage
);
71 * Retrieves the serial number of the ICC, if applicable.
74 public String
getIccSerialNumber(String callingPackage
) {
75 return mPhoneSubInfo
.getIccSerialNumber(callingPackage
);
79 * Retrieves the phone number string for line 1.
82 public String
getLine1Number(String callingPackage
) {
83 return mPhoneSubInfo
.getLine1Number(callingPackage
);
87 * Retrieves the alpha identifier for line 1.
90 public String
getLine1AlphaTag(String callingPackage
) {
91 return mPhoneSubInfo
.getLine1AlphaTag(callingPackage
);
95 * Retrieves the MSISDN Number.
98 public String
getMsisdn(String callingPackage
) {
99 return mPhoneSubInfo
.getMsisdn(callingPackage
);
103 * Retrieves the voice mail number.
106 public String
getVoiceMailNumber(String callingPackage
) {
107 return mPhoneSubInfo
.getVoiceMailNumber(callingPackage
);
111 * Retrieves the complete voice mail number.
114 public String
getCompleteVoiceMailNumber() {
115 return mPhoneSubInfo
.getCompleteVoiceMailNumber();
119 * Retrieves the alpha identifier associated with the voice mail number.
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
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
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
150 public String
[] getIsimImpu() {
151 return mPhoneSubInfo
.getIsimImpu();
155 public String
getDeviceIdForPhone(int phoneId
) throws RemoteException
{
156 // FIXME: getDeviceIdForPhone
161 public String
getImeiForSubscriber(int subId
, String callingPackage
) throws RemoteException
{
162 // FIXME: getImeiForSubscriber
167 public String
getDeviceSvnUsingSubId(int subId
, String callingPackage
) throws RemoteException
{
168 // FIXME: getDeviceSvnUsingSubId
173 public String
getNaiForSubscriber(int subId
, String callingPackage
) throws RemoteException
{
174 // FIXME: NaiForSubscriber
179 public String
getSubscriberIdForSubscriber(int subId
, String callingPackage
)
180 throws RemoteException
{
181 // FIXME: getSubscriberIdForSubscriber
186 public String
getGroupIdLevel1ForSubscriber(int subId
, String callingPackage
)
187 throws RemoteException
{
188 // FIXME: getGroupIdLevel1ForSubscriber
193 public String
getIccSerialNumberForSubscriber(int subId
, String callingPackage
)
194 throws RemoteException
{
195 // FIXME: getIccSerialNumberForSubscriber
200 public String
getLine1NumberForSubscriber(int subId
, String callingPackage
) throws RemoteException
{
201 // FIXME: getLine1NumberForSubscriber
206 public String
getLine1AlphaTagForSubscriber(int subId
, String callingPackage
) throws RemoteException
{
207 // FIXME: getLine1AlphaTagForSubscriber
212 public String
getMsisdnForSubscriber(int subId
, String callingPackage
) throws RemoteException
{
213 // FIXME: getMsisdnForSubscriber
218 public String
getVoiceMailNumberForSubscriber(int subId
, String callingPackage
) throws RemoteException
{
219 // FIXME: getVoiceMailNumberForSubscriber
224 public String
getCompleteVoiceMailNumberForSubscriber(int subId
) throws RemoteException
{
225 // FIXME: getCompleteVoiceMailNumberForSubscriber
230 public String
getVoiceMailAlphaTagForSubscriber(int subId
, String callingPackage
) throws RemoteException
{
231 // FIXME: getVoiceMailAlphaTagForSubscriber
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
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
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
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
);
280 protected void dump(FileDescriptor fd
, PrintWriter pw
, String
[] args
) {
281 mPhoneSubInfo
.dump(fd
, pw
, args
);