From b433817db39ad4226d14e37375503905056d6993 Mon Sep 17 00:00:00 2001 From: logic42 Date: Wed, 16 Mar 2022 12:53:26 +0000 Subject: [PATCH] fixed 414ebfe from https://gitee.com/logic42/xts_acts/pulls/2545 licenses change Signed-off-by: logic42 --- multimodalinput/BUILD.gn | 2 +- multimodalinput/input_js_standard/BUILD.gn | 2 +- .../src/main/js/default/app.js | 2 +- .../src/main/js/default/pages/index/index.css | 15 +++++++++ .../src/main/js/default/pages/index/index.hml | 15 +++++++++ .../src/main/js/default/pages/index/index.js | 4 +-- .../js/default/test/InputConsumer.test.js | 2 +- .../main/js/default/test/InputDevice.test.js | 2 +- .../default/test/ListMultimodalinput.test.js | 2 +- .../src/main/js/default/pages/index/index.css | 15 +++++++++ .../src/main/js/default/pages/index/index.hml | 15 +++++++++ .../src/main/js/default/pages/index/index.css | 15 +++++++++ .../src/main/js/default/pages/index/index.hml | 15 +++++++++ .../src/main/js/default/pages/index/index.css | 15 +++++++++ .../src/main/js/default/pages/index/index.hml | 15 +++++++++ .../src/main/js/default/pages/index/index.css | 15 +++++++++ .../src/main/js/default/pages/index/index.hml | 15 +++++++++ .../src/main/js/default/pages/index/index.css | 15 +++++++++ .../src/main/js/default/pages/index/index.hml | 15 +++++++++ .../src/main/js/default/pages/index/index.css | 15 +++++++++ .../src/main/js/default/pages/index/index.hml | 15 +++++++++ .../test/SensorGeneralalgorithm.test.js | 4 +-- .../js/default/test/SensorOnOffTest.test.js | 31 +++++++++---------- 23 files changed, 235 insertions(+), 26 deletions(-) diff --git a/multimodalinput/BUILD.gn b/multimodalinput/BUILD.gn index e2b34ad1b..f82002374 100644 --- a/multimodalinput/BUILD.gn +++ b/multimodalinput/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (C) 2021 Huawei Device Co., Ltd. +# 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 diff --git a/multimodalinput/input_js_standard/BUILD.gn b/multimodalinput/input_js_standard/BUILD.gn index 9bbc8fafa..4faf8d207 100644 --- a/multimodalinput/input_js_standard/BUILD.gn +++ b/multimodalinput/input_js_standard/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (C) 2021 Huawei Device Co., Ltd. +# 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 diff --git a/multimodalinput/input_js_standard/src/main/js/default/app.js b/multimodalinput/input_js_standard/src/main/js/default/app.js index e423f4bce..830070d19 100644 --- a/multimodalinput/input_js_standard/src/main/js/default/app.js +++ b/multimodalinput/input_js_standard/src/main/js/default/app.js @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Huawei Device Co., Ltd. + * 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 diff --git a/multimodalinput/input_js_standard/src/main/js/default/pages/index/index.css b/multimodalinput/input_js_standard/src/main/js/default/pages/index/index.css index 6fda79275..72baaffca 100644 --- a/multimodalinput/input_js_standard/src/main/js/default/pages/index/index.css +++ b/multimodalinput/input_js_standard/src/main/js/default/pages/index/index.css @@ -1,3 +1,18 @@ +/* + * 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/multimodalinput/input_js_standard/src/main/js/default/pages/index/index.hml b/multimodalinput/input_js_standard/src/main/js/default/pages/index/index.hml index f64b040a5..8d0e2061b 100644 --- a/multimodalinput/input_js_standard/src/main/js/default/pages/index/index.hml +++ b/multimodalinput/input_js_standard/src/main/js/default/pages/index/index.hml @@ -1,3 +1,18 @@ + +
{{ $t('strings.hello') }} {{ title }} diff --git a/multimodalinput/input_js_standard/src/main/js/default/pages/index/index.js b/multimodalinput/input_js_standard/src/main/js/default/pages/index/index.js index 7b5fd53fb..8591303b6 100644 --- a/multimodalinput/input_js_standard/src/main/js/default/pages/index/index.js +++ b/multimodalinput/input_js_standard/src/main/js/default/pages/index/index.js @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Huawei Device Co., Ltd. + * 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 @@ -13,7 +13,7 @@ * limitations under the License. */ -import {Core, ExpectExtend} from 'deccjsunit/index' +import { Core, ExpectExtend } from 'deccjsunit/index' const injectRef = Object.getPrototypeOf(global) || global injectRef.regeneratorRuntime = require('@babel/runtime/regenerator') diff --git a/multimodalinput/input_js_standard/src/main/js/default/test/InputConsumer.test.js b/multimodalinput/input_js_standard/src/main/js/default/test/InputConsumer.test.js index 7a2b28274..ac9bcaaaf 100755 --- a/multimodalinput/input_js_standard/src/main/js/default/test/InputConsumer.test.js +++ b/multimodalinput/input_js_standard/src/main/js/default/test/InputConsumer.test.js @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Huawei Device Co., Ltd. + * 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 diff --git a/multimodalinput/input_js_standard/src/main/js/default/test/InputDevice.test.js b/multimodalinput/input_js_standard/src/main/js/default/test/InputDevice.test.js index 3f950e514..18c0ccc97 100644 --- a/multimodalinput/input_js_standard/src/main/js/default/test/InputDevice.test.js +++ b/multimodalinput/input_js_standard/src/main/js/default/test/InputDevice.test.js @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Huawei Device Co., Ltd. + * 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 diff --git a/multimodalinput/input_js_standard/src/main/js/default/test/ListMultimodalinput.test.js b/multimodalinput/input_js_standard/src/main/js/default/test/ListMultimodalinput.test.js index cdaebe0f8..2983feb48 100644 --- a/multimodalinput/input_js_standard/src/main/js/default/test/ListMultimodalinput.test.js +++ b/multimodalinput/input_js_standard/src/main/js/default/test/ListMultimodalinput.test.js @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Huawei Device Co., Ltd. + * 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 diff --git a/powermgr/powermgrbattery/src/main/js/default/pages/index/index.css b/powermgr/powermgrbattery/src/main/js/default/pages/index/index.css index 6fda79275..7300d2a1f 100755 --- a/powermgr/powermgrbattery/src/main/js/default/pages/index/index.css +++ b/powermgr/powermgrbattery/src/main/js/default/pages/index/index.css @@ -1,3 +1,18 @@ +/* + * Copyright (C) 2021 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/powermgr/powermgrbattery/src/main/js/default/pages/index/index.hml b/powermgr/powermgrbattery/src/main/js/default/pages/index/index.hml index f64b040a5..eeaf6a3fc 100755 --- a/powermgr/powermgrbattery/src/main/js/default/pages/index/index.hml +++ b/powermgr/powermgrbattery/src/main/js/default/pages/index/index.hml @@ -1,3 +1,18 @@ + +
{{ $t('strings.hello') }} {{ title }} diff --git a/powermgr/powermgrbattery_rk3568/src/main/js/default/pages/index/index.css b/powermgr/powermgrbattery_rk3568/src/main/js/default/pages/index/index.css index 6fda79275..7311df556 100755 --- a/powermgr/powermgrbattery_rk3568/src/main/js/default/pages/index/index.css +++ b/powermgr/powermgrbattery_rk3568/src/main/js/default/pages/index/index.css @@ -1,3 +1,18 @@ +/* + * Copyright (C) 2021 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/powermgr/powermgrbattery_rk3568/src/main/js/default/pages/index/index.hml b/powermgr/powermgrbattery_rk3568/src/main/js/default/pages/index/index.hml index f64b040a5..eeaf6a3fc 100755 --- a/powermgr/powermgrbattery_rk3568/src/main/js/default/pages/index/index.hml +++ b/powermgr/powermgrbattery_rk3568/src/main/js/default/pages/index/index.hml @@ -1,3 +1,18 @@ + +
{{ $t('strings.hello') }} {{ title }} diff --git a/powermgr/powermgrbatterystats/src/main/js/default/pages/index/index.css b/powermgr/powermgrbatterystats/src/main/js/default/pages/index/index.css index 5c52a87a0..cff50023c 100755 --- a/powermgr/powermgrbatterystats/src/main/js/default/pages/index/index.css +++ b/powermgr/powermgrbatterystats/src/main/js/default/pages/index/index.css @@ -1,3 +1,18 @@ +/* + * Copyright (C) 2021 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/powermgr/powermgrbatterystats/src/main/js/default/pages/index/index.hml b/powermgr/powermgrbatterystats/src/main/js/default/pages/index/index.hml index f629c71a9..936e04ebd 100755 --- a/powermgr/powermgrbatterystats/src/main/js/default/pages/index/index.hml +++ b/powermgr/powermgrbatterystats/src/main/js/default/pages/index/index.hml @@ -1,3 +1,18 @@ + +
{{ $t('strings.hello') }} {{ title }} diff --git a/powermgr/powermgrthermal/src/main/js/default/pages/index/index.css b/powermgr/powermgrthermal/src/main/js/default/pages/index/index.css index 6fda79275..7300d2a1f 100644 --- a/powermgr/powermgrthermal/src/main/js/default/pages/index/index.css +++ b/powermgr/powermgrthermal/src/main/js/default/pages/index/index.css @@ -1,3 +1,18 @@ +/* + * Copyright (C) 2021 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/powermgr/powermgrthermal/src/main/js/default/pages/index/index.hml b/powermgr/powermgrthermal/src/main/js/default/pages/index/index.hml index f64b040a5..eeaf6a3fc 100644 --- a/powermgr/powermgrthermal/src/main/js/default/pages/index/index.hml +++ b/powermgr/powermgrthermal/src/main/js/default/pages/index/index.hml @@ -1,3 +1,18 @@ + +
{{ $t('strings.hello') }} {{ title }} diff --git a/sensors/miscdevice_standard/src/main/js/default/pages/index/index.css b/sensors/miscdevice_standard/src/main/js/default/pages/index/index.css index 6fda79275..7300d2a1f 100755 --- a/sensors/miscdevice_standard/src/main/js/default/pages/index/index.css +++ b/sensors/miscdevice_standard/src/main/js/default/pages/index/index.css @@ -1,3 +1,18 @@ +/* + * Copyright (C) 2021 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/sensors/miscdevice_standard/src/main/js/default/pages/index/index.hml b/sensors/miscdevice_standard/src/main/js/default/pages/index/index.hml index f64b040a5..eeaf6a3fc 100755 --- a/sensors/miscdevice_standard/src/main/js/default/pages/index/index.hml +++ b/sensors/miscdevice_standard/src/main/js/default/pages/index/index.hml @@ -1,3 +1,18 @@ + +
{{ $t('strings.hello') }} {{ title }} diff --git a/sensors/sensor_standard/src/main/js/default/pages/index/index.css b/sensors/sensor_standard/src/main/js/default/pages/index/index.css index 6fda79275..7300d2a1f 100644 --- a/sensors/sensor_standard/src/main/js/default/pages/index/index.css +++ b/sensors/sensor_standard/src/main/js/default/pages/index/index.css @@ -1,3 +1,18 @@ +/* + * Copyright (C) 2021 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/sensors/sensor_standard/src/main/js/default/pages/index/index.hml b/sensors/sensor_standard/src/main/js/default/pages/index/index.hml index f64b040a5..eeaf6a3fc 100644 --- a/sensors/sensor_standard/src/main/js/default/pages/index/index.hml +++ b/sensors/sensor_standard/src/main/js/default/pages/index/index.hml @@ -1,3 +1,18 @@ + +
{{ $t('strings.hello') }} {{ title }} diff --git a/sensors/sensor_standard/src/main/js/default/test/SensorGeneralalgorithm.test.js b/sensors/sensor_standard/src/main/js/default/test/SensorGeneralalgorithm.test.js index 9a727dcf0..95aea4c9f 100755 --- a/sensors/sensor_standard/src/main/js/default/test/SensorGeneralalgorithm.test.js +++ b/sensors/sensor_standard/src/main/js/default/test/SensorGeneralalgorithm.test.js @@ -627,7 +627,7 @@ describe("SensorJsTest", function () { it('SensorJsTest_088', 0, async function (done) { console.info('SensorJsTest_088 start') sensor.createQuaternion([0.52, -0.336, -0.251], (error, data) => { - console.info('SensorJsTest_088' + 'lengh:' + data.length); + console.info('SensorJsTest_088' + 'length:' + data.length); if (error) { console.info('SensorJsTest_088 failed'); expect(false).assertTrue(); @@ -929,7 +929,7 @@ describe("SensorJsTest", function () { expect(data).assertEqual(getGeomagneticDipResult[0]) } done() - console.info('SensorJsTest_101' + 'lengh:' + data.length); + console.info('SensorJsTest_101' + 'length:' + data.length); }) console.info("SensorJsTest_101 end") }) diff --git a/sensors/sensor_standard/src/main/js/default/test/SensorOnOffTest.test.js b/sensors/sensor_standard/src/main/js/default/test/SensorOnOffTest.test.js index ffeaefa22..0c8606ff4 100755 --- a/sensors/sensor_standard/src/main/js/default/test/SensorOnOffTest.test.js +++ b/sensors/sensor_standard/src/main/js/default/test/SensorOnOffTest.test.js @@ -46,6 +46,9 @@ describe('SystemParameterTest', function () { console.info('afterEach caled') }) + let testSensorId = 0; + let testNullSensorId = -1; + /** * @tc.number SUB_SENSORS_Sensor_JSTest_0010 * @tc.name testRegisterSensortest001 @@ -53,20 +56,16 @@ describe('SystemParameterTest', function () { */ it('SUB_SENSORS_Sensor_JSTest_0010', 0, async function (done) { console.info('SUB_SENSORS_Sensor_JSTest_0010 start'); - await sensor.on(0, function (error, data) { - if (error) { - if (error.code == -1) { - console.info("testRegisterSensortest001 on error: sensor 0 not exit") - } else { - console.info('testRegisterSensortest001 on error :' + error.code); - expect(false).assertTrue(); - } - done(); - } else { + await sensor.on(testSensorId, function (data) { + if (data) { console.info('testRegisterSensortest001 on success'); expect(data.x).assertInstanceOf('Number'); expect(data.timestamp).assertInstanceOf('Number'); done(); + } else { + console.info('testRegisterSensortest001 on error'); + expect(false).assertTrue(); + done(); } }); console.info('SUB_SENSORS_Sensor_JSTest_0010 end'); @@ -79,17 +78,17 @@ describe('SystemParameterTest', function () { */ it('SUB_SENSORS_Sensor_JSTest_0020', 0, async function (done) { console.info('SUB_SENSORS_Sensor_JSTest_0020 start'); - await sensor.on(-1, function (error, data) { - if (error) { - console.info('testRegisterSensortest002 on error'); - expect(true).assertTrue(); - done(); - } else { + await sensor.on(testNullSensorId, function (data) { + if (data) { console.info('testRegisterSensortest002 on success'); expect(false).assertTrue(); done(); } }); + setTimeout(() => { + expect(true).assertTrue(); + done(); + }, 500) console.info('SUB_SENSORS_Sensor_JSTest_0020 end'); }) -- GitLab