1 /* 2 * Copyright (C) 2017 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.ims; 18 19 import android.content.Context; 20 import android.os.RemoteException; 21 import android.telephony.Rlog; 22 import android.telephony.ims.ImsReasonInfo; 23 import android.telephony.ims.aidl.IImsConfig; 24 import android.telephony.ims.stub.ImsConfigImplBase; 25 26 /** 27 * Provides APIs to get/set the IMS service feature/capability/parameters. 28 * The config items include: 29 * 1) Items provisioned by the operator. 30 * 2) Items configured by user. Mainly service feature class. 31 * 32 * @hide 33 */ 34 public class ImsConfig { 35 private static final String TAG = "ImsConfig"; 36 private boolean DBG = true; 37 private final IImsConfig miConfig; 38 39 /** 40 * Broadcast action: the feature enable status was changed 41 * 42 * @hide 43 */ 44 public static final String ACTION_IMS_FEATURE_CHANGED = 45 "com.android.intent.action.IMS_FEATURE_CHANGED"; 46 47 /** 48 * Broadcast action: the configuration was changed 49 * @deprecated Use {@link ImsConfig#addConfigCallback(ImsConfigImplBase.Callback)} instead. 50 * @hide 51 */ 52 public static final String ACTION_IMS_CONFIG_CHANGED = 53 "com.android.intent.action.IMS_CONFIG_CHANGED"; 54 55 /** 56 * Extra parameter "item" of intent ACTION_IMS_FEATURE_CHANGED and ACTION_IMS_CONFIG_CHANGED. 57 * It is the value of FeatureConstants or ConfigConstants. 58 * 59 * @hide 60 */ 61 public static final String EXTRA_CHANGED_ITEM = "item"; 62 63 /** 64 * Extra parameter "value" of intent ACTION_IMS_FEATURE_CHANGED and ACTION_IMS_CONFIG_CHANGED. 65 * It is the new value of "item". 66 * 67 * @hide 68 */ 69 public static final String EXTRA_NEW_VALUE = "value"; 70 71 /** 72 * Defines IMS service/capability feature constants. 73 * @deprecated Use 74 * {@link android.telephony.ims.feature.MmTelFeature.MmTelCapabilities.MmTelCapability} instead. 75 */ 76 public static class FeatureConstants { 77 public static final int FEATURE_TYPE_UNKNOWN = -1; 78 79 /** 80 * FEATURE_TYPE_VOLTE supports features defined in 3GPP and 81 * GSMA IR.92 over LTE. 82 */ 83 public static final int FEATURE_TYPE_VOICE_OVER_LTE = 0; 84 85 /** 86 * FEATURE_TYPE_LVC supports features defined in 3GPP and 87 * GSMA IR.94 over LTE. 88 */ 89 public static final int FEATURE_TYPE_VIDEO_OVER_LTE = 1; 90 91 /** 92 * FEATURE_TYPE_VOICE_OVER_WIFI supports features defined in 3GPP and 93 * GSMA IR.92 over WiFi. 94 */ 95 public static final int FEATURE_TYPE_VOICE_OVER_WIFI = 2; 96 97 /** 98 * FEATURE_TYPE_VIDEO_OVER_WIFI supports features defined in 3GPP and 99 * GSMA IR.94 over WiFi. 100 */ 101 public static final int FEATURE_TYPE_VIDEO_OVER_WIFI = 3; 102 103 /** 104 * FEATURE_TYPE_UT supports features defined in 3GPP and 105 * GSMA IR.92 over LTE. 106 */ 107 public static final int FEATURE_TYPE_UT_OVER_LTE = 4; 108 109 /** 110 * FEATURE_TYPE_UT_OVER_WIFI supports features defined in 3GPP and 111 * GSMA IR.92 over WiFi. 112 */ 113 public static final int FEATURE_TYPE_UT_OVER_WIFI = 5; 114 } 115 116 /** 117 * Defines IMS service/capability parameters. 118 */ 119 public static class ConfigConstants { 120 121 // Define IMS config items 122 public static final int CONFIG_START = 0; 123 124 // Define operator provisioned config items 125 public static final int PROVISIONED_CONFIG_START = CONFIG_START; 126 127 /** 128 * AMR CODEC Mode Value set, 0-7 in comma separated sequence. 129 * Value is in String format. 130 */ 131 public static final int VOCODER_AMRMODESET = CONFIG_START; 132 133 /** 134 * Wide Band AMR CODEC Mode Value set,0-7 in comma separated sequence. 135 * Value is in String format. 136 */ 137 public static final int VOCODER_AMRWBMODESET = 1; 138 139 /** 140 * SIP Session Timer value (seconds). 141 * Value is in Integer format. 142 */ 143 public static final int SIP_SESSION_TIMER = 2; 144 145 /** 146 * Minimum SIP Session Expiration Timer in (seconds). 147 * Value is in Integer format. 148 */ 149 public static final int MIN_SE = 3; 150 151 /** 152 * SIP_INVITE cancellation time out value (in milliseconds). Integer format. 153 * Value is in Integer format. 154 */ 155 public static final int CANCELLATION_TIMER = 4; 156 157 /** 158 * Delay time when an iRAT transition from eHRPD/HRPD/1xRTT to LTE. 159 * Value is in Integer format. 160 */ 161 public static final int TDELAY = 5; 162 163 /** 164 * Silent redial status of Enabled (True), or Disabled (False). 165 * Value is in Integer format. 166 */ 167 public static final int SILENT_REDIAL_ENABLE = 6; 168 169 /** 170 * SIP T1 timer value in milliseconds. See RFC 3261 for define. 171 * Value is in Integer format. 172 */ 173 public static final int SIP_T1_TIMER = 7; 174 175 /** 176 * SIP T2 timer value in milliseconds. See RFC 3261 for define. 177 * Value is in Integer format. 178 */ 179 public static final int SIP_T2_TIMER = 8; 180 181 /** 182 * SIP TF timer value in milliseconds. See RFC 3261 for define. 183 * Value is in Integer format. 184 */ 185 public static final int SIP_TF_TIMER = 9; 186 187 /** 188 * VoLTE status for VLT/s status of Enabled (1), or Disabled (0). 189 * Value is in Integer format. 190 */ 191 public static final int VLT_SETTING_ENABLED = 10; 192 193 /** 194 * VoLTE status for LVC/s status of Enabled (1), or Disabled (0). 195 * Value is in Integer format. 196 */ 197 public static final int LVC_SETTING_ENABLED = 11; 198 /** 199 * Domain Name for the device to populate the request URI for REGISTRATION. 200 * Value is in String format. 201 */ 202 public static final int DOMAIN_NAME = 12; 203 /** 204 * Device Outgoing SMS based on either 3GPP or 3GPP2 standards. 205 * Value is in Integer format. 3GPP2(0), 3GPP(1) 206 */ 207 public static final int SMS_FORMAT = 13; 208 /** 209 * Turns IMS ON/OFF on the device. 210 * Value is in Integer format. ON (1), OFF(0). 211 */ 212 public static final int SMS_OVER_IP = 14; 213 /** 214 * Requested expiration for Published Online availability. 215 * Value is in Integer format. 216 */ 217 public static final int PUBLISH_TIMER = 15; 218 /** 219 * Requested expiration for Published Offline availability. 220 * Value is in Integer format. 221 */ 222 public static final int PUBLISH_TIMER_EXTENDED = 16; 223 /** 224 * 225 * Value is in Integer format. 226 */ 227 public static final int CAPABILITY_DISCOVERY_ENABLED = 17; 228 /** 229 * Period of time the capability information of the contact is cached on handset. 230 * Value is in Integer format. 231 */ 232 public static final int CAPABILITIES_CACHE_EXPIRATION = 18; 233 /** 234 * Peiod of time the availability information of a contact is cached on device. 235 * Value is in Integer format. 236 */ 237 public static final int AVAILABILITY_CACHE_EXPIRATION = 19; 238 /** 239 * Interval between successive capabilities polling. 240 * Value is in Integer format. 241 */ 242 public static final int CAPABILITIES_POLL_INTERVAL = 20; 243 /** 244 * Minimum time between two published messages from the device. 245 * Value is in Integer format. 246 */ 247 public static final int SOURCE_THROTTLE_PUBLISH = 21; 248 /** 249 * The Maximum number of MDNs contained in one Request Contained List. 250 * Value is in Integer format. 251 */ 252 public static final int MAX_NUMENTRIES_IN_RCL = 22; 253 /** 254 * Expiration timer for subscription of a Request Contained List, used in capability 255 * polling. 256 * Value is in Integer format. 257 */ 258 public static final int CAPAB_POLL_LIST_SUB_EXP = 23; 259 /** 260 * Applies compression to LIST Subscription. 261 * Value is in Integer format. Enable (1), Disable(0). 262 */ 263 public static final int GZIP_FLAG = 24; 264 /** 265 * VOLTE Status for EAB/s status of Enabled (1), or Disabled (0). 266 * Value is in Integer format. 267 */ 268 public static final int EAB_SETTING_ENABLED = 25; 269 /** 270 * Wi-Fi calling roaming status. 271 * Value is in Integer format. ON (1), OFF(0). 272 */ 273 public static final int VOICE_OVER_WIFI_ROAMING = 26; 274 /** 275 * Wi-Fi calling modem - WfcModeFeatureValueConstants. 276 * Value is in Integer format. 277 */ 278 public static final int VOICE_OVER_WIFI_MODE = 27; 279 /** 280 * VOLTE Status for voice over wifi status of Enabled (1), or Disabled (0). 281 * Value is in Integer format. 282 */ 283 public static final int VOICE_OVER_WIFI_SETTING_ENABLED = 28; 284 /** 285 * Mobile data enabled. 286 * Value is in Integer format. On (1), OFF(0). 287 */ 288 public static final int MOBILE_DATA_ENABLED = 29; 289 /** 290 * VoLTE user opted in status. 291 * Value is in Integer format. Opted-in (1) Opted-out (0). 292 */ 293 public static final int VOLTE_USER_OPT_IN_STATUS = 30; 294 /** 295 * Proxy for Call Session Control Function(P-CSCF) address for Local-BreakOut(LBO). 296 * Value is in String format. 297 */ 298 public static final int LBO_PCSCF_ADDRESS = 31; 299 /** 300 * Keep Alive Enabled for SIP. 301 * Value is in Integer format. On(1), OFF(0). 302 */ 303 public static final int KEEP_ALIVE_ENABLED = 32; 304 /** 305 * Registration retry Base Time value in seconds. 306 * Value is in Integer format. 307 */ 308 public static final int REGISTRATION_RETRY_BASE_TIME_SEC = 33; 309 /** 310 * Registration retry Max Time value in seconds. 311 * Value is in Integer format. 312 */ 313 public static final int REGISTRATION_RETRY_MAX_TIME_SEC = 34; 314 /** 315 * Smallest RTP port for speech codec. 316 * Value is in integer format. 317 */ 318 public static final int SPEECH_START_PORT = 35; 319 /** 320 * Largest RTP port for speech code. 321 * Value is in Integer format. 322 */ 323 public static final int SPEECH_END_PORT = 36; 324 /** 325 * SIP Timer A's value in milliseconds. Timer A is the INVITE request 326 * retransmit interval, for UDP only. 327 * Value is in Integer format. 328 */ 329 public static final int SIP_INVITE_REQ_RETX_INTERVAL_MSEC = 37; 330 /** 331 * SIP Timer B's value in milliseconds. Timer B is the wait time for 332 * INVITE message to be acknowledged. 333 * Value is in Integer format. 334 */ 335 public static final int SIP_INVITE_RSP_WAIT_TIME_MSEC = 38; 336 /** 337 * SIP Timer D's value in milliseconds. Timer D is the wait time for 338 * response retransmits of the invite client transactions. 339 * Value is in Integer format. 340 */ 341 public static final int SIP_INVITE_RSP_RETX_WAIT_TIME_MSEC = 39; 342 /** 343 * SIP Timer E's value in milliseconds. Timer E is the value Non-INVITE 344 * request retransmit interval, for UDP only. 345 * Value is in Integer format. 346 */ 347 public static final int SIP_NON_INVITE_REQ_RETX_INTERVAL_MSEC = 40; 348 /** 349 * SIP Timer F's value in milliseconds. Timer F is the Non-INVITE transaction 350 * timeout timer. 351 * Value is in Integer format. 352 */ 353 public static final int SIP_NON_INVITE_TXN_TIMEOUT_TIMER_MSEC = 41; 354 /** 355 * SIP Timer G's value in milliseconds. Timer G is the value of INVITE response 356 * retransmit interval. 357 * Value is in Integer format. 358 */ 359 public static final int SIP_INVITE_RSP_RETX_INTERVAL_MSEC = 42; 360 /** 361 * SIP Timer H's value in milliseconds. Timer H is the value of wait time for 362 * ACK receipt. 363 * Value is in Integer format. 364 */ 365 public static final int SIP_ACK_RECEIPT_WAIT_TIME_MSEC = 43; 366 /** 367 * SIP Timer I's value in milliseconds. Timer I is the value of wait time for 368 * ACK retransmits. 369 * Value is in Integer format. 370 */ 371 public static final int SIP_ACK_RETX_WAIT_TIME_MSEC = 44; 372 /** 373 * SIP Timer J's value in milliseconds. Timer J is the value of wait time for 374 * non-invite request retransmission. 375 * Value is in Integer format. 376 */ 377 public static final int SIP_NON_INVITE_REQ_RETX_WAIT_TIME_MSEC = 45; 378 /** 379 * SIP Timer K's value in milliseconds. Timer K is the value of wait time for 380 * non-invite response retransmits. 381 * Value is in Integer format. 382 */ 383 public static final int SIP_NON_INVITE_RSP_RETX_WAIT_TIME_MSEC = 46; 384 /** 385 * AMR WB octet aligned dynamic payload type. 386 * Value is in Integer format. 387 */ 388 public static final int AMR_WB_OCTET_ALIGNED_PT = 47; 389 /** 390 * AMR WB bandwidth efficient payload type. 391 * Value is in Integer format. 392 */ 393 public static final int AMR_WB_BANDWIDTH_EFFICIENT_PT = 48; 394 /** 395 * AMR octet aligned dynamic payload type. 396 * Value is in Integer format. 397 */ 398 public static final int AMR_OCTET_ALIGNED_PT = 49; 399 /** 400 * AMR bandwidth efficient payload type. 401 * Value is in Integer format. 402 */ 403 public static final int AMR_BANDWIDTH_EFFICIENT_PT = 50; 404 /** 405 * DTMF WB payload type. 406 * Value is in Integer format. 407 */ 408 public static final int DTMF_WB_PT = 51; 409 /** 410 * DTMF NB payload type. 411 * Value is in Integer format. 412 */ 413 public static final int DTMF_NB_PT = 52; 414 /** 415 * AMR Default encoding mode. 416 * Value is in Integer format. 417 */ 418 public static final int AMR_DEFAULT_MODE = 53; 419 /** 420 * SMS Public Service Identity. 421 * Value is in String format. 422 */ 423 public static final int SMS_PSI = 54; 424 /** 425 * Video Quality - VideoQualityFeatureValuesConstants. 426 * Value is in Integer format. 427 */ 428 public static final int VIDEO_QUALITY = 55; 429 /** 430 * LTE threshold. 431 * Handover from LTE to WiFi if LTE < THLTE1 and WiFi >= VOWT_A. 432 */ 433 public static final int TH_LTE1 = 56; 434 /** 435 * LTE threshold. 436 * Handover from WiFi to LTE if LTE >= THLTE3 or (WiFi < VOWT_B and LTE >= THLTE2). 437 */ 438 public static final int TH_LTE2 = 57; 439 /** 440 * LTE threshold. 441 * Handover from WiFi to LTE if LTE >= THLTE3 or (WiFi < VOWT_B and LTE >= THLTE2). 442 */ 443 public static final int TH_LTE3 = 58; 444 /** 445 * 1x threshold. 446 * Handover from 1x to WiFi if 1x < TH1x 447 */ 448 public static final int TH_1x = 59; 449 /** 450 * WiFi threshold. 451 * Handover from LTE to WiFi if LTE < THLTE1 and WiFi >= VOWT_A. 452 */ 453 public static final int VOWT_A = 60; 454 /** 455 * WiFi threshold. 456 * Handover from WiFi to LTE if LTE >= THLTE3 or (WiFi < VOWT_B and LTE >= THLTE2). 457 */ 458 public static final int VOWT_B = 61; 459 /** 460 * LTE ePDG timer. 461 * Device shall not handover back to LTE until the T_ePDG_LTE timer expires. 462 */ 463 public static final int T_EPDG_LTE = 62; 464 /** 465 * WiFi ePDG timer. 466 * Device shall not handover back to WiFi until the T_ePDG_WiFi timer expires. 467 */ 468 public static final int T_EPDG_WIFI = 63; 469 /** 470 * 1x ePDG timer. 471 * Device shall not re-register on 1x until the T_ePDG_1x timer expires. 472 */ 473 public static final int T_EPDG_1X = 64; 474 /** 475 * MultiEndpoint status: Enabled (1), or Disabled (0). 476 * Value is in Integer format. 477 */ 478 public static final int VICE_SETTING_ENABLED = 65; 479 480 /** 481 * RTT status: Enabled (1), or Disabled (0). 482 * Value is in Integer format. 483 */ 484 public static final int RTT_SETTING_ENABLED = 66; 485 486 // Expand the operator config items as needed here, need to change 487 // PROVISIONED_CONFIG_END after that. 488 public static final int PROVISIONED_CONFIG_END = RTT_SETTING_ENABLED; 489 490 // Expand the operator config items as needed here. 491 } 492 493 /** 494 * Defines IMS set operation status. 495 */ 496 public static class OperationStatusConstants { 497 public static final int UNKNOWN = -1; 498 public static final int SUCCESS = 0; 499 public static final int FAILED = 1; 500 public static final int UNSUPPORTED_CAUSE_NONE = 2; 501 public static final int UNSUPPORTED_CAUSE_RAT = 3; 502 public static final int UNSUPPORTED_CAUSE_DISABLED = 4; 503 } 504 505 /** 506 * Defines IMS get operation values. 507 */ 508 public static class OperationValuesConstants { 509 /** 510 * Values related to Video Quality 511 */ 512 public static final int VIDEO_QUALITY_UNKNOWN = -1; 513 public static final int VIDEO_QUALITY_LOW = 0; 514 public static final int VIDEO_QUALITY_HIGH = 1; 515 } 516 517 /** 518 * Defines IMS video quality feature value. 519 */ 520 public static class VideoQualityFeatureValuesConstants { 521 public static final int LOW = 0; 522 public static final int HIGH = 1; 523 } 524 525 /** 526 * Defines IMS feature value. 527 */ 528 public static class FeatureValueConstants { 529 public static final int ERROR = -1; 530 public static final int OFF = 0; 531 public static final int ON = 1; 532 } 533 534 /** 535 * Defines IMS feature value. 536 */ 537 public static class WfcModeFeatureValueConstants { 538 public static final int WIFI_ONLY = 0; 539 public static final int CELLULAR_PREFERRED = 1; 540 public static final int WIFI_PREFERRED = 2; 541 } 542 ImsConfig(IImsConfig iconfig)543 public ImsConfig(IImsConfig iconfig) { 544 miConfig = iconfig; 545 } 546 547 /** 548 * @deprecated see {@link #getConfigInt(int)} instead. 549 */ getProvisionedValue(int item)550 public int getProvisionedValue(int item) throws ImsException { 551 return getConfigInt(item); 552 } 553 554 /** 555 * Gets the configuration value for IMS service/capabilities parameters used by IMS stack. 556 * 557 * @param item, as defined in com.android.ims.ImsConfig#ConfigConstants. 558 * @return the value in Integer format. 559 * @throws ImsException if the ImsService is unavailable. 560 */ getConfigInt(int item)561 public int getConfigInt(int item) throws ImsException { 562 int ret = 0; 563 try { 564 ret = miConfig.getConfigInt(item); 565 } catch (RemoteException e) { 566 throw new ImsException("getInt()", e, 567 ImsReasonInfo.CODE_LOCAL_SERVICE_UNAVAILABLE); 568 } 569 if (DBG) Rlog.d(TAG, "getInt(): item = " + item + ", ret =" + ret); 570 571 return ret; 572 } 573 574 /** 575 * @deprecated see {@link #getConfigString(int)} instead 576 */ getProvisionedStringValue(int item)577 public String getProvisionedStringValue(int item) throws ImsException { 578 return getConfigString(item); 579 } 580 581 /** 582 * Gets the configuration value for IMS service/capabilities parameters used by IMS stack. 583 * 584 * @param item, as defined in com.android.ims.ImsConfig#ConfigConstants. 585 * @return value in String format. 586 * 587 * @throws ImsException if the ImsService is unavailable. 588 */ getConfigString(int item)589 public String getConfigString(int item) throws ImsException { 590 String ret = "Unknown"; 591 try { 592 ret = miConfig.getConfigString(item); 593 } catch (RemoteException e) { 594 throw new ImsException("getConfigString()", e, 595 ImsReasonInfo.CODE_LOCAL_SERVICE_UNAVAILABLE); 596 } 597 if (DBG) Rlog.d(TAG, "getConfigString(): item = " + item + ", ret =" + ret); 598 599 return ret; 600 } 601 602 /** 603 * @deprecated see {@link #setConfig(int, int)} instead. 604 */ setProvisionedValue(int item, int value)605 public int setProvisionedValue(int item, int value) throws ImsException { 606 return setConfig(item, value); 607 } 608 609 /** 610 * @deprecated see {@link #setConfig(int, String)} instead. 611 */ setProvisionedStringValue(int item, String value)612 public int setProvisionedStringValue(int item, String value) throws ImsException { 613 return setConfig(item, value); 614 } 615 616 /** 617 * Sets the value for ImsService configuration item. 618 * 619 * @param item, as defined in com.android.ims.ImsConfig#ConfigConstants. 620 * @param value in Integer format. 621 * @return as defined in com.android.ims.ImsConfig#OperationStatusConstants 622 * 623 * @throws ImsException if the ImsService is unavailable. 624 */ setConfig(int item, int value)625 public int setConfig(int item, int value) throws ImsException { 626 int ret = OperationStatusConstants.UNKNOWN; 627 if (DBG) { 628 Rlog.d(TAG, "setConfig(): item = " + item + 629 "value = " + value); 630 } 631 try { 632 ret = miConfig.setConfigInt(item, value); 633 } catch (RemoteException e) { 634 throw new ImsException("setConfig()", e, 635 ImsReasonInfo.CODE_LOCAL_SERVICE_UNAVAILABLE); 636 } 637 if (DBG) { 638 Rlog.d(TAG, "setConfig(): item = " + item + 639 " value = " + value + " ret = " + ret); 640 } 641 642 return ret; 643 644 } 645 646 /** 647 * Sets the value for ImsService configuration item. 648 * 649 * @param item, as defined in com.android.ims.ImsConfig#ConfigConstants. 650 * @param value in Integer format. 651 * @return as defined in com.android.ims.ImsConfig#OperationStatusConstants 652 * 653 * @throws ImsException if the ImsService is unavailable. 654 */ setConfig(int item, String value)655 public int setConfig(int item, String value) throws ImsException { 656 int ret = OperationStatusConstants.UNKNOWN; 657 if (DBG) { 658 Rlog.d(TAG, "setConfig(): item = " + item + 659 "value = " + value); 660 } 661 try { 662 ret = miConfig.setConfigString(item, value); 663 } catch (RemoteException e) { 664 throw new ImsException("setConfig()", e, 665 ImsReasonInfo.CODE_LOCAL_SERVICE_UNAVAILABLE); 666 } 667 if (DBG) { 668 Rlog.d(TAG, "setConfig(): item = " + item + 669 " value = " + value + " ret = " + ret); 670 } 671 672 return ret; 673 } 674 675 /** 676 * Adds a {@link ImsConfigImplBase.Callback} to the ImsService to notify when a Configuration 677 * item has changed. 678 * 679 * Make sure to call {@link #removeConfigCallback(ImsConfigImplBase.Callback)} when finished 680 * using this callback. 681 */ addConfigCallback(ImsConfigImplBase.Callback callback)682 public void addConfigCallback(ImsConfigImplBase.Callback callback) throws ImsException { 683 if (DBG) Rlog.d(TAG, "addConfigCallback: " + callback); 684 try { 685 miConfig.addImsConfigCallback(callback); 686 } catch (RemoteException e) { 687 throw new ImsException("addConfigCallback()", e, 688 ImsReasonInfo.CODE_LOCAL_SERVICE_UNAVAILABLE); 689 } 690 } 691 692 /** 693 * Removes a {@link ImsConfigImplBase.Callback} from the ImsService that was previously added 694 * by {@link #addConfigCallback(ImsConfigImplBase.Callback)}. 695 */ removeConfigCallback(ImsConfigImplBase.Callback callback)696 public void removeConfigCallback(ImsConfigImplBase.Callback callback) throws ImsException { 697 if (DBG) Rlog.d(TAG, "removeConfigCallback: " + callback); 698 try { 699 miConfig.removeImsConfigCallback(callback); 700 } catch (RemoteException e) { 701 throw new ImsException("removeConfigCallback()", e, 702 ImsReasonInfo.CODE_LOCAL_SERVICE_UNAVAILABLE); 703 } 704 } 705 706 /** 707 * @return true if the binder connection is alive, false otherwise. 708 */ isBinderAlive()709 public boolean isBinderAlive() { 710 return miConfig.asBinder().isBinderAlive(); 711 } 712 } 713