1 2 /* 3 * Copyright (C) 2006 The Android Open Source Project 4 * 5 * Licensed under the Apache License, Version 2.0 (the "License"); 6 * you may not use this file except in compliance with the License. 7 * You may obtain a copy of the License at 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, 13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 * See the License for the specific language governing permissions and 15 * limitations under the License. 16 */ 17 18 package com.android.internal.telephony; 19 20 import android.compat.annotation.UnsupportedAppUsage; 21 import android.content.Context; 22 import android.os.AsyncResult; 23 import android.os.Build; 24 import android.os.Handler; 25 import android.os.Message; 26 import android.os.Registrant; 27 import android.os.RegistrantList; 28 import android.telephony.Annotation.RadioPowerState; 29 import android.telephony.TelephonyManager; 30 import android.telephony.emergency.EmergencyNumber; 31 32 import com.android.internal.telephony.uicc.SimPhonebookRecord; 33 34 import java.util.ArrayList; 35 import java.util.List; 36 37 /** 38 * {@hide} 39 */ 40 public abstract class BaseCommands implements CommandsInterface { 41 //***** Instance Variables 42 @UnsupportedAppUsage 43 protected Context mContext; 44 protected int mState = TelephonyManager.RADIO_POWER_UNAVAILABLE; 45 @UnsupportedAppUsage 46 protected Object mStateMonitor = new Object(); 47 48 protected RegistrantList mRadioStateChangedRegistrants = new RegistrantList(); 49 protected RegistrantList mOnRegistrants = new RegistrantList(); 50 protected RegistrantList mAvailRegistrants = new RegistrantList(); 51 protected RegistrantList mOffOrNotAvailRegistrants = new RegistrantList(); 52 protected RegistrantList mNotAvailRegistrants = new RegistrantList(); 53 @UnsupportedAppUsage 54 protected RegistrantList mCallStateRegistrants = new RegistrantList(); 55 protected RegistrantList mNetworkStateRegistrants = new RegistrantList(); 56 protected RegistrantList mDataCallListChangedRegistrants = new RegistrantList(); 57 protected RegistrantList mApnUnthrottledRegistrants = new RegistrantList(); 58 @UnsupportedAppUsage 59 protected RegistrantList mVoiceRadioTechChangedRegistrants = new RegistrantList(); 60 @UnsupportedAppUsage 61 protected RegistrantList mImsNetworkStateChangedRegistrants = new RegistrantList(); 62 @UnsupportedAppUsage 63 protected RegistrantList mIccStatusChangedRegistrants = new RegistrantList(); 64 protected RegistrantList mIccSlotStatusChangedRegistrants = new RegistrantList(); 65 protected RegistrantList mVoicePrivacyOnRegistrants = new RegistrantList(); 66 protected RegistrantList mVoicePrivacyOffRegistrants = new RegistrantList(); 67 @UnsupportedAppUsage 68 protected Registrant mUnsolOemHookRawRegistrant; 69 @UnsupportedAppUsage 70 protected RegistrantList mOtaProvisionRegistrants = new RegistrantList(); 71 @UnsupportedAppUsage 72 protected RegistrantList mCallWaitingInfoRegistrants = new RegistrantList(); 73 protected RegistrantList mDisplayInfoRegistrants = new RegistrantList(); 74 protected RegistrantList mSignalInfoRegistrants = new RegistrantList(); 75 protected RegistrantList mNumberInfoRegistrants = new RegistrantList(); 76 protected RegistrantList mRedirNumInfoRegistrants = new RegistrantList(); 77 protected RegistrantList mLineControlInfoRegistrants = new RegistrantList(); 78 protected RegistrantList mT53ClirInfoRegistrants = new RegistrantList(); 79 protected RegistrantList mT53AudCntrlInfoRegistrants = new RegistrantList(); 80 @UnsupportedAppUsage 81 protected RegistrantList mRingbackToneRegistrants = new RegistrantList(); 82 @UnsupportedAppUsage 83 protected RegistrantList mResendIncallMuteRegistrants = new RegistrantList(); 84 @UnsupportedAppUsage 85 protected RegistrantList mCdmaSubscriptionChangedRegistrants = new RegistrantList(); 86 @UnsupportedAppUsage 87 protected RegistrantList mCdmaPrlChangedRegistrants = new RegistrantList(); 88 @UnsupportedAppUsage 89 protected RegistrantList mExitEmergencyCallbackModeRegistrants = new RegistrantList(); 90 protected RegistrantList mRilConnectedRegistrants = new RegistrantList(); 91 @UnsupportedAppUsage 92 protected RegistrantList mIccRefreshRegistrants = new RegistrantList(); 93 @UnsupportedAppUsage 94 protected RegistrantList mRilCellInfoListRegistrants = new RegistrantList(); 95 @UnsupportedAppUsage 96 protected RegistrantList mSubscriptionStatusRegistrants = new RegistrantList(); 97 @UnsupportedAppUsage 98 protected RegistrantList mSrvccStateRegistrants = new RegistrantList(); 99 @UnsupportedAppUsage 100 protected RegistrantList mHardwareConfigChangeRegistrants = new RegistrantList(); 101 @UnsupportedAppUsage 102 protected RegistrantList mPhoneRadioCapabilityChangedRegistrants = 103 new RegistrantList(); 104 protected RegistrantList mPcoDataRegistrants = new RegistrantList(); 105 protected RegistrantList mCarrierInfoForImsiEncryptionRegistrants = new RegistrantList(); 106 protected RegistrantList mRilNetworkScanResultRegistrants = new RegistrantList(); 107 protected RegistrantList mModemResetRegistrants = new RegistrantList(); 108 protected RegistrantList mNattKeepaliveStatusRegistrants = new RegistrantList(); 109 protected RegistrantList mPhysicalChannelConfigurationRegistrants = new RegistrantList(); 110 protected RegistrantList mLceInfoRegistrants = new RegistrantList(); 111 protected RegistrantList mEmergencyNumberListRegistrants = new RegistrantList(); 112 protected RegistrantList mUiccApplicationsEnablementRegistrants = new RegistrantList(); 113 protected RegistrantList mBarringInfoChangedRegistrants = new RegistrantList(); 114 protected RegistrantList mSimPhonebookChangedRegistrants = new RegistrantList(); 115 protected RegistrantList mSimPhonebookRecordsReceivedRegistrants = new RegistrantList(); 116 117 @UnsupportedAppUsage 118 protected Registrant mGsmSmsRegistrant; 119 @UnsupportedAppUsage 120 protected Registrant mCdmaSmsRegistrant; 121 @UnsupportedAppUsage 122 protected Registrant mNITZTimeRegistrant; 123 @UnsupportedAppUsage 124 protected Registrant mSignalStrengthRegistrant; 125 @UnsupportedAppUsage 126 protected Registrant mUSSDRegistrant; 127 @UnsupportedAppUsage 128 protected Registrant mSmsOnSimRegistrant; 129 @UnsupportedAppUsage 130 protected Registrant mSmsStatusRegistrant; 131 @UnsupportedAppUsage 132 protected Registrant mSsnRegistrant; 133 @UnsupportedAppUsage 134 protected Registrant mCatSessionEndRegistrant; 135 @UnsupportedAppUsage 136 protected Registrant mCatProCmdRegistrant; 137 @UnsupportedAppUsage 138 protected Registrant mCatEventRegistrant; 139 @UnsupportedAppUsage 140 protected Registrant mCatCallSetUpRegistrant; 141 @UnsupportedAppUsage 142 protected Registrant mIccSmsFullRegistrant; 143 @UnsupportedAppUsage 144 protected Registrant mEmergencyCallbackModeRegistrant; 145 @UnsupportedAppUsage 146 protected Registrant mRingRegistrant; 147 @UnsupportedAppUsage 148 protected Registrant mRestrictedStateRegistrant; 149 @UnsupportedAppUsage 150 protected Registrant mGsmBroadcastSmsRegistrant; 151 @UnsupportedAppUsage 152 protected Registrant mCatCcAlphaRegistrant; 153 @UnsupportedAppUsage 154 protected Registrant mSsRegistrant; 155 protected Registrant mRegistrationFailedRegistrant; 156 157 // Lock that mLastEmergencyNumberListIndication uses. 158 private Object mLastEmergencyNumberListIndicationLock = new Object(); 159 // Cache last emergency number list indication from radio 160 private final List<EmergencyNumber> mLastEmergencyNumberListIndication = new ArrayList<>(); 161 162 // Preferred network type received from PhoneFactory. 163 // This is used when establishing a connection to the 164 // vendor ril so it starts up in the correct mode. 165 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 166 protected int mAllowedNetworkTypesBitmask; 167 // CDMA subscription received from PhoneFactory 168 protected int mCdmaSubscription; 169 // Type of Phone, GSM or CDMA. Set by GsmCdmaPhone. 170 @UnsupportedAppUsage 171 protected int mPhoneType; 172 // RIL Version 173 protected int mRilVersion = -1; 174 BaseCommands(Context context)175 public BaseCommands(Context context) { 176 mContext = context; // May be null (if so we won't log statistics) 177 } 178 179 //***** CommandsInterface implementation 180 181 @Override getRadioState()182 public @RadioPowerState int getRadioState() { 183 return mState; 184 } 185 186 @Override registerForRadioStateChanged(Handler h, int what, Object obj)187 public void registerForRadioStateChanged(Handler h, int what, Object obj) { 188 synchronized (mStateMonitor) { 189 mRadioStateChangedRegistrants.addUnique(h, what, obj); 190 Message.obtain(h, what, new AsyncResult(obj, null, null)).sendToTarget(); 191 } 192 } 193 194 @Override unregisterForRadioStateChanged(Handler h)195 public void unregisterForRadioStateChanged(Handler h) { 196 synchronized (mStateMonitor) { 197 mRadioStateChangedRegistrants.remove(h); 198 } 199 } 200 registerForImsNetworkStateChanged(Handler h, int what, Object obj)201 public void registerForImsNetworkStateChanged(Handler h, int what, Object obj) { 202 mImsNetworkStateChangedRegistrants.addUnique(h, what, obj); 203 } 204 unregisterForImsNetworkStateChanged(Handler h)205 public void unregisterForImsNetworkStateChanged(Handler h) { 206 mImsNetworkStateChangedRegistrants.remove(h); 207 } 208 209 @Override registerForOn(Handler h, int what, Object obj)210 public void registerForOn(Handler h, int what, Object obj) { 211 synchronized (mStateMonitor) { 212 mOnRegistrants.addUnique(h, what, obj); 213 214 if (mState == TelephonyManager.RADIO_POWER_ON) { 215 Message.obtain(h, what, new AsyncResult(obj, null, null)).sendToTarget(); 216 } 217 } 218 } 219 @Override unregisterForOn(Handler h)220 public void unregisterForOn(Handler h) { 221 synchronized (mStateMonitor) { 222 mOnRegistrants.remove(h); 223 } 224 } 225 226 227 @Override registerForAvailable(Handler h, int what, Object obj)228 public void registerForAvailable(Handler h, int what, Object obj) { 229 synchronized (mStateMonitor) { 230 mAvailRegistrants.addUnique(h, what, obj); 231 232 if (mState != TelephonyManager.RADIO_POWER_UNAVAILABLE) { 233 Message.obtain(h, what, new AsyncResult(obj, null, null)).sendToTarget(); 234 } 235 } 236 } 237 238 @Override unregisterForAvailable(Handler h)239 public void unregisterForAvailable(Handler h) { 240 synchronized(mStateMonitor) { 241 mAvailRegistrants.remove(h); 242 } 243 } 244 245 @Override registerForNotAvailable(Handler h, int what, Object obj)246 public void registerForNotAvailable(Handler h, int what, Object obj) { 247 synchronized (mStateMonitor) { 248 mNotAvailRegistrants.addUnique(h, what, obj); 249 250 if (mState == TelephonyManager.RADIO_POWER_UNAVAILABLE) { 251 Message.obtain(h, what, new AsyncResult(obj, null, null)).sendToTarget(); 252 } 253 } 254 } 255 256 @Override unregisterForNotAvailable(Handler h)257 public void unregisterForNotAvailable(Handler h) { 258 synchronized (mStateMonitor) { 259 mNotAvailRegistrants.remove(h); 260 } 261 } 262 263 @Override registerForOffOrNotAvailable(Handler h, int what, Object obj)264 public void registerForOffOrNotAvailable(Handler h, int what, Object obj) { 265 synchronized (mStateMonitor) { 266 mOffOrNotAvailRegistrants.addUnique(h, what, obj); 267 268 if (mState == TelephonyManager.RADIO_POWER_OFF 269 || mState == TelephonyManager.RADIO_POWER_UNAVAILABLE) { 270 Message.obtain(h, what, new AsyncResult(obj, null, null)).sendToTarget(); 271 } 272 } 273 } 274 @Override unregisterForOffOrNotAvailable(Handler h)275 public void unregisterForOffOrNotAvailable(Handler h) { 276 synchronized(mStateMonitor) { 277 mOffOrNotAvailRegistrants.remove(h); 278 } 279 } 280 281 @Override registerForCallStateChanged(Handler h, int what, Object obj)282 public void registerForCallStateChanged(Handler h, int what, Object obj) { 283 mCallStateRegistrants.addUnique(h, what, obj); 284 } 285 286 @Override unregisterForCallStateChanged(Handler h)287 public void unregisterForCallStateChanged(Handler h) { 288 mCallStateRegistrants.remove(h); 289 } 290 291 @Override registerForNetworkStateChanged(Handler h, int what, Object obj)292 public void registerForNetworkStateChanged(Handler h, int what, Object obj) { 293 mNetworkStateRegistrants.addUnique(h, what, obj); 294 } 295 296 @Override unregisterForNetworkStateChanged(Handler h)297 public void unregisterForNetworkStateChanged(Handler h) { 298 mNetworkStateRegistrants.remove(h); 299 } 300 301 @Override registerForDataCallListChanged(Handler h, int what, Object obj)302 public void registerForDataCallListChanged(Handler h, int what, Object obj) { 303 mDataCallListChangedRegistrants.addUnique(h, what, obj); 304 } 305 306 @Override unregisterForDataCallListChanged(Handler h)307 public void unregisterForDataCallListChanged(Handler h) { 308 mDataCallListChangedRegistrants.remove(h); 309 } 310 311 @Override registerForApnUnthrottled(Handler h, int what, Object obj)312 public void registerForApnUnthrottled(Handler h, int what, Object obj) { 313 mApnUnthrottledRegistrants.addUnique(h, what, obj); 314 } 315 316 @Override unregisterForApnUnthrottled(Handler h)317 public void unregisterForApnUnthrottled(Handler h) { 318 mApnUnthrottledRegistrants.remove(h); 319 } 320 321 @Override registerForVoiceRadioTechChanged(Handler h, int what, Object obj)322 public void registerForVoiceRadioTechChanged(Handler h, int what, Object obj) { 323 mVoiceRadioTechChangedRegistrants.addUnique(h, what, obj); 324 } 325 326 @Override unregisterForVoiceRadioTechChanged(Handler h)327 public void unregisterForVoiceRadioTechChanged(Handler h) { 328 mVoiceRadioTechChangedRegistrants.remove(h); 329 } 330 331 @Override registerForIccStatusChanged(Handler h, int what, Object obj)332 public void registerForIccStatusChanged(Handler h, int what, Object obj) { 333 mIccStatusChangedRegistrants.addUnique(h, what, obj); 334 } 335 336 @Override unregisterForIccStatusChanged(Handler h)337 public void unregisterForIccStatusChanged(Handler h) { 338 mIccStatusChangedRegistrants.remove(h); 339 } 340 341 @Override registerForIccSlotStatusChanged(Handler h, int what, Object obj)342 public void registerForIccSlotStatusChanged(Handler h, int what, Object obj) { 343 mIccSlotStatusChangedRegistrants.addUnique(h, what, obj); 344 } 345 346 @Override unregisterForIccSlotStatusChanged(Handler h)347 public void unregisterForIccSlotStatusChanged(Handler h) { 348 mIccSlotStatusChangedRegistrants.remove(h); 349 } 350 351 @Override setOnNewGsmSms(Handler h, int what, Object obj)352 public void setOnNewGsmSms(Handler h, int what, Object obj) { 353 mGsmSmsRegistrant = new Registrant (h, what, obj); 354 } 355 356 @Override unSetOnNewGsmSms(Handler h)357 public void unSetOnNewGsmSms(Handler h) { 358 if (mGsmSmsRegistrant != null && mGsmSmsRegistrant.getHandler() == h) { 359 mGsmSmsRegistrant.clear(); 360 mGsmSmsRegistrant = null; 361 } 362 } 363 364 @Override setOnNewCdmaSms(Handler h, int what, Object obj)365 public void setOnNewCdmaSms(Handler h, int what, Object obj) { 366 mCdmaSmsRegistrant = new Registrant (h, what, obj); 367 } 368 369 @Override unSetOnNewCdmaSms(Handler h)370 public void unSetOnNewCdmaSms(Handler h) { 371 if (mCdmaSmsRegistrant != null && mCdmaSmsRegistrant.getHandler() == h) { 372 mCdmaSmsRegistrant.clear(); 373 mCdmaSmsRegistrant = null; 374 } 375 } 376 377 @Override setOnNewGsmBroadcastSms(Handler h, int what, Object obj)378 public void setOnNewGsmBroadcastSms(Handler h, int what, Object obj) { 379 mGsmBroadcastSmsRegistrant = new Registrant (h, what, obj); 380 } 381 382 @Override unSetOnNewGsmBroadcastSms(Handler h)383 public void unSetOnNewGsmBroadcastSms(Handler h) { 384 if (mGsmBroadcastSmsRegistrant != null && mGsmBroadcastSmsRegistrant.getHandler() == h) { 385 mGsmBroadcastSmsRegistrant.clear(); 386 mGsmBroadcastSmsRegistrant = null; 387 } 388 } 389 390 @Override setOnSmsOnSim(Handler h, int what, Object obj)391 public void setOnSmsOnSim(Handler h, int what, Object obj) { 392 mSmsOnSimRegistrant = new Registrant (h, what, obj); 393 } 394 395 @Override unSetOnSmsOnSim(Handler h)396 public void unSetOnSmsOnSim(Handler h) { 397 if (mSmsOnSimRegistrant != null && mSmsOnSimRegistrant.getHandler() == h) { 398 mSmsOnSimRegistrant.clear(); 399 mSmsOnSimRegistrant = null; 400 } 401 } 402 403 @Override setOnSmsStatus(Handler h, int what, Object obj)404 public void setOnSmsStatus(Handler h, int what, Object obj) { 405 mSmsStatusRegistrant = new Registrant (h, what, obj); 406 } 407 408 @Override unSetOnSmsStatus(Handler h)409 public void unSetOnSmsStatus(Handler h) { 410 if (mSmsStatusRegistrant != null && mSmsStatusRegistrant.getHandler() == h) { 411 mSmsStatusRegistrant.clear(); 412 mSmsStatusRegistrant = null; 413 } 414 } 415 416 @Override setOnSignalStrengthUpdate(Handler h, int what, Object obj)417 public void setOnSignalStrengthUpdate(Handler h, int what, Object obj) { 418 mSignalStrengthRegistrant = new Registrant (h, what, obj); 419 } 420 421 @Override unSetOnSignalStrengthUpdate(Handler h)422 public void unSetOnSignalStrengthUpdate(Handler h) { 423 if (mSignalStrengthRegistrant != null && mSignalStrengthRegistrant.getHandler() == h) { 424 mSignalStrengthRegistrant.clear(); 425 mSignalStrengthRegistrant = null; 426 } 427 } 428 429 @Override setOnNITZTime(Handler h, int what, Object obj)430 public void setOnNITZTime(Handler h, int what, Object obj) { 431 mNITZTimeRegistrant = new Registrant (h, what, obj); 432 } 433 434 @Override unSetOnNITZTime(Handler h)435 public void unSetOnNITZTime(Handler h) { 436 if (mNITZTimeRegistrant != null && mNITZTimeRegistrant.getHandler() == h) { 437 mNITZTimeRegistrant.clear(); 438 mNITZTimeRegistrant = null; 439 } 440 } 441 442 @Override setOnUSSD(Handler h, int what, Object obj)443 public void setOnUSSD(Handler h, int what, Object obj) { 444 mUSSDRegistrant = new Registrant (h, what, obj); 445 } 446 447 @Override unSetOnUSSD(Handler h)448 public void unSetOnUSSD(Handler h) { 449 if (mUSSDRegistrant != null && mUSSDRegistrant.getHandler() == h) { 450 mUSSDRegistrant.clear(); 451 mUSSDRegistrant = null; 452 } 453 } 454 455 @Override setOnSuppServiceNotification(Handler h, int what, Object obj)456 public void setOnSuppServiceNotification(Handler h, int what, Object obj) { 457 mSsnRegistrant = new Registrant (h, what, obj); 458 } 459 460 @Override unSetOnSuppServiceNotification(Handler h)461 public void unSetOnSuppServiceNotification(Handler h) { 462 if (mSsnRegistrant != null && mSsnRegistrant.getHandler() == h) { 463 mSsnRegistrant.clear(); 464 mSsnRegistrant = null; 465 } 466 } 467 468 @Override setOnCatSessionEnd(Handler h, int what, Object obj)469 public void setOnCatSessionEnd(Handler h, int what, Object obj) { 470 mCatSessionEndRegistrant = new Registrant (h, what, obj); 471 } 472 473 @Override unSetOnCatSessionEnd(Handler h)474 public void unSetOnCatSessionEnd(Handler h) { 475 if (mCatSessionEndRegistrant != null && mCatSessionEndRegistrant.getHandler() == h) { 476 mCatSessionEndRegistrant.clear(); 477 mCatSessionEndRegistrant = null; 478 } 479 } 480 481 @Override setOnCatProactiveCmd(Handler h, int what, Object obj)482 public void setOnCatProactiveCmd(Handler h, int what, Object obj) { 483 mCatProCmdRegistrant = new Registrant (h, what, obj); 484 } 485 486 @Override unSetOnCatProactiveCmd(Handler h)487 public void unSetOnCatProactiveCmd(Handler h) { 488 if (mCatProCmdRegistrant != null && mCatProCmdRegistrant.getHandler() == h) { 489 mCatProCmdRegistrant.clear(); 490 mCatProCmdRegistrant = null; 491 } 492 } 493 494 @Override setOnCatEvent(Handler h, int what, Object obj)495 public void setOnCatEvent(Handler h, int what, Object obj) { 496 mCatEventRegistrant = new Registrant (h, what, obj); 497 } 498 499 @Override unSetOnCatEvent(Handler h)500 public void unSetOnCatEvent(Handler h) { 501 if (mCatEventRegistrant != null && mCatEventRegistrant.getHandler() == h) { 502 mCatEventRegistrant.clear(); 503 mCatEventRegistrant = null; 504 } 505 } 506 507 @Override setOnCatCallSetUp(Handler h, int what, Object obj)508 public void setOnCatCallSetUp(Handler h, int what, Object obj) { 509 mCatCallSetUpRegistrant = new Registrant (h, what, obj); 510 } 511 512 @Override unSetOnCatCallSetUp(Handler h)513 public void unSetOnCatCallSetUp(Handler h) { 514 if (mCatCallSetUpRegistrant != null && mCatCallSetUpRegistrant.getHandler() == h) { 515 mCatCallSetUpRegistrant.clear(); 516 mCatCallSetUpRegistrant = null; 517 } 518 } 519 520 @Override setOnIccSmsFull(Handler h, int what, Object obj)521 public void setOnIccSmsFull(Handler h, int what, Object obj) { 522 mIccSmsFullRegistrant = new Registrant (h, what, obj); 523 } 524 525 @Override unSetOnIccSmsFull(Handler h)526 public void unSetOnIccSmsFull(Handler h) { 527 if (mIccSmsFullRegistrant != null && mIccSmsFullRegistrant.getHandler() == h) { 528 mIccSmsFullRegistrant.clear(); 529 mIccSmsFullRegistrant = null; 530 } 531 } 532 533 @Override registerForIccRefresh(Handler h, int what, Object obj)534 public void registerForIccRefresh(Handler h, int what, Object obj) { 535 mIccRefreshRegistrants.addUnique(h, what, obj); 536 } 537 @Override setOnIccRefresh(Handler h, int what, Object obj)538 public void setOnIccRefresh(Handler h, int what, Object obj) { 539 registerForIccRefresh(h, what, obj); 540 } 541 542 @Override setEmergencyCallbackMode(Handler h, int what, Object obj)543 public void setEmergencyCallbackMode(Handler h, int what, Object obj) { 544 mEmergencyCallbackModeRegistrant = new Registrant (h, what, obj); 545 } 546 547 @Override unregisterForIccRefresh(Handler h)548 public void unregisterForIccRefresh(Handler h) { 549 mIccRefreshRegistrants.remove(h); 550 } 551 @Override unsetOnIccRefresh(Handler h)552 public void unsetOnIccRefresh(Handler h) { 553 unregisterForIccRefresh(h); 554 } 555 556 @Override setOnCallRing(Handler h, int what, Object obj)557 public void setOnCallRing(Handler h, int what, Object obj) { 558 mRingRegistrant = new Registrant (h, what, obj); 559 } 560 561 @Override unSetOnCallRing(Handler h)562 public void unSetOnCallRing(Handler h) { 563 if (mRingRegistrant != null && mRingRegistrant.getHandler() == h) { 564 mRingRegistrant.clear(); 565 mRingRegistrant = null; 566 } 567 } 568 569 @Override setOnSs(Handler h, int what, Object obj)570 public void setOnSs(Handler h, int what, Object obj) { 571 mSsRegistrant = new Registrant (h, what, obj); 572 } 573 574 @Override unSetOnSs(Handler h)575 public void unSetOnSs(Handler h) { 576 mSsRegistrant.clear(); 577 } 578 579 @Override setOnCatCcAlphaNotify(Handler h, int what, Object obj)580 public void setOnCatCcAlphaNotify(Handler h, int what, Object obj) { 581 mCatCcAlphaRegistrant = new Registrant (h, what, obj); 582 } 583 584 @Override unSetOnCatCcAlphaNotify(Handler h)585 public void unSetOnCatCcAlphaNotify(Handler h) { 586 mCatCcAlphaRegistrant.clear(); 587 } 588 589 @Override setOnRegistrationFailed(Handler h, int what, Object obj)590 public void setOnRegistrationFailed(Handler h, int what, Object obj) { 591 mRegistrationFailedRegistrant = new Registrant(h, what, obj); 592 } 593 594 @Override unSetOnRegistrationFailed(Handler h)595 public void unSetOnRegistrationFailed(Handler h) { 596 mRegistrationFailedRegistrant.clear(); 597 } 598 599 @Override registerForInCallVoicePrivacyOn(Handler h, int what, Object obj)600 public void registerForInCallVoicePrivacyOn(Handler h, int what, Object obj) { 601 mVoicePrivacyOnRegistrants.addUnique(h, what, obj); 602 } 603 604 @Override unregisterForInCallVoicePrivacyOn(Handler h)605 public void unregisterForInCallVoicePrivacyOn(Handler h){ 606 mVoicePrivacyOnRegistrants.remove(h); 607 } 608 609 @Override registerForInCallVoicePrivacyOff(Handler h, int what, Object obj)610 public void registerForInCallVoicePrivacyOff(Handler h, int what, Object obj) { 611 mVoicePrivacyOffRegistrants.addUnique(h, what, obj); 612 } 613 614 @Override unregisterForInCallVoicePrivacyOff(Handler h)615 public void unregisterForInCallVoicePrivacyOff(Handler h){ 616 mVoicePrivacyOffRegistrants.remove(h); 617 } 618 619 @Override setOnRestrictedStateChanged(Handler h, int what, Object obj)620 public void setOnRestrictedStateChanged(Handler h, int what, Object obj) { 621 mRestrictedStateRegistrant = new Registrant (h, what, obj); 622 } 623 624 @Override unSetOnRestrictedStateChanged(Handler h)625 public void unSetOnRestrictedStateChanged(Handler h) { 626 if (mRestrictedStateRegistrant != null && mRestrictedStateRegistrant.getHandler() == h) { 627 mRestrictedStateRegistrant.clear(); 628 mRestrictedStateRegistrant = null; 629 } 630 } 631 632 @Override registerForDisplayInfo(Handler h, int what, Object obj)633 public void registerForDisplayInfo(Handler h, int what, Object obj) { 634 mDisplayInfoRegistrants.addUnique(h, what, obj); 635 } 636 637 @Override unregisterForDisplayInfo(Handler h)638 public void unregisterForDisplayInfo(Handler h) { 639 mDisplayInfoRegistrants.remove(h); 640 } 641 642 @Override registerForCallWaitingInfo(Handler h, int what, Object obj)643 public void registerForCallWaitingInfo(Handler h, int what, Object obj) { 644 mCallWaitingInfoRegistrants.addUnique(h, what, obj); 645 } 646 647 @Override unregisterForCallWaitingInfo(Handler h)648 public void unregisterForCallWaitingInfo(Handler h) { 649 mCallWaitingInfoRegistrants.remove(h); 650 } 651 652 @Override registerForSignalInfo(Handler h, int what, Object obj)653 public void registerForSignalInfo(Handler h, int what, Object obj) { 654 mSignalInfoRegistrants.addUnique(h, what, obj); 655 } 656 setOnUnsolOemHookRaw(Handler h, int what, Object obj)657 public void setOnUnsolOemHookRaw(Handler h, int what, Object obj) { 658 mUnsolOemHookRawRegistrant = new Registrant (h, what, obj); 659 } 660 unSetOnUnsolOemHookRaw(Handler h)661 public void unSetOnUnsolOemHookRaw(Handler h) { 662 if (mUnsolOemHookRawRegistrant != null && mUnsolOemHookRawRegistrant.getHandler() == h) { 663 mUnsolOemHookRawRegistrant.clear(); 664 mUnsolOemHookRawRegistrant = null; 665 } 666 } 667 668 @Override unregisterForSignalInfo(Handler h)669 public void unregisterForSignalInfo(Handler h) { 670 mSignalInfoRegistrants.remove(h); 671 } 672 673 @Override registerForCdmaOtaProvision(Handler h,int what, Object obj)674 public void registerForCdmaOtaProvision(Handler h,int what, Object obj){ 675 mOtaProvisionRegistrants.addUnique(h, what, obj); 676 } 677 678 @Override unregisterForCdmaOtaProvision(Handler h)679 public void unregisterForCdmaOtaProvision(Handler h){ 680 mOtaProvisionRegistrants.remove(h); 681 } 682 683 @Override registerForNumberInfo(Handler h,int what, Object obj)684 public void registerForNumberInfo(Handler h,int what, Object obj) { 685 mNumberInfoRegistrants.addUnique(h, what, obj); 686 } 687 688 @Override unregisterForNumberInfo(Handler h)689 public void unregisterForNumberInfo(Handler h){ 690 mNumberInfoRegistrants.remove(h); 691 } 692 693 @Override registerForRedirectedNumberInfo(Handler h,int what, Object obj)694 public void registerForRedirectedNumberInfo(Handler h,int what, Object obj) { 695 mRedirNumInfoRegistrants.addUnique(h, what, obj); 696 } 697 698 @Override unregisterForRedirectedNumberInfo(Handler h)699 public void unregisterForRedirectedNumberInfo(Handler h) { 700 mRedirNumInfoRegistrants.remove(h); 701 } 702 703 @Override registerForLineControlInfo(Handler h, int what, Object obj)704 public void registerForLineControlInfo(Handler h, int what, Object obj) { 705 mLineControlInfoRegistrants.addUnique(h, what, obj); 706 } 707 708 @Override unregisterForLineControlInfo(Handler h)709 public void unregisterForLineControlInfo(Handler h) { 710 mLineControlInfoRegistrants.remove(h); 711 } 712 713 @Override registerFoT53ClirlInfo(Handler h,int what, Object obj)714 public void registerFoT53ClirlInfo(Handler h,int what, Object obj) { 715 mT53ClirInfoRegistrants.addUnique(h, what, obj); 716 } 717 718 @Override unregisterForT53ClirInfo(Handler h)719 public void unregisterForT53ClirInfo(Handler h) { 720 mT53ClirInfoRegistrants.remove(h); 721 } 722 723 @Override registerForT53AudioControlInfo(Handler h,int what, Object obj)724 public void registerForT53AudioControlInfo(Handler h,int what, Object obj) { 725 mT53AudCntrlInfoRegistrants.addUnique(h, what, obj); 726 } 727 728 @Override unregisterForT53AudioControlInfo(Handler h)729 public void unregisterForT53AudioControlInfo(Handler h) { 730 mT53AudCntrlInfoRegistrants.remove(h); 731 } 732 733 @Override registerForRingbackTone(Handler h, int what, Object obj)734 public void registerForRingbackTone(Handler h, int what, Object obj) { 735 mRingbackToneRegistrants.addUnique(h, what, obj); 736 } 737 738 @Override unregisterForRingbackTone(Handler h)739 public void unregisterForRingbackTone(Handler h) { 740 mRingbackToneRegistrants.remove(h); 741 } 742 743 @Override registerForResendIncallMute(Handler h, int what, Object obj)744 public void registerForResendIncallMute(Handler h, int what, Object obj) { 745 mResendIncallMuteRegistrants.addUnique(h, what, obj); 746 } 747 748 @Override unregisterForResendIncallMute(Handler h)749 public void unregisterForResendIncallMute(Handler h) { 750 mResendIncallMuteRegistrants.remove(h); 751 } 752 753 @Override registerForCdmaSubscriptionChanged(Handler h, int what, Object obj)754 public void registerForCdmaSubscriptionChanged(Handler h, int what, Object obj) { 755 mCdmaSubscriptionChangedRegistrants.addUnique(h, what, obj); 756 } 757 758 @Override unregisterForCdmaSubscriptionChanged(Handler h)759 public void unregisterForCdmaSubscriptionChanged(Handler h) { 760 mCdmaSubscriptionChangedRegistrants.remove(h); 761 } 762 763 @Override registerForCdmaPrlChanged(Handler h, int what, Object obj)764 public void registerForCdmaPrlChanged(Handler h, int what, Object obj) { 765 mCdmaPrlChangedRegistrants.addUnique(h, what, obj); 766 } 767 768 @Override unregisterForCdmaPrlChanged(Handler h)769 public void unregisterForCdmaPrlChanged(Handler h) { 770 mCdmaPrlChangedRegistrants.remove(h); 771 } 772 773 @Override registerForExitEmergencyCallbackMode(Handler h, int what, Object obj)774 public void registerForExitEmergencyCallbackMode(Handler h, int what, Object obj) { 775 mExitEmergencyCallbackModeRegistrants.addUnique(h, what, obj); 776 } 777 778 @Override unregisterForExitEmergencyCallbackMode(Handler h)779 public void unregisterForExitEmergencyCallbackMode(Handler h) { 780 mExitEmergencyCallbackModeRegistrants.remove(h); 781 } 782 783 @Override registerForHardwareConfigChanged(Handler h, int what, Object obj)784 public void registerForHardwareConfigChanged(Handler h, int what, Object obj) { 785 mHardwareConfigChangeRegistrants.addUnique(h, what, obj); 786 } 787 788 @Override unregisterForHardwareConfigChanged(Handler h)789 public void unregisterForHardwareConfigChanged(Handler h) { 790 mHardwareConfigChangeRegistrants.remove(h); 791 } 792 793 @Override registerForNetworkScanResult(Handler h, int what, Object obj)794 public void registerForNetworkScanResult(Handler h, int what, Object obj) { 795 mRilNetworkScanResultRegistrants.addUnique(h, what, obj); 796 } 797 798 @Override unregisterForNetworkScanResult(Handler h)799 public void unregisterForNetworkScanResult(Handler h) { 800 mRilNetworkScanResultRegistrants.remove(h); 801 } 802 803 /** 804 * {@inheritDoc} 805 */ 806 @Override registerForRilConnected(Handler h, int what, Object obj)807 public void registerForRilConnected(Handler h, int what, Object obj) { 808 mRilConnectedRegistrants.addUnique(h, what, obj); 809 if (mRilVersion != -1) { 810 Message.obtain(h, what, new AsyncResult(obj, new Integer(mRilVersion), null)) 811 .sendToTarget(); 812 } 813 } 814 815 @Override unregisterForRilConnected(Handler h)816 public void unregisterForRilConnected(Handler h) { 817 mRilConnectedRegistrants.remove(h); 818 } 819 registerForSubscriptionStatusChanged(Handler h, int what, Object obj)820 public void registerForSubscriptionStatusChanged(Handler h, int what, Object obj) { 821 mSubscriptionStatusRegistrants.addUnique(h, what, obj); 822 } 823 unregisterForSubscriptionStatusChanged(Handler h)824 public void unregisterForSubscriptionStatusChanged(Handler h) { 825 mSubscriptionStatusRegistrants.remove(h); 826 } 827 828 @Override registerForEmergencyNumberList(Handler h, int what, Object obj)829 public void registerForEmergencyNumberList(Handler h, int what, Object obj) { 830 mEmergencyNumberListRegistrants.addUnique(h, what, obj); 831 // Notify the last emergency number list from radio to new registrants because they may 832 // miss the latest indication (e.g. constructed in a delay after HAL is registrated). 833 List<EmergencyNumber> lastEmergencyNumberListIndication = 834 getLastEmergencyNumberListIndication(); 835 if (lastEmergencyNumberListIndication != null) { 836 mEmergencyNumberListRegistrants.notifyRegistrants(new AsyncResult( 837 null, lastEmergencyNumberListIndication, null)); 838 } 839 } 840 841 @Override unregisterForEmergencyNumberList(Handler h)842 public void unregisterForEmergencyNumberList(Handler h) { 843 mEmergencyNumberListRegistrants.remove(h); 844 } 845 846 //***** Protected Methods 847 /** 848 * Store new RadioState and send notification based on the changes 849 * 850 * This function is called only by RIL.java when receiving unsolicited 851 * RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED 852 * 853 * RadioState has 3 values : RADIO_OFF, RADIO_UNAVAILABLE, RADIO_ON. 854 * 855 * @param newState new RadioState decoded from RIL_UNSOL_RADIO_STATE_CHANGED 856 * @param forceNotifyRegistrants boolean indicating if registrants should be notified even if 857 * there is no change in state 858 */ setRadioState(int newState, boolean forceNotifyRegistrants)859 protected void setRadioState(int newState, boolean forceNotifyRegistrants) { 860 int oldState; 861 862 synchronized (mStateMonitor) { 863 oldState = mState; 864 mState = newState; 865 866 if (oldState == mState && !forceNotifyRegistrants) { 867 // no state transition 868 return; 869 } 870 871 mRadioStateChangedRegistrants.notifyRegistrants(); 872 873 if (mState != TelephonyManager.RADIO_POWER_UNAVAILABLE 874 && oldState == TelephonyManager.RADIO_POWER_UNAVAILABLE) { 875 mAvailRegistrants.notifyRegistrants(); 876 } 877 878 if (mState == TelephonyManager.RADIO_POWER_UNAVAILABLE 879 && oldState != TelephonyManager.RADIO_POWER_UNAVAILABLE) { 880 mNotAvailRegistrants.notifyRegistrants(); 881 } 882 883 if (mState == TelephonyManager.RADIO_POWER_ON 884 && oldState != TelephonyManager.RADIO_POWER_ON) { 885 mOnRegistrants.notifyRegistrants(); 886 } 887 888 if ((mState == TelephonyManager.RADIO_POWER_OFF 889 || mState == TelephonyManager.RADIO_POWER_UNAVAILABLE) 890 && (oldState == TelephonyManager.RADIO_POWER_ON)) { 891 mOffOrNotAvailRegistrants.notifyRegistrants(); 892 } 893 } 894 } 895 cacheEmergencyNumberListIndication( List<EmergencyNumber> emergencyNumberListIndication)896 protected void cacheEmergencyNumberListIndication( 897 List<EmergencyNumber> emergencyNumberListIndication) { 898 synchronized (mLastEmergencyNumberListIndicationLock) { 899 mLastEmergencyNumberListIndication.clear(); 900 mLastEmergencyNumberListIndication.addAll(emergencyNumberListIndication); 901 } 902 } 903 getLastEmergencyNumberListIndication()904 private List<EmergencyNumber> getLastEmergencyNumberListIndication() { 905 synchronized (mLastEmergencyNumberListIndicationLock) { 906 return new ArrayList<>(mLastEmergencyNumberListIndication); 907 } 908 } 909 910 /** 911 * {@inheritDoc} 912 */ 913 @Override registerForCellInfoList(Handler h, int what, Object obj)914 public void registerForCellInfoList(Handler h, int what, Object obj) { 915 mRilCellInfoListRegistrants.addUnique(h, what, obj); 916 } 917 @Override unregisterForCellInfoList(Handler h)918 public void unregisterForCellInfoList(Handler h) { 919 mRilCellInfoListRegistrants.remove(h); 920 } 921 922 @Override registerForPhysicalChannelConfiguration(Handler h, int what, Object obj)923 public void registerForPhysicalChannelConfiguration(Handler h, int what, Object obj) { 924 mPhysicalChannelConfigurationRegistrants.addUnique(h, what, obj); 925 } 926 927 @Override unregisterForPhysicalChannelConfiguration(Handler h)928 public void unregisterForPhysicalChannelConfiguration(Handler h) { 929 mPhysicalChannelConfigurationRegistrants.remove(h); 930 } 931 932 @Override registerForSrvccStateChanged(Handler h, int what, Object obj)933 public void registerForSrvccStateChanged(Handler h, int what, Object obj) { 934 mSrvccStateRegistrants.addUnique(h, what, obj); 935 } 936 937 @Override unregisterForSrvccStateChanged(Handler h)938 public void unregisterForSrvccStateChanged(Handler h) { 939 mSrvccStateRegistrants.remove(h); 940 } 941 942 @Override testingEmergencyCall()943 public void testingEmergencyCall() {} 944 945 @Override getRilVersion()946 public int getRilVersion() { 947 return mRilVersion; 948 } 949 setUiccSubscription(int slotId, int appIndex, int subId, int subStatus, Message response)950 public void setUiccSubscription(int slotId, int appIndex, int subId, int subStatus, 951 Message response) { 952 } 953 setDataAllowed(boolean allowed, Message response)954 public void setDataAllowed(boolean allowed, Message response) { 955 } 956 957 @Override requestShutdown(Message result)958 public void requestShutdown(Message result) { 959 } 960 961 @Override getRadioCapability(Message result)962 public void getRadioCapability(Message result) { 963 } 964 965 @Override setRadioCapability(RadioCapability rc, Message response)966 public void setRadioCapability(RadioCapability rc, Message response) { 967 } 968 969 @Override registerForRadioCapabilityChanged(Handler h, int what, Object obj)970 public void registerForRadioCapabilityChanged(Handler h, int what, Object obj) { 971 mPhoneRadioCapabilityChangedRegistrants.addUnique(h, what, obj); 972 } 973 974 @Override unregisterForRadioCapabilityChanged(Handler h)975 public void unregisterForRadioCapabilityChanged(Handler h) { 976 mPhoneRadioCapabilityChangedRegistrants.remove(h); 977 } 978 979 @Override startLceService(int reportIntervalMs, boolean pullMode, Message result)980 public void startLceService(int reportIntervalMs, boolean pullMode, Message result) { 981 } 982 983 @Override stopLceService(Message result)984 public void stopLceService(Message result) { 985 } 986 987 @Override pullLceData(Message result)988 public void pullLceData(Message result) { 989 } 990 991 @Override registerForLceInfo(Handler h, int what, Object obj)992 public void registerForLceInfo(Handler h, int what, Object obj) { 993 synchronized (mStateMonitor) { 994 mLceInfoRegistrants.addUnique(h, what, obj); 995 } 996 } 997 998 @Override unregisterForLceInfo(Handler h)999 public void unregisterForLceInfo(Handler h) { 1000 synchronized (mStateMonitor) { 1001 mLceInfoRegistrants.remove(h); 1002 } 1003 } 1004 1005 @Override registerForModemReset(Handler h, int what, Object obj)1006 public void registerForModemReset(Handler h, int what, Object obj) { 1007 mModemResetRegistrants.addUnique(h, what, obj); 1008 } 1009 1010 @Override unregisterForModemReset(Handler h)1011 public void unregisterForModemReset(Handler h) { 1012 mModemResetRegistrants.remove(h); 1013 } 1014 1015 @Override registerForPcoData(Handler h, int what, Object obj)1016 public void registerForPcoData(Handler h, int what, Object obj) { 1017 mPcoDataRegistrants.addUnique(h, what, obj); 1018 } 1019 1020 @Override unregisterForPcoData(Handler h)1021 public void unregisterForPcoData(Handler h) { 1022 mPcoDataRegistrants.remove(h); 1023 } 1024 1025 @Override registerForCarrierInfoForImsiEncryption(Handler h, int what, Object obj)1026 public void registerForCarrierInfoForImsiEncryption(Handler h, int what, Object obj) { 1027 mCarrierInfoForImsiEncryptionRegistrants.addUnique(h, what, obj); 1028 } 1029 1030 @Override unregisterForCarrierInfoForImsiEncryption(Handler h)1031 public void unregisterForCarrierInfoForImsiEncryption(Handler h) { 1032 mCarrierInfoForImsiEncryptionRegistrants.remove(h); 1033 } 1034 1035 @Override registerForNattKeepaliveStatus(Handler h, int what, Object obj)1036 public void registerForNattKeepaliveStatus(Handler h, int what, Object obj) { 1037 synchronized (mStateMonitor) { 1038 mNattKeepaliveStatusRegistrants.addUnique(h, what, obj); 1039 } 1040 } 1041 1042 @Override unregisterForNattKeepaliveStatus(Handler h)1043 public void unregisterForNattKeepaliveStatus(Handler h) { 1044 synchronized (mStateMonitor) { 1045 mNattKeepaliveStatusRegistrants.remove(h); 1046 } 1047 } 1048 1049 /** 1050 * Registers the handler for RIL_UNSOL_UICC_APPLICATIONS_ENABLEMENT_CHANGED events. 1051 * 1052 * @param h Handler for notification message. 1053 * @param what User-defined message code. 1054 * @param obj User object. 1055 */ 1056 @Override registerUiccApplicationEnablementChanged(Handler h, int what, Object obj)1057 public void registerUiccApplicationEnablementChanged(Handler h, int what, Object obj) { 1058 mUiccApplicationsEnablementRegistrants.addUnique(h, what, obj); 1059 } 1060 1061 /** 1062 * Unregisters the handler for RIL_UNSOL_UICC_APPLICATIONS_ENABLEMENT_CHANGED events. 1063 * 1064 * @param h Handler for notification message. 1065 */ 1066 @Override unregisterUiccApplicationEnablementChanged(Handler h)1067 public void unregisterUiccApplicationEnablementChanged(Handler h) { 1068 mUiccApplicationsEnablementRegistrants.remove(h); 1069 } 1070 1071 /** 1072 * Registers the handler for RIL_UNSOL_BARRING_INFO_CHANGED events. 1073 * 1074 * @param h Handler for notification message. 1075 * @param what User-defined message code. 1076 * @param obj User object. 1077 */ 1078 @Override registerForBarringInfoChanged(Handler h, int what, Object obj)1079 public void registerForBarringInfoChanged(Handler h, int what, Object obj) { 1080 mBarringInfoChangedRegistrants.addUnique(h, what, obj); 1081 } 1082 1083 /** 1084 * Unregisters the handler for RIL_UNSOL_BARRING_INFO_CHANGED events. 1085 * 1086 * @param h Handler for notification message. 1087 */ 1088 @Override unregisterForBarringInfoChanged(Handler h)1089 public void unregisterForBarringInfoChanged(Handler h) { 1090 mBarringInfoChangedRegistrants.remove(h); 1091 } 1092 1093 @Override registerForSimPhonebookChanged(Handler h, int what, Object obj)1094 public void registerForSimPhonebookChanged(Handler h, int what, Object obj) { 1095 mSimPhonebookChangedRegistrants.addUnique(h, what, obj); 1096 } 1097 1098 @Override unregisterForSimPhonebookChanged(Handler h)1099 public void unregisterForSimPhonebookChanged(Handler h) { 1100 mSimPhonebookChangedRegistrants.remove(h); 1101 } 1102 1103 @Override registerForSimPhonebookRecordsReceived(Handler h, int what, Object obj)1104 public void registerForSimPhonebookRecordsReceived(Handler h, int what, Object obj) { 1105 mSimPhonebookRecordsReceivedRegistrants.addUnique(h, what, obj); 1106 } 1107 1108 @Override unregisterForSimPhonebookRecordsReceived(Handler h)1109 public void unregisterForSimPhonebookRecordsReceived(Handler h) { 1110 mSimPhonebookRecordsReceivedRegistrants.remove(h); 1111 } 1112 1113 @Override getSimPhonebookRecords(Message result)1114 public void getSimPhonebookRecords(Message result) { 1115 } 1116 1117 @Override getSimPhonebookCapacity(Message result)1118 public void getSimPhonebookCapacity(Message result) { 1119 } 1120 1121 @Override updateSimPhonebookRecord(SimPhonebookRecord phonebookRecord, Message result)1122 public void updateSimPhonebookRecord(SimPhonebookRecord phonebookRecord, Message result) { 1123 } 1124 } 1125