From 0df17c070ef591ba37e023acf815fab6b6a7d3c5 Mon Sep 17 00:00:00 2001 From: wangyb0625 Date: Mon, 14 Mar 2022 18:11:56 +0800 Subject: [PATCH] =?UTF-8?q?=E5=86=85=E6=BA=90=E9=97=AE=E9=A2=98=E5=8D=95?= =?UTF-8?q?=E6=B8=85=E7=90=86-=E5=A2=9E=E5=8A=A0=E8=AE=B8=E5=8F=AF?= =?UTF-8?q?=E5=8F=8A1-18?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wangyb0625 --- common/include/dialog_ui/js/pages/index/index.hml | 14 ++++++++++++++ common/include/dialog_ui/js/pages/index/index.js | 14 ++++++++++++++ .../dialog_ui/js/common/KeyBoard.js | 13 +++++++++++++ ext/input_pin_dialog/dialog_ui/js/common/index.hml | 14 ++++++++++++++ .../dialog_ui/js/pages/index/index.hml | 14 ++++++++++++++ .../include/ability/dm_ability_manager.h | 2 +- .../src/ability/lite/dm_ability_manager.cpp | 2 +- .../src/ability/standard/dm_ability_manager.cpp | 4 ++-- ext/mini/utils/src/log/dm_log.cpp | 8 ++++++-- ext/pin_auth/include/ability/dm_ability_manager.h | 2 +- .../src/ability/lite/dm_ability_manager.cpp | 2 +- .../src/ability/standard/dm_ability_manager.cpp | 4 ++-- .../dialog_ui/js/pages/index/index.css | 14 ++++++++++++++ .../dialog_ui/js/pages/index/index.hml | 14 ++++++++++++++ .../dialog_ui/js/pages/index/index.js | 14 ++++++++++++++ 15 files changed, 125 insertions(+), 10 deletions(-) diff --git a/common/include/dialog_ui/js/pages/index/index.hml b/common/include/dialog_ui/js/pages/index/index.hml index 4a689e272..97f3919b3 100644 --- a/common/include/dialog_ui/js/pages/index/index.hml +++ b/common/include/dialog_ui/js/pages/index/index.hml @@ -1,3 +1,17 @@ +
是否允许对端连接本机 diff --git a/common/include/dialog_ui/js/pages/index/index.js b/common/include/dialog_ui/js/pages/index/index.js index f579f6a3e..608ed2733 100644 --- a/common/include/dialog_ui/js/pages/index/index.js +++ b/common/include/dialog_ui/js/pages/index/index.js @@ -1,3 +1,17 @@ +/* + Copyright (c) 2022 Huawei Device Co., Ltd. + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ import router from '@ohos.router' var timel = null; diff --git a/ext/input_pin_dialog/dialog_ui/js/common/KeyBoard.js b/ext/input_pin_dialog/dialog_ui/js/common/KeyBoard.js index c3234a50d..676f36c9d 100644 --- a/ext/input_pin_dialog/dialog_ui/js/common/KeyBoard.js +++ b/ext/input_pin_dialog/dialog_ui/js/common/KeyBoard.js @@ -1,4 +1,17 @@ +/* + Copyright (c) 2022 Huawei Device Co., Ltd. + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ ;(function(exports){ var KeyBoard = function(input, options){ var body = document.getElementsByTagName('body')[0]; diff --git a/ext/input_pin_dialog/dialog_ui/js/common/index.hml b/ext/input_pin_dialog/dialog_ui/js/common/index.hml index 3566d9ba2..f4b38f399 100644 --- a/ext/input_pin_dialog/dialog_ui/js/common/index.hml +++ b/ext/input_pin_dialog/dialog_ui/js/common/index.hml @@ -1,3 +1,17 @@ +
PIN码连接 diff --git a/ext/input_pin_dialog/dialog_ui/js/pages/index/index.hml b/ext/input_pin_dialog/dialog_ui/js/pages/index/index.hml index 84f217637..bac718548 100644 --- a/ext/input_pin_dialog/dialog_ui/js/pages/index/index.hml +++ b/ext/input_pin_dialog/dialog_ui/js/pages/index/index.hml @@ -1,3 +1,17 @@ +
PIN码连接 diff --git a/ext/mini/services/devicemanagerservice/include/ability/dm_ability_manager.h b/ext/mini/services/devicemanagerservice/include/ability/dm_ability_manager.h index 17a9337d5..f0572b11a 100644 --- a/ext/mini/services/devicemanagerservice/include/ability/dm_ability_manager.h +++ b/ext/mini/services/devicemanagerservice/include/ability/dm_ability_manager.h @@ -53,7 +53,7 @@ public: void StartAbilityDone(); private: - void waitForTimeout(uint32_t timeout_s); + void WaitForTimeout(uint32_t timeout_s); private: sem_t mSem_; diff --git a/ext/mini/services/devicemanagerservice/src/ability/lite/dm_ability_manager.cpp b/ext/mini/services/devicemanagerservice/src/ability/lite/dm_ability_manager.cpp index b6f9025e6..b6ea8caee 100644 --- a/ext/mini/services/devicemanagerservice/src/ability/lite/dm_ability_manager.cpp +++ b/ext/mini/services/devicemanagerservice/src/ability/lite/dm_ability_manager.cpp @@ -37,7 +37,7 @@ AbilityStatus DmAbilityManager::StartAbility(AbilityRole role) return mStatus_; } -void DmAbilityManager::waitForTimeout(uint32_t timeout_s) +void DmAbilityManager::WaitForTimeout(uint32_t timeout_s) { struct timespec ts; clock_gettime(CLOCK_REALTIME, &ts); diff --git a/ext/mini/services/devicemanagerservice/src/ability/standard/dm_ability_manager.cpp b/ext/mini/services/devicemanagerservice/src/ability/standard/dm_ability_manager.cpp index 69143cada..d0a6d9af6 100644 --- a/ext/mini/services/devicemanagerservice/src/ability/standard/dm_ability_manager.cpp +++ b/ext/mini/services/devicemanagerservice/src/ability/standard/dm_ability_manager.cpp @@ -76,11 +76,11 @@ AbilityStatus DmAbilityManager::StartAbility(AbilityRole role) mStatus_ = AbilityStatus::ABILITY_STATUS_FAILED; return mStatus_; } - waitForTimeout(ABILITY_START_TIMEOUT); + WaitForTimeout(ABILITY_START_TIMEOUT); return mStatus_; } -void DmAbilityManager::waitForTimeout(uint32_t timeout_s) +void DmAbilityManager::WaitForTimeout(uint32_t timeout_s) { struct timespec ts; clock_gettime(CLOCK_REALTIME, &ts); diff --git a/ext/mini/utils/src/log/dm_log.cpp b/ext/mini/utils/src/log/dm_log.cpp index 538594b15..88c546f92 100644 --- a/ext/mini/utils/src/log/dm_log.cpp +++ b/ext/mini/utils/src/log/dm_log.cpp @@ -73,9 +73,13 @@ void DMLog(DMLogLevel logLevel, const char *fmt, ...) { char logBuf[LOG_MAX_LEN] = {0}; va_list arg; - int32_t ret = 0; - (void)memset_s(&arg, sizeof(va_list), 0, sizeof(va_list)); + int32_t ret = vsprintf_s(logBuf, sizeof(logBuf), fmt, arg); + if (ret != 0) { + DMLogOut(logLevel, "DM log memset_s error."); + return; + } + va_start(arg, fmt); ret = vsprintf_s(logBuf, sizeof(logBuf), fmt, arg); va_end(arg); diff --git a/ext/pin_auth/include/ability/dm_ability_manager.h b/ext/pin_auth/include/ability/dm_ability_manager.h index 225fefc62..8da9965b3 100644 --- a/ext/pin_auth/include/ability/dm_ability_manager.h +++ b/ext/pin_auth/include/ability/dm_ability_manager.h @@ -43,7 +43,7 @@ public: void StartAbilityDone(); private: - void waitForTimeout(uint32_t timeout_s); + void WaitForTimeout(uint32_t timeout_s); private: sem_t mSem_; diff --git a/ext/pin_auth/src/ability/lite/dm_ability_manager.cpp b/ext/pin_auth/src/ability/lite/dm_ability_manager.cpp index d58403aee..6fab485c8 100644 --- a/ext/pin_auth/src/ability/lite/dm_ability_manager.cpp +++ b/ext/pin_auth/src/ability/lite/dm_ability_manager.cpp @@ -30,7 +30,7 @@ AbilityStatus DmAbilityManager::StartAbility(AbilityRole role) return mStatus_; } -void DmAbilityManager::waitForTimeout(uint32_t timeout_s) +void DmAbilityManager::WaitForTimeout(uint32_t timeout_s) { struct timespec ts; clock_gettime(CLOCK_REALTIME, &ts); diff --git a/ext/pin_auth/src/ability/standard/dm_ability_manager.cpp b/ext/pin_auth/src/ability/standard/dm_ability_manager.cpp index 09d720314..58be7e50e 100644 --- a/ext/pin_auth/src/ability/standard/dm_ability_manager.cpp +++ b/ext/pin_auth/src/ability/standard/dm_ability_manager.cpp @@ -53,11 +53,11 @@ AbilityStatus DmAbilityManager::StartAbility(AbilityRole role) mStatus_ = ABILITY_STATUS_FAILED; return mStatus_; } - waitForTimeout(ABILITY_START_TIMEOUT); + WaitForTimeout(ABILITY_START_TIMEOUT); return mStatus_; } -void DmAbilityManager::waitForTimeout(uint32_t timeout_s) +void DmAbilityManager::WaitForTimeout(uint32_t timeout_s) { struct timespec ts; clock_gettime(CLOCK_REALTIME, &ts); diff --git a/ext/show_pin_dialog/dialog_ui/js/pages/index/index.css b/ext/show_pin_dialog/dialog_ui/js/pages/index/index.css index ad2c2c416..36ae7bfc3 100644 --- a/ext/show_pin_dialog/dialog_ui/js/pages/index/index.css +++ b/ext/show_pin_dialog/dialog_ui/js/pages/index/index.css @@ -1,3 +1,17 @@ +/* + Copyright (c) 2022 Huawei Device Co., Ltd. + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ .container { flex-direction: column; justify-content: center; diff --git a/ext/show_pin_dialog/dialog_ui/js/pages/index/index.hml b/ext/show_pin_dialog/dialog_ui/js/pages/index/index.hml index 9cb650aef..25e56edb0 100644 --- a/ext/show_pin_dialog/dialog_ui/js/pages/index/index.hml +++ b/ext/show_pin_dialog/dialog_ui/js/pages/index/index.hml @@ -1,3 +1,17 @@ +
PIN码连接 diff --git a/ext/show_pin_dialog/dialog_ui/js/pages/index/index.js b/ext/show_pin_dialog/dialog_ui/js/pages/index/index.js index 3a55ac1cc..f61a54b7b 100644 --- a/ext/show_pin_dialog/dialog_ui/js/pages/index/index.js +++ b/ext/show_pin_dialog/dialog_ui/js/pages/index/index.js @@ -1,3 +1,17 @@ +/* + Copyright (c) 2022 Huawei Device Co., Ltd. + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ import router from '@ohos.router' export default { -- Gitee