PhoneSubInfoProxy.java revision a537067b93624141ebeb3b1f6c3f2c2b971a301e
1/* 2 * Copyright (C) 2006 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 17package com.android.internal.telephony; 18 19import java.io.FileDescriptor; 20import java.io.PrintWriter; 21 22import android.os.RemoteException; 23import android.os.ServiceManager; 24 25 26public class PhoneSubInfoProxy extends IPhoneSubInfo.Stub { 27 private PhoneSubInfo mPhoneSubInfo; 28 29 public PhoneSubInfoProxy(PhoneSubInfo phoneSubInfo) { 30 mPhoneSubInfo = phoneSubInfo; 31 } 32 33 public void setmPhoneSubInfo(PhoneSubInfo phoneSubInfo) { 34 mPhoneSubInfo = phoneSubInfo; 35 } 36 37 @Override 38 public String getDeviceId() { 39 return mPhoneSubInfo.getDeviceId(); 40 } 41 42 @Override 43 public String getDeviceSvn() { 44 return mPhoneSubInfo.getDeviceSvn(); 45 } 46 47 /** 48 * Retrieves the unique subscriber ID, e.g., IMSI for GSM phones. 49 */ 50 @Override 51 public String getSubscriberId() { 52 return mPhoneSubInfo.getSubscriberId(); 53 } 54 55 /** 56 * Retrieves the Group Identifier Level1 for GSM phones. 57 */ 58 public String getGroupIdLevel1() { 59 return mPhoneSubInfo.getGroupIdLevel1(); 60 } 61 62 /** 63 * Retrieves the serial number of the ICC, if applicable. 64 */ 65 @Override 66 public String getIccSerialNumber() { 67 return mPhoneSubInfo.getIccSerialNumber(); 68 } 69 70 /** 71 * Retrieves the phone number string for line 1. 72 */ 73 @Override 74 public String getLine1Number() { 75 return mPhoneSubInfo.getLine1Number(); 76 } 77 78 /** 79 * Retrieves the alpha identifier for line 1. 80 */ 81 @Override 82 public String getLine1AlphaTag() { 83 return mPhoneSubInfo.getLine1AlphaTag(); 84 } 85 86 /** 87 * Retrieves the MSISDN Number. 88 */ 89 @Override 90 public String getMsisdn() { 91 return mPhoneSubInfo.getMsisdn(); 92 } 93 94 /** 95 * Retrieves the voice mail number. 96 */ 97 @Override 98 public String getVoiceMailNumber() { 99 return mPhoneSubInfo.getVoiceMailNumber(); 100 } 101 102 /** 103 * Retrieves the complete voice mail number. 104 */ 105 @Override 106 public String getCompleteVoiceMailNumber() { 107 return mPhoneSubInfo.getCompleteVoiceMailNumber(); 108 } 109 110 /** 111 * Retrieves the alpha identifier associated with the voice mail number. 112 */ 113 @Override 114 public String getVoiceMailAlphaTag() { 115 return mPhoneSubInfo.getVoiceMailAlphaTag(); 116 } 117 118 /** 119 * Returns the IMS private user identity (IMPI) that was loaded from the ISIM. 120 * @return the IMPI, or null if not present or not loaded 121 */ 122 @Override 123 public String getIsimImpi() { 124 return mPhoneSubInfo.getIsimImpi(); 125 } 126 127 /** 128 * Returns the IMS home network domain name that was loaded from the ISIM. 129 * @return the IMS domain name, or null if not present or not loaded 130 */ 131 @Override 132 public String getIsimDomain() { 133 return mPhoneSubInfo.getIsimDomain(); 134 } 135 136 /** 137 * Returns the IMS public user identities (IMPU) that were loaded from the ISIM. 138 * @return an array of IMPU strings, with one IMPU per string, or null if 139 * not present or not loaded 140 */ 141 @Override 142 public String[] getIsimImpu() { 143 return mPhoneSubInfo.getIsimImpu(); 144 } 145 146 @Override 147 public String getDeviceIdUsingSubId(long subId) throws RemoteException { 148 // FIXME: getDeviceIdUsingSubId 149 return null; 150 } 151 152 @Override 153 public String getSubscriberIdUsingSubId(long subId) throws RemoteException { 154 // FIXME: getSubscriberIdUsingSubId 155 return null; 156 } 157 158 @Override 159 public String getGroupIdLevel1UsingSubId(long subId) throws RemoteException { 160 // FIXME: getGroupIdLevel1UsingSubId 161 return null; 162 } 163 164 @Override 165 public String getIccSerialNumberUsingSubId(long subId) throws RemoteException { 166 // FIXME: getIccSerialNumberUsingSubId 167 return null; 168 } 169 170 @Override 171 public String getLine1NumberUsingSubId(long subId) throws RemoteException { 172 // FIXME: getLine1NumberUsingSubId 173 return null; 174 } 175 176 @Override 177 public String getLine1AlphaTagUsingSubId(long subId) throws RemoteException { 178 // FIXME: getLine1AlphaTagUsingSubId 179 return null; 180 } 181 182 @Override 183 public String getMsisdnUsingSubId(long subId) throws RemoteException { 184 // FIXME: getMsisdnUsingSubId 185 return null; 186 } 187 188 @Override 189 public String getVoiceMailNumberUsingSubId(long subId) throws RemoteException { 190 // FIXME: getVoiceMailNumberUsingSubId 191 return null; 192 } 193 194 @Override 195 public String getCompleteVoiceMailNumberUsingSubId(long subId) throws RemoteException { 196 // FIXME: getCompleteVoiceMailNumberUsingSubId 197 return null; 198 } 199 200 @Override 201 public String getVoiceMailAlphaTagUsingSubId(long subId) throws RemoteException { 202 // FIXME: getVoiceMailAlphaTagUsingSubId 203 return null; 204 } 205 206 /** 207 * Returns the IMS Service Table (IST) that was loaded from the ISIM. 208 * @return IMS Service Table or null if not present or not loaded 209 */ 210 @Override 211 public String getIsimIst() { 212 return mPhoneSubInfo.getIsimIst(); 213 } 214 215 /** 216 * Returns the IMS Proxy Call Session Control Function(PCSCF) that were loaded from the ISIM. 217 * @return an array of PCSCF strings with one PCSCF per string, or null if 218 * not present or not loaded 219 */ 220 @Override 221 public String[] getIsimPcscf() { 222 return mPhoneSubInfo.getIsimPcscf(); 223 } 224 225 /** 226 * Returns the response of ISIM Authetification through RIL. 227 * Returns null if the Authentification hasn't been successed or isn't present iphonesubinfo. 228 * @return the response of ISIM Authetification, or null if not available 229 * @deprecated 230 * @see getIccSimChallengeResponse 231 */ 232 public String getIsimChallengeResponse(String nonce) { 233 return mPhoneSubInfo.getIsimChallengeResponse(nonce); 234 } 235 236 /** 237 * Returns the response of the SIM application on the UICC to authentication 238 * challenge/response algorithm. The data string and challenge response are 239 * Base64 encoded Strings. 240 * Can support EAP-SIM, EAP-AKA with results encoded per 3GPP TS 31.102. 241 * 242 * @param appType ICC application type (@see com.android.internal.telephony.PhoneConstants#APPTYPE_xxx) 243 * @param data authentication challenge data 244 * @return challenge response 245 */ 246 public String getIccSimChallengeResponse(long subId, int appType, String data) { 247 return mPhoneSubInfo.getIccSimChallengeResponse(subId, appType, data); 248 } 249 250 @Override 251 protected void dump(FileDescriptor fd, PrintWriter pw, String[] args) { 252 mPhoneSubInfo.dump(fd, pw, args); 253 } 254} 255