diff options
author | Eric Schwarzenbach | 2018-03-14 18:22:38 -0500 |
---|---|---|
committer | Eric Schwarzenbach | 2018-03-30 17:57:24 -0500 |
commit | b004dbc19fdd9c92d19d329f5df453e90ee88e11 (patch) | |
tree | 9a0224e50cf69ce033f2344fca62beb6d97093aa | |
parent | 8a7e77e7b953973e31df86a1f6eaf50d35aee65b (diff) | |
download | platform-hardware-interfaces-b004dbc19fdd9c92d19d329f5df453e90ee88e11.tar.gz platform-hardware-interfaces-b004dbc19fdd9c92d19d329f5df453e90ee88e11.tar.xz platform-hardware-interfaces-b004dbc19fdd9c92d19d329f5df453e90ee88e11.zip |
Update RegState for new CellIdentity types
Bug: 74826109
Test: make, make vts
Change-Id: I6350e5da5bc064e665e54d161ee589c3eadf901a
Merged-In: I6350e5da5bc064e665e54d161ee589c3eadf901a
(cherry picked from commit 74befb69b9c532e5be77a1a64eb38713b8d51118)
-rw-r--r-- | radio/1.2/Android.bp | 3 | ||||
-rw-r--r-- | radio/1.2/IRadioResponse.hal | 27 | ||||
-rw-r--r-- | radio/1.2/types.hal | 127 | ||||
-rw-r--r-- | radio/1.2/vts/functional/radio_hidl_hal_api.cpp | 37 | ||||
-rw-r--r-- | radio/1.2/vts/functional/radio_hidl_hal_utils_v1_2.h | 6 | ||||
-rw-r--r-- | radio/1.2/vts/functional/radio_response.cpp | 12 |
6 files changed, 211 insertions, 1 deletions
diff --git a/radio/1.2/Android.bp b/radio/1.2/Android.bp index a9c80b7f..c90a03c3 100644 --- a/radio/1.2/Android.bp +++ b/radio/1.2/Android.bp | |||
@@ -24,6 +24,7 @@ hidl_interface { | |||
24 | "Call", | 24 | "Call", |
25 | "CardStatus", | 25 | "CardStatus", |
26 | "CellConnectionStatus", | 26 | "CellConnectionStatus", |
27 | "CellIdentity", | ||
27 | "CellIdentityCdma", | 28 | "CellIdentityCdma", |
28 | "CellIdentityGsm", | 29 | "CellIdentityGsm", |
29 | "CellIdentityLte", | 30 | "CellIdentityLte", |
@@ -36,6 +37,7 @@ hidl_interface { | |||
36 | "CellInfoLte", | 37 | "CellInfoLte", |
37 | "CellInfoTdscdma", | 38 | "CellInfoTdscdma", |
38 | "CellInfoWcdma", | 39 | "CellInfoWcdma", |
40 | "DataRegStateResult", | ||
39 | "DataRequestReason", | 41 | "DataRequestReason", |
40 | "IncrementalResultsPeriodicityRange", | 42 | "IncrementalResultsPeriodicityRange", |
41 | "IndicationFilter", | 43 | "IndicationFilter", |
@@ -48,6 +50,7 @@ hidl_interface { | |||
48 | "ScanIntervalRange", | 50 | "ScanIntervalRange", |
49 | "SignalStrength", | 51 | "SignalStrength", |
50 | "TdscdmaSignalStrength", | 52 | "TdscdmaSignalStrength", |
53 | "VoiceRegStateResult", | ||
51 | "WcdmaSignalStrength", | 54 | "WcdmaSignalStrength", |
52 | ], | 55 | ], |
53 | gen_java: true, | 56 | gen_java: true, |
diff --git a/radio/1.2/IRadioResponse.hal b/radio/1.2/IRadioResponse.hal index f26c9ecc..300aa372 100644 --- a/radio/1.2/IRadioResponse.hal +++ b/radio/1.2/IRadioResponse.hal | |||
@@ -98,4 +98,31 @@ interface IRadioResponse extends @1.1::IRadioResponse { | |||
98 | * RadioError:INTERNAL_ERR | 98 | * RadioError:INTERNAL_ERR |
99 | */ | 99 | */ |
100 | oneway getSignalStrengthResponse_1_2(RadioResponseInfo info, SignalStrength signalStrength); | 100 | oneway getSignalStrengthResponse_1_2(RadioResponseInfo info, SignalStrength signalStrength); |
101 | |||
102 | /** | ||
103 | * @param info Response info struct containing response type, serial no. and error | ||
104 | * @param voiceRegResponse Current Voice registration response as defined by VoiceRegStateResult | ||
105 | * in types.hal | ||
106 | * | ||
107 | * Valid errors returned: | ||
108 | * RadioError:NONE | ||
109 | * RadioError:RADIO_NOT_AVAILABLE | ||
110 | * RadioError:INTERNAL_ERR | ||
111 | */ | ||
112 | oneway getVoiceRegistrationStateResponse_1_2(RadioResponseInfo info, | ||
113 | VoiceRegStateResult voiceRegResponse); | ||
114 | |||
115 | /** | ||
116 | * @param info Response info struct containing response type, serial no. and error | ||
117 | * @param dataRegResponse Current Data registration response as defined by DataRegStateResult in | ||
118 | * types.hal | ||
119 | * | ||
120 | * Valid errors returned: | ||
121 | * RadioError:NONE | ||
122 | * RadioError:RADIO_NOT_AVAILABLE | ||
123 | * RadioError:INTERNAL_ERR | ||
124 | * RadioError:NOT_PROVISIONED | ||
125 | */ | ||
126 | oneway getDataRegistrationStateResponse_1_2(RadioResponseInfo info, | ||
127 | DataRegStateResult dataRegResponse); | ||
101 | }; | 128 | }; |
diff --git a/radio/1.2/types.hal b/radio/1.2/types.hal index b68895e1..ac2f7534 100644 --- a/radio/1.2/types.hal +++ b/radio/1.2/types.hal | |||
@@ -32,6 +32,7 @@ import @1.0::GsmSignalStrength; | |||
32 | import @1.0::LteSignalStrength; | 32 | import @1.0::LteSignalStrength; |
33 | import @1.0::RadioConst; | 33 | import @1.0::RadioConst; |
34 | import @1.0::RadioError; | 34 | import @1.0::RadioError; |
35 | import @1.0::RegState; | ||
35 | import @1.0::SignalStrength; | 36 | import @1.0::SignalStrength; |
36 | import @1.0::TdScdmaSignalStrength; | 37 | import @1.0::TdScdmaSignalStrength; |
37 | import @1.0::TimeStampType; | 38 | import @1.0::TimeStampType; |
@@ -462,3 +463,129 @@ struct SignalStrength { | |||
462 | TdScdmaSignalStrength tdScdma; | 463 | TdScdmaSignalStrength tdScdma; |
463 | WcdmaSignalStrength wcdma; | 464 | WcdmaSignalStrength wcdma; |
464 | }; | 465 | }; |
466 | |||
467 | struct CellIdentity { | ||
468 | /** | ||
469 | * Cell type for selecting from union CellInfo. | ||
470 | * Only one of the below vectors must be of size 1 based on a | ||
471 | * valid CellInfoType and others must be of size 0. | ||
472 | * If cell info type is NONE, then all the vectors must be of size 0. | ||
473 | */ | ||
474 | CellInfoType cellInfoType; | ||
475 | vec<CellIdentityGsm> cellIdentityGsm; | ||
476 | vec<CellIdentityWcdma> cellIdentityWcdma; | ||
477 | vec<CellIdentityCdma> cellIdentityCdma; | ||
478 | vec<CellIdentityLte> cellIdentityLte; | ||
479 | vec<CellIdentityTdscdma> cellIdentityTdscdma; | ||
480 | }; | ||
481 | |||
482 | struct VoiceRegStateResult { | ||
483 | /** | ||
484 | * Valid reg states are NOT_REG_MT_NOT_SEARCHING_OP, | ||
485 | * REG_HOME, NOT_REG_MT_SEARCHING_OP, REG_DENIED, | ||
486 | * UNKNOWN, REG_ROAMING defined in RegState | ||
487 | */ | ||
488 | RegState regState; | ||
489 | /** | ||
490 | * Indicates the available voice radio technology, valid values as | ||
491 | * defined by RadioTechnology. | ||
492 | */ | ||
493 | int32_t rat; | ||
494 | /** | ||
495 | * concurrent services support indicator. if registered on a CDMA system. | ||
496 | * false - Concurrent services not supported, | ||
497 | * true - Concurrent services supported | ||
498 | */ | ||
499 | bool cssSupported; | ||
500 | /** | ||
501 | * TSB-58 Roaming Indicator if registered on a CDMA or EVDO system or -1 if not. | ||
502 | * Valid values are 0-255. | ||
503 | */ | ||
504 | int32_t roamingIndicator; | ||
505 | /** | ||
506 | * Indicates whether the current system is in the PRL if registered on a CDMA or EVDO system | ||
507 | * or -1 if not. 0=not in the PRL, 1=in the PRL | ||
508 | */ | ||
509 | int32_t systemIsInPrl; | ||
510 | /** | ||
511 | * Default Roaming Indicator from the PRL if registered on a CDMA or EVDO system or -1 if not. | ||
512 | * Valid values are 0-255. | ||
513 | */ | ||
514 | int32_t defaultRoamingIndicator; | ||
515 | /** | ||
516 | * reasonForDenial if registration state is 3 | ||
517 | * (Registration denied) this is an enumerated reason why | ||
518 | * registration was denied. See 3GPP TS 24.008, | ||
519 | * 10.5.3.6 and Annex G. | ||
520 | * 0 - General | ||
521 | * 1 - Authentication Failure | ||
522 | * 2 - IMSI unknown in HLR | ||
523 | * 3 - Illegal MS | ||
524 | * 4 - Illegal ME | ||
525 | * 5 - PLMN not allowed | ||
526 | * 6 - Location area not allowed | ||
527 | * 7 - Roaming not allowed | ||
528 | * 8 - No Suitable Cells in this Location Area | ||
529 | * 9 - Network failure | ||
530 | * 10 - Persistent location update reject | ||
531 | * 11 - PLMN not allowed | ||
532 | * 12 - Location area not allowed | ||
533 | * 13 - Roaming not allowed in this Location Area | ||
534 | * 15 - No Suitable Cells in this Location Area | ||
535 | * 17 - Network Failure | ||
536 | * 20 - MAC Failure | ||
537 | * 21 - Sync Failure | ||
538 | * 22 - Congestion | ||
539 | * 23 - GSM Authentication unacceptable | ||
540 | * 25 - Not Authorized for this CSG | ||
541 | * 32 - Service option not supported | ||
542 | * 33 - Requested service option not subscribed | ||
543 | * 34 - Service option temporarily out of order | ||
544 | * 38 - Call cannot be identified | ||
545 | * 48-63 - Retry upon entry into a new cell | ||
546 | * 95 - Semantically incorrect message | ||
547 | * 96 - Invalid mandatory information | ||
548 | * 97 - Message type non-existent or not implemented | ||
549 | * 98 - Message type not compatible with protocol state | ||
550 | * 99 - Information element non-existent or not implemented | ||
551 | * 100 - Conditional IE error | ||
552 | * 101 - Message not compatible with protocol state | ||
553 | * 111 - Protocol error, unspecified | ||
554 | */ | ||
555 | int32_t reasonForDenial; | ||
556 | |||
557 | CellIdentity cellIdentity; | ||
558 | }; | ||
559 | |||
560 | struct DataRegStateResult { | ||
561 | /** | ||
562 | * Valid reg states are NOT_REG_MT_NOT_SEARCHING_OP, | ||
563 | * REG_HOME, NOT_REG_MT_SEARCHING_OP, REG_DENIED, | ||
564 | * UNKNOWN, REG_ROAMING defined in RegState | ||
565 | */ | ||
566 | RegState regState; | ||
567 | /** | ||
568 | * Indicates the available data radio technology, | ||
569 | * valid values as defined by RadioTechnology. | ||
570 | */ | ||
571 | int32_t rat; | ||
572 | /** | ||
573 | * If registration state is 3 (Registration | ||
574 | * denied) this is an enumerated reason why | ||
575 | * registration was denied. See 3GPP TS 24.008, | ||
576 | * Annex G.6 "Additional cause codes for GMM". | ||
577 | * 7 == GPRS services not allowed | ||
578 | * 8 == GPRS services and non-GPRS services not allowed | ||
579 | * 9 == MS identity cannot be derived by the network | ||
580 | * 10 == Implicitly detached | ||
581 | * 14 == GPRS services not allowed in this PLMN | ||
582 | * 16 == MSC temporarily not reachable | ||
583 | * 40 == No PDP context activated | ||
584 | */ | ||
585 | int32_t reasonDataDenied; | ||
586 | /** | ||
587 | * The maximum number of simultaneous Data Calls must be established using setupDataCall(). | ||
588 | */ | ||
589 | int32_t maxDataCalls; | ||
590 | CellIdentity cellIdentity; | ||
591 | }; | ||
diff --git a/radio/1.2/vts/functional/radio_hidl_hal_api.cpp b/radio/1.2/vts/functional/radio_hidl_hal_api.cpp index 34a87e13..ee130f85 100644 --- a/radio/1.2/vts/functional/radio_hidl_hal_api.cpp +++ b/radio/1.2/vts/functional/radio_hidl_hal_api.cpp | |||
@@ -673,3 +673,40 @@ TEST_F(RadioHidlTest_v1_2, getCellInfoList_1_2) { | |||
673 | ASSERT_TRUE(CheckAnyOfErrors(radioRsp_v1_2->rspInfo.error, | 673 | ASSERT_TRUE(CheckAnyOfErrors(radioRsp_v1_2->rspInfo.error, |
674 | {RadioError::NONE, RadioError::NO_NETWORK_FOUND})); | 674 | {RadioError::NONE, RadioError::NO_NETWORK_FOUND})); |
675 | } | 675 | } |
676 | |||
677 | /* | ||
678 | * Test IRadio.getVoiceRegistrationState() for the response returned. | ||
679 | */ | ||
680 | TEST_F(RadioHidlTest_v1_2, getVoiceRegistrationState) { | ||
681 | int serial = GetRandomSerialNumber(); | ||
682 | |||
683 | Return<void> res = radio_v1_2->getVoiceRegistrationState(serial); | ||
684 | ASSERT_OK(res); | ||
685 | EXPECT_EQ(std::cv_status::no_timeout, wait()); | ||
686 | EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_v1_2->rspInfo.type); | ||
687 | EXPECT_EQ(serial, radioRsp_v1_2->rspInfo.serial); | ||
688 | |||
689 | ALOGI("getVoiceRegistrationStateResponse_1_2, rspInfo.error = %s\n", | ||
690 | toString(radioRsp_v1_2->rspInfo.error).c_str()); | ||
691 | ASSERT_TRUE(CheckAnyOfErrors(radioRsp_v1_2->rspInfo.error, | ||
692 | {RadioError::NONE, RadioError::RADIO_NOT_AVAILABLE})); | ||
693 | } | ||
694 | |||
695 | /* | ||
696 | * Test IRadio.getDataRegistrationState() for the response returned. | ||
697 | */ | ||
698 | TEST_F(RadioHidlTest_v1_2, getDataRegistrationState) { | ||
699 | int serial = GetRandomSerialNumber(); | ||
700 | |||
701 | Return<void> res = radio_v1_2->getDataRegistrationState(serial); | ||
702 | ASSERT_OK(res); | ||
703 | EXPECT_EQ(std::cv_status::no_timeout, wait()); | ||
704 | EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_v1_2->rspInfo.type); | ||
705 | EXPECT_EQ(serial, radioRsp_v1_2->rspInfo.serial); | ||
706 | |||
707 | ALOGI("getVoiceRegistrationStateResponse_1_2, rspInfo.error = %s\n", | ||
708 | toString(radioRsp_v1_2->rspInfo.error).c_str()); | ||
709 | ASSERT_TRUE(CheckAnyOfErrors( | ||
710 | radioRsp_v1_2->rspInfo.error, | ||
711 | {RadioError::NONE, RadioError::RADIO_NOT_AVAILABLE, RadioError::NOT_PROVISIONED})); | ||
712 | } | ||
diff --git a/radio/1.2/vts/functional/radio_hidl_hal_utils_v1_2.h b/radio/1.2/vts/functional/radio_hidl_hal_utils_v1_2.h index 45fbd044..ce46878a 100644 --- a/radio/1.2/vts/functional/radio_hidl_hal_utils_v1_2.h +++ b/radio/1.2/vts/functional/radio_hidl_hal_utils_v1_2.h | |||
@@ -416,6 +416,12 @@ class RadioResponse_v1_2 : public V1_1::IRadioResponse { | |||
416 | 416 | ||
417 | Return<void> getCellInfoListResponse_1_2( | 417 | Return<void> getCellInfoListResponse_1_2( |
418 | const RadioResponseInfo& info, const ::android::hardware::hidl_vec<CellInfo>& cellInfo); | 418 | const RadioResponseInfo& info, const ::android::hardware::hidl_vec<CellInfo>& cellInfo); |
419 | |||
420 | Return<void> getVoiceRegistrationStateResponse_1_2( | ||
421 | const RadioResponseInfo& info, const V1_2::VoiceRegStateResult& voiceRegResponse); | ||
422 | |||
423 | Return<void> getDataRegistrationStateResponse_1_2( | ||
424 | const RadioResponseInfo& info, const V1_2::DataRegStateResult& dataRegResponse); | ||
419 | }; | 425 | }; |
420 | 426 | ||
421 | /* Callback class for radio indication */ | 427 | /* Callback class for radio indication */ |
diff --git a/radio/1.2/vts/functional/radio_response.cpp b/radio/1.2/vts/functional/radio_response.cpp index d96f76b4..9195689c 100644 --- a/radio/1.2/vts/functional/radio_response.cpp +++ b/radio/1.2/vts/functional/radio_response.cpp | |||
@@ -731,4 +731,14 @@ Return<void> RadioResponse_v1_2::getCellInfoListResponse_1_2( | |||
731 | rspInfo = info; | 731 | rspInfo = info; |
732 | parent_v1_2.notify(); | 732 | parent_v1_2.notify(); |
733 | return Void(); | 733 | return Void(); |
734 | } \ No newline at end of file | 734 | } |
735 | |||
736 | Return<void> RadioResponse_v1_2::getVoiceRegistrationStateResponse_1_2( | ||
737 | const RadioResponseInfo& /*info*/, const V1_2::VoiceRegStateResult& /*voiceRegResponse*/) { | ||
738 | return Void(); | ||
739 | } | ||
740 | |||
741 | Return<void> RadioResponse_v1_2::getDataRegistrationStateResponse_1_2( | ||
742 | const RadioResponseInfo& /*info*/, const V1_2::DataRegStateResult& /*dataRegResponse*/) { | ||
743 | return Void(); | ||
744 | } | ||