diff --git a/ability/ability_runtime/BUILD.gn b/ability/ability_runtime/BUILD.gn index 324d0f1b1da7244b181b706f2c42e876fffb2cf6..f798abccf898a75c1178373edbecdb497952b1e0 100644 --- a/ability/ability_runtime/BUILD.gn +++ b/ability/ability_runtime/BUILD.gn @@ -25,7 +25,6 @@ group("ability_runtime") { "actsabilitydelegatorcase:ActsAbilityDelegatorCaseTest", "actsabilitymanageretstest:ActsAbilityManagerEtsTest", "actsabilityusertest:ActsAbilityuserTest", - "actsappselector:actsappselector", "actscalldataabilitytest:ActsCallDataAbilityTest", "actscalldataabilitytest:ActsCallDataAbilityTest", "actscalltest:actscalltest", diff --git a/ability/ability_runtime/actsappselector/BUILD.gn b/ability/ability_runtime/actsappselector/BUILD.gn deleted file mode 100644 index 94cec912f856013afd4333a39e63ecf1891d6cd1..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/BUILD.gn +++ /dev/null @@ -1,52 +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") - -group("actsappselector") { - testonly = true - if (is_standard_system) { - deps = [ - "actsappselectorpctest:ActsAppSelectorPCTest", - "actsappselectorrelyhap:ActsAppSelectorRelyHap", - "actsappselectortest:ActsAppSelectorTest", - "actsimageaentryrelyhap:ActsImageAEntryRelyHap", - "actsimageafeaturerelyhap:ActsImageAFeatureRelyHap", - "actsimagebentryrelyhap:ActsImageBEntryRelyHap", - "actsimagebfeaturerelyhap:ActsImageBFeatureRelyHap", - "actsimagecentryrelyhap:ActsImageCEntryRelyHap", - "actsimagecfeaturerelyhap:ActsImageCFeatureRelyHap", - "actsimagedrelyhap:ActsImageDRelyHap", - "actsimageerelyhap:ActsImageERelyHap", - "actsimagefrelyhap:ActsImageFRelyHap", - "actsimagegrelyhap:ActsImageGRelyHap", - "actsimagehrelyhap:ActsImageHRelyHap", - "actsimageirelyhap:ActsImageIRelyHap", - "actsimagejrelyhap:ActsImageJRelyHap", - "actsimagekrelyhap:ActsImageKRelyHap", - "actsserviceabilityarelyhap:ActsServiceAbilityARelyHap", - "actsserviceabilitybrelyhap:ActsServiceAbilityBRelyHap", - "actstextarelyhap:ActstextARelyHap", - "actstextbrelyhap:ActstextBRelyHap", - "actstextcrelyhap:ActstextCRelyHap", - "actstextdrelyhap:ActstextDRelyHap", - "actstexterelyhap:ActstextERelyHap", - "actstextfrelyhap:ActstextFRelyHap", - "actstextgrelyhap:ActstextGRelyHap", - "actstexthrelyhap:ActstextHRelyHap", - "actstextirelyhap:ActstextIRelyHap", - "actstextjrelyhap:ActstextJRelyHap", - "actstextkrelyhap:ActstextKRelyHap", - ] - } -} diff --git a/ability/ability_runtime/actsappselector/actsappselectorpctest/AppScope/app.json b/ability/ability_runtime/actsappselector/actsappselectorpctest/AppScope/app.json deleted file mode 100644 index a393ee0a845dfaf49ef5623216dc0eff22aab6ac..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsappselectorpctest/AppScope/app.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "app": { - "bundleName": "com.example.appselectorpctest", - "vendor": "example", - "versionCode": 1000000, - "versionName": "1.0.0", - "icon": "$media:app_icon", - "label": "$string:app_name", - "distributedNotificationEnabled": true, - "keepAlive" : true, - "singleUser": true, - "minAPIVersion": 9, - "targetAPIVersion": 9, - "car": { - "apiCompatibleVersion": 9, - "singleUser": false - } - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsappselectorpctest/AppScope/resources/base/element/string.json b/ability/ability_runtime/actsappselector/actsappselectorpctest/AppScope/resources/base/element/string.json deleted file mode 100644 index 983cb0514901934e3003f407acba6c78fa97b868..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsappselectorpctest/AppScope/resources/base/element/string.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "string": [ - { - "name": "app_name", - "value": "AppSelectorTest" - } - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsappselectorpctest/AppScope/resources/base/media/app_icon.png b/ability/ability_runtime/actsappselector/actsappselectorpctest/AppScope/resources/base/media/app_icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actsappselector/actsappselectorpctest/AppScope/resources/base/media/app_icon.png and /dev/null differ diff --git a/ability/ability_runtime/actsappselector/actsappselectorpctest/BUILD.gn b/ability/ability_runtime/actsappselector/actsappselectorpctest/BUILD.gn deleted file mode 100755 index 050f6a8c2fee394a874d5ef305b5b539d1cd98ec..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsappselectorpctest/BUILD.gn +++ /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("//test/xts/tools/build/suite.gni") - -ohos_js_hap_suite("ActsAppSelectorPCTest") { - hap_profile = "entry/src/main/module.json" - js_build_mode = "debug" - deps = [ - ":actsappselectorpctest_js_assets", - ":actsappselectorpctest_resources", - ] - ets2abc = true - certificate_profile = "signature/openharmony_sx.p7b" - hap_name = "ActsAppSelectorPCTest" - subsystem_name = "ability" - part_name = "ability_runtime" -} - -ohos_app_scope("actsappselectorpctest_app_profile") { - app_profile = "AppScope/app.json" - sources = [ "AppScope/resources" ] -} - -ohos_js_assets("actsappselectorpctest_js_assets") { - source_dir = "entry/src/main/ets" -} - -ohos_resources("actsappselectorpctest_resources") { - sources = [ "entry/src/main/resources" ] - deps = [ ":actsappselectorpctest_app_profile" ] - hap_profile = "entry/src/main/module.json" -} diff --git a/ability/ability_runtime/actsappselector/actsappselectorpctest/Test.json b/ability/ability_runtime/actsappselector/actsappselectorpctest/Test.json deleted file mode 100644 index 2545f010722811a683933cd24bdc0d25db9a55c2..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsappselectorpctest/Test.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "description": "Configuration for aceceshi Tests", - "driver": { - "type": "OHJSUnitTest", - "test-timeout": "600000", - "bundle-name": "com.example.appselectorpctest", - "module-name": "entry", - "shell-timeout": "600000", - "testcase-timeout":"100000" - }, - "kits": [ - { - "type": "ShellKit", - "run-command": [ - "setenforce 0", - "power-shell setmode 602", - "param set persist.ace.testmode.enabled 1", - "hilog -Q pidoff", - "hilog -Q domainoff", - "hilog -b D" - ] - }, - { - "test-file-name": [ - "ActsAppSelectorPCTest.hap" - ], - "type": "AppInstallKit", - "cleanup-apps": true - }, - { - "type": "PushKit", - "push": [ - "ActsAppSelectorRelyHap.hap->/data/ActsAppSelectorRelyHap.hap", - "ActsServiceAbilityARelyHap.hap->/data/ActsServiceAbilityARelyHap.hap", - "ActsServiceAbilityBRelyHap.hap->/data/ActsServiceAbilityBRelyHap.hap", - "ActsImageAEntryRelyHap.hap->/data/ActsImageAEntryRelyHap.hap", - "ActsImageAFeatureRelyHap.hap->/data/ActsImageAFeatureRelyHap.hap", - "ActsImageBEntryRelyHap.hap->/data/ActsImageBEntryRelyHap.hap", - "ActsImageBFeatureRelyHap.hap->/data/ActsImageBFeatureRelyHap.hap", - "ActsImageCEntryRelyHap.hap->/data/ActsImageCEntryRelyHap.hap", - "ActsImageCFeatureRelyHap.hap->/data/ActsImageCFeatureRelyHap.hap", - "ActsImageDRelyHap.hap->/data/ActsImageDRelyHap.hap", - "ActsImageERelyHap.hap->/data/ActsImageERelyHap.hap", - "ActsImageFRelyHap.hap->/data/ActsImageFRelyHap.hap", - "ActsImageGRelyHap.hap->/data/ActsImageGRelyHap.hap", - "ActsImageHRelyHap.hap->/data/ActsImageHRelyHap.hap", - "ActsImageIRelyHap.hap->/data/ActsImageIRelyHap.hap", - "ActsImageJRelyHap.hap->/data/ActsImageJRelyHap.hap", - "ActsImageKRelyHap.hap->/data/ActsImageKRelyHap.hap", - "ActstextARelyHap.hap->/data/ActstextARelyHap.hap", - "ActstextBRelyHap.hap->/data/ActstextBRelyHap.hap", - "ActstextCRelyHap.hap->/data/ActstextCRelyHap.hap", - "ActstextDRelyHap.hap->/data/ActstextDRelyHap.hap", - "ActstextERelyHap.hap->/data/ActstextERelyHap.hap", - "ActstextFRelyHap.hap->/data/ActstextFRelyHap.hap", - "ActstextGRelyHap.hap->/data/ActstextGRelyHap.hap", - "ActstextHRelyHap.hap->/data/ActstextHRelyHap.hap", - "ActstextIRelyHap.hap->/data/ActstextIRelyHap.hap", - "ActstextJRelyHap.hap->/data/ActstextJRelyHap.hap", - "ActstextKRelyHap.hap->/data/ActstextKRelyHap.hap" - ] - } - ] -} - diff --git a/ability/ability_runtime/actsappselector/actsappselectorpctest/entry/src/main/ets/Application/AbilityStage.ts b/ability/ability_runtime/actsappselector/actsappselectorpctest/entry/src/main/ets/Application/AbilityStage.ts deleted file mode 100644 index 0190fb0606f5b60fafe51d094ef1b3c8d69d1da4..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsappselectorpctest/entry/src/main/ets/Application/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.application.AbilityStage" - -export default class MyAbilityStage extends AbilityStage { - onCreate() { - console.log("[Demo] MyAbilityStage onCreate") - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsappselectorpctest/entry/src/main/ets/MainAbility/MainAbility.ts b/ability/ability_runtime/actsappselector/actsappselectorpctest/entry/src/main/ets/MainAbility/MainAbility.ts deleted file mode 100644 index 41c2c986f8d126bc9fa12b16119184a13fca63d9..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsappselectorpctest/entry/src/main/ets/MainAbility/MainAbility.ts +++ /dev/null @@ -1,54 +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.application.Ability' -import AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry' -import { Hypium } from '@ohos/hypium' -import testsuite from '../test/List.test' - -export default class MainAbility extends Ability { - onCreate(want, launchParam) { - console.log('MainAbility onCreate') - globalThis.abilityWant = want; - var abilityDelegator: any - abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() - var abilityDelegatorArguments: any - abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments() - console.info('start run testcase!!!') - Hypium.hypiumTest(abilityDelegator, abilityDelegatorArguments, testsuite) - } - - onDestroy() { - console.log('MainAbility onDestroy') - } - - onWindowStageCreate(windowStage) { - console.log('MainAbility onWindowStageCreate') - windowStage.setUIContent(this.context, 'MainAbility/pages/index', null) - globalThis.abilityContext = this.context; - } - - onWindowStageDestroy() { - console.log('MainAbility onWindowStageDestroy') - } - - onForeground() { - console.log('MainAbility onForeground') - } - - onBackground() { - console.log('MainAbility onBackground') - } - -}; \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsappselectorpctest/entry/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts b/ability/ability_runtime/actsappselector/actsappselectorpctest/entry/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts deleted file mode 100644 index 1b4c5782a516e02419cea30fcbeb81283cb3f2cd..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsappselectorpctest/entry/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts +++ /dev/null @@ -1,72 +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 TestRunner from '@ohos.application.testRunner' -import AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry' - -var abilityDelegator = undefined -var abilityDelegatorArguments = undefined - -function translateParamsToString(parameters) { - const keySet = new Set([ - '-s class', '-s notClass', '-s suite', '-s it', - '-s level', '-s testType', '-s size', '-s timeout' - ]) - let targetParams = ''; - for (const key in parameters) { - if (keySet.has(key)) { - targetParams = `${targetParams} ${key} ${parameters[key]}` - } - } - return targetParams.trim() -} - -async function onAbilityCreateCallback() { - console.log("onAbilityCreateCallback"); -} - -async function addAbilityMonitorCallback(err: any) { - console.info("addAbilityMonitorCallback : " + JSON.stringify(err)) -} - -export default class OpenHarmonyTestRunner implements TestRunner { - constructor() { - } - - onPrepare() { - console.info("OpenHarmonyTestRunner OnPrepare ") - } - - async onRun() { - console.log('OpenHarmonyTestRunner onRun run') - abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments() - abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() - var MainAbilityName = abilityDelegatorArguments.bundleName + '.MainAbility' - let lMonitor = { - abilityName: MainAbilityName, - onAbilityCreate: onAbilityCreateCallback, - }; - abilityDelegator.addAbilityMonitor(lMonitor, addAbilityMonitorCallback) - var cmd = 'aa start -d 0 -a MainAbility' + ' -b ' + abilityDelegatorArguments.bundleName - cmd += ' '+translateParamsToString(abilityDelegatorArguments.parameters) - console.info('cmd : '+cmd) - abilityDelegator.executeShellCommand(cmd, - (err: any, d: any) => { - console.info('executeShellCommand : err : ' + JSON.stringify(err)); - console.info('executeShellCommand : data : ' + d.stdResult); - console.info('executeShellCommand : data : ' + d.exitCode); - }) - console.info('OpenHarmonyTestRunner onRun end') - } -}; \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsappselectorpctest/entry/src/main/ets/pages/index.ets b/ability/ability_runtime/actsappselector/actsappselectorpctest/entry/src/main/ets/pages/index.ets deleted file mode 100644 index 1b6cdc6216cb015082cf70111d41384b3be07f0e..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsappselectorpctest/entry/src/main/ets/pages/index.ets +++ /dev/null @@ -1,31 +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. - */ - @Entry -@Component -struct Index { - @State message: string = 'AppSelectorPC' - - build() { - Row() { - Column() { - Text(this.message) - .fontSize(50) - .fontWeight(FontWeight.Bold) - } - .width('100%') - } - .height('100%') - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsappselectorpctest/entry/src/main/ets/test/Ability.test.ets b/ability/ability_runtime/actsappselector/actsappselectorpctest/entry/src/main/ets/test/Ability.test.ets deleted file mode 100644 index ae886661dcb317d6ca615fc747c88b24e9169982..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsappselectorpctest/entry/src/main/ets/test/Ability.test.ets +++ /dev/null @@ -1,441 +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 { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium' -import commonEvent from '@ohos.commonEvent' -import { BY, UiDriver, UiComponent, MatchPattern } from '@ohos.uitest' -import AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry' - -var abilityDelegator = undefined; -var driver; -var cmdInstall -var cmdUninstall; -var subscriberInfo = { - events: ['AppSelector'] -}; - -function sleep(time) { - return new Promise < void> ((resolve, reject) => { - setTimeout(() => { - resolve(); - }, time) - }) -} - -export default function abilityTest() { - describe('ActsAppSelectorPCTest', function () { - beforeAll(async (done) => { - abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator(); - driver = await UiDriver.create() - await sleep(2000); - done(); - }) - - afterEach(async (done) => { - abilityDelegator.executeShellCommand(cmdUninstall, - async (err: any, d: any) => { - console.log('ACTS_AppSelectorTest cmdUninstall executeShellCommand : err : ' + JSON.stringify(err)); - console.log('ACTS_AppSelectorTest cmdUninstall executeShellCommand : stdResult : ' + d.stdResult); - console.log('ACTS_AppSelectorTest cmdUninstall executeShellCommand : exitCode : ' + d.exitCode); - await sleep(4000); - done(); - }) - }) - - /* - * @tc.number: ACTS_AppSelectorTest_1100 - * @tc.name: Install one image type matching app - * @tc.desc: Install one image type matching app,no application selection box pops up, the app is pulled up - */ - it('ACTS_AppSelectorTest_1100', 0, async function (done) { - console.log("ACTS_AppSelectorTest_1100 --- start") - cmdInstall = 'bm install -p /data/ActsImageAEntryRelyHap.hap;bm install -p /data/ActstextARelyHap.hap'; - cmdUninstall = "bm uninstall -n imagearelyhap;bm uninstall -n textarelyhap.com.example"; - - console.log('ACTS_AppSelectorTest_1100 cmd = ' + cmdInstall); - await abilityDelegator.executeShellCommand(cmdInstall); - await sleep(2000); - globalThis.abilityContext.startAbility( - { - action: "ohos.want.action.viewData", - type: "image/png", - parameters: { - uri: "filePath" - } - }, (error, data) => { - console.debug("ACTS_AppSelectorTest_1100 startAbility " + - JSON.stringify(error) + "," + JSON.stringify(data)); - console.debug("ACTS_AppSelectorTest_1100 startAbility end"); - }) - let subscriber = await commonEvent.createSubscriber(subscriberInfo); - commonEvent.subscribe(subscriber, SubscribeCallBack) - - async function SubscribeCallBack(err, data) { - console.log('ACTS_AppSelectorTest_1100 bundleName = ' + data.parameters.bundleName); - console.log('ACTS_AppSelectorTest_1100 abilityName = ' + data.parameters.abilityName); - console.log('ACTS_AppSelectorTest_1100 type = ' + data.parameters.type); - console.log('ACTS_AppSelectorTest_1100 uri = ' + data.parameters.uri); - console.log('ACTS_AppSelectorTest_1100 event = ' + data.event); - expect(data.event).assertEqual("AppSelector"); - expect(data.parameters.abilityName).assertEqual("MainAbility"); - expect(data.parameters.bundleName).assertEqual("imagearelyhap"); - expect(data.parameters.type).assertEqual("image/png"); - expect(data.parameters.uri).assertEqual("filePath"); - commonEvent.unsubscribe(subscriber, UnSubscribeCallBack) - } - - function UnSubscribeCallBack() { - console.log("ACTS_AppSelectorTest_1100 UnSubscribeCallBack"); - done(); - } - }) - - /* - * @tc.number: ACTS_AppSelectorTest_1200 - * @tc.name: Install one image type matching app - * @tc.desc: Install one image type matching app,no application selection box pops up, the app is pulled up - */ - it('ACTS_AppSelectorTest_1200', 0, async function (done) { - console.log("ACTS_AppSelectorTest_1200 --- start") - cmdInstall = 'bm install -p /data/ActsImageAEntryRelyHap.hap;bm install -p /data/ActsImageBFeatureRelyHap.hap;' + - 'bm install -p /data/ActstextARelyHap.hap'; - cmdUninstall = "bm uninstall -n imagearelyhap;bm uninstall -n imagebrelyhap;" + - "bm uninstall -n textarelyhap.com.example"; - - console.log('ACTS_AppSelectorTest_1200 cmd = ' + cmdInstall); - await abilityDelegator.executeShellCommand(cmdInstall); - - let subscriber = await commonEvent.createSubscriber(subscriberInfo); - globalThis.abilityContext.startAbility( - { - action: "ohos.want.action.viewData", - type: "image/png", - parameters: { - uri: "filePath" - } - }, async (error, data) => { - - console.debug("ACTS_AppSelectorTest_1200 startAbility " + - JSON.stringify(error) + "," + JSON.stringify(data)); - console.debug("ACTS_AppSelectorTest_1200 startAbility end"); - - commonEvent.subscribe(subscriber, SubscribeCallBack) - - await sleep(4000); - console.log("ACTS_AppSelectorTest_1200 findComponent"); - let button = await driver.findComponent(BY.text('imagearelyhap').enabled(true)) - console.log("ACTS_AppSelectorTest_1200 button " + JSON.stringify(button)); - await sleep(4000); - await button.click(); - await sleep(2000); - }) - - async function SubscribeCallBack(err, data) { - console.log('ACTS_AppSelectorTest_1200 bundleName = ' + data.parameters.bundleName); - console.log('ACTS_AppSelectorTest_1200 abilityName = ' + data.parameters.abilityName); - console.log('ACTS_AppSelectorTest_1200 type = ' + data.parameters.type); - console.log('ACTS_AppSelectorTest_1200 uri = ' + data.parameters.uri); - console.log('ACTS_AppSelectorTest_1200 event = ' + data.event); - expect(data.event).assertEqual("AppSelector"); - expect(data.parameters.abilityName).assertEqual("MainAbility"); - expect(data.parameters.bundleName).assertEqual("imagearelyhap"); - expect(data.parameters.type).assertEqual("image/png"); - expect(data.parameters.uri).assertEqual("filePath"); - commonEvent.unsubscribe(subscriber, UnSubscribeCallBack) - } - - function UnSubscribeCallBack() { - console.log("ACTS_AppSelectorTest_1200 UnSubscribeCallBack"); - done(); - } - }) - - /* - * @tc.number: ACTS_AppSelectorTest_1300 - * @tc.name: Install one image type matching app - * @tc.desc: Install one image type matching app,no application selection box pops up, the app is pulled up - */ - it('ACTS_AppSelectorTest_1300', 0, async function (done) { - console.log("ACTS_AppSelectorTest_1300 --- start") - cmdInstall = 'bm install -p /data/ActsImageAEntryRelyHap.hap;bm install -p /data/ActsImageBFeatureRelyHap.hap;' + - 'bm install -p /data/ActsImageCEntryRelyHap.hap;bm install -p /data/ActsImageDRelyHap.hap;' + - 'bm install -p /data/ActstextARelyHap.hap'; - cmdUninstall = "bm uninstall -n imagearelyhap;bm uninstall -n imagebrelyhap;" + - "bm uninstall -n imagecrelyhap;bm uninstall -n imagedrelyhap;" + - "bm uninstall -n textarelyhap.com.example" - - console.log('ACTS_AppSelectorTest_1300 cmd = ' + cmdInstall); - await abilityDelegator.executeShellCommand(cmdInstall); - - let subscriber = await commonEvent.createSubscriber(subscriberInfo); - globalThis.abilityContext.startAbility( - { - action: "ohos.want.action.viewData", - type: "image/png", - parameters: { - uri: "filePath" - } - }, async (error, data) => { - console.debug("ACTS_AppSelectorTest_1300 startAbility " + - JSON.stringify(error) + "," + JSON.stringify(data)); - console.debug("ACTS_AppSelectorTest_1300 startAbility end"); - - commonEvent.subscribe(subscriber, SubscribeCallBack) - - await sleep(2000); - console.log("ACTS_AppSelectorTest_1300 findComponent"); - let button = await driver.findComponent(BY.text('imagearelyhap').enabled(true)) - console.log("ACTS_AppSelectorTest_1300 button " + JSON.stringify(button)); - await sleep(4000); - await button.click(); - await sleep(2000); - }) - - async function SubscribeCallBack(err, data) { - console.log('ACTS_AppSelectorTest_1300 bundleName = ' + data.parameters.bundleName); - console.log('ACTS_AppSelectorTest_1300 abilityName = ' + data.parameters.abilityName); - console.log('ACTS_AppSelectorTest_1300 type = ' + data.parameters.type); - console.log('ACTS_AppSelectorTest_1300 uri = ' + data.parameters.uri); - console.log('ACTS_AppSelectorTest_1300 event = ' + data.event); - expect(data.event).assertEqual("AppSelector"); - expect(data.parameters.abilityName).assertEqual("MainAbility"); - expect(data.parameters.bundleName).assertEqual("imagearelyhap"); - expect(data.parameters.type).assertEqual("image/png"); - expect(data.parameters.uri).assertEqual("filePath"); - commonEvent.unsubscribe(subscriber, UnSubscribeCallBack) - } - - function UnSubscribeCallBack() { - console.log("ACTS_AppSelectorTest_1300 UnSubscribeCallBack"); - done(); - } - }) - - /* - * @tc.number: ACTS_AppSelectorTest_1400 - * @tc.name: Install one image type matching app - * @tc.desc: Install one image type matching app,no application selection box pops up, the app is pulled up - */ - it('ACTS_AppSelectorTest_1400', 0, async function (done) { - console.log("ACTS_AppSelectorTest_1400 --- start") - cmdInstall = 'bm install -p /data/ActsImageAEntryRelyHap.hap;bm install -p /data/ActsImageBFeatureRelyHap.hap;' + - 'bm install -p /data/ActsImageCEntryRelyHap.hap;bm install -p /data/ActsImageDRelyHap.hap;' + - 'bm install -p /data/ActsImageERelyHap.hap;bm install -p /data/ActsImageFRelyHap.hap;bm install -p /data/ActsImageGRelyHap.hap;' + - 'bm install -p /data/ActsImageHRelyHap.hap;bm install -p /data/ActsImageIRelyHap.hap;' - cmdUninstall = "bm uninstall -n imagearelyhap;bm uninstall -n imagebrelyhap;bm uninstall -n imagecrelyhap;" + - "bm uninstall -n imagedrelyhap;bm uninstall -n imageerelyhap;bm uninstall -n imagefrelyhap;bm uninstall -n imagegrelyhap;" + - "bm uninstall -n imagehrelyhap;bm uninstall -n imageirelyhap;" - - console.log('ACTS_AppSelectorTest_1400 cmd = ' + cmdInstall); - await abilityDelegator.executeShellCommand(cmdInstall); - - let subscriber = await commonEvent.createSubscriber(subscriberInfo); - - globalThis.abilityContext.startAbility( - { - action: "ohos.want.action.viewData", - type: "image/png", - parameters: { - uri: "filePath" - } - }, async (error, data) => { - console.debug("ACTS_AppSelectorTest_1400 startAbility " + - JSON.stringify(error) + "," + JSON.stringify(data)); - console.debug("ACTS_AppSelectorTest_1400 startAbility end"); - - await sleep(2000); - commonEvent.subscribe(subscriber, SubscribeCallBack) - await sleep(4000); - await driver.swipe(529, 921, 185, 921) - await sleep(4000); - await driver.click(142,749); - await sleep(2000); - }) - async function SubscribeCallBack(err, data) { - console.log('ACTS_AppSelectorTest_1400 bundleName = ' + data.parameters.bundleName); - console.log('ACTS_AppSelectorTest_1400 abilityName = ' + data.parameters.abilityName); - console.log('ACTS_AppSelectorTest_1400 type = ' + data.parameters.type); - console.log('ACTS_AppSelectorTest_1400 uri = ' + data.parameters.uri); - console.log('ACTS_AppSelectorTest_1400 event = ' + data.event); - expect(data.event).assertEqual("AppSelector"); - expect(data.parameters.abilityName).assertEqual("MainAbility"); - expect(data.parameters.bundleName).assertEqual("imagehrelyhap"); - expect(data.parameters.type).assertEqual("image/png"); - expect(data.parameters.uri).assertEqual("filePath"); - commonEvent.unsubscribe(subscriber, UnSubscribeCallBack) - } - - function UnSubscribeCallBack() { - console.log("ACTS_AppSelectorTest_1400 UnSubscribeCallBack"); - done(); - } - }) - - /* - * @tc.number: ACTS_AppSelectorTest_1500 - * @tc.name: Install one image type matching app - * @tc.desc: Install one image type matching app,no application selection box pops up, the app is pulled up - */ - it('ACTS_AppSelectorTest_1500', 0, async function (done) { - console.log("ACTS_AppSelectorTest_1500 --- start") - cmdInstall = 'bm install -p /data/ActsImageAEntryRelyHap.hap;bm install -p /data/ActsImageBFeatureRelyHap.hap;' - cmdUninstall = "bm uninstall -n imagearelyhap;bm uninstall -n imagebrelyhap;" - - console.log('ACTS_AppSelectorTest_1500 cmd = ' + cmdInstall); - await abilityDelegator.executeShellCommand(cmdInstall); - - let subscriber = await commonEvent.createSubscriber(subscriberInfo); - globalThis.abilityContext.startAbility( - { - action: "ohos.want.action.viewData", - type: "image/png", - parameters: { - uri: "filePath" - } - }, async (error, data) => { - console.debug("ACTS_AppSelectorTest_1500 startAbility " + - JSON.stringify(error) + "," + JSON.stringify(data)); - console.debug("ACTS_AppSelectorTest_1500 startAbility end"); - await sleep(2000); - commonEvent.subscribe(subscriber, SubscribeCallBack) - let button1 = await driver.findComponent(BY.text('使用以下方式打开').enabled(true)) - console.log("ACTS_AppSelectorTest_1500 rectSerial " + JSON.stringify(button1)); - await sleep(4000); - let button2 = await driver.findComponent(BY.text('imagebrelyhap').enabled(true)) - console.log("ACTS_AppSelectorTest_1500 rectSerial " + JSON.stringify(button2)); - - await sleep(4000); - await button1.click(); - await sleep(4000); - await button2.click(); - await sleep(2000); - }) - - async function SubscribeCallBack(err, data) { - console.log('ACTS_AppSelectorTest_1500 bundleName = ' + data.parameters.bundleName); - console.log('ACTS_AppSelectorTest_1500 abilityName = ' + data.parameters.abilityName); - console.log('ACTS_AppSelectorTest_1500 type = ' + data.parameters.type); - console.log('ACTS_AppSelectorTest_1500 uri = ' + data.parameters.uri); - console.log('ACTS_AppSelectorTest_1500 event = ' + data.event); - expect(data.event).assertEqual("AppSelector"); - expect(data.parameters.abilityName).assertEqual("MainAbility1"); - expect(data.parameters.bundleName).assertEqual("imagebrelyhap"); - expect(data.parameters.type).assertEqual("image/png"); - expect(data.parameters.uri).assertEqual("filePath"); - commonEvent.unsubscribe(subscriber, UnSubscribeCallBack) - } - - function UnSubscribeCallBack() { - console.log("ACTS_AppSelectorTest_1500 UnSubscribeCallBack"); - done(); - } - }) - - /* - * @tc.number: ACTS_AppSelectorTest_1600 - * @tc.name: Install one image type matching app - * @tc.desc: Install one image type matching app,no application selection box pops up, the app is pulled up - */ - it('ACTS_AppSelectorTest_1600', 0, async function (done) { - console.log("ACTS_AppSelectorTest_1600 --- start") - cmdInstall = 'bm install -p /data/ActsImageAEntryRelyHap.hap;bm install -p /data/ActsImageBFeatureRelyHap.hap;' - cmdUninstall = "bm uninstall -n imagearelyhap;bm uninstall -n imagebrelyhap;" - - console.log('ACTS_AppSelectorTest_1600 cmd = ' + cmdInstall); - await abilityDelegator.executeShellCommand(cmdInstall); - await sleep(2000); - globalThis.abilityContext.startAbility( - { - action: "ohos.want.action.viewData", - type: "image/png", - parameters: { - uri: "filePath" - } - }, async (error, data) => { - console.debug("ACTS_AppSelectorTest_1600 startAbility " + - JSON.stringify(error) + "," + JSON.stringify(data)); - console.debug("ACTS_AppSelectorTest_1600 startAbility end"); - - await sleep(2000); - console.log("ACTS_AppSelectorTest_1600 findComponent"); - let button = await driver.findComponent(BY.text('取消').enabled(true)) - console.log("ACTS_AppSelectorTest_1600 button " + JSON.stringify(button)); - await sleep(4000); - await button.click(); - - try { - await sleep(2000); - let close = await driver.findComponent(BY.text('取消').enabled(true)) - console.log("ACTS_AppSelectorTest_1600 close " + JSON.stringify(close)); - expect(close == null).assertTrue(); - done(); - } catch (err) { - console.debug("ACTS_AppSelectorTest_1600 catch err: " + JSON.stringify(err)); - console.debug("ACTS_AppSelectorTest_1600 catch err: " + err); - expect(err.code).assertEqual("INTERNAL_ERROR"); - done(); - } - }) - }) - - /* - * @tc.number: ACTS_AppSelectorTest_1700 - * @tc.name: Do not install matching apps - * @tc.desc: Do not install matching apps,"can't open this file" popup - */ - it('ACTS_AppSelectorTest_1700', 0, async function (done) { - console.log("ACTS_AppSelectorTest_1700 --- start") - await sleep(2000); - cmdInstall = 'bm install -p /data/ActsImageJRelyHap.hap' - cmdUninstall = "bm uninstall -n imagejrelyhap"; - globalThis.abilityContext.startAbility( - { - action: "ohos.want.action.viewData", - type: "image/png", - parameters: { - uri: "filePath" - } - }, async (error, data) => { - console.debug("ACTS_AppSelectorTest_1700 startAbility " + - JSON.stringify(error) + "," + JSON.stringify(data)); - console.debug("ACTS_AppSelectorTest_1700 startAbility end"); - - try { - await sleep(2000); - console.log("ACTS_AppSelectorTest_1700 findComponent"); - let cantOpen1 = await driver.findComponent(BY.text('无法打开此文件').enabled(true)) - console.log("ACTS_AppSelectorTest_1700 cantOpen1 " + JSON.stringify(cantOpen1)); - expect(cantOpen1 != null).assertTrue(); - let button = await driver.findComponent(BY.text('知道了').enabled(true)) - console.debug("ACTS_AppSelectorTest_1700 button: " + JSON.stringify(button)) - await sleep(4000); - await button.click(); - await sleep(2000); - - await sleep(1000); - console.debug("ACTS_AppSelectorTest_1700 findComponent"); - let cantOpen2 = await driver.findComponent(BY.text('无法打开此文件').enabled(true)) - console.log("ACTS_AppSelectorTest_1700 cantOpen2 " + JSON.stringify(cantOpen2)); - expect(cantOpen2 == null).assertTrue(); - done(); - } catch (err) { - console.debug("ACTS_AppSelectorTest_1700 catch err: " + JSON.stringify(err)); - console.debug("ACTS_AppSelectorTest_1700 catch err: " + err); - expect(err.code).assertEqual("INTERNAL_ERROR"); - done(); - } - }) - }) - }) -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsappselectorpctest/entry/src/main/ets/test/List.test.ets b/ability/ability_runtime/actsappselector/actsappselectorpctest/entry/src/main/ets/test/List.test.ets deleted file mode 100644 index 8828f3c461f6224c1f8532e6e299c7b1facc2824..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsappselectorpctest/entry/src/main/ets/test/List.test.ets +++ /dev/null @@ -1,19 +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 abilityTest from './Ability.test' - -export default function testsuite() { - abilityTest() -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsappselectorpctest/entry/src/main/module.json b/ability/ability_runtime/actsappselector/actsappselectorpctest/entry/src/main/module.json deleted file mode 100644 index e5c7ab53ae398cc0a5b005dad2c82dc2497ec531..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsappselectorpctest/entry/src/main/module.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "module": { - "name": "entry", - "type": "entry", - "srcEntrance": "./ets/Application/AbilityStage.ts", - "description": "$string:entry_desc", - "mainElement": "MainAbility", - "deviceTypes": [ - "default", - "tablet" - ], - "deliveryWithInstall": true, - "installationFree": false, - "pages": "$profile:main_pages", - "uiSyntax": "ets", - "abilities": [ - { - "name": "MainAbility", - "srcEntrance": "./ets/MainAbility/MainAbility.ts", - "description": "$string:MainAbility_desc", - "icon": "$media:icon", - "label": "$string:MainAbility_label", - "visible": true, - "skills": [ - { - "entities": [ - "entity.system.home" - ], - "actions": [ - "action.system.home" - ] - } - ] - } - ], - "requestPermissions": [ - { - "name":"ohos.permission.START_ABILITIES_FROM_BACKGROUND", - "reason":"need use ohos.permission.START_ABILITIES_FROM_BACKGROUND" - }, - { - "name":"ohos.permission.START_INVISIBLE_ABILITY", - "reason":"need use ohos.permission.START_INVISIBLE_ABILITY" - } - ] - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsappselectorpctest/entry/src/main/resources/base/element/string.json b/ability/ability_runtime/actsappselector/actsappselectorpctest/entry/src/main/resources/base/element/string.json deleted file mode 100644 index 2b8c72be1fb5a552cd53c1fbc08aec477819ea5a..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsappselectorpctest/entry/src/main/resources/base/element/string.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "string": [ - { - "name": "entry_desc", - "value": "description" - }, - { - "name": "MainAbility_desc", - "value": "description" - }, - { - "name": "MainAbility_label", - "value": "label" - }, - { - "name": "MainAbility2_desc", - "value": "description" - }, - { - "name": "MainAbility2_label", - "value": "label" - }, - { - "name": "MainAbility3_desc", - "value": "description" - }, - { - "name": "MainAbility3_label", - "value": "label" - }, - { - "name": "app_name", - "value": "actsstartrunnertest" - }, - { - "name": "description_application", - "value": "demo for test" - } - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsappselectorpctest/entry/src/main/resources/base/media/icon.png b/ability/ability_runtime/actsappselector/actsappselectorpctest/entry/src/main/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actsappselector/actsappselectorpctest/entry/src/main/resources/base/media/icon.png and /dev/null differ diff --git a/ability/ability_runtime/actsappselector/actsappselectorpctest/entry/src/main/resources/base/profile/main_pages.json b/ability/ability_runtime/actsappselector/actsappselectorpctest/entry/src/main/resources/base/profile/main_pages.json deleted file mode 100644 index e291133c8b3c329611da5af30c299ec10589c7c2..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsappselectorpctest/entry/src/main/resources/base/profile/main_pages.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "src": [ - "pages/index" - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsappselectorpctest/signature/openharmony_sx.p7b b/ability/ability_runtime/actsappselector/actsappselectorpctest/signature/openharmony_sx.p7b deleted file mode 100644 index 66b4457a8a81fb8d3356cf46d67226c850944858..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actsappselector/actsappselectorpctest/signature/openharmony_sx.p7b and /dev/null differ diff --git a/ability/ability_runtime/actsappselector/actsappselectorrelyhap/AppScope/app.json b/ability/ability_runtime/actsappselector/actsappselectorrelyhap/AppScope/app.json deleted file mode 100644 index 8043b5a0cc673dddfa054f7bae0c8e555fc543ef..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsappselectorrelyhap/AppScope/app.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "app": { - "bundleName": "com.example.appselectorrelyhap", - "vendor": "example", - "versionCode": 1000000, - "versionName": "1.0.0", - "icon": "$media:app_icon", - "label": "$string:app_name", - "distributedNotificationEnabled": true, - "keepAlive" : true, - "singleUser": true, - "minAPIVersion": 9, - "targetAPIVersion": 9, - "car": { - "apiCompatibleVersion": 9, - "singleUser": false - } - } -} diff --git a/ability/ability_runtime/actsappselector/actsappselectorrelyhap/AppScope/resources/base/element/string.json b/ability/ability_runtime/actsappselector/actsappselectorrelyhap/AppScope/resources/base/element/string.json deleted file mode 100644 index 62800de69e1b240ca8f3a77234cbb12682a38ad2..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsappselectorrelyhap/AppScope/resources/base/element/string.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "string": [ - { - "name": "app_name", - "value": "actsstartrunnertest" - } - ] -} diff --git a/ability/ability_runtime/actsappselector/actsappselectorrelyhap/AppScope/resources/base/media/app_icon.png b/ability/ability_runtime/actsappselector/actsappselectorrelyhap/AppScope/resources/base/media/app_icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actsappselector/actsappselectorrelyhap/AppScope/resources/base/media/app_icon.png and /dev/null differ diff --git a/ability/ability_runtime/actsappselector/actsappselectorrelyhap/BUILD.gn b/ability/ability_runtime/actsappselector/actsappselectorrelyhap/BUILD.gn deleted file mode 100755 index 11839cba8c55a2f7ca8ea7a7df40860c5f37aa28..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsappselectorrelyhap/BUILD.gn +++ /dev/null @@ -1,45 +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("ActsAppSelectorRelyHap") { - hap_profile = "entry/src/main/module.json" - js_build_mode = "debug" - hap_name = "ActsAppSelectorRelyHap" - - testonly = true - deps = [ - ":actsappselectorrelyhap_js_assets", - ":actsappselectorrelyhap_resources", - ] - ets2abc = true - certificate_profile = "signature/openharmony_sx.p7b" - subsystem_name = "ability" - part_name = "ability_runtime" -} - -ohos_app_scope("actsappselectorrelyhap_app_profile") { - app_profile = "AppScope/app.json" - sources = [ "AppScope/resources" ] -} - -ohos_js_assets("actsappselectorrelyhap_js_assets") { - source_dir = "entry/src/main/ets" -} - -ohos_resources("actsappselectorrelyhap_resources") { - sources = [ "entry/src/main/resources" ] - deps = [ ":actsappselectorrelyhap_app_profile" ] - hap_profile = "entry/src/main/module.json" -} diff --git a/ability/ability_runtime/actsappselector/actsappselectorrelyhap/entry/src/main/ets/Application/AbilityStage.ts b/ability/ability_runtime/actsappselector/actsappselectorrelyhap/entry/src/main/ets/Application/AbilityStage.ts deleted file mode 100644 index 0190fb0606f5b60fafe51d094ef1b3c8d69d1da4..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsappselectorrelyhap/entry/src/main/ets/Application/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.application.AbilityStage" - -export default class MyAbilityStage extends AbilityStage { - onCreate() { - console.log("[Demo] MyAbilityStage onCreate") - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsappselectorrelyhap/entry/src/main/ets/MainAbility/MainAbility.ts b/ability/ability_runtime/actsappselector/actsappselectorrelyhap/entry/src/main/ets/MainAbility/MainAbility.ts deleted file mode 100644 index 633ebb3f2e880b9c86212fd2c378d5e7a14feadc..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsappselectorrelyhap/entry/src/main/ets/MainAbility/MainAbility.ts +++ /dev/null @@ -1,62 +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.application.Ability' - -export default class MainAbility extends Ability { - onCreate(want, launchParam) { - console.log("[Demo] MainAbility onCreate") - globalThis.abilityWant = want; - - } - - onDestroy() { - console.log("[Demo] MainAbility onDestroy") - } - - onWindowStageCreate(windowStage) { - // Main window is created, set main page for this ability - console.log("[Demo] MainAbility onWindowStageCreate") - - windowStage.setUIContent(this.context, "pages/index", null) - } - - onWindowStageDestroy() { - // Main window is destroyed, release UI related resources - console.log("[Demo] MainAbility onWindowStageDestroy") - - } - - onForeground() { - // Ability has brought to foreground - console.log("[Demo] MainAbility onForeground") - globalThis.abilityContext = this.context; - globalThis.abilityContext.startAbility( - { - action: "ohos.want.action.viewData", - type: "image/png", - parameters: { - uri: "filePath" - } - }, (error, data) => { - console.log("ACTS_AppSelectorTest_3700 startAbility " + - JSON.stringify(error) + "," + JSON.stringify(data)); - }) - } - - onBackground() { - // Ability has back to background - console.log("[Demo] MainAbility onBackground") - } -}; \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsappselectorrelyhap/entry/src/main/ets/pages/index.ets b/ability/ability_runtime/actsappselector/actsappselectorrelyhap/entry/src/main/ets/pages/index.ets deleted file mode 100644 index f65697aec97cd488048ce4ecc3917b541631c0eb..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsappselectorrelyhap/entry/src/main/ets/pages/index.ets +++ /dev/null @@ -1,31 +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. - */ - @Entry -@Component -struct Index { - @State message: string = 'Hello World1' - - build() { - Row() { - Column() { - Text(this.message) - .fontSize(50) - .fontWeight(FontWeight.Bold) - } - .width('100%') - } - .height('100%') - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsappselectorrelyhap/entry/src/main/module.json b/ability/ability_runtime/actsappselector/actsappselectorrelyhap/entry/src/main/module.json deleted file mode 100644 index 3b55239d095be39f47ef27bcbc8dc3145954a422..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsappselectorrelyhap/entry/src/main/module.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "module": { - "name": "entry", - "type": "entry", - "srcEntrance": "./ets/Application/AbilityStage.ts", - "description": "$string:entry_desc", - "mainElement": "MainAbility", - "deviceTypes": [ - "default", - "tablet" - ], - "deliveryWithInstall": true, - "installationFree": false, - "pages": "$profile:main_pages", - "uiSyntax": "ets", - "abilities": [ - { - "name": "MainAbility", - "srcEntrance": "./ets/MainAbility/MainAbility.ts", - "description": "$string:MainAbility_desc", - "icon": "$media:icon", - "label": "$string:MainAbility_label", - "visible": true, - "skills": [ - { - "entities": [ - "entity.system.home" - ], - "actions": [ - "action.system.home" - ] - } - ] - } - ] - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsappselectorrelyhap/entry/src/main/resources/base/element/string.json b/ability/ability_runtime/actsappselector/actsappselectorrelyhap/entry/src/main/resources/base/element/string.json deleted file mode 100644 index 2b8c72be1fb5a552cd53c1fbc08aec477819ea5a..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsappselectorrelyhap/entry/src/main/resources/base/element/string.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "string": [ - { - "name": "entry_desc", - "value": "description" - }, - { - "name": "MainAbility_desc", - "value": "description" - }, - { - "name": "MainAbility_label", - "value": "label" - }, - { - "name": "MainAbility2_desc", - "value": "description" - }, - { - "name": "MainAbility2_label", - "value": "label" - }, - { - "name": "MainAbility3_desc", - "value": "description" - }, - { - "name": "MainAbility3_label", - "value": "label" - }, - { - "name": "app_name", - "value": "actsstartrunnertest" - }, - { - "name": "description_application", - "value": "demo for test" - } - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsappselectorrelyhap/entry/src/main/resources/base/media/icon.png b/ability/ability_runtime/actsappselector/actsappselectorrelyhap/entry/src/main/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actsappselector/actsappselectorrelyhap/entry/src/main/resources/base/media/icon.png and /dev/null differ diff --git a/ability/ability_runtime/actsappselector/actsappselectorrelyhap/entry/src/main/resources/base/profile/main_pages.json b/ability/ability_runtime/actsappselector/actsappselectorrelyhap/entry/src/main/resources/base/profile/main_pages.json deleted file mode 100644 index e291133c8b3c329611da5af30c299ec10589c7c2..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsappselectorrelyhap/entry/src/main/resources/base/profile/main_pages.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "src": [ - "pages/index" - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsappselectorrelyhap/signature/openharmony_sx.p7b b/ability/ability_runtime/actsappselector/actsappselectorrelyhap/signature/openharmony_sx.p7b deleted file mode 100644 index 66b4457a8a81fb8d3356cf46d67226c850944858..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actsappselector/actsappselectorrelyhap/signature/openharmony_sx.p7b and /dev/null differ diff --git a/ability/ability_runtime/actsappselector/actsappselectortest/AppScope/app.json b/ability/ability_runtime/actsappselector/actsappselectortest/AppScope/app.json deleted file mode 100644 index 6ebe8e35024953ae383bdef858249de07e5dce44..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsappselectortest/AppScope/app.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "app": { - "bundleName": "com.example.appselectortest", - "vendor": "example", - "versionCode": 1000000, - "versionName": "1.0.0", - "icon": "$media:app_icon", - "label": "$string:app_name", - "distributedNotificationEnabled": true, - "keepAlive" : true, - "singleUser": true, - "minAPIVersion": 9, - "targetAPIVersion": 9, - "car": { - "apiCompatibleVersion": 9, - "singleUser": false - } - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsappselectortest/AppScope/resources/base/element/string.json b/ability/ability_runtime/actsappselector/actsappselectortest/AppScope/resources/base/element/string.json deleted file mode 100644 index 983cb0514901934e3003f407acba6c78fa97b868..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsappselectortest/AppScope/resources/base/element/string.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "string": [ - { - "name": "app_name", - "value": "AppSelectorTest" - } - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsappselectortest/AppScope/resources/base/media/app_icon.png b/ability/ability_runtime/actsappselector/actsappselectortest/AppScope/resources/base/media/app_icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actsappselector/actsappselectortest/AppScope/resources/base/media/app_icon.png and /dev/null differ diff --git a/ability/ability_runtime/actsappselector/actsappselectortest/BUILD.gn b/ability/ability_runtime/actsappselector/actsappselectortest/BUILD.gn deleted file mode 100755 index 08278d994257a88b101bdf868ad26507726bc5fa..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsappselectortest/BUILD.gn +++ /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("//test/xts/tools/build/suite.gni") - -ohos_js_hap_suite("ActsAppSelectorTest") { - hap_profile = "entry/src/main/module.json" - js_build_mode = "debug" - deps = [ - ":actsappselectortest_js_assets", - ":actsappselectortest_resources", - ] - ets2abc = true - certificate_profile = "signature/openharmony_sx.p7b" - hap_name = "ActsAppSelectorTest" - subsystem_name = "ability" - part_name = "ability_runtime" -} - -ohos_app_scope("actsappselectortest_app_profile") { - app_profile = "AppScope/app.json" - sources = [ "AppScope/resources" ] -} - -ohos_js_assets("actsappselectortest_js_assets") { - source_dir = "entry/src/main/ets" -} - -ohos_resources("actsappselectortest_resources") { - sources = [ "entry/src/main/resources" ] - deps = [ ":actsappselectortest_app_profile" ] - hap_profile = "entry/src/main/module.json" -} diff --git a/ability/ability_runtime/actsappselector/actsappselectortest/Test.json b/ability/ability_runtime/actsappselector/actsappselectortest/Test.json deleted file mode 100644 index dcac3574879dbac24ab26e74088dd2305ebfc6b3..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsappselectortest/Test.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "description": "Configuration for aceceshi Tests", - "driver": { - "type": "OHJSUnitTest", - "test-timeout": "600000", - "bundle-name": "com.example.appselectortest", - "module-name": "entry", - "shell-timeout": "600000", - "testcase-timeout":"300000" - }, - "kits": [ - { - "type": "ShellKit", - "run-command": [ - "setenforce 0", - "power-shell setmode 602", - "param set persist.ace.testmode.enabled 1", - "hilog -Q pidoff", - "hilog -Q domainoff", - "hilog -b D" - ] - }, - { - "test-file-name": [ - "ActsAppSelectorTest.hap" - ], - "type": "AppInstallKit", - "cleanup-apps": true - }, - { - "type": "PushKit", - "push": [ - "ActsAppSelectorRelyHap.hap->/data/ActsAppSelectorRelyHap.hap", - "ActsServiceAbilityARelyHap.hap->/data/ActsServiceAbilityARelyHap.hap", - "ActsServiceAbilityBRelyHap.hap->/data/ActsServiceAbilityBRelyHap.hap", - "ActsImageAEntryRelyHap.hap->/data/ActsImageAEntryRelyHap.hap", - "ActsImageAFeatureRelyHap.hap->/data/ActsImageAFeatureRelyHap.hap", - "ActsImageBEntryRelyHap.hap->/data/ActsImageBEntryRelyHap.hap", - "ActsImageBFeatureRelyHap.hap->/data/ActsImageBFeatureRelyHap.hap", - "ActsImageCEntryRelyHap.hap->/data/ActsImageCEntryRelyHap.hap", - "ActsImageCFeatureRelyHap.hap->/data/ActsImageCFeatureRelyHap.hap", - "ActsImageDRelyHap.hap->/data/ActsImageDRelyHap.hap", - "ActsImageERelyHap.hap->/data/ActsImageERelyHap.hap", - "ActsImageFRelyHap.hap->/data/ActsImageFRelyHap.hap", - "ActsImageGRelyHap.hap->/data/ActsImageGRelyHap.hap", - "ActsImageHRelyHap.hap->/data/ActsImageHRelyHap.hap", - "ActsImageIRelyHap.hap->/data/ActsImageIRelyHap.hap", - "ActsImageJRelyHap.hap->/data/ActsImageJRelyHap.hap", - "ActsImageKRelyHap.hap->/data/ActsImageKRelyHap.hap", - "ActstextARelyHap.hap->/data/ActstextARelyHap.hap", - "ActstextBRelyHap.hap->/data/ActstextBRelyHap.hap", - "ActstextCRelyHap.hap->/data/ActstextCRelyHap.hap", - "ActstextDRelyHap.hap->/data/ActstextDRelyHap.hap", - "ActstextERelyHap.hap->/data/ActstextERelyHap.hap", - "ActstextFRelyHap.hap->/data/ActstextFRelyHap.hap", - "ActstextGRelyHap.hap->/data/ActstextGRelyHap.hap", - "ActstextHRelyHap.hap->/data/ActstextHRelyHap.hap", - "ActstextIRelyHap.hap->/data/ActstextIRelyHap.hap", - "ActstextJRelyHap.hap->/data/ActstextJRelyHap.hap", - "ActstextKRelyHap.hap->/data/ActstextKRelyHap.hap" - ] - } - ] -} - diff --git a/ability/ability_runtime/actsappselector/actsappselectortest/entry/src/main/ets/Application/AbilityStage.ts b/ability/ability_runtime/actsappselector/actsappselectortest/entry/src/main/ets/Application/AbilityStage.ts deleted file mode 100644 index 0190fb0606f5b60fafe51d094ef1b3c8d69d1da4..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsappselectortest/entry/src/main/ets/Application/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.application.AbilityStage" - -export default class MyAbilityStage extends AbilityStage { - onCreate() { - console.log("[Demo] MyAbilityStage onCreate") - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsappselectortest/entry/src/main/ets/MainAbility/MainAbility.ts b/ability/ability_runtime/actsappselector/actsappselectortest/entry/src/main/ets/MainAbility/MainAbility.ts deleted file mode 100644 index c546e58c88a3a4ba91d9388cce5752a38cc4069b..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsappselectortest/entry/src/main/ets/MainAbility/MainAbility.ts +++ /dev/null @@ -1,54 +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.application.Ability' -import AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry' -import { Hypium } from '@ohos/hypium' -import testsuite from '../test/List.test' - -export default class MainAbility extends Ability { - onCreate(want, launchParam) { - console.log('MainAbility onCreate') - globalThis.abilityWant = want; - globalThis.abilityContext = this.context; - var abilityDelegator: any - abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() - var abilityDelegatorArguments: any - abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments() - console.info('start run testcase!!!') - Hypium.hypiumTest(abilityDelegator, abilityDelegatorArguments, testsuite) - } - - onDestroy() { - console.log('MainAbility onDestroy') - } - - onWindowStageCreate(windowStage) { - console.log('MainAbility onWindowStageCreate') - windowStage.setUIContent(this.context, 'MainAbility/pages/index', null) - } - - onWindowStageDestroy() { - console.log('MainAbility onWindowStageDestroy') - } - - onForeground() { - console.log('MainAbility onForeground') - } - - onBackground() { - console.log('MainAbility onBackground') - } - -}; \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsappselectortest/entry/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts b/ability/ability_runtime/actsappselector/actsappselectortest/entry/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts deleted file mode 100644 index 1b4c5782a516e02419cea30fcbeb81283cb3f2cd..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsappselectortest/entry/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts +++ /dev/null @@ -1,72 +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 TestRunner from '@ohos.application.testRunner' -import AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry' - -var abilityDelegator = undefined -var abilityDelegatorArguments = undefined - -function translateParamsToString(parameters) { - const keySet = new Set([ - '-s class', '-s notClass', '-s suite', '-s it', - '-s level', '-s testType', '-s size', '-s timeout' - ]) - let targetParams = ''; - for (const key in parameters) { - if (keySet.has(key)) { - targetParams = `${targetParams} ${key} ${parameters[key]}` - } - } - return targetParams.trim() -} - -async function onAbilityCreateCallback() { - console.log("onAbilityCreateCallback"); -} - -async function addAbilityMonitorCallback(err: any) { - console.info("addAbilityMonitorCallback : " + JSON.stringify(err)) -} - -export default class OpenHarmonyTestRunner implements TestRunner { - constructor() { - } - - onPrepare() { - console.info("OpenHarmonyTestRunner OnPrepare ") - } - - async onRun() { - console.log('OpenHarmonyTestRunner onRun run') - abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments() - abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() - var MainAbilityName = abilityDelegatorArguments.bundleName + '.MainAbility' - let lMonitor = { - abilityName: MainAbilityName, - onAbilityCreate: onAbilityCreateCallback, - }; - abilityDelegator.addAbilityMonitor(lMonitor, addAbilityMonitorCallback) - var cmd = 'aa start -d 0 -a MainAbility' + ' -b ' + abilityDelegatorArguments.bundleName - cmd += ' '+translateParamsToString(abilityDelegatorArguments.parameters) - console.info('cmd : '+cmd) - abilityDelegator.executeShellCommand(cmd, - (err: any, d: any) => { - console.info('executeShellCommand : err : ' + JSON.stringify(err)); - console.info('executeShellCommand : data : ' + d.stdResult); - console.info('executeShellCommand : data : ' + d.exitCode); - }) - console.info('OpenHarmonyTestRunner onRun end') - } -}; \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsappselectortest/entry/src/main/ets/pages/index.ets b/ability/ability_runtime/actsappselector/actsappselectortest/entry/src/main/ets/pages/index.ets deleted file mode 100644 index b136fb5291be2733cdd073b53d6deecb33545f7c..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsappselectortest/entry/src/main/ets/pages/index.ets +++ /dev/null @@ -1,31 +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. - */ -@Entry -@Component -struct Index { - @State message: string = 'AppSelector' - - build() { - Row() { - Column() { - Text(this.message) - .fontSize(50) - .fontWeight(FontWeight.Bold) - } - .width('100%') - } - .height('100%') - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsappselectortest/entry/src/main/ets/test/Ability.test.ets b/ability/ability_runtime/actsappselector/actsappselectortest/entry/src/main/ets/test/Ability.test.ets deleted file mode 100644 index c2cd0088c705e128c6dc299b09d2b05a55a0c0bc..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsappselectortest/entry/src/main/ets/test/Ability.test.ets +++ /dev/null @@ -1,1530 +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 { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium' -import commonEvent from '@ohos.commonEvent' -import { BY, UiDriver, UiComponent, MatchPattern } from '@ohos.uitest' -import AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry' - -var abilityDelegator = undefined; -var driver; -var cmdInstall -var cmdUninstall; -var subscriberInfo = { - events: ['AppSelector'] -}; - -let paConnect = { - onConnect: function (elementName, proxy) { - console.info("AppSelector Service onConnect called."); - }, - onDisconnect: function (elementName) { - console.info("AppSelector Service onDisconnect"); - }, - onFailed: function (code) { - console.info("AppSelector Service onFailed"); - } -}; - -function sleep(time) { - return new Promise < void> ((resolve, reject) => { - setTimeout(() => { - resolve(); - }, time) - }) -} - - -export default function abilityTest() { - describe('ActsAppSelectorTest', function () { - beforeAll(async (done) => { - abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator(); - driver = await UiDriver.create() - await sleep(1000); - done(); - }) - - afterEach(async (done) => { - abilityDelegator.executeShellCommand(cmdUninstall, - async (err: any, d: any) => { - console.info('ACTS_AppSelectorTest cmdUninstall executeShellCommand : err : ' + JSON.stringify(err)); - console.info('ACTS_AppSelectorTest cmdUninstall executeShellCommand : data : ' + d.stdResult); - console.info('ACTS_AppSelectorTest cmdUninstall executeShellCommand : data : ' + d.exitCode); - await sleep(6000); - done(); - }) - }) - - /* - * @tc.number: ACTS_AppSelectorTest_3200 - * @tc.name: Multi-hap application with action and type configured in feature - * @tc.desc: Multi-hap application with action and type configured in feature,mainAbility is pulled up in feature - */ - it('ACTS_AppSelectorTest_3200', 0, async function (done) { - console.log("ACTS_AppSelectorTest_3200 --- start") - cmdInstall = 'bm install -p /data/ActsImageAEntryRelyHap.hap;bm install -p /data/ActsImageBFeatureRelyHap.hap;' + - 'bm install -p /data/ActsImageJRelyHap.hap' - cmdUninstall = "bm uninstall -n imagearelyhap;bm uninstall -n imagebrelyhap;bm uninstall -n imagejrelyhap" - - console.log('ACTS_AppSelectorTest_3200 cmd = ' + cmdInstall); - await abilityDelegator.executeShellCommand(cmdInstall); - await sleep(1000); - let subscriber = await commonEvent.createSubscriber(subscriberInfo); - globalThis.abilityContext.startAbility( - { - action: "ohos.want.action.viewData", - type: "image/png", - parameters: { - uri: "filePath" - } - }, async (error, data) => { - console.debug("ACTS_AppSelectorTest_3200 startAbility " + - JSON.stringify(error) + "," + JSON.stringify(data)); - console.debug("ACTS_AppSelectorTest_3200 startAbility end"); - await sleep(4000); - let button = await driver.findComponent(BY.text('imagearelyhap').enabled(true)) - console.log("ACTS_AppSelectorTest_3200 button " + JSON.stringify(button)); - - await sleep(1000); - globalThis.abilityContext.startAbility( - { - bundleName: "imagejrelyhap", - abilityName: "MainAbility", - }, async (error, data) => { - console.debug("ACTS_AppSelectorTest_3200 startAbility " + - JSON.stringify(error) + "," + JSON.stringify(data)); - console.debug("ACTS_AppSelectorTest_3200 startAbility end"); - - commonEvent.subscribe(subscriber, SubscribeCallBack) - await sleep(6000); - await button.click(); - await sleep(2000); - }) - }) - - async function SubscribeCallBack(err, data) { - console.log('ACTS_AppSelectorTest_3200 bundleName = ' + data.parameters.bundleName); - console.log('ACTS_AppSelectorTest_3200 abilityName = ' + data.parameters.abilityName); - console.log('ACTS_AppSelectorTest_3200 type = ' + data.parameters.type); - console.log('ACTS_AppSelectorTest_3200 uri = ' + data.parameters.uri); - console.log('ACTS_AppSelectorTest_3200 event = ' + data.event); - expect(data.event).assertEqual("AppSelector"); - expect(data.parameters.abilityName).assertEqual("MainAbility"); - expect(data.parameters.bundleName).assertEqual("imagearelyhap"); - expect(data.parameters.type).assertEqual("image/png"); - expect(data.parameters.uri).assertEqual("filePath"); - commonEvent.unsubscribe(subscriber, UnSubscribeCallBack) - } - - function UnSubscribeCallBack() { - console.log("ACTS_AppSelectorTest_3200 UnSubscribeCallBack"); - done(); - } - }) - - /* - * @tc.number: ACTS_AppSelectorTest_0100 - * @tc.name: Install one image type matching app - * @tc.desc: Install one image type matching app,no application selection box pops up, the app is pulled up - */ - it('ACTS_AppSelectorTest_0100', 0, async function (done) { - console.log("ACTS_AppSelectorTest_0100 --- start") - cmdInstall = 'bm install -p /data/ActsImageAEntryRelyHap.hap;bm install -p /data/ActsImageJRelyHap.hap;' + - 'bm install -p /data/ActstextARelyHap.hap'; - cmdUninstall = "bm uninstall -n imagearelyhap;bm uninstall -n imagejrelyhap;" + - "bm uninstall -n textarelyhap.com.example"; - - console.log('ACTS_AppSelectorTest_0100 cmd = ' + cmdInstall); - await abilityDelegator.executeShellCommand(cmdInstall); - await sleep(1000); - globalThis.abilityContext.startAbility( - { - action: "ohos.want.action.viewData", - type: "image/png", - parameters: { - uri: "filePath" - } - }, (error, data) => { - console.log("ACTS_AppSelectorTest_0100 startAbility " + - JSON.stringify(error) + "," + JSON.stringify(data)); - console.log("ACTS_AppSelectorTest_0100 startAbility end"); - }) - - let subscriber = await commonEvent.createSubscriber(subscriberInfo); - commonEvent.subscribe(subscriber, SubscribeCallBack) - - async function SubscribeCallBack(err, data) { - console.log('ACTS_AppSelectorTest_0100 bundleName = ' + data.parameters.bundleName); - console.log('ACTS_AppSelectorTest_0100 abilityName = ' + data.parameters.abilityName); - console.log('ACTS_AppSelectorTest_0100 type = ' + data.parameters.type); - console.log('ACTS_AppSelectorTest_0100 uri = ' + data.parameters.uri); - console.log('ACTS_AppSelectorTest_0100 event = ' + data.event); - expect(data.event).assertEqual("AppSelector"); - expect(data.parameters.abilityName).assertEqual("MainAbility"); - expect(data.parameters.bundleName).assertEqual("imagearelyhap"); - expect(data.parameters.type).assertEqual("image/png"); - expect(data.parameters.uri).assertEqual("filePath"); - commonEvent.unsubscribe(subscriber, UnSubscribeCallBack) - } - - function UnSubscribeCallBack() { - console.log("ACTS_AppSelectorTest_0100 UnSubscribeCallBack"); - done(); - } - }) - - /* - * @tc.number: ACTS_AppSelectorTest_0200 - * @tc.name: Install one text type matching app - * @tc.desc: Install one text type matching app,no application selection box pops up, the app is pulled up - */ - it('ACTS_AppSelectorTest_0200', 0, async function (done) { - console.log("ACTS_AppSelectorTest_0200 --- start") - cmdInstall = 'bm install -p /data/ActstextARelyHap.hap;bm install -p /data/ActstextJRelyHap.hap;' + - 'bm install -p /data/ActsImageAEntryRelyHap.hap '; - cmdUninstall = "bm uninstall -n textarelyhap.com.example;bm uninstall -n textjrelyhap.com.example;" + - "bm uninstall -n imagearelyhap"; - - console.log('ACTS_AppSelectorTest_0200 cmd = ' + cmdInstall); - await abilityDelegator.executeShellCommand(cmdInstall); - await sleep(1000); - globalThis.abilityContext.startAbility( - { - action: "ohos.want.action.viewData", - type: "text/txt", - parameters: { - uri: "filePath" - } - }, (error, data) => { - console.debug("ACTS_AppSelectorTest_0200 startAbility " + - JSON.stringify(error) + "," + JSON.stringify(data)); - console.debug("ACTS_AppSelectorTest_0200 startAbility end"); - }) - - let subscriber = await commonEvent.createSubscriber(subscriberInfo); - commonEvent.subscribe(subscriber, SubscribeCallBack) - - async function SubscribeCallBack(err, data) { - console.log('ACTS_AppSelectorTest_0200 bundleName = ' + data.parameters.bundleName); - console.log('ACTS_AppSelectorTest_0200 abilityName = ' + data.parameters.abilityName); - console.log('ACTS_AppSelectorTest_0200 type = ' + data.parameters.type); - console.log('ACTS_AppSelectorTest_0200 uri = ' + data.parameters.uri); - console.log('ACTS_AppSelectorTest_0200 event = ' + data.event); - expect(data.event).assertEqual("AppSelector"); - expect(data.parameters.abilityName).assertEqual("com.example.entry.MainAbility"); - expect(data.parameters.bundleName).assertEqual("textarelyhap.com.example"); - expect(data.parameters.type).assertEqual("text/txt"); - expect(data.parameters.uri).assertEqual("filePath"); - commonEvent.unsubscribe(subscriber, UnSubscribeCallBack) - } - - function UnSubscribeCallBack() { - console.log("ACTS_AppSelectorTest_0200 UnSubscribeCallBack"); - done(); - } - }) - - /* - * @tc.number: ACTS_AppSelectorTest_0300 - * @tc.name: Install one text type matching app - * @tc.desc: Install one text type matching app,no application selection box pops up, the app is pulled up - */ - it('ACTS_AppSelectorTest_0300', 0, async function (done) { - console.log("ACTS_AppSelectorTest_0300 --- start") - let subscriber; - cmdInstall = 'bm install -p /data/ActstextARelyHap.hap;bm install -p /data/ActstextBRelyHap.hap;' + - 'bm install -p /data/ActstextJRelyHap.hap;bm install -p /data/ActsImageAEntryRelyHap.hap '; - cmdUninstall = "bm uninstall -n textarelyhap.com.example;bm uninstall -n textbrelyhap.com.example;" + - "bm uninstall -n textjrelyhap.com.example;bm uninstall -n imagearelyhap"; - - console.log('ACTS_AppSelectorTest_0300 cmd = ' + cmdInstall); - await abilityDelegator.executeShellCommand(cmdInstall); - await sleep(2000); - globalThis.abilityContext.startAbility( - { - action: "ohos.want.action.viewData", - type: "text/txt", - parameters: { - uri: "filePath" - } - }, async (error, data) => { - console.debug("ACTS_AppSelectorTest_0300 startAbility " + - JSON.stringify(error) + "," + JSON.stringify(data)); - console.debug("ACTS_AppSelectorTest_0300 startAbility end"); - }) - await sleep(2000); - console.log("ACTS_AppSelectorTest_0300 findComponent"); - await sleep(2000); - let button = await driver.findComponent(BY.text('textbrelyhap.com.example').enabled(true)) - console.log("ACTS_AppSelectorTest_0300 button " + JSON.stringify(button)); - subscriber = await commonEvent.createSubscriber(subscriberInfo); - commonEvent.subscribe(subscriber, SubscribeCallBack) - await sleep(4000); - await button.click(); - await sleep(1000); - - async function SubscribeCallBack(err, data) { - console.log('ACTS_AppSelectorTest_0300 SubscribeCallBack'); - console.log('ACTS_AppSelectorTest_0300 bundleName = ' + data.parameters.bundleName); - console.log('ACTS_AppSelectorTest_0300 abilityName = ' + data.parameters.abilityName); - console.log('ACTS_AppSelectorTest_0300 type = ' + data.parameters.type); - console.log('ACTS_AppSelectorTest_0300 uri = ' + data.parameters.uri); - console.log('ACTS_AppSelectorTest_0300 event = ' + data.event); - expect(data.event).assertEqual("AppSelector"); - expect(data.parameters.abilityName).assertEqual("com.example.entry.MainAbility"); - expect(data.parameters.bundleName).assertEqual("textbrelyhap.com.example"); - expect(data.parameters.type).assertEqual("text/txt"); - expect(data.parameters.uri).assertEqual("filePath"); - - commonEvent.unsubscribe(subscriber, UnSubscribeCallBack) - } - - function UnSubscribeCallBack() { - console.log("ACTS_AppSelectorTest_0300 UnSubscribeCallBack"); - done(); - } - }) - - /* - * @tc.number: ACTS_AppSelectorTest_0400 - * @tc.name: Install one text type matching app - * @tc.desc: Install one text type matching app,no application selection box pops up, the app is pulled up - */ - it('ACTS_AppSelectorTest_0400', 0, async function (done) { - console.log("ACTS_AppSelectorTest_0400 --- start") - let subscriber; - cmdInstall = 'bm install -p /data/ActsImageAEntryRelyHap.hap;bm install -p /data/ActsImageBFeatureRelyHap.hap;' + - 'bm install -p /data/ActsImageCEntryRelyHap.hap;bm install -p /data/ActsImageDRelyHap.hap;' + - 'bm install -p /data/ActsImageJRelyHap.hap;bm install -p /data/ActstextARelyHap.hap'; - cmdUninstall = "bm uninstall -n imagearelyhap;bm uninstall -n imagebrelyhap;" + - "bm uninstall -n imagecrelyhap;bm uninstall -n imagedrelyhap;" + - "bm uninstall -n imagejrelyhap;bm uninstall -n textarelyhap.com.example" - - console.log('ACTS_AppSelectorTest_0400 cmd = ' + cmdInstall); - await abilityDelegator.executeShellCommand(cmdInstall); - await sleep(1000); - globalThis.abilityContext.startAbility( - { - action: "ohos.want.action.viewData", - type: "image/png", - parameters: { - uri: "filePath" - } - }, async (error, data) => { - console.debug("ACTS_AppSelectorTest_0400 startAbility " + - JSON.stringify(error) + "," + JSON.stringify(data)); - console.debug("ACTS_AppSelectorTest_0400 startAbility end"); - - subscriber = await commonEvent.createSubscriber(subscriberInfo); - commonEvent.subscribe(subscriber, SubscribeCallBack) - await sleep(2000); - console.log("ACTS_AppSelectorTest_0400 findComponent"); - await sleep(2000); - let button = await driver.findComponent(BY.text('imagebrelyhap').enabled(true)) - console.log("ACTS_AppSelectorTest_0400 button " + JSON.stringify(button)); - await sleep(4000); - await button.click(); - await sleep(2000); - }) - async function SubscribeCallBack(err, data) { - console.log('ACTS_AppSelectorTest_0400 bundleName = ' + data.parameters.bundleName); - console.log('ACTS_AppSelectorTest_0400 abilityName = ' + data.parameters.abilityName); - console.log('ACTS_AppSelectorTest_0400 type = ' + data.parameters.type); - console.log('ACTS_AppSelectorTest_0400 uri = ' + data.parameters.uri); - console.log('ACTS_AppSelectorTest_0400 event = ' + data.event); - expect(data.event).assertEqual("AppSelector"); - expect(data.parameters.abilityName).assertEqual("MainAbility1"); - expect(data.parameters.bundleName).assertEqual("imagebrelyhap"); - expect(data.parameters.type).assertEqual("image/png"); - expect(data.parameters.uri).assertEqual("filePath"); - commonEvent.unsubscribe(subscriber, UnSubscribeCallBack) - } - - function UnSubscribeCallBack() { - console.log("ACTS_AppSelectorTest_0400 UnSubscribeCallBack"); - done(); - } - }) - - /* - * @tc.number: ACTS_AppSelectorTest_0500 - * @tc.name: Install one text type matching app - * @tc.desc: Install one text type matching app,no application selection box pops up, the app is pulled up - */ - it('ACTS_AppSelectorTest_0500', 0, async function (done) { - console.log("ACTS_AppSelectorTest_0500 --- start") - cmdInstall = 'bm install -p /data/ActsImageAEntryRelyHap.hap;bm install -p /data/ActsImageBFeatureRelyHap.hap;' + - 'bm install -p /data/ActsImageCEntryRelyHap.hap;bm install -p /data/ActsImageDRelyHap.hap;' + - 'bm install -p /data/ActsImageERelyHap.hap;bm install -p /data/ActsImageGRelyHap.hap;' + - 'bm install -p /data/ActsImageHRelyHap.hap;bm install -p /data/ActsImageIRelyHap.hap;' - cmdUninstall = "bm uninstall -n imagearelyhap;bm uninstall -n imagebrelyhap;bm uninstall -n imagecrelyhap;" + - "bm uninstall -n imagedrelyhap;bm uninstall -n imageerelyhap;bm uninstall -n imagegrelyhap;" + - "bm uninstall -n imagehrelyhap;bm uninstall -n imageirelyhap;" - - console.log('ACTS_AppSelectorTest_0500 cmd = ' + cmdInstall); - await abilityDelegator.executeShellCommand(cmdInstall); - await sleep(1000); - let subscriber = await commonEvent.createSubscriber(subscriberInfo); - globalThis.abilityContext.startAbility( - { - action: "ohos.want.action.viewData", - type: "image/png", - parameters: { - uri: "filePath" - } - }, async (error, data) => { - console.debug("ACTS_AppSelectorTest_0500 startAbility " + - JSON.stringify(error) + "," + JSON.stringify(data)); - console.debug("ACTS_AppSelectorTest_0500 startAbility end"); - - commonEvent.subscribe(subscriber, SubscribeCallBack) - await sleep(2000); - console.log("ACTS_AppSelectorTest_0500 findComponent"); - await sleep(2000); - let button = await driver.findComponent(BY.text('imagegrelyhap').enabled(true)) - console.log("ACTS_AppSelectorTest_0500 button " + JSON.stringify(button)); - await sleep(4000); - await button.click(); - await sleep(2000); - }) - - async function SubscribeCallBack(err, data) { - console.log('ACTS_AppSelectorTest_0500 bundleName = ' + data.parameters.bundleName); - console.log('ACTS_AppSelectorTest_0500 abilityName = ' + data.parameters.abilityName); - console.log('ACTS_AppSelectorTest_0500 type = ' + data.parameters.type); - console.log('ACTS_AppSelectorTest_0500 uri = ' + data.parameters.uri); - console.log('ACTS_AppSelectorTest_0500 event = ' + data.event); - expect(data.event).assertEqual("AppSelector"); - expect(data.parameters.abilityName).assertEqual("MainAbility"); - expect(data.parameters.bundleName).assertEqual("imagegrelyhap"); - expect(data.parameters.type).assertEqual("image/png"); - expect(data.parameters.uri).assertEqual("filePath"); - - - commonEvent.unsubscribe(subscriber, UnSubscribeCallBack) - } - - function UnSubscribeCallBack() { - console.log("ACTS_AppSelectorTest_0500 UnSubscribeCallBack"); - done(); - } - }) - - /* - * @tc.number: ACTS_AppSelectorTest_0600 - * @tc.name: Install one text type matching app - * @tc.desc: Install one text type matching app,no application selection box pops up, the app is pulled up - */ - it('ACTS_AppSelectorTest_0600', 0, async function (done) { - console.log("ACTS_AppSelectorTest_0600 --- start") - cmdInstall = 'bm install -p /data/ActstextARelyHap.hap;bm install -p /data/ActstextBRelyHap.hap;' + - 'bm install -p /data/ActstextCRelyHap.hap;bm install -p /data/ActstextDRelyHap.hap;' + - 'bm install -p /data/ActstextERelyHap.hap;bm install -p /data/ActstextFRelyHap.hap;' + - 'bm install -p /data/ActstextGRelyHap.hap;bm install -p /data/ActstextHRelyHap.hap;' + - 'bm install -p /data/ActstextIRelyHap.hap;' - cmdUninstall = "bm uninstall -n textarelyhap.com.example;bm uninstall -n textbrelyhap.com.example;" + - "bm uninstall -n textcrelyhap.com.example;bm uninstall -n textdrelyhap.com.example;" + - "bm uninstall -n texterelyhap.com.example;bm uninstall -n textfrelyhap.com.example;" + - "bm uninstall -n textgrelyhap.com.example;bm uninstall -n texthrelyhap.com.example;" + - "bm uninstall -n textirelyhap.com.example;" - - console.log('ACTS_AppSelectorTest_0600 cmd = ' + cmdInstall); - await abilityDelegator.executeShellCommand(cmdInstall); - await sleep(1000); - let subscriber = await commonEvent.createSubscriber(subscriberInfo); - globalThis.abilityContext.startAbility( - { - action: "ohos.want.action.viewData", - type: "text/txt", - parameters: { - uri: "filePath" - } - }, async (error, data) => { - console.debug("ACTS_AppSelectorTest_0600 startAbility " + - JSON.stringify(error) + "," + JSON.stringify(data)); - console.debug("ACTS_AppSelectorTest_0600 startAbility end"); - - commonEvent.subscribe(subscriber, SubscribeCallBack) - await sleep(4000); - await driver.swipe(529, 921, 185, 921) - await sleep(4000); - await driver.click(142,749); - await sleep(2000); - }) - - async function SubscribeCallBack(err, data) { - console.log('ACTS_AppSelectorTest_0600 bundleName = ' + data.parameters.bundleName); - console.log('ACTS_AppSelectorTest_0600 abilityName = ' + data.parameters.abilityName); - console.log('ACTS_AppSelectorTest_0600 type = ' + data.parameters.type); - console.log('ACTS_AppSelectorTest_0600 uri = ' + data.parameters.uri); - console.log('ACTS_AppSelectorTest_0600 event = ' + data.event); - expect(data.event).assertEqual("AppSelector"); - expect(data.parameters.abilityName).assertEqual("com.example.entry.MainAbility"); - expect(data.parameters.bundleName).assertEqual("textirelyhap.com.example"); - expect(data.parameters.type).assertEqual("text/txt"); - expect(data.parameters.uri).assertEqual("filePath"); - commonEvent.unsubscribe(subscriber, UnSubscribeCallBack) - } - - function UnSubscribeCallBack() { - console.log("ACTS_AppSelectorTest_0600 UnSubscribeCallBack"); - done(); - } - }) - - /* - * @tc.number: ACTS_AppSelectorTest_0700 - * @tc.name: Install one text type matching app - * @tc.desc: Install one text type matching app,no application selection box pops up, the app is pulled up - */ - it('ACTS_AppSelectorTest_0700', 0, async function (done) { - console.log("ACTS_AppSelectorTest_0700 --- start") - cmdInstall = 'bm install -p /data/ActsImageAEntryRelyHap.hap;bm install -p /data/ActsImageBFeatureRelyHap.hap;' - cmdUninstall = "bm uninstall -n imagearelyhap;bm uninstall -n imagebrelyhap;" - - console.log('ACTS_AppSelectorTest_0700 cmd = ' + cmdInstall); - await abilityDelegator.executeShellCommand(cmdInstall); - await sleep(2000); - let subscriber = await commonEvent.createSubscriber(subscriberInfo); - globalThis.abilityContext.startAbility( - { - action: "ohos.want.action.viewData", - type: "image/png", - parameters: { - uri: "filePath" - } - }, async (error, data) => { - console.debug("ACTS_AppSelectorTest_0700 startAbility " + - JSON.stringify(error) + "," + JSON.stringify(data)); - console.debug("ACTS_AppSelectorTest_0700 startAbility end"); - commonEvent.subscribe(subscriber, SubscribeCallBack) - await sleep(4000); - let button = await driver.findComponent(BY.text('imagebrelyhap').enabled(true)) - console.log("ACTS_AppSelectorTest_0700 button " + JSON.stringify(button)); - await sleep(4000); - let rectSerial = await driver.findComponent(BY.text('使用以下方式打开').enabled(true)) - console.log("ACTS_AppSelectorTest_0700 rectSerial " + JSON.stringify(rectSerial)); - await rectSerial.click(); - await sleep(2000); - console.log("ACTS_AppSelectorTest_0700 findComponent"); - - await sleep(4000); - await button.click(); - await sleep(2000); - }) - - async function SubscribeCallBack(err, data) { - console.log('ACTS_AppSelectorTest_0700 bundleName = ' + data.parameters.bundleName); - console.log('ACTS_AppSelectorTest_0700 abilityName = ' + data.parameters.abilityName); - console.log('ACTS_AppSelectorTest_0700 type = ' + data.parameters.type); - console.log('ACTS_AppSelectorTest_0700 uri = ' + data.parameters.uri); - console.log('ACTS_AppSelectorTest_0700 event = ' + data.event); - expect(data.event).assertEqual("AppSelector"); - expect(data.parameters.abilityName).assertEqual("MainAbility1"); - expect(data.parameters.bundleName).assertEqual("imagebrelyhap"); - expect(data.parameters.type).assertEqual("image/png"); - expect(data.parameters.uri).assertEqual("filePath"); - commonEvent.unsubscribe(subscriber, UnSubscribeCallBack) - } - - function UnSubscribeCallBack() { - console.log("ACTS_AppSelectorTest_0700 UnSubscribeCallBack"); - done(); - } - }) - - /* - * @tc.number: ACTS_AppSelectorTest_0800 - * @tc.name: Install one text type matching app - * @tc.desc: Install one text type matching app,no application selection box pops up, the app is pulled up - */ - it('ACTS_AppSelectorTest_0800', 0, async function (done) { - console.log("ACTS_AppSelectorTest_0800 --- start") - cmdInstall = 'bm install -p /data/ActsImageAEntryRelyHap.hap;bm install -p /data/ActsImageBFeatureRelyHap.hap;' - cmdUninstall = "bm uninstall -n imagearelyhap;bm uninstall -n imagebrelyhap;" - - console.log('ACTS_AppSelectorTest_0800 cmd = ' + cmdInstall); - await abilityDelegator.executeShellCommand(cmdInstall); - await sleep(2000); - globalThis.abilityContext.startAbility( - { - action: "ohos.want.action.viewData", - type: "image/png", - parameters: { - uri: "filePath" - } - }, async (error, data) => { - console.debug("ACTS_AppSelectorTest_0800 startAbility " + - JSON.stringify(error) + "," + JSON.stringify(data)); - console.debug("ACTS_AppSelectorTest_0800 startAbility end"); - await sleep(4000); - console.log("ACTS_AppSelectorTest_0800 findComponent"); - let button = await driver.findComponent(BY.text('取消').enabled(true)) - console.log("ACTS_AppSelectorTest_0800 button " + JSON.stringify(button)); - await sleep(4000); - await button.click(); - await sleep(2000); - done(); - - }) - }) - - /* - * @tc.number: ACTS_AppSelectorTest_0900 - * @tc.name: Install one text type matching app - * @tc.desc: Install one text type matching app,no application selection box pops up, the app is pulled up - */ - it('ACTS_AppSelectorTest_0900', 0, async function (done) { - console.log("ACTS_AppSelectorTest_0900 --- start") - cmdInstall = 'bm install -p /data/ActsImageAEntryRelyHap.hap;bm install -p /data/ActsImageBFeatureRelyHap.hap;' + - 'bm install -p /data/ActstextARelyHap.hap;bm install -p /data/ActstextBRelyHap.hap;' + - 'bm install -p /data/ActsServiceAbilityARelyHap.hap;' - cmdUninstall = "bm uninstall -n imagearelyhap;bm uninstall -n imagebrelyhap;" + - "bm uninstall -n textarelyhap.com.example;bm uninstall -n textbrelyhap.com.example;" + - "bm uninstall -n aserviceabilityrelyhap;" - - console.log('ACTS_AppSelectorTest_0900 cmd = ' + cmdInstall); - await abilityDelegator.executeShellCommand(cmdInstall); - await sleep(1000); - - console.info("ACTS_AppSelectorTest_0900 Service servStart"); - let connectionId; - let want = { - "bundleName": "aserviceabilityrelyhap", - "abilityName": "ServiceAbility" - }; - - connectionId = globalThis.abilityContext.connectAbility(want, paConnect) - console.info('ACTS_AppSelectorTest_0900 Service connectionId ' + connectionId); - - let subscriber = await commonEvent.createSubscriber(subscriberInfo); - commonEvent.subscribe(subscriber, SubscribeCallBack) - await sleep(2000); - console.log("ACTS_AppSelectorTest_0900 findComponent"); - let button = await driver.findComponent(BY.text('textbrelyhap.com.example').enabled(true)) - console.log("ACTS_AppSelectorTest_0900 button " + JSON.stringify(button)); - await sleep(4000); - await button.click(); - await sleep(4000); - - async function SubscribeCallBack(err, data) { - console.log('ACTS_AppSelectorTest_0900 bundleName = ' + data.parameters.bundleName); - console.log('ACTS_AppSelectorTest_0900 abilityName = ' + data.parameters.abilityName); - console.log('ACTS_AppSelectorTest_0900 type = ' + data.parameters.type); - console.log('ACTS_AppSelectorTest_0900 uri = ' + data.parameters.uri); - console.log('ACTS_AppSelectorTest_0900 event = ' + data.event); - expect(data.event).assertEqual("AppSelector"); - expect(data.parameters.abilityName).assertEqual("com.example.entry.MainAbility"); - expect(data.parameters.bundleName).assertEqual("textbrelyhap.com.example"); - expect(data.parameters.type).assertEqual("text/txt"); - expect(data.parameters.uri).assertEqual("filePath"); - commonEvent.unsubscribe(subscriber, UnSubscribeCallBack) - } - - function UnSubscribeCallBack() { - console.log("ACTS_AppSelectorTest_0900 UnSubscribeCallBack"); - done(); - } - }) - - /* - * @tc.number: ACTS_AppSelectorTest_1000 - * @tc.name: Install one text type matching app - * @tc.desc: Install one text type matching app,no application selection box pops up, the app is pulled up - */ - it('ACTS_AppSelectorTest_1000', 0, async function (done) { - console.log("ACTS_AppSelectorTest_1000 --- start") - cmdInstall = 'bm install -p /data/ActstextARelyHap.hap;bm install -p /data/ActstextBRelyHap.hap;' - cmdUninstall = "bm uninstall -n textarelyhap.com.example;bm uninstall -n textbrelyhap.com.example;" - - console.log('ACTS_AppSelectorTest_1000 cmd = ' + cmdInstall); - await abilityDelegator.executeShellCommand(cmdInstall); - await sleep(1000); - let subscriber = await commonEvent.createSubscriber(subscriberInfo); - globalThis.abilityContext.startAbilityForResult( - { - action: "ohos.want.action.viewData", - type: "text/txt", - parameters: { - uri: "filePath" - } - }, async (error, data) => { - console.log("ACTS_AppSelectorTest_1000 startAbilityForResult " + - JSON.stringify(error) + "," + JSON.stringify(data)); - }) - await sleep(4000); - console.log("ACTS_AppSelectorTest_1000 findComponent"); - let button = await driver.findComponent(BY.text('textbrelyhap.com.example').enabled(true)) - console.log("ACTS_AppSelectorTest_1000 button " + JSON.stringify(button)); - commonEvent.subscribe(subscriber, SubscribeCallBack) - await sleep(4000); - await button.click(); - await sleep(2000); - - async function SubscribeCallBack(err, data) { - console.log('ACTS_AppSelectorTest_1000 bundleName = ' + data.parameters.bundleName); - console.log('ACTS_AppSelectorTest_1000 abilityName = ' + data.parameters.abilityName); - console.log('ACTS_AppSelectorTest_1000 type = ' + data.parameters.type); - console.log('ACTS_AppSelectorTest_1000 uri = ' + data.parameters.uri); - console.log('ACTS_AppSelectorTest_1000 event = ' + data.event); - expect(data.event).assertEqual("AppSelector"); - expect(data.parameters.abilityName).assertEqual("com.example.entry.MainAbility"); - expect(data.parameters.bundleName).assertEqual("textbrelyhap.com.example"); - expect(data.parameters.type).assertEqual("text/txt"); - expect(data.parameters.uri).assertEqual("filePath"); - commonEvent.unsubscribe(subscriber, UnSubscribeCallBack) - } - async function UnSubscribeCallBack() { - console.log("ACTS_AppSelectorTest_1000 UnSubscribeCallBack"); - try { - await sleep(2000); - let close = await driver.findComponent(BY.text('取消').enabled(true)) - console.log("ACTS_AppSelectorTest_1000 cantOpen2 " + JSON.stringify(close)); - await sleep(4000); - await close.click(); - await sleep(2000); - done(); - } catch (err) { - console.debug("ACTS_AppSelectorTest_1000 catch err: " + JSON.stringify(err)); - console.debug("ACTS_AppSelectorTest_1000 catch err: " + err); - expect("").assertFail(); - done(); - } - } - }) - - /* - * @tc.number: ACTS_AppSelectorTest_1800 - * @tc.name: Install action matches but type does not match app - * @tc.desc: Install action matches but type does not match app,"can't open this file" popup - */ - it('ACTS_AppSelectorTest_1800', 0, async function (done) { - console.log("ACTS_AppSelectorTest_1800 --- start") - cmdInstall = 'bm install -p /data/ActstextARelyHap.hap' - cmdUninstall = "bm uninstall -n textarelyhap.com.example" - - console.log('ACTS_AppSelectorTest_1800 cmd = ' + cmdInstall); - await abilityDelegator.executeShellCommand(cmdInstall); - await sleep(2000); - globalThis.abilityContext.startAbility( - { - action: "ohos.want.action.viewData", - type: "image/png", - parameters: { - uri: "filePath" - } - }, async (error, data) => { - console.debug("ACTS_AppSelectorTest_1800 startAbility " + - JSON.stringify(error) + "," + JSON.stringify(data)); - console.debug("ACTS_AppSelectorTest_1800 startAbility end"); - - - await sleep(4000); - console.log("ACTS_AppSelectorTest_1800 findComponent"); - let cantOpen1 = await driver.findComponent(BY.text('无法打开此文件').enabled(true)) - console.log("ACTS_AppSelectorTest_1800 cantOpen1 " + JSON.stringify(cantOpen1)); - expect(cantOpen1 != null).assertTrue(); - await sleep(4000); - let button = await driver.findComponent(BY.text('知道了').enabled(true)) - console.debug("ACTS_ANROptimization_1800 button: " + JSON.stringify(button)) - await sleep(4000); - await button.click(); - await sleep(2000); - done(); - }) - }) - - /* - * @tc.number: ACTS_AppSelectorTest_1900 - * @tc.name: Install action does not match but type matches app - * @tc.desc: Install action does not match but type matches app,"can't open this file" popup - */ - it('ACTS_AppSelectorTest_1900', 0, async function (done) { - console.log("ACTS_AppSelectorTest_1900 --- start") - cmdInstall = 'bm install -p /data/ActstextKRelyHap.hap' - cmdUninstall = "bm uninstall -n textkrelyhap.com.example" - - console.log('ACTS_AppSelectorTest_1900 cmd = ' + cmdInstall); - await abilityDelegator.executeShellCommand(cmdInstall); - await sleep(2000); - globalThis.abilityContext.startAbility( - { - action: "ohos.want.action.viewData", - type: "text/txt", - parameters: { - uri: "filePath" - } - }, async (error, data) => { - console.debug("ACTS_AppSelectorTest_1900 startAbility " + - JSON.stringify(error) + "," + JSON.stringify(data)); - console.debug("ACTS_AppSelectorTest_1900 startAbility end"); - await sleep(4000); - console.log("ACTS_AppSelectorTest_1900 findComponent"); - let cantOpen1 = await driver.findComponent(BY.text('无法打开此文件').enabled(true)) - console.log("ACTS_AppSelectorTest_1900 cantOpen1 " + JSON.stringify(cantOpen1)); - expect(cantOpen1 != null).assertTrue(); - await sleep(4000); - let button = await driver.findComponent(BY.text('知道了').enabled(true)) - console.debug("ACTS_AppSelectorTest_1900 button: " + JSON.stringify(button)) - await sleep(4000); - await button.click(); - await sleep(2000); - done(); - }) - }) - - /* - * @tc.number: ACTS_AppSelectorTest_2000 - * @tc.name: Implicitly start the interface action and pass in an empty string - * @tc.desc: Implicitly start the interface action and pass in an empty string,return success - */ - it('ACTS_AppSelectorTest_2000', 0, async function (done) { - console.log("ACTS_AppSelectorTest_2000 --- start") - cmdInstall = 'bm install -p /data/ActsImageAEntryRelyHap.hap' - cmdUninstall = "bm uninstall -n imagearelyhap" - - console.log('ACTS_AppSelectorTest_2000 cmd = ' + cmdInstall); - await abilityDelegator.executeShellCommand(cmdInstall); - await sleep(1000); - globalThis.abilityContext.startAbility( - { - action: "", - type: "image/png", - parameters: { - uri: "filePath" - } - }, (error, data) => { - console.log("ACTS_AppSelectorTest_2000 startAbility " + JSON.stringify(error)); - expect(error.code).assertEqual(0); - done(); - }) - }) - - /* - * @tc.number: ACTS_AppSelectorTest_2100 - * @tc.name: Implicitly start the interface action and pass in null - * @tc.desc: Implicitly start the interface action and pass in null,return failure - */ - it('ACTS_AppSelectorTest_2100', 0, async function (done) { - console.log("ACTS_AppSelectorTest_2100 --- start") - cmdInstall = 'bm install -p /data/ActsImageAEntryRelyHap.hap' - cmdUninstall = "bm uninstall -n imagearelyhap" - - console.log('ACTS_AppSelectorTest_2100 cmd = ' + cmdInstall); - await abilityDelegator.executeShellCommand(cmdInstall); - await sleep(1000); - globalThis.abilityContext.startAbility( - { - action: null, - type: "image/png", - parameters: { - uri: "filePath" - } - }, (error, data) => { - console.log("ACTS_AppSelectorTest_2100 startAbility " + JSON.stringify(error)); - expect(error.code).assertEqual(0); - done(); - }) - }) - - /* - * @tc.number: ACTS_AppSelector_2200 - * @tc.name: Implicitly start the interface action and pass in undefined - * @tc.desc: Implicitly start the interface action and pass in undefined,return success - */ - it('ACTS_AppSelectorTest_2200', 0, async function (done) { - console.log("ACTS_AppSelectorTest_2200 --- start") - cmdInstall = 'bm install -p /data/ActsImageAEntryRelyHap.hap' - cmdUninstall = "bm uninstall -n imagearelyhap" - - console.log('ACTS_AppSelectorTest_2200 cmd = ' + cmdInstall); - await abilityDelegator.executeShellCommand(cmdInstall); - await sleep(2000); - globalThis.abilityContext.startAbility( - { - action: undefined, - type: "image/png", - parameters: { - uri: "filePath" - } - }, (error, data) => { - console.log("ACTS_AppSelectorTest_2200 startAbility " + - JSON.stringify(error) + "," + JSON.stringify(data)); - expect(error.code).assertEqual(0); - done(); - }) - }) - - /* - * @tc.number: ACTS_AppSelectorTest_2300 - * @tc.name: Implicitly start the interface type and pass in an empty string - * @tc.desc: Implicitly start the interface type and pass in an empty string,return failure - */ - it('ACTS_AppSelectorTest_2300', 0, async function (done) { - console.log("ACTS_AppSelectorTest_2300 --- start") - cmdInstall = 'bm install -p /data/ActsImageAEntryRelyHap.hap' - cmdUninstall = "bm uninstall -n imagearelyhap" - - console.log('ACTS_AppSelectorTest_2300 cmd = ' + cmdInstall); - await abilityDelegator.executeShellCommand(cmdInstall); - await sleep(2000); - globalThis.abilityContext.startAbility( - { - action: "ohos.want.action.viewData", - type: "", - parameters: { - uri: "filePath" - } - }, async (error, data) => { - console.log("ACTS_AppSelectorTest_2300 startAbility " + - JSON.stringify(error) + "," + JSON.stringify(data)); - expect(error.code).assertEqual(16000050); - await sleep(4000); - let button = await driver.findComponent(BY.text('知道了').enabled(true)) - console.debug("ACTS_AppSelectorTest_2300 button: " + JSON.stringify(button)) - console.debug("ACTS_AppSelectorTest_2300 click"); - await sleep(4000); - await button.click(); - await sleep(2000); - done(); - }) - }) - - /* - * @tc.number: ACTS_AppSelectorTest_2400 - * @tc.name: Implicitly start the interface type and pass in null - * @tc.desc: Implicitly start the interface type and pass in null,return failure - */ - it('ACTS_AppSelectorTest_2400', 0, async function (done) { - console.log("ACTS_AppSelectorTest_2400 --- start") - cmdInstall = 'bm install -p /data/ActsImageAEntryRelyHap.hap' - cmdUninstall = "bm uninstall -n imagearelyhap" - - console.log('ACTS_AppSelectorTest_2400 cmd = ' + cmdInstall); - await abilityDelegator.executeShellCommand(cmdInstall); - await sleep(2000); - globalThis.abilityContext.startAbility( - { - action: "ohos.want.action.viewData", - type: null, - parameters: { - uri: "filePath" - } - }, async (error, data) => { - console.log("ACTS_AppSelectorTest_2400 startAbility " + - JSON.stringify(error) + "," + JSON.stringify(data)); - expect(error.code).assertEqual(16000050); - await sleep(4000); - let button = await driver.findComponent(BY.text('知道了').enabled(true)) - console.debug("ACTS_AppSelectorTest_2400 button: " + JSON.stringify(button)) - console.debug("ACTS_AppSelectorTest_2400 click"); - await sleep(4000); - await button.click(); - await sleep(2000); - done(); - }) - }) - - /* - * @tc.number: ACTS_AppSelectorTest_2500 - * @tc.name: Implicitly start the interface type and pass in undefined - * @tc.desc: Implicitly start the interface type and pass in undefined,return failure - */ - it('ACTS_AppSelectorTest_2500', 0, async function (done) { - console.log("ACTS_AppSelectorTest_2500 --- start") - cmdInstall = 'bm install -p /data/ActsImageAEntryRelyHap.hap' - cmdUninstall = "bm uninstall -n imagearelyhap" - - console.log('ACTS_AppSelectorTest_2500 cmd = ' + cmdInstall); - await abilityDelegator.executeShellCommand(cmdInstall); - await sleep(2000); - globalThis.abilityContext.startAbility( - { - action: "ohos.want.action.viewData", - type: undefined, - parameters: { - uri: "filePath" - } - }, async (error, data) => { - console.log("ACTS_AppSelectorTest_2500 startAbility " + - JSON.stringify(error) + "," + JSON.stringify(data)); - expect(error.code).assertEqual(16000050); - await sleep(4000); - let button = await driver.findComponent(BY.text('知道了').enabled(true)) - console.debug("ACTS_AppSelectorTest_2500 button: " + JSON.stringify(button)) - console.debug("ACTS_AppSelectorTest_2500 click"); - await sleep(4000); - await button.click(); - await sleep(2000); - done(); - }) - }) - - /* - * @tc.number: ACTS_AppSelectorTest_2600 - * @tc.name: Multi-hap application with action and type configured in entry - * @tc.desc: Multi-hap application with action and type configured in entry,MainAbility is pulled up in entry - */ - it('ACTS_AppSelectorTest_2600', 0, async function (done) { - console.log("ACTS_AppSelectorTest_2600 --- start") - cmdInstall = 'bm install -p /data/ActsImageAEntryRelyHap.hap;bm install -p /data/ActsImageAFeatureRelyHap.hap' - cmdUninstall = "bm uninstall -n imagearelyhap" - - console.log('ACTS_AppSelectorTest_2600 cmd = ' + cmdInstall); - await abilityDelegator.executeShellCommand(cmdInstall); - await sleep(2000); - globalThis.abilityContext.startAbility( - { - action: "ohos.want.action.viewData", - type: "image/png", - parameters: { - uri: "filePath" - } - }, (error, data) => { - console.debug("ACTS_AppSelectorTest_2600 startAbility " + - JSON.stringify(error) + "," + JSON.stringify(data)); - console.debug("ACTS_AppSelectorTest_2600 startAbility end"); - }) - let subscriber = await commonEvent.createSubscriber(subscriberInfo); - commonEvent.subscribe(subscriber, SubscribeCallBack) - - async function SubscribeCallBack(err, data) { - console.log('ACTS_AppSelectorTest_2600 bundleName = ' + data.parameters.bundleName); - console.log('ACTS_AppSelectorTest_2600 abilityName = ' + data.parameters.abilityName); - console.log('ACTS_AppSelectorTest_2600 type = ' + data.parameters.type); - console.log('ACTS_AppSelectorTest_2600 uri = ' + data.parameters.uri); - console.log('ACTS_AppSelectorTest_2600 event = ' + data.event); - expect(data.event).assertEqual("AppSelector"); - expect(data.parameters.abilityName).assertEqual("MainAbility"); - expect(data.parameters.bundleName).assertEqual("imagearelyhap"); - expect(data.parameters.type).assertEqual("image/png"); - expect(data.parameters.uri).assertEqual("filePath"); - commonEvent.unsubscribe(subscriber, UnSubscribeCallBack) - } - - function UnSubscribeCallBack() { - console.log("ACTS_AppSelectorTest_2600 UnSubscribeCallBack"); - done(); - } - }) - - /* - * @tc.number: ACTS_AppSelectorTest_2700 - * @tc.name: Multi-hap application with action and type configured in feature - * @tc.desc: Multi-hap application with action and type configured in feature,mainAbility is pulled up in feature - */ - it('ACTS_AppSelectorTest_2700', 0, async function (done) { - console.log("ACTS_AppSelectorTest_2700 --- start") - cmdInstall = 'bm install -p /data/ActsImageBFeatureRelyHap.hap;bm install -p /data/ActsImageBEntryRelyHap.hap' - cmdUninstall = "bm uninstall -n imagebrelyhap" - - console.log('ACTS_AppSelectorTest_2700 cmd = ' + cmdInstall); - await abilityDelegator.executeShellCommand(cmdInstall); - await sleep(2000); - globalThis.abilityContext.startAbility( - { - action: "ohos.want.action.viewData", - type: "image/png", - parameters: { - uri: "filePath" - } - }, (error, data) => { - console.debug("ACTS_AppSelectorTest_2700 startAbility " + - JSON.stringify(error) + "," + JSON.stringify(data)); - console.debug("ACTS_AppSelectorTest_2700 startAbility end"); - }) - let subscriber = await commonEvent.createSubscriber(subscriberInfo); - commonEvent.subscribe(subscriber, SubscribeCallBack) - - async function SubscribeCallBack(err, data) { - console.log('ACTS_AppSelectorTest_2700 bundleName = ' + data.parameters.bundleName); - console.log('ACTS_AppSelectorTest_2700 abilityName = ' + data.parameters.abilityName); - console.log('ACTS_AppSelectorTest_2700 type = ' + data.parameters.type); - console.log('ACTS_AppSelectorTest_2700 uri = ' + data.parameters.uri); - console.log('ACTS_AppSelectorTest_2700 event = ' + data.event); - expect(data.event).assertEqual("AppSelector"); - expect(data.parameters.abilityName).assertEqual("MainAbility1"); - expect(data.parameters.bundleName).assertEqual("imagebrelyhap"); - expect(data.parameters.type).assertEqual("image/png"); - expect(data.parameters.uri).assertEqual("filePath"); - commonEvent.unsubscribe(subscriber, UnSubscribeCallBack) - } - - function UnSubscribeCallBack() { - console.log("ACTS_AppSelectorTest_2700 UnSubscribeCallBack"); - done(); - } - }) - - /* - * @tc.number: ACTS_AppSelectorTest_2800 - * @tc.name: Multi-hap application with action and type configured in feature - * @tc.desc: Multi-hap application with action and type configured in feature,mainAbility is pulled up in feature - */ - it('ACTS_AppSelectorTest_2800', 0, async function (done) { - console.log("ACTS_AppSelectorTest_2800 --- start") - cmdInstall = 'bm install -p /data/ActsImageCEntryRelyHap.hap;bm install -p /data/ActsImageCFeatureRelyHap.hap' - cmdUninstall = "bm uninstall -n imagecrelyhap" - - console.log('ACTS_AppSelectorTest_2800 cmd = ' + cmdInstall); - await abilityDelegator.executeShellCommand(cmdInstall); - await sleep(1000); - let subscriber = await commonEvent.createSubscriber(subscriberInfo); - globalThis.abilityContext.startAbility( - { - action: "ohos.want.action.viewData", - type: "image/png", - parameters: { - uri: "filePath" - } - }, async (error, data) => { - console.debug("ACTS_AppSelectorTest_2800 startAbility " + - JSON.stringify(error) + "," + JSON.stringify(data)); - console.debug("ACTS_AppSelectorTest_2800 startAbility end"); - await sleep(4000); - console.log("ACTS_AppSelectorTest_2800 findComponent"); - let button = await driver.findComponent(BY.text('imagecrelyhap').enabled(true)) - console.log("ACTS_AppSelectorTest_2800 button " + JSON.stringify(button)); - commonEvent.subscribe(subscriber, SubscribeCallBack) - await sleep(4000); - await button.click(); - await sleep(2000); - }) - - async function SubscribeCallBack(err, data) { - console.log('ACTS_AppSelectorTest_2800 bundleName = ' + data.parameters.bundleName); - console.log('ACTS_AppSelectorTest_2800 abilityName = ' + data.parameters.abilityName); - console.log('ACTS_AppSelectorTest_2800 type = ' + data.parameters.type); - console.log('ACTS_AppSelectorTest_2800 uri = ' + data.parameters.uri); - console.log('ACTS_AppSelectorTest_2800 event = ' + data.event); - expect(data.event).assertEqual("AppSelector"); - expect(data.parameters.abilityName).assertEqual("MainAbility"); - expect(data.parameters.bundleName).assertEqual("imagecrelyhap"); - expect(data.parameters.type).assertEqual("image/png"); - expect(data.parameters.uri).assertEqual("filePath"); - commonEvent.unsubscribe(subscriber, UnSubscribeCallBack) - } - - function UnSubscribeCallBack() { - console.log("ACTS_AppSelectorTest_2800 UnSubscribeCallBack"); - done(); - } - }) - - /* - * @tc.number: ACTS_AppSelectorTest_2900 - * @tc.name: MainAbility configures multi-ability applications of actions and types - * @tc.desc: MainAbility configures multi-ability applications of actions and types,mainAbility is pulled up - */ - it('ACTS_AppSelectorTest_2900', 0, async function (done) { - console.log("ACTS_AppSelectorTest_2900 --- start") - cmdInstall = 'bm install -p /data/ActsImageDRelyHap.hap' - cmdUninstall = "bm uninstall -n imagedrelyhap" - - console.log('ACTS_AppSelectorTest_2900 cmd = ' + cmdInstall); - await abilityDelegator.executeShellCommand(cmdInstall); - await sleep(2000); - globalThis.abilityContext.startAbility( - { - action: "ohos.want.action.viewData", - type: "image/png", - parameters: { - uri: "filePath" - } - }, (error, data) => { - console.debug("ACTS_AppSelectorTest_2900 startAbility " + - JSON.stringify(error) + "," + JSON.stringify(data)); - console.debug("ACTS_AppSelectorTest_2900 startAbility end"); - }) - let subscriber = await commonEvent.createSubscriber(subscriberInfo); - commonEvent.subscribe(subscriber, SubscribeCallBack) - - async function SubscribeCallBack(err, data) { - console.log('ACTS_AppSelectorTest_2900 bundleName = ' + data.parameters.bundleName); - console.log('ACTS_AppSelectorTest_2900 abilityName = ' + data.parameters.abilityName); - console.log('ACTS_AppSelectorTest_2900 type = ' + data.parameters.type); - console.log('ACTS_AppSelectorTest_2900 uri = ' + data.parameters.uri); - console.log('ACTS_AppSelectorTest_2900 event = ' + data.event); - expect(data.event).assertEqual("AppSelector"); - expect(data.parameters.abilityName).assertEqual("MainAbility"); - expect(data.parameters.bundleName).assertEqual("imagedrelyhap"); - expect(data.parameters.type).assertEqual("image/png"); - expect(data.parameters.uri).assertEqual("filePath"); - commonEvent.unsubscribe(subscriber, UnSubscribeCallBack) - } - - function UnSubscribeCallBack() { - console.log("ACTS_AppSelectorTest_2900 UnSubscribeCallBack"); - done(); - } - }) - - /* - * @tc.number: ACTS_AppSelectorTest_3000 - * @tc.name: SecondAbility configures multi-ability applications of actions and types - * @tc.desc: SecondAbility configures multi-ability applications of actions and types,secondAbility is pulled up - */ - it('ACTS_AppSelectorTest_3000', 0, async function (done) { - console.log("ACTS_AppSelectorTest_3000 --- start") - cmdInstall = 'bm install -p /data/ActsImageERelyHap.hap' - cmdUninstall = "bm uninstall -n imageerelyhap" - - console.log('ACTS_AppSelectorTest_3000 cmd = ' + cmdInstall); - await abilityDelegator.executeShellCommand(cmdInstall); - await sleep(1000); - globalThis.abilityContext.startAbility( - { - action: "ohos.want.action.viewData", - type: "image/png", - parameters: { - uri: "filePath" - } - }, (error, data) => { - console.debug("ACTS_AppSelectorTest_3000 startAbility " + - JSON.stringify(error) + "," + JSON.stringify(data)); - console.debug("ACTS_AppSelectorTest_3000 startAbility end"); - }) - let subscriber = await commonEvent.createSubscriber(subscriberInfo); - commonEvent.subscribe(subscriber, SubscribeCallBack) - - async function SubscribeCallBack(err, data) { - console.log('ACTS_AppSelectorTest_3000 bundleName = ' + data.parameters.bundleName); - console.log('ACTS_AppSelectorTest_3000 abilityName = ' + data.parameters.abilityName); - console.log('ACTS_AppSelectorTest_3000 type = ' + data.parameters.type); - console.log('ACTS_AppSelectorTest_3000 uri = ' + data.parameters.uri); - console.log('ACTS_AppSelectorTest_3000 event = ' + data.event); - expect(data.event).assertEqual("AppSelector"); - expect(data.parameters.abilityName).assertEqual("SecondAbility"); - expect(data.parameters.bundleName).assertEqual("imageerelyhap"); - expect(data.parameters.type).assertEqual("image/png"); - expect(data.parameters.uri).assertEqual("filePath"); - commonEvent.unsubscribe(subscriber, UnSubscribeCallBack) - } - - function UnSubscribeCallBack() { - console.log("ACTS_AppSelectorTest_3000 UnSubscribeCallBack"); - done(); - } - }) - - /* - * @tc.number: ACTS_AppSelectorTest_3100 - * @tc.name: Multi-hap application with action and type configured in feature - * @tc.desc: Multi-hap application with action and type configured in feature,mainAbility is pulled up in feature - */ - it('ACTS_AppSelectorTest_3100', 0, async function (done) { - console.log("ACTS_AppSelectorTest_3100 --- start") - cmdInstall = 'bm install -p /data/ActsImageFRelyHap.hap' - cmdUninstall = "bm uninstall -n imagefrelyhap" - - console.log('ACTS_AppSelectorTest_3100 cmd = ' + cmdInstall); - await abilityDelegator.executeShellCommand(cmdInstall); - await sleep(1000); - let subscriber = await commonEvent.createSubscriber(subscriberInfo); - globalThis.abilityContext.startAbility( - { - action: "ohos.want.action.viewData", - type: "image/png", - parameters: { - uri: "filePath" - } - }, async (error, data) => { - console.debug("ACTS_AppSelectorTest_3100 startAbility " + - JSON.stringify(error) + "," + JSON.stringify(data)); - console.debug("ACTS_AppSelectorTest_3100 startAbility end"); - await sleep(4000); - console.log("ACTS_AppSelectorTest_3100 findComponent"); - let button = await driver.findComponent(BY.text('imagefrelyhap').enabled(true)) - console.log("ACTS_AppSelectorTest_3100 button " + JSON.stringify(button)); - commonEvent.subscribe(subscriber, SubscribeCallBack) - await sleep(4000); - await button.click(); - await sleep(2000); - }) - - async function SubscribeCallBack(err, data) { - console.log('ACTS_AppSelectorTest_3100 bundleName = ' + data.parameters.bundleName); - console.log('ACTS_AppSelectorTest_3100 abilityName = ' + data.parameters.abilityName); - console.log('ACTS_AppSelectorTest_3100 type = ' + data.parameters.type); - console.log('ACTS_AppSelectorTest_3100 uri = ' + data.parameters.uri); - console.log('ACTS_AppSelectorTest_3100 event = ' + data.event); - expect(data.event).assertEqual("AppSelector"); - expect(data.parameters.abilityName).assertEqual("MainAbility"); - expect(data.parameters.bundleName).assertEqual("imagefrelyhap"); - expect(data.parameters.type).assertEqual("image/png"); - expect(data.parameters.uri).assertEqual("filePath"); - commonEvent.unsubscribe(subscriber, UnSubscribeCallBack) - } - - function UnSubscribeCallBack() { - console.log("ACTS_AppSelectorTest_3100 UnSubscribeCallBack"); - done(); - } - }) - - /* - * @tc.number: ACTS_AppSelectorTest_3400 - * @tc.name: Multi-hap application with action and type configured in feature - * @tc.desc: Multi-hap application with action and type configured in feature,mainAbility is pulled up in feature - */ - it('ACTS_AppSelectorTest_3400', 0, async function (done) { - console.log("ACTS_AppSelectorTest_3400 --- start") - cmdInstall = 'bm install -p /data/ActsImageAEntryRelyHap.hap;bm install -p /data/ActsImageBFeatureRelyHap.hap' - cmdUninstall = "bm uninstall -n imagearelyhap;bm uninstall -n imagebrelyhap" - - console.log('ACTS_AppSelectorTest_3400 cmd = ' + cmdInstall); - await abilityDelegator.executeShellCommand(cmdInstall); - await sleep(2000); - let subscriber = await commonEvent.createSubscriber(subscriberInfo); - commonEvent.subscribe(subscriber, SubscribeCallBack) - globalThis.abilityContext.startAbilityWithAccount( - { - action: "ohos.want.action.viewData", - type: "image/png", - parameters: { - uri: "filePath" - } - }, 100, (error, data) => { - console.log("ACTS_AppSelectorManual startAbility " + - JSON.stringify(error) + "," + JSON.stringify(data)); - }) - await sleep(4000); - console.log("ACTS_AppSelectorTest_3400 findComponent"); - let button = await driver.findComponent(BY.text('imagearelyhap').enabled(true)) - console.log("ACTS_AppSelectorTest_3400 button " + JSON.stringify(button)); - await sleep(4000); - await button.click(); - await sleep(2000); - async function SubscribeCallBack(err, data) { - console.log('ACTS_AppSelectorTest_3400 bundleName = ' + data.parameters.bundleName); - console.log('ACTS_AppSelectorTest_3400 abilityName = ' + data.parameters.abilityName); - console.log('ACTS_AppSelectorTest_3400 type = ' + data.parameters.type); - console.log('ACTS_AppSelectorTest_3400 uri = ' + data.parameters.uri); - console.log('ACTS_AppSelectorTest_3400 event = ' + data.event); - expect(data.event).assertEqual("AppSelector"); - expect(data.parameters.abilityName).assertEqual("MainAbility"); - expect(data.parameters.bundleName).assertEqual("imagearelyhap"); - expect(data.parameters.type).assertEqual("image/png"); - expect(data.parameters.uri).assertEqual("filePath"); - commonEvent.unsubscribe(subscriber, UnSubscribeCallBack) - } - - function UnSubscribeCallBack() { - console.log("ACTS_AppSelectorTest_3400 UnSubscribeCallBack"); - done(); - } - }) - - /* - * @tc.number: ACTS_AppSelectorTest_3500 - * @tc.name: Multi-hap application with action and type configured in feature - * @tc.desc: Multi-hap application with action and type configured in feature,mainAbility is pulled up in feature - */ - it('ACTS_AppSelectorTest_3500', 0, async function (done) { - console.log("ACTS_AppSelectorTest_3500 --- start") - cmdInstall = 'bm install -p /data/ActsImageAEntryRelyHap.hap;bm install -p /data/ActsImageBFeatureRelyHap.hap' - cmdUninstall = "bm uninstall -n imagearelyhap;bm uninstall -n imagebrelyhap" - - console.log('ACTS_AppSelectorTest_3500 cmd = ' + cmdInstall); - await abilityDelegator.executeShellCommand(cmdInstall); - await sleep(2000); - let subscriber = await commonEvent.createSubscriber(subscriberInfo); - commonEvent.subscribe(subscriber, SubscribeCallBack) - globalThis.abilityContext.startAbilityForResultWithAccount( - { - action: "ohos.want.action.viewData", - type: "image/png", - parameters: { - uri: "filePath" - } - }, 100, (error, data) => { - console.log("ACTS_AppSelectorManual startAbility " + - JSON.stringify(error) + "," + JSON.stringify(data)); - }) - await sleep(4000); - console.log("ACTS_AppSelectorTest_3500 findComponent"); - let button = await driver.findComponent(BY.text('imagebrelyhap').enabled(true)) - console.log("ACTS_AppSelectorTest_3500 button " + JSON.stringify(button)); - await sleep(4000); - await button.click(); - await sleep(2000); - async function SubscribeCallBack(err, data) { - console.log('ACTS_AppSelectorTest_3500 bundleName = ' + data.parameters.bundleName); - console.log('ACTS_AppSelectorTest_3500 abilityName = ' + data.parameters.abilityName); - console.log('ACTS_AppSelectorTest_3500 type = ' + data.parameters.type); - console.log('ACTS_AppSelectorTest_3500 uri = ' + data.parameters.uri); - console.log('ACTS_AppSelectorTest_3500 event = ' + data.event); - expect(data.event).assertEqual("AppSelector"); - expect(data.parameters.abilityName).assertEqual("MainAbility1"); - expect(data.parameters.bundleName).assertEqual("imagebrelyhap"); - expect(data.parameters.type).assertEqual("image/png"); - expect(data.parameters.uri).assertEqual("filePath"); - commonEvent.unsubscribe(subscriber, UnSubscribeCallBack) - } - - function UnSubscribeCallBack() { - console.log("ACTS_AppSelectorTest_3500 UnSubscribeCallBack"); - done(); - } - }) - - /* - * @tc.number: ACTS_AppSelectorTest_3600 - * @tc.name: Multi-hap application with action and type configured in feature - * @tc.desc: Multi-hap application with action and type configured in feature,mainAbility is pulled up in feature - */ - it('ACTS_AppSelectorTest_3600', 0, async function (done) { - console.log("ACTS_AppSelectorTest_3600 --- start") - cmdInstall = 'bm install -p /data/ActsServiceAbilityBRelyHap.hap;bm install -p /data/ActsImageKRelyHap.hap' - cmdUninstall = "bm uninstall -n bserviceabilityrelyhap;bm uninstall -n imagekrelyhap" - - console.log('ACTS_AppSelectorTest_3600 cmd = ' + cmdInstall); - await abilityDelegator.executeShellCommand(cmdInstall); - await sleep(2000); - let subscriber = await commonEvent.createSubscriber(subscriberInfo); - commonEvent.subscribe(subscriber, SubscribeCallBack) - console.log("ACTS_AppSelectorTest_3600 connectservice") - - let connectionId; - let want = { - action: "ohos.want.action.viewData", - type: "image/png", - parameters: { - uri: "filePath" - }, - }; - - connectionId = globalThis.abilityContext.connectAbility(want, paConnect) - console.info('ACTS_AppSelectorTest_3600 Service connectionId ' + connectionId); - - async function SubscribeCallBack(err, data) { - console.log('ACTS_AppSelectorTest_3600 bundleName = ' + data.parameters.bundleName); - console.log('ACTS_AppSelectorTest_3600 abilityName = ' + data.parameters.abilityName); - console.log('ACTS_AppSelectorTest_3600 type = ' + data.parameters.type); - console.log('ACTS_AppSelectorTest_3600 uri = ' + data.parameters.uri); - console.log('ACTS_AppSelectorTest_3600 event = ' + data.event); - console.log('ACTS_AppSelectorTest_3600 startByService = ' + data.parameters.startByService); - expect(data.event).assertEqual("AppSelector"); - expect(data.parameters.startByService).assertEqual(true); - commonEvent.unsubscribe(subscriber, UnSubscribeCallBack) - } - - function UnSubscribeCallBack() { - console.log("ACTS_AppSelectorTest_3600 UnSubscribeCallBack"); - done(); - } - }) - - /* - * @tc.number: ACTS_AppSelectorTest_3700 - * @tc.name: Multi-hap application with action and type configured in feature - * @tc.desc: Multi-hap application with action and type configured in feature,mainAbility is pulled up in feature - */ - it('ACTS_AppSelectorTest_3700', 0, async function (done) { - console.log("ACTS_AppSelectorTest_3700 --- start") - cmdInstall = 'bm install -p /data/ActsImageAEntryRelyHap.hap;bm install -p /data/ActsImageBFeatureRelyHap.hap;' + - 'bm install -p /data/ActsAppSelectorRelyHap.hap' - cmdUninstall = "bm uninstall -n imagearelyhap;bm uninstall -n imagebrelyhap;" + - "bm uninstall -n com.example.appselectorrelyhap" - - console.log('ACTS_AppSelectorTest_3700 cmd = ' + cmdInstall); - await abilityDelegator.executeShellCommand(cmdInstall); - await sleep(1000); - globalThis.abilityContext.startAbility( - { - bundleName: "com.example.appselectorrelyhap", - abilityName: "MainAbility", - }, (error, data) => { - console.log("ACTS_AppSelectorTest_3700 startAbility " + - JSON.stringify(error) + "," + JSON.stringify(data)); - }) - await sleep(4000); - let button = await driver.findComponent(BY.text('imagearelyhap').enabled(true)) - console.log("ACTS_AppSelectorTest_3700 button " + JSON.stringify(button)); - - var cmd = 'bm uninstall -n com.example.appselectorrelyhap '; - console.log('ACTS_AppSelectorTest_3700 cmd = ' + cmd); - abilityDelegator.executeShellCommand(cmd, - async (err: any, d: any) => { - console.info('ACTS_AppSelectorTest_3700 executeShellCommand : err : ' + JSON.stringify(err)); - console.info('ACTS_AppSelectorTest_3700 executeShellCommand : stdResult : ' + d.stdResult); - console.info('ACTS_AppSelectorTest_3700 executeShellCommand : exitCode : ' + d.exitCode); - await sleep(4000); - await button.click(); - await sleep(2000); - done(); - }) - }) - - /* - * @tc.number: ACTS_AppSelectorTest_3300 - * @tc.name: Multi-hap application with action and type configured in feature - * @tc.desc: Multi-hap application with action and type configured in feature,mainAbility is pulled up in feature - */ - it('ACTS_AppSelectorTest_3300', 0, async function (done) { - console.log("ACTS_AppSelectorTest_3300 --- start") - cmdInstall = 'bm install -p /data/ActsImageAEntryRelyHap.hap;bm install -p /data/ActsImageBFeatureRelyHap.hap' - cmdUninstall = "bm uninstall -n imagearelyhap;bm uninstall -n imagebrelyhap" - let subscriber; - console.log('ACTS_AppSelectorTest_3300 cmd = ' + cmdInstall); - await abilityDelegator.executeShellCommand(cmdInstall); - await sleep(2000); - - for (var i = 0; i < 10; i++) { - await sleep(2000); - subscriber = await commonEvent.createSubscriber(subscriberInfo); - globalThis.abilityContext.startAbility( - { - action: "ohos.want.action.viewData", - type: "image/png", - parameters: { - uri: "filePath" - } - }, async (error, data) => { - console.log("ACTS_AppSelectorTest_3300 startAbility " + - JSON.stringify(error) + "," + JSON.stringify(data)); - }) - - commonEvent.subscribe(subscriber, SubscribeCallBack); - await sleep(4000); - console.log("ACTS_AppSelectorTest_3300 findComponent"); - let button = await driver.findComponent(BY.text('imagearelyhap').enabled(true)) - console.log("ACTS_AppSelectorTest_3300 button " + JSON.stringify(button)); - await sleep(4000); - await button.click(); - await sleep(2000); - - async function SubscribeCallBack(err, data) { - console.log('ACTS_AppSelectorTest_3300 bundleName = ' + data.parameters.bundleName); - console.log('ACTS_AppSelectorTest_3300 abilityName = ' + data.parameters.abilityName); - console.log('ACTS_AppSelectorTest_3300 type = ' + data.parameters.type); - console.log('ACTS_AppSelectorTest_3300 uri = ' + data.parameters.uri); - console.log('ACTS_AppSelectorTest_3300 event = ' + data.event); - expect(data.event).assertEqual("AppSelector"); - expect(data.parameters.abilityName).assertEqual("MainAbility"); - expect(data.parameters.bundleName).assertEqual("imagearelyhap"); - expect(data.parameters.type).assertEqual("image/png"); - expect(data.parameters.uri).assertEqual("filePath"); - } - } - await sleep(2000); - commonEvent.unsubscribe(subscriber, UnSubscribeCallBack) - - function UnSubscribeCallBack() { - console.log("ACTS_AppSelectorTest_3300 UnSubscribeCallBack"); - done(); - } - }) - }) -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsappselectortest/entry/src/main/ets/test/List.test.ets b/ability/ability_runtime/actsappselector/actsappselectortest/entry/src/main/ets/test/List.test.ets deleted file mode 100644 index 8828f3c461f6224c1f8532e6e299c7b1facc2824..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsappselectortest/entry/src/main/ets/test/List.test.ets +++ /dev/null @@ -1,19 +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 abilityTest from './Ability.test' - -export default function testsuite() { - abilityTest() -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsappselectortest/entry/src/main/module.json b/ability/ability_runtime/actsappselector/actsappselectortest/entry/src/main/module.json deleted file mode 100644 index d597fd34c67cfb1431e537b42009c0e2ec6d355b..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsappselectortest/entry/src/main/module.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "module": { - "name": "entry", - "type": "entry", - "srcEntrance": "./ets/Application/AbilityStage.ts", - "description": "$string:entry_desc", - "mainElement": "MainAbility", - "deviceTypes": [ - "default", - "tablet" - ], - "deliveryWithInstall": true, - "installationFree": false, - "pages": "$profile:main_pages", - "uiSyntax": "ets", - "abilities": [ - { - "name": "MainAbility", - "srcEntrance": "./ets/MainAbility/MainAbility.ts", - "description": "$string:MainAbility_desc", - "icon": "$media:icon", - "label": "$string:MainAbility_label", - "visible": true, - "skills": [ - { - "entities": [ - "entity.system.home" - ], - "actions": [ - "action.system.home" - ] - } - ] - } - ], - "requestPermissions": [ - { - "name":"ohos.permission.START_ABILITIES_FROM_BACKGROUND", - "reason":"need use ohos.permission.START_ABILITIES_FROM_BACKGROUND" - }, - { - "name":"ohos.permission.START_INVISIBLE_ABILITY", - "reason":"need use ohos.permission.START_INVISIBLE_ABILITY" - } - ] - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsappselectortest/entry/src/main/resources/base/element/string.json b/ability/ability_runtime/actsappselector/actsappselectortest/entry/src/main/resources/base/element/string.json deleted file mode 100644 index a042229a98e83f0fecd6510b9240aa0e6b18e3d6..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsappselectortest/entry/src/main/resources/base/element/string.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "string": [ - { - "name": "entry_desc", - "value": "description" - }, - { - "name": "MainAbility_desc", - "value": "description" - }, - { - "name": "MainAbility_label", - "value": "label" - }, - { - "name": "app_name", - "value": "AppSelectorTest" - }, - { - "name": "description_application", - "value": "demo for test" - } - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsappselectortest/entry/src/main/resources/base/media/icon.png b/ability/ability_runtime/actsappselector/actsappselectortest/entry/src/main/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actsappselector/actsappselectortest/entry/src/main/resources/base/media/icon.png and /dev/null differ diff --git a/ability/ability_runtime/actsappselector/actsappselectortest/entry/src/main/resources/base/profile/main_pages.json b/ability/ability_runtime/actsappselector/actsappselectortest/entry/src/main/resources/base/profile/main_pages.json deleted file mode 100644 index e291133c8b3c329611da5af30c299ec10589c7c2..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsappselectortest/entry/src/main/resources/base/profile/main_pages.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "src": [ - "pages/index" - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsappselectortest/signature/openharmony_sx.p7b b/ability/ability_runtime/actsappselector/actsappselectortest/signature/openharmony_sx.p7b deleted file mode 100644 index 66b4457a8a81fb8d3356cf46d67226c850944858..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actsappselector/actsappselectortest/signature/openharmony_sx.p7b and /dev/null differ diff --git a/ability/ability_runtime/actsappselector/actsimageaentryrelyhap/AppScope/app.json b/ability/ability_runtime/actsappselector/actsimageaentryrelyhap/AppScope/app.json deleted file mode 100644 index acb9d83ec9c7c15b36d1656d0f67135832ee207d..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimageaentryrelyhap/AppScope/app.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "app": { - "bundleName": "imagearelyhap", - "vendor": "example", - "versionCode": 1000000, - "versionName": "1.0.0", - "icon": "$media:app_icon", - "label": "$string:app_name", - "distributedNotificationEnabled": true, - "keepAlive" : true, - "singleUser": true, - "minAPIVersion": 9, - "targetAPIVersion": 9, - "car": { - "apiCompatibleVersion": 9, - "singleUser": false - } - } -} diff --git a/ability/ability_runtime/actsappselector/actsimageaentryrelyhap/AppScope/resources/base/element/string.json b/ability/ability_runtime/actsappselector/actsimageaentryrelyhap/AppScope/resources/base/element/string.json deleted file mode 100644 index f5a41012f62766f497f607db33d0a34c69f32dd3..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimageaentryrelyhap/AppScope/resources/base/element/string.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "string": [ - { - "name": "app_name", - "value": "imageARelyHap" - } - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsimageaentryrelyhap/AppScope/resources/base/media/app_icon.png b/ability/ability_runtime/actsappselector/actsimageaentryrelyhap/AppScope/resources/base/media/app_icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actsappselector/actsimageaentryrelyhap/AppScope/resources/base/media/app_icon.png and /dev/null differ diff --git a/ability/ability_runtime/actsappselector/actsimageaentryrelyhap/BUILD.gn b/ability/ability_runtime/actsappselector/actsimageaentryrelyhap/BUILD.gn deleted file mode 100755 index d82bab124d4f2306b6fa81810fdf3b75924453bd..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimageaentryrelyhap/BUILD.gn +++ /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("//test/xts/tools/build/suite.gni") - -ohos_hap_assist_suite("ActsImageAEntryRelyHap") { - hap_profile = "entry/src/main/module.json" - js_build_mode = "debug" - hap_name = "ActsImageAEntryRelyHap" - - testonly = true - deps = [ - ":actsimageaentryrelyhap_js_assets", - ":actsimageaentryrelyhap_resources", - ] - ets2abc = true - certificate_profile = "signature/openharmony_sx.p7b" - subsystem_name = "ability" - part_name = "ability_runtime" -} - -ohos_app_scope("actsimageaentryrelyhap_app_profile") { - app_profile = "AppScope/app.json" - sources = [ "AppScope/resources" ] -} - -ohos_js_assets("actsimageaentryrelyhap_js_assets") { - source_dir = "entry/src/main/ets" -} - -ohos_resources("actsimageaentryrelyhap_resources") { - sources = [ "entry/src/main/resources" ] - deps = [ ":actsimageaentryrelyhap_app_profile" ] - hap_profile = "entry/src/main/module.json" -} diff --git a/ability/ability_runtime/actsappselector/actsimageaentryrelyhap/entry/src/main/ets/Application/AbilityStage.ts b/ability/ability_runtime/actsappselector/actsimageaentryrelyhap/entry/src/main/ets/Application/AbilityStage.ts deleted file mode 100644 index 0190fb0606f5b60fafe51d094ef1b3c8d69d1da4..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimageaentryrelyhap/entry/src/main/ets/Application/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.application.AbilityStage" - -export default class MyAbilityStage extends AbilityStage { - onCreate() { - console.log("[Demo] MyAbilityStage onCreate") - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsimageaentryrelyhap/entry/src/main/ets/MainAbility/MainAbility.ts b/ability/ability_runtime/actsappselector/actsimageaentryrelyhap/entry/src/main/ets/MainAbility/MainAbility.ts deleted file mode 100644 index 76c42708a682982115e9e63459c1e5157eaefe59..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimageaentryrelyhap/entry/src/main/ets/MainAbility/MainAbility.ts +++ /dev/null @@ -1,67 +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.application.Ability' -import commonEvent from '@ohos.commonEvent' - -export default class MainAbility extends Ability { - onCreate(want, launchParam) { - console.log("[Demo] MainAbility onCreate") - globalThis.abilityWant = want; - AppStorage.SetOrCreate('bundleName', want.bundleName); - AppStorage.SetOrCreate('abilityName', want.abilityName); - AppStorage.SetOrCreate('type', want.type); - AppStorage.SetOrCreate('uri', want.parameters.uri); - } - - onDestroy() { - console.log("[Demo] MainAbility onDestroy") - } - - onWindowStageCreate(windowStage) { - // Main window is created, set main page for this ability - console.log("[Demo] MainAbility onWindowStageCreate") - - windowStage.setUIContent(this.context, "pages/index", null) - } - - onWindowStageDestroy() { - // Main window is destroyed, release UI related resources - console.log("[Demo] MainAbility onWindowStageDestroy") - } - - onForeground() { - // Ability has brought to foreground - console.log("[Demo] MainAbility onForeground") - console.log("[Demo] MainAbility onForeground want: " + JSON.stringify(globalThis.abilityWant)) - let commonEventData = { - code: 0, - data: 'imagearelyhap', - parameters: { - abilityName: globalThis.abilityWant.abilityName, - bundleName: globalThis.abilityWant.bundleName, - type: globalThis.abilityWant.type, - uri: globalThis.abilityWant.parameters.uri - } - } - commonEvent.publish('AppSelector', commonEventData, (err) => { - console.log('======>imagearelyhap MainAbility published<======') - }) - } - - onBackground() { - // Ability has back to background - console.log("[Demo] MainAbility onBackground") - } -}; \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsimageaentryrelyhap/entry/src/main/ets/pages/index.ets b/ability/ability_runtime/actsappselector/actsimageaentryrelyhap/entry/src/main/ets/pages/index.ets deleted file mode 100644 index b821e0762b0ce1f49b14c6af2d2ef24927e5ec39..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimageaentryrelyhap/entry/src/main/ets/pages/index.ets +++ /dev/null @@ -1,47 +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. - */ -@Entry -@Component -struct Index { - @State message: string = 'imageAEntryRelyHap' - @StorageLink('bundleName') bundleName: string = null; - @StorageLink('abilityName') abilityName: string = null; - @StorageLink('type') type: string = null; - @StorageLink('uri') uri: string = null; - - build() { - Row() { - Column() { - Text(this.message) - .fontSize(50) - .fontWeight(FontWeight.Bold) - Text("bundleName: " + this.bundleName) - .fontSize(25) - .fontWeight(FontWeight.Bold) - Text("abilityName: " + this.abilityName) - .fontSize(25) - .fontWeight(FontWeight.Bold) - Text("type: " + this.type) - .fontSize(25) - .fontWeight(FontWeight.Bold) - Text("uri: " + this.uri) - .fontSize(25) - .fontWeight(FontWeight.Bold) - } - .width('100%') - } - .height('100%') - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsimageaentryrelyhap/entry/src/main/module.json b/ability/ability_runtime/actsappselector/actsimageaentryrelyhap/entry/src/main/module.json deleted file mode 100644 index b493f7e0d4837b9d246396de27712a954ba5f8b4..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimageaentryrelyhap/entry/src/main/module.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "module": { - "name": "entry", - "type": "entry", - "srcEntrance": "./ets/Application/AbilityStage.ts", - "description": "$string:entry_desc", - "mainElement": "MainAbility", - "deviceTypes": [ - "default", - "tablet" - ], - "deliveryWithInstall": true, - "installationFree": false, - "pages": "$profile:main_pages", - "uiSyntax": "ets", - "abilities": [ - { - "name": "MainAbility", - "srcEntrance": "./ets/MainAbility/MainAbility.ts", - "description": "$string:MainAbility_desc", - "icon": "$media:icon", - "label": "$string:MainAbility_label", - "visible": true, - "skills": [ - { - "entities": [ - "entity.system.home" - ], - "actions": [ - "ohos.want.action.viewData" - ], - "uris": [ - { - "type": "image/png" - } - ] - } - ] - } - ] - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsimageaentryrelyhap/entry/src/main/resources/base/element/string.json b/ability/ability_runtime/actsappselector/actsimageaentryrelyhap/entry/src/main/resources/base/element/string.json deleted file mode 100644 index dddf9123aec0b6c9500eeacf289ac1bc58ff7a6a..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimageaentryrelyhap/entry/src/main/resources/base/element/string.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "string": [ - { - "name": "entry_desc", - "value": "description" - }, - { - "name": "MainAbility_desc", - "value": "description" - }, - { - "name": "MainAbility_label", - "value": "label" - } - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsimageaentryrelyhap/entry/src/main/resources/base/media/icon.png b/ability/ability_runtime/actsappselector/actsimageaentryrelyhap/entry/src/main/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actsappselector/actsimageaentryrelyhap/entry/src/main/resources/base/media/icon.png and /dev/null differ diff --git a/ability/ability_runtime/actsappselector/actsimageaentryrelyhap/entry/src/main/resources/base/profile/main_pages.json b/ability/ability_runtime/actsappselector/actsimageaentryrelyhap/entry/src/main/resources/base/profile/main_pages.json deleted file mode 100644 index e291133c8b3c329611da5af30c299ec10589c7c2..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimageaentryrelyhap/entry/src/main/resources/base/profile/main_pages.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "src": [ - "pages/index" - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsimageaentryrelyhap/signature/openharmony_sx.p7b b/ability/ability_runtime/actsappselector/actsimageaentryrelyhap/signature/openharmony_sx.p7b deleted file mode 100644 index 66b4457a8a81fb8d3356cf46d67226c850944858..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actsappselector/actsimageaentryrelyhap/signature/openharmony_sx.p7b and /dev/null differ diff --git a/ability/ability_runtime/actsappselector/actsimageafeaturerelyhap/AppScope/app.json b/ability/ability_runtime/actsappselector/actsimageafeaturerelyhap/AppScope/app.json deleted file mode 100644 index acb9d83ec9c7c15b36d1656d0f67135832ee207d..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimageafeaturerelyhap/AppScope/app.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "app": { - "bundleName": "imagearelyhap", - "vendor": "example", - "versionCode": 1000000, - "versionName": "1.0.0", - "icon": "$media:app_icon", - "label": "$string:app_name", - "distributedNotificationEnabled": true, - "keepAlive" : true, - "singleUser": true, - "minAPIVersion": 9, - "targetAPIVersion": 9, - "car": { - "apiCompatibleVersion": 9, - "singleUser": false - } - } -} diff --git a/ability/ability_runtime/actsappselector/actsimageafeaturerelyhap/AppScope/resources/base/element/string.json b/ability/ability_runtime/actsappselector/actsimageafeaturerelyhap/AppScope/resources/base/element/string.json deleted file mode 100644 index f5a41012f62766f497f607db33d0a34c69f32dd3..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimageafeaturerelyhap/AppScope/resources/base/element/string.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "string": [ - { - "name": "app_name", - "value": "imageARelyHap" - } - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsimageafeaturerelyhap/AppScope/resources/base/media/app_icon.png b/ability/ability_runtime/actsappselector/actsimageafeaturerelyhap/AppScope/resources/base/media/app_icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actsappselector/actsimageafeaturerelyhap/AppScope/resources/base/media/app_icon.png and /dev/null differ diff --git a/ability/ability_runtime/actsappselector/actsimageafeaturerelyhap/BUILD.gn b/ability/ability_runtime/actsappselector/actsimageafeaturerelyhap/BUILD.gn deleted file mode 100755 index f7f1783bffade24d6d73f90b6000de457e6bcf1b..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimageafeaturerelyhap/BUILD.gn +++ /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("//test/xts/tools/build/suite.gni") - -ohos_hap_assist_suite("ActsImageAFeatureRelyHap") { - hap_profile = "entry/src/main/module.json" - js_build_mode = "debug" - hap_name = "ActsImageAFeatureRelyHap" - - testonly = true - deps = [ - ":actsimageafeaturerelyhap_js_assets", - ":actsimageafeaturerelyhap_resources", - ] - ets2abc = true - certificate_profile = "signature/openharmony_sx.p7b" - subsystem_name = "ability" - part_name = "ability_runtime" -} - -ohos_app_scope("actsimageafeaturerelyhap_app_profile") { - app_profile = "AppScope/app.json" - sources = [ "AppScope/resources" ] -} - -ohos_js_assets("actsimageafeaturerelyhap_js_assets") { - source_dir = "entry/src/main/ets" -} - -ohos_resources("actsimageafeaturerelyhap_resources") { - sources = [ "entry/src/main/resources" ] - deps = [ ":actsimageafeaturerelyhap_app_profile" ] - hap_profile = "entry/src/main/module.json" -} diff --git a/ability/ability_runtime/actsappselector/actsimageafeaturerelyhap/entry/src/main/ets/Application/AbilityStage.ts b/ability/ability_runtime/actsappselector/actsimageafeaturerelyhap/entry/src/main/ets/Application/AbilityStage.ts deleted file mode 100644 index 0190fb0606f5b60fafe51d094ef1b3c8d69d1da4..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimageafeaturerelyhap/entry/src/main/ets/Application/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.application.AbilityStage" - -export default class MyAbilityStage extends AbilityStage { - onCreate() { - console.log("[Demo] MyAbilityStage onCreate") - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsimageafeaturerelyhap/entry/src/main/ets/MainAbility1/MainAbility1.ts b/ability/ability_runtime/actsappselector/actsimageafeaturerelyhap/entry/src/main/ets/MainAbility1/MainAbility1.ts deleted file mode 100644 index 76c42708a682982115e9e63459c1e5157eaefe59..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimageafeaturerelyhap/entry/src/main/ets/MainAbility1/MainAbility1.ts +++ /dev/null @@ -1,67 +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.application.Ability' -import commonEvent from '@ohos.commonEvent' - -export default class MainAbility extends Ability { - onCreate(want, launchParam) { - console.log("[Demo] MainAbility onCreate") - globalThis.abilityWant = want; - AppStorage.SetOrCreate('bundleName', want.bundleName); - AppStorage.SetOrCreate('abilityName', want.abilityName); - AppStorage.SetOrCreate('type', want.type); - AppStorage.SetOrCreate('uri', want.parameters.uri); - } - - onDestroy() { - console.log("[Demo] MainAbility onDestroy") - } - - onWindowStageCreate(windowStage) { - // Main window is created, set main page for this ability - console.log("[Demo] MainAbility onWindowStageCreate") - - windowStage.setUIContent(this.context, "pages/index", null) - } - - onWindowStageDestroy() { - // Main window is destroyed, release UI related resources - console.log("[Demo] MainAbility onWindowStageDestroy") - } - - onForeground() { - // Ability has brought to foreground - console.log("[Demo] MainAbility onForeground") - console.log("[Demo] MainAbility onForeground want: " + JSON.stringify(globalThis.abilityWant)) - let commonEventData = { - code: 0, - data: 'imagearelyhap', - parameters: { - abilityName: globalThis.abilityWant.abilityName, - bundleName: globalThis.abilityWant.bundleName, - type: globalThis.abilityWant.type, - uri: globalThis.abilityWant.parameters.uri - } - } - commonEvent.publish('AppSelector', commonEventData, (err) => { - console.log('======>imagearelyhap MainAbility published<======') - }) - } - - onBackground() { - // Ability has back to background - console.log("[Demo] MainAbility onBackground") - } -}; \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsimageafeaturerelyhap/entry/src/main/ets/pages/index.ets b/ability/ability_runtime/actsappselector/actsimageafeaturerelyhap/entry/src/main/ets/pages/index.ets deleted file mode 100644 index 5156aee2af84b888660cd3cc28d333098c0ded6e..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimageafeaturerelyhap/entry/src/main/ets/pages/index.ets +++ /dev/null @@ -1,47 +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. - */ -@Entry -@Component -struct Index { - @State message: string = 'imageAFeatureRelyHap' - @StorageLink('bundleName') bundleName: string = null; - @StorageLink('abilityName') abilityName: string = null; - @StorageLink('type') type: string = null; - @StorageLink('uri') uri: string = null; - - build() { - Row() { - Column() { - Text(this.message) - .fontSize(50) - .fontWeight(FontWeight.Bold) - Text("bundleName: " + this.bundleName) - .fontSize(25) - .fontWeight(FontWeight.Bold) - Text("abilityName: " + this.abilityName) - .fontSize(25) - .fontWeight(FontWeight.Bold) - Text("type: " + this.type) - .fontSize(25) - .fontWeight(FontWeight.Bold) - Text("uri: " + this.uri) - .fontSize(25) - .fontWeight(FontWeight.Bold) - } - .width('100%') - } - .height('100%') - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsimageafeaturerelyhap/entry/src/main/module.json b/ability/ability_runtime/actsappselector/actsimageafeaturerelyhap/entry/src/main/module.json deleted file mode 100644 index a75f20ffb8b8e8761d09c62c75e40a41db688121..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimageafeaturerelyhap/entry/src/main/module.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "module": { - "name": "feature", - "type": "feature", - "srcEntrance": "./ets/Application/AbilityStage.ts", - "description": "$string:feature_desc", - "mainElement": "MainAbility", - "deviceTypes": [ - "default", - "tablet" - ], - "deliveryWithInstall": true, - "installationFree": false, - "pages": "$profile:main_pages", - "uiSyntax": "ets", - "abilities": [ - { - "name": "MainAbility1", - "srcEntrance": "./ets/MainAbility1/MainAbility1.ts", - "description": "$string:MainAbility_desc", - "icon": "$media:icon", - "label": "$string:MainAbility_label", - "visible": true, - "skills": [ - { - "entities": [ - "entity.system.home" - ], - "actions": [ - "action.system.home" - ] - } - ] - } - ] - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsimageafeaturerelyhap/entry/src/main/resources/base/element/string.json b/ability/ability_runtime/actsappselector/actsimageafeaturerelyhap/entry/src/main/resources/base/element/string.json deleted file mode 100644 index 4d1ba2b5ec9e5f5215bbb05f4b2eda6660424843..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimageafeaturerelyhap/entry/src/main/resources/base/element/string.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "string": [ - { - "name": "feature_desc", - "value": "description" - }, - { - "name": "MainAbility_desc", - "value": "description" - }, - { - "name": "MainAbility_label", - "value": "label" - } - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsimageafeaturerelyhap/entry/src/main/resources/base/media/icon.png b/ability/ability_runtime/actsappselector/actsimageafeaturerelyhap/entry/src/main/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actsappselector/actsimageafeaturerelyhap/entry/src/main/resources/base/media/icon.png and /dev/null differ diff --git a/ability/ability_runtime/actsappselector/actsimageafeaturerelyhap/entry/src/main/resources/base/profile/main_pages.json b/ability/ability_runtime/actsappselector/actsimageafeaturerelyhap/entry/src/main/resources/base/profile/main_pages.json deleted file mode 100644 index e291133c8b3c329611da5af30c299ec10589c7c2..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimageafeaturerelyhap/entry/src/main/resources/base/profile/main_pages.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "src": [ - "pages/index" - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsimageafeaturerelyhap/signature/openharmony_sx.p7b b/ability/ability_runtime/actsappselector/actsimageafeaturerelyhap/signature/openharmony_sx.p7b deleted file mode 100644 index 66b4457a8a81fb8d3356cf46d67226c850944858..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actsappselector/actsimageafeaturerelyhap/signature/openharmony_sx.p7b and /dev/null differ diff --git a/ability/ability_runtime/actsappselector/actsimagebentryrelyhap/AppScope/app.json b/ability/ability_runtime/actsappselector/actsimagebentryrelyhap/AppScope/app.json deleted file mode 100644 index 3756872988b7a78687c16d798c72fb8048659288..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimagebentryrelyhap/AppScope/app.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "app": { - "bundleName": "imagebrelyhap", - "vendor": "example", - "versionCode": 1000000, - "versionName": "1.0.0", - "icon": "$media:app_icon", - "label": "$string:app_name", - "distributedNotificationEnabled": true, - "keepAlive" : true, - "singleUser": true, - "minAPIVersion": 9, - "targetAPIVersion": 9, - "car": { - "apiCompatibleVersion": 9, - "singleUser": false - } - } -} diff --git a/ability/ability_runtime/actsappselector/actsimagebentryrelyhap/AppScope/resources/base/element/string.json b/ability/ability_runtime/actsappselector/actsimagebentryrelyhap/AppScope/resources/base/element/string.json deleted file mode 100644 index 2a5a20b619bd79751438a2ca9f2ab3e9392745b9..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimagebentryrelyhap/AppScope/resources/base/element/string.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "string": [ - { - "name": "app_name", - "value": "imageBRelyHap" - } - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsimagebentryrelyhap/AppScope/resources/base/media/app_icon.png b/ability/ability_runtime/actsappselector/actsimagebentryrelyhap/AppScope/resources/base/media/app_icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actsappselector/actsimagebentryrelyhap/AppScope/resources/base/media/app_icon.png and /dev/null differ diff --git a/ability/ability_runtime/actsappselector/actsimagebentryrelyhap/BUILD.gn b/ability/ability_runtime/actsappselector/actsimagebentryrelyhap/BUILD.gn deleted file mode 100755 index 2944cbcf208f0496714a2f69a5c2f906d3fcecf4..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimagebentryrelyhap/BUILD.gn +++ /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("//test/xts/tools/build/suite.gni") - -ohos_hap_assist_suite("ActsImageBEntryRelyHap") { - hap_profile = "entry/src/main/module.json" - js_build_mode = "debug" - hap_name = "ActsImageBEntryRelyHap" - - testonly = true - deps = [ - ":actsimagebentryrelyhap_js_assets", - ":actsimagebentryrelyhap_resources", - ] - ets2abc = true - certificate_profile = "signature/openharmony_sx.p7b" - subsystem_name = "ability" - part_name = "ability_runtime" -} - -ohos_app_scope("actsimagebentryrelyhap_app_profile") { - app_profile = "AppScope/app.json" - sources = [ "AppScope/resources" ] -} - -ohos_js_assets("actsimagebentryrelyhap_js_assets") { - source_dir = "entry/src/main/ets" -} - -ohos_resources("actsimagebentryrelyhap_resources") { - sources = [ "entry/src/main/resources" ] - deps = [ ":actsimagebentryrelyhap_app_profile" ] - hap_profile = "entry/src/main/module.json" -} diff --git a/ability/ability_runtime/actsappselector/actsimagebentryrelyhap/entry/src/main/ets/Application/AbilityStage.ts b/ability/ability_runtime/actsappselector/actsimagebentryrelyhap/entry/src/main/ets/Application/AbilityStage.ts deleted file mode 100644 index 0190fb0606f5b60fafe51d094ef1b3c8d69d1da4..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimagebentryrelyhap/entry/src/main/ets/Application/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.application.AbilityStage" - -export default class MyAbilityStage extends AbilityStage { - onCreate() { - console.log("[Demo] MyAbilityStage onCreate") - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsimagebentryrelyhap/entry/src/main/ets/MainAbility/MainAbility.ts b/ability/ability_runtime/actsappselector/actsimagebentryrelyhap/entry/src/main/ets/MainAbility/MainAbility.ts deleted file mode 100644 index c96f3dd3cedffdd357d535fb84eb81e5cf7a4341..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimagebentryrelyhap/entry/src/main/ets/MainAbility/MainAbility.ts +++ /dev/null @@ -1,66 +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.application.Ability' -import commonEvent from '@ohos.commonEvent' -export default class MainAbility extends Ability { - onCreate(want, launchParam) { - console.log("[Demo] MainAbility onCreate") - globalThis.abilityWant = want; - AppStorage.SetOrCreate('bundleName', want.bundleName); - AppStorage.SetOrCreate('abilityName', want.abilityName); - AppStorage.SetOrCreate('type', want.type); - AppStorage.SetOrCreate('uri', want.parameters.uri); - } - - onDestroy() { - console.log("[Demo] MainAbility onDestroy") - } - - onWindowStageCreate(windowStage) { - // Main window is created, set main page for this ability - console.log("[Demo] MainAbility onWindowStageCreate") - - windowStage.setUIContent(this.context, "pages/index", null) - } - - onWindowStageDestroy() { - // Main window is destroyed, release UI related resources - console.log("[Demo] MainAbility onWindowStageDestroy") - } - - onForeground() { - // Ability has brought to foreground - console.log("[Demo] MainAbility onForeground") - console.log("[Demo] MainAbility onForeground want: " + JSON.stringify(globalThis.abilityWant)) - let commonEventData = { - code: 0, - data: 'imagebrelyhap', - parameters: { - abilityName: globalThis.abilityWant.abilityName, - bundleName: globalThis.abilityWant.bundleName, - type: globalThis.abilityWant.type, - uri: globalThis.abilityWant.parameters.uri - } - } - commonEvent.publish('AppSelector', commonEventData, (err) => { - console.log('======>ACTS_AppSelectorTest imagebrelyhap MainAbility published<======') - }) - } - - onBackground() { - // Ability has back to background - console.log("[Demo] MainAbility onBackground") - } -}; \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsimagebentryrelyhap/entry/src/main/ets/pages/index.ets b/ability/ability_runtime/actsappselector/actsimagebentryrelyhap/entry/src/main/ets/pages/index.ets deleted file mode 100644 index 9b0661e21deae5ad7dd4088becd0c8259a2747ce..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimagebentryrelyhap/entry/src/main/ets/pages/index.ets +++ /dev/null @@ -1,47 +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. - */ -@Entry -@Component -struct Index { - @State message: string = 'imageBEntryRelyHap' - @StorageLink('bundleName') bundleName: string = null; - @StorageLink('abilityName') abilityName: string = null; - @StorageLink('type') type: string = null; - @StorageLink('uri') uri: string = null; - - build() { - Row() { - Column() { - Text(this.message) - .fontSize(50) - .fontWeight(FontWeight.Bold) - Text("bundleName: " + this.bundleName) - .fontSize(25) - .fontWeight(FontWeight.Bold) - Text("abilityName: " + this.abilityName) - .fontSize(25) - .fontWeight(FontWeight.Bold) - Text("type: " + this.type) - .fontSize(25) - .fontWeight(FontWeight.Bold) - Text("uri: " + this.uri) - .fontSize(25) - .fontWeight(FontWeight.Bold) - } - .width('100%') - } - .height('100%') - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsimagebentryrelyhap/entry/src/main/module.json b/ability/ability_runtime/actsappselector/actsimagebentryrelyhap/entry/src/main/module.json deleted file mode 100644 index 3b55239d095be39f47ef27bcbc8dc3145954a422..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimagebentryrelyhap/entry/src/main/module.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "module": { - "name": "entry", - "type": "entry", - "srcEntrance": "./ets/Application/AbilityStage.ts", - "description": "$string:entry_desc", - "mainElement": "MainAbility", - "deviceTypes": [ - "default", - "tablet" - ], - "deliveryWithInstall": true, - "installationFree": false, - "pages": "$profile:main_pages", - "uiSyntax": "ets", - "abilities": [ - { - "name": "MainAbility", - "srcEntrance": "./ets/MainAbility/MainAbility.ts", - "description": "$string:MainAbility_desc", - "icon": "$media:icon", - "label": "$string:MainAbility_label", - "visible": true, - "skills": [ - { - "entities": [ - "entity.system.home" - ], - "actions": [ - "action.system.home" - ] - } - ] - } - ] - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsimagebentryrelyhap/entry/src/main/resources/base/element/string.json b/ability/ability_runtime/actsappselector/actsimagebentryrelyhap/entry/src/main/resources/base/element/string.json deleted file mode 100644 index dddf9123aec0b6c9500eeacf289ac1bc58ff7a6a..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimagebentryrelyhap/entry/src/main/resources/base/element/string.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "string": [ - { - "name": "entry_desc", - "value": "description" - }, - { - "name": "MainAbility_desc", - "value": "description" - }, - { - "name": "MainAbility_label", - "value": "label" - } - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsimagebentryrelyhap/entry/src/main/resources/base/media/icon.png b/ability/ability_runtime/actsappselector/actsimagebentryrelyhap/entry/src/main/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actsappselector/actsimagebentryrelyhap/entry/src/main/resources/base/media/icon.png and /dev/null differ diff --git a/ability/ability_runtime/actsappselector/actsimagebentryrelyhap/entry/src/main/resources/base/profile/main_pages.json b/ability/ability_runtime/actsappselector/actsimagebentryrelyhap/entry/src/main/resources/base/profile/main_pages.json deleted file mode 100644 index e291133c8b3c329611da5af30c299ec10589c7c2..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimagebentryrelyhap/entry/src/main/resources/base/profile/main_pages.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "src": [ - "pages/index" - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsimagebentryrelyhap/signature/openharmony_sx.p7b b/ability/ability_runtime/actsappselector/actsimagebentryrelyhap/signature/openharmony_sx.p7b deleted file mode 100644 index 66b4457a8a81fb8d3356cf46d67226c850944858..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actsappselector/actsimagebentryrelyhap/signature/openharmony_sx.p7b and /dev/null differ diff --git a/ability/ability_runtime/actsappselector/actsimagebfeaturerelyhap/AppScope/app.json b/ability/ability_runtime/actsappselector/actsimagebfeaturerelyhap/AppScope/app.json deleted file mode 100644 index 3756872988b7a78687c16d798c72fb8048659288..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimagebfeaturerelyhap/AppScope/app.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "app": { - "bundleName": "imagebrelyhap", - "vendor": "example", - "versionCode": 1000000, - "versionName": "1.0.0", - "icon": "$media:app_icon", - "label": "$string:app_name", - "distributedNotificationEnabled": true, - "keepAlive" : true, - "singleUser": true, - "minAPIVersion": 9, - "targetAPIVersion": 9, - "car": { - "apiCompatibleVersion": 9, - "singleUser": false - } - } -} diff --git a/ability/ability_runtime/actsappselector/actsimagebfeaturerelyhap/AppScope/resources/base/element/string.json b/ability/ability_runtime/actsappselector/actsimagebfeaturerelyhap/AppScope/resources/base/element/string.json deleted file mode 100644 index 2a5a20b619bd79751438a2ca9f2ab3e9392745b9..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimagebfeaturerelyhap/AppScope/resources/base/element/string.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "string": [ - { - "name": "app_name", - "value": "imageBRelyHap" - } - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsimagebfeaturerelyhap/AppScope/resources/base/media/app_icon.png b/ability/ability_runtime/actsappselector/actsimagebfeaturerelyhap/AppScope/resources/base/media/app_icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actsappselector/actsimagebfeaturerelyhap/AppScope/resources/base/media/app_icon.png and /dev/null differ diff --git a/ability/ability_runtime/actsappselector/actsimagebfeaturerelyhap/BUILD.gn b/ability/ability_runtime/actsappselector/actsimagebfeaturerelyhap/BUILD.gn deleted file mode 100755 index 6708e0097b9e78a250def0dc9c5f674b506ce953..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimagebfeaturerelyhap/BUILD.gn +++ /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("//test/xts/tools/build/suite.gni") - -ohos_hap_assist_suite("ActsImageBFeatureRelyHap") { - hap_profile = "entry/src/main/module.json" - js_build_mode = "debug" - hap_name = "ActsImageBFeatureRelyHap" - - testonly = true - deps = [ - ":actsimagebfeaturerelyhap_js_assets", - ":actsimagebfeaturerelyhap_resources", - ] - ets2abc = true - certificate_profile = "signature/openharmony_sx.p7b" - subsystem_name = "ability" - part_name = "ability_runtime" -} - -ohos_app_scope("actsimagebfeaturerelyhap_app_profile") { - app_profile = "AppScope/app.json" - sources = [ "AppScope/resources" ] -} - -ohos_js_assets("actsimagebfeaturerelyhap_js_assets") { - source_dir = "entry/src/main/ets" -} - -ohos_resources("actsimagebfeaturerelyhap_resources") { - sources = [ "entry/src/main/resources" ] - deps = [ ":actsimagebfeaturerelyhap_app_profile" ] - hap_profile = "entry/src/main/module.json" -} diff --git a/ability/ability_runtime/actsappselector/actsimagebfeaturerelyhap/entry/src/main/ets/Application/AbilityStage.ts b/ability/ability_runtime/actsappselector/actsimagebfeaturerelyhap/entry/src/main/ets/Application/AbilityStage.ts deleted file mode 100644 index 0190fb0606f5b60fafe51d094ef1b3c8d69d1da4..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimagebfeaturerelyhap/entry/src/main/ets/Application/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.application.AbilityStage" - -export default class MyAbilityStage extends AbilityStage { - onCreate() { - console.log("[Demo] MyAbilityStage onCreate") - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsimagebfeaturerelyhap/entry/src/main/ets/MainAbility1/MainAbility1.ts b/ability/ability_runtime/actsappselector/actsimagebfeaturerelyhap/entry/src/main/ets/MainAbility1/MainAbility1.ts deleted file mode 100644 index c96f3dd3cedffdd357d535fb84eb81e5cf7a4341..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimagebfeaturerelyhap/entry/src/main/ets/MainAbility1/MainAbility1.ts +++ /dev/null @@ -1,66 +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.application.Ability' -import commonEvent from '@ohos.commonEvent' -export default class MainAbility extends Ability { - onCreate(want, launchParam) { - console.log("[Demo] MainAbility onCreate") - globalThis.abilityWant = want; - AppStorage.SetOrCreate('bundleName', want.bundleName); - AppStorage.SetOrCreate('abilityName', want.abilityName); - AppStorage.SetOrCreate('type', want.type); - AppStorage.SetOrCreate('uri', want.parameters.uri); - } - - onDestroy() { - console.log("[Demo] MainAbility onDestroy") - } - - onWindowStageCreate(windowStage) { - // Main window is created, set main page for this ability - console.log("[Demo] MainAbility onWindowStageCreate") - - windowStage.setUIContent(this.context, "pages/index", null) - } - - onWindowStageDestroy() { - // Main window is destroyed, release UI related resources - console.log("[Demo] MainAbility onWindowStageDestroy") - } - - onForeground() { - // Ability has brought to foreground - console.log("[Demo] MainAbility onForeground") - console.log("[Demo] MainAbility onForeground want: " + JSON.stringify(globalThis.abilityWant)) - let commonEventData = { - code: 0, - data: 'imagebrelyhap', - parameters: { - abilityName: globalThis.abilityWant.abilityName, - bundleName: globalThis.abilityWant.bundleName, - type: globalThis.abilityWant.type, - uri: globalThis.abilityWant.parameters.uri - } - } - commonEvent.publish('AppSelector', commonEventData, (err) => { - console.log('======>ACTS_AppSelectorTest imagebrelyhap MainAbility published<======') - }) - } - - onBackground() { - // Ability has back to background - console.log("[Demo] MainAbility onBackground") - } -}; \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsimagebfeaturerelyhap/entry/src/main/ets/pages/index.ets b/ability/ability_runtime/actsappselector/actsimagebfeaturerelyhap/entry/src/main/ets/pages/index.ets deleted file mode 100644 index a674f001c62661447573261aa7bd2c9841b2f675..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimagebfeaturerelyhap/entry/src/main/ets/pages/index.ets +++ /dev/null @@ -1,47 +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. - */ -@Entry -@Component -struct Index { - @State message: string = 'imageBFeatureRelyHap' - @StorageLink('bundleName') bundleName: string = null; - @StorageLink('abilityName') abilityName: string = null; - @StorageLink('type') type: string = null; - @StorageLink('uri') uri: string = null; - - build() { - Row() { - Column() { - Text(this.message) - .fontSize(50) - .fontWeight(FontWeight.Bold) - Text("bundleName: " + this.bundleName) - .fontSize(25) - .fontWeight(FontWeight.Bold) - Text("abilityName: " + this.abilityName) - .fontSize(25) - .fontWeight(FontWeight.Bold) - Text("type: " + this.type) - .fontSize(25) - .fontWeight(FontWeight.Bold) - Text("uri: " + this.uri) - .fontSize(25) - .fontWeight(FontWeight.Bold) - } - .width('100%') - } - .height('100%') - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsimagebfeaturerelyhap/entry/src/main/module.json b/ability/ability_runtime/actsappselector/actsimagebfeaturerelyhap/entry/src/main/module.json deleted file mode 100644 index dd9393a8c59f683985acdfd3ae382b658195ff1f..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimagebfeaturerelyhap/entry/src/main/module.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "module": { - "name": "feature", - "type": "feature", - "srcEntrance": "./ets/Application/AbilityStage.ts", - "description": "$string:feature_desc", - "mainElement": "MainAbility1", - "deviceTypes": [ - "default", - "tablet" - ], - "deliveryWithInstall": true, - "installationFree": false, - "pages": "$profile:main_pages", - "uiSyntax": "ets", - "abilities": [ - { - "name": "MainAbility1", - "srcEntrance": "./ets/MainAbility1/MainAbility1.ts", - "description": "$string:MainAbility1_desc", - "icon": "$media:icon", - "label": "$string:MainAbility1_label", - "visible": true, - "skills": [ - { - "entities": [ - "entity.system.home" - ], - "actions": [ - "ohos.want.action.viewData" - ], - "uris": [ - { - "type": "image/png" - } - ] - } - ] - } - ] - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsimagebfeaturerelyhap/entry/src/main/resources/base/element/string.json b/ability/ability_runtime/actsappselector/actsimagebfeaturerelyhap/entry/src/main/resources/base/element/string.json deleted file mode 100644 index f9bf22447345a31bb6c59261fb1e4408ee9ed80f..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimagebfeaturerelyhap/entry/src/main/resources/base/element/string.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "string": [ - { - "name": "feature_desc", - "value": "description" - }, - { - "name": "MainAbility1_desc", - "value": "description" - }, - { - "name": "MainAbility1_label", - "value": "label" - } - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsimagebfeaturerelyhap/entry/src/main/resources/base/media/icon.png b/ability/ability_runtime/actsappselector/actsimagebfeaturerelyhap/entry/src/main/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actsappselector/actsimagebfeaturerelyhap/entry/src/main/resources/base/media/icon.png and /dev/null differ diff --git a/ability/ability_runtime/actsappselector/actsimagebfeaturerelyhap/entry/src/main/resources/base/profile/main_pages.json b/ability/ability_runtime/actsappselector/actsimagebfeaturerelyhap/entry/src/main/resources/base/profile/main_pages.json deleted file mode 100644 index e291133c8b3c329611da5af30c299ec10589c7c2..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimagebfeaturerelyhap/entry/src/main/resources/base/profile/main_pages.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "src": [ - "pages/index" - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsimagebfeaturerelyhap/signature/openharmony_sx.p7b b/ability/ability_runtime/actsappselector/actsimagebfeaturerelyhap/signature/openharmony_sx.p7b deleted file mode 100644 index 66b4457a8a81fb8d3356cf46d67226c850944858..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actsappselector/actsimagebfeaturerelyhap/signature/openharmony_sx.p7b and /dev/null differ diff --git a/ability/ability_runtime/actsappselector/actsimagecentryrelyhap/AppScope/app.json b/ability/ability_runtime/actsappselector/actsimagecentryrelyhap/AppScope/app.json deleted file mode 100644 index 03c6abdacceab3ebe42a6b273981630443234a12..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimagecentryrelyhap/AppScope/app.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "app": { - "bundleName": "imagecrelyhap", - "vendor": "example", - "versionCode": 1000000, - "versionName": "1.0.0", - "icon": "$media:app_icon", - "label": "$string:app_name", - "distributedNotificationEnabled": true, - "keepAlive" : true, - "singleUser": true, - "minAPIVersion": 9, - "targetAPIVersion": 9, - "car": { - "apiCompatibleVersion": 9, - "singleUser": false - } - } -} diff --git a/ability/ability_runtime/actsappselector/actsimagecentryrelyhap/AppScope/resources/base/element/string.json b/ability/ability_runtime/actsappselector/actsimagecentryrelyhap/AppScope/resources/base/element/string.json deleted file mode 100644 index c9a066960309d4f715524a76b860f773d69204d5..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimagecentryrelyhap/AppScope/resources/base/element/string.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "string": [ - { - "name": "app_name", - "value": "imageCRelyHap" - } - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsimagecentryrelyhap/AppScope/resources/base/media/app_icon.png b/ability/ability_runtime/actsappselector/actsimagecentryrelyhap/AppScope/resources/base/media/app_icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actsappselector/actsimagecentryrelyhap/AppScope/resources/base/media/app_icon.png and /dev/null differ diff --git a/ability/ability_runtime/actsappselector/actsimagecentryrelyhap/BUILD.gn b/ability/ability_runtime/actsappselector/actsimagecentryrelyhap/BUILD.gn deleted file mode 100755 index 6223a6db9574fb6559dff36ce8c41f62fd1f4e27..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimagecentryrelyhap/BUILD.gn +++ /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("//test/xts/tools/build/suite.gni") - -ohos_hap_assist_suite("ActsImageCEntryRelyHap") { - hap_profile = "entry/src/main/module.json" - js_build_mode = "debug" - hap_name = "ActsImageCEntryRelyHap" - - testonly = true - deps = [ - ":actsimagecentryrelyhap_js_assets", - ":actsimagecentryrelyhap_resources", - ] - ets2abc = true - certificate_profile = "signature/openharmony_sx.p7b" - subsystem_name = "ability" - part_name = "ability_runtime" -} - -ohos_app_scope("actsimagecentryrelyhap_app_profile") { - app_profile = "AppScope/app.json" - sources = [ "AppScope/resources" ] -} - -ohos_js_assets("actsimagecentryrelyhap_js_assets") { - source_dir = "entry/src/main/ets" -} - -ohos_resources("actsimagecentryrelyhap_resources") { - sources = [ "entry/src/main/resources" ] - deps = [ ":actsimagecentryrelyhap_app_profile" ] - hap_profile = "entry/src/main/module.json" -} diff --git a/ability/ability_runtime/actsappselector/actsimagecentryrelyhap/entry/src/main/ets/Application/AbilityStage.ts b/ability/ability_runtime/actsappselector/actsimagecentryrelyhap/entry/src/main/ets/Application/AbilityStage.ts deleted file mode 100644 index 0190fb0606f5b60fafe51d094ef1b3c8d69d1da4..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimagecentryrelyhap/entry/src/main/ets/Application/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.application.AbilityStage" - -export default class MyAbilityStage extends AbilityStage { - onCreate() { - console.log("[Demo] MyAbilityStage onCreate") - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsimagecentryrelyhap/entry/src/main/ets/MainAbility/MainAbility.ts b/ability/ability_runtime/actsappselector/actsimagecentryrelyhap/entry/src/main/ets/MainAbility/MainAbility.ts deleted file mode 100644 index c082a6aec43c79c11fc4377e3c9c8cb5b92c7186..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimagecentryrelyhap/entry/src/main/ets/MainAbility/MainAbility.ts +++ /dev/null @@ -1,66 +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.application.Ability' -import commonEvent from '@ohos.commonEvent' -export default class MainAbility extends Ability { - onCreate(want, launchParam) { - console.log("[Demo] MainAbility onCreate") - globalThis.abilityWant = want; - AppStorage.SetOrCreate('bundleName', want.bundleName); - AppStorage.SetOrCreate('abilityName', want.abilityName); - AppStorage.SetOrCreate('type', want.type); - AppStorage.SetOrCreate('uri', want.parameters.uri); - } - - onDestroy() { - console.log("[Demo] MainAbility onDestroy") - } - - onWindowStageCreate(windowStage) { - // Main window is created, set main page for this ability - console.log("[Demo] MainAbility onWindowStageCreate") - - windowStage.setUIContent(this.context, "pages/index", null) - } - - onWindowStageDestroy() { - // Main window is destroyed, release UI related resources - console.log("[Demo] MainAbility onWindowStageDestroy") - } - - onForeground() { - // Ability has brought to foreground - console.log("[Demo] MainAbility onForeground") - console.log("[Demo] MainAbility onForeground want: " + JSON.stringify(globalThis.abilityWant)) - let commonEventData = { - code: 0, - data: 'imagearelyhap', - parameters: { - abilityName: globalThis.abilityWant.abilityName, - bundleName: globalThis.abilityWant.bundleName, - type: globalThis.abilityWant.type, - uri: globalThis.abilityWant.parameters.uri - } - } - commonEvent.publish('AppSelector', commonEventData, (err) => { - console.log('======>imagearelyhap MainAbility published<======') - }) - } - - onBackground() { - // Ability has back to background - console.log("[Demo] MainAbility onBackground") - } -}; \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsimagecentryrelyhap/entry/src/main/ets/pages/index.ets b/ability/ability_runtime/actsappselector/actsimagecentryrelyhap/entry/src/main/ets/pages/index.ets deleted file mode 100644 index 7290324cec34b10c9c16b1627996902c767b61a3..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimagecentryrelyhap/entry/src/main/ets/pages/index.ets +++ /dev/null @@ -1,47 +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. - */ -@Entry -@Component -struct Index { - @State message: string = 'imageCEntryRelyHap' - @StorageLink('bundleName') bundleName: string = null; - @StorageLink('abilityName') abilityName: string = null; - @StorageLink('type') type: string = null; - @StorageLink('uri') uri: string = null; - - build() { - Row() { - Column() { - Text(this.message) - .fontSize(50) - .fontWeight(FontWeight.Bold) - Text("bundleName: " + this.bundleName) - .fontSize(25) - .fontWeight(FontWeight.Bold) - Text("abilityName: " + this.abilityName) - .fontSize(25) - .fontWeight(FontWeight.Bold) - Text("type: " + this.type) - .fontSize(25) - .fontWeight(FontWeight.Bold) - Text("uri: " + this.uri) - .fontSize(25) - .fontWeight(FontWeight.Bold) - } - .width('100%') - } - .height('100%') - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsimagecentryrelyhap/entry/src/main/module.json b/ability/ability_runtime/actsappselector/actsimagecentryrelyhap/entry/src/main/module.json deleted file mode 100644 index b493f7e0d4837b9d246396de27712a954ba5f8b4..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimagecentryrelyhap/entry/src/main/module.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "module": { - "name": "entry", - "type": "entry", - "srcEntrance": "./ets/Application/AbilityStage.ts", - "description": "$string:entry_desc", - "mainElement": "MainAbility", - "deviceTypes": [ - "default", - "tablet" - ], - "deliveryWithInstall": true, - "installationFree": false, - "pages": "$profile:main_pages", - "uiSyntax": "ets", - "abilities": [ - { - "name": "MainAbility", - "srcEntrance": "./ets/MainAbility/MainAbility.ts", - "description": "$string:MainAbility_desc", - "icon": "$media:icon", - "label": "$string:MainAbility_label", - "visible": true, - "skills": [ - { - "entities": [ - "entity.system.home" - ], - "actions": [ - "ohos.want.action.viewData" - ], - "uris": [ - { - "type": "image/png" - } - ] - } - ] - } - ] - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsimagecentryrelyhap/entry/src/main/resources/base/element/string.json b/ability/ability_runtime/actsappselector/actsimagecentryrelyhap/entry/src/main/resources/base/element/string.json deleted file mode 100644 index dddf9123aec0b6c9500eeacf289ac1bc58ff7a6a..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimagecentryrelyhap/entry/src/main/resources/base/element/string.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "string": [ - { - "name": "entry_desc", - "value": "description" - }, - { - "name": "MainAbility_desc", - "value": "description" - }, - { - "name": "MainAbility_label", - "value": "label" - } - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsimagecentryrelyhap/entry/src/main/resources/base/media/icon.png b/ability/ability_runtime/actsappselector/actsimagecentryrelyhap/entry/src/main/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actsappselector/actsimagecentryrelyhap/entry/src/main/resources/base/media/icon.png and /dev/null differ diff --git a/ability/ability_runtime/actsappselector/actsimagecentryrelyhap/entry/src/main/resources/base/profile/main_pages.json b/ability/ability_runtime/actsappselector/actsimagecentryrelyhap/entry/src/main/resources/base/profile/main_pages.json deleted file mode 100644 index e291133c8b3c329611da5af30c299ec10589c7c2..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimagecentryrelyhap/entry/src/main/resources/base/profile/main_pages.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "src": [ - "pages/index" - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsimagecentryrelyhap/signature/openharmony_sx.p7b b/ability/ability_runtime/actsappselector/actsimagecentryrelyhap/signature/openharmony_sx.p7b deleted file mode 100644 index 66b4457a8a81fb8d3356cf46d67226c850944858..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actsappselector/actsimagecentryrelyhap/signature/openharmony_sx.p7b and /dev/null differ diff --git a/ability/ability_runtime/actsappselector/actsimagecfeaturerelyhap/AppScope/app.json b/ability/ability_runtime/actsappselector/actsimagecfeaturerelyhap/AppScope/app.json deleted file mode 100644 index 03c6abdacceab3ebe42a6b273981630443234a12..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimagecfeaturerelyhap/AppScope/app.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "app": { - "bundleName": "imagecrelyhap", - "vendor": "example", - "versionCode": 1000000, - "versionName": "1.0.0", - "icon": "$media:app_icon", - "label": "$string:app_name", - "distributedNotificationEnabled": true, - "keepAlive" : true, - "singleUser": true, - "minAPIVersion": 9, - "targetAPIVersion": 9, - "car": { - "apiCompatibleVersion": 9, - "singleUser": false - } - } -} diff --git a/ability/ability_runtime/actsappselector/actsimagecfeaturerelyhap/AppScope/resources/base/element/string.json b/ability/ability_runtime/actsappselector/actsimagecfeaturerelyhap/AppScope/resources/base/element/string.json deleted file mode 100644 index c9a066960309d4f715524a76b860f773d69204d5..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimagecfeaturerelyhap/AppScope/resources/base/element/string.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "string": [ - { - "name": "app_name", - "value": "imageCRelyHap" - } - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsimagecfeaturerelyhap/AppScope/resources/base/media/app_icon.png b/ability/ability_runtime/actsappselector/actsimagecfeaturerelyhap/AppScope/resources/base/media/app_icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actsappselector/actsimagecfeaturerelyhap/AppScope/resources/base/media/app_icon.png and /dev/null differ diff --git a/ability/ability_runtime/actsappselector/actsimagecfeaturerelyhap/BUILD.gn b/ability/ability_runtime/actsappselector/actsimagecfeaturerelyhap/BUILD.gn deleted file mode 100755 index 439aed5911aca9909a6db1f2dc8fd3393df2d15d..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimagecfeaturerelyhap/BUILD.gn +++ /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("//test/xts/tools/build/suite.gni") - -ohos_hap_assist_suite("ActsImageCFeatureRelyHap") { - hap_profile = "entry/src/main/module.json" - js_build_mode = "debug" - hap_name = "ActsImageCFeatureRelyHap" - - testonly = true - deps = [ - ":actsimagecfeaturerelyhap_js_assets", - ":actsimagecfeaturerelyhap_resources", - ] - ets2abc = true - certificate_profile = "signature/openharmony_sx.p7b" - subsystem_name = "ability" - part_name = "ability_runtime" -} - -ohos_app_scope("actsimagecfeaturerelyhap_app_profile") { - app_profile = "AppScope/app.json" - sources = [ "AppScope/resources" ] -} - -ohos_js_assets("actsimagecfeaturerelyhap_js_assets") { - source_dir = "entry/src/main/ets" -} - -ohos_resources("actsimagecfeaturerelyhap_resources") { - sources = [ "entry/src/main/resources" ] - deps = [ ":actsimagecfeaturerelyhap_app_profile" ] - hap_profile = "entry/src/main/module.json" -} diff --git a/ability/ability_runtime/actsappselector/actsimagecfeaturerelyhap/entry/src/main/ets/Application/AbilityStage.ts b/ability/ability_runtime/actsappselector/actsimagecfeaturerelyhap/entry/src/main/ets/Application/AbilityStage.ts deleted file mode 100644 index 0190fb0606f5b60fafe51d094ef1b3c8d69d1da4..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimagecfeaturerelyhap/entry/src/main/ets/Application/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.application.AbilityStage" - -export default class MyAbilityStage extends AbilityStage { - onCreate() { - console.log("[Demo] MyAbilityStage onCreate") - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsimagecfeaturerelyhap/entry/src/main/ets/MainAbility1/MainAbility1.ts b/ability/ability_runtime/actsappselector/actsimagecfeaturerelyhap/entry/src/main/ets/MainAbility1/MainAbility1.ts deleted file mode 100644 index c082a6aec43c79c11fc4377e3c9c8cb5b92c7186..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimagecfeaturerelyhap/entry/src/main/ets/MainAbility1/MainAbility1.ts +++ /dev/null @@ -1,66 +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.application.Ability' -import commonEvent from '@ohos.commonEvent' -export default class MainAbility extends Ability { - onCreate(want, launchParam) { - console.log("[Demo] MainAbility onCreate") - globalThis.abilityWant = want; - AppStorage.SetOrCreate('bundleName', want.bundleName); - AppStorage.SetOrCreate('abilityName', want.abilityName); - AppStorage.SetOrCreate('type', want.type); - AppStorage.SetOrCreate('uri', want.parameters.uri); - } - - onDestroy() { - console.log("[Demo] MainAbility onDestroy") - } - - onWindowStageCreate(windowStage) { - // Main window is created, set main page for this ability - console.log("[Demo] MainAbility onWindowStageCreate") - - windowStage.setUIContent(this.context, "pages/index", null) - } - - onWindowStageDestroy() { - // Main window is destroyed, release UI related resources - console.log("[Demo] MainAbility onWindowStageDestroy") - } - - onForeground() { - // Ability has brought to foreground - console.log("[Demo] MainAbility onForeground") - console.log("[Demo] MainAbility onForeground want: " + JSON.stringify(globalThis.abilityWant)) - let commonEventData = { - code: 0, - data: 'imagearelyhap', - parameters: { - abilityName: globalThis.abilityWant.abilityName, - bundleName: globalThis.abilityWant.bundleName, - type: globalThis.abilityWant.type, - uri: globalThis.abilityWant.parameters.uri - } - } - commonEvent.publish('AppSelector', commonEventData, (err) => { - console.log('======>imagearelyhap MainAbility published<======') - }) - } - - onBackground() { - // Ability has back to background - console.log("[Demo] MainAbility onBackground") - } -}; \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsimagecfeaturerelyhap/entry/src/main/ets/pages/index.ets b/ability/ability_runtime/actsappselector/actsimagecfeaturerelyhap/entry/src/main/ets/pages/index.ets deleted file mode 100644 index b23af53b55141998878348ccef5af0069dea1651..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimagecfeaturerelyhap/entry/src/main/ets/pages/index.ets +++ /dev/null @@ -1,47 +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. - */ -@Entry -@Component -struct Index { - @State message: string = 'imageCFeatureRelyHap' - @StorageLink('bundleName') bundleName: string = null; - @StorageLink('abilityName') abilityName: string = null; - @StorageLink('type') type: string = null; - @StorageLink('uri') uri: string = null; - - build() { - Row() { - Column() { - Text(this.message) - .fontSize(50) - .fontWeight(FontWeight.Bold) - Text("bundleName: " + this.bundleName) - .fontSize(25) - .fontWeight(FontWeight.Bold) - Text("abilityName: " + this.abilityName) - .fontSize(25) - .fontWeight(FontWeight.Bold) - Text("type: " + this.type) - .fontSize(25) - .fontWeight(FontWeight.Bold) - Text("uri: " + this.uri) - .fontSize(25) - .fontWeight(FontWeight.Bold) - } - .width('100%') - } - .height('100%') - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsimagecfeaturerelyhap/entry/src/main/module.json b/ability/ability_runtime/actsappselector/actsimagecfeaturerelyhap/entry/src/main/module.json deleted file mode 100644 index dd9393a8c59f683985acdfd3ae382b658195ff1f..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimagecfeaturerelyhap/entry/src/main/module.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "module": { - "name": "feature", - "type": "feature", - "srcEntrance": "./ets/Application/AbilityStage.ts", - "description": "$string:feature_desc", - "mainElement": "MainAbility1", - "deviceTypes": [ - "default", - "tablet" - ], - "deliveryWithInstall": true, - "installationFree": false, - "pages": "$profile:main_pages", - "uiSyntax": "ets", - "abilities": [ - { - "name": "MainAbility1", - "srcEntrance": "./ets/MainAbility1/MainAbility1.ts", - "description": "$string:MainAbility1_desc", - "icon": "$media:icon", - "label": "$string:MainAbility1_label", - "visible": true, - "skills": [ - { - "entities": [ - "entity.system.home" - ], - "actions": [ - "ohos.want.action.viewData" - ], - "uris": [ - { - "type": "image/png" - } - ] - } - ] - } - ] - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsimagecfeaturerelyhap/entry/src/main/resources/base/element/string.json b/ability/ability_runtime/actsappselector/actsimagecfeaturerelyhap/entry/src/main/resources/base/element/string.json deleted file mode 100644 index f9bf22447345a31bb6c59261fb1e4408ee9ed80f..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimagecfeaturerelyhap/entry/src/main/resources/base/element/string.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "string": [ - { - "name": "feature_desc", - "value": "description" - }, - { - "name": "MainAbility1_desc", - "value": "description" - }, - { - "name": "MainAbility1_label", - "value": "label" - } - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsimagecfeaturerelyhap/entry/src/main/resources/base/media/icon.png b/ability/ability_runtime/actsappselector/actsimagecfeaturerelyhap/entry/src/main/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actsappselector/actsimagecfeaturerelyhap/entry/src/main/resources/base/media/icon.png and /dev/null differ diff --git a/ability/ability_runtime/actsappselector/actsimagecfeaturerelyhap/entry/src/main/resources/base/profile/main_pages.json b/ability/ability_runtime/actsappselector/actsimagecfeaturerelyhap/entry/src/main/resources/base/profile/main_pages.json deleted file mode 100644 index e291133c8b3c329611da5af30c299ec10589c7c2..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimagecfeaturerelyhap/entry/src/main/resources/base/profile/main_pages.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "src": [ - "pages/index" - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsimagecfeaturerelyhap/signature/openharmony_sx.p7b b/ability/ability_runtime/actsappselector/actsimagecfeaturerelyhap/signature/openharmony_sx.p7b deleted file mode 100644 index 66b4457a8a81fb8d3356cf46d67226c850944858..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actsappselector/actsimagecfeaturerelyhap/signature/openharmony_sx.p7b and /dev/null differ diff --git a/ability/ability_runtime/actsappselector/actsimagedrelyhap/AppScope/app.json b/ability/ability_runtime/actsappselector/actsimagedrelyhap/AppScope/app.json deleted file mode 100644 index da43eefaab4029493a13cac52cf45bb6ec81a03f..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimagedrelyhap/AppScope/app.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "app": { - "bundleName": "imagedrelyhap", - "vendor": "example", - "versionCode": 1000000, - "versionName": "1.0.0", - "icon": "$media:app_icon", - "label": "$string:app_name", - "distributedNotificationEnabled": true, - "keepAlive" : true, - "singleUser": true, - "minAPIVersion": 9, - "targetAPIVersion": 9, - "car": { - "apiCompatibleVersion": 9, - "singleUser": false - } - } -} diff --git a/ability/ability_runtime/actsappselector/actsimagedrelyhap/AppScope/resources/base/element/string.json b/ability/ability_runtime/actsappselector/actsimagedrelyhap/AppScope/resources/base/element/string.json deleted file mode 100644 index 31f2f8582d9dc30cae94c460cddeb40c4b6f48e3..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimagedrelyhap/AppScope/resources/base/element/string.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "string": [ - { - "name": "app_name", - "value": "imageDRelyHap" - } - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsimagedrelyhap/AppScope/resources/base/media/app_icon.png b/ability/ability_runtime/actsappselector/actsimagedrelyhap/AppScope/resources/base/media/app_icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actsappselector/actsimagedrelyhap/AppScope/resources/base/media/app_icon.png and /dev/null differ diff --git a/ability/ability_runtime/actsappselector/actsimagedrelyhap/BUILD.gn b/ability/ability_runtime/actsappselector/actsimagedrelyhap/BUILD.gn deleted file mode 100755 index 8dcad72e371dbc361565edc3e0a787e84bc7ec6a..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimagedrelyhap/BUILD.gn +++ /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("//test/xts/tools/build/suite.gni") - -ohos_hap_assist_suite("ActsImageDRelyHap") { - hap_profile = "entry/src/main/module.json" - js_build_mode = "debug" - hap_name = "ActsImageDRelyHap" - - testonly = true - deps = [ - ":actsimagedrelyhap_js_assets", - ":actsimagedrelyhap_resources", - ] - ets2abc = true - certificate_profile = "signature/openharmony_sx.p7b" - subsystem_name = "ability" - part_name = "ability_runtime" -} - -ohos_app_scope("actsimagedrelyhap_app_profile") { - app_profile = "AppScope/app.json" - sources = [ "AppScope/resources" ] -} - -ohos_js_assets("actsimagedrelyhap_js_assets") { - source_dir = "entry/src/main/ets" -} - -ohos_resources("actsimagedrelyhap_resources") { - sources = [ "entry/src/main/resources" ] - deps = [ ":actsimagedrelyhap_app_profile" ] - hap_profile = "entry/src/main/module.json" -} diff --git a/ability/ability_runtime/actsappselector/actsimagedrelyhap/entry/src/main/ets/Application/AbilityStage.ts b/ability/ability_runtime/actsappselector/actsimagedrelyhap/entry/src/main/ets/Application/AbilityStage.ts deleted file mode 100644 index 0190fb0606f5b60fafe51d094ef1b3c8d69d1da4..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimagedrelyhap/entry/src/main/ets/Application/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.application.AbilityStage" - -export default class MyAbilityStage extends AbilityStage { - onCreate() { - console.log("[Demo] MyAbilityStage onCreate") - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsimagedrelyhap/entry/src/main/ets/MainAbility/MainAbility.ts b/ability/ability_runtime/actsappselector/actsimagedrelyhap/entry/src/main/ets/MainAbility/MainAbility.ts deleted file mode 100644 index c082a6aec43c79c11fc4377e3c9c8cb5b92c7186..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimagedrelyhap/entry/src/main/ets/MainAbility/MainAbility.ts +++ /dev/null @@ -1,66 +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.application.Ability' -import commonEvent from '@ohos.commonEvent' -export default class MainAbility extends Ability { - onCreate(want, launchParam) { - console.log("[Demo] MainAbility onCreate") - globalThis.abilityWant = want; - AppStorage.SetOrCreate('bundleName', want.bundleName); - AppStorage.SetOrCreate('abilityName', want.abilityName); - AppStorage.SetOrCreate('type', want.type); - AppStorage.SetOrCreate('uri', want.parameters.uri); - } - - onDestroy() { - console.log("[Demo] MainAbility onDestroy") - } - - onWindowStageCreate(windowStage) { - // Main window is created, set main page for this ability - console.log("[Demo] MainAbility onWindowStageCreate") - - windowStage.setUIContent(this.context, "pages/index", null) - } - - onWindowStageDestroy() { - // Main window is destroyed, release UI related resources - console.log("[Demo] MainAbility onWindowStageDestroy") - } - - onForeground() { - // Ability has brought to foreground - console.log("[Demo] MainAbility onForeground") - console.log("[Demo] MainAbility onForeground want: " + JSON.stringify(globalThis.abilityWant)) - let commonEventData = { - code: 0, - data: 'imagearelyhap', - parameters: { - abilityName: globalThis.abilityWant.abilityName, - bundleName: globalThis.abilityWant.bundleName, - type: globalThis.abilityWant.type, - uri: globalThis.abilityWant.parameters.uri - } - } - commonEvent.publish('AppSelector', commonEventData, (err) => { - console.log('======>imagearelyhap MainAbility published<======') - }) - } - - onBackground() { - // Ability has back to background - console.log("[Demo] MainAbility onBackground") - } -}; \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsimagedrelyhap/entry/src/main/ets/SecondAbility/SecondAbility.ts b/ability/ability_runtime/actsappselector/actsimagedrelyhap/entry/src/main/ets/SecondAbility/SecondAbility.ts deleted file mode 100644 index 8b0e4d5690e998c9672c7ff9cab09a0dadfe596a..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimagedrelyhap/entry/src/main/ets/SecondAbility/SecondAbility.ts +++ /dev/null @@ -1,66 +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.application.Ability' -import commonEvent from '@ohos.commonEvent' -export default class SecondAbility extends Ability { - onCreate(want, launchParam) { - console.log("[Demo] MainAbility onCreate") - globalThis.abilityWant = want; - AppStorage.SetOrCreate('bundleName', want.bundleName); - AppStorage.SetOrCreate('abilityName', want.abilityName); - AppStorage.SetOrCreate('type', want.type); - AppStorage.SetOrCreate('uri', want.parameters.uri); - } - - onDestroy() { - console.log("[Demo] MainAbility onDestroy") - } - - onWindowStageCreate(windowStage) { - // Main window is created, set main page for this ability - console.log("[Demo] MainAbility onWindowStageCreate") - - windowStage.setUIContent(this.context, "pages/index", null) - } - - onWindowStageDestroy() { - // Main window is destroyed, release UI related resources - console.log("[Demo] MainAbility onWindowStageDestroy") - } - - onForeground() { - // Ability has brought to foreground - console.log("[Demo] MainAbility onForeground") - console.log("[Demo] MainAbility onForeground want: " + JSON.stringify(globalThis.abilityWant)) - let commonEventData = { - code: 0, - data: 'imagearelyhap', - parameters: { - abilityName: globalThis.abilityWant.abilityName, - bundleName: globalThis.abilityWant.bundleName, - type: globalThis.abilityWant.type, - uri: globalThis.abilityWant.parameters.uri - } - } - commonEvent.publish('AppSelector', commonEventData, (err) => { - console.log('======>imagearelyhap MainAbility published<======') - }) - } - - onBackground() { - // Ability has back to background - console.log("[Demo] MainAbility onBackground") - } -}; \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsimagedrelyhap/entry/src/main/ets/pages/index.ets b/ability/ability_runtime/actsappselector/actsimagedrelyhap/entry/src/main/ets/pages/index.ets deleted file mode 100644 index 13ab1f39b0dd02c4b7c0cbc1faed42c67b9df424..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimagedrelyhap/entry/src/main/ets/pages/index.ets +++ /dev/null @@ -1,47 +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. - */ -@Entry -@Component -struct Index { - @State message: string = 'imageDRelyHap' - @StorageLink('bundleName') bundleName: string = null; - @StorageLink('abilityName') abilityName: string = null; - @StorageLink('type') type: string = null; - @StorageLink('uri') uri: string = null; - - build() { - Row() { - Column() { - Text(this.message) - .fontSize(50) - .fontWeight(FontWeight.Bold) - Text("bundleName: " + this.bundleName) - .fontSize(25) - .fontWeight(FontWeight.Bold) - Text("abilityName: " + this.abilityName) - .fontSize(25) - .fontWeight(FontWeight.Bold) - Text("type: " + this.type) - .fontSize(25) - .fontWeight(FontWeight.Bold) - Text("uri: " + this.uri) - .fontSize(25) - .fontWeight(FontWeight.Bold) - } - .width('100%') - } - .height('100%') - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsimagedrelyhap/entry/src/main/module.json b/ability/ability_runtime/actsappselector/actsimagedrelyhap/entry/src/main/module.json deleted file mode 100644 index cc03b3fb1dc5030dfa8558682d15edace451c521..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimagedrelyhap/entry/src/main/module.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "module": { - "name": "entry", - "type": "entry", - "srcEntrance": "./ets/Application/AbilityStage.ts", - "description": "$string:entry_desc", - "mainElement": "MainAbility", - "deviceTypes": [ - "default", - "tablet" - ], - "deliveryWithInstall": true, - "installationFree": false, - "pages": "$profile:main_pages", - "uiSyntax": "ets", - "abilities": [ - { - "name": "MainAbility", - "srcEntrance": "./ets/MainAbility/MainAbility.ts", - "description": "$string:MainAbility_desc", - "icon": "$media:icon", - "label": "$string:MainAbility_label", - "visible": true, - "skills": [ - { - "entities": [ - "entity.system.home" - ], - "actions": [ - "ohos.want.action.viewData" - ], - "uris": [ - { - "type": "image/png" - } - ] - } - ] - }, - { - "name": "SecondAbility", - "srcEntrance": "./ets/SecondAbility/SecondAbility.ts", - "description": "$string:SecondAbility_desc", - "icon": "$media:icon", - "label": "$string:SecondAbility_label", - "visible": true, - "skills": [ - { - "actions": [ - "action.system.home" - ] - } - ] - } - ] - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsimagedrelyhap/entry/src/main/resources/base/element/string.json b/ability/ability_runtime/actsappselector/actsimagedrelyhap/entry/src/main/resources/base/element/string.json deleted file mode 100644 index 61009f0568889992994409f98d5fe3964976a381..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimagedrelyhap/entry/src/main/resources/base/element/string.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "string": [ - { - "name": "entry_desc", - "value": "description" - }, - { - "name": "MainAbility_desc", - "value": "description" - }, - { - "name": "MainAbility_label", - "value": "label" - }, - { - "name": "SecondAbility_desc", - "value": "description" - }, - { - "name": "SecondAbility_label", - "value": "label" - } - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsimagedrelyhap/entry/src/main/resources/base/media/icon.png b/ability/ability_runtime/actsappselector/actsimagedrelyhap/entry/src/main/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actsappselector/actsimagedrelyhap/entry/src/main/resources/base/media/icon.png and /dev/null differ diff --git a/ability/ability_runtime/actsappselector/actsimagedrelyhap/entry/src/main/resources/base/profile/main_pages.json b/ability/ability_runtime/actsappselector/actsimagedrelyhap/entry/src/main/resources/base/profile/main_pages.json deleted file mode 100644 index e291133c8b3c329611da5af30c299ec10589c7c2..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimagedrelyhap/entry/src/main/resources/base/profile/main_pages.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "src": [ - "pages/index" - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsimagedrelyhap/signature/openharmony_sx.p7b b/ability/ability_runtime/actsappselector/actsimagedrelyhap/signature/openharmony_sx.p7b deleted file mode 100644 index 66b4457a8a81fb8d3356cf46d67226c850944858..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actsappselector/actsimagedrelyhap/signature/openharmony_sx.p7b and /dev/null differ diff --git a/ability/ability_runtime/actsappselector/actsimageerelyhap/AppScope/app.json b/ability/ability_runtime/actsappselector/actsimageerelyhap/AppScope/app.json deleted file mode 100644 index 4489cddd78fca4c8d9fffc8be1222295a239c01e..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimageerelyhap/AppScope/app.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "app": { - "bundleName": "imageerelyhap", - "vendor": "example", - "versionCode": 1000000, - "versionName": "1.0.0", - "icon": "$media:app_icon", - "label": "$string:app_name", - "distributedNotificationEnabled": true, - "keepAlive" : true, - "singleUser": true, - "minAPIVersion": 9, - "targetAPIVersion": 9, - "car": { - "apiCompatibleVersion": 9, - "singleUser": false - } - } -} diff --git a/ability/ability_runtime/actsappselector/actsimageerelyhap/AppScope/resources/base/element/string.json b/ability/ability_runtime/actsappselector/actsimageerelyhap/AppScope/resources/base/element/string.json deleted file mode 100644 index 0878ae980505e0a7d84fe04f75e4321b45cc47aa..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimageerelyhap/AppScope/resources/base/element/string.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "string": [ - { - "name": "app_name", - "value": "imageERelyHap" - } - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsimageerelyhap/AppScope/resources/base/media/app_icon.png b/ability/ability_runtime/actsappselector/actsimageerelyhap/AppScope/resources/base/media/app_icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actsappselector/actsimageerelyhap/AppScope/resources/base/media/app_icon.png and /dev/null differ diff --git a/ability/ability_runtime/actsappselector/actsimageerelyhap/BUILD.gn b/ability/ability_runtime/actsappselector/actsimageerelyhap/BUILD.gn deleted file mode 100755 index d15a05756ae5a2c90cff97bcdc11aabc0fa39330..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimageerelyhap/BUILD.gn +++ /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("//test/xts/tools/build/suite.gni") - -ohos_hap_assist_suite("ActsImageERelyHap") { - hap_profile = "entry/src/main/module.json" - js_build_mode = "debug" - hap_name = "ActsImageERelyHap" - - testonly = true - deps = [ - ":actsimageerelyhap_js_assets", - ":actsimageerelyhap_resources", - ] - ets2abc = true - certificate_profile = "signature/openharmony_sx.p7b" - subsystem_name = "ability" - part_name = "ability_runtime" -} - -ohos_app_scope("actsimageerelyhap_app_profile") { - app_profile = "AppScope/app.json" - sources = [ "AppScope/resources" ] -} - -ohos_js_assets("actsimageerelyhap_js_assets") { - source_dir = "entry/src/main/ets" -} - -ohos_resources("actsimageerelyhap_resources") { - sources = [ "entry/src/main/resources" ] - deps = [ ":actsimageerelyhap_app_profile" ] - hap_profile = "entry/src/main/module.json" -} diff --git a/ability/ability_runtime/actsappselector/actsimageerelyhap/entry/src/main/ets/Application/AbilityStage.ts b/ability/ability_runtime/actsappselector/actsimageerelyhap/entry/src/main/ets/Application/AbilityStage.ts deleted file mode 100644 index 0190fb0606f5b60fafe51d094ef1b3c8d69d1da4..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimageerelyhap/entry/src/main/ets/Application/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.application.AbilityStage" - -export default class MyAbilityStage extends AbilityStage { - onCreate() { - console.log("[Demo] MyAbilityStage onCreate") - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsimageerelyhap/entry/src/main/ets/MainAbility/MainAbility.ts b/ability/ability_runtime/actsappselector/actsimageerelyhap/entry/src/main/ets/MainAbility/MainAbility.ts deleted file mode 100644 index c082a6aec43c79c11fc4377e3c9c8cb5b92c7186..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimageerelyhap/entry/src/main/ets/MainAbility/MainAbility.ts +++ /dev/null @@ -1,66 +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.application.Ability' -import commonEvent from '@ohos.commonEvent' -export default class MainAbility extends Ability { - onCreate(want, launchParam) { - console.log("[Demo] MainAbility onCreate") - globalThis.abilityWant = want; - AppStorage.SetOrCreate('bundleName', want.bundleName); - AppStorage.SetOrCreate('abilityName', want.abilityName); - AppStorage.SetOrCreate('type', want.type); - AppStorage.SetOrCreate('uri', want.parameters.uri); - } - - onDestroy() { - console.log("[Demo] MainAbility onDestroy") - } - - onWindowStageCreate(windowStage) { - // Main window is created, set main page for this ability - console.log("[Demo] MainAbility onWindowStageCreate") - - windowStage.setUIContent(this.context, "pages/index", null) - } - - onWindowStageDestroy() { - // Main window is destroyed, release UI related resources - console.log("[Demo] MainAbility onWindowStageDestroy") - } - - onForeground() { - // Ability has brought to foreground - console.log("[Demo] MainAbility onForeground") - console.log("[Demo] MainAbility onForeground want: " + JSON.stringify(globalThis.abilityWant)) - let commonEventData = { - code: 0, - data: 'imagearelyhap', - parameters: { - abilityName: globalThis.abilityWant.abilityName, - bundleName: globalThis.abilityWant.bundleName, - type: globalThis.abilityWant.type, - uri: globalThis.abilityWant.parameters.uri - } - } - commonEvent.publish('AppSelector', commonEventData, (err) => { - console.log('======>imagearelyhap MainAbility published<======') - }) - } - - onBackground() { - // Ability has back to background - console.log("[Demo] MainAbility onBackground") - } -}; \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsimageerelyhap/entry/src/main/ets/SecondAbility/SecondAbility.ts b/ability/ability_runtime/actsappselector/actsimageerelyhap/entry/src/main/ets/SecondAbility/SecondAbility.ts deleted file mode 100644 index 650c7d6d0ac41b1f69e0973cfe540e36cb723481..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimageerelyhap/entry/src/main/ets/SecondAbility/SecondAbility.ts +++ /dev/null @@ -1,67 +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.application.Ability' -import commonEvent from '@ohos.commonEvent' -export default class SecondAbility extends Ability { - onCreate(want, launchParam) { - console.log("[Demo] SecondAbility onCreate") - globalThis.abilityWant = want; - AppStorage.SetOrCreate('bundleName', want.bundleName); - AppStorage.SetOrCreate('abilityName', want.abilityName); - AppStorage.SetOrCreate('type', want.type); - AppStorage.SetOrCreate('uri', want.parameters.uri); - } - - onDestroy() { - console.log("[Demo] SecondAbility onDestroy") - } - - onWindowStageCreate(windowStage) { - // Main window is created, set main page for this ability - console.log("[Demo] SecondAbility onWindowStageCreate") - - windowStage.setUIContent(this.context, "pages/index", null) - } - - onWindowStageDestroy() { - // Main window is destroyed, release UI related resources - console.log("[Demo] SecondAbility onWindowStageDestroy") - - } - - onForeground() { - // Ability has brought to foreground - console.log("[Demo] SecondAbility onForeground") - console.log("[Demo] SecondAbility onForeground want: " + JSON.stringify(globalThis.abilityWant)) - let commonEventData = { - code: 0, - data: 'imageerelyhap', - parameters: { - abilityName: globalThis.abilityWant.abilityName, - bundleName: globalThis.abilityWant.bundleName, - type: globalThis.abilityWant.type, - uri: globalThis.abilityWant.parameters.uri - } - } - commonEvent.publish('AppSelector', commonEventData, (err) => { - console.log('======>imageerelyhap SecondAbility published<======') - }) - } - - onBackground() { - // Ability has back to background - console.log("[Demo] SecondAbility onBackground") - } -}; \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsimageerelyhap/entry/src/main/ets/pages/index.ets b/ability/ability_runtime/actsappselector/actsimageerelyhap/entry/src/main/ets/pages/index.ets deleted file mode 100644 index 2bf5dfc120e669e90836f59e59f15aec8c7e2492..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimageerelyhap/entry/src/main/ets/pages/index.ets +++ /dev/null @@ -1,47 +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. - */ -@Entry -@Component -struct Index { - @State message: string = 'imageERelyHap' - @StorageLink('bundleName') bundleName: string = null; - @StorageLink('abilityName') abilityName: string = null; - @StorageLink('type') type: string = null; - @StorageLink('uri') uri: string = null; - - build() { - Row() { - Column() { - Text(this.message) - .fontSize(50) - .fontWeight(FontWeight.Bold) - Text("bundleName: " + this.bundleName) - .fontSize(25) - .fontWeight(FontWeight.Bold) - Text("abilityName: " + this.abilityName) - .fontSize(25) - .fontWeight(FontWeight.Bold) - Text("type: " + this.type) - .fontSize(25) - .fontWeight(FontWeight.Bold) - Text("uri: " + this.uri) - .fontSize(25) - .fontWeight(FontWeight.Bold) - } - .width('100%') - } - .height('100%') - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsimageerelyhap/entry/src/main/module.json b/ability/ability_runtime/actsappselector/actsimageerelyhap/entry/src/main/module.json deleted file mode 100644 index 994ab39b0c9449c68b56af5644feebe5caf2742f..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimageerelyhap/entry/src/main/module.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "module": { - "name": "entry", - "type": "entry", - "srcEntrance": "./ets/Application/AbilityStage.ts", - "description": "$string:entry_desc", - "mainElement": "MainAbility", - "deviceTypes": [ - "default", - "tablet" - ], - "deliveryWithInstall": true, - "installationFree": false, - "pages": "$profile:main_pages", - "uiSyntax": "ets", - "abilities": [ - { - "name": "MainAbility", - "srcEntrance": "./ets/MainAbility/MainAbility.ts", - "description": "$string:MainAbility_desc", - "icon": "$media:icon", - "label": "$string:MainAbility_label", - "visible": true, - "skills": [ - { - "entities": [ - "entity.system.home" - ], - "actions": [ - "action.system.home" - ] - } - ] - }, - { - "name": "SecondAbility", - "srcEntrance": "./ets/SecondAbility/SecondAbility.ts", - "description": "$string:SecondAbility_desc", - "icon": "$media:icon", - "visible": true, - "label": "$string:SecondAbility_label", - "skills": [ - { - "actions": [ - "ohos.want.action.viewData" - ], - "uris": [ - { - "type": "image/png" - } - ] - } - ] - } - ] - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsimageerelyhap/entry/src/main/resources/base/element/string.json b/ability/ability_runtime/actsappselector/actsimageerelyhap/entry/src/main/resources/base/element/string.json deleted file mode 100644 index 61009f0568889992994409f98d5fe3964976a381..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimageerelyhap/entry/src/main/resources/base/element/string.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "string": [ - { - "name": "entry_desc", - "value": "description" - }, - { - "name": "MainAbility_desc", - "value": "description" - }, - { - "name": "MainAbility_label", - "value": "label" - }, - { - "name": "SecondAbility_desc", - "value": "description" - }, - { - "name": "SecondAbility_label", - "value": "label" - } - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsimageerelyhap/entry/src/main/resources/base/media/icon.png b/ability/ability_runtime/actsappselector/actsimageerelyhap/entry/src/main/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actsappselector/actsimageerelyhap/entry/src/main/resources/base/media/icon.png and /dev/null differ diff --git a/ability/ability_runtime/actsappselector/actsimageerelyhap/entry/src/main/resources/base/profile/main_pages.json b/ability/ability_runtime/actsappselector/actsimageerelyhap/entry/src/main/resources/base/profile/main_pages.json deleted file mode 100644 index e291133c8b3c329611da5af30c299ec10589c7c2..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimageerelyhap/entry/src/main/resources/base/profile/main_pages.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "src": [ - "pages/index" - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsimageerelyhap/signature/openharmony_sx.p7b b/ability/ability_runtime/actsappselector/actsimageerelyhap/signature/openharmony_sx.p7b deleted file mode 100644 index 66b4457a8a81fb8d3356cf46d67226c850944858..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actsappselector/actsimageerelyhap/signature/openharmony_sx.p7b and /dev/null differ diff --git a/ability/ability_runtime/actsappselector/actsimagefrelyhap/AppScope/app.json b/ability/ability_runtime/actsappselector/actsimagefrelyhap/AppScope/app.json deleted file mode 100644 index daf090d19e0073910c3fb9a90d11e21bddddaa69..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimagefrelyhap/AppScope/app.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "app": { - "bundleName": "imagefrelyhap", - "vendor": "example", - "versionCode": 1000000, - "versionName": "1.0.0", - "icon": "$media:app_icon", - "label": "$string:app_name", - "distributedNotificationEnabled": true, - "keepAlive" : true, - "singleUser": true, - "minAPIVersion": 9, - "targetAPIVersion": 9, - "car": { - "apiCompatibleVersion": 9, - "singleUser": false - } - } -} diff --git a/ability/ability_runtime/actsappselector/actsimagefrelyhap/AppScope/resources/base/element/string.json b/ability/ability_runtime/actsappselector/actsimagefrelyhap/AppScope/resources/base/element/string.json deleted file mode 100644 index bf92305ade6d8307163cdcfc15ce4145a8a14281..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimagefrelyhap/AppScope/resources/base/element/string.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "string": [ - { - "name": "app_name", - "value": "imageFRelyHap" - } - ] -} diff --git a/ability/ability_runtime/actsappselector/actsimagefrelyhap/AppScope/resources/base/media/app_icon.png b/ability/ability_runtime/actsappselector/actsimagefrelyhap/AppScope/resources/base/media/app_icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actsappselector/actsimagefrelyhap/AppScope/resources/base/media/app_icon.png and /dev/null differ diff --git a/ability/ability_runtime/actsappselector/actsimagefrelyhap/BUILD.gn b/ability/ability_runtime/actsappselector/actsimagefrelyhap/BUILD.gn deleted file mode 100755 index 9eb9d019f758a95f451e526418c67d3a9a098970..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimagefrelyhap/BUILD.gn +++ /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("//test/xts/tools/build/suite.gni") - -ohos_hap_assist_suite("ActsImageFRelyHap") { - hap_profile = "entry/src/main/module.json" - js_build_mode = "debug" - hap_name = "ActsImageFRelyHap" - - testonly = true - deps = [ - ":actsimagefrelyhap_js_assets", - ":actsimagefrelyhap_resources", - ] - ets2abc = true - certificate_profile = "signature/openharmony_sx.p7b" - subsystem_name = "ability" - part_name = "ability_runtime" -} - -ohos_app_scope("actsimagefrelyhap_app_profile") { - app_profile = "AppScope/app.json" - sources = [ "AppScope/resources" ] -} - -ohos_js_assets("actsimagefrelyhap_js_assets") { - source_dir = "entry/src/main/ets" -} - -ohos_resources("actsimagefrelyhap_resources") { - sources = [ "entry/src/main/resources" ] - deps = [ ":actsimagefrelyhap_app_profile" ] - hap_profile = "entry/src/main/module.json" -} diff --git a/ability/ability_runtime/actsappselector/actsimagefrelyhap/entry/src/main/ets/Application/AbilityStage.ts b/ability/ability_runtime/actsappselector/actsimagefrelyhap/entry/src/main/ets/Application/AbilityStage.ts deleted file mode 100644 index 0190fb0606f5b60fafe51d094ef1b3c8d69d1da4..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimagefrelyhap/entry/src/main/ets/Application/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.application.AbilityStage" - -export default class MyAbilityStage extends AbilityStage { - onCreate() { - console.log("[Demo] MyAbilityStage onCreate") - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsimagefrelyhap/entry/src/main/ets/MainAbility/MainAbility.ts b/ability/ability_runtime/actsappselector/actsimagefrelyhap/entry/src/main/ets/MainAbility/MainAbility.ts deleted file mode 100644 index c082a6aec43c79c11fc4377e3c9c8cb5b92c7186..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimagefrelyhap/entry/src/main/ets/MainAbility/MainAbility.ts +++ /dev/null @@ -1,66 +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.application.Ability' -import commonEvent from '@ohos.commonEvent' -export default class MainAbility extends Ability { - onCreate(want, launchParam) { - console.log("[Demo] MainAbility onCreate") - globalThis.abilityWant = want; - AppStorage.SetOrCreate('bundleName', want.bundleName); - AppStorage.SetOrCreate('abilityName', want.abilityName); - AppStorage.SetOrCreate('type', want.type); - AppStorage.SetOrCreate('uri', want.parameters.uri); - } - - onDestroy() { - console.log("[Demo] MainAbility onDestroy") - } - - onWindowStageCreate(windowStage) { - // Main window is created, set main page for this ability - console.log("[Demo] MainAbility onWindowStageCreate") - - windowStage.setUIContent(this.context, "pages/index", null) - } - - onWindowStageDestroy() { - // Main window is destroyed, release UI related resources - console.log("[Demo] MainAbility onWindowStageDestroy") - } - - onForeground() { - // Ability has brought to foreground - console.log("[Demo] MainAbility onForeground") - console.log("[Demo] MainAbility onForeground want: " + JSON.stringify(globalThis.abilityWant)) - let commonEventData = { - code: 0, - data: 'imagearelyhap', - parameters: { - abilityName: globalThis.abilityWant.abilityName, - bundleName: globalThis.abilityWant.bundleName, - type: globalThis.abilityWant.type, - uri: globalThis.abilityWant.parameters.uri - } - } - commonEvent.publish('AppSelector', commonEventData, (err) => { - console.log('======>imagearelyhap MainAbility published<======') - }) - } - - onBackground() { - // Ability has back to background - console.log("[Demo] MainAbility onBackground") - } -}; \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsimagefrelyhap/entry/src/main/ets/SecondAbility/SecondAbility.ts b/ability/ability_runtime/actsappselector/actsimagefrelyhap/entry/src/main/ets/SecondAbility/SecondAbility.ts deleted file mode 100644 index b92beea4500936fc2b1121af5b5677c0b705b002..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimagefrelyhap/entry/src/main/ets/SecondAbility/SecondAbility.ts +++ /dev/null @@ -1,66 +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.application.Ability' -import commonEvent from '@ohos.commonEvent' -export default class SecondAbility extends Ability { - onCreate(want, launchParam) { - console.log("[Demo] MainAbility onCreate") - globalThis.abilityWant = want; - AppStorage.SetOrCreate('bundleName', want.bundleName); - AppStorage.SetOrCreate('abilityName', want.abilityName); - AppStorage.SetOrCreate('type', want.type); - AppStorage.SetOrCreate('uri', want.parameters.uri); - } - - onDestroy() { - console.log("[Demo] MainAbility onDestroy") - } - - onWindowStageCreate(windowStage) { - // Main window is created, set main page for this ability - console.log("[Demo] MainAbility onWindowStageCreate") - - windowStage.setUIContent(this.context, "pages/index", null) - } - - onWindowStageDestroy() { - // Main window is destroyed, release UI related resources - console.log("[Demo] MainAbility onWindowStageDestroy") - } - - onForeground() { - // Ability has brought to foreground - console.log("[Demo] MainAbility onForeground") - console.log("[Demo] MainAbility onForeground want: " + JSON.stringify(globalThis.abilityWant)) - let commonEventData = { - code: 0, - data: 'imagearelyhap', - parameters: { - abilityName: globalThis.abilityWant.abilityName, - bundleName: globalThis.abilityWant.bundleName, - type: globalThis.abilityWant.type, - uri: globalThis.abilityWant.parameters.uri - } - } - commonEvent.publish('AppSelector', commonEventData, (err) => { - console.log('======>imagearelyhap MainAbility published<======') - }) - } - - onBackground() { - // Ability has back to background - console.log("[Demo] MainAbility onBackground") - } -}; diff --git a/ability/ability_runtime/actsappselector/actsimagefrelyhap/entry/src/main/ets/pages/index.ets b/ability/ability_runtime/actsappselector/actsimagefrelyhap/entry/src/main/ets/pages/index.ets deleted file mode 100644 index 1f19a1da4cd8fe10ba7ce872f6138fc5bcf520ee..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimagefrelyhap/entry/src/main/ets/pages/index.ets +++ /dev/null @@ -1,47 +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. - */ -@Entry -@Component -struct Index { - @State message: string = 'imageFRelyHap' - @StorageLink('bundleName') bundleName: string = null; - @StorageLink('abilityName') abilityName: string = null; - @StorageLink('type') type: string = null; - @StorageLink('uri') uri: string = null; - - build() { - Row() { - Column() { - Text(this.message) - .fontSize(50) - .fontWeight(FontWeight.Bold) - Text("bundleName: " + this.bundleName) - .fontSize(25) - .fontWeight(FontWeight.Bold) - Text("abilityName: " + this.abilityName) - .fontSize(25) - .fontWeight(FontWeight.Bold) - Text("type: " + this.type) - .fontSize(25) - .fontWeight(FontWeight.Bold) - Text("uri: " + this.uri) - .fontSize(25) - .fontWeight(FontWeight.Bold) - } - .width('100%') - } - .height('100%') - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsimagefrelyhap/entry/src/main/module.json b/ability/ability_runtime/actsappselector/actsimagefrelyhap/entry/src/main/module.json deleted file mode 100644 index 190998d643a781ee579e62dcd35e7ae83b0402ed..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimagefrelyhap/entry/src/main/module.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "module": { - "name": "entry", - "type": "entry", - "srcEntrance": "./ets/Application/AbilityStage.ts", - "description": "$string:entry_desc", - "mainElement": "MainAbility", - "deviceTypes": [ - "default", - "tablet" - ], - "deliveryWithInstall": true, - "installationFree": false, - "pages": "$profile:main_pages", - "uiSyntax": "ets", - "abilities": [ - { - "name": "MainAbility", - "srcEntrance": "./ets/MainAbility/MainAbility.ts", - "description": "$string:MainAbility_desc", - "icon": "$media:icon", - "label": "$string:MainAbility_label", - "visible": true, - "skills": [ - { - "entities": [ - "entity.system.home" - ], - "actions": [ - "ohos.want.action.viewData" - ], - "uris": [ - { - "type": "image/png" - } - ] - } - ] - }, - { - "name": "SecondAbility", - "srcEntrance": "./ets/SecondAbility/SecondAbility.ts", - "description": "$string:SecondAbility_desc", - "icon": "$media:icon", - "label": "$string:SecondAbility_label", - "visible": true, - "skills": [ - { - "actions": [ - "ohos.want.action.viewData" - ], - "uris": [ - { - "type": "image/png" - } - ] - } - ] - } - ] - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsimagefrelyhap/entry/src/main/resources/base/element/string.json b/ability/ability_runtime/actsappselector/actsimagefrelyhap/entry/src/main/resources/base/element/string.json deleted file mode 100644 index 61009f0568889992994409f98d5fe3964976a381..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimagefrelyhap/entry/src/main/resources/base/element/string.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "string": [ - { - "name": "entry_desc", - "value": "description" - }, - { - "name": "MainAbility_desc", - "value": "description" - }, - { - "name": "MainAbility_label", - "value": "label" - }, - { - "name": "SecondAbility_desc", - "value": "description" - }, - { - "name": "SecondAbility_label", - "value": "label" - } - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsimagefrelyhap/entry/src/main/resources/base/media/icon.png b/ability/ability_runtime/actsappselector/actsimagefrelyhap/entry/src/main/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actsappselector/actsimagefrelyhap/entry/src/main/resources/base/media/icon.png and /dev/null differ diff --git a/ability/ability_runtime/actsappselector/actsimagefrelyhap/entry/src/main/resources/base/profile/main_pages.json b/ability/ability_runtime/actsappselector/actsimagefrelyhap/entry/src/main/resources/base/profile/main_pages.json deleted file mode 100644 index e291133c8b3c329611da5af30c299ec10589c7c2..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimagefrelyhap/entry/src/main/resources/base/profile/main_pages.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "src": [ - "pages/index" - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsimagefrelyhap/signature/openharmony_sx.p7b b/ability/ability_runtime/actsappselector/actsimagefrelyhap/signature/openharmony_sx.p7b deleted file mode 100644 index 66b4457a8a81fb8d3356cf46d67226c850944858..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actsappselector/actsimagefrelyhap/signature/openharmony_sx.p7b and /dev/null differ diff --git a/ability/ability_runtime/actsappselector/actsimagegrelyhap/AppScope/app.json b/ability/ability_runtime/actsappselector/actsimagegrelyhap/AppScope/app.json deleted file mode 100644 index 8cd8e57fb555c6c35432eff0367f3e04355ad412..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimagegrelyhap/AppScope/app.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "app": { - "bundleName": "imagegrelyhap", - "vendor": "example", - "versionCode": 1000000, - "versionName": "1.0.0", - "icon": "$media:app_icon", - "label": "$string:app_name", - "distributedNotificationEnabled": true, - "keepAlive" : true, - "singleUser": true, - "minAPIVersion": 9, - "targetAPIVersion": 9, - "car": { - "apiCompatibleVersion": 9, - "singleUser": false - } - } -} diff --git a/ability/ability_runtime/actsappselector/actsimagegrelyhap/AppScope/resources/base/element/string.json b/ability/ability_runtime/actsappselector/actsimagegrelyhap/AppScope/resources/base/element/string.json deleted file mode 100644 index 1e32c2ed17093310924304748a2eba36391f4c83..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimagegrelyhap/AppScope/resources/base/element/string.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "string": [ - { - "name": "app_name", - "value": "imageGRelyHap" - } - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsimagegrelyhap/AppScope/resources/base/media/app_icon.png b/ability/ability_runtime/actsappselector/actsimagegrelyhap/AppScope/resources/base/media/app_icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actsappselector/actsimagegrelyhap/AppScope/resources/base/media/app_icon.png and /dev/null differ diff --git a/ability/ability_runtime/actsappselector/actsimagegrelyhap/BUILD.gn b/ability/ability_runtime/actsappselector/actsimagegrelyhap/BUILD.gn deleted file mode 100755 index 6743221be79cbb9563c3e82c74b1152f74dcb59c..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimagegrelyhap/BUILD.gn +++ /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("//test/xts/tools/build/suite.gni") - -ohos_hap_assist_suite("ActsImageGRelyHap") { - hap_profile = "entry/src/main/module.json" - js_build_mode = "debug" - hap_name = "ActsImageGRelyHap" - - testonly = true - deps = [ - ":actsimagegrelyhap_js_assets", - ":actsimagegrelyhap_resources", - ] - ets2abc = true - certificate_profile = "signature/openharmony_sx.p7b" - subsystem_name = "ability" - part_name = "ability_runtime" -} - -ohos_app_scope("actsimagegrelyhap_app_profile") { - app_profile = "AppScope/app.json" - sources = [ "AppScope/resources" ] -} - -ohos_js_assets("actsimagegrelyhap_js_assets") { - source_dir = "entry/src/main/ets" -} - -ohos_resources("actsimagegrelyhap_resources") { - sources = [ "entry/src/main/resources" ] - deps = [ ":actsimagegrelyhap_app_profile" ] - hap_profile = "entry/src/main/module.json" -} diff --git a/ability/ability_runtime/actsappselector/actsimagegrelyhap/entry/src/main/ets/Application/AbilityStage.ts b/ability/ability_runtime/actsappselector/actsimagegrelyhap/entry/src/main/ets/Application/AbilityStage.ts deleted file mode 100644 index 0190fb0606f5b60fafe51d094ef1b3c8d69d1da4..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimagegrelyhap/entry/src/main/ets/Application/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.application.AbilityStage" - -export default class MyAbilityStage extends AbilityStage { - onCreate() { - console.log("[Demo] MyAbilityStage onCreate") - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsimagegrelyhap/entry/src/main/ets/MainAbility/MainAbility.ts b/ability/ability_runtime/actsappselector/actsimagegrelyhap/entry/src/main/ets/MainAbility/MainAbility.ts deleted file mode 100644 index c082a6aec43c79c11fc4377e3c9c8cb5b92c7186..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimagegrelyhap/entry/src/main/ets/MainAbility/MainAbility.ts +++ /dev/null @@ -1,66 +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.application.Ability' -import commonEvent from '@ohos.commonEvent' -export default class MainAbility extends Ability { - onCreate(want, launchParam) { - console.log("[Demo] MainAbility onCreate") - globalThis.abilityWant = want; - AppStorage.SetOrCreate('bundleName', want.bundleName); - AppStorage.SetOrCreate('abilityName', want.abilityName); - AppStorage.SetOrCreate('type', want.type); - AppStorage.SetOrCreate('uri', want.parameters.uri); - } - - onDestroy() { - console.log("[Demo] MainAbility onDestroy") - } - - onWindowStageCreate(windowStage) { - // Main window is created, set main page for this ability - console.log("[Demo] MainAbility onWindowStageCreate") - - windowStage.setUIContent(this.context, "pages/index", null) - } - - onWindowStageDestroy() { - // Main window is destroyed, release UI related resources - console.log("[Demo] MainAbility onWindowStageDestroy") - } - - onForeground() { - // Ability has brought to foreground - console.log("[Demo] MainAbility onForeground") - console.log("[Demo] MainAbility onForeground want: " + JSON.stringify(globalThis.abilityWant)) - let commonEventData = { - code: 0, - data: 'imagearelyhap', - parameters: { - abilityName: globalThis.abilityWant.abilityName, - bundleName: globalThis.abilityWant.bundleName, - type: globalThis.abilityWant.type, - uri: globalThis.abilityWant.parameters.uri - } - } - commonEvent.publish('AppSelector', commonEventData, (err) => { - console.log('======>imagearelyhap MainAbility published<======') - }) - } - - onBackground() { - // Ability has back to background - console.log("[Demo] MainAbility onBackground") - } -}; \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsimagegrelyhap/entry/src/main/ets/MainAbility/pages/index.ets b/ability/ability_runtime/actsappselector/actsimagegrelyhap/entry/src/main/ets/MainAbility/pages/index.ets deleted file mode 100644 index 184d752c47544da3d049cfc5811251a5ec0a2350..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimagegrelyhap/entry/src/main/ets/MainAbility/pages/index.ets +++ /dev/null @@ -1,51 +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'; -import file from '@system.file'; -@Entry -@Component -struct Index { - aboutToAppear() { - console.info('MainAbility index aboutToAppear') - } - - @State message: string = 'MainAbility' - - build() { - Row() { - Column() { - Text(this.message) - .fontSize(50) - .fontWeight(FontWeight.Bold) - Button() { - Text('next page') - .fontSize(20) - .fontWeight(FontWeight.Bold) - }.type(ButtonType.Capsule) - .margin({ - top: 20 - }) - .backgroundColor('#0D9FFB') - .width('35%') - .height('5%') - .onClick(()=>{ - }) - } - .width('100%') - } - .height('100%') - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsimagegrelyhap/entry/src/main/ets/pages/index.ets b/ability/ability_runtime/actsappselector/actsimagegrelyhap/entry/src/main/ets/pages/index.ets deleted file mode 100644 index 3ef538001795a4630d04727ca36007f19b1ffdcb..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimagegrelyhap/entry/src/main/ets/pages/index.ets +++ /dev/null @@ -1,47 +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. - */ -@Entry -@Component -struct Index { - @State message: string = 'imageGRelyHap' - @StorageLink('bundleName') bundleName: string = null; - @StorageLink('abilityName') abilityName: string = null; - @StorageLink('type') type: string = null; - @StorageLink('uri') uri: string = null; - - build() { - Row() { - Column() { - Text(this.message) - .fontSize(50) - .fontWeight(FontWeight.Bold) - Text("bundleName: " + this.bundleName) - .fontSize(25) - .fontWeight(FontWeight.Bold) - Text("abilityName: " + this.abilityName) - .fontSize(25) - .fontWeight(FontWeight.Bold) - Text("type: " + this.type) - .fontSize(25) - .fontWeight(FontWeight.Bold) - Text("uri: " + this.uri) - .fontSize(25) - .fontWeight(FontWeight.Bold) - } - .width('100%') - } - .height('100%') - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsimagegrelyhap/entry/src/main/module.json b/ability/ability_runtime/actsappselector/actsimagegrelyhap/entry/src/main/module.json deleted file mode 100644 index b493f7e0d4837b9d246396de27712a954ba5f8b4..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimagegrelyhap/entry/src/main/module.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "module": { - "name": "entry", - "type": "entry", - "srcEntrance": "./ets/Application/AbilityStage.ts", - "description": "$string:entry_desc", - "mainElement": "MainAbility", - "deviceTypes": [ - "default", - "tablet" - ], - "deliveryWithInstall": true, - "installationFree": false, - "pages": "$profile:main_pages", - "uiSyntax": "ets", - "abilities": [ - { - "name": "MainAbility", - "srcEntrance": "./ets/MainAbility/MainAbility.ts", - "description": "$string:MainAbility_desc", - "icon": "$media:icon", - "label": "$string:MainAbility_label", - "visible": true, - "skills": [ - { - "entities": [ - "entity.system.home" - ], - "actions": [ - "ohos.want.action.viewData" - ], - "uris": [ - { - "type": "image/png" - } - ] - } - ] - } - ] - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsimagegrelyhap/entry/src/main/resources/base/element/string.json b/ability/ability_runtime/actsappselector/actsimagegrelyhap/entry/src/main/resources/base/element/string.json deleted file mode 100644 index dddf9123aec0b6c9500eeacf289ac1bc58ff7a6a..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimagegrelyhap/entry/src/main/resources/base/element/string.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "string": [ - { - "name": "entry_desc", - "value": "description" - }, - { - "name": "MainAbility_desc", - "value": "description" - }, - { - "name": "MainAbility_label", - "value": "label" - } - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsimagegrelyhap/entry/src/main/resources/base/media/icon.png b/ability/ability_runtime/actsappselector/actsimagegrelyhap/entry/src/main/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actsappselector/actsimagegrelyhap/entry/src/main/resources/base/media/icon.png and /dev/null differ diff --git a/ability/ability_runtime/actsappselector/actsimagegrelyhap/entry/src/main/resources/base/profile/main_pages.json b/ability/ability_runtime/actsappselector/actsimagegrelyhap/entry/src/main/resources/base/profile/main_pages.json deleted file mode 100644 index e291133c8b3c329611da5af30c299ec10589c7c2..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimagegrelyhap/entry/src/main/resources/base/profile/main_pages.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "src": [ - "pages/index" - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsimagegrelyhap/signature/openharmony_sx.p7b b/ability/ability_runtime/actsappselector/actsimagegrelyhap/signature/openharmony_sx.p7b deleted file mode 100644 index 66b4457a8a81fb8d3356cf46d67226c850944858..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actsappselector/actsimagegrelyhap/signature/openharmony_sx.p7b and /dev/null differ diff --git a/ability/ability_runtime/actsappselector/actsimagehrelyhap/AppScope/app.json b/ability/ability_runtime/actsappselector/actsimagehrelyhap/AppScope/app.json deleted file mode 100644 index e16e3c3d3b8fab173c092ba7aa82a3fea108ee5b..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimagehrelyhap/AppScope/app.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "app": { - "bundleName": "imagehrelyhap", - "vendor": "example", - "versionCode": 1000000, - "versionName": "1.0.0", - "icon": "$media:app_icon", - "label": "$string:app_name", - "distributedNotificationEnabled": true, - "keepAlive" : true, - "singleUser": true, - "minAPIVersion": 9, - "targetAPIVersion": 9, - "car": { - "apiCompatibleVersion": 9, - "singleUser": false - } - } -} diff --git a/ability/ability_runtime/actsappselector/actsimagehrelyhap/AppScope/resources/base/element/string.json b/ability/ability_runtime/actsappselector/actsimagehrelyhap/AppScope/resources/base/element/string.json deleted file mode 100644 index f2c355baaa7bd6052f161bd6d2dccfe258e740ac..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimagehrelyhap/AppScope/resources/base/element/string.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "string": [ - { - "name": "app_name", - "value": "imageHRelyHap" - } - ] -} diff --git a/ability/ability_runtime/actsappselector/actsimagehrelyhap/AppScope/resources/base/media/app_icon.png b/ability/ability_runtime/actsappselector/actsimagehrelyhap/AppScope/resources/base/media/app_icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actsappselector/actsimagehrelyhap/AppScope/resources/base/media/app_icon.png and /dev/null differ diff --git a/ability/ability_runtime/actsappselector/actsimagehrelyhap/BUILD.gn b/ability/ability_runtime/actsappselector/actsimagehrelyhap/BUILD.gn deleted file mode 100755 index 134c1c11e33cdbe7fe7695dc3b126e147047a215..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimagehrelyhap/BUILD.gn +++ /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("//test/xts/tools/build/suite.gni") - -ohos_hap_assist_suite("ActsImageHRelyHap") { - hap_profile = "entry/src/main/module.json" - js_build_mode = "debug" - hap_name = "ActsImageHRelyHap" - - testonly = true - deps = [ - ":actsimagehrelyhap_js_assets", - ":actsimagehrelyhap_resources", - ] - ets2abc = true - certificate_profile = "signature/openharmony_sx.p7b" - subsystem_name = "ability" - part_name = "ability_runtime" -} - -ohos_app_scope("actsimagehrelyhap_app_profile") { - app_profile = "AppScope/app.json" - sources = [ "AppScope/resources" ] -} - -ohos_js_assets("actsimagehrelyhap_js_assets") { - source_dir = "entry/src/main/ets" -} - -ohos_resources("actsimagehrelyhap_resources") { - sources = [ "entry/src/main/resources" ] - deps = [ ":actsimagehrelyhap_app_profile" ] - hap_profile = "entry/src/main/module.json" -} diff --git a/ability/ability_runtime/actsappselector/actsimagehrelyhap/entry/src/main/ets/Application/AbilityStage.ts b/ability/ability_runtime/actsappselector/actsimagehrelyhap/entry/src/main/ets/Application/AbilityStage.ts deleted file mode 100644 index 0190fb0606f5b60fafe51d094ef1b3c8d69d1da4..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimagehrelyhap/entry/src/main/ets/Application/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.application.AbilityStage" - -export default class MyAbilityStage extends AbilityStage { - onCreate() { - console.log("[Demo] MyAbilityStage onCreate") - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsimagehrelyhap/entry/src/main/ets/MainAbility/MainAbility.ts b/ability/ability_runtime/actsappselector/actsimagehrelyhap/entry/src/main/ets/MainAbility/MainAbility.ts deleted file mode 100644 index c082a6aec43c79c11fc4377e3c9c8cb5b92c7186..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimagehrelyhap/entry/src/main/ets/MainAbility/MainAbility.ts +++ /dev/null @@ -1,66 +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.application.Ability' -import commonEvent from '@ohos.commonEvent' -export default class MainAbility extends Ability { - onCreate(want, launchParam) { - console.log("[Demo] MainAbility onCreate") - globalThis.abilityWant = want; - AppStorage.SetOrCreate('bundleName', want.bundleName); - AppStorage.SetOrCreate('abilityName', want.abilityName); - AppStorage.SetOrCreate('type', want.type); - AppStorage.SetOrCreate('uri', want.parameters.uri); - } - - onDestroy() { - console.log("[Demo] MainAbility onDestroy") - } - - onWindowStageCreate(windowStage) { - // Main window is created, set main page for this ability - console.log("[Demo] MainAbility onWindowStageCreate") - - windowStage.setUIContent(this.context, "pages/index", null) - } - - onWindowStageDestroy() { - // Main window is destroyed, release UI related resources - console.log("[Demo] MainAbility onWindowStageDestroy") - } - - onForeground() { - // Ability has brought to foreground - console.log("[Demo] MainAbility onForeground") - console.log("[Demo] MainAbility onForeground want: " + JSON.stringify(globalThis.abilityWant)) - let commonEventData = { - code: 0, - data: 'imagearelyhap', - parameters: { - abilityName: globalThis.abilityWant.abilityName, - bundleName: globalThis.abilityWant.bundleName, - type: globalThis.abilityWant.type, - uri: globalThis.abilityWant.parameters.uri - } - } - commonEvent.publish('AppSelector', commonEventData, (err) => { - console.log('======>imagearelyhap MainAbility published<======') - }) - } - - onBackground() { - // Ability has back to background - console.log("[Demo] MainAbility onBackground") - } -}; \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsimagehrelyhap/entry/src/main/ets/MainAbility/pages/index.ets b/ability/ability_runtime/actsappselector/actsimagehrelyhap/entry/src/main/ets/MainAbility/pages/index.ets deleted file mode 100644 index 184d752c47544da3d049cfc5811251a5ec0a2350..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimagehrelyhap/entry/src/main/ets/MainAbility/pages/index.ets +++ /dev/null @@ -1,51 +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'; -import file from '@system.file'; -@Entry -@Component -struct Index { - aboutToAppear() { - console.info('MainAbility index aboutToAppear') - } - - @State message: string = 'MainAbility' - - build() { - Row() { - Column() { - Text(this.message) - .fontSize(50) - .fontWeight(FontWeight.Bold) - Button() { - Text('next page') - .fontSize(20) - .fontWeight(FontWeight.Bold) - }.type(ButtonType.Capsule) - .margin({ - top: 20 - }) - .backgroundColor('#0D9FFB') - .width('35%') - .height('5%') - .onClick(()=>{ - }) - } - .width('100%') - } - .height('100%') - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsimagehrelyhap/entry/src/main/ets/pages/index.ets b/ability/ability_runtime/actsappselector/actsimagehrelyhap/entry/src/main/ets/pages/index.ets deleted file mode 100644 index cf55418401cd0d4397d281037b90a7758321b005..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimagehrelyhap/entry/src/main/ets/pages/index.ets +++ /dev/null @@ -1,47 +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. - */ -@Entry -@Component -struct Index { - @State message: string = 'imageHRelyHap' - @StorageLink('bundleName') bundleName: string = null; - @StorageLink('abilityName') abilityName: string = null; - @StorageLink('type') type: string = null; - @StorageLink('uri') uri: string = null; - - build() { - Row() { - Column() { - Text(this.message) - .fontSize(50) - .fontWeight(FontWeight.Bold) - Text("bundleName: " + this.bundleName) - .fontSize(25) - .fontWeight(FontWeight.Bold) - Text("abilityName: " + this.abilityName) - .fontSize(25) - .fontWeight(FontWeight.Bold) - Text("type: " + this.type) - .fontSize(25) - .fontWeight(FontWeight.Bold) - Text("uri: " + this.uri) - .fontSize(25) - .fontWeight(FontWeight.Bold) - } - .width('100%') - } - .height('100%') - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsimagehrelyhap/entry/src/main/module.json b/ability/ability_runtime/actsappselector/actsimagehrelyhap/entry/src/main/module.json deleted file mode 100644 index b493f7e0d4837b9d246396de27712a954ba5f8b4..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimagehrelyhap/entry/src/main/module.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "module": { - "name": "entry", - "type": "entry", - "srcEntrance": "./ets/Application/AbilityStage.ts", - "description": "$string:entry_desc", - "mainElement": "MainAbility", - "deviceTypes": [ - "default", - "tablet" - ], - "deliveryWithInstall": true, - "installationFree": false, - "pages": "$profile:main_pages", - "uiSyntax": "ets", - "abilities": [ - { - "name": "MainAbility", - "srcEntrance": "./ets/MainAbility/MainAbility.ts", - "description": "$string:MainAbility_desc", - "icon": "$media:icon", - "label": "$string:MainAbility_label", - "visible": true, - "skills": [ - { - "entities": [ - "entity.system.home" - ], - "actions": [ - "ohos.want.action.viewData" - ], - "uris": [ - { - "type": "image/png" - } - ] - } - ] - } - ] - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsimagehrelyhap/entry/src/main/resources/base/element/string.json b/ability/ability_runtime/actsappselector/actsimagehrelyhap/entry/src/main/resources/base/element/string.json deleted file mode 100644 index dddf9123aec0b6c9500eeacf289ac1bc58ff7a6a..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimagehrelyhap/entry/src/main/resources/base/element/string.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "string": [ - { - "name": "entry_desc", - "value": "description" - }, - { - "name": "MainAbility_desc", - "value": "description" - }, - { - "name": "MainAbility_label", - "value": "label" - } - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsimagehrelyhap/entry/src/main/resources/base/media/icon.png b/ability/ability_runtime/actsappselector/actsimagehrelyhap/entry/src/main/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actsappselector/actsimagehrelyhap/entry/src/main/resources/base/media/icon.png and /dev/null differ diff --git a/ability/ability_runtime/actsappselector/actsimagehrelyhap/entry/src/main/resources/base/profile/main_pages.json b/ability/ability_runtime/actsappselector/actsimagehrelyhap/entry/src/main/resources/base/profile/main_pages.json deleted file mode 100644 index e291133c8b3c329611da5af30c299ec10589c7c2..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimagehrelyhap/entry/src/main/resources/base/profile/main_pages.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "src": [ - "pages/index" - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsimagehrelyhap/signature/openharmony_sx.p7b b/ability/ability_runtime/actsappselector/actsimagehrelyhap/signature/openharmony_sx.p7b deleted file mode 100644 index 66b4457a8a81fb8d3356cf46d67226c850944858..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actsappselector/actsimagehrelyhap/signature/openharmony_sx.p7b and /dev/null differ diff --git a/ability/ability_runtime/actsappselector/actsimageirelyhap/AppScope/app.json b/ability/ability_runtime/actsappselector/actsimageirelyhap/AppScope/app.json deleted file mode 100644 index 2d2d77b8d712dd2a7d0729dfb26384de19912da1..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimageirelyhap/AppScope/app.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "app": { - "bundleName": "imageirelyhap", - "vendor": "example", - "versionCode": 1000000, - "versionName": "1.0.0", - "icon": "$media:app_icon", - "label": "$string:app_name", - "distributedNotificationEnabled": true, - "keepAlive" : true, - "singleUser": true, - "minAPIVersion": 9, - "targetAPIVersion": 9, - "car": { - "apiCompatibleVersion": 9, - "singleUser": false - } - } -} diff --git a/ability/ability_runtime/actsappselector/actsimageirelyhap/AppScope/resources/base/element/string.json b/ability/ability_runtime/actsappselector/actsimageirelyhap/AppScope/resources/base/element/string.json deleted file mode 100644 index 90d258ec6679699ca1dd21aca46459848b95a15f..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimageirelyhap/AppScope/resources/base/element/string.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "string": [ - { - "name": "app_name", - "value": "imageIRelyHap" - } - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsimageirelyhap/AppScope/resources/base/media/app_icon.png b/ability/ability_runtime/actsappselector/actsimageirelyhap/AppScope/resources/base/media/app_icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actsappselector/actsimageirelyhap/AppScope/resources/base/media/app_icon.png and /dev/null differ diff --git a/ability/ability_runtime/actsappselector/actsimageirelyhap/BUILD.gn b/ability/ability_runtime/actsappselector/actsimageirelyhap/BUILD.gn deleted file mode 100755 index 413afe705c35a288c4d4ba94ec6475f1bda9744f..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimageirelyhap/BUILD.gn +++ /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("//test/xts/tools/build/suite.gni") - -ohos_hap_assist_suite("ActsImageIRelyHap") { - hap_profile = "entry/src/main/module.json" - js_build_mode = "debug" - hap_name = "ActsImageIRelyHap" - - testonly = true - deps = [ - ":actsimageirelyhap_js_assets", - ":actsimageirelyhap_resources", - ] - ets2abc = true - certificate_profile = "signature/openharmony_sx.p7b" - subsystem_name = "ability" - part_name = "ability_runtime" -} - -ohos_app_scope("actsimageirelyhap_app_profile") { - app_profile = "AppScope/app.json" - sources = [ "AppScope/resources" ] -} - -ohos_js_assets("actsimageirelyhap_js_assets") { - source_dir = "entry/src/main/ets" -} - -ohos_resources("actsimageirelyhap_resources") { - sources = [ "entry/src/main/resources" ] - deps = [ ":actsimageirelyhap_app_profile" ] - hap_profile = "entry/src/main/module.json" -} diff --git a/ability/ability_runtime/actsappselector/actsimageirelyhap/entry/src/main/ets/Application/AbilityStage.ts b/ability/ability_runtime/actsappselector/actsimageirelyhap/entry/src/main/ets/Application/AbilityStage.ts deleted file mode 100644 index 0190fb0606f5b60fafe51d094ef1b3c8d69d1da4..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimageirelyhap/entry/src/main/ets/Application/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.application.AbilityStage" - -export default class MyAbilityStage extends AbilityStage { - onCreate() { - console.log("[Demo] MyAbilityStage onCreate") - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsimageirelyhap/entry/src/main/ets/MainAbility/MainAbility.ts b/ability/ability_runtime/actsappselector/actsimageirelyhap/entry/src/main/ets/MainAbility/MainAbility.ts deleted file mode 100644 index c082a6aec43c79c11fc4377e3c9c8cb5b92c7186..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimageirelyhap/entry/src/main/ets/MainAbility/MainAbility.ts +++ /dev/null @@ -1,66 +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.application.Ability' -import commonEvent from '@ohos.commonEvent' -export default class MainAbility extends Ability { - onCreate(want, launchParam) { - console.log("[Demo] MainAbility onCreate") - globalThis.abilityWant = want; - AppStorage.SetOrCreate('bundleName', want.bundleName); - AppStorage.SetOrCreate('abilityName', want.abilityName); - AppStorage.SetOrCreate('type', want.type); - AppStorage.SetOrCreate('uri', want.parameters.uri); - } - - onDestroy() { - console.log("[Demo] MainAbility onDestroy") - } - - onWindowStageCreate(windowStage) { - // Main window is created, set main page for this ability - console.log("[Demo] MainAbility onWindowStageCreate") - - windowStage.setUIContent(this.context, "pages/index", null) - } - - onWindowStageDestroy() { - // Main window is destroyed, release UI related resources - console.log("[Demo] MainAbility onWindowStageDestroy") - } - - onForeground() { - // Ability has brought to foreground - console.log("[Demo] MainAbility onForeground") - console.log("[Demo] MainAbility onForeground want: " + JSON.stringify(globalThis.abilityWant)) - let commonEventData = { - code: 0, - data: 'imagearelyhap', - parameters: { - abilityName: globalThis.abilityWant.abilityName, - bundleName: globalThis.abilityWant.bundleName, - type: globalThis.abilityWant.type, - uri: globalThis.abilityWant.parameters.uri - } - } - commonEvent.publish('AppSelector', commonEventData, (err) => { - console.log('======>imagearelyhap MainAbility published<======') - }) - } - - onBackground() { - // Ability has back to background - console.log("[Demo] MainAbility onBackground") - } -}; \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsimageirelyhap/entry/src/main/ets/MainAbility/pages/index.ets b/ability/ability_runtime/actsappselector/actsimageirelyhap/entry/src/main/ets/MainAbility/pages/index.ets deleted file mode 100644 index 184d752c47544da3d049cfc5811251a5ec0a2350..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimageirelyhap/entry/src/main/ets/MainAbility/pages/index.ets +++ /dev/null @@ -1,51 +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'; -import file from '@system.file'; -@Entry -@Component -struct Index { - aboutToAppear() { - console.info('MainAbility index aboutToAppear') - } - - @State message: string = 'MainAbility' - - build() { - Row() { - Column() { - Text(this.message) - .fontSize(50) - .fontWeight(FontWeight.Bold) - Button() { - Text('next page') - .fontSize(20) - .fontWeight(FontWeight.Bold) - }.type(ButtonType.Capsule) - .margin({ - top: 20 - }) - .backgroundColor('#0D9FFB') - .width('35%') - .height('5%') - .onClick(()=>{ - }) - } - .width('100%') - } - .height('100%') - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsimageirelyhap/entry/src/main/ets/pages/index.ets b/ability/ability_runtime/actsappselector/actsimageirelyhap/entry/src/main/ets/pages/index.ets deleted file mode 100644 index e904e3bb73f7f95a6dc0dccada2c614908c616be..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimageirelyhap/entry/src/main/ets/pages/index.ets +++ /dev/null @@ -1,47 +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. - */ -@Entry -@Component -struct Index { - @State message: string = 'imageIRelyHap' - @StorageLink('bundleName') bundleName: string = null; - @StorageLink('abilityName') abilityName: string = null; - @StorageLink('type') type: string = null; - @StorageLink('uri') uri: string = null; - - build() { - Row() { - Column() { - Text(this.message) - .fontSize(50) - .fontWeight(FontWeight.Bold) - Text("bundleName: " + this.bundleName) - .fontSize(25) - .fontWeight(FontWeight.Bold) - Text("abilityName: " + this.abilityName) - .fontSize(25) - .fontWeight(FontWeight.Bold) - Text("type: " + this.type) - .fontSize(25) - .fontWeight(FontWeight.Bold) - Text("uri: " + this.uri) - .fontSize(25) - .fontWeight(FontWeight.Bold) - } - .width('100%') - } - .height('100%') - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsimageirelyhap/entry/src/main/module.json b/ability/ability_runtime/actsappselector/actsimageirelyhap/entry/src/main/module.json deleted file mode 100644 index b493f7e0d4837b9d246396de27712a954ba5f8b4..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimageirelyhap/entry/src/main/module.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "module": { - "name": "entry", - "type": "entry", - "srcEntrance": "./ets/Application/AbilityStage.ts", - "description": "$string:entry_desc", - "mainElement": "MainAbility", - "deviceTypes": [ - "default", - "tablet" - ], - "deliveryWithInstall": true, - "installationFree": false, - "pages": "$profile:main_pages", - "uiSyntax": "ets", - "abilities": [ - { - "name": "MainAbility", - "srcEntrance": "./ets/MainAbility/MainAbility.ts", - "description": "$string:MainAbility_desc", - "icon": "$media:icon", - "label": "$string:MainAbility_label", - "visible": true, - "skills": [ - { - "entities": [ - "entity.system.home" - ], - "actions": [ - "ohos.want.action.viewData" - ], - "uris": [ - { - "type": "image/png" - } - ] - } - ] - } - ] - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsimageirelyhap/entry/src/main/resources/base/element/string.json b/ability/ability_runtime/actsappselector/actsimageirelyhap/entry/src/main/resources/base/element/string.json deleted file mode 100644 index dddf9123aec0b6c9500eeacf289ac1bc58ff7a6a..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimageirelyhap/entry/src/main/resources/base/element/string.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "string": [ - { - "name": "entry_desc", - "value": "description" - }, - { - "name": "MainAbility_desc", - "value": "description" - }, - { - "name": "MainAbility_label", - "value": "label" - } - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsimageirelyhap/entry/src/main/resources/base/media/icon.png b/ability/ability_runtime/actsappselector/actsimageirelyhap/entry/src/main/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actsappselector/actsimageirelyhap/entry/src/main/resources/base/media/icon.png and /dev/null differ diff --git a/ability/ability_runtime/actsappselector/actsimageirelyhap/entry/src/main/resources/base/profile/main_pages.json b/ability/ability_runtime/actsappselector/actsimageirelyhap/entry/src/main/resources/base/profile/main_pages.json deleted file mode 100644 index e291133c8b3c329611da5af30c299ec10589c7c2..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimageirelyhap/entry/src/main/resources/base/profile/main_pages.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "src": [ - "pages/index" - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsimageirelyhap/signature/openharmony_sx.p7b b/ability/ability_runtime/actsappselector/actsimageirelyhap/signature/openharmony_sx.p7b deleted file mode 100644 index 66b4457a8a81fb8d3356cf46d67226c850944858..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actsappselector/actsimageirelyhap/signature/openharmony_sx.p7b and /dev/null differ diff --git a/ability/ability_runtime/actsappselector/actsimagejrelyhap/AppScope/app.json b/ability/ability_runtime/actsappselector/actsimagejrelyhap/AppScope/app.json deleted file mode 100644 index 4b6ade9e393a72acfd04c1ba8283bfa666da7a8a..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimagejrelyhap/AppScope/app.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "app": { - "bundleName": "imagejrelyhap", - "vendor": "example", - "versionCode": 1000000, - "versionName": "1.0.0", - "icon": "$media:app_icon", - "label": "$string:app_name", - "distributedNotificationEnabled": true, - "keepAlive" : true, - "singleUser": true, - "minAPIVersion": 9, - "targetAPIVersion": 9, - "car": { - "apiCompatibleVersion": 9, - "singleUser": false - } - } -} diff --git a/ability/ability_runtime/actsappselector/actsimagejrelyhap/AppScope/resources/base/element/string.json b/ability/ability_runtime/actsappselector/actsimagejrelyhap/AppScope/resources/base/element/string.json deleted file mode 100644 index d9bd9cdbd32547c15bb8b57444b4cf8be0e54927..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimagejrelyhap/AppScope/resources/base/element/string.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "string": [ - { - "name": "app_name", - "value": "imageJRelyHap" - } - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsimagejrelyhap/AppScope/resources/base/media/app_icon.png b/ability/ability_runtime/actsappselector/actsimagejrelyhap/AppScope/resources/base/media/app_icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actsappselector/actsimagejrelyhap/AppScope/resources/base/media/app_icon.png and /dev/null differ diff --git a/ability/ability_runtime/actsappselector/actsimagejrelyhap/BUILD.gn b/ability/ability_runtime/actsappselector/actsimagejrelyhap/BUILD.gn deleted file mode 100755 index 2a8343798d525211b72dc8f74cab7a1acabc6e5d..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimagejrelyhap/BUILD.gn +++ /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("//test/xts/tools/build/suite.gni") - -ohos_hap_assist_suite("ActsImageJRelyHap") { - hap_profile = "entry/src/main/module.json" - js_build_mode = "debug" - hap_name = "ActsImageJRelyHap" - - deps = [ - ":actsimagejrelyhap_js_assets", - ":actsimagejrelyhap_resources", - ] - ets2abc = true - certificate_profile = "signature/openharmony_sx.p7b" - subsystem_name = "ability" - part_name = "ability_runtime" -} - -ohos_app_scope("actsimagejrelyhap_app_profile") { - app_profile = "AppScope/app.json" - sources = [ "AppScope/resources" ] -} - -ohos_js_assets("actsimagejrelyhap_js_assets") { - source_dir = "entry/src/main/ets" -} - -ohos_resources("actsimagejrelyhap_resources") { - sources = [ "entry/src/main/resources" ] - deps = [ ":actsimagejrelyhap_app_profile" ] - hap_profile = "entry/src/main/module.json" -} diff --git a/ability/ability_runtime/actsappselector/actsimagejrelyhap/entry/src/main/ets/Application/AbilityStage.ts b/ability/ability_runtime/actsappselector/actsimagejrelyhap/entry/src/main/ets/Application/AbilityStage.ts deleted file mode 100644 index 0190fb0606f5b60fafe51d094ef1b3c8d69d1da4..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimagejrelyhap/entry/src/main/ets/Application/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.application.AbilityStage" - -export default class MyAbilityStage extends AbilityStage { - onCreate() { - console.log("[Demo] MyAbilityStage onCreate") - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsimagejrelyhap/entry/src/main/ets/MainAbility/MainAbility.ts b/ability/ability_runtime/actsappselector/actsimagejrelyhap/entry/src/main/ets/MainAbility/MainAbility.ts deleted file mode 100644 index 5eccf4c7828dd8d34e6a327910ee1358a56c5833..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimagejrelyhap/entry/src/main/ets/MainAbility/MainAbility.ts +++ /dev/null @@ -1,47 +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.application.Ability' - -export default class MainAbility extends Ability { - onCreate(want, launchParam) { - console.log("[Demo] MainAbility onCreate") - } - - onDestroy() { - console.log("[Demo] MainAbility onDestroy") - } - - onWindowStageCreate(windowStage) { - // Main window is created, set main page for this ability - console.log("[Demo] MainAbility onWindowStageCreate") - - // windowStage.setUIContent(this.context, "pages/index", null) - } - - onWindowStageDestroy() { - // Main window is destroyed, release UI related resources - console.log("[Demo] MainAbility onWindowStageDestroy") - } - - onForeground() { - // Ability has brought to foreground - console.log("[Demo] MainAbility onForeground") - } - - onBackground() { - // Ability has back to background - console.log("[Demo] MainAbility onBackground") - } -}; \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsimagejrelyhap/entry/src/main/ets/MainAbility/pages/index.ets b/ability/ability_runtime/actsappselector/actsimagejrelyhap/entry/src/main/ets/MainAbility/pages/index.ets deleted file mode 100644 index 184d752c47544da3d049cfc5811251a5ec0a2350..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimagejrelyhap/entry/src/main/ets/MainAbility/pages/index.ets +++ /dev/null @@ -1,51 +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'; -import file from '@system.file'; -@Entry -@Component -struct Index { - aboutToAppear() { - console.info('MainAbility index aboutToAppear') - } - - @State message: string = 'MainAbility' - - build() { - Row() { - Column() { - Text(this.message) - .fontSize(50) - .fontWeight(FontWeight.Bold) - Button() { - Text('next page') - .fontSize(20) - .fontWeight(FontWeight.Bold) - }.type(ButtonType.Capsule) - .margin({ - top: 20 - }) - .backgroundColor('#0D9FFB') - .width('35%') - .height('5%') - .onClick(()=>{ - }) - } - .width('100%') - } - .height('100%') - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsimagejrelyhap/entry/src/main/ets/pages/index.ets b/ability/ability_runtime/actsappselector/actsimagejrelyhap/entry/src/main/ets/pages/index.ets deleted file mode 100644 index 30c9b862cdb3b656d310d90614387b6f5928bef5..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimagejrelyhap/entry/src/main/ets/pages/index.ets +++ /dev/null @@ -1,47 +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. - */ -@Entry -@Component -struct Index { - @State message: string = 'imageJRelyHap' - @StorageLink('bundleName') bundleName: string = null; - @StorageLink('abilityName') abilityName: string = null; - @StorageLink('type') type: string = null; - @StorageLink('uri') uri: string = null; - - build() { - Row() { - Column() { - Text(this.message) - .fontSize(50) - .fontWeight(FontWeight.Bold) - Text("bundleName: " + this.bundleName) - .fontSize(25) - .fontWeight(FontWeight.Bold) - Text("abilityName: " + this.abilityName) - .fontSize(25) - .fontWeight(FontWeight.Bold) - Text("type: " + this.type) - .fontSize(25) - .fontWeight(FontWeight.Bold) - Text("uri: " + this.uri) - .fontSize(25) - .fontWeight(FontWeight.Bold) - } - .width('100%') - } - .height('100%') - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsimagejrelyhap/entry/src/main/module.json b/ability/ability_runtime/actsappselector/actsimagejrelyhap/entry/src/main/module.json deleted file mode 100644 index e178e288652f4a0d05ffd5449877ffed7da65282..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimagejrelyhap/entry/src/main/module.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "module": { - "name": "entry", - "type": "entry", - "srcEntrance": "./ets/Application/AbilityStage.ts", - "description": "$string:entry_desc", - "mainElement": "MainAbility", - "deviceTypes": [ - "default", - "tablet" - ], - "deliveryWithInstall": true, - "installationFree": false, - "pages": "$profile:main_pages", - "uiSyntax": "ets", - "abilities": [ - { - "name": "MainAbility", - "srcEntrance": "./ets/MainAbility/MainAbility.ts", - "description": "$string:MainAbility_desc", - "icon": "$media:icon", - "label": "$string:MainAbility_label", - "visible": true, - "skills": [ - { - "entities": [ - "entity.system.home" - ], - "actions": [ - "ohos.want.action.viewData" - ], - "uris": [ - { - "type": "image/jpeg" - } - ] - } - ] - } - ] - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsimagejrelyhap/entry/src/main/resources/base/element/string.json b/ability/ability_runtime/actsappselector/actsimagejrelyhap/entry/src/main/resources/base/element/string.json deleted file mode 100644 index dddf9123aec0b6c9500eeacf289ac1bc58ff7a6a..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimagejrelyhap/entry/src/main/resources/base/element/string.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "string": [ - { - "name": "entry_desc", - "value": "description" - }, - { - "name": "MainAbility_desc", - "value": "description" - }, - { - "name": "MainAbility_label", - "value": "label" - } - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsimagejrelyhap/entry/src/main/resources/base/media/icon.png b/ability/ability_runtime/actsappselector/actsimagejrelyhap/entry/src/main/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actsappselector/actsimagejrelyhap/entry/src/main/resources/base/media/icon.png and /dev/null differ diff --git a/ability/ability_runtime/actsappselector/actsimagejrelyhap/entry/src/main/resources/base/profile/main_pages.json b/ability/ability_runtime/actsappselector/actsimagejrelyhap/entry/src/main/resources/base/profile/main_pages.json deleted file mode 100644 index e291133c8b3c329611da5af30c299ec10589c7c2..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimagejrelyhap/entry/src/main/resources/base/profile/main_pages.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "src": [ - "pages/index" - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsimagejrelyhap/signature/openharmony_sx.p7b b/ability/ability_runtime/actsappselector/actsimagejrelyhap/signature/openharmony_sx.p7b deleted file mode 100644 index 66b4457a8a81fb8d3356cf46d67226c850944858..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actsappselector/actsimagejrelyhap/signature/openharmony_sx.p7b and /dev/null differ diff --git a/ability/ability_runtime/actsappselector/actsimagekrelyhap/AppScope/app.json b/ability/ability_runtime/actsappselector/actsimagekrelyhap/AppScope/app.json deleted file mode 100644 index 70d6774d44f0b1d3e13dc9a07d181ce50c44d419..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimagekrelyhap/AppScope/app.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "app": { - "bundleName": "imagekrelyhap", - "vendor": "example", - "versionCode": 1000000, - "versionName": "1.0.0", - "icon": "$media:app_icon", - "label": "$string:app_name", - "distributedNotificationEnabled": true, - "keepAlive" : true, - "singleUser": true, - "minAPIVersion": 9, - "targetAPIVersion": 9, - "car": { - "apiCompatibleVersion": 9, - "singleUser": false - } - } -} diff --git a/ability/ability_runtime/actsappselector/actsimagekrelyhap/AppScope/resources/base/element/string.json b/ability/ability_runtime/actsappselector/actsimagekrelyhap/AppScope/resources/base/element/string.json deleted file mode 100644 index 71e244d1382c49873d6d6b031bd47ce57abc1d75..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimagekrelyhap/AppScope/resources/base/element/string.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "string": [ - { - "name": "app_name", - "value": "imageKRelyHap" - } - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsimagekrelyhap/AppScope/resources/base/media/app_icon.png b/ability/ability_runtime/actsappselector/actsimagekrelyhap/AppScope/resources/base/media/app_icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actsappselector/actsimagekrelyhap/AppScope/resources/base/media/app_icon.png and /dev/null differ diff --git a/ability/ability_runtime/actsappselector/actsimagekrelyhap/BUILD.gn b/ability/ability_runtime/actsappselector/actsimagekrelyhap/BUILD.gn deleted file mode 100755 index 78c47bd116ccd106e4953f9646c05d09f42561b1..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimagekrelyhap/BUILD.gn +++ /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("//test/xts/tools/build/suite.gni") - -ohos_hap_assist_suite("ActsImageKRelyHap") { - hap_profile = "entry/src/main/module.json" - js_build_mode = "debug" - hap_name = "ActsImageKRelyHap" - - testonly = true - deps = [ - ":actsimagekrelyhap_js_assets", - ":actsimagekrelyhap_resources", - ] - ets2abc = true - certificate_profile = "signature/openharmony_sx.p7b" - subsystem_name = "ability" - part_name = "ability_runtime" -} - -ohos_app_scope("actsimagekrelyhap_app_profile") { - app_profile = "AppScope/app.json" - sources = [ "AppScope/resources" ] -} - -ohos_js_assets("actsimagekrelyhap_js_assets") { - source_dir = "entry/src/main/ets" -} - -ohos_resources("actsimagekrelyhap_resources") { - sources = [ "entry/src/main/resources" ] - deps = [ ":actsimagekrelyhap_app_profile" ] - hap_profile = "entry/src/main/module.json" -} diff --git a/ability/ability_runtime/actsappselector/actsimagekrelyhap/entry/src/main/ets/Application/AbilityStage.ts b/ability/ability_runtime/actsappselector/actsimagekrelyhap/entry/src/main/ets/Application/AbilityStage.ts deleted file mode 100644 index 0190fb0606f5b60fafe51d094ef1b3c8d69d1da4..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimagekrelyhap/entry/src/main/ets/Application/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.application.AbilityStage" - -export default class MyAbilityStage extends AbilityStage { - onCreate() { - console.log("[Demo] MyAbilityStage onCreate") - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsimagekrelyhap/entry/src/main/ets/MainAbility/MainAbility.ts b/ability/ability_runtime/actsappselector/actsimagekrelyhap/entry/src/main/ets/MainAbility/MainAbility.ts deleted file mode 100644 index 48603c3f1882e3fee65d6e0967ec1aac963ff8ef..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimagekrelyhap/entry/src/main/ets/MainAbility/MainAbility.ts +++ /dev/null @@ -1,67 +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.application.Ability' -import commonEvent from '@ohos.commonEvent' -export default class MainAbility extends Ability { - onCreate(want, launchParam) { - console.log("[Demo] MainAbility onCreate") - globalThis.abilityWant = want; - if (want.parameters.startByService) { - AppStorage.SetOrCreate('startByService', want.parameters.startByService); - } - - } - - onDestroy() { - console.log("[Demo] MainAbility onDestroy") - } - - onWindowStageCreate(windowStage) { - // Main window is created, set main page for this ability - console.log("[Demo] MainAbility onWindowStageCreate") - - windowStage.setUIContent(this.context, "pages/index", null) - } - - onWindowStageDestroy() { - // Main window is destroyed, release UI related resources - console.log("[Demo] MainAbility onWindowStageDestroy") - } - - onForeground() { - // Ability has brought to foreground - console.log("[Demo] MainAbility onForeground") - console.log("[Demo] MainAbility onForeground want: " + JSON.stringify(globalThis.abilityWant)) - let commonEventData = { - code: 0, - data: 'imagekrelyhap', - parameters: { - abilityName: globalThis.abilityWant.abilityName, - bundleName: globalThis.abilityWant.bundleName, - type: globalThis.abilityWant.type, - uri: globalThis.abilityWant.parameters.uri, - startByService:globalThis.abilityWant.parameters.startByService - } - } - commonEvent.publish('AppSelector', commonEventData, (err) => { - console.log('======>imagekrelyhap MainAbility published<======') - }) - } - - onBackground() { - // Ability has back to background - console.log("[Demo] MainAbility onBackground") - } -}; \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsimagekrelyhap/entry/src/main/ets/MainAbility/pages/index.ets b/ability/ability_runtime/actsappselector/actsimagekrelyhap/entry/src/main/ets/MainAbility/pages/index.ets deleted file mode 100644 index f1865cb187f944195a866cd23584a5b165a54bf3..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimagekrelyhap/entry/src/main/ets/MainAbility/pages/index.ets +++ /dev/null @@ -1,36 +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. - */ -@Entry -@Component -struct Index { - @State message: string = 'imageKRelyHap' - @StorageLink('startByService') startByService: boolean = false; - - build() { - Row() { - Column() { - Text(this.message) - .fontSize(50) - .fontWeight(FontWeight.Bold) - - Text("startByService: " + this.startByService) - .fontSize(25) - .fontWeight(FontWeight.Bold) - } - .width('100%') - } - .height('100%') - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsimagekrelyhap/entry/src/main/ets/pages/index.ets b/ability/ability_runtime/actsappselector/actsimagekrelyhap/entry/src/main/ets/pages/index.ets deleted file mode 100644 index 647f63e74c2c3445054c8860ac412a796f89ae0e..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimagekrelyhap/entry/src/main/ets/pages/index.ets +++ /dev/null @@ -1,36 +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. - */ -@Entry -@Component -struct Index { - @State message: string = 'imageKRelyHap' - @StorageLink('startByService') startByService: boolean = false; - - build() { - Row() { - Column() { - Text(this.message) - .fontSize(50) - .fontWeight(FontWeight.Bold) - - Text("startByService: " + this.startByService) - .fontSize(25) - .fontWeight(FontWeight.Bold) - } - .width('100%') - } - .height('100%') - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsimagekrelyhap/entry/src/main/module.json b/ability/ability_runtime/actsappselector/actsimagekrelyhap/entry/src/main/module.json deleted file mode 100644 index 3b55239d095be39f47ef27bcbc8dc3145954a422..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimagekrelyhap/entry/src/main/module.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "module": { - "name": "entry", - "type": "entry", - "srcEntrance": "./ets/Application/AbilityStage.ts", - "description": "$string:entry_desc", - "mainElement": "MainAbility", - "deviceTypes": [ - "default", - "tablet" - ], - "deliveryWithInstall": true, - "installationFree": false, - "pages": "$profile:main_pages", - "uiSyntax": "ets", - "abilities": [ - { - "name": "MainAbility", - "srcEntrance": "./ets/MainAbility/MainAbility.ts", - "description": "$string:MainAbility_desc", - "icon": "$media:icon", - "label": "$string:MainAbility_label", - "visible": true, - "skills": [ - { - "entities": [ - "entity.system.home" - ], - "actions": [ - "action.system.home" - ] - } - ] - } - ] - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsimagekrelyhap/entry/src/main/resources/base/element/string.json b/ability/ability_runtime/actsappselector/actsimagekrelyhap/entry/src/main/resources/base/element/string.json deleted file mode 100644 index dddf9123aec0b6c9500eeacf289ac1bc58ff7a6a..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimagekrelyhap/entry/src/main/resources/base/element/string.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "string": [ - { - "name": "entry_desc", - "value": "description" - }, - { - "name": "MainAbility_desc", - "value": "description" - }, - { - "name": "MainAbility_label", - "value": "label" - } - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsimagekrelyhap/entry/src/main/resources/base/media/icon.png b/ability/ability_runtime/actsappselector/actsimagekrelyhap/entry/src/main/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actsappselector/actsimagekrelyhap/entry/src/main/resources/base/media/icon.png and /dev/null differ diff --git a/ability/ability_runtime/actsappselector/actsimagekrelyhap/entry/src/main/resources/base/profile/main_pages.json b/ability/ability_runtime/actsappselector/actsimagekrelyhap/entry/src/main/resources/base/profile/main_pages.json deleted file mode 100644 index e291133c8b3c329611da5af30c299ec10589c7c2..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsimagekrelyhap/entry/src/main/resources/base/profile/main_pages.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "src": [ - "pages/index" - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsimagekrelyhap/signature/openharmony_sx.p7b b/ability/ability_runtime/actsappselector/actsimagekrelyhap/signature/openharmony_sx.p7b deleted file mode 100644 index 66b4457a8a81fb8d3356cf46d67226c850944858..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actsappselector/actsimagekrelyhap/signature/openharmony_sx.p7b and /dev/null differ diff --git a/ability/ability_runtime/actsappselector/actsserviceabilityarelyhap/AppScope/app.json b/ability/ability_runtime/actsappselector/actsserviceabilityarelyhap/AppScope/app.json deleted file mode 100644 index c3256a90083abadcdf7244149dc5c7898d255130..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsserviceabilityarelyhap/AppScope/app.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "app": { - "bundleName": "aserviceabilityrelyhap", - "vendor": "example", - "versionCode": 1000000, - "versionName": "1.0.0", - "icon": "$media:app_icon", - "label": "$string:app_name", - "distributedNotificationEnabled": true, - "keepAlive" : true, - "singleUser": true, - "minAPIVersion": 9, - "targetAPIVersion": 9, - "car": { - "apiCompatibleVersion": 9, - "singleUser": false - } - } -} diff --git a/ability/ability_runtime/actsappselector/actsserviceabilityarelyhap/AppScope/resources/base/element/string.json b/ability/ability_runtime/actsappselector/actsserviceabilityarelyhap/AppScope/resources/base/element/string.json deleted file mode 100644 index 6683e32c2794d4749b23c82d7fe673f83c1066d1..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsserviceabilityarelyhap/AppScope/resources/base/element/string.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "string": [ - { - "name": "app_name", - "value": "actsserviceabilityarelyhap" - } - ] -} diff --git a/ability/ability_runtime/actsappselector/actsserviceabilityarelyhap/AppScope/resources/base/media/app_icon.png b/ability/ability_runtime/actsappselector/actsserviceabilityarelyhap/AppScope/resources/base/media/app_icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actsappselector/actsserviceabilityarelyhap/AppScope/resources/base/media/app_icon.png and /dev/null differ diff --git a/ability/ability_runtime/actsappselector/actsserviceabilityarelyhap/BUILD.gn b/ability/ability_runtime/actsappselector/actsserviceabilityarelyhap/BUILD.gn deleted file mode 100755 index c55e4970cdb7822329aca1a97c7e6b5fe7eaeba3..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsserviceabilityarelyhap/BUILD.gn +++ /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("//test/xts/tools/build/suite.gni") - -ohos_hap_assist_suite("ActsServiceAbilityARelyHap") { - hap_profile = "entry/src/main/module.json" - js_build_mode = "debug" - hap_name = "ActsServiceAbilityARelyHap" - - testonly = true - deps = [ - ":actsserviceabilityarelyhap_js_assets", - ":actsserviceabilityarelyhap_resources", - ] - ets2abc = true - certificate_profile = "signature/openharmony_sx.p7b" - subsystem_name = "ability" - part_name = "ability_runtime" -} - -ohos_app_scope("actsserviceabilityarelyhap_app_profile") { - app_profile = "AppScope/app.json" - sources = [ "AppScope/resources" ] -} - -ohos_js_assets("actsserviceabilityarelyhap_js_assets") { - source_dir = "entry/src/main/ets" -} - -ohos_resources("actsserviceabilityarelyhap_resources") { - sources = [ "entry/src/main/resources" ] - deps = [ ":actsserviceabilityarelyhap_app_profile" ] - hap_profile = "entry/src/main/module.json" -} diff --git a/ability/ability_runtime/actsappselector/actsserviceabilityarelyhap/entry/src/main/ets/Application/AbilityStage.ts b/ability/ability_runtime/actsappselector/actsserviceabilityarelyhap/entry/src/main/ets/Application/AbilityStage.ts deleted file mode 100644 index 0190fb0606f5b60fafe51d094ef1b3c8d69d1da4..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsserviceabilityarelyhap/entry/src/main/ets/Application/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.application.AbilityStage" - -export default class MyAbilityStage extends AbilityStage { - onCreate() { - console.log("[Demo] MyAbilityStage onCreate") - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsserviceabilityarelyhap/entry/src/main/ets/MainAbility/MainAbility.ts b/ability/ability_runtime/actsappselector/actsserviceabilityarelyhap/entry/src/main/ets/MainAbility/MainAbility.ts deleted file mode 100644 index 260e7891fe9921853f1d5fdf6640818e4f636d41..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsserviceabilityarelyhap/entry/src/main/ets/MainAbility/MainAbility.ts +++ /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 Ability from '@ohos.application.Ability' - -export default class MainAbility extends Ability { - onCreate(want, launchParam) { - console.log('MainAbility onCreate') - globalThis.abilityWant = want; - } - - onDestroy() { - console.log('MainAbility onDestroy') - } - - onWindowStageCreate(windowStage) { - console.log('MainAbility onWindowStageCreate') - windowStage.setUIContent(this.context, 'MainAbility/pages/index', null) - } - - onWindowStageDestroy() { - console.log('MainAbility onWindowStageDestroy') - } - - onForeground() { - console.log('MainAbility onForeground') - } - - onBackground() { - console.log('MainAbility onBackground') - } -}; \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsserviceabilityarelyhap/entry/src/main/ets/MainAbility/pages/index.ets b/ability/ability_runtime/actsappselector/actsserviceabilityarelyhap/entry/src/main/ets/MainAbility/pages/index.ets deleted file mode 100644 index c40096dc19e6372101d540684b500456f5f739c3..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsserviceabilityarelyhap/entry/src/main/ets/MainAbility/pages/index.ets +++ /dev/null @@ -1,47 +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. - */ -@Entry -@Component -struct Index { - @State message: string = 'imageAEntryRelyHap' - @StorageLink('bundleName') bundleName: string = null; - @StorageLink('abilityName') abilityName: string = null; - @StorageLink('type') type: string = null; - @StorageLink('uri') uri: string = null; - - build() { - Row() { - Column() { - Text(this.message) - .fontSize(50) - .fontWeight(FontWeight.Bold) - Text("bundleName: " + this.bundleName) - .fontSize(25) - .fontWeight(FontWeight.Bold) - Text("abilityName: " + this.abilityName) - .fontSize(25) - .fontWeight(FontWeight.Bold) - Text("type: " + this.type) - .fontSize(25) - .fontWeight(FontWeight.Bold) - Text("uri: " + this.uri) - .fontSize(25) - .fontWeight(FontWeight.Bold) - } - .width('100%') - } - .height('100%') - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsserviceabilityarelyhap/entry/src/main/ets/ServiceAbility/ServiceAbility.ts b/ability/ability_runtime/actsappselector/actsserviceabilityarelyhap/entry/src/main/ets/ServiceAbility/ServiceAbility.ts deleted file mode 100644 index 210dc7900f7a34e309d9e6eac96191206e624fdf..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsserviceabilityarelyhap/entry/src/main/ets/ServiceAbility/ServiceAbility.ts +++ /dev/null @@ -1,49 +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 ServiceExtensionAbility from '@ohos.application.ServiceExtensionAbility' -import rpc from "@ohos.rpc"; -import Want from '@ohos.application.Want'; - -export default class ServiceAbility extends ServiceExtensionAbility { - onCreate(want) { - console.log('AppSelector ServiceAbility onCreate, want: ' + want.abilityName); - } - - onConnect(want: Want) { - console.log('AppSelector ServiceAbility onConnect, want:' + want.abilityName); - this.context.startAbility( - { - action: "ohos.want.action.viewData", - type: "text/txt", - parameters: { - uri: "filePath" - } - }, (error, data) => { - console.info("ACTS_AppSelector_0900 startAbility " + - JSON.stringify(error) + "," + JSON.stringify(data)); - console.info("ACTS_AppSelector_0900 startAbility end"); - }) - return new rpc.RemoteObject('connect'); - } - - onDisconnect(want) { - console.log('AppSelector ServiceAbility onDisconnect, want:' + want.abilityName); - } - - onDestroy() { - console.log('ServiceAbility onDestroy'); - } -}; \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsserviceabilityarelyhap/entry/src/main/ets/ServiceAbility/service.ts b/ability/ability_runtime/actsappselector/actsserviceabilityarelyhap/entry/src/main/ets/ServiceAbility/service.ts deleted file mode 100644 index 8f18a61d57fe4cc71cd70bae4d9378d284df0e2c..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsserviceabilityarelyhap/entry/src/main/ets/ServiceAbility/service.ts +++ /dev/null @@ -1,26 +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 { - onStart() { - console.info('ServiceAbility onStart'); - }, - onStop() { - console.info('ServiceAbility onStop'); - }, - onCommand(want, startId) { - console.info('ServiceAbility onCommand'); - } -}; \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsserviceabilityarelyhap/entry/src/main/ets/pages/index.ets b/ability/ability_runtime/actsappselector/actsserviceabilityarelyhap/entry/src/main/ets/pages/index.ets deleted file mode 100644 index b821e0762b0ce1f49b14c6af2d2ef24927e5ec39..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsserviceabilityarelyhap/entry/src/main/ets/pages/index.ets +++ /dev/null @@ -1,47 +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. - */ -@Entry -@Component -struct Index { - @State message: string = 'imageAEntryRelyHap' - @StorageLink('bundleName') bundleName: string = null; - @StorageLink('abilityName') abilityName: string = null; - @StorageLink('type') type: string = null; - @StorageLink('uri') uri: string = null; - - build() { - Row() { - Column() { - Text(this.message) - .fontSize(50) - .fontWeight(FontWeight.Bold) - Text("bundleName: " + this.bundleName) - .fontSize(25) - .fontWeight(FontWeight.Bold) - Text("abilityName: " + this.abilityName) - .fontSize(25) - .fontWeight(FontWeight.Bold) - Text("type: " + this.type) - .fontSize(25) - .fontWeight(FontWeight.Bold) - Text("uri: " + this.uri) - .fontSize(25) - .fontWeight(FontWeight.Bold) - } - .width('100%') - } - .height('100%') - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsserviceabilityarelyhap/entry/src/main/module.json b/ability/ability_runtime/actsappselector/actsserviceabilityarelyhap/entry/src/main/module.json deleted file mode 100644 index 982222dc32d4c7e90ef6218c7514e8dc88dff627..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsserviceabilityarelyhap/entry/src/main/module.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "module": { - "name": "entry", - "type": "entry", - "srcEntrance": "./ets/Application/AbilityStage.ts", - "description": "$string:entry_desc", - "mainElement": "MainAbility", - "deviceTypes": [ - "default", - "tablet" - ], - "deliveryWithInstall": true, - "installationFree": false, - "pages": "$profile:main_pages", - "uiSyntax": "ets", - "abilities": [ - { - "name": "MainAbility", - "srcEntrance": "./ets/MainAbility/MainAbility.ts", - "description": "$string:MainAbility_desc", - "icon": "$media:icon", - "label": "$string:MainAbility_label", - "visible": true, - "skills": [ - { - "entities": [ - "entity.system.home" - ], - "actions": [ - "action.system.home" - ] - } - ] - } - ], - "extensionAbilities": [ - { - "name": "ServiceAbility", - "srcEntrance": "./ets/ServiceAbility/ServiceAbility.ts", - "label": "$string:service_ServiceAbility_desc", - "description": "$string:service_ServiceAbility_desc", - "type": "service|dataShare", - "visible": true - } - ] - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsserviceabilityarelyhap/entry/src/main/resources/base/element/string.json b/ability/ability_runtime/actsappselector/actsserviceabilityarelyhap/entry/src/main/resources/base/element/string.json deleted file mode 100644 index 24e76e8b8cf82af6c7c52c48bbf354c2c5b35173..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsserviceabilityarelyhap/entry/src/main/resources/base/element/string.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "string": [ - { - "name": "entry_desc", - "value": "description" - }, - { - "name": "MainAbility_desc", - "value": "description" - }, - { - "name": "MainAbility_label", - "value": "label" - }, - { - "name": "app_name", - "value": "actsserviceabilityarelyhap" - }, - { - "name": "description_application", - "value": "demo for test" - }, - { - "name": "service_ServiceAbility_desc", - "value": "service_description" - }, - { - "name": "service_ServiceAbility_label", - "value": "service_label" - } - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsserviceabilityarelyhap/entry/src/main/resources/base/media/icon.png b/ability/ability_runtime/actsappselector/actsserviceabilityarelyhap/entry/src/main/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actsappselector/actsserviceabilityarelyhap/entry/src/main/resources/base/media/icon.png and /dev/null differ diff --git a/ability/ability_runtime/actsappselector/actsserviceabilityarelyhap/entry/src/main/resources/base/profile/main_pages.json b/ability/ability_runtime/actsappselector/actsserviceabilityarelyhap/entry/src/main/resources/base/profile/main_pages.json deleted file mode 100644 index e291133c8b3c329611da5af30c299ec10589c7c2..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsserviceabilityarelyhap/entry/src/main/resources/base/profile/main_pages.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "src": [ - "pages/index" - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsserviceabilityarelyhap/signature/openharmony_sx.p7b b/ability/ability_runtime/actsappselector/actsserviceabilityarelyhap/signature/openharmony_sx.p7b deleted file mode 100644 index 66b4457a8a81fb8d3356cf46d67226c850944858..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actsappselector/actsserviceabilityarelyhap/signature/openharmony_sx.p7b and /dev/null differ diff --git a/ability/ability_runtime/actsappselector/actsserviceabilitybrelyhap/AppScope/app.json b/ability/ability_runtime/actsappselector/actsserviceabilitybrelyhap/AppScope/app.json deleted file mode 100644 index 38b25d33adb4e6c768412172077803e704df9c52..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsserviceabilitybrelyhap/AppScope/app.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "app": { - "bundleName": "bserviceabilityrelyhap", - "vendor": "example", - "versionCode": 1000000, - "versionName": "1.0.0", - "icon": "$media:app_icon", - "label": "$string:app_name", - "distributedNotificationEnabled": true, - "keepAlive" : true, - "singleUser": true, - "minAPIVersion": 9, - "targetAPIVersion": 9, - "car": { - "apiCompatibleVersion": 9, - "singleUser": false - } - } -} diff --git a/ability/ability_runtime/actsappselector/actsserviceabilitybrelyhap/AppScope/resources/base/element/string.json b/ability/ability_runtime/actsappselector/actsserviceabilitybrelyhap/AppScope/resources/base/element/string.json deleted file mode 100644 index 6792c02963a3e29c0f34e365874200241b0f72c7..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsserviceabilitybrelyhap/AppScope/resources/base/element/string.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "string": [ - { - "name": "app_name", - "value": "actsserviceabilitybrelyhap" - } - ] -} diff --git a/ability/ability_runtime/actsappselector/actsserviceabilitybrelyhap/AppScope/resources/base/media/app_icon.png b/ability/ability_runtime/actsappselector/actsserviceabilitybrelyhap/AppScope/resources/base/media/app_icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actsappselector/actsserviceabilitybrelyhap/AppScope/resources/base/media/app_icon.png and /dev/null differ diff --git a/ability/ability_runtime/actsappselector/actsserviceabilitybrelyhap/BUILD.gn b/ability/ability_runtime/actsappselector/actsserviceabilitybrelyhap/BUILD.gn deleted file mode 100755 index ddbe2a0f7c6010a71d9a68301c258ca04c7aebd4..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsserviceabilitybrelyhap/BUILD.gn +++ /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("//test/xts/tools/build/suite.gni") - -ohos_hap_assist_suite("ActsServiceAbilityBRelyHap") { - hap_profile = "entry/src/main/module.json" - js_build_mode = "debug" - hap_name = "ActsServiceAbilityBRelyHap" - - testonly = true - deps = [ - ":actsserviceabilitybrelyhap_js_assets", - ":actsserviceabilitybrelyhap_resources", - ] - ets2abc = true - certificate_profile = "signature/openharmony_sx.p7b" - subsystem_name = "ability" - part_name = "ability_runtime" -} - -ohos_app_scope("actsserviceabilitybrelyhap_app_profile") { - app_profile = "AppScope/app.json" - sources = [ "AppScope/resources" ] -} - -ohos_js_assets("actsserviceabilitybrelyhap_js_assets") { - source_dir = "entry/src/main/ets" -} - -ohos_resources("actsserviceabilitybrelyhap_resources") { - sources = [ "entry/src/main/resources" ] - deps = [ ":actsserviceabilitybrelyhap_app_profile" ] - hap_profile = "entry/src/main/module.json" -} diff --git a/ability/ability_runtime/actsappselector/actsserviceabilitybrelyhap/entry/src/main/ets/Application/AbilityStage.ts b/ability/ability_runtime/actsappselector/actsserviceabilitybrelyhap/entry/src/main/ets/Application/AbilityStage.ts deleted file mode 100644 index 0190fb0606f5b60fafe51d094ef1b3c8d69d1da4..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsserviceabilitybrelyhap/entry/src/main/ets/Application/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.application.AbilityStage" - -export default class MyAbilityStage extends AbilityStage { - onCreate() { - console.log("[Demo] MyAbilityStage onCreate") - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsserviceabilitybrelyhap/entry/src/main/ets/MainAbility/MainAbility.ts b/ability/ability_runtime/actsappselector/actsserviceabilitybrelyhap/entry/src/main/ets/MainAbility/MainAbility.ts deleted file mode 100644 index d22a1bf6db6d710e0e88072be63c9b519414d31f..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsserviceabilitybrelyhap/entry/src/main/ets/MainAbility/MainAbility.ts +++ /dev/null @@ -1,45 +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.application.Ability' - -export default class MainAbility extends Ability { - onCreate(want, launchParam) { - console.log('MainAbility onCreate') - globalThis.abilityWant = want; - globalThis.abilityContext = this.context; - } - - onDestroy() { - console.log('MainAbility onDestroy') - } - - onWindowStageCreate(windowStage) { - console.log('MainAbility onWindowStageCreate') - windowStage.setUIContent(this.context, 'MainAbility/pages/index', null) - - } - - onWindowStageDestroy() { - console.log('MainAbility onWindowStageDestroy') - } - - onForeground() { - console.log('MainAbility onForeground') - } - - onBackground() { - console.log('MainAbility onBackground') - } -}; \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsserviceabilitybrelyhap/entry/src/main/ets/ServiceAbility/ServiceAbility.ts b/ability/ability_runtime/actsappselector/actsserviceabilitybrelyhap/entry/src/main/ets/ServiceAbility/ServiceAbility.ts deleted file mode 100644 index ffa2c85dbe70cacfc662ba9cc0c346e7f6034707..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsserviceabilitybrelyhap/entry/src/main/ets/ServiceAbility/ServiceAbility.ts +++ /dev/null @@ -1,66 +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 ServiceExtensionAbility from '@ohos.application.ServiceExtensionAbility' -import rpc from "@ohos.rpc"; -import Want from '@ohos.application.Want'; -// import commonEvent from '@ohos.commonEvent' - -export default class ServiceAbility extends ServiceExtensionAbility { - onCreate(want) { - console.log('AppSelector ServiceAbility onCreate, want: ' + want.abilityName); - } - - onConnect(want: Want) { - console.log('AppSelector ServiceAbility onConnect, want:' + want.abilityName); - this.context.startAbility( - { - "bundleName": "imagekrelyhap", - "abilityName": "MainAbility", - parameters: { - startByService: true - } - }, (error, data) => { - console.info("ACTS_AppSelector_3600 startAbility " + - JSON.stringify(error) + "," + JSON.stringify(data)); - console.info("ACTS_AppSelector_3600 startAbility end"); - }) - // console.log("[Demo] MainAbility onForeground want: " + JSON.stringify(want)) - // let commonEventData = { - // code: 0, - // data: 'imagekrelyhap', - // parameters: { - // abilityName: want.abilityName, - // bundleName: want.bundleName, - // type: want.type, - // uri: want.parameters.uri, - // startByService:want.parameters.startByService - // } - // } - // commonEvent.publish('AppSelector', commonEventData, (err) => { - // console.log('======>imagekrelyhap MainAbility published<======') - // }) - - return new rpc.RemoteObject('connect'); - } - - onDisconnect(want) { - console.log('AppSelector ServiceAbility onDisconnect, want:' + want.abilityName); - } - - onDestroy() { - console.log('ServiceAbility onDestroy'); - } -}; \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsserviceabilitybrelyhap/entry/src/main/ets/ServiceAbility/service.ts b/ability/ability_runtime/actsappselector/actsserviceabilitybrelyhap/entry/src/main/ets/ServiceAbility/service.ts deleted file mode 100644 index 8f18a61d57fe4cc71cd70bae4d9378d284df0e2c..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsserviceabilitybrelyhap/entry/src/main/ets/ServiceAbility/service.ts +++ /dev/null @@ -1,26 +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 { - onStart() { - console.info('ServiceAbility onStart'); - }, - onStop() { - console.info('ServiceAbility onStop'); - }, - onCommand(want, startId) { - console.info('ServiceAbility onCommand'); - } -}; \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsserviceabilitybrelyhap/entry/src/main/ets/pages/index.ets b/ability/ability_runtime/actsappselector/actsserviceabilitybrelyhap/entry/src/main/ets/pages/index.ets deleted file mode 100644 index b821e0762b0ce1f49b14c6af2d2ef24927e5ec39..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsserviceabilitybrelyhap/entry/src/main/ets/pages/index.ets +++ /dev/null @@ -1,47 +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. - */ -@Entry -@Component -struct Index { - @State message: string = 'imageAEntryRelyHap' - @StorageLink('bundleName') bundleName: string = null; - @StorageLink('abilityName') abilityName: string = null; - @StorageLink('type') type: string = null; - @StorageLink('uri') uri: string = null; - - build() { - Row() { - Column() { - Text(this.message) - .fontSize(50) - .fontWeight(FontWeight.Bold) - Text("bundleName: " + this.bundleName) - .fontSize(25) - .fontWeight(FontWeight.Bold) - Text("abilityName: " + this.abilityName) - .fontSize(25) - .fontWeight(FontWeight.Bold) - Text("type: " + this.type) - .fontSize(25) - .fontWeight(FontWeight.Bold) - Text("uri: " + this.uri) - .fontSize(25) - .fontWeight(FontWeight.Bold) - } - .width('100%') - } - .height('100%') - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsserviceabilitybrelyhap/entry/src/main/module.json b/ability/ability_runtime/actsappselector/actsserviceabilitybrelyhap/entry/src/main/module.json deleted file mode 100644 index 0dc59caf7ea7fd5cb09c37a39721095de53c78f4..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsserviceabilitybrelyhap/entry/src/main/module.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "module": { - "name": "entry", - "type": "entry", - "srcEntrance": "./ets/Application/AbilityStage.ts", - "description": "$string:entry_desc", - "mainElement": "MainAbility", - "deviceTypes": [ - "default", - "tablet" - ], - "deliveryWithInstall": true, - "installationFree": false, - "pages": "$profile:main_pages", - "uiSyntax": "ets", - "abilities": [ - { - "name": "MainAbility", - "srcEntrance": "./ets/MainAbility/MainAbility.ts", - "description": "$string:MainAbility_desc", - "icon": "$media:icon", - "label": "$string:MainAbility_label", - "visible": true, - "skills": [ - { - "entities": [ - "entity.system.home" - ], - "actions": [ - "action.system.home" - ] - } - ] - } - ], - "extensionAbilities": [ - { - "name": "ServiceAbility", - "srcEntrance": "./ets/ServiceAbility/ServiceAbility.ts", - "label": "$string:service_ServiceAbility_label", - "description": "$string:service_ServiceAbility_desc", - "type": "service|dataShare", - "visible": true, - "skills": [ - { - "actions": [ - "ohos.want.action.viewData" - ], - "uris": [ - { - "type": "image/png" - } - ] - } - ] - } - ], - "requestPermissions": [ - { - "name":"ohos.permission.START_ABILITIES_FROM_BACKGROUND", - "reason":"need use ohos.permission.START_ABILITIES_FROM_BACKGROUND" - } - ] - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsserviceabilitybrelyhap/entry/src/main/resources/base/element/string.json b/ability/ability_runtime/actsappselector/actsserviceabilitybrelyhap/entry/src/main/resources/base/element/string.json deleted file mode 100644 index 8c7ec91f5a16fe583414ee4fea0c5e1e2316bc5e..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsserviceabilitybrelyhap/entry/src/main/resources/base/element/string.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "string": [ - { - "name": "entry_desc", - "value": "description" - }, - { - "name": "MainAbility_desc", - "value": "description" - }, - { - "name": "MainAbility_label", - "value": "label" - }, - { - "name": "app_name", - "value": "actsserviceabilitybrelyhap" - }, - { - "name": "description_application", - "value": "demo for test" - }, - { - "name": "service_ServiceAbility_desc", - "value": "service_description" - }, - { - "name": "service_ServiceAbility_label", - "value": "service_label" - } - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsserviceabilitybrelyhap/entry/src/main/resources/base/media/icon.png b/ability/ability_runtime/actsappselector/actsserviceabilitybrelyhap/entry/src/main/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actsappselector/actsserviceabilitybrelyhap/entry/src/main/resources/base/media/icon.png and /dev/null differ diff --git a/ability/ability_runtime/actsappselector/actsserviceabilitybrelyhap/entry/src/main/resources/base/profile/main_pages.json b/ability/ability_runtime/actsappselector/actsserviceabilitybrelyhap/entry/src/main/resources/base/profile/main_pages.json deleted file mode 100644 index e291133c8b3c329611da5af30c299ec10589c7c2..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actsserviceabilitybrelyhap/entry/src/main/resources/base/profile/main_pages.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "src": [ - "pages/index" - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actsserviceabilitybrelyhap/signature/openharmony_sx.p7b b/ability/ability_runtime/actsappselector/actsserviceabilitybrelyhap/signature/openharmony_sx.p7b deleted file mode 100644 index 66b4457a8a81fb8d3356cf46d67226c850944858..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actsappselector/actsserviceabilitybrelyhap/signature/openharmony_sx.p7b and /dev/null differ diff --git a/ability/ability_runtime/actsappselector/actstextarelyhap/BUILD.gn b/ability/ability_runtime/actsappselector/actstextarelyhap/BUILD.gn deleted file mode 100755 index 2f129f022f222699c3560180c4e9155683691d11..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actstextarelyhap/BUILD.gn +++ /dev/null @@ -1,36 +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("ActstextARelyHap") { - hap_profile = "./entry/src/main/config.json" - deps = [ - ":hjs_demo_js_assets", - ":hjs_demo_resources", - ] - ets2abc = true - certificate_profile = "./signature/openharmony_sx.p7b" - hap_name = "ActstextARelyHap" - js_build_mode = "debug" - testonly = true - subsystem_name = "ability" - part_name = "ability_runtime" -} -ohos_js_assets("hjs_demo_js_assets") { - source_dir = "./entry/src/main/ets/MainAbility" -} -ohos_resources("hjs_demo_resources") { - sources = [ "./entry/src/main/resources" ] - hap_profile = "./entry/src/main/config.json" -} diff --git a/ability/ability_runtime/actsappselector/actstextarelyhap/entry/src/main/config.json b/ability/ability_runtime/actsappselector/actstextarelyhap/entry/src/main/config.json deleted file mode 100644 index 927023c0d71464616612bf5c16d81dfeeb6ed8ff..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actstextarelyhap/entry/src/main/config.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "app": { - "vendor": "example", - "bundleName": "textarelyhap.com.example", - "version": { - "code": 1000000, - "name": "1.0.0" - }, - "apiVersion": { - "compatible": 8, - "releaseType": "Release", - "target": 8 - } - }, - "deviceConfig": {}, - "module": { - "mainAbility": ".MainAbility", - "deviceType": [ - "default", - "tablet" - ], - "abilities": [ - { - "skills": [ - { - "entities": [ - "entity.system.home" - ], - "actions": [ - "ohos.want.action.viewData" - ], - "uris": [ - { - "type": "text/txt" - } - ] - } - ], - "orientation": "unspecified", - "visible": true, - "srcPath": "MainAbility", - "name": ".MainAbility", - "srcLanguage": "ets", - "icon": "$media:icon", - "description": "$string:MainAbility_desc", - "formsEnabled": false, - "label": "$string:MainAbility_label", - "type": "page", - "launchType": "standard" - } - ], - "distro": { - "moduleType": "entry", - "installationFree": false, - "deliveryWithInstall": true, - "moduleName": "entry" - }, - "package": "com.example.entry", - "srcPath": "", - "name": ".entry", - "js": [ - { - "mode": { - "syntax": "ets", - "type": "pageAbility" - }, - "pages": [ - "pages/index" - ], - "name": ".MainAbility", - "window": { - "designWidth": 720, - "autoDesignWidth": false - } - } - ] - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actstextarelyhap/entry/src/main/ets/MainAbility/app.ets b/ability/ability_runtime/actsappselector/actstextarelyhap/entry/src/main/ets/MainAbility/app.ets deleted file mode 100644 index 451daa2fe41cc40b0bf6a9be4ef9f168956b3504..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actstextarelyhap/entry/src/main/ets/MainAbility/app.ets +++ /dev/null @@ -1,60 +0,0 @@ -/** - * Copyright (c) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import featureAbility from "@ohos.ability.featureAbility" -import commonEvent from '@ohos.commonEvent' -export default { - onCreate() { - var want; - console.info('Application onCreate') - - try{ - featureAbility.getWant((err, data) => { - want = data; - try{ - console.log("[Demo] MainAbility onForeground want: " + JSON.stringify(want)) - let commonEventData = { - code: 0, - data: 'textarelyhap', - parameters: { - abilityName: want.abilityName, - bundleName: want.bundleName, - type: want.type, - uri:want.parameters.uri - } - } - commonEvent.publish('AppSelector', commonEventData, (err) => { - console.log('======>textarelyhap MainAbility published<======') - }) - - AppStorage.SetOrCreate('bundleName', want.bundleName); - AppStorage.SetOrCreate('abilityName', want.abilityName); - AppStorage.SetOrCreate('type', want.type); - AppStorage.SetOrCreate('uri', want.parameters.uri); - }catch(error) - { - console.info('Application onCreate error ='+ error); - AppStorage.SetOrCreate('err1', error.message); - } - }); - }catch(err) - { - console.info('Application onCreate err ='+ err); - AppStorage.SetOrCreate('err2', err.message); - } - }, - onDestroy() { - console.info('Application onDestroy') - }, -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actstextarelyhap/entry/src/main/ets/MainAbility/pages/index.ets b/ability/ability_runtime/actsappselector/actstextarelyhap/entry/src/main/ets/MainAbility/pages/index.ets deleted file mode 100644 index b9b91905974490cf08585eef34ac6a0675f2085a..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actstextarelyhap/entry/src/main/ets/MainAbility/pages/index.ets +++ /dev/null @@ -1,48 +0,0 @@ -/** - * Copyright (c) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -@Entry -@Component -struct Index { - @State message: string = 'textARelyHap' - @StorageLink('bundleName') bundleName: string = ""; - @StorageLink('abilityName') abilityName: string = ""; - @StorageLink('type') type: string = ""; - @StorageLink('uri') uri: string = ""; - - build() { - Row() { - Column() { - Text(this.message) - .fontSize(50) - .fontWeight(FontWeight.Bold) - Text("bundleName: " + this.bundleName) - .fontSize(25) - .fontWeight(FontWeight.Bold) - Text("abilityName: " + this.abilityName) - .fontSize(25) - .fontWeight(FontWeight.Bold) - Text("type: " + this.type) - .fontSize(25) - .fontWeight(FontWeight.Bold) - Text("uri: " + this.uri) - .fontSize(25) - .fontWeight(FontWeight.Bold) - } - .width('100%') - } - .height('100%') - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actstextarelyhap/entry/src/main/resources/base/element/string.json b/ability/ability_runtime/actsappselector/actstextarelyhap/entry/src/main/resources/base/element/string.json deleted file mode 100644 index 655a94a9ab09856c1bc6c1849cd0666967a32f2d..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actstextarelyhap/entry/src/main/resources/base/element/string.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "string": [ - { - "name": "entry_desc", - "value": "description" - }, - { - "name": "MainAbility_desc", - "value": "description" - }, - { - "name": "MainAbility_label", - "value": "label" - }, - { - "name": "app_name", - "value": "actstextarelyhap" - }, - { - "name": "description_application", - "value": "demo for test" - } - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actstextarelyhap/entry/src/main/resources/base/media/icon.png b/ability/ability_runtime/actsappselector/actstextarelyhap/entry/src/main/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actsappselector/actstextarelyhap/entry/src/main/resources/base/media/icon.png and /dev/null differ diff --git a/ability/ability_runtime/actsappselector/actstextarelyhap/signature/openharmony_sx.p7b b/ability/ability_runtime/actsappselector/actstextarelyhap/signature/openharmony_sx.p7b deleted file mode 100644 index 66b4457a8a81fb8d3356cf46d67226c850944858..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actsappselector/actstextarelyhap/signature/openharmony_sx.p7b and /dev/null differ diff --git a/ability/ability_runtime/actsappselector/actstextbrelyhap/BUILD.gn b/ability/ability_runtime/actsappselector/actstextbrelyhap/BUILD.gn deleted file mode 100755 index e6f561f8416e77edc4bcc45a1da5a5b610e2d7cc..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actstextbrelyhap/BUILD.gn +++ /dev/null @@ -1,35 +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("ActstextBRelyHap") { - hap_profile = "./entry/src/main/config.json" - deps = [ - ":hjs_demo_js_assets", - ":hjs_demo_resources", - ] - ets2abc = true - certificate_profile = "./signature/openharmony_sx.p7b" - hap_name = "ActstextBRelyHap" - js_build_mode = "debug" - testonly = true - subsystem_name = "ability" - part_name = "ability_runtime" -} -ohos_js_assets("hjs_demo_js_assets") { - source_dir = "./entry/src/main/ets/MainAbility" -} -ohos_resources("hjs_demo_resources") { - sources = [ "./entry/src/main/resources" ] - hap_profile = "./entry/src/main/config.json" -} diff --git a/ability/ability_runtime/actsappselector/actstextbrelyhap/entry/src/main/config.json b/ability/ability_runtime/actsappselector/actstextbrelyhap/entry/src/main/config.json deleted file mode 100644 index 9eeb3cc4098efb3b4a865db3cdc791267faa6b74..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actstextbrelyhap/entry/src/main/config.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "app": { - "vendor": "example", - "bundleName": "textbrelyhap.com.example", - "version": { - "code": 1000000, - "name": "1.0.0" - }, - "apiVersion": { - "compatible": 8, - "releaseType": "Release", - "target": 8 - } - }, - "deviceConfig": {}, - "module": { - "mainAbility": ".MainAbility", - "deviceType": [ - "default", - "tablet" - ], - "abilities": [ - { - "skills": [ - { - "entities": [ - "entity.system.home" - ], - "actions": [ - "ohos.want.action.viewData" - ], - "uris": [ - { - "type": "text/txt" - } - ] - } - ], - "orientation": "unspecified", - "visible": true, - "srcPath": "MainAbility", - "name": ".MainAbility", - "srcLanguage": "ets", - "icon": "$media:icon", - "description": "$string:MainAbility_desc", - "formsEnabled": false, - "label": "$string:MainAbility_label", - "type": "page", - "launchType": "standard" - } - ], - "distro": { - "moduleType": "entry", - "installationFree": false, - "deliveryWithInstall": true, - "moduleName": "entry" - }, - "package": "com.example.entry", - "srcPath": "", - "name": ".entry", - "js": [ - { - "mode": { - "syntax": "ets", - "type": "pageAbility" - }, - "pages": [ - "pages/index" - ], - "name": ".MainAbility", - "window": { - "designWidth": 720, - "autoDesignWidth": false - } - } - ] - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actstextbrelyhap/entry/src/main/ets/MainAbility/app.ets b/ability/ability_runtime/actsappselector/actstextbrelyhap/entry/src/main/ets/MainAbility/app.ets deleted file mode 100644 index 2e13f77c871ddc8b35be79f4eb78def7c05d2cea..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actstextbrelyhap/entry/src/main/ets/MainAbility/app.ets +++ /dev/null @@ -1,58 +0,0 @@ -/** - * Copyright (c) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import featureAbility from "@ohos.ability.featureAbility" -import commonEvent from '@ohos.commonEvent' -export default { - onCreate() { - console.info('Application onCreate') - try{ - featureAbility.getWant((err, data) => { - var want = data; - try{ - console.log("[Demo] MainAbility onForeground want: " + JSON.stringify(want)) - let commonEventData = { - code: 0, - data: 'textbrelyhap', - parameters: { - abilityName: want.abilityName, - bundleName: want.bundleName, - type: want.type, - uri:want.parameters.uri - } - } - commonEvent.publish('AppSelector', commonEventData, (err) => { - console.log('======>textbrelyhap MainAbility published<======') - }) - - AppStorage.SetOrCreate('bundleName', want.bundleName); - AppStorage.SetOrCreate('abilityName', want.abilityName); - AppStorage.SetOrCreate('type', want.type); - AppStorage.SetOrCreate('uri', want.parameters.uri); - }catch(error) - { - console.info('Application onCreate error ='+ error); - AppStorage.SetOrCreate('err1', error.message); - } - }); - }catch(err) - { - console.info('Application onCreate err ='+ err); - AppStorage.SetOrCreate('err2', err.message); - } - }, - onDestroy() { - console.info('Application onDestroy') - }, -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actstextbrelyhap/entry/src/main/ets/MainAbility/pages/index.ets b/ability/ability_runtime/actsappselector/actstextbrelyhap/entry/src/main/ets/MainAbility/pages/index.ets deleted file mode 100644 index 76560040dc7d3887599a9d96b06988dbbe6c3608..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actstextbrelyhap/entry/src/main/ets/MainAbility/pages/index.ets +++ /dev/null @@ -1,48 +0,0 @@ -/** - * Copyright (c) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -@Entry -@Component -struct Index { - @State message: string = 'textBRelyHap' - @StorageLink('bundleName') bundleName: string = ""; - @StorageLink('abilityName') abilityName: string = ""; - @StorageLink('type') type: string = ""; - @StorageLink('uri') uri: string = ""; - - build() { - Row() { - Column() { - Text(this.message) - .fontSize(50) - .fontWeight(FontWeight.Bold) - Text("bundleName: " + this.bundleName) - .fontSize(25) - .fontWeight(FontWeight.Bold) - Text("abilityName: " + this.abilityName) - .fontSize(25) - .fontWeight(FontWeight.Bold) - Text("type: " + this.type) - .fontSize(25) - .fontWeight(FontWeight.Bold) - Text("uri: " + this.uri) - .fontSize(25) - .fontWeight(FontWeight.Bold) - } - .width('100%') - } - .height('100%') - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actstextbrelyhap/entry/src/main/resources/base/element/string.json b/ability/ability_runtime/actsappselector/actstextbrelyhap/entry/src/main/resources/base/element/string.json deleted file mode 100644 index 863d57a2f5c6975f36734e5e2331bbed32ff09b2..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actstextbrelyhap/entry/src/main/resources/base/element/string.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "string": [ - { - "name": "entry_desc", - "value": "description" - }, - { - "name": "MainAbility_desc", - "value": "description" - }, - { - "name": "MainAbility_label", - "value": "label" - }, - { - "name": "app_name", - "value": "actsstartrunnertest" - }, - { - "name": "description_application", - "value": "demo for test" - } - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actstextbrelyhap/entry/src/main/resources/base/media/icon.png b/ability/ability_runtime/actsappselector/actstextbrelyhap/entry/src/main/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actsappselector/actstextbrelyhap/entry/src/main/resources/base/media/icon.png and /dev/null differ diff --git a/ability/ability_runtime/actsappselector/actstextbrelyhap/signature/openharmony_sx.p7b b/ability/ability_runtime/actsappselector/actstextbrelyhap/signature/openharmony_sx.p7b deleted file mode 100644 index 66b4457a8a81fb8d3356cf46d67226c850944858..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actsappselector/actstextbrelyhap/signature/openharmony_sx.p7b and /dev/null differ diff --git a/ability/ability_runtime/actsappselector/actstextcrelyhap/BUILD.gn b/ability/ability_runtime/actsappselector/actstextcrelyhap/BUILD.gn deleted file mode 100755 index cbe03c77df9ef29efea652d39fd7a33f59f22e01..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actstextcrelyhap/BUILD.gn +++ /dev/null @@ -1,35 +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("ActstextCRelyHap") { - hap_profile = "./entry/src/main/config.json" - deps = [ - ":hjs_demo_js_assets", - ":hjs_demo_resources", - ] - ets2abc = true - certificate_profile = "./signature/openharmony_sx.p7b" - hap_name = "ActstextCRelyHap" - js_build_mode = "debug" - testonly = true - subsystem_name = "ability" - part_name = "ability_runtime" -} -ohos_js_assets("hjs_demo_js_assets") { - source_dir = "./entry/src/main/ets/MainAbility" -} -ohos_resources("hjs_demo_resources") { - sources = [ "./entry/src/main/resources" ] - hap_profile = "./entry/src/main/config.json" -} diff --git a/ability/ability_runtime/actsappselector/actstextcrelyhap/entry/src/main/config.json b/ability/ability_runtime/actsappselector/actstextcrelyhap/entry/src/main/config.json deleted file mode 100644 index f4bae31f49e70b15e6540934459d8b6199272881..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actstextcrelyhap/entry/src/main/config.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "app": { - "vendor": "example", - "bundleName": "textcrelyhap.com.example", - "version": { - "code": 1000000, - "name": "1.0.0" - }, - "apiVersion": { - "compatible": 8, - "releaseType": "Release", - "target": 8 - } - }, - "deviceConfig": {}, - "module": { - "mainAbility": ".MainAbility", - "deviceType": [ - "default", - "tablet" - ], - "abilities": [ - { - "skills": [ - { - "entities": [ - "entity.system.home" - ], - "actions": [ - "ohos.want.action.viewData" - ], - "uris": [ - { - "type": "text/txt" - } - ] - } - ], - "orientation": "unspecified", - "visible": true, - "srcPath": "MainAbility", - "name": ".MainAbility", - "srcLanguage": "ets", - "icon": "$media:icon", - "description": "$string:MainAbility_desc", - "formsEnabled": false, - "label": "$string:MainAbility_label", - "type": "page", - "launchType": "standard" - } - ], - "distro": { - "moduleType": "entry", - "installationFree": false, - "deliveryWithInstall": true, - "moduleName": "entry" - }, - "package": "com.example.entry", - "srcPath": "", - "name": ".entry", - "js": [ - { - "mode": { - "syntax": "ets", - "type": "pageAbility" - }, - "pages": [ - "pages/index" - ], - "name": ".MainAbility", - "window": { - "designWidth": 720, - "autoDesignWidth": false - } - } - ] - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actstextcrelyhap/entry/src/main/ets/MainAbility/app.ets b/ability/ability_runtime/actsappselector/actstextcrelyhap/entry/src/main/ets/MainAbility/app.ets deleted file mode 100644 index 83427442c5d81beec585d422c5aa320922fd4296..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actstextcrelyhap/entry/src/main/ets/MainAbility/app.ets +++ /dev/null @@ -1,58 +0,0 @@ -/** - * Copyright (c) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import featureAbility from "@ohos.ability.featureAbility" -import commonEvent from '@ohos.commonEvent' -export default { - onCreate() { - console.info('Application onCreate') - try{ - featureAbility.getWant((err, data) => { - var want = data; - try{ - console.log("[Demo] MainAbility onForeground want: " + JSON.stringify(want)) - let commonEventData = { - code: 0, - data: 'textcrelyhap', - parameters: { - abilityName: want.abilityName, - bundleName: want.bundleName, - type: want.type, - uri:want.parameters.uri - } - } - commonEvent.publish('AppSelector', commonEventData, (err) => { - console.log('======>textcrelyhap MainAbility published<======') - }) - - AppStorage.SetOrCreate('bundleName', want.bundleName); - AppStorage.SetOrCreate('abilityName', want.abilityName); - AppStorage.SetOrCreate('type', want.type); - AppStorage.SetOrCreate('uri', want.parameters.uri); - }catch(error) - { - console.info('Application onCreate error ='+ error); - AppStorage.SetOrCreate('err1', error.message); - } - }); - }catch(err) - { - console.info('Application onCreate err ='+ err); - AppStorage.SetOrCreate('err2', err.message); - } - }, - onDestroy() { - console.info('Application onDestroy') - }, -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actstextcrelyhap/entry/src/main/ets/MainAbility/pages/index.ets b/ability/ability_runtime/actsappselector/actstextcrelyhap/entry/src/main/ets/MainAbility/pages/index.ets deleted file mode 100644 index c012201e82452697bd99e0f55fcf92f879c11a34..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actstextcrelyhap/entry/src/main/ets/MainAbility/pages/index.ets +++ /dev/null @@ -1,48 +0,0 @@ -/** - * Copyright (c) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -@Entry -@Component -struct Index { - @State message: string = 'textCRelyHap' - @StorageLink('bundleName') bundleName: string = ""; - @StorageLink('abilityName') abilityName: string = ""; - @StorageLink('type') type: string = ""; - @StorageLink('uri') uri: string = ""; - - build() { - Row() { - Column() { - Text(this.message) - .fontSize(50) - .fontWeight(FontWeight.Bold) - Text("bundleName: " + this.bundleName) - .fontSize(25) - .fontWeight(FontWeight.Bold) - Text("abilityName: " + this.abilityName) - .fontSize(25) - .fontWeight(FontWeight.Bold) - Text("type: " + this.type) - .fontSize(25) - .fontWeight(FontWeight.Bold) - Text("uri: " + this.uri) - .fontSize(25) - .fontWeight(FontWeight.Bold) - } - .width('100%') - } - .height('100%') - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actstextcrelyhap/entry/src/main/resources/base/element/string.json b/ability/ability_runtime/actsappselector/actstextcrelyhap/entry/src/main/resources/base/element/string.json deleted file mode 100644 index 863d57a2f5c6975f36734e5e2331bbed32ff09b2..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actstextcrelyhap/entry/src/main/resources/base/element/string.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "string": [ - { - "name": "entry_desc", - "value": "description" - }, - { - "name": "MainAbility_desc", - "value": "description" - }, - { - "name": "MainAbility_label", - "value": "label" - }, - { - "name": "app_name", - "value": "actsstartrunnertest" - }, - { - "name": "description_application", - "value": "demo for test" - } - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actstextcrelyhap/entry/src/main/resources/base/media/icon.png b/ability/ability_runtime/actsappselector/actstextcrelyhap/entry/src/main/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actsappselector/actstextcrelyhap/entry/src/main/resources/base/media/icon.png and /dev/null differ diff --git a/ability/ability_runtime/actsappselector/actstextcrelyhap/signature/openharmony_sx.p7b b/ability/ability_runtime/actsappselector/actstextcrelyhap/signature/openharmony_sx.p7b deleted file mode 100644 index 66b4457a8a81fb8d3356cf46d67226c850944858..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actsappselector/actstextcrelyhap/signature/openharmony_sx.p7b and /dev/null differ diff --git a/ability/ability_runtime/actsappselector/actstextdrelyhap/BUILD.gn b/ability/ability_runtime/actsappselector/actstextdrelyhap/BUILD.gn deleted file mode 100755 index 7e5520c648653b836c1459bf38c83eaf1e902472..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actstextdrelyhap/BUILD.gn +++ /dev/null @@ -1,35 +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("ActstextDRelyHap") { - hap_profile = "./entry/src/main/config.json" - deps = [ - ":hjs_demo_js_assets", - ":hjs_demo_resources", - ] - ets2abc = true - certificate_profile = "./signature/openharmony_sx.p7b" - hap_name = "ActstextDRelyHap" - js_build_mode = "debug" - testonly = true - subsystem_name = "ability" - part_name = "ability_runtime" -} -ohos_js_assets("hjs_demo_js_assets") { - source_dir = "./entry/src/main/ets/MainAbility" -} -ohos_resources("hjs_demo_resources") { - sources = [ "./entry/src/main/resources" ] - hap_profile = "./entry/src/main/config.json" -} diff --git a/ability/ability_runtime/actsappselector/actstextdrelyhap/entry/src/main/config.json b/ability/ability_runtime/actsappselector/actstextdrelyhap/entry/src/main/config.json deleted file mode 100644 index 2027127689c605fd23219d0e88e4bcc739f500f6..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actstextdrelyhap/entry/src/main/config.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "app": { - "vendor": "example", - "bundleName": "textdrelyhap.com.example", - "version": { - "code": 1000000, - "name": "1.0.0" - }, - "apiVersion": { - "compatible": 8, - "releaseType": "Release", - "target": 8 - } - }, - "deviceConfig": {}, - "module": { - "mainAbility": ".MainAbility", - "deviceType": [ - "default", - "tablet" - ], - "abilities": [ - { - "skills": [ - { - "entities": [ - "entity.system.home" - ], - "actions": [ - "ohos.want.action.viewData" - ], - "uris": [ - { - "type": "text/txt" - } - ] - } - ], - "orientation": "unspecified", - "visible": true, - "srcPath": "MainAbility", - "name": ".MainAbility", - "srcLanguage": "ets", - "icon": "$media:icon", - "description": "$string:MainAbility_desc", - "formsEnabled": false, - "label": "$string:MainAbility_label", - "type": "page", - "launchType": "standard" - } - ], - "distro": { - "moduleType": "entry", - "installationFree": false, - "deliveryWithInstall": true, - "moduleName": "entry" - }, - "package": "com.example.entry", - "srcPath": "", - "name": ".entry", - "js": [ - { - "mode": { - "syntax": "ets", - "type": "pageAbility" - }, - "pages": [ - "pages/index" - ], - "name": ".MainAbility", - "window": { - "designWidth": 720, - "autoDesignWidth": false - } - } - ] - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actstextdrelyhap/entry/src/main/ets/MainAbility/app.ets b/ability/ability_runtime/actsappselector/actstextdrelyhap/entry/src/main/ets/MainAbility/app.ets deleted file mode 100644 index 64bfc183bf50af03cd43910909a9a563416f88f2..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actstextdrelyhap/entry/src/main/ets/MainAbility/app.ets +++ /dev/null @@ -1,58 +0,0 @@ -/** - * Copyright (c) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import featureAbility from "@ohos.ability.featureAbility" -import commonEvent from '@ohos.commonEvent' -export default { - onCreate() { - console.info('Application onCreate') - try{ - featureAbility.getWant((err, data) => { - var want = data; - try{ - console.log("[Demo] MainAbility onForeground want: " + JSON.stringify(want)) - let commonEventData = { - code: 0, - data: 'textdrelyhap', - parameters: { - abilityName: want.abilityName, - bundleName: want.bundleName, - type: want.type, - uri:want.parameters.uri - } - } - commonEvent.publish('AppSelector', commonEventData, (err) => { - console.log('======>textdrelyhap MainAbility published<======') - }) - - AppStorage.SetOrCreate('bundleName', want.bundleName); - AppStorage.SetOrCreate('abilityName', want.abilityName); - AppStorage.SetOrCreate('type', want.type); - AppStorage.SetOrCreate('uri', want.parameters.uri); - }catch(error) - { - console.info('Application onCreate error ='+ error); - AppStorage.SetOrCreate('err1', error.message); - } - }); - }catch(err) - { - console.info('Application onCreate err ='+ err); - AppStorage.SetOrCreate('err2', err.message); - } - }, - onDestroy() { - console.info('Application onDestroy') - }, -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actstextdrelyhap/entry/src/main/ets/MainAbility/pages/index.ets b/ability/ability_runtime/actsappselector/actstextdrelyhap/entry/src/main/ets/MainAbility/pages/index.ets deleted file mode 100644 index 8bc776ed3ebb8f39735a21ebb42a7deb5b063392..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actstextdrelyhap/entry/src/main/ets/MainAbility/pages/index.ets +++ /dev/null @@ -1,48 +0,0 @@ -/** - * Copyright (c) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -@Entry -@Component -struct Index { - @State message: string = 'textDRelyHap' - @StorageLink('bundleName') bundleName: string = ""; - @StorageLink('abilityName') abilityName: string = ""; - @StorageLink('type') type: string = ""; - @StorageLink('uri') uri: string = ""; - - build() { - Row() { - Column() { - Text(this.message) - .fontSize(50) - .fontWeight(FontWeight.Bold) - Text("bundleName: " + this.bundleName) - .fontSize(25) - .fontWeight(FontWeight.Bold) - Text("abilityName: " + this.abilityName) - .fontSize(25) - .fontWeight(FontWeight.Bold) - Text("type: " + this.type) - .fontSize(25) - .fontWeight(FontWeight.Bold) - Text("uri: " + this.uri) - .fontSize(25) - .fontWeight(FontWeight.Bold) - } - .width('100%') - } - .height('100%') - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actstextdrelyhap/entry/src/main/resources/base/element/string.json b/ability/ability_runtime/actsappselector/actstextdrelyhap/entry/src/main/resources/base/element/string.json deleted file mode 100644 index 863d57a2f5c6975f36734e5e2331bbed32ff09b2..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actstextdrelyhap/entry/src/main/resources/base/element/string.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "string": [ - { - "name": "entry_desc", - "value": "description" - }, - { - "name": "MainAbility_desc", - "value": "description" - }, - { - "name": "MainAbility_label", - "value": "label" - }, - { - "name": "app_name", - "value": "actsstartrunnertest" - }, - { - "name": "description_application", - "value": "demo for test" - } - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actstextdrelyhap/entry/src/main/resources/base/media/icon.png b/ability/ability_runtime/actsappselector/actstextdrelyhap/entry/src/main/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actsappselector/actstextdrelyhap/entry/src/main/resources/base/media/icon.png and /dev/null differ diff --git a/ability/ability_runtime/actsappselector/actstextdrelyhap/signature/openharmony_sx.p7b b/ability/ability_runtime/actsappselector/actstextdrelyhap/signature/openharmony_sx.p7b deleted file mode 100644 index 66b4457a8a81fb8d3356cf46d67226c850944858..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actsappselector/actstextdrelyhap/signature/openharmony_sx.p7b and /dev/null differ diff --git a/ability/ability_runtime/actsappselector/actstexterelyhap/BUILD.gn b/ability/ability_runtime/actsappselector/actstexterelyhap/BUILD.gn deleted file mode 100755 index 83376d2cd74b881abd4fd171ad2d14fc21978550..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actstexterelyhap/BUILD.gn +++ /dev/null @@ -1,35 +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("ActstextERelyHap") { - hap_profile = "./entry/src/main/config.json" - deps = [ - ":hjs_demo_js_assets", - ":hjs_demo_resources", - ] - ets2abc = true - certificate_profile = "./signature/openharmony_sx.p7b" - hap_name = "ActstextERelyHap" - js_build_mode = "debug" - testonly = true - subsystem_name = "ability" - part_name = "ability_runtime" -} -ohos_js_assets("hjs_demo_js_assets") { - source_dir = "./entry/src/main/ets/MainAbility" -} -ohos_resources("hjs_demo_resources") { - sources = [ "./entry/src/main/resources" ] - hap_profile = "./entry/src/main/config.json" -} diff --git a/ability/ability_runtime/actsappselector/actstexterelyhap/entry/src/main/config.json b/ability/ability_runtime/actsappselector/actstexterelyhap/entry/src/main/config.json deleted file mode 100644 index 0b339f39472ab27756cefcaacb9f76cee8551fb7..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actstexterelyhap/entry/src/main/config.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "app": { - "vendor": "example", - "bundleName": "texterelyhap.com.example", - "version": { - "code": 1000000, - "name": "1.0.0" - }, - "apiVersion": { - "compatible": 8, - "releaseType": "Release", - "target": 8 - } - }, - "deviceConfig": {}, - "module": { - "mainAbility": ".MainAbility", - "deviceType": [ - "default", - "tablet" - ], - "abilities": [ - { - "skills": [ - { - "entities": [ - "entity.system.home" - ], - "actions": [ - "ohos.want.action.viewData" - ], - "uris": [ - { - "type": "text/txt" - } - ] - } - ], - "orientation": "unspecified", - "visible": true, - "srcPath": "MainAbility", - "name": ".MainAbility", - "srcLanguage": "ets", - "icon": "$media:icon", - "description": "$string:MainAbility_desc", - "formsEnabled": false, - "label": "$string:MainAbility_label", - "type": "page", - "launchType": "standard" - } - ], - "distro": { - "moduleType": "entry", - "installationFree": false, - "deliveryWithInstall": true, - "moduleName": "entry" - }, - "package": "com.example.entry", - "srcPath": "", - "name": ".entry", - "js": [ - { - "mode": { - "syntax": "ets", - "type": "pageAbility" - }, - "pages": [ - "pages/index" - ], - "name": ".MainAbility", - "window": { - "designWidth": 720, - "autoDesignWidth": false - } - } - ] - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actstexterelyhap/entry/src/main/ets/MainAbility/app.ets b/ability/ability_runtime/actsappselector/actstexterelyhap/entry/src/main/ets/MainAbility/app.ets deleted file mode 100644 index 95daf966045a694f936a1de7cd5874c1606f2d85..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actstexterelyhap/entry/src/main/ets/MainAbility/app.ets +++ /dev/null @@ -1,58 +0,0 @@ -/** - * Copyright (c) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import featureAbility from "@ohos.ability.featureAbility" -import commonEvent from '@ohos.commonEvent' -export default { - onCreate() { - console.info('Application onCreate') - try{ - featureAbility.getWant((err, data) => { - var want = data; - try{ - console.log("[Demo] MainAbility onForeground want: " + JSON.stringify(want)) - let commonEventData = { - code: 0, - data: 'texterelyhap', - parameters: { - abilityName: want.abilityName, - bundleName: want.bundleName, - type: want.type, - uri:want.parameters.uri - } - } - commonEvent.publish('AppSelector', commonEventData, (err) => { - console.log('======>texterelyhap MainAbility published<======') - }) - - AppStorage.SetOrCreate('bundleName', want.bundleName); - AppStorage.SetOrCreate('abilityName', want.abilityName); - AppStorage.SetOrCreate('type', want.type); - AppStorage.SetOrCreate('uri', want.parameters.uri); - }catch(error) - { - console.info('Application onCreate error ='+ error); - AppStorage.SetOrCreate('err1', error.message); - } - }); - }catch(err) - { - console.info('Application onCreate err ='+ err); - AppStorage.SetOrCreate('err2', err.message); - } - }, - onDestroy() { - console.info('Application onDestroy') - }, -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actstexterelyhap/entry/src/main/ets/MainAbility/pages/index.ets b/ability/ability_runtime/actsappselector/actstexterelyhap/entry/src/main/ets/MainAbility/pages/index.ets deleted file mode 100644 index 8cebb723863a85d1abe2f4eb618dfa0979271817..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actstexterelyhap/entry/src/main/ets/MainAbility/pages/index.ets +++ /dev/null @@ -1,48 +0,0 @@ -/** - * Copyright (c) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -@Entry -@Component -struct Index { - @State message: string = 'textERelyHap' - @StorageLink('bundleName') bundleName: string = ""; - @StorageLink('abilityName') abilityName: string = ""; - @StorageLink('type') type: string = ""; - @StorageLink('uri') uri: string = ""; - - build() { - Row() { - Column() { - Text(this.message) - .fontSize(50) - .fontWeight(FontWeight.Bold) - Text("bundleName: " + this.bundleName) - .fontSize(25) - .fontWeight(FontWeight.Bold) - Text("abilityName: " + this.abilityName) - .fontSize(25) - .fontWeight(FontWeight.Bold) - Text("type: " + this.type) - .fontSize(25) - .fontWeight(FontWeight.Bold) - Text("uri: " + this.uri) - .fontSize(25) - .fontWeight(FontWeight.Bold) - } - .width('100%') - } - .height('100%') - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actstexterelyhap/entry/src/main/resources/base/element/string.json b/ability/ability_runtime/actsappselector/actstexterelyhap/entry/src/main/resources/base/element/string.json deleted file mode 100644 index 863d57a2f5c6975f36734e5e2331bbed32ff09b2..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actstexterelyhap/entry/src/main/resources/base/element/string.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "string": [ - { - "name": "entry_desc", - "value": "description" - }, - { - "name": "MainAbility_desc", - "value": "description" - }, - { - "name": "MainAbility_label", - "value": "label" - }, - { - "name": "app_name", - "value": "actsstartrunnertest" - }, - { - "name": "description_application", - "value": "demo for test" - } - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actstexterelyhap/entry/src/main/resources/base/media/icon.png b/ability/ability_runtime/actsappselector/actstexterelyhap/entry/src/main/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actsappselector/actstexterelyhap/entry/src/main/resources/base/media/icon.png and /dev/null differ diff --git a/ability/ability_runtime/actsappselector/actstexterelyhap/signature/openharmony_sx.p7b b/ability/ability_runtime/actsappselector/actstexterelyhap/signature/openharmony_sx.p7b deleted file mode 100644 index 66b4457a8a81fb8d3356cf46d67226c850944858..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actsappselector/actstexterelyhap/signature/openharmony_sx.p7b and /dev/null differ diff --git a/ability/ability_runtime/actsappselector/actstextfrelyhap/BUILD.gn b/ability/ability_runtime/actsappselector/actstextfrelyhap/BUILD.gn deleted file mode 100755 index 08ba99bb2f589969b0eb3c1001ff788acc1f124b..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actstextfrelyhap/BUILD.gn +++ /dev/null @@ -1,35 +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("ActstextFRelyHap") { - hap_profile = "./entry/src/main/config.json" - deps = [ - ":hjs_demo_js_assets", - ":hjs_demo_resources", - ] - ets2abc = true - certificate_profile = "./signature/openharmony_sx.p7b" - hap_name = "ActstextFRelyHap" - js_build_mode = "debug" - testonly = true - subsystem_name = "ability" - part_name = "ability_runtime" -} -ohos_js_assets("hjs_demo_js_assets") { - source_dir = "./entry/src/main/ets/MainAbility" -} -ohos_resources("hjs_demo_resources") { - sources = [ "./entry/src/main/resources" ] - hap_profile = "./entry/src/main/config.json" -} diff --git a/ability/ability_runtime/actsappselector/actstextfrelyhap/entry/src/main/config.json b/ability/ability_runtime/actsappselector/actstextfrelyhap/entry/src/main/config.json deleted file mode 100644 index daf8c9b0f25dba715098cc6e8256c50eaf71ef7f..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actstextfrelyhap/entry/src/main/config.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "app": { - "vendor": "example", - "bundleName": "textfrelyhap.com.example", - "version": { - "code": 1000000, - "name": "1.0.0" - }, - "apiVersion": { - "compatible": 8, - "releaseType": "Release", - "target": 8 - } - }, - "deviceConfig": {}, - "module": { - "mainAbility": ".MainAbility", - "deviceType": [ - "default", - "tablet" - ], - "abilities": [ - { - "skills": [ - { - "entities": [ - "entity.system.home" - ], - "actions": [ - "ohos.want.action.viewData" - ], - "uris": [ - { - "type": "text/txt" - } - ] - } - ], - "orientation": "unspecified", - "visible": true, - "srcPath": "MainAbility", - "name": ".MainAbility", - "srcLanguage": "ets", - "icon": "$media:icon", - "description": "$string:MainAbility_desc", - "formsEnabled": false, - "label": "$string:MainAbility_label", - "type": "page", - "launchType": "standard" - } - ], - "distro": { - "moduleType": "entry", - "installationFree": false, - "deliveryWithInstall": true, - "moduleName": "entry" - }, - "package": "com.example.entry", - "srcPath": "", - "name": ".entry", - "js": [ - { - "mode": { - "syntax": "ets", - "type": "pageAbility" - }, - "pages": [ - "pages/index" - ], - "name": ".MainAbility", - "window": { - "designWidth": 720, - "autoDesignWidth": false - } - } - ] - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actstextfrelyhap/entry/src/main/ets/MainAbility/app.ets b/ability/ability_runtime/actsappselector/actstextfrelyhap/entry/src/main/ets/MainAbility/app.ets deleted file mode 100644 index 1a21fb5443dc7f3fb21819568aa988da80308cae..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actstextfrelyhap/entry/src/main/ets/MainAbility/app.ets +++ /dev/null @@ -1,58 +0,0 @@ -/** - * Copyright (c) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import featureAbility from "@ohos.ability.featureAbility" -import commonEvent from '@ohos.commonEvent' -export default { - onCreate() { - console.info('Application onCreate') - try{ - featureAbility.getWant((err, data) => { - var want = data; - try{ - console.log("[Demo] MainAbility onForeground want: " + JSON.stringify(want)) - let commonEventData = { - code: 0, - data: 'textfrelyhap', - parameters: { - abilityName: want.abilityName, - bundleName: want.bundleName, - type: want.type, - uri:want.parameters.uri - } - } - commonEvent.publish('AppSelector', commonEventData, (err) => { - console.log('======>textfrelyhap MainAbility published<======') - }) - - AppStorage.SetOrCreate('bundleName', want.bundleName); - AppStorage.SetOrCreate('abilityName', want.abilityName); - AppStorage.SetOrCreate('type', want.type); - AppStorage.SetOrCreate('uri', want.parameters.uri); - }catch(error) - { - console.info('Application onCreate error ='+ error); - AppStorage.SetOrCreate('err1', error.message); - } - }); - }catch(err) - { - console.info('Application onCreate err ='+ err); - AppStorage.SetOrCreate('err2', err.message); - } - }, - onDestroy() { - console.info('Application onDestroy') - }, -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actstextfrelyhap/entry/src/main/ets/MainAbility/pages/index.ets b/ability/ability_runtime/actsappselector/actstextfrelyhap/entry/src/main/ets/MainAbility/pages/index.ets deleted file mode 100644 index 76d6ac147b0f2509b1685ddaa3db90ff3b03da17..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actstextfrelyhap/entry/src/main/ets/MainAbility/pages/index.ets +++ /dev/null @@ -1,48 +0,0 @@ -/** - * Copyright (c) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -@Entry -@Component -struct Index { - @State message: string = 'textFRelyHap' - @StorageLink('bundleName') bundleName: string = ""; - @StorageLink('abilityName') abilityName: string = ""; - @StorageLink('type') type: string = ""; - @StorageLink('uri') uri: string = ""; - - build() { - Row() { - Column() { - Text(this.message) - .fontSize(50) - .fontWeight(FontWeight.Bold) - Text("bundleName: " + this.bundleName) - .fontSize(25) - .fontWeight(FontWeight.Bold) - Text("abilityName: " + this.abilityName) - .fontSize(25) - .fontWeight(FontWeight.Bold) - Text("type: " + this.type) - .fontSize(25) - .fontWeight(FontWeight.Bold) - Text("uri: " + this.uri) - .fontSize(25) - .fontWeight(FontWeight.Bold) - } - .width('100%') - } - .height('100%') - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actstextfrelyhap/entry/src/main/resources/base/element/string.json b/ability/ability_runtime/actsappselector/actstextfrelyhap/entry/src/main/resources/base/element/string.json deleted file mode 100644 index 863d57a2f5c6975f36734e5e2331bbed32ff09b2..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actstextfrelyhap/entry/src/main/resources/base/element/string.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "string": [ - { - "name": "entry_desc", - "value": "description" - }, - { - "name": "MainAbility_desc", - "value": "description" - }, - { - "name": "MainAbility_label", - "value": "label" - }, - { - "name": "app_name", - "value": "actsstartrunnertest" - }, - { - "name": "description_application", - "value": "demo for test" - } - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actstextfrelyhap/entry/src/main/resources/base/media/icon.png b/ability/ability_runtime/actsappselector/actstextfrelyhap/entry/src/main/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actsappselector/actstextfrelyhap/entry/src/main/resources/base/media/icon.png and /dev/null differ diff --git a/ability/ability_runtime/actsappselector/actstextfrelyhap/signature/openharmony_sx.p7b b/ability/ability_runtime/actsappselector/actstextfrelyhap/signature/openharmony_sx.p7b deleted file mode 100644 index 66b4457a8a81fb8d3356cf46d67226c850944858..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actsappselector/actstextfrelyhap/signature/openharmony_sx.p7b and /dev/null differ diff --git a/ability/ability_runtime/actsappselector/actstextgrelyhap/BUILD.gn b/ability/ability_runtime/actsappselector/actstextgrelyhap/BUILD.gn deleted file mode 100755 index 1fba8dbe9aa828e46bda739a0b0ed77f21226724..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actstextgrelyhap/BUILD.gn +++ /dev/null @@ -1,35 +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("ActstextGRelyHap") { - hap_profile = "./entry/src/main/config.json" - deps = [ - ":hjs_demo_js_assets", - ":hjs_demo_resources", - ] - ets2abc = true - certificate_profile = "./signature/openharmony_sx.p7b" - hap_name = "ActstextGRelyHap" - js_build_mode = "debug" - testonly = true - subsystem_name = "ability" - part_name = "ability_runtime" -} -ohos_js_assets("hjs_demo_js_assets") { - source_dir = "./entry/src/main/ets/MainAbility" -} -ohos_resources("hjs_demo_resources") { - sources = [ "./entry/src/main/resources" ] - hap_profile = "./entry/src/main/config.json" -} diff --git a/ability/ability_runtime/actsappselector/actstextgrelyhap/entry/src/main/config.json b/ability/ability_runtime/actsappselector/actstextgrelyhap/entry/src/main/config.json deleted file mode 100644 index 9ae752a4263c47912f939683649c2177568649eb..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actstextgrelyhap/entry/src/main/config.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "app": { - "vendor": "example", - "bundleName": "textgrelyhap.com.example", - "version": { - "code": 1000000, - "name": "1.0.0" - }, - "apiVersion": { - "compatible": 8, - "releaseType": "Release", - "target": 8 - } - }, - "deviceConfig": {}, - "module": { - "mainAbility": ".MainAbility", - "deviceType": [ - "default", - "tablet" - ], - "abilities": [ - { - "skills": [ - { - "entities": [ - "entity.system.home" - ], - "actions": [ - "ohos.want.action.viewData" - ], - "uris": [ - { - "type": "text/txt" - } - ] - } - ], - "orientation": "unspecified", - "visible": true, - "srcPath": "MainAbility", - "name": ".MainAbility", - "srcLanguage": "ets", - "icon": "$media:icon", - "description": "$string:MainAbility_desc", - "formsEnabled": false, - "label": "$string:MainAbility_label", - "type": "page", - "launchType": "standard" - } - ], - "distro": { - "moduleType": "entry", - "installationFree": false, - "deliveryWithInstall": true, - "moduleName": "entry" - }, - "package": "com.example.entry", - "srcPath": "", - "name": ".entry", - "js": [ - { - "mode": { - "syntax": "ets", - "type": "pageAbility" - }, - "pages": [ - "pages/index" - ], - "name": ".MainAbility", - "window": { - "designWidth": 720, - "autoDesignWidth": false - } - } - ] - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actstextgrelyhap/entry/src/main/ets/MainAbility/app.ets b/ability/ability_runtime/actsappselector/actstextgrelyhap/entry/src/main/ets/MainAbility/app.ets deleted file mode 100644 index 92fed374e5d5a2c5cfb64662fd3f85f9aea56ab8..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actstextgrelyhap/entry/src/main/ets/MainAbility/app.ets +++ /dev/null @@ -1,58 +0,0 @@ -/** - * Copyright (c) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import featureAbility from "@ohos.ability.featureAbility" -import commonEvent from '@ohos.commonEvent' -export default { - onCreate() { - console.info('Application onCreate') - try{ - featureAbility.getWant((err, data) => { - var want = data; - try{ - console.log("[Demo] MainAbility onForeground want: " + JSON.stringify(want)) - let commonEventData = { - code: 0, - data: 'textgrelyhap', - parameters: { - abilityName: want.abilityName, - bundleName: want.bundleName, - type: want.type, - uri:want.parameters.uri - } - } - commonEvent.publish('AppSelector', commonEventData, (err) => { - console.log('======>textgrelyhap MainAbility published<======') - }) - - AppStorage.SetOrCreate('bundleName', want.bundleName); - AppStorage.SetOrCreate('abilityName', want.abilityName); - AppStorage.SetOrCreate('type', want.type); - AppStorage.SetOrCreate('uri', want.parameters.uri); - }catch(error) - { - console.info('Application onCreate error ='+ error); - AppStorage.SetOrCreate('err1', error.message); - } - }); - }catch(err) - { - console.info('Application onCreate err ='+ err); - AppStorage.SetOrCreate('err2', err.message); - } - }, - onDestroy() { - console.info('Application onDestroy') - }, -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actstextgrelyhap/entry/src/main/ets/MainAbility/pages/index.ets b/ability/ability_runtime/actsappselector/actstextgrelyhap/entry/src/main/ets/MainAbility/pages/index.ets deleted file mode 100644 index 3e385b74990affd8e27f6067a7d7d6e828464c6f..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actstextgrelyhap/entry/src/main/ets/MainAbility/pages/index.ets +++ /dev/null @@ -1,48 +0,0 @@ -/** - * Copyright (c) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -@Entry -@Component -struct Index { - @State message: string = 'textGRelyHap' - @StorageLink('bundleName') bundleName: string = ""; - @StorageLink('abilityName') abilityName: string = ""; - @StorageLink('type') type: string = ""; - @StorageLink('uri') uri: string = ""; - - build() { - Row() { - Column() { - Text(this.message) - .fontSize(50) - .fontWeight(FontWeight.Bold) - Text("bundleName: " + this.bundleName) - .fontSize(25) - .fontWeight(FontWeight.Bold) - Text("abilityName: " + this.abilityName) - .fontSize(25) - .fontWeight(FontWeight.Bold) - Text("type: " + this.type) - .fontSize(25) - .fontWeight(FontWeight.Bold) - Text("uri: " + this.uri) - .fontSize(25) - .fontWeight(FontWeight.Bold) - } - .width('100%') - } - .height('100%') - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actstextgrelyhap/entry/src/main/resources/base/element/string.json b/ability/ability_runtime/actsappselector/actstextgrelyhap/entry/src/main/resources/base/element/string.json deleted file mode 100644 index 863d57a2f5c6975f36734e5e2331bbed32ff09b2..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actstextgrelyhap/entry/src/main/resources/base/element/string.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "string": [ - { - "name": "entry_desc", - "value": "description" - }, - { - "name": "MainAbility_desc", - "value": "description" - }, - { - "name": "MainAbility_label", - "value": "label" - }, - { - "name": "app_name", - "value": "actsstartrunnertest" - }, - { - "name": "description_application", - "value": "demo for test" - } - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actstextgrelyhap/entry/src/main/resources/base/media/icon.png b/ability/ability_runtime/actsappselector/actstextgrelyhap/entry/src/main/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actsappselector/actstextgrelyhap/entry/src/main/resources/base/media/icon.png and /dev/null differ diff --git a/ability/ability_runtime/actsappselector/actstextgrelyhap/signature/openharmony_sx.p7b b/ability/ability_runtime/actsappselector/actstextgrelyhap/signature/openharmony_sx.p7b deleted file mode 100644 index 66b4457a8a81fb8d3356cf46d67226c850944858..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actsappselector/actstextgrelyhap/signature/openharmony_sx.p7b and /dev/null differ diff --git a/ability/ability_runtime/actsappselector/actstexthrelyhap/BUILD.gn b/ability/ability_runtime/actsappselector/actstexthrelyhap/BUILD.gn deleted file mode 100755 index fdc6f6595207c7d5289059c40053f5df2c31a5d1..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actstexthrelyhap/BUILD.gn +++ /dev/null @@ -1,35 +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("ActstextHRelyHap") { - hap_profile = "./entry/src/main/config.json" - deps = [ - ":hjs_demo_js_assets", - ":hjs_demo_resources", - ] - ets2abc = true - certificate_profile = "./signature/openharmony_sx.p7b" - hap_name = "ActstextHRelyHap" - js_build_mode = "debug" - testonly = true - subsystem_name = "ability" - part_name = "ability_runtime" -} -ohos_js_assets("hjs_demo_js_assets") { - source_dir = "./entry/src/main/ets/MainAbility" -} -ohos_resources("hjs_demo_resources") { - sources = [ "./entry/src/main/resources" ] - hap_profile = "./entry/src/main/config.json" -} diff --git a/ability/ability_runtime/actsappselector/actstexthrelyhap/entry/src/main/config.json b/ability/ability_runtime/actsappselector/actstexthrelyhap/entry/src/main/config.json deleted file mode 100644 index 45204e311af976b6569063a918679d12106c7317..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actstexthrelyhap/entry/src/main/config.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "app": { - "vendor": "example", - "bundleName": "texthrelyhap.com.example", - "version": { - "code": 1000000, - "name": "1.0.0" - }, - "apiVersion": { - "compatible": 8, - "releaseType": "Release", - "target": 8 - } - }, - "deviceConfig": {}, - "module": { - "mainAbility": ".MainAbility", - "deviceType": [ - "default", - "tablet" - ], - "abilities": [ - { - "skills": [ - { - "entities": [ - "entity.system.home" - ], - "actions": [ - "ohos.want.action.viewData" - ], - "uris": [ - { - "type": "text/txt" - } - ] - } - ], - "orientation": "unspecified", - "visible": true, - "srcPath": "MainAbility", - "name": ".MainAbility", - "srcLanguage": "ets", - "icon": "$media:icon", - "description": "$string:MainAbility_desc", - "formsEnabled": false, - "label": "$string:MainAbility_label", - "type": "page", - "launchType": "standard" - } - ], - "distro": { - "moduleType": "entry", - "installationFree": false, - "deliveryWithInstall": true, - "moduleName": "entry" - }, - "package": "com.example.entry", - "srcPath": "", - "name": ".entry", - "js": [ - { - "mode": { - "syntax": "ets", - "type": "pageAbility" - }, - "pages": [ - "pages/index" - ], - "name": ".MainAbility", - "window": { - "designWidth": 720, - "autoDesignWidth": false - } - } - ] - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actstexthrelyhap/entry/src/main/ets/MainAbility/app.ets b/ability/ability_runtime/actsappselector/actstexthrelyhap/entry/src/main/ets/MainAbility/app.ets deleted file mode 100644 index 723dfab3fce9064772189d623fe10fc01e7d1711..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actstexthrelyhap/entry/src/main/ets/MainAbility/app.ets +++ /dev/null @@ -1,58 +0,0 @@ -/** - * Copyright (c) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import featureAbility from "@ohos.ability.featureAbility" -import commonEvent from '@ohos.commonEvent' -export default { - onCreate() { - console.info('Application onCreate') - try{ - featureAbility.getWant((err, data) => { - var want = data; - try{ - console.log("[Demo] MainAbility onForeground want: " + JSON.stringify(want)) - let commonEventData = { - code: 0, - data: 'texthrelyhap', - parameters: { - abilityName: want.abilityName, - bundleName: want.bundleName, - type: want.type, - uri:want.parameters.uri - } - } - commonEvent.publish('AppSelector', commonEventData, (err) => { - console.log('======>texthrelyhap MainAbility published<======') - }) - - AppStorage.SetOrCreate('bundleName', want.bundleName); - AppStorage.SetOrCreate('abilityName', want.abilityName); - AppStorage.SetOrCreate('type', want.type); - AppStorage.SetOrCreate('uri', want.parameters.uri); - }catch(error) - { - console.info('Application onCreate error ='+ error); - AppStorage.SetOrCreate('err1', error.message); - } - }); - }catch(err) - { - console.info('Application onCreate err ='+ err); - AppStorage.SetOrCreate('err2', err.message); - } - }, - onDestroy() { - console.info('Application onDestroy') - }, -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actstexthrelyhap/entry/src/main/ets/MainAbility/pages/index.ets b/ability/ability_runtime/actsappselector/actstexthrelyhap/entry/src/main/ets/MainAbility/pages/index.ets deleted file mode 100644 index 0d2c9e3502b1938592fe171de0e589db191cab6a..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actstexthrelyhap/entry/src/main/ets/MainAbility/pages/index.ets +++ /dev/null @@ -1,48 +0,0 @@ -/** - * Copyright (c) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -@Entry -@Component -struct Index { - @State message: string = 'textHRelyHap' - @StorageLink('bundleName') bundleName: string = ""; - @StorageLink('abilityName') abilityName: string = ""; - @StorageLink('type') type: string = ""; - @StorageLink('uri') uri: string = ""; - - build() { - Row() { - Column() { - Text(this.message) - .fontSize(50) - .fontWeight(FontWeight.Bold) - Text("bundleName: " + this.bundleName) - .fontSize(25) - .fontWeight(FontWeight.Bold) - Text("abilityName: " + this.abilityName) - .fontSize(25) - .fontWeight(FontWeight.Bold) - Text("type: " + this.type) - .fontSize(25) - .fontWeight(FontWeight.Bold) - Text("uri: " + this.uri) - .fontSize(25) - .fontWeight(FontWeight.Bold) - } - .width('100%') - } - .height('100%') - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actstexthrelyhap/entry/src/main/resources/base/element/string.json b/ability/ability_runtime/actsappselector/actstexthrelyhap/entry/src/main/resources/base/element/string.json deleted file mode 100644 index 863d57a2f5c6975f36734e5e2331bbed32ff09b2..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actstexthrelyhap/entry/src/main/resources/base/element/string.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "string": [ - { - "name": "entry_desc", - "value": "description" - }, - { - "name": "MainAbility_desc", - "value": "description" - }, - { - "name": "MainAbility_label", - "value": "label" - }, - { - "name": "app_name", - "value": "actsstartrunnertest" - }, - { - "name": "description_application", - "value": "demo for test" - } - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actstexthrelyhap/entry/src/main/resources/base/media/icon.png b/ability/ability_runtime/actsappselector/actstexthrelyhap/entry/src/main/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actsappselector/actstexthrelyhap/entry/src/main/resources/base/media/icon.png and /dev/null differ diff --git a/ability/ability_runtime/actsappselector/actstexthrelyhap/signature/openharmony_sx.p7b b/ability/ability_runtime/actsappselector/actstexthrelyhap/signature/openharmony_sx.p7b deleted file mode 100644 index 66b4457a8a81fb8d3356cf46d67226c850944858..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actsappselector/actstexthrelyhap/signature/openharmony_sx.p7b and /dev/null differ diff --git a/ability/ability_runtime/actsappselector/actstextirelyhap/BUILD.gn b/ability/ability_runtime/actsappselector/actstextirelyhap/BUILD.gn deleted file mode 100755 index 40414a02c2a00198e20b8944d7722bcaef3ae6b8..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actstextirelyhap/BUILD.gn +++ /dev/null @@ -1,35 +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("ActstextIRelyHap") { - hap_profile = "./entry/src/main/config.json" - deps = [ - ":hjs_demo_js_assets", - ":hjs_demo_resources", - ] - ets2abc = true - certificate_profile = "./signature/openharmony_sx.p7b" - hap_name = "ActstextIRelyHap" - js_build_mode = "debug" - testonly = true - subsystem_name = "ability" - part_name = "ability_runtime" -} -ohos_js_assets("hjs_demo_js_assets") { - source_dir = "./entry/src/main/ets/MainAbility" -} -ohos_resources("hjs_demo_resources") { - sources = [ "./entry/src/main/resources" ] - hap_profile = "./entry/src/main/config.json" -} diff --git a/ability/ability_runtime/actsappselector/actstextirelyhap/entry/src/main/config.json b/ability/ability_runtime/actsappselector/actstextirelyhap/entry/src/main/config.json deleted file mode 100644 index 5590c5e06de2a43a993faea939402c0eefe7950d..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actstextirelyhap/entry/src/main/config.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "app": { - "vendor": "example", - "bundleName": "textirelyhap.com.example", - "version": { - "code": 1000000, - "name": "1.0.0" - }, - "apiVersion": { - "compatible": 8, - "releaseType": "Release", - "target": 8 - } - }, - "deviceConfig": {}, - "module": { - "mainAbility": ".MainAbility", - "deviceType": [ - "default", - "tablet" - ], - "abilities": [ - { - "skills": [ - { - "entities": [ - "entity.system.home" - ], - "actions": [ - "ohos.want.action.viewData" - ], - "uris": [ - { - "type": "text/txt" - } - ] - } - ], - "orientation": "unspecified", - "visible": true, - "srcPath": "MainAbility", - "name": ".MainAbility", - "srcLanguage": "ets", - "icon": "$media:icon", - "description": "$string:MainAbility_desc", - "formsEnabled": false, - "label": "$string:MainAbility_label", - "type": "page", - "launchType": "standard" - } - ], - "distro": { - "moduleType": "entry", - "installationFree": false, - "deliveryWithInstall": true, - "moduleName": "entry" - }, - "package": "com.example.entry", - "srcPath": "", - "name": ".entry", - "js": [ - { - "mode": { - "syntax": "ets", - "type": "pageAbility" - }, - "pages": [ - "pages/index" - ], - "name": ".MainAbility", - "window": { - "designWidth": 720, - "autoDesignWidth": false - } - } - ] - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actstextirelyhap/entry/src/main/ets/MainAbility/app.ets b/ability/ability_runtime/actsappselector/actstextirelyhap/entry/src/main/ets/MainAbility/app.ets deleted file mode 100644 index 697c9217409692a5c4e108a830cce9bbd7219ce2..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actstextirelyhap/entry/src/main/ets/MainAbility/app.ets +++ /dev/null @@ -1,58 +0,0 @@ -/** - * Copyright (c) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import featureAbility from "@ohos.ability.featureAbility" -import commonEvent from '@ohos.commonEvent' -export default { - onCreate() { - console.info('Application onCreate') - try{ - featureAbility.getWant((err, data) => { - var want = data; - try{ - console.log("[Demo] MainAbility onForeground want: " + JSON.stringify(want)) - let commonEventData = { - code: 0, - data: 'textirelyhap', - parameters: { - abilityName: want.abilityName, - bundleName: want.bundleName, - type: want.type, - uri:want.parameters.uri - } - } - commonEvent.publish('AppSelector', commonEventData, (err) => { - console.log('======>textirelyhap MainAbility published<======') - }) - - AppStorage.SetOrCreate('bundleName', want.bundleName); - AppStorage.SetOrCreate('abilityName', want.abilityName); - AppStorage.SetOrCreate('type', want.type); - AppStorage.SetOrCreate('uri', want.parameters.uri); - }catch(error) - { - console.info('Application onCreate error ='+ error); - AppStorage.SetOrCreate('err1', error.message); - } - }); - }catch(err) - { - console.info('Application onCreate err ='+ err); - AppStorage.SetOrCreate('err2', err.message); - } - }, - onDestroy() { - console.info('Application onDestroy') - }, -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actstextirelyhap/entry/src/main/ets/MainAbility/pages/index.ets b/ability/ability_runtime/actsappselector/actstextirelyhap/entry/src/main/ets/MainAbility/pages/index.ets deleted file mode 100644 index 03705059201f9ae73b90dfbb6632100be8d829b4..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actstextirelyhap/entry/src/main/ets/MainAbility/pages/index.ets +++ /dev/null @@ -1,48 +0,0 @@ -/** - * Copyright (c) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -@Entry -@Component -struct Index { - @State message: string = 'textIRelyHap' - @StorageLink('bundleName') bundleName: string = ""; - @StorageLink('abilityName') abilityName: string = ""; - @StorageLink('type') type: string = ""; - @StorageLink('uri') uri: string = ""; - - build() { - Row() { - Column() { - Text(this.message) - .fontSize(50) - .fontWeight(FontWeight.Bold) - Text("bundleName: " + this.bundleName) - .fontSize(25) - .fontWeight(FontWeight.Bold) - Text("abilityName: " + this.abilityName) - .fontSize(25) - .fontWeight(FontWeight.Bold) - Text("type: " + this.type) - .fontSize(25) - .fontWeight(FontWeight.Bold) - Text("uri: " + this.uri) - .fontSize(25) - .fontWeight(FontWeight.Bold) - } - .width('100%') - } - .height('100%') - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actstextirelyhap/entry/src/main/resources/base/element/string.json b/ability/ability_runtime/actsappselector/actstextirelyhap/entry/src/main/resources/base/element/string.json deleted file mode 100644 index 863d57a2f5c6975f36734e5e2331bbed32ff09b2..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actstextirelyhap/entry/src/main/resources/base/element/string.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "string": [ - { - "name": "entry_desc", - "value": "description" - }, - { - "name": "MainAbility_desc", - "value": "description" - }, - { - "name": "MainAbility_label", - "value": "label" - }, - { - "name": "app_name", - "value": "actsstartrunnertest" - }, - { - "name": "description_application", - "value": "demo for test" - } - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actstextirelyhap/entry/src/main/resources/base/media/icon.png b/ability/ability_runtime/actsappselector/actstextirelyhap/entry/src/main/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actsappselector/actstextirelyhap/entry/src/main/resources/base/media/icon.png and /dev/null differ diff --git a/ability/ability_runtime/actsappselector/actstextirelyhap/signature/openharmony_sx.p7b b/ability/ability_runtime/actsappselector/actstextirelyhap/signature/openharmony_sx.p7b deleted file mode 100644 index 66b4457a8a81fb8d3356cf46d67226c850944858..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actsappselector/actstextirelyhap/signature/openharmony_sx.p7b and /dev/null differ diff --git a/ability/ability_runtime/actsappselector/actstextjrelyhap/BUILD.gn b/ability/ability_runtime/actsappselector/actstextjrelyhap/BUILD.gn deleted file mode 100755 index d940b30119fd72a14b5c10e67bb288ef5a013965..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actstextjrelyhap/BUILD.gn +++ /dev/null @@ -1,35 +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("ActstextJRelyHap") { - hap_profile = "./entry/src/main/config.json" - deps = [ - ":hjs_demo_js_assets", - ":hjs_demo_resources", - ] - ets2abc = true - certificate_profile = "./signature/openharmony_sx.p7b" - hap_name = "ActstextJRelyHap" - js_build_mode = "debug" - testonly = true - subsystem_name = "ability" - part_name = "ability_runtime" -} -ohos_js_assets("hjs_demo_js_assets") { - source_dir = "./entry/src/main/ets/MainAbility" -} -ohos_resources("hjs_demo_resources") { - sources = [ "./entry/src/main/resources" ] - hap_profile = "./entry/src/main/config.json" -} diff --git a/ability/ability_runtime/actsappselector/actstextjrelyhap/entry/src/main/config.json b/ability/ability_runtime/actsappselector/actstextjrelyhap/entry/src/main/config.json deleted file mode 100644 index f0e4f3b23c6d18b1d182c51ac9e3b41e640ad1f0..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actstextjrelyhap/entry/src/main/config.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "app": { - "vendor": "example", - "bundleName": "textjrelyhap.com.example", - "version": { - "code": 1000000, - "name": "1.0.0" - }, - "apiVersion": { - "compatible": 8, - "releaseType": "Release", - "target": 8 - } - }, - "deviceConfig": {}, - "module": { - "mainAbility": ".MainAbility", - "deviceType": [ - "default", - "tablet" - ], - "abilities": [ - { - "skills": [ - { - "entities": [ - "entity.system.home" - ], - "actions": [ - "ohos.want.action.viewData" - ], - "uris": [ - { - "type": "text/md" - } - ] - } - ], - "orientation": "unspecified", - "visible": true, - "srcPath": "MainAbility", - "name": ".MainAbility", - "srcLanguage": "ets", - "icon": "$media:icon", - "description": "$string:MainAbility_desc", - "formsEnabled": false, - "label": "$string:MainAbility_label", - "type": "page", - "launchType": "standard" - } - ], - "distro": { - "moduleType": "entry", - "installationFree": false, - "deliveryWithInstall": true, - "moduleName": "entry" - }, - "package": "com.example.entry", - "srcPath": "", - "name": ".entry", - "js": [ - { - "mode": { - "syntax": "ets", - "type": "pageAbility" - }, - "pages": [ - "pages/index" - ], - "name": ".MainAbility", - "window": { - "designWidth": 720, - "autoDesignWidth": false - } - } - ] - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actstextjrelyhap/entry/src/main/ets/MainAbility/app.ets b/ability/ability_runtime/actsappselector/actstextjrelyhap/entry/src/main/ets/MainAbility/app.ets deleted file mode 100644 index 487fafac7cc9fa524b919b440eb1244df9a6732d..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actstextjrelyhap/entry/src/main/ets/MainAbility/app.ets +++ /dev/null @@ -1,59 +0,0 @@ -/** - * Copyright (c) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// @ts-nocheck -import featureAbility from "@ohos.ability.featureAbility" -import commonEvent from '@ohos.commonEvent' -export default { - onCreate() { - console.info('Application onCreate') - try{ - featureAbility.getWant((err, data) => { - var want = data; - try{ - console.log("[Demo] MainAbility onForeground want: " + JSON.stringify(want)) - let commonEventData = { - code: 0, - data: 'textarelyhap', - parameters: { - abilityName: want.abilityName, - bundleName: want.bundleName, - type: want.type, - uri:want.parameters.uri - } - } - commonEvent.publish('AppSelector', commonEventData, (err) => { - console.log('======>textarelyhap MainAbility published<======') - }) - - AppStorage.SetOrCreate('bundleName', want.bundleName); - AppStorage.SetOrCreate('abilityName', want.abilityName); - AppStorage.SetOrCreate('type', want.type); - AppStorage.SetOrCreate('uri', want.parameters.uri); - }catch(error) - { - console.info('Application onCreate error ='+ error); - AppStorage.SetOrCreate('err1', error.message); - } - }); - }catch(err) - { - console.info('Application onCreate err ='+ err); - AppStorage.SetOrCreate('err2', err.message); - } - }, - onDestroy() { - console.info('Application onDestroy') - }, -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actstextjrelyhap/entry/src/main/ets/MainAbility/pages/index.ets b/ability/ability_runtime/actsappselector/actstextjrelyhap/entry/src/main/ets/MainAbility/pages/index.ets deleted file mode 100644 index bcfc2c61bc6969a4d19365aa7f21643697dd0067..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actstextjrelyhap/entry/src/main/ets/MainAbility/pages/index.ets +++ /dev/null @@ -1,48 +0,0 @@ -/** - * Copyright (c) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -@Entry -@Component -struct Index { - @State message: string = 'textJRelyHap' - @StorageLink('bundleName') bundleName: string = ""; - @StorageLink('abilityName') abilityName: string = ""; - @StorageLink('type') type: string = ""; - @StorageLink('uri') uri: string = ""; - - build() { - Row() { - Column() { - Text(this.message) - .fontSize(50) - .fontWeight(FontWeight.Bold) - Text("bundleName: " + this.bundleName) - .fontSize(25) - .fontWeight(FontWeight.Bold) - Text("abilityName: " + this.abilityName) - .fontSize(25) - .fontWeight(FontWeight.Bold) - Text("type: " + this.type) - .fontSize(25) - .fontWeight(FontWeight.Bold) - Text("uri: " + this.uri) - .fontSize(25) - .fontWeight(FontWeight.Bold) - } - .width('100%') - } - .height('100%') - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actstextjrelyhap/entry/src/main/resources/base/element/string.json b/ability/ability_runtime/actsappselector/actstextjrelyhap/entry/src/main/resources/base/element/string.json deleted file mode 100644 index 863d57a2f5c6975f36734e5e2331bbed32ff09b2..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actstextjrelyhap/entry/src/main/resources/base/element/string.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "string": [ - { - "name": "entry_desc", - "value": "description" - }, - { - "name": "MainAbility_desc", - "value": "description" - }, - { - "name": "MainAbility_label", - "value": "label" - }, - { - "name": "app_name", - "value": "actsstartrunnertest" - }, - { - "name": "description_application", - "value": "demo for test" - } - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actstextjrelyhap/entry/src/main/resources/base/media/icon.png b/ability/ability_runtime/actsappselector/actstextjrelyhap/entry/src/main/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actsappselector/actstextjrelyhap/entry/src/main/resources/base/media/icon.png and /dev/null differ diff --git a/ability/ability_runtime/actsappselector/actstextjrelyhap/signature/openharmony_sx.p7b b/ability/ability_runtime/actsappselector/actstextjrelyhap/signature/openharmony_sx.p7b deleted file mode 100644 index 66b4457a8a81fb8d3356cf46d67226c850944858..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actsappselector/actstextjrelyhap/signature/openharmony_sx.p7b and /dev/null differ diff --git a/ability/ability_runtime/actsappselector/actstextkrelyhap/BUILD.gn b/ability/ability_runtime/actsappselector/actstextkrelyhap/BUILD.gn deleted file mode 100755 index f34f30ad8eb2548e02d5f23439cc3c272b3f2674..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actstextkrelyhap/BUILD.gn +++ /dev/null @@ -1,35 +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("ActstextKRelyHap") { - hap_profile = "./entry/src/main/config.json" - deps = [ - ":hjs_demo_js_assets", - ":hjs_demo_resources", - ] - ets2abc = true - certificate_profile = "./signature/openharmony_sx.p7b" - hap_name = "ActstextKRelyHap" - js_build_mode = "debug" - testonly = true - subsystem_name = "ability" - part_name = "ability_runtime" -} -ohos_js_assets("hjs_demo_js_assets") { - source_dir = "./entry/src/main/ets/MainAbility" -} -ohos_resources("hjs_demo_resources") { - sources = [ "./entry/src/main/resources" ] - hap_profile = "./entry/src/main/config.json" -} diff --git a/ability/ability_runtime/actsappselector/actstextkrelyhap/entry/src/main/config.json b/ability/ability_runtime/actsappselector/actstextkrelyhap/entry/src/main/config.json deleted file mode 100644 index 3486fced43497ec114da7a63653f355fb1ccb653..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actstextkrelyhap/entry/src/main/config.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "app": { - "vendor": "example", - "bundleName": "textkrelyhap.com.example", - "version": { - "code": 1000000, - "name": "1.0.0" - }, - "apiVersion": { - "compatible": 8, - "releaseType": "Release", - "target": 8 - } - }, - "deviceConfig": {}, - "module": { - "mainAbility": ".MainAbility", - "deviceType": [ - "default", - "tablet" - ], - "abilities": [ - { - "skills": [ - { - "entities": [ - "entity.system.home" - ], - "actions": [ - "ohos.want.action.getData" - ], - "uris": [ - { - "type": "text/txt" - } - ] - } - ], - "orientation": "unspecified", - "visible": true, - "srcPath": "MainAbility", - "name": ".MainAbility", - "srcLanguage": "ets", - "icon": "$media:icon", - "description": "$string:MainAbility_desc", - "formsEnabled": false, - "label": "$string:MainAbility_label", - "type": "page", - "launchType": "standard" - } - ], - "distro": { - "moduleType": "entry", - "installationFree": false, - "deliveryWithInstall": true, - "moduleName": "entry" - }, - "package": "com.example.entry", - "srcPath": "", - "name": ".entry", - "js": [ - { - "mode": { - "syntax": "ets", - "type": "pageAbility" - }, - "pages": [ - "pages/index" - ], - "name": ".MainAbility", - "window": { - "designWidth": 720, - "autoDesignWidth": false - } - } - ] - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actstextkrelyhap/entry/src/main/ets/MainAbility/app.ets b/ability/ability_runtime/actsappselector/actstextkrelyhap/entry/src/main/ets/MainAbility/app.ets deleted file mode 100644 index a877ff7a9af570e2e6dec2ea7377f0a036c0bd74..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actstextkrelyhap/entry/src/main/ets/MainAbility/app.ets +++ /dev/null @@ -1,58 +0,0 @@ -/** - * Copyright (c) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import featureAbility from "@ohos.ability.featureAbility" -import commonEvent from '@ohos.commonEvent' -export default { - onCreate() { - console.info('Application onCreate') - try{ - featureAbility.getWant((err, data) => { - var want = data; - try{ - console.log("[Demo] MainAbility onForeground want: " + JSON.stringify(want)) - let commonEventData = { - code: 0, - data: 'textkrelyhap', - parameters: { - abilityName: want.abilityName, - bundleName: want.bundleName, - type: want.type, - uri:want.parameters.uri - } - } - commonEvent.publish('AppSelector', commonEventData, (err) => { - console.log('======>textkrelyhap MainAbility published<======') - }) - - AppStorage.SetOrCreate('bundleName', want.bundleName); - AppStorage.SetOrCreate('abilityName', want.abilityName); - AppStorage.SetOrCreate('type', want.type); - AppStorage.SetOrCreate('uri', want.parameters.uri); - }catch(error) - { - console.info('Application onCreate error ='+ error); - AppStorage.SetOrCreate('err1', error.message); - } - }); - }catch(err) - { - console.info('Application onCreate err ='+ err); - AppStorage.SetOrCreate('err2', err.message); - } - }, - onDestroy() { - console.info('Application onDestroy') - }, -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actstextkrelyhap/entry/src/main/ets/MainAbility/pages/index.ets b/ability/ability_runtime/actsappselector/actstextkrelyhap/entry/src/main/ets/MainAbility/pages/index.ets deleted file mode 100644 index 06647c0ca6bbd594796c1a89ec68f00a7b3507e9..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actstextkrelyhap/entry/src/main/ets/MainAbility/pages/index.ets +++ /dev/null @@ -1,48 +0,0 @@ -/** - * Copyright (c) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -@Entry -@Component -struct Index { - @State message: string = 'textKRelyHap' - @StorageLink('bundleName') bundleName: string = ""; - @StorageLink('abilityName') abilityName: string = ""; - @StorageLink('type') type: string = ""; - @StorageLink('uri') uri: string = ""; - - build() { - Row() { - Column() { - Text(this.message) - .fontSize(50) - .fontWeight(FontWeight.Bold) - Text("bundleName: " + this.bundleName) - .fontSize(25) - .fontWeight(FontWeight.Bold) - Text("abilityName: " + this.abilityName) - .fontSize(25) - .fontWeight(FontWeight.Bold) - Text("type: " + this.type) - .fontSize(25) - .fontWeight(FontWeight.Bold) - Text("uri: " + this.uri) - .fontSize(25) - .fontWeight(FontWeight.Bold) - } - .width('100%') - } - .height('100%') - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actstextkrelyhap/entry/src/main/resources/base/element/string.json b/ability/ability_runtime/actsappselector/actstextkrelyhap/entry/src/main/resources/base/element/string.json deleted file mode 100644 index df18caae3bd9df85b56116a0e5e39c02dc9ef250..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsappselector/actstextkrelyhap/entry/src/main/resources/base/element/string.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "string": [ - { - "name": "entry_MainAbility", - "value": "entry_MainAbility" - }, - { - "name": "MainAbility_desc", - "value": "description" - }, - { - "name": "MainAbility_label", - "value": "label" - }, - { - "name": "TestAbility_desc", - "value": "description" - }, - { - "name": "TestAbility_label", - "value": "label" - } - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/actsappselector/actstextkrelyhap/entry/src/main/resources/base/media/icon.png b/ability/ability_runtime/actsappselector/actstextkrelyhap/entry/src/main/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actsappselector/actstextkrelyhap/entry/src/main/resources/base/media/icon.png and /dev/null differ diff --git a/ability/ability_runtime/actsappselector/actstextkrelyhap/signature/openharmony_sx.p7b b/ability/ability_runtime/actsappselector/actstextkrelyhap/signature/openharmony_sx.p7b deleted file mode 100644 index 66b4457a8a81fb8d3356cf46d67226c850944858..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actsappselector/actstextkrelyhap/signature/openharmony_sx.p7b and /dev/null differ diff --git a/ability/ability_runtime/featureability/actsfeatureabilitytest/entry/src/main/js/test/FeatureAbilityJsunit.test.js b/ability/ability_runtime/featureability/actsfeatureabilitytest/entry/src/main/js/test/FeatureAbilityJsunit.test.js index c77c7cd76c979f8ea0194a54d5e52f974d92e302..98fa48dff78a9a1c5e1253b0ca5d5cb285485038 100644 --- a/ability/ability_runtime/featureability/actsfeatureabilitytest/entry/src/main/js/test/FeatureAbilityJsunit.test.js +++ b/ability/ability_runtime/featureability/actsfeatureabilitytest/entry/src/main/js/test/FeatureAbilityJsunit.test.js @@ -1676,41 +1676,6 @@ describe('ActsFeatureAbilityTest', function () { } }); - /* - * @tc.number ACTS_StartAbility_1400 - * @tc.name Start ability through action and entities, which are configured as strings - * @tc.desc Function test - * @tc.level 0 - */ - it("ACTS_StartAbility_1400",0, async function(done){ - console.info("------------------logMessage ACTS_StartAbility_1400-------------------"); - try{ - let Want = { - action: "action.system.home", - entities: 'asdfghj' - } - let StartAbilityParameter = { - want:Want - } - - featureAbility.startAbility(StartAbilityParameter,(err,data)=>{ - console.info('ACTS_StartAbility_1400 asyncCallback errCode : ' + JSON.stringify(err) - + " data: " + JSON.stringify(data)); - if(err.code != 0){ - expect().assertFail() - done() - }else{ - expect(err.code).assertEqual(0) - done() - } - }); - }catch(error){ - console.info("ACTS_StartAbility_1400 : error = " + error); - expect().assertFail() - done() - } - }); - /* * @tc.number ACTS_StartAbility_1600 * @tc.name Startability input parameter want is {} @@ -1789,4 +1754,4 @@ describe('ActsFeatureAbilityTest', function () { } }); }) -} \ No newline at end of file +}