diff --git a/ability/ability_runtime/actsserviceabilityclienttest/actsserviceabilityserverrelyhap/BUILD.gn b/ability/ability_runtime/actsserviceabilityclienttest/actsserviceabilityserverrelyhap/BUILD.gn deleted file mode 100644 index 1fcfc3838a353e8f8414a0421097d6717fed98b3..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsserviceabilityclienttest/actsserviceabilityserverrelyhap/BUILD.gn +++ /dev/null @@ -1,40 +0,0 @@ -# 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("//test/xts/tools/build/suite.gni") - -ohos_hap_assist_suite("ActsServiceAbilityServerRelyHap") { - hap_name = "ActsServiceAbilityServerRelyHap" - js_build_mode = "debug" - hap_profile = "entry/src/main/config.json" - - testonly = true - deps = [ - ":serviceability_resources", - ":serviceability_ts_assets", - ] - certificate_profile = "signature/openharmony_sx.p7b" - subsystem_name = "ability" - part_name = "ability_runtime" -} - -ohos_js_assets("serviceability_ts_assets") { - source_dir = "entry/src/main/ets" - hap_profile = "entry/src/main/config.json" - ets2abc = true -} - -ohos_resources("serviceability_resources") { - sources = [ "entry/src/main/resources" ] - hap_profile = "entry/src/main/config.json" -} diff --git a/ability/ability_runtime/actsserviceabilityclienttest/actsserviceabilityserverrelyhap/entry/src/main/config.json b/ability/ability_runtime/actsserviceabilityclienttest/actsserviceabilityserverrelyhap/entry/src/main/config.json deleted file mode 100644 index f2165dcfeea4bb587153290ad1236cd825decfb5..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsserviceabilityclienttest/actsserviceabilityserverrelyhap/entry/src/main/config.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "app": { - "bundleName": "com.amsst.stserviceabilityserver", - "vendor": "test", - "version": { - "code": 1000110, - "name": "1.1.1" - }, - "apiVersion": { - "compatible": 8, - "target": 9 - } - }, - "deviceConfig": {}, - "module": { - "package": "com.amsst.stserviceabilityserver", - "name": ".MyApplication", - "mainAbility": ".MainAbility", - "srcPath": "", - "deviceType": [ - "default", - "tablet" - ], - "distro": { - "deliveryWithInstall": true, - "moduleName": "entry", - "moduleType": "entry", - "installationFree": false - }, - "abilities": [ - { - "skills": [ - { - "entities": [ - "entity.system.home" - ], - "actions": [ - "action.system.home" - ] - } - ], - "orientation": "unspecified", - "visible": true, - "srcPath": "MainAbility", - "name": ".MainAbility", - "srcLanguage": "ets", - "icon": "$media:icon", - "description": "$string:description_mainability", - "formsEnabled": false, - "label": "$string:entry_MainAbility", - "type": "page", - "launchType": "standard" - }, - { - "srcPath": "ServiceAbility", - "name": ".ServiceAbility", - "icon": "$media:icon", - "srcLanguage": "ets", - "description": "$string:description_serviceability", - "visible": true, - "type": "service" - } - ], - "js": [ - { - "mode": { - "syntax": "ets", - "type": "pageAbility" - }, - "pages": [ - "pages/index", - "pages/second" - ], - "name": ".MainAbility", - "window": { - "designWidth": 720, - "autoDesignWidth": false - } - } - ], - "defPermissions": [ - { - "name": "com.ohos.screenlock.DataAbilityShellProvider.PROVIDER" - } - ] - } -} diff --git a/ability/ability_runtime/actsserviceabilityclienttest/actsserviceabilityserverrelyhap/entry/src/main/ets/AbilityStage.ts b/ability/ability_runtime/actsserviceabilityclienttest/actsserviceabilityserverrelyhap/entry/src/main/ets/AbilityStage.ts deleted file mode 100644 index 397f53c990f5dc467c1dfc84b531bf653b9bf6be..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsserviceabilityclienttest/actsserviceabilityserverrelyhap/entry/src/main/ets/AbilityStage.ts +++ /dev/null @@ -1,21 +0,0 @@ -/* - * 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 AbilityStage from "@ohos.app.ability.AbilityStage" - -export default class MyAbilityStage extends AbilityStage { - onCreate() { - console.log("MyAbilityStage onCreate"); - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsserviceabilityclienttest/actsserviceabilityserverrelyhap/entry/src/main/ets/MainAbility/MainAbility.ts b/ability/ability_runtime/actsserviceabilityclienttest/actsserviceabilityserverrelyhap/entry/src/main/ets/MainAbility/MainAbility.ts deleted file mode 100644 index 0aa7fed2f5a64f08bfc670f8ed7c7aaa37793097..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsserviceabilityclienttest/actsserviceabilityserverrelyhap/entry/src/main/ets/MainAbility/MainAbility.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 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 Ability from '@ohos.app.ability.UIAbility' -export default class MainAbility extends Ability { - onCreate(want, launchParam) { - console.log("jws onCreate"); - } - - onDestroy() { - console.log("jws onDestroy"); - } - - onWindowStageCreate(windowStage) { - console.log("jws onWindowStageCreate"); - } - - onWindowStageDestroy() { - console.log("jws onWindowStageDestroy"); - } - - onForeground() { - console.log("jws onForeground"); - } - - onBackground() { - console.log("jws onBackground"); - } - - call(){ - - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsserviceabilityclienttest/actsserviceabilityserverrelyhap/entry/src/main/ets/MainAbility/app.ets b/ability/ability_runtime/actsserviceabilityclienttest/actsserviceabilityserverrelyhap/entry/src/main/ets/MainAbility/app.ets deleted file mode 100644 index d0d2a5cd47ed5a1092788289ae2a48953d89be88..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsserviceabilityclienttest/actsserviceabilityserverrelyhap/entry/src/main/ets/MainAbility/app.ets +++ /dev/null @@ -1,22 +0,0 @@ -/* - * 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. - */ -export default { - onCreate() { - console.info('Application onCreate') - }, - onDestroy() { - console.info('Application onDestroy') - }, -} \ No newline at end of file diff --git a/ability/ability_runtime/actsserviceabilityclienttest/actsserviceabilityserverrelyhap/entry/src/main/ets/MainAbility/pages/index.ets b/ability/ability_runtime/actsserviceabilityclienttest/actsserviceabilityserverrelyhap/entry/src/main/ets/MainAbility/pages/index.ets deleted file mode 100644 index 442a0fea6ce604c142497a1bfeb99478902696dd..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsserviceabilityclienttest/actsserviceabilityserverrelyhap/entry/src/main/ets/MainAbility/pages/index.ets +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 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 {Core} from '@ohos/hypium' - -@Entry -@Component -struct Index { - aboutToAppear() { - console.info('onShow finish') - const core = Core.getInstance() - core.init() - const configService = core.getDefaultService('config') - configService.setConfig(this) - core.execute() - } - - build() { - Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { - Text('Hello World') - .fontSize(50) - .fontWeight(FontWeight.Bold) - } - .width('100%') - .height('100%') - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsserviceabilityclienttest/actsserviceabilityserverrelyhap/entry/src/main/ets/MainAbility/pages/second.ets b/ability/ability_runtime/actsserviceabilityclienttest/actsserviceabilityserverrelyhap/entry/src/main/ets/MainAbility/pages/second.ets deleted file mode 100644 index 359eb5ab9c068706363fa2938cccd40d7df25264..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsserviceabilityclienttest/actsserviceabilityserverrelyhap/entry/src/main/ets/MainAbility/pages/second.ets +++ /dev/null @@ -1,43 +0,0 @@ -/* - * 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 '@system.router'; - -@Entry -@Component -struct Second { - private content: string = "Second Page" - - build() { - Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { - Text(`${this.content}`) - .fontSize(50) - .fontWeight(FontWeight.Bold) - Button() { - Text('back to index') - .fontSize(20) - .fontWeight(FontWeight.Bold) - }.type(ButtonType.Capsule) - .margin({ - top: 20 - }) - .backgroundColor('#0D9FFB') - .onClick(() => { - router.back() - }) - } - .width('100%') - .height('100%') - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsserviceabilityclienttest/actsserviceabilityserverrelyhap/entry/src/main/ets/ServiceAbility/service.ts b/ability/ability_runtime/actsserviceabilityclienttest/actsserviceabilityserverrelyhap/entry/src/main/ets/ServiceAbility/service.ts deleted file mode 100644 index 28ea7474ea70b607d0421f444f2819c7f0615528..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsserviceabilityclienttest/actsserviceabilityserverrelyhap/entry/src/main/ets/ServiceAbility/service.ts +++ /dev/null @@ -1,190 +0,0 @@ -/* - * 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 rpc from "@ohos.rpc"; -import particleAbility from '@ohos.ability.particleAbility' -import commonEvent from '@ohos.commonEvent' -var serversecond_bundleName = "com.amsst.stserviceabilityserversecond"; -var serversecond_abilityName = "com.amsst.stserviceabilityserversecond.ServiceAbility"; -var mConnIdJs; -class StubTest extends rpc.RemoteObject { - constructor(des) { - console.info('ACTS_SerivceAbilityServer ====< des = ' + des); - if (typeof des === 'string') { - console.info('ACTS_ super'); - super(des); - } else { - return null; - } - } - - onRemoteRequest(code, data, reply, option) { - if (code === 1) { - console.info("ACTS_SerivceAbilityServer ====< onRemoteRequest code = 1"); - let token = data.readInterfaceToken(); - console.log('ACTS_SerivceAbilityServer ====< onRemoteRequest token:' + token); - let num = data.readInt(); - console.log('ACTS_SerivceAbilityServer ====< onRemoteRequest num:' + num); - this.method(); - num = num + 777; - reply.writeInt(num); - } else { - console.info("ACTS_SerivceAbilityServer ====< onRemoteRequest code not 1"); - } - return true; - } - method() { - console.log('ACTS_SerivceAbilityServer ====< method called.') - } -} - -function sleep(delay) { - let start = new Date().getTime(); - while (true) { - if (new Date().getTime() - start > delay) { - break; - } - } -} - -export default { - onStart(want) { - console.debug('ACTS_SerivceAbilityServer 0425 ====>onStart .ts 0851 =' - + want + " , JSON." + JSON.stringify(want)); - commonEvent.publish("ACTS_SerivceAbilityServer_onStart", (err) => { }); - }, - onStop() { - console.debug('ACTS_SerivceAbilityServer ==== { }); - }, - onCommand(want, restart, startId) { - console.debug('ACTS_SerivceAbilityServer ====>onCommand=' - + "JSON(want)=" + JSON.stringify(want) - + " ,restart=" + restart + " ,startId=" + startId); - if (want.action == 'ServiceStartService_0900') { - particleAbility.startAbility( - { - want: - { - bundleName: serversecond_bundleName, - abilityName: serversecond_abilityName, - action: "ServiceStartService_0900", - }, - } - ); - sleep(600) - } else if (want.action == 'ServiceStartService_1000') { - particleAbility.startAbility( - { - want: - { - bundleName: serversecond_bundleName, - abilityName: serversecond_abilityName, - action: "ServiceStartService_1000", - }, - }, (err, data) => { - console.debug('ACTS_SerivceAbilityServer start Ability 1000 callback=====' - + err + ', data= ' + data + " , JSON." + JSON.stringify(data)); - } - ); - } else { - commonEvent.publish("ACTS_SerivceAbilityServer_onCommand" + "_" + want.action, (err) => { - if (!err.code) { - if (want.action == 'PageStartService_0100' || want.action == 'PageStartService_0200' - || want.action == 'PageStartService_0301' || want.action == 'PageStartService_0401') { - console.debug('ACTS_SerivceAbilityServer_onCommand 100 200 301 401.=====>' - + want.action); - } - } else { - console.debug('ACTS_SerivceAbilityServer_onCommand publish err=====>' + err); - } - }); - } - }, - onConnect(want) { - console.info('ACTS_SerivceAbilityServer ====< onConnect'); - try { - console.debug('ACTS_SerivceAbilityServer ====>onConnect=' - + want + " , JSON." + JSON.stringify(want)); - commonEvent.publish("ACTS_SerivceAbilityServer_onConnect" + "_" + want.action, (err) => { }); - function onConnectCallback(element, remote) { - console.debug('ACTS_SerivceAbilityServer_onConnectCallback ====> mConnIdJs=' - + JSON.stringify(mConnIdJs) + " , " + mConnIdJs); - console.debug('ACTS_SerivceAbilityServer_onConnectCallback ====> element=' - + JSON.stringify(element) + " , " + element); - console.debug('ACTS_SerivceAbilityServer_onConnectCallback ====> remote=' - + JSON.stringify(remote) + " , " + remote); - } - function onDisconnectCallback(element) { - console.debug('ACTS_SerivceAbilityServer_onDisconnectCallback ====> element=' - + JSON.stringify(element) + " , " + element); - } - function onFailedCallback(code) { - console.debug('ACTS_SerivceAbilityServer_onFailedCallback ====> code=' - + JSON.stringify(code) + " , " + code) - } - if (want.action == 'ServiceConnectService_1300' || want.action == 'ServiceConnectService_1400' - || want.action == 'ServiceConnectService_1500' || want.action == 'ServiceConnectService_1600') { - mConnIdJs = particleAbility.connectAbility( - { - bundleName: serversecond_bundleName, - abilityName: serversecond_abilityName, - action: want.action, - }, - { - onConnect: onConnectCallback, - onDisconnect: onDisconnectCallback, - onFailed: onFailedCallback, - }, - ) - } - } catch (err) { - console.log("ACTS_SerivceAbilityServer ====< error:" + err) - } - console.info('ACTS_SerivceAbilityServer ====< onConnect end'); - return new StubTest("connect-test"); - }, - onDisconnect(want) { - console.debug('ACTS_SerivceAbilityServer ====>onDisConnect=' - + want + " , JSON." + JSON.stringify(want)); - commonEvent.publish("ACTS_SerivceAbilityServer_onDisConnect_" + want.action, (err) => { - console.debug('ACTS_SerivceAbilityServer_onDisConnect ===' + want.action); - }); - if (want.action == 'ServiceConnectService_1300' || want.action == 'ServiceConnectService_1400' - || want.action == 'ServiceConnectService_1500' || want.action == 'ServiceConnectService_1501' - || want.action == 'ServiceConnectService_1600' || want.action == 'ServiceConnectService_1601' - ) { - particleAbility.disconnectAbility(mConnIdJs, (err) => { - console.debug("=ACTS_SerivceAbilityServer_onDisConnect 13 14 15 16 err====>" - + ("json err=") + JSON.stringify(err) + " , " + want.action); - }) - } - }, - onReady() { - console.debug('ACTS_SerivceAbilityServer ====onReconnect=' - + want + " , JSON." + JSON.stringify(want)); - commonEvent.publish("ACTS_SerivceAbilityServer_onReconnect" + "_" + want.action, (err) => { }); - }, - OnAbilityConnectDone(element, remoteObject, resultCode) { - console.debug('ACTS_SerivceAbilityServer ====>OnAbilityConnectDone=' - + element + " , JSON." + JSON.stringify(element) - + remoteObject + " , JSON." + JSON.stringify(remoteObject) - + resultCode + " , JSON." + JSON.stringify(resultCode) - ); - commonEvent.publish("ACTS_SerivceAbilityServer_OnAbilityConnectDone", (err) => { }); - }, -}; diff --git a/ability/ability_runtime/actsserviceabilityclienttest/actsserviceabilityserverrelyhap/entry/src/main/resources/base/element/string.json b/ability/ability_runtime/actsserviceabilityclienttest/actsserviceabilityserverrelyhap/entry/src/main/resources/base/element/string.json deleted file mode 100644 index 745bfaffc123f48189566fbfcbfe4e68bb6edb84..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsserviceabilityclienttest/actsserviceabilityserverrelyhap/entry/src/main/resources/base/element/string.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "string": [ - { - "name": "entry_MainAbility", - "value": "ServiceExtAbility" - }, - { - "name": "description_mainability", - "value": "eTS_Empty Ability" - }, - { - "name": "description_serviceability", - "value": "hap sample empty service" - }, - { - "name": "description_dataability", - "value": "hap sample empty provider" - }, - { - "name": "description_mainability2", - "value": "eTS_Empty Ability" - }, - { - "name": "entry_MainAbility2", - "value": "entry_MainAbility2" - }, - { - "name": "description_testdataability", - "value": "hap sample empty provider" - }, - { - "name": "permreason_dataability", - "value": "request dataability premission" - } - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/actsserviceabilityclienttest/actsserviceabilityserverrelyhap/entry/src/main/resources/base/media/icon.png b/ability/ability_runtime/actsserviceabilityclienttest/actsserviceabilityserverrelyhap/entry/src/main/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actsserviceabilityclienttest/actsserviceabilityserverrelyhap/entry/src/main/resources/base/media/icon.png and /dev/null differ diff --git a/ability/ability_runtime/actsserviceabilityclienttest/actsserviceabilityserverrelyhap/signature/openharmony_sx.p7b b/ability/ability_runtime/actsserviceabilityclienttest/actsserviceabilityserverrelyhap/signature/openharmony_sx.p7b deleted file mode 100644 index dfb6e4dcb65df300c2c54535cad7bf9c90d52274..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actsserviceabilityclienttest/actsserviceabilityserverrelyhap/signature/openharmony_sx.p7b and /dev/null differ diff --git a/ability/ability_runtime/actsserviceabilityclienttest/actsserviceabilityserversecondrelyhap/BUILD.gn b/ability/ability_runtime/actsserviceabilityclienttest/actsserviceabilityserversecondrelyhap/BUILD.gn deleted file mode 100644 index dbe9959e2c05a20f3edfec6288204ccdce2f32ea..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsserviceabilityclienttest/actsserviceabilityserversecondrelyhap/BUILD.gn +++ /dev/null @@ -1,40 +0,0 @@ -# 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("//test/xts/tools/build/suite.gni") - -ohos_hap_assist_suite("ActsServiceAbilityServerSecondRelyHap") { - hap_name = "ActsServiceAbilityServerSecondRelyHap" - js_build_mode = "debug" - hap_profile = "entry/src/main/config.json" - - testonly = true - deps = [ - ":serviceability_resources", - ":serviceability_ts_assets", - ] - certificate_profile = "signature/openharmony_sx.p7b" - subsystem_name = "ability" - part_name = "ability_runtime" -} - -ohos_js_assets("serviceability_ts_assets") { - source_dir = "entry/src/main/ets" - hap_profile = "entry/src/main/config.json" - ets2abc = true -} - -ohos_resources("serviceability_resources") { - sources = [ "entry/src/main/resources" ] - hap_profile = "entry/src/main/config.json" -} diff --git a/ability/ability_runtime/actsserviceabilityclienttest/actsserviceabilityserversecondrelyhap/entry/src/main/config.json b/ability/ability_runtime/actsserviceabilityclienttest/actsserviceabilityserversecondrelyhap/entry/src/main/config.json deleted file mode 100644 index 40040bf90d38f2660940d5901c8fdb51d064ca77..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsserviceabilityclienttest/actsserviceabilityserversecondrelyhap/entry/src/main/config.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "app": { - "bundleName": "com.amsst.stserviceabilityserversecond", - "vendor": "test", - "version": { - "code": 1000110, - "name": "1.1.1" - }, - "apiVersion": { - "compatible": 8, - "target": 9 - } - }, - "deviceConfig": {}, - "module": { - "package": "com.amsst.stserviceabilityserversecond", - "name": ".MyApplication", - "mainAbility": ".MainAbility", - "srcPath": "", - "deviceType": [ - "default", - "tablet" - ], - "distro": { - "deliveryWithInstall": true, - "moduleName": "entry", - "moduleType": "entry", - "installationFree": false - }, - "abilities": [ - { - "skills": [ - { - "entities": [ - "entity.system.home" - ], - "actions": [ - "action.system.home" - ] - } - ], - "orientation": "unspecified", - "visible": true, - "srcPath": "MainAbility", - "name": ".MainAbility", - "srcLanguage": "ets", - "icon": "$media:icon", - "description": "$string:description_mainability", - "formsEnabled": false, - "label": "$string:entry_MainAbility", - "type": "page", - "launchType": "standard" - }, - { - "srcPath": "ServiceAbility", - "name": ".ServiceAbility", - "icon": "$media:icon", - "srcLanguage": "ets", - "description": "$string:description_serviceability", - "visible": true, - "type": "service" - } - ], - "js": [ - { - "mode": { - "syntax": "ets", - "type": "pageAbility" - }, - "pages": [ - "pages/index", - "pages/second" - ], - "name": ".MainAbility", - "window": { - "designWidth": 720, - "autoDesignWidth": false - } - } - ], - "defPermissions": [ - { - "name": "com.ohos.screenlock.DataAbilityShellProvider.PROVIDER" - } - ] - } -} diff --git a/ability/ability_runtime/actsserviceabilityclienttest/actsserviceabilityserversecondrelyhap/entry/src/main/ets/AbilityStage.ts b/ability/ability_runtime/actsserviceabilityclienttest/actsserviceabilityserversecondrelyhap/entry/src/main/ets/AbilityStage.ts deleted file mode 100644 index 397f53c990f5dc467c1dfc84b531bf653b9bf6be..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsserviceabilityclienttest/actsserviceabilityserversecondrelyhap/entry/src/main/ets/AbilityStage.ts +++ /dev/null @@ -1,21 +0,0 @@ -/* - * 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 AbilityStage from "@ohos.app.ability.AbilityStage" - -export default class MyAbilityStage extends AbilityStage { - onCreate() { - console.log("MyAbilityStage onCreate"); - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsserviceabilityclienttest/actsserviceabilityserversecondrelyhap/entry/src/main/ets/MainAbility/MainAbility.ts b/ability/ability_runtime/actsserviceabilityclienttest/actsserviceabilityserversecondrelyhap/entry/src/main/ets/MainAbility/MainAbility.ts deleted file mode 100644 index 0457c24cdee41b8ba8242d7f6275653b81efe442..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsserviceabilityclienttest/actsserviceabilityserversecondrelyhap/entry/src/main/ets/MainAbility/MainAbility.ts +++ /dev/null @@ -1,30 +0,0 @@ -import Ability from '@ohos.app.ability.UIAbility' -export default class MainAbility extends Ability { - onCreate(want, launchParam) { - console.log("jws onCreate"); - } - - onDestroy() { - console.log("jws onDestroy"); - } - - onWindowStageCreate(windowStage) { - console.log("jws onWindowStageCreate"); - } - - onWindowStageDestroy() { - console.log("jws onWindowStageDestroy"); - } - - onForeground() { - console.log("jws onForeground"); - } - - onBackground() { - console.log("jws onBackground"); - } - - call(){ - - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsserviceabilityclienttest/actsserviceabilityserversecondrelyhap/entry/src/main/ets/MainAbility/app.ets b/ability/ability_runtime/actsserviceabilityclienttest/actsserviceabilityserversecondrelyhap/entry/src/main/ets/MainAbility/app.ets deleted file mode 100644 index d0d2a5cd47ed5a1092788289ae2a48953d89be88..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsserviceabilityclienttest/actsserviceabilityserversecondrelyhap/entry/src/main/ets/MainAbility/app.ets +++ /dev/null @@ -1,22 +0,0 @@ -/* - * 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. - */ -export default { - onCreate() { - console.info('Application onCreate') - }, - onDestroy() { - console.info('Application onDestroy') - }, -} \ No newline at end of file diff --git a/ability/ability_runtime/actsserviceabilityclienttest/actsserviceabilityserversecondrelyhap/entry/src/main/ets/MainAbility/pages/index.ets b/ability/ability_runtime/actsserviceabilityclienttest/actsserviceabilityserversecondrelyhap/entry/src/main/ets/MainAbility/pages/index.ets deleted file mode 100644 index 442a0fea6ce604c142497a1bfeb99478902696dd..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsserviceabilityclienttest/actsserviceabilityserversecondrelyhap/entry/src/main/ets/MainAbility/pages/index.ets +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 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 {Core} from '@ohos/hypium' - -@Entry -@Component -struct Index { - aboutToAppear() { - console.info('onShow finish') - const core = Core.getInstance() - core.init() - const configService = core.getDefaultService('config') - configService.setConfig(this) - core.execute() - } - - build() { - Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { - Text('Hello World') - .fontSize(50) - .fontWeight(FontWeight.Bold) - } - .width('100%') - .height('100%') - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsserviceabilityclienttest/actsserviceabilityserversecondrelyhap/entry/src/main/ets/MainAbility/pages/second.ets b/ability/ability_runtime/actsserviceabilityclienttest/actsserviceabilityserversecondrelyhap/entry/src/main/ets/MainAbility/pages/second.ets deleted file mode 100644 index 359eb5ab9c068706363fa2938cccd40d7df25264..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsserviceabilityclienttest/actsserviceabilityserversecondrelyhap/entry/src/main/ets/MainAbility/pages/second.ets +++ /dev/null @@ -1,43 +0,0 @@ -/* - * 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 '@system.router'; - -@Entry -@Component -struct Second { - private content: string = "Second Page" - - build() { - Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { - Text(`${this.content}`) - .fontSize(50) - .fontWeight(FontWeight.Bold) - Button() { - Text('back to index') - .fontSize(20) - .fontWeight(FontWeight.Bold) - }.type(ButtonType.Capsule) - .margin({ - top: 20 - }) - .backgroundColor('#0D9FFB') - .onClick(() => { - router.back() - }) - } - .width('100%') - .height('100%') - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsserviceabilityclienttest/actsserviceabilityserversecondrelyhap/entry/src/main/ets/ServiceAbility/service.ts b/ability/ability_runtime/actsserviceabilityclienttest/actsserviceabilityserversecondrelyhap/entry/src/main/ets/ServiceAbility/service.ts deleted file mode 100644 index 519bd96b39d3f2747cd4b917801bd4f36cd0dc7d..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsserviceabilityclienttest/actsserviceabilityserversecondrelyhap/entry/src/main/ets/ServiceAbility/service.ts +++ /dev/null @@ -1,186 +0,0 @@ -/* - * 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 rpc from "@ohos.rpc"; -import particleAbility from '@ohos.ability.particleAbility' -import commonEvent from '@ohos.commonEvent' -var server_bundleName = "com.amsst.stserviceabilityserver"; -var server_abilityName = "com.amsst.stserviceabilityserver.ServiceAbility"; -var mConnIdJs; -class StubTest extends rpc.RemoteObject { - constructor(des) { - console.info('ACTS_SerivceAbilityServerSecond ====< des = ' + des); - if (typeof des === 'string') { - console.info('ACTS_ super'); - super(des); - } else { - return null; - } - } - - onRemoteRequest(code, data, reply, option) { - if (code === 1) { - console.info("ACTS_SerivceAbilityServerSecond ====< onRemoteRequest code = 1"); - let token = data.readInterfaceToken(); - console.log('ACTS_SerivceAbilityServerSecond ====< onRemoteRequest token:' + token); - let num = data.readInt(); - console.log('ACTS_SerivceAbilityServerSecond ====< onRemoteRequest num:' + num); - this.method(); - num = num + 777; - reply.writeInt(num); - } else { - console.info("ACTS_SerivceAbilityServerSecond ====< onRemoteRequest code not 1"); - } - return true; - } - method() { - console.log('ACTS_SerivceAbilityServerSecond ====< method called.') - } -} - -function sleep(ms) { - return new Promise(resolve => setTimeout(resolve, ms)); -} -export default { - onStart(want) { - console.debug('ACTS_SerivceAbilityServerSecond ====>onStart=' - + want + " , JSON." + JSON.stringify(want)); - commonEvent.publish("ACTS_SerivceAbilityServerSecond_onStart", (err) => { }); - }, - onStop() { - console.debug('ACTS_SerivceAbilityServerSecond ==== { }); - }, - onCommand(want, restart, startId) { - console.debug('ACTS_SerivceAbilityServerSecond ====>onCommand=' - + "JSON(want)=" + JSON.stringify(want) - + " ,restart=" + restart + " ,startId=" + startId); - commonEvent.publish("ACTS_SerivceAbilityServerSecond_onCommand" + "_" + want.action, (err) => { - console.debug("ACTS_SerivceAbilityServerSecond_onCommand" + "_" + want.action + - "err: " + JSON.stringify(err)) - }); - sleep(500) - }, - onConnect(want) { - console.info('ACTS_SerivceAbilityServerSecond ====< onConnect'); - try { - console.debug('ACTS_SerivceAbilityServerSecond ====>onConnect=' - + want + " , JSON." + JSON.stringify(want)); - function onConnectCallback(element, remote) { - console.debug('ACTS_SerivceAbilityServerSecond_onConnectCallback ====> want.action=' - + JSON.stringify(want.action) + " , " + want.action); - console.debug('ACTS_SerivceAbilityServerSecond_onConnectCallback ====> element=' - + JSON.stringify(element) + " , " + element); - console.debug('ACTS_SerivceAbilityServerSecond_onConnectCallback ====> remote=' - + JSON.stringify(remote) + " , " + remote); - if (want.action == 'ServiceConnectService_1500' || want.action == 'ServiceConnectService_1600') { - commonEvent.publish("ACTS_SerivceAbilityServerSecond_onConnect" + "_" + want.action, (err) => { - console.debug("publish = ACTS_SerivceAbilityServerSecond_onConnect" + "_" + want.action); - }); - } - } - - function onDisconnectCallback(element) { - console.debug('ACTS_SerivceAbilityServerSecond_onDisconnectCallback ====> element=' - + JSON.stringify(element) + " , " + element); - } - - function onFailedCallback(code) { - console.debug('ACTS_SerivceAbilityServerSecond_onFailedCallback ====> code=' - + JSON.stringify(code) + " , " + code) - } - if (want.action == 'ServiceConnectService_1500') { - mConnIdJs = particleAbility.connectAbility( - { - bundleName: server_bundleName, - abilityName: server_abilityName, - action: "ServiceConnectService_1501", - }, - { - onConnect: onConnectCallback, - onDisconnect: onDisconnectCallback, - onFailed: onFailedCallback, - }, - ) - } else if (want.action == 'ServiceConnectService_1600') { - mConnIdJs = particleAbility.connectAbility( - { - bundleName: server_bundleName, - abilityName: server_abilityName, - action: "ServiceConnectService_1601", - }, - { - onConnect: onConnectCallback, - onDisconnect: onDisconnectCallback, - onFailed: onFailedCallback, - }, - ) - } else if (want.action == 'ServiceConnectService_1590') { - mConnIdJs = particleAbility.connectAbility( - { - bundleName: server_bundleName, - abilityName: server_abilityName, - action: "ServiceConnectService_1591", - }, - { - onConnect: onConnectCallback, - onDisconnect: onDisconnectCallback, - onFailed: onFailedCallback, - }, - ) - } else { - commonEvent.publish("ACTS_SerivceAbilityServerSecond_onConnect" + "_" + want.action, (err) => { }); - } - } catch (err) { - console.log("ACTS_SerivceAbilityServerSecond ====< error:" + err) - } - console.info('ACTS_SerivceAbilityServerSecond ====< onConnect end'); - return new StubTest("connect-test"); - }, - onDisconnect(want) { - console.debug('ACTS_SerivceAbilityServerSecond ====>onDisConnect=' - + want + " , JSON." + JSON.stringify(want)); - commonEvent.publish("ACTS_SerivceAbilityServerSecond_onDisConnect_" + want.action, (err) => { - if (err.code) { - console.debug('ACTS_SerivceAbilityServerSecond_onDisConnect publish err=====>' + err); - } else { - console.debug('ACTS_SerivceAbilityServerSecond_onDisConnect =====<' - + want.action); - if (want.action == 'ServiceConnectService_1500' || want.action == 'ServiceConnectService_1501' - || want.action == 'ServiceConnectService_1600' || want.action == 'ServiceConnectService_1601' - || want.action == 'ServiceConnectService_1590') { - particleAbility.disconnectAbility(mConnIdJs, (err) => { - console.debug("=ACTS_SerivceAbilityServerSecond_onDisConnect err====>" - + ("json err=") + JSON.stringify(err) + " , " + want.action); - }) - } - } - }); - }, - onReady() { - console.debug('ACTS_SerivceAbilityServerSecond ====onReconnect=' - + want + " , JSON." + JSON.stringify(want)); - }, - OnAbilityConnectDone(element, remoteObject, resultCode) { - console.debug('ACTS_SerivceAbilityServerSecond ====>OnAbilityConnectDone=' - + element + " , JSON." + JSON.stringify(element) - + remoteObject + " , JSON." + JSON.stringify(remoteObject) - + resultCode + " , JSON." + JSON.stringify(resultCode) - ); - commonEvent.publish("ACTS_SerivceAbilityServerSecond_OnAbilityConnectDone", (err) => { }); - }, -}; diff --git a/ability/ability_runtime/actsserviceabilityclienttest/actsserviceabilityserversecondrelyhap/entry/src/main/resources/base/element/string.json b/ability/ability_runtime/actsserviceabilityclienttest/actsserviceabilityserversecondrelyhap/entry/src/main/resources/base/element/string.json deleted file mode 100644 index 745bfaffc123f48189566fbfcbfe4e68bb6edb84..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsserviceabilityclienttest/actsserviceabilityserversecondrelyhap/entry/src/main/resources/base/element/string.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "string": [ - { - "name": "entry_MainAbility", - "value": "ServiceExtAbility" - }, - { - "name": "description_mainability", - "value": "eTS_Empty Ability" - }, - { - "name": "description_serviceability", - "value": "hap sample empty service" - }, - { - "name": "description_dataability", - "value": "hap sample empty provider" - }, - { - "name": "description_mainability2", - "value": "eTS_Empty Ability" - }, - { - "name": "entry_MainAbility2", - "value": "entry_MainAbility2" - }, - { - "name": "description_testdataability", - "value": "hap sample empty provider" - }, - { - "name": "permreason_dataability", - "value": "request dataability premission" - } - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/actsserviceabilityclienttest/actsserviceabilityserversecondrelyhap/entry/src/main/resources/base/media/icon.png b/ability/ability_runtime/actsserviceabilityclienttest/actsserviceabilityserversecondrelyhap/entry/src/main/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actsserviceabilityclienttest/actsserviceabilityserversecondrelyhap/entry/src/main/resources/base/media/icon.png and /dev/null differ diff --git a/ability/ability_runtime/actsserviceabilityclienttest/actsserviceabilityserversecondrelyhap/signature/openharmony_sx.p7b b/ability/ability_runtime/actsserviceabilityclienttest/actsserviceabilityserversecondrelyhap/signature/openharmony_sx.p7b deleted file mode 100644 index d5045699f9afd0744b5242377794d4d091e63201..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actsserviceabilityclienttest/actsserviceabilityserversecondrelyhap/signature/openharmony_sx.p7b and /dev/null differ