fix error code.

Signed-off-by: dingxiaochen <dingxiaochen@huawei.com>
This commit is contained in:
dingxiaochen 2023-03-11 11:06:20 +08:00
parent 643da0ec82
commit 1cc3f6cc84
3 changed files with 2 additions and 8 deletions

View File

@ -297,7 +297,6 @@ declare namespace radio {
* @throws {BusinessError} 8300001 - Invalid parameter value.
* @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
* @throws {BusinessError} 8300003 - System internal error.
* @throws {BusinessError} 8300004 - Do not have sim card.
* @throws {BusinessError} 8300999 - Unknown error code.
* @since 7
*/

View File

@ -55,7 +55,6 @@ declare namespace sim {
* @throws {BusinessError} 8300001 - Invalid parameter value.
* @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
* @throws {BusinessError} 8300003 - System internal error.
* @throws {BusinessError} 8300004 - Do not have sim card.
* @throws {BusinessError} 8300999 - Unknown error code.
* @since 7
*/
@ -135,7 +134,6 @@ declare namespace sim {
* @throws {BusinessError} 8300001 - Invalid parameter value.
* @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
* @throws {BusinessError} 8300003 - System internal error.
* @throws {BusinessError} 8300004 - Do not have sim card.
* @throws {BusinessError} 8300999 - Unknown error code.
*/
function getSimState(slotId: number, callback: AsyncCallback<SimState>): void;
@ -326,7 +324,6 @@ declare namespace sim {
* @throws {BusinessError} 8300001 - Invalid parameter value.
* @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
* @throws {BusinessError} 8300003 - System internal error.
* @throws {BusinessError} 8300004 - Do not have sim card.
* @throws {BusinessError} 8300999 - Unknown error code.
* @since 7
*/
@ -523,7 +520,6 @@ declare namespace sim {
* @throws {BusinessError} 8300001 - Invalid parameter value.
* @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
* @throws {BusinessError} 8300003 - System internal error.
* @throws {BusinessError} 8300004 - Do not have sim card.
* @throws {BusinessError} 8300999 - Unknown error code.
* @systemapi Hide this for inner system use.
* @since 8
@ -913,7 +909,6 @@ declare namespace sim {
* @throws {BusinessError} 8300001 - Invalid parameter value.
* @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
* @throws {BusinessError} 8300003 - System internal error.
* @throws {BusinessError} 8300004 - Do not have sim card.
* @throws {BusinessError} 8300999 - Unknown error code.
* @since 9
*/
@ -932,7 +927,6 @@ declare namespace sim {
* @throws {BusinessError} 8300001 - Invalid parameter value.
* @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
* @throws {BusinessError} 8300003 - System internal error.
* @throws {BusinessError} 8300004 - Do not have sim card.
* @throws {BusinessError} 8300999 - Unknown error code.
* @since 9
*/

View File

@ -167,7 +167,8 @@ int32_t SimManager::GetSimState(int32_t slotId, SimState &simState)
{
if (!HasSimCardInner(slotId)) {
TELEPHONY_LOGE("GetSimState has no sim card!");
return TELEPHONY_ERR_NO_SIM_CARD;
simState = SimState::SIM_STATE_NOT_PRESENT;
return TELEPHONY_ERR_SUCCESS;
}
simState = simStateManager_[slotId]->GetSimState();
return TELEPHONY_ERR_SUCCESS;