From 074a88054b3c5aab7465a6dde936a9464aad2f62 Mon Sep 17 00:00:00 2001 From: xinking129 Date: Mon, 10 Jul 2023 14:00:26 +0800 Subject: [PATCH] add format Signed-off-by: xinking129 --- .../src/main/ets/entryability/EntryAbility.ts | 50 ++++++++++++------- .../entry/src/main/ets/pages/Index.ets | 14 ++++++ .../src/main/ets/entryability/EntryAbility.ts | 30 ++++++++--- .../main/ets/entryability1/EntryAbility1.ts | 16 +++++- .../entry/src/main/ets/pages/Index.ets | 14 ++++++ .../entry/src/main/ets/pages/Index1.ets | 14 ++++++ .../src/main/ets/entryability/EntryAbility.ts | 20 ++++++-- .../entry/src/main/ets/pages/Index.ets | 14 ++++++ .../src/main/ets/entryability/EntryAbility.ts | 34 +++++++++---- .../entry/src/main/ets/pages/Index.ets | 14 ++++++ .../ets/TestRunner/OpenHarmonyTestRunner.ts | 14 ++++++ .../entry/src/main/ets/test/Ability.test.ets | 14 ++++++ .../entry/src/main/ets/test/List.test.ets | 14 ++++++ .../src/main/ets/testability/TestAbility.ets | 14 ++++++ .../src/main/ets/testability/pages/Index.ets | 14 ++++++ .../src/main/ets/entryability/EntryAbility.ts | 14 ++++++ .../entry/src/main/ets/pages/Index.ets | 14 ++++++ 17 files changed, 278 insertions(+), 40 deletions(-) diff --git a/ability/ability_runtime/getrunningprocessinformation/ApplicationStateChangeOneReply/entry/src/main/ets/entryability/EntryAbility.ts b/ability/ability_runtime/getrunningprocessinformation/ApplicationStateChangeOneReply/entry/src/main/ets/entryability/EntryAbility.ts index 71fca49a1..c07953ea0 100644 --- a/ability/ability_runtime/getrunningprocessinformation/ApplicationStateChangeOneReply/entry/src/main/ets/entryability/EntryAbility.ts +++ b/ability/ability_runtime/getrunningprocessinformation/ApplicationStateChangeOneReply/entry/src/main/ets/entryability/EntryAbility.ts @@ -1,10 +1,24 @@ +/* + * Copyright (c) 2023 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 hilog from '@ohos.hilog'; import Ability from '@ohos.app.ability.UIAbility' import Window from '@ohos.window' import commonEvent from '@ohos.commonEvent'; -let commonStateArr: number[] = [-1,-1,-1,-1] -let commonEventData={ - parameters:{ +let commonStateArr: number[] = [-1, -1, -1, -1] +let commonEventData = { + parameters: { commonStateArr: commonStateArr } } @@ -12,19 +26,19 @@ let onForeGroundTAG = -1 let TAG = 'StateChangeTestTAG' let ApplicationStateChangeCallbackFir = { onApplicationForeground() { - console.log(TAG,'ApplicationStateChangeCallbackFir onApplicationForeground') + console.log(TAG, 'ApplicationStateChangeCallbackFir onApplicationForeground') commonEventData.parameters.commonStateArr[0] = 1 setTimeout(() => { console.info('Enter onApplicationForeground publish!') - commonEvent.publish('processState',commonEventData, (err) => { + commonEvent.publish('processState', commonEventData, (err) => { console.info("====>processState publish err: " + JSON.stringify(err)) }) - },1000) + }, 1000) }, onApplicationBackground() { - console.log(TAG,'ApplicationStateChangeCallbackFir onApplicationBackground') + console.log(TAG, 'ApplicationStateChangeCallbackFir onApplicationBackground') commonEventData.parameters.commonStateArr[1] = 1 if (globalThis.want.action == 'NeedBackGroundOff' || globalThis.want.action == 'MultiAppRegister' @@ -37,22 +51,22 @@ let ApplicationStateChangeCallbackFir = { let ApplicationStateChangeCallbackSec = { onApplicationForeground() { - console.log(TAG,'ApplicationStateChangeCallbackSec onApplicationForeground') + console.log(TAG, 'ApplicationStateChangeCallbackSec onApplicationForeground') commonEventData.parameters.commonStateArr[2] = 1 }, onApplicationBackground() { - console.log(TAG,'ApplicationStateChangeCallbackSec onApplicationBackground') + console.log(TAG, 'ApplicationStateChangeCallbackSec onApplicationBackground') commonEventData.parameters.commonStateArr[3] = 1 if (globalThis.want.action == 'doubleNeedBackGroundOff') { setTimeout(() => { - globalThis.applicationContext.off('applicationStateChange',ApplicationStateChangeCallbackSec) - },500) + globalThis.applicationContext.off('applicationStateChange', ApplicationStateChangeCallbackSec) + }, 500) } - else if(globalThis.want.action == 'DoubleRegisterOff') { + else if (globalThis.want.action == 'DoubleRegisterOff') { setTimeout(() => { console.info('entered DoubleRegisterOff') globalThis.applicationContext.off('applicationStateChange') - },500) + }, 500) } } } @@ -77,7 +91,7 @@ export default class EntryAbility extends Ability { if (globalThis.want.action == 'doubleRegister' || globalThis.want.action == 'doubleNeedBackGroundOff' || globalThis.want.action == 'DoubleRegisterOff') { console.info("double in action is logic entered!") - globalThis.applicationContext.on('applicationStateChange', ApplicationStateChangeCallbackSec) + globalThis.applicationContext.on('applicationStateChange', ApplicationStateChangeCallbackSec) } } @@ -114,13 +128,13 @@ export default class EntryAbility extends Ability { hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); hilog.info(0x0000, 'testTag', '%{public}s', 'Abilityone onForeground'); onForeGroundTAG += 1 - if(onForeGroundTAG == 1 && (globalThis.want.action == 'NeedBackGroundOff' || globalThis.want.action == 'MultiAppRegister' - || globalThis.want.action == 'DoubleRegisterOff')) { + if (onForeGroundTAG == 1 && (globalThis.want.action == 'NeedBackGroundOff' || globalThis.want.action == 'MultiAppRegister' + || globalThis.want.action == 'DoubleRegisterOff')) { setTimeout(() => { - commonEvent.publish('processState',commonEventData, (err) => { + commonEvent.publish('processState', commonEventData, (err) => { console.info("====>processState publish err: " + JSON.stringify(err)) }) - },2000) + }, 2000) } } diff --git a/ability/ability_runtime/getrunningprocessinformation/ApplicationStateChangeOneReply/entry/src/main/ets/pages/Index.ets b/ability/ability_runtime/getrunningprocessinformation/ApplicationStateChangeOneReply/entry/src/main/ets/pages/Index.ets index d6ca48cf4..ad7ec009d 100644 --- a/ability/ability_runtime/getrunningprocessinformation/ApplicationStateChangeOneReply/entry/src/main/ets/pages/Index.ets +++ b/ability/ability_runtime/getrunningprocessinformation/ApplicationStateChangeOneReply/entry/src/main/ets/pages/Index.ets @@ -1,3 +1,17 @@ +/* + * Copyright (c) 2023 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. + */ @Entry @Component struct Index { diff --git a/ability/ability_runtime/getrunningprocessinformation/ApplicationStateChangeThreeReply/entry/src/main/ets/entryability/EntryAbility.ts b/ability/ability_runtime/getrunningprocessinformation/ApplicationStateChangeThreeReply/entry/src/main/ets/entryability/EntryAbility.ts index 03d354786..b75a41e2f 100644 --- a/ability/ability_runtime/getrunningprocessinformation/ApplicationStateChangeThreeReply/entry/src/main/ets/entryability/EntryAbility.ts +++ b/ability/ability_runtime/getrunningprocessinformation/ApplicationStateChangeThreeReply/entry/src/main/ets/entryability/EntryAbility.ts @@ -1,3 +1,17 @@ +/* + * Copyright (c) 2023 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 hilog from '@ohos.hilog'; import Ability from '@ohos.app.ability.UIAbility' import Window from '@ohos.window' @@ -7,23 +21,23 @@ import commonEvent from '@ohos.commonEvent' let TAG = 'getRunningProcess' let commonStateArr let commonEventData = { - parameters:{ + parameters: { commonStateArr: commonStateArr } } let ApplicationStateChangeCallbackFir = { onApplicationForeground() { - console.log(TAG,'ApplicationStateChangeCallbackFir onApplicationForeground') + console.log(TAG, 'ApplicationStateChangeCallbackFir onApplicationForeground') }, onApplicationBackground() { - console.log(TAG,'ApplicationStateChangeCallbackFir onApplicationBackground') + console.log(TAG, 'ApplicationStateChangeCallbackFir onApplicationBackground') setTimeout(() => { console.info('Enter onApplicationForeground publish!') commonEventData.parameters.commonStateArr = 1 - commonEvent.publish('processState',commonEventData, (err) => { + commonEvent.publish('processState', commonEventData, (err) => { console.info("====>processState publish err: " + JSON.stringify(err)) }) - },1000) + }, 1000) } } let ForegroundTAG = -1 @@ -72,12 +86,12 @@ export default class EntryAbility extends Ability { onForeground() { // Ability has brought to foreground ForegroundTAG++ - if(ForegroundTAG == 1) { + if (ForegroundTAG == 1) { setTimeout(() => { - commonEvent.publish('processState',commonEventData, (err) => { + commonEvent.publish('processState', commonEventData, (err) => { console.info("====>processState publish err: " + JSON.stringify(err)) }) - },3000) + }, 3000) } hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); diff --git a/ability/ability_runtime/getrunningprocessinformation/ApplicationStateChangeThreeReply/entry/src/main/ets/entryability1/EntryAbility1.ts b/ability/ability_runtime/getrunningprocessinformation/ApplicationStateChangeThreeReply/entry/src/main/ets/entryability1/EntryAbility1.ts index f82279d45..65d03a404 100644 --- a/ability/ability_runtime/getrunningprocessinformation/ApplicationStateChangeThreeReply/entry/src/main/ets/entryability1/EntryAbility1.ts +++ b/ability/ability_runtime/getrunningprocessinformation/ApplicationStateChangeThreeReply/entry/src/main/ets/entryability1/EntryAbility1.ts @@ -1,3 +1,17 @@ +/* + * Copyright (c) 2023 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 hilog from '@ohos.hilog'; import Ability from '@ohos.app.ability.UIAbility' import Window from '@ohos.window' @@ -48,7 +62,7 @@ export default class EntryAbility1 extends Ability { globalThis.abilityContext2.terminateSelf((err) => { console.log('terminateSelf result:' + JSON.stringify(err)); }) - },3000) + }, 3000) } onBackground() { diff --git a/ability/ability_runtime/getrunningprocessinformation/ApplicationStateChangeThreeReply/entry/src/main/ets/pages/Index.ets b/ability/ability_runtime/getrunningprocessinformation/ApplicationStateChangeThreeReply/entry/src/main/ets/pages/Index.ets index d6ca48cf4..ad7ec009d 100644 --- a/ability/ability_runtime/getrunningprocessinformation/ApplicationStateChangeThreeReply/entry/src/main/ets/pages/Index.ets +++ b/ability/ability_runtime/getrunningprocessinformation/ApplicationStateChangeThreeReply/entry/src/main/ets/pages/Index.ets @@ -1,3 +1,17 @@ +/* + * Copyright (c) 2023 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. + */ @Entry @Component struct Index { diff --git a/ability/ability_runtime/getrunningprocessinformation/ApplicationStateChangeThreeReply/entry/src/main/ets/pages/Index1.ets b/ability/ability_runtime/getrunningprocessinformation/ApplicationStateChangeThreeReply/entry/src/main/ets/pages/Index1.ets index bced76d2d..ed56120fd 100644 --- a/ability/ability_runtime/getrunningprocessinformation/ApplicationStateChangeThreeReply/entry/src/main/ets/pages/Index1.ets +++ b/ability/ability_runtime/getrunningprocessinformation/ApplicationStateChangeThreeReply/entry/src/main/ets/pages/Index1.ets @@ -1,3 +1,17 @@ +/* + * Copyright (c) 2023 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. + */ @Entry @Component struct Index1 { diff --git a/ability/ability_runtime/getrunningprocessinformation/ApplicationStateChangeTwoReply/entry/src/main/ets/entryability/EntryAbility.ts b/ability/ability_runtime/getrunningprocessinformation/ApplicationStateChangeTwoReply/entry/src/main/ets/entryability/EntryAbility.ts index e27d77fe5..17dde9b8a 100644 --- a/ability/ability_runtime/getrunningprocessinformation/ApplicationStateChangeTwoReply/entry/src/main/ets/entryability/EntryAbility.ts +++ b/ability/ability_runtime/getrunningprocessinformation/ApplicationStateChangeTwoReply/entry/src/main/ets/entryability/EntryAbility.ts @@ -1,3 +1,17 @@ +/* + * Copyright (c) 2023 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 hilog from '@ohos.hilog'; import Ability from '@ohos.app.ability.UIAbility' import Window from '@ohos.window' @@ -6,11 +20,11 @@ let TAG = 'StateChangeTestTAG' let ApplicationStateChangeCallbackSec = { onApplicationForeground() { console.info('==== ApplicationStateChange Foreground ===='); - console.log(TAG,'App2 ApplicationStateChangeCallbackSec onApplicationForeground') + console.log(TAG, 'App2 ApplicationStateChangeCallbackSec onApplicationForeground') }, onApplicationBackground() { console.info('==== ApplicationStateChange Background ===='); - console.log(TAG,'App2 ApplicationStateChangeCallbackSec onApplicationBackground') + console.log(TAG, 'App2 ApplicationStateChangeCallbackSec onApplicationBackground') } } export default class EntryAbility extends Ability { @@ -63,7 +77,7 @@ export default class EntryAbility extends Ability { globalThis.abilityContext.terminateSelf((err) => { console.log('terminateSelf result:' + JSON.stringify(err)); }) - },3000) + }, 3000) } onBackground() { diff --git a/ability/ability_runtime/getrunningprocessinformation/ApplicationStateChangeTwoReply/entry/src/main/ets/pages/Index.ets b/ability/ability_runtime/getrunningprocessinformation/ApplicationStateChangeTwoReply/entry/src/main/ets/pages/Index.ets index d6ca48cf4..ad7ec009d 100644 --- a/ability/ability_runtime/getrunningprocessinformation/ApplicationStateChangeTwoReply/entry/src/main/ets/pages/Index.ets +++ b/ability/ability_runtime/getrunningprocessinformation/ApplicationStateChangeTwoReply/entry/src/main/ets/pages/Index.ets @@ -1,3 +1,17 @@ +/* + * Copyright (c) 2023 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. + */ @Entry @Component struct Index { diff --git a/ability/ability_runtime/getrunningprocessinformation/GetRunningProcessInformationOneReply/entry/src/main/ets/entryability/EntryAbility.ts b/ability/ability_runtime/getrunningprocessinformation/GetRunningProcessInformationOneReply/entry/src/main/ets/entryability/EntryAbility.ts index 1648f86e9..9e866a0f1 100644 --- a/ability/ability_runtime/getrunningprocessinformation/GetRunningProcessInformationOneReply/entry/src/main/ets/entryability/EntryAbility.ts +++ b/ability/ability_runtime/getrunningprocessinformation/GetRunningProcessInformationOneReply/entry/src/main/ets/entryability/EntryAbility.ts @@ -1,3 +1,17 @@ +/* + * Copyright (c) 2023 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 hilog from '@ohos.hilog'; import Ability from '@ohos.app.ability.UIAbility' import Window from '@ohos.window' @@ -6,9 +20,9 @@ import AbilityConstant from '@ohos.app.ability.AbilityConstant' let sequence = 0; let TAG = 'GetRunningProcessInformation' -let commonStateArr: number[] = [-1,-1,-1,-1] -let commonEventData={ - parameters:{ +let commonStateArr: number[] = [-1, -1, -1, -1] +let commonEventData = { + parameters: { commonStateArr: commonStateArr } } @@ -22,7 +36,7 @@ globalThis.StartFloatingAbility = () => { windowMode: AbilityConstant.WindowMode.WINDOW_MODE_FLOATING, }; globalThis.abilityContext.startAbility(want, options, (error) => { - console.log(TAG,"start floating ability error.code = " + error.code) + console.log(TAG, "start floating ability error.code = " + error.code) }) } @@ -38,12 +52,12 @@ globalThis.StartNormalAbility = () => { } globalThis.GetRunningProcessInfoCallback = () => { - globalThis.applicationContext.getRunningProcessInformation((err,data) => { + globalThis.applicationContext.getRunningProcessInformation((err, data) => { if (err) { - console.log(TAG,`getRunningProcessInformation err: ` + JSON.stringify(err)); + console.log(TAG, `getRunningProcessInformation err: ` + JSON.stringify(err)); } else { - console.log(TAG,'Oncreate Callback State: ' + JSON.stringify(data[0].state)); + console.log(TAG, 'Oncreate Callback State: ' + JSON.stringify(data[0].state)); commonStateArr[sequence++] = data[0].state } }) @@ -51,15 +65,15 @@ globalThis.GetRunningProcessInfoCallback = () => { globalThis.GetRunningProcessInfoPromise = () => { globalThis.applicationContext.getRunningProcessInformation().then((data) => { - console.log(TAG,'Oncreate Promise State: ' + JSON.stringify(data[0].state)); + console.log(TAG, 'Oncreate Promise State: ' + JSON.stringify(data[0].state)); commonStateArr[sequence++] = data[0].state }).catch((err) => { - console.log(TAG,`getRunningProcessInformation err: ` + JSON.stringify(err)); + console.log(TAG, `getRunningProcessInformation err: ` + JSON.stringify(err)); }); } globalThis.PublishStateArray = () => { - commonEvent.publish('processState',commonEventData, (err) => { + commonEvent.publish('processState', commonEventData, (err) => { console.info("====>processState publish err: " + JSON.stringify(err)) }) } diff --git a/ability/ability_runtime/getrunningprocessinformation/GetRunningProcessInformationOneReply/entry/src/main/ets/pages/Index.ets b/ability/ability_runtime/getrunningprocessinformation/GetRunningProcessInformationOneReply/entry/src/main/ets/pages/Index.ets index b3d501ccd..b10be6002 100644 --- a/ability/ability_runtime/getrunningprocessinformation/GetRunningProcessInformationOneReply/entry/src/main/ets/pages/Index.ets +++ b/ability/ability_runtime/getrunningprocessinformation/GetRunningProcessInformationOneReply/entry/src/main/ets/pages/Index.ets @@ -1,3 +1,17 @@ +/* + * Copyright (c) 2023 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. + */ @Entry @Component struct Index { diff --git a/ability/ability_runtime/getrunningprocessinformation/GetRunningProcessInformationTest/entry/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts b/ability/ability_runtime/getrunningprocessinformation/GetRunningProcessInformationTest/entry/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts index 94579b9c1..1a6fe3a85 100644 --- a/ability/ability_runtime/getrunningprocessinformation/GetRunningProcessInformationTest/entry/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts +++ b/ability/ability_runtime/getrunningprocessinformation/GetRunningProcessInformationTest/entry/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts @@ -1,3 +1,17 @@ +/* + * Copyright (c) 2023 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 hilog from '@ohos.hilog'; import TestRunner from '@ohos.application.testRunner' import AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry' diff --git a/ability/ability_runtime/getrunningprocessinformation/GetRunningProcessInformationTest/entry/src/main/ets/test/Ability.test.ets b/ability/ability_runtime/getrunningprocessinformation/GetRunningProcessInformationTest/entry/src/main/ets/test/Ability.test.ets index fe934c15e..196731b5b 100644 --- a/ability/ability_runtime/getrunningprocessinformation/GetRunningProcessInformationTest/entry/src/main/ets/test/Ability.test.ets +++ b/ability/ability_runtime/getrunningprocessinformation/GetRunningProcessInformationTest/entry/src/main/ets/test/Ability.test.ets @@ -1,3 +1,17 @@ +/* + * Copyright (c) 2023 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 hilog from '@ohos.hilog' import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium' import { Component, Driver, UiWindow, ON, UiDriver } from '@ohos.UiTest' diff --git a/ability/ability_runtime/getrunningprocessinformation/GetRunningProcessInformationTest/entry/src/main/ets/test/List.test.ets b/ability/ability_runtime/getrunningprocessinformation/GetRunningProcessInformationTest/entry/src/main/ets/test/List.test.ets index d766fe249..cb2e22661 100644 --- a/ability/ability_runtime/getrunningprocessinformation/GetRunningProcessInformationTest/entry/src/main/ets/test/List.test.ets +++ b/ability/ability_runtime/getrunningprocessinformation/GetRunningProcessInformationTest/entry/src/main/ets/test/List.test.ets @@ -1,3 +1,17 @@ +/* + * Copyright (c) 2023 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 abilityTest from './Ability.test' export default function testsuite() { diff --git a/ability/ability_runtime/getrunningprocessinformation/GetRunningProcessInformationTest/entry/src/main/ets/testability/TestAbility.ets b/ability/ability_runtime/getrunningprocessinformation/GetRunningProcessInformationTest/entry/src/main/ets/testability/TestAbility.ets index c9e9dc5f9..c5a431851 100644 --- a/ability/ability_runtime/getrunningprocessinformation/GetRunningProcessInformationTest/entry/src/main/ets/testability/TestAbility.ets +++ b/ability/ability_runtime/getrunningprocessinformation/GetRunningProcessInformationTest/entry/src/main/ets/testability/TestAbility.ets @@ -1,3 +1,17 @@ +/* + * Copyright (c) 2023 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 hilog from '@ohos.hilog'; import Ability from '@ohos.app.ability.UIAbility' import AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry' diff --git a/ability/ability_runtime/getrunningprocessinformation/GetRunningProcessInformationTest/entry/src/main/ets/testability/pages/Index.ets b/ability/ability_runtime/getrunningprocessinformation/GetRunningProcessInformationTest/entry/src/main/ets/testability/pages/Index.ets index 954dfe0e2..431674fc5 100644 --- a/ability/ability_runtime/getrunningprocessinformation/GetRunningProcessInformationTest/entry/src/main/ets/testability/pages/Index.ets +++ b/ability/ability_runtime/getrunningprocessinformation/GetRunningProcessInformationTest/entry/src/main/ets/testability/pages/Index.ets @@ -1,3 +1,17 @@ +/* + * Copyright (c) 2023 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 hilog from '@ohos.hilog'; @Entry diff --git a/ability/ability_runtime/getrunningprocessinformation/GetRunningProcessInformationTwoReply/entry/src/main/ets/entryability/EntryAbility.ts b/ability/ability_runtime/getrunningprocessinformation/GetRunningProcessInformationTwoReply/entry/src/main/ets/entryability/EntryAbility.ts index 57686050f..0f3f4f49f 100644 --- a/ability/ability_runtime/getrunningprocessinformation/GetRunningProcessInformationTwoReply/entry/src/main/ets/entryability/EntryAbility.ts +++ b/ability/ability_runtime/getrunningprocessinformation/GetRunningProcessInformationTwoReply/entry/src/main/ets/entryability/EntryAbility.ts @@ -1,3 +1,17 @@ +/* + * Copyright (c) 2023 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 hilog from '@ohos.hilog'; import Ability from '@ohos.app.ability.UIAbility' import Window from '@ohos.window' diff --git a/ability/ability_runtime/getrunningprocessinformation/GetRunningProcessInformationTwoReply/entry/src/main/ets/pages/Index.ets b/ability/ability_runtime/getrunningprocessinformation/GetRunningProcessInformationTwoReply/entry/src/main/ets/pages/Index.ets index d6ca48cf4..ad7ec009d 100644 --- a/ability/ability_runtime/getrunningprocessinformation/GetRunningProcessInformationTwoReply/entry/src/main/ets/pages/Index.ets +++ b/ability/ability_runtime/getrunningprocessinformation/GetRunningProcessInformationTwoReply/entry/src/main/ets/pages/Index.ets @@ -1,3 +1,17 @@ +/* + * Copyright (c) 2023 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. + */ @Entry @Component struct Index { -- GitLab