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 71fca49a16b0e1075bc89780af3ed57c28cc9e96..c07953ea0bb99ee5fc5c9635e1ce9a70efa6895b 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 d6ca48cf43988cd6f270a026f0c1a88b7bc57123..ad7ec009d021f1ebecb5a816a69e3c80cf654b63 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 03d35478676083aeea98d8c34e39f0977ff4a8c6..b75a41e2f998db3855b2867f3f7f9eed1269a6d4 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 f82279d45475e45b76efea3b74a52cc64ebb2e3c..65d03a40477fcca9e8309f1ef1cc6f57eec59dee 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 d6ca48cf43988cd6f270a026f0c1a88b7bc57123..ad7ec009d021f1ebecb5a816a69e3c80cf654b63 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 bced76d2d7deb1d13d9d16da36a6865b3b2173de..ed56120fd06b8c1da8fb47f9a7ebf692c37a2937 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 e27d77fe5f0ff0f8609ecd7dd528f0a60c716128..17dde9b8a88bc191ea15241ad2fea78b1265724d 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 d6ca48cf43988cd6f270a026f0c1a88b7bc57123..ad7ec009d021f1ebecb5a816a69e3c80cf654b63 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 1648f86e91d08a51bfa2a08f0f96b3c9681a8f24..9e866a0f1d937615c7ec010bb6c04f2d2fe743fe 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 b3d501ccd30ff325cdf1011ec00d1fc8077b7200..b10be60029f81e225bd719b839b96d78c1ea32e5 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 94579b9c1535bc11ee56ee53b48fc90a9977e33a..1a6fe3a85d02631857806c78ce19b460a510b137 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 fe934c15e06e4089fe8a17b7e7939a599547f7df..196731b5b176240daebc5f035b13bbae60576a9e 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 d766fe249dfc3ada636f27e64d9b64451ce32c93..cb2e22661cde4c6c3e986a6718061d089e25fcd5 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 c9e9dc5f99b613c12d69eb53035ed8461e53dc59..c5a431851c11d91a4d66eb39f33aba2a63937332 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 954dfe0e29874c9ef11a5ace1673f79e27999864..431674fc5573a62cfd4d76547115834080634060 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 57686050fee56d4ca2b7d073531f6a187cf0a95e..0f3f4f49f6bd2c07e3bdfb11619c8f8f3232935c 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 d6ca48cf43988cd6f270a026f0c1a88b7bc57123..ad7ec009d021f1ebecb5a816a69e3c80cf654b63 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 {