| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
package com.android.ims; |
| 18 |
|
| 19 |
import android.os.Handler; |
| 20 |
import android.os.Looper; |
| 21 |
import android.os.RemoteException; |
| 22 |
import android.telephony.ims.ImsReasonInfo; |
| 23 |
import android.telephony.ims.ProvisioningManager; |
| 24 |
import android.telephony.ims.aidl.IImsConfig; |
| 25 |
import android.telephony.ims.aidl.IImsConfigCallback; |
| 26 |
|
| 27 |
import com.android.internal.telephony.util.HandlerExecutor; |
| 28 |
import com.android.telephony.Rlog; |
| 29 |
|
| 30 |
import java.util.concurrent.Executor; |
| 31 |
|
| 32 |
|
| 33 |
|
| 34 |
|
| 35 |
|
| 36 |
|
| 37 |
|
| 38 |
|
| 39 |
|
| 40 |
|
| 41 |
@Deprecated |
| 42 |
public class ImsConfig { |
| 43 |
private static final String TAG = "ImsConfig"; |
| 44 |
private boolean DBG = true; |
| 45 |
private final IImsConfig miConfig; |
| 46 |
|
| 47 |
|
| 48 |
|
| 49 |
|
| 50 |
|
| 51 |
|
| 52 |
public static final String ACTION_IMS_FEATURE_CHANGED = |
| 53 |
"com.android.intent.action.IMS_FEATURE_CHANGED"; |
| 54 |
|
| 55 |
|
| 56 |
|
| 57 |
|
| 58 |
|
| 59 |
|
| 60 |
public static final String ACTION_IMS_CONFIG_CHANGED = |
| 61 |
"com.android.intent.action.IMS_CONFIG_CHANGED"; |
| 62 |
|
| 63 |
|
| 64 |
|
| 65 |
|
| 66 |
|
| 67 |
|
| 68 |
|
| 69 |
public static final String EXTRA_CHANGED_ITEM = "item"; |
| 70 |
|
| 71 |
|
| 72 |
|
| 73 |
|
| 74 |
|
| 75 |
|
| 76 |
|
| 77 |
public static final String EXTRA_NEW_VALUE = "value"; |
| 78 |
|
| 79 |
|
| 80 |
|
| 81 |
|
| 82 |
|
| 83 |
|
| 84 |
public static class FeatureConstants { |
| 85 |
public static final int FEATURE_TYPE_UNKNOWN = -1; |
| 86 |
|
| 87 |
|
| 88 |
|
| 89 |
|
| 90 |
|
| 91 |
public static final int FEATURE_TYPE_VOICE_OVER_LTE = 0; |
| 92 |
|
| 93 |
|
| 94 |
|
| 95 |
|
| 96 |
|
| 97 |
public static final int FEATURE_TYPE_VIDEO_OVER_LTE = 1; |
| 98 |
|
| 99 |
|
| 100 |
|
| 101 |
|
| 102 |
|
| 103 |
public static final int FEATURE_TYPE_VOICE_OVER_WIFI = 2; |
| 104 |
|
| 105 |
|
| 106 |
|
| 107 |
|
| 108 |
|
| 109 |
public static final int FEATURE_TYPE_VIDEO_OVER_WIFI = 3; |
| 110 |
|
| 111 |
|
| 112 |
|
| 113 |
|
| 114 |
|
| 115 |
public static final int FEATURE_TYPE_UT_OVER_LTE = 4; |
| 116 |
|
| 117 |
|
| 118 |
|
| 119 |
|
| 120 |
|
| 121 |
public static final int FEATURE_TYPE_UT_OVER_WIFI = 5; |
| 122 |
} |
| 123 |
|
| 124 |
|
| 125 |
|
| 126 |
|
| 127 |
public static class ConfigConstants { |
| 128 |
|
| 129 |
|
| 130 |
public static final int CONFIG_START = 0; |
| 131 |
|
| 132 |
|
| 133 |
public static final int PROVISIONED_CONFIG_START = CONFIG_START; |
| 134 |
|
| 135 |
|
| 136 |
|
| 137 |
|
| 138 |
|
| 139 |
|
| 140 |
@Deprecated |
| 141 |
public static final int VOCODER_AMRMODESET = |
| 142 |
ProvisioningManager.KEY_AMR_CODEC_MODE_SET_VALUES; |
| 143 |
|
| 144 |
|
| 145 |
|
| 146 |
|
| 147 |
|
| 148 |
|
| 149 |
@Deprecated |
| 150 |
public static final int VOCODER_AMRWBMODESET = |
| 151 |
ProvisioningManager.KEY_AMR_WB_CODEC_MODE_SET_VALUES; |
| 152 |
|
| 153 |
|
| 154 |
|
| 155 |
|
| 156 |
|
| 157 |
|
| 158 |
@Deprecated |
| 159 |
public static final int SIP_SESSION_TIMER = ProvisioningManager.KEY_SIP_SESSION_TIMER_SEC; |
| 160 |
|
| 161 |
|
| 162 |
|
| 163 |
|
| 164 |
|
| 165 |
|
| 166 |
|
| 167 |
@Deprecated |
| 168 |
public static final int MIN_SE = |
| 169 |
ProvisioningManager.KEY_MINIMUM_SIP_SESSION_EXPIRATION_TIMER_SEC; |
| 170 |
|
| 171 |
|
| 172 |
|
| 173 |
|
| 174 |
|
| 175 |
|
| 176 |
@Deprecated |
| 177 |
public static final int CANCELLATION_TIMER = |
| 178 |
ProvisioningManager.KEY_SIP_INVITE_CANCELLATION_TIMER_MS; |
| 179 |
|
| 180 |
|
| 181 |
|
| 182 |
|
| 183 |
|
| 184 |
|
| 185 |
@Deprecated |
| 186 |
public static final int TDELAY = ProvisioningManager.KEY_TRANSITION_TO_LTE_DELAY_MS; |
| 187 |
|
| 188 |
|
| 189 |
|
| 190 |
|
| 191 |
|
| 192 |
|
| 193 |
@Deprecated |
| 194 |
public static final int SILENT_REDIAL_ENABLE = ProvisioningManager.KEY_ENABLE_SILENT_REDIAL; |
| 195 |
|
| 196 |
|
| 197 |
|
| 198 |
|
| 199 |
|
| 200 |
|
| 201 |
@Deprecated |
| 202 |
public static final int SIP_T1_TIMER = ProvisioningManager.KEY_T1_TIMER_VALUE_MS; |
| 203 |
|
| 204 |
|
| 205 |
|
| 206 |
|
| 207 |
|
| 208 |
|
| 209 |
@Deprecated |
| 210 |
public static final int SIP_T2_TIMER = ProvisioningManager.KEY_T2_TIMER_VALUE_MS; |
| 211 |
|
| 212 |
|
| 213 |
|
| 214 |
|
| 215 |
|
| 216 |
|
| 217 |
@Deprecated |
| 218 |
public static final int SIP_TF_TIMER = ProvisioningManager.KEY_TF_TIMER_VALUE_MS; |
| 219 |
|
| 220 |
|
| 221 |
|
| 222 |
|
| 223 |
|
| 224 |
|
| 225 |
@Deprecated |
| 226 |
public static final int VLT_SETTING_ENABLED = |
| 227 |
ProvisioningManager.KEY_VOLTE_PROVISIONING_STATUS; |
| 228 |
|
| 229 |
|
| 230 |
|
| 231 |
|
| 232 |
|
| 233 |
|
| 234 |
@Deprecated |
| 235 |
public static final int LVC_SETTING_ENABLED = |
| 236 |
ProvisioningManager.KEY_VT_PROVISIONING_STATUS; |
| 237 |
|
| 238 |
|
| 239 |
|
| 240 |
|
| 241 |
|
| 242 |
|
| 243 |
@Deprecated |
| 244 |
public static final int DOMAIN_NAME = ProvisioningManager.KEY_REGISTRATION_DOMAIN_NAME; |
| 245 |
|
| 246 |
|
| 247 |
|
| 248 |
|
| 249 |
|
| 250 |
|
| 251 |
@Deprecated |
| 252 |
public static final int SMS_FORMAT = ProvisioningManager.KEY_SMS_FORMAT; |
| 253 |
|
| 254 |
|
| 255 |
|
| 256 |
|
| 257 |
|
| 258 |
|
| 259 |
@Deprecated |
| 260 |
public static final int SMS_OVER_IP = ProvisioningManager.KEY_SMS_OVER_IP_ENABLED; |
| 261 |
|
| 262 |
|
| 263 |
|
| 264 |
|
| 265 |
|
| 266 |
|
| 267 |
@Deprecated |
| 268 |
public static final int PUBLISH_TIMER = ProvisioningManager.KEY_RCS_PUBLISH_TIMER_SEC; |
| 269 |
|
| 270 |
|
| 271 |
|
| 272 |
|
| 273 |
|
| 274 |
|
| 275 |
|
| 276 |
@Deprecated |
| 277 |
public static final int PUBLISH_TIMER_EXTENDED = |
| 278 |
ProvisioningManager.KEY_RCS_PUBLISH_OFFLINE_AVAILABILITY_TIMER_SEC; |
| 279 |
|
| 280 |
|
| 281 |
|
| 282 |
|
| 283 |
|
| 284 |
|
| 285 |
@Deprecated |
| 286 |
public static final int CAPABILITY_DISCOVERY_ENABLED = |
| 287 |
ProvisioningManager.KEY_RCS_CAPABILITY_DISCOVERY_ENABLED; |
| 288 |
|
| 289 |
|
| 290 |
|
| 291 |
|
| 292 |
|
| 293 |
|
| 294 |
@Deprecated |
| 295 |
public static final int CAPABILITIES_CACHE_EXPIRATION = |
| 296 |
ProvisioningManager.KEY_RCS_CAPABILITIES_CACHE_EXPIRATION_SEC; |
| 297 |
|
| 298 |
|
| 299 |
|
| 300 |
|
| 301 |
|
| 302 |
|
| 303 |
@Deprecated |
| 304 |
public static final int AVAILABILITY_CACHE_EXPIRATION = |
| 305 |
ProvisioningManager.KEY_RCS_AVAILABILITY_CACHE_EXPIRATION_SEC; |
| 306 |
|
| 307 |
|
| 308 |
|
| 309 |
|
| 310 |
|
| 311 |
|
| 312 |
@Deprecated |
| 313 |
public static final int CAPABILITIES_POLL_INTERVAL = |
| 314 |
ProvisioningManager.KEY_RCS_CAPABILITIES_POLL_INTERVAL_SEC; |
| 315 |
|
| 316 |
|
| 317 |
|
| 318 |
|
| 319 |
|
| 320 |
|
| 321 |
@Deprecated |
| 322 |
public static final int SOURCE_THROTTLE_PUBLISH = |
| 323 |
ProvisioningManager.KEY_RCS_PUBLISH_SOURCE_THROTTLE_MS; |
| 324 |
|
| 325 |
|
| 326 |
|
| 327 |
|
| 328 |
|
| 329 |
|
| 330 |
@Deprecated |
| 331 |
public static final int MAX_NUMENTRIES_IN_RCL = |
| 332 |
ProvisioningManager.KEY_RCS_MAX_NUM_ENTRIES_IN_RCL; |
| 333 |
|
| 334 |
|
| 335 |
|
| 336 |
|
| 337 |
|
| 338 |
|
| 339 |
|
| 340 |
@Deprecated |
| 341 |
public static final int CAPAB_POLL_LIST_SUB_EXP = |
| 342 |
ProvisioningManager.KEY_RCS_CAPABILITY_POLL_LIST_SUB_EXP_SEC; |
| 343 |
|
| 344 |
|
| 345 |
|
| 346 |
|
| 347 |
|
| 348 |
|
| 349 |
@Deprecated |
| 350 |
public static final int GZIP_FLAG = ProvisioningManager.KEY_USE_GZIP_FOR_LIST_SUBSCRIPTION; |
| 351 |
|
| 352 |
|
| 353 |
|
| 354 |
|
| 355 |
|
| 356 |
|
| 357 |
@Deprecated |
| 358 |
public static final int EAB_SETTING_ENABLED = |
| 359 |
ProvisioningManager.KEY_EAB_PROVISIONING_STATUS; |
| 360 |
|
| 361 |
|
| 362 |
|
| 363 |
|
| 364 |
|
| 365 |
|
| 366 |
|
| 367 |
@Deprecated |
| 368 |
public static final int VOICE_OVER_WIFI_ROAMING = |
| 369 |
ProvisioningManager.KEY_VOICE_OVER_WIFI_ROAMING_ENABLED_OVERRIDE; |
| 370 |
|
| 371 |
|
| 372 |
|
| 373 |
|
| 374 |
|
| 375 |
|
| 376 |
|
| 377 |
@Deprecated |
| 378 |
public static final int VOICE_OVER_WIFI_MODE = |
| 379 |
ProvisioningManager.KEY_VOICE_OVER_WIFI_MODE_OVERRIDE; |
| 380 |
|
| 381 |
|
| 382 |
|
| 383 |
|
| 384 |
|
| 385 |
|
| 386 |
@Deprecated |
| 387 |
public static final int VOICE_OVER_WIFI_SETTING_ENABLED = |
| 388 |
ProvisioningManager.KEY_VOICE_OVER_WIFI_ENABLED_OVERRIDE; |
| 389 |
|
| 390 |
|
| 391 |
|
| 392 |
|
| 393 |
|
| 394 |
|
| 395 |
|
| 396 |
@Deprecated |
| 397 |
public static final int MOBILE_DATA_ENABLED = ProvisioningManager.KEY_MOBILE_DATA_ENABLED; |
| 398 |
|
| 399 |
|
| 400 |
|
| 401 |
|
| 402 |
|
| 403 |
|
| 404 |
@Deprecated |
| 405 |
public static final int VOLTE_USER_OPT_IN_STATUS = |
| 406 |
ProvisioningManager.KEY_VOLTE_USER_OPT_IN_STATUS; |
| 407 |
|
| 408 |
|
| 409 |
|
| 410 |
|
| 411 |
|
| 412 |
|
| 413 |
@Deprecated |
| 414 |
public static final int LBO_PCSCF_ADDRESS = |
| 415 |
ProvisioningManager.KEY_LOCAL_BREAKOUT_PCSCF_ADDRESS; |
| 416 |
|
| 417 |
|
| 418 |
|
| 419 |
|
| 420 |
|
| 421 |
|
| 422 |
@Deprecated |
| 423 |
public static final int KEEP_ALIVE_ENABLED = ProvisioningManager.KEY_SIP_KEEP_ALIVE_ENABLED; |
| 424 |
|
| 425 |
|
| 426 |
|
| 427 |
|
| 428 |
|
| 429 |
|
| 430 |
@Deprecated |
| 431 |
public static final int REGISTRATION_RETRY_BASE_TIME_SEC = |
| 432 |
ProvisioningManager.KEY_REGISTRATION_RETRY_BASE_TIME_SEC; |
| 433 |
|
| 434 |
|
| 435 |
|
| 436 |
|
| 437 |
|
| 438 |
|
| 439 |
@Deprecated |
| 440 |
public static final int REGISTRATION_RETRY_MAX_TIME_SEC = |
| 441 |
ProvisioningManager.KEY_REGISTRATION_RETRY_MAX_TIME_SEC; |
| 442 |
|
| 443 |
|
| 444 |
|
| 445 |
|
| 446 |
|
| 447 |
|
| 448 |
@Deprecated |
| 449 |
public static final int SPEECH_START_PORT = ProvisioningManager.KEY_RTP_SPEECH_START_PORT; |
| 450 |
|
| 451 |
|
| 452 |
|
| 453 |
|
| 454 |
|
| 455 |
|
| 456 |
@Deprecated |
| 457 |
public static final int SPEECH_END_PORT = ProvisioningManager.KEY_RTP_SPEECH_END_PORT; |
| 458 |
|
| 459 |
|
| 460 |
|
| 461 |
|
| 462 |
|
| 463 |
|
| 464 |
|
| 465 |
@Deprecated |
| 466 |
public static final int SIP_INVITE_REQ_RETX_INTERVAL_MSEC = |
| 467 |
ProvisioningManager.KEY_SIP_INVITE_REQUEST_TRANSMIT_INTERVAL_MS; |
| 468 |
|
| 469 |
|
| 470 |
|
| 471 |
|
| 472 |
|
| 473 |
|
| 474 |
|
| 475 |
@Deprecated |
| 476 |
public static final int SIP_INVITE_RSP_WAIT_TIME_MSEC = |
| 477 |
ProvisioningManager.KEY_SIP_INVITE_ACK_WAIT_TIME_MS; |
| 478 |
|
| 479 |
|
| 480 |
|
| 481 |
|
| 482 |
|
| 483 |
|
| 484 |
|
| 485 |
|
| 486 |
@Deprecated |
| 487 |
public static final int SIP_INVITE_RSP_RETX_WAIT_TIME_MSEC = |
| 488 |
ProvisioningManager.KEY_SIP_INVITE_RESPONSE_RETRANSMIT_WAIT_TIME_MS; |
| 489 |
|
| 490 |
|
| 491 |
|
| 492 |
|
| 493 |
|
| 494 |
|
| 495 |
|
| 496 |
|
| 497 |
@Deprecated |
| 498 |
public static final int SIP_NON_INVITE_REQ_RETX_INTERVAL_MSEC = |
| 499 |
ProvisioningManager.KEY_SIP_NON_INVITE_REQUEST_RETRANSMIT_INTERVAL_MS; |
| 500 |
|
| 501 |
|
| 502 |
|
| 503 |
|
| 504 |
|
| 505 |
|
| 506 |
|
| 507 |
|
| 508 |
@Deprecated |
| 509 |
public static final int SIP_NON_INVITE_TXN_TIMEOUT_TIMER_MSEC = |
| 510 |
ProvisioningManager.KEY_SIP_NON_INVITE_TRANSACTION_TIMEOUT_TIMER_MS; |
| 511 |
|
| 512 |
|
| 513 |
|
| 514 |
|
| 515 |
|
| 516 |
|
| 517 |
|
| 518 |
|
| 519 |
@Deprecated |
| 520 |
public static final int SIP_INVITE_RSP_RETX_INTERVAL_MSEC = |
| 521 |
ProvisioningManager.KEY_SIP_INVITE_RESPONSE_RETRANSMIT_INTERVAL_MS; |
| 522 |
|
| 523 |
|
| 524 |
|
| 525 |
|
| 526 |
|
| 527 |
|
| 528 |
|
| 529 |
@Deprecated |
| 530 |
public static final int SIP_ACK_RECEIPT_WAIT_TIME_MSEC = |
| 531 |
ProvisioningManager.KEY_SIP_ACK_RECEIPT_WAIT_TIME_MS; |
| 532 |
|
| 533 |
|
| 534 |
|
| 535 |
|
| 536 |
|
| 537 |
|
| 538 |
|
| 539 |
@Deprecated |
| 540 |
public static final int SIP_ACK_RETX_WAIT_TIME_MSEC = |
| 541 |
ProvisioningManager.KEY_SIP_ACK_RETRANSMIT_WAIT_TIME_MS; |
| 542 |
|
| 543 |
|
| 544 |
|
| 545 |
|
| 546 |
|
| 547 |
|
| 548 |
|
| 549 |
|
| 550 |
@Deprecated |
| 551 |
public static final int SIP_NON_INVITE_REQ_RETX_WAIT_TIME_MSEC = |
| 552 |
ProvisioningManager.KEY_SIP_NON_INVITE_REQUEST_RETRANSMISSION_WAIT_TIME_MS; |
| 553 |
|
| 554 |
|
| 555 |
|
| 556 |
|
| 557 |
|
| 558 |
|
| 559 |
|
| 560 |
|
| 561 |
@Deprecated |
| 562 |
public static final int SIP_NON_INVITE_RSP_RETX_WAIT_TIME_MSEC = |
| 563 |
ProvisioningManager.KEY_SIP_NON_INVITE_RESPONSE_RETRANSMISSION_WAIT_TIME_MS; |
| 564 |
|
| 565 |
|
| 566 |
|
| 567 |
|
| 568 |
|
| 569 |
|
| 570 |
@Deprecated |
| 571 |
public static final int AMR_WB_OCTET_ALIGNED_PT = |
| 572 |
ProvisioningManager.KEY_AMR_WB_OCTET_ALIGNED_PAYLOAD_TYPE; |
| 573 |
|
| 574 |
|
| 575 |
|
| 576 |
|
| 577 |
|
| 578 |
|
| 579 |
@Deprecated |
| 580 |
public static final int AMR_WB_BANDWIDTH_EFFICIENT_PT = |
| 581 |
ProvisioningManager.KEY_AMR_WB_BANDWIDTH_EFFICIENT_PAYLOAD_TYPE; |
| 582 |
|
| 583 |
|
| 584 |
|
| 585 |
|
| 586 |
|
| 587 |
|
| 588 |
@Deprecated |
| 589 |
public static final int AMR_OCTET_ALIGNED_PT = |
| 590 |
ProvisioningManager.KEY_AMR_OCTET_ALIGNED_PAYLOAD_TYPE; |
| 591 |
|
| 592 |
|
| 593 |
|
| 594 |
|
| 595 |
|
| 596 |
|
| 597 |
@Deprecated |
| 598 |
public static final int AMR_BANDWIDTH_EFFICIENT_PT = |
| 599 |
ProvisioningManager.KEY_AMR_BANDWIDTH_EFFICIENT_PAYLOAD_TYPE; |
| 600 |
|
| 601 |
|
| 602 |
|
| 603 |
|
| 604 |
|
| 605 |
|
| 606 |
@Deprecated |
| 607 |
public static final int DTMF_WB_PT = ProvisioningManager.KEY_DTMF_WB_PAYLOAD_TYPE; |
| 608 |
|
| 609 |
|
| 610 |
|
| 611 |
|
| 612 |
|
| 613 |
|
| 614 |
@Deprecated |
| 615 |
public static final int DTMF_NB_PT = ProvisioningManager.KEY_DTMF_NB_PAYLOAD_TYPE; |
| 616 |
|
| 617 |
|
| 618 |
|
| 619 |
|
| 620 |
|
| 621 |
|
| 622 |
@Deprecated |
| 623 |
public static final int AMR_DEFAULT_MODE = |
| 624 |
ProvisioningManager.KEY_AMR_DEFAULT_ENCODING_MODE; |
| 625 |
|
| 626 |
|
| 627 |
|
| 628 |
|
| 629 |
|
| 630 |
|
| 631 |
@Deprecated |
| 632 |
public static final int SMS_PSI = ProvisioningManager.KEY_SMS_PUBLIC_SERVICE_IDENTITY; |
| 633 |
|
| 634 |
|
| 635 |
|
| 636 |
|
| 637 |
|
| 638 |
|
| 639 |
@Deprecated |
| 640 |
public static final int VIDEO_QUALITY = ProvisioningManager.KEY_VIDEO_QUALITY; |
| 641 |
|
| 642 |
|
| 643 |
|
| 644 |
|
| 645 |
|
| 646 |
|
| 647 |
@Deprecated |
| 648 |
public static final int TH_LTE1 = ProvisioningManager.KEY_LTE_THRESHOLD_1; |
| 649 |
|
| 650 |
|
| 651 |
|
| 652 |
|
| 653 |
|
| 654 |
|
| 655 |
@Deprecated |
| 656 |
public static final int TH_LTE2 = ProvisioningManager.KEY_LTE_THRESHOLD_2; |
| 657 |
|
| 658 |
|
| 659 |
|
| 660 |
|
| 661 |
|
| 662 |
|
| 663 |
@Deprecated |
| 664 |
public static final int TH_LTE3 = ProvisioningManager.KEY_LTE_THRESHOLD_3; |
| 665 |
|
| 666 |
|
| 667 |
|
| 668 |
|
| 669 |
|
| 670 |
|
| 671 |
@Deprecated |
| 672 |
public static final int TH_1x = ProvisioningManager.KEY_1X_THRESHOLD; |
| 673 |
|
| 674 |
|
| 675 |
|
| 676 |
|
| 677 |
|
| 678 |
|
| 679 |
@Deprecated |
| 680 |
public static final int VOWT_A = ProvisioningManager.KEY_WIFI_THRESHOLD_A; |
| 681 |
|
| 682 |
|
| 683 |
|
| 684 |
|
| 685 |
|
| 686 |
|
| 687 |
@Deprecated |
| 688 |
public static final int VOWT_B = ProvisioningManager.KEY_WIFI_THRESHOLD_B; |
| 689 |
|
| 690 |
|
| 691 |
|
| 692 |
|
| 693 |
|
| 694 |
|
| 695 |
@Deprecated |
| 696 |
public static final int T_EPDG_LTE = ProvisioningManager.KEY_LTE_EPDG_TIMER_SEC; |
| 697 |
|
| 698 |
|
| 699 |
|
| 700 |
|
| 701 |
|
| 702 |
|
| 703 |
@Deprecated |
| 704 |
public static final int T_EPDG_WIFI = ProvisioningManager.KEY_WIFI_EPDG_TIMER_SEC; |
| 705 |
|
| 706 |
|
| 707 |
|
| 708 |
|
| 709 |
|
| 710 |
|
| 711 |
@Deprecated |
| 712 |
public static final int T_EPDG_1X = ProvisioningManager.KEY_1X_EPDG_TIMER_SEC; |
| 713 |
|
| 714 |
|
| 715 |
|
| 716 |
|
| 717 |
|
| 718 |
|
| 719 |
@Deprecated |
| 720 |
public static final int VICE_SETTING_ENABLED = ProvisioningManager.KEY_MULTIENDPOINT_ENABLED; |
| 721 |
|
| 722 |
|
| 723 |
|
| 724 |
|
| 725 |
|
| 726 |
|
| 727 |
@Deprecated |
| 728 |
public static final int RTT_SETTING_ENABLED = ProvisioningManager.KEY_RTT_ENABLED; |
| 729 |
|
| 730 |
|
| 731 |
|
| 732 |
public static final int PROVISIONED_CONFIG_END = |
| 733 |
ProvisioningManager.KEY_VOICE_OVER_WIFI_ENTITLEMENT_ID; |
| 734 |
|
| 735 |
|
| 736 |
} |
| 737 |
|
| 738 |
|
| 739 |
|
| 740 |
|
| 741 |
public static class OperationStatusConstants { |
| 742 |
public static final int UNKNOWN = -1; |
| 743 |
public static final int SUCCESS = 0; |
| 744 |
public static final int FAILED = 1; |
| 745 |
public static final int UNSUPPORTED_CAUSE_NONE = 2; |
| 746 |
public static final int UNSUPPORTED_CAUSE_RAT = 3; |
| 747 |
public static final int UNSUPPORTED_CAUSE_DISABLED = 4; |
| 748 |
} |
| 749 |
|
| 750 |
|
| 751 |
|
| 752 |
|
| 753 |
public static class OperationValuesConstants { |
| 754 |
|
| 755 |
|
| 756 |
|
| 757 |
public static final int VIDEO_QUALITY_UNKNOWN = -1; |
| 758 |
public static final int VIDEO_QUALITY_LOW = 0; |
| 759 |
public static final int VIDEO_QUALITY_HIGH = 1; |
| 760 |
} |
| 761 |
|
| 762 |
|
| 763 |
|
| 764 |
|
| 765 |
public static class VideoQualityFeatureValuesConstants { |
| 766 |
public static final int LOW = 0; |
| 767 |
public static final int HIGH = 1; |
| 768 |
} |
| 769 |
|
| 770 |
|
| 771 |
|
| 772 |
|
| 773 |
public static class FeatureValueConstants { |
| 774 |
public static final int ERROR = -1; |
| 775 |
public static final int OFF = 0; |
| 776 |
public static final int ON = 1; |
| 777 |
} |
| 778 |
|
| 779 |
|
| 780 |
|
| 781 |
|
| 782 |
public static class WfcModeFeatureValueConstants { |
| 783 |
public static final int WIFI_ONLY = 0; |
| 784 |
public static final int CELLULAR_PREFERRED = 1; |
| 785 |
public static final int WIFI_PREFERRED = 2; |
| 786 |
} |
| 787 |
|
| 788 |
public ImsConfig(IImsConfig iconfig) { |
| 789 |
miConfig = iconfig; |
| 790 |
} |
| 791 |
|
| 792 |
|
| 793 |
|
| 794 |
|
| 795 |
public int getProvisionedValue(int item) throws ImsException { |
| 796 |
return getConfigInt(item); |
| 797 |
} |
| 798 |
|
| 799 |
|
| 800 |
|
| 801 |
|
| 802 |
|
| 803 |
|
| 804 |
|
| 805 |
|
| 806 |
public int getConfigInt(int item) throws ImsException { |
| 807 |
int ret = 0; |
| 808 |
try { |
| 809 |
ret = miConfig.getConfigInt(item); |
| 810 |
} catch (RemoteException e) { |
| 811 |
throw new ImsException("getInt()", e, |
| 812 |
ImsReasonInfo.CODE_LOCAL_SERVICE_UNAVAILABLE); |
| 813 |
} |
| 814 |
if (DBG) Rlog.d(TAG, "getInt(): item = " + item + ", ret =" + ret); |
| 815 |
|
| 816 |
return ret; |
| 817 |
} |
| 818 |
|
| 819 |
|
| 820 |
|
| 821 |
|
| 822 |
public String getProvisionedStringValue(int item) throws ImsException { |
| 823 |
return getConfigString(item); |
| 824 |
} |
| 825 |
|
| 826 |
|
| 827 |
|
| 828 |
|
| 829 |
|
| 830 |
|
| 831 |
|
| 832 |
|
| 833 |
|
| 834 |
public String getConfigString(int item) throws ImsException { |
| 835 |
String ret = "Unknown"; |
| 836 |
try { |
| 837 |
ret = miConfig.getConfigString(item); |
| 838 |
} catch (RemoteException e) { |
| 839 |
throw new ImsException("getConfigString()", e, |
| 840 |
ImsReasonInfo.CODE_LOCAL_SERVICE_UNAVAILABLE); |
| 841 |
} |
| 842 |
if (DBG) Rlog.d(TAG, "getConfigString(): item = " + item + ", ret =" + ret); |
| 843 |
|
| 844 |
return ret; |
| 845 |
} |
| 846 |
|
| 847 |
|
| 848 |
|
| 849 |
|
| 850 |
public int setProvisionedValue(int item, int value) throws ImsException { |
| 851 |
return setConfig(item, value); |
| 852 |
} |
| 853 |
|
| 854 |
|
| 855 |
|
| 856 |
|
| 857 |
public int setProvisionedStringValue(int item, String value) throws ImsException { |
| 858 |
return setConfig(item, value); |
| 859 |
} |
| 860 |
|
| 861 |
|
| 862 |
|
| 863 |
|
| 864 |
|
| 865 |
|
| 866 |
|
| 867 |
|
| 868 |
|
| 869 |
|
| 870 |
public int setConfig(int item, int value) throws ImsException { |
| 871 |
int ret = OperationStatusConstants.UNKNOWN; |
| 872 |
if (DBG) { |
| 873 |
Rlog.d(TAG, "setConfig(): item = " + item + |
| 874 |
"value = " + value); |
| 875 |
} |
| 876 |
try { |
| 877 |
ret = miConfig.setConfigInt(item, value); |
| 878 |
} catch (RemoteException e) { |
| 879 |
throw new ImsException("setConfig()", e, |
| 880 |
ImsReasonInfo.CODE_LOCAL_SERVICE_UNAVAILABLE); |
| 881 |
} |
| 882 |
if (DBG) { |
| 883 |
Rlog.d(TAG, "setConfig(): item = " + item + |
| 884 |
" value = " + value + " ret = " + ret); |
| 885 |
} |
| 886 |
|
| 887 |
return ret; |
| 888 |
|
| 889 |
} |
| 890 |
|
| 891 |
|
| 892 |
|
| 893 |
|
| 894 |
|
| 895 |
|
| 896 |
|
| 897 |
|
| 898 |
|
| 899 |
|
| 900 |
public int setConfig(int item, String value) throws ImsException { |
| 901 |
int ret = OperationStatusConstants.UNKNOWN; |
| 902 |
if (DBG) { |
| 903 |
Rlog.d(TAG, "setConfig(): item = " + item + |
| 904 |
"value = " + value); |
| 905 |
} |
| 906 |
try { |
| 907 |
ret = miConfig.setConfigString(item, value); |
| 908 |
} catch (RemoteException e) { |
| 909 |
throw new ImsException("setConfig()", e, |
| 910 |
ImsReasonInfo.CODE_LOCAL_SERVICE_UNAVAILABLE); |
| 911 |
} |
| 912 |
if (DBG) { |
| 913 |
Rlog.d(TAG, "setConfig(): item = " + item + |
| 914 |
" value = " + value + " ret = " + ret); |
| 915 |
} |
| 916 |
|
| 917 |
return ret; |
| 918 |
} |
| 919 |
|
| 920 |
|
| 921 |
|
| 922 |
|
| 923 |
|
| 924 |
|
| 925 |
|
| 926 |
|
| 927 |
public void addConfigCallback(ProvisioningManager.Callback callback) throws ImsException { |
| 928 |
callback.setExecutor(getThreadExecutor()); |
| 929 |
addConfigCallback(callback.getBinder()); |
| 930 |
} |
| 931 |
|
| 932 |
|
| 933 |
|
| 934 |
|
| 935 |
|
| 936 |
|
| 937 |
|
| 938 |
|
| 939 |
public void addConfigCallback(IImsConfigCallback callback) throws ImsException { |
| 940 |
if (DBG) Rlog.d(TAG, "addConfigCallback: " + callback); |
| 941 |
try { |
| 942 |
miConfig.addImsConfigCallback(callback); |
| 943 |
} catch (RemoteException e) { |
| 944 |
throw new ImsException("addConfigCallback()", e, |
| 945 |
ImsReasonInfo.CODE_LOCAL_SERVICE_UNAVAILABLE); |
| 946 |
} |
| 947 |
} |
| 948 |
|
| 949 |
|
| 950 |
|
| 951 |
|
| 952 |
public void removeConfigCallback(IImsConfigCallback callback) throws ImsException { |
| 953 |
if (DBG) Rlog.d(TAG, "removeConfigCallback: " + callback); |
| 954 |
try { |
| 955 |
miConfig.removeImsConfigCallback(callback); |
| 956 |
} catch (RemoteException e) { |
| 957 |
throw new ImsException("removeConfigCallback()", e, |
| 958 |
ImsReasonInfo.CODE_LOCAL_SERVICE_UNAVAILABLE); |
| 959 |
} |
| 960 |
} |
| 961 |
|
| 962 |
|
| 963 |
|
| 964 |
|
| 965 |
public boolean isBinderAlive() { |
| 966 |
return miConfig.asBinder().isBinderAlive(); |
| 967 |
} |
| 968 |
|
| 969 |
private Executor getThreadExecutor() { |
| 970 |
if (Looper.myLooper() == null) { |
| 971 |
Looper.prepare(); |
| 972 |
} |
| 973 |
return new HandlerExecutor(new Handler(Looper.myLooper())); |
| 974 |
} |
| 975 |
} |