已开启
fix no notification #2035
liuqian创建于 3 天前
fix no notification #2035
已开启
共 3 个文件变更+4-2
| @@ -696,8 +696,7 @@ export default class BluetoothReceiveUIAbility extends UIAbility { | |||
| 696 | this.fileFd = -1; | 696 | this.fileFd = -1; |
| 697 | } | 697 | } |
| 698 | if (this.successCount == 0) { | 698 | if (this.successCount == 0) { |
| 699 | - console.info(TAG, 'no success file, terminate it.'); | 699 | + console.info(TAG, 'no success file, cancelSendProgressNotification.'); |
| 700 | - this.handleTerminate(); | ||
| 701 | } | 700 | } |
| 702 | } | 701 | } |
| 703 | 702 | ||
| @@ -128,10 +128,12 @@ int32_t BluetoothOppProxy::SetLastReceivedFileUri(const std::string &uri) | |||
| 128 | 128 | ||
| 129 | auto remote = Remote(); | 129 | auto remote = Remote(); |
| 130 | CHECK_AND_RETURN_LOG_RET((remote != nullptr), BT_ERR_INTERNAL_ERROR, "get remote fail"); | 130 | CHECK_AND_RETURN_LOG_RET((remote != nullptr), BT_ERR_INTERNAL_ERROR, "get remote fail"); |
| 131 | + HILOGI("setLastReceivedFileUri proxy send code"); | ||
| 131 | int error = remote->SendRequest( | 132 | int error = remote->SendRequest( |
| 132 | static_cast<uint32_t>(BluetoothOppInterfaceCode::COMMAND_SET_LAST_RECEIVED_URI), data, reply, option); | 133 | static_cast<uint32_t>(BluetoothOppInterfaceCode::COMMAND_SET_LAST_RECEIVED_URI), data, reply, option); |
| 133 | CHECK_AND_RETURN_LOG_RET((error == BT_NO_ERROR), BT_ERR_INTERNAL_ERROR, "error: %{public}d", error); | 134 | CHECK_AND_RETURN_LOG_RET((error == BT_NO_ERROR), BT_ERR_INTERNAL_ERROR, "error: %{public}d", error); |
| 134 | int32_t ret = reply.ReadInt32(); | 135 | int32_t ret = reply.ReadInt32(); |
| 136 | + HILOGI("setLastReceivedFileUri proxy get reply"); | ||
| 135 | CHECK_AND_RETURN_LOG_RET((ret == BT_NO_ERROR), ret, "reply errCode: %{public}d", ret); | 137 | CHECK_AND_RETURN_LOG_RET((ret == BT_NO_ERROR), ret, "reply errCode: %{public}d", ret); |
| 136 | return BT_NO_ERROR; | 138 | return BT_NO_ERROR; |
| 137 | } | 139 | } |
| @@ -248,6 +248,7 @@ napi_value NapiBluetoothOpp::SetLastReceivedFileUri(napi_env env, napi_callback_ | |||
| 248 | }; | 248 | }; |
| 249 | auto asyncWork = CREATE_ASYNC_WORK_WITH_CONTEXT(env, info, func, ASYNC_WORK_NO_NEED_CALLBACK); | 249 | auto asyncWork = CREATE_ASYNC_WORK_WITH_CONTEXT(env, info, func, ASYNC_WORK_NO_NEED_CALLBACK); |
| 250 | NAPI_BT_ASSERT_RETURN_UNDEF(env, asyncWork, BT_ERR_INTERNAL_ERROR); | 250 | NAPI_BT_ASSERT_RETURN_UNDEF(env, asyncWork, BT_ERR_INTERNAL_ERROR); |
| 251 | + HILOGI("setLastReceivedFileUri napi run"); | ||
| 251 | asyncWork->Run(); | 252 | asyncWork->Run(); |
| 252 | return asyncWork->GetRet(); | 253 | return asyncWork->GetRet(); |
| 253 | } | 254 | } |