diff --git a/ability/ability_runtime/BUILD.gn b/ability/ability_runtime/BUILD.gn index 3342f6212d1381ab2d3f8c97c27f613751df1b8e..6436220d2fb4e87256332c76bb10ef8e651371c0 100644 --- a/ability/ability_runtime/BUILD.gn +++ b/ability/ability_runtime/BUILD.gn @@ -44,7 +44,6 @@ group("ability_runtime") { "amsgetabilityprocessinfo:amsgetabilityprocessinfo", "apicover:apicover", "apitest:ActsApiTest", - "apprecovery:apprecovery", "context:context", "fa:fa", "faapicover:faapicover", diff --git a/ability/ability_runtime/apprecovery/ActsAppRecoveryTestCaller/AppScope/app.json b/ability/ability_runtime/apprecovery/ActsAppRecoveryTestCaller/AppScope/app.json deleted file mode 100644 index 1955d14f2638ccf77a9bf13d9cc787ef7eb2cbbd..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/apprecovery/ActsAppRecoveryTestCaller/AppScope/app.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "app": { - "bundleName": "com.example.actsapprecoverytestcaller", - "vendor": "example", - "versionCode": 1000000, - "versionName": "1.0.0", - "icon": "$media:app_icon", - "label": "$string:app_name", - "distributedNotificationEnabled": true, - "keepAlive" : true, - "singleUser": true, - "minAPIVersion": 10, - "targetAPIVersion": 10, - "car": { - "apiCompatibleVersion": 10, - "singleUser": false - } - } -} diff --git a/ability/ability_runtime/apprecovery/ActsAppRecoveryTestCaller/AppScope/resources/base/element/string.json b/ability/ability_runtime/apprecovery/ActsAppRecoveryTestCaller/AppScope/resources/base/element/string.json deleted file mode 100644 index 085dcba9658eaa44cfd3f1db51a5eb70414ee8ac..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/apprecovery/ActsAppRecoveryTestCaller/AppScope/resources/base/element/string.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "string": [ - { - "name": "app_name", - "value": "ActsAppRecoveryTestCaller" - } - ] -} diff --git a/ability/ability_runtime/apprecovery/ActsAppRecoveryTestCaller/AppScope/resources/base/media/app_icon.png b/ability/ability_runtime/apprecovery/ActsAppRecoveryTestCaller/AppScope/resources/base/media/app_icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/apprecovery/ActsAppRecoveryTestCaller/AppScope/resources/base/media/app_icon.png and /dev/null differ diff --git a/ability/ability_runtime/apprecovery/ActsAppRecoveryTestCaller/BUILD.gn b/ability/ability_runtime/apprecovery/ActsAppRecoveryTestCaller/BUILD.gn deleted file mode 100644 index b5cc3f391719f05cb4310fecb243ffae4b44ef1d..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/apprecovery/ActsAppRecoveryTestCaller/BUILD.gn +++ /dev/null @@ -1,43 +0,0 @@ -# Copyright (c) 2023 Huawei Device Co., Ltd. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import("//test/xts/tools/build/suite.gni") - -ohos_js_hap_suite("ActsAppRecoveryTestCaller") { - hap_profile = "entry/src/main/module.json" - js_build_mode = "debug" - deps = [ - ":actsapprecoverytestcaller_js_assets", - ":actsapprecoverytestcaller_resources", - ] - ets2abc = true - certificate_profile = "signature/openharmony_sx.p7b" - hap_name = "ActsAppRecoveryTestCaller" - subsystem_name = "ability" - part_name = "ability_runtime" -} - -ohos_app_scope("actsapprecoverytestcaller_app_profile") { - app_profile = "AppScope/app.json" - sources = [ "AppScope/resources" ] -} - -ohos_js_assets("actsapprecoverytestcaller_js_assets") { - source_dir = "entry/src/main/ets" -} - -ohos_resources("actsapprecoverytestcaller_resources") { - sources = [ "entry/src/main/resources" ] - deps = [ ":actsapprecoverytestcaller_app_profile" ] - hap_profile = "entry/src/main/module.json" -} diff --git a/ability/ability_runtime/apprecovery/ActsAppRecoveryTestCaller/Test.json b/ability/ability_runtime/apprecovery/ActsAppRecoveryTestCaller/Test.json deleted file mode 100644 index 5d2ed553494c1402da51edbd6bef70a1988fb34f..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/apprecovery/ActsAppRecoveryTestCaller/Test.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "description": "Configuration for aceceshi Tests", - "driver": { - "type": "OHJSUnitTest", - "test-timeout": "600000", - "bundle-name": "com.example.actsapprecoverytestcaller", - "module-name": "entry_test", - "shell-timeout": "600000" - }, - "kits": [ - { - "test-file-name": [ - "ActsAppRecoveryTestCaller.hap", - "AppRecoveryRely.hap", - "AppRecoverysRely.hap" - ], - "type": "AppInstallKit", - "cleanup-apps": true - }, - { - "type": "ShellKit", - "run-command": [ - "power-shell wakeup", - "power-shell setmode 602" - ] - } - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/apprecovery/ActsAppRecoveryTestCaller/entry/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts b/ability/ability_runtime/apprecovery/ActsAppRecoveryTestCaller/entry/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts deleted file mode 100644 index 1a6fe3a85d02631857806c78ce19b460a510b137..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/apprecovery/ActsAppRecoveryTestCaller/entry/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright (c) 2023 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import hilog from '@ohos.hilog'; -import TestRunner from '@ohos.application.testRunner' -import AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry' - -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', - '-s dryRun' - ]) - let targetParams = ''; - for (const key in parameters) { - if (keySet.has(key)) { - targetParams = `${targetParams} ${key} ${parameters[key]}` - } - } - return targetParams.trim() -} - -async function onAbilityCreateCallback() { - hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); - hilog.info(0x0000, 'testTag', '%{public}s', 'onAbilityCreateCallback'); -} - -async function addAbilityMonitorCallback(err: any) { - hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); - hilog.info(0x0000, 'testTag', 'addAbilityMonitorCallback : %{public}s', JSON.stringify(err) ?? ''); -} - -export default class OpenHarmonyTestRunner implements TestRunner { - constructor() { - } - - onPrepare() { - hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); - hilog.info(0x0000, 'testTag', '%{public}s', 'OpenHarmonyTestRunner OnPrepare '); - } - - async onRun() { - hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); - hilog.info(0x0000, 'testTag', '%{public}s', 'OpenHarmonyTestRunner onRun run'); - abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments() - abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() - var testAbilityName = abilityDelegatorArguments.bundleName + '.TestAbility' - let lMonitor = { - abilityName: testAbilityName, - onAbilityCreate: onAbilityCreateCallback, - }; - abilityDelegator.addAbilityMonitor(lMonitor, addAbilityMonitorCallback) - var cmd = 'aa start -d 0 -a TestAbility' + ' -b ' + abilityDelegatorArguments.bundleName - cmd += ' '+translateParamsToString(abilityDelegatorArguments.parameters) - var debug = abilityDelegatorArguments.parameters['-D'] - if (debug == 'true') - { - cmd += ' -D' - } - hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); - hilog.info(0x0000, 'testTag', 'cmd : %{public}s', cmd); - abilityDelegator.executeShellCommand(cmd, - (err: any, d: any) => { - hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); - hilog.info(0x0000, 'testTag', 'executeShellCommand : err : %{public}s', JSON.stringify(err) ?? ''); - hilog.info(0x0000, 'testTag', 'executeShellCommand : data : %{public}s', d.stdResult ?? ''); - hilog.info(0x0000, 'testTag', 'executeShellCommand : data : %{public}s', d.exitCode ?? ''); - }) - hilog.info(0x0000, 'testTag', '%{public}s', 'OpenHarmonyTestRunner onRun end'); - } -} \ No newline at end of file diff --git a/ability/ability_runtime/apprecovery/ActsAppRecoveryTestCaller/entry/src/main/ets/test/Ability.test.ets b/ability/ability_runtime/apprecovery/ActsAppRecoveryTestCaller/entry/src/main/ets/test/Ability.test.ets deleted file mode 100644 index 0b14a14ac49292969a48f2cc79821d3dbeac3de7..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/apprecovery/ActsAppRecoveryTestCaller/entry/src/main/ets/test/Ability.test.ets +++ /dev/null @@ -1,813 +0,0 @@ -/* - * Copyright (c) 2023 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import hilog from '@ohos.hilog'; -import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium' -import commonEvent from '@ohos.commonEvent' -import abilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry'; -import missionManager from '@ohos.application.missionManager'; -import wantConstant from '@ohos.app.ability.wantConstant' - -const CASE_TIME_OUT=5000; -var ACTS_AppRecovery = { - events: ["ACTS_AppRecovery_First", "ACTS_AppRecovery_Second"] -}; - -export default function abilityTest() { - describe('ActsAbilityTest', function () { - - /* - * @tc.number: Acts_AppRecovery_0100 - * @tc.name: Fault recovery of multi-Ability application - * @tc.desc: When the application settings restart recovery status is valid, the pre-failure state of Ability - * application will not be restored after normal exit and restart. - */ - it('Acts_AppRecovery_0100',0, async function (done) { - let subscriber; - let flag = false; - console.info("Acts_AppRecovery_0100====> start") - commonEvent.createSubscriber(ACTS_AppRecovery).then(async (data) => { - console.debug("Acts_AppRecovery_0100====> Create Subscribe"); - subscriber = data; - commonEvent.subscribe(subscriber, subscribeCallBack); - globalThis.abilityContext.startAbility( - { - bundleName: "com.example.apprecoveryrely", - abilityName: "EntryAbility", - action: "Acts_AppRecovery_0100_once" - },(err)=>{ - console.debug("Acts_AppRecovery_0100====> startAbility err:"+JSON.stringify(err)); - expect(err.code).assertEqual(0); - }) - }) - - function subscribeCallBack(err, data) { - console.debug("Acts_AppRecovery_0100====> subscribeCallBack data:" + JSON.stringify(data)); - if(data.event == "ACTS_AppRecovery_First") { - expect(data.parameters.message[wantConstant.Params.ABILITY_RECOVERY_RESTART]).assertEqual(undefined); - setTimeout(() => { - commonEvent.subscribe(subscriber, subscribeCallBackSecond); - globalThis.abilityContext.startAbility( - { - bundleName: "com.example.apprecoveryrely", - abilityName: "EntryAbility", - action: "Acts_AppRecovery_0100_twice" - }, - (err) => { - console.debug("Acts_AppRecovery_0100====> second startAbility err:" + JSON.stringify(err)); - expect(err.code).assertEqual(0); - } - ); - }, 800); - } - } - - function subscribeCallBackSecond(err, data) { - console.debug("Acts_AppRecovery_0100====> second subscribeCallBack data:" + JSON.stringify(data)); - if(data.event == "ACTS_AppRecovery_Second") { - flag=true; - expect(data.parameters.message[wantConstant.Params.ABILITY_RECOVERY_RESTART]).assertEqual(undefined); - commonEvent.unsubscribe(subscriber, unSubscribeCallback); - } - } - - function unSubscribeCallback() { - setTimeout(() => { - console.debug("Acts_AppRecovery_0100====> unSubscribeCallback"); - done(); - }, 800); - } - - setTimeout(()=>{ - if(flag==false){ - expect().assertFail(); - commonEvent.unsubscribe(subscriber, unSubscribeCallback); - } - },CASE_TIME_OUT) - }) - - /* - * @tc.number: Acts_AppRecovery_0200 - * @tc.name: Fault recovery of multi-Ability application - * @tc.desc: When the application settings restart recovery status is valid, the pre-failure state of Ability - * application will not be restored after normal exit and restart. - */ - it('Acts_AppRecovery_0200',0, async function (done) { - let subscriber; - let flag = false; - let countFirst = 0; - let countSecond = 0; - console.info("Acts_AppRecovery_0200====> start") - commonEvent.createSubscriber(ACTS_AppRecovery).then(async (data) => { - console.debug("Acts_AppRecovery_0200====> Create Subscribe"); - subscriber = data; - commonEvent.subscribe(subscriber, subscribeCallBack); - globalThis.abilityContext.startAbility( - { - bundleName: "com.example.apprecoverysrely", - abilityName: "EntryAbility", - action: "Acts_AppRecovery_0200_once" - },(err)=>{ - console.debug("Acts_AppRecovery_0200====> startAbility err:"+JSON.stringify(err)); - expect(err.code).assertEqual(0); - }) - }) - - function subscribeCallBack(err, data) { - console.debug("Acts_AppRecovery_0200====> subscribeCallBack data:" + JSON.stringify(data)); - if(data.event == "ACTS_AppRecovery_First") { - countFirst++; - expect(data.parameters.message[wantConstant.Params.ABILITY_RECOVERY_RESTART]).assertEqual(undefined); - if (countFirst < 2) { - return; - } - setTimeout(() => { - commonEvent.subscribe(subscriber, subscribeCallBackSecond); - globalThis.abilityContext.startAbility( - { - bundleName: "com.example.apprecoverysrely", - abilityName: "EntryAbility", - action: "Acts_AppRecovery_0200_twice" - }, - (err) => { - console.debug("Acts_AppRecovery_0200====> second startAbility err:" + JSON.stringify(err)); - expect(err.code).assertEqual(0); - } - ); - }, 800); - } - } - - function subscribeCallBackSecond(err, data) { - console.debug("Acts_AppRecovery_0200====> second subscribeCallBack data:" + JSON.stringify(data)); - if(data.event == "ACTS_AppRecovery_Second") { - countSecond++; - flag=true; - expect(data.parameters.message[wantConstant.Params.ABILITY_RECOVERY_RESTART]).assertEqual(undefined); - if (countSecond == 2) { - commonEvent.unsubscribe(subscriber, unSubscribeCallback); - } - } - } - - function unSubscribeCallback() { - setTimeout(() => { - console.debug("Acts_AppRecovery_0200====> unSubscribeCallback"); - done(); - }, 800); - } - - setTimeout(()=>{ - if(flag==false){ - expect().assertFail(); - commonEvent.unsubscribe(subscriber, unSubscribeCallback); - } - },CASE_TIME_OUT) - }) - - /* - * @tc.number: Acts_AppRecovery_0300 - * @tc.name: Fault recovery of multi-Ability application - * @tc.desc: When the application setting restart recovery status is valid, exit the application by clearing the - * task list and do not restore the pre-failure state of the Ability application after the application - * restart. - */ - it('Acts_AppRecovery_0300',0, async function (done) { - let subscriber; - let flag = false; - console.info("Acts_AppRecovery_0300====> start") - commonEvent.createSubscriber(ACTS_AppRecovery).then(async (data) => { - console.debug("Acts_AppRecovery_0300====> Create Subscribe"); - subscriber = data; - commonEvent.subscribe(subscriber, subscribeCallBack); - globalThis.abilityContext.startAbility( - { - bundleName: "com.example.apprecoveryrely", - abilityName: "EntryAbility", - action: "Acts_AppRecovery_0300_once" - },(err)=>{ - console.debug("Acts_AppRecovery_0300====> startAbility err:"+JSON.stringify(err)); - expect(err.code).assertEqual(0); - }) - }) - function subscribeCallBack(err, data) { - console.debug("Acts_AppRecovery_0300====> subscribeCallBack data:" + JSON.stringify(data)); - if(data.event == "ACTS_AppRecovery_First") { - expect(data.parameters.message[wantConstant.Params.ABILITY_RECOVERY_RESTART]).assertEqual(undefined); - missionManager.getMissionInfos('', 1024, (err, missionInfos)=>{ - console.debug('Acts_AppRecovery_0300====> missionInfos: ' + JSON.stringify(missionInfos)); - console.debug('Acts_AppRecovery_0300====> missionInfos.length: ' + JSON.stringify(missionInfos.length)); - for (var i = 0; i < missionInfos.length; i++) { - if ((missionInfos[i].want.bundleName == "com.example.apprecoveryrely") - && (missionInfos[i].want.abilityName == "EntryAbility")) { - missionManager.clearMission(missionInfos[i].missionId, (err)=>{ - console.debug('Acts_AppRecovery_0300====> clearMission err: ' + JSON.stringify(err)); - }) - } - } - setTimeout(()=>{ - commonEvent.subscribe(subscriber, subscribeCallBackSecond); - globalThis.abilityContext.startAbility( - { - bundleName: "com.example.apprecoveryrely", - abilityName: "EntryAbility", - action: "Acts_AppRecovery_0300_twice" - }, (err) => { - console.debug("Acts_AppRecovery_0300====> second startAbility err:" + JSON.stringify(err)); - expect(err.code).assertEqual(0); - }) - }, 800) - }); - } - } - function subscribeCallBackSecond(err, data) { - console.debug("Acts_AppRecovery_0300====> second subscribeCallBack data:" + JSON.stringify(data)); - if(data.event == "ACTS_AppRecovery_Second") { - flag=true; - expect(data.parameters.message[wantConstant.Params.ABILITY_RECOVERY_RESTART]).assertEqual(undefined); - commonEvent.unsubscribe(subscriber, unSubscribeCallback); - } - } - function unSubscribeCallback() { - setTimeout(() => { - console.debug("Acts_AppRecovery_0300====> unSubscribeCallback"); - done(); - }, 800); - } - setTimeout(()=>{ - if(flag==false){ - expect().assertFail(); - commonEvent.unsubscribe(subscriber, unSubscribeCallback); - } - },CASE_TIME_OUT) - }) - - /* - * @tc.number: Acts_AppRecovery_0400 - * @tc.name: Fault recovery of multi-Ability application - * @tc.desc: When the application setting restart recovery status is valid, exit the application by clearing the - * task list and do not restore the pre-failure state of the Ability application after the application - * restart. - */ - it('Acts_AppRecovery_0400',0, async function (done) { - let subscriber; - let flag = false; - let countFirst = 0; - let countSecond = 0; - console.info("Acts_AppRecovery_0400====> start") - commonEvent.createSubscriber(ACTS_AppRecovery).then(async (data) => { - console.debug("Acts_AppRecovery_0400====> Create Subscribe"); - subscriber = data; - commonEvent.subscribe(subscriber, subscribeCallBack); - globalThis.abilityContext.startAbility( - { - bundleName: "com.example.apprecoverysrely", - abilityName: "EntryAbility", - action: "Acts_AppRecovery_0400_once" - },(err)=>{ - console.debug("Acts_AppRecovery_0400====> startAbility err:"+JSON.stringify(err)); - expect(err.code).assertEqual(0); - }) - }) - function subscribeCallBack(err, data) { - console.debug("Acts_AppRecovery_0400====> subscribeCallBack data:" + JSON.stringify(data)); - if(data.event == "ACTS_AppRecovery_First") { - countFirst++; - expect(data.parameters.message[wantConstant.Params.ABILITY_RECOVERY_RESTART]).assertEqual(undefined); - if (countFirst < 2) { - return; - } - missionManager.getMissionInfos('', 1024, (err, missionInfos)=>{ - console.debug('Acts_AppRecovery_0400====> missionInfos: ' + JSON.stringify(missionInfos)); - console.debug('Acts_AppRecovery_0400====> missionInfos.length: ' + JSON.stringify(missionInfos.length)); - for (var i = 0; i < missionInfos.length; i++) { - if ((missionInfos[i].want.bundleName == "com.example.apprecoverysrely") - && ((missionInfos[i].want.abilityName == "EntryAbility") || - (missionInfos[i].want.abilityName == "EntryAbilitySec"))){ - missionManager.clearMission(missionInfos[i].missionId, (err)=>{ - console.debug('Acts_AppRecovery_0400====> clearMission err: ' + JSON.stringify(err)); - }) - } - } - setTimeout(()=>{ - commonEvent.subscribe(subscriber, subscribeCallBackSecond); - globalThis.abilityContext.startAbility( - { - bundleName: "com.example.apprecoverysrely", - abilityName: "EntryAbility", - action: "Acts_AppRecovery_0400_twice" - }, (err) => { - console.debug("Acts_AppRecovery_0400====> second startAbility err:" + JSON.stringify(err)); - expect(err.code).assertEqual(0); - }) - },800) - }); - } - } - function subscribeCallBackSecond(err, data) { - console.debug("Acts_AppRecovery_0400====> second subscribeCallBack data:" + JSON.stringify(data)); - if(data.event == "ACTS_AppRecovery_Second") { - countSecond++; - flag=true; - expect(data.parameters.message[wantConstant.Params.ABILITY_RECOVERY_RESTART]).assertEqual(undefined); - if (countSecond < 2) { - return; - } - commonEvent.unsubscribe(subscriber, unSubscribeCallback); - } - } - function unSubscribeCallback() { - setTimeout(() => { - console.debug("Acts_AppRecovery_0400====> unSubscribeCallback"); - done(); - }, 800); - } - setTimeout(()=>{ - if(flag==false){ - expect().assertFail(); - commonEvent.unsubscribe(subscriber, unSubscribeCallback); - } - },CASE_TIME_OUT) - }) - - /* - * @tc.number: Acts_AppRecovery_0700 - * @tc.name: Fault recovery of multi-Ability application - * @tc.desc: If the restart recovery status is not set, the Ability application pre-failure state will not be - * restored after the application exits abnormally and restarts. - */ - it('Acts_AppRecovery_0700',0, async function (done) { - let subscriber; - let flag = false; - console.info("Acts_AppRecovery_0700====> start") - commonEvent.createSubscriber(ACTS_AppRecovery).then(async (data) => { - console.debug("Acts_AppRecovery_0700====> Create Subscribe"); - subscriber = data; - commonEvent.subscribe(subscriber, subscribeCallBack); - globalThis.abilityContext.startAbility( - { - bundleName: "com.example.apprecoveryrely", - abilityName: "EntryAbility", - action: "Acts_AppRecovery_0700_once" - },(err)=>{ - console.debug("Acts_AppRecovery_0700====> startAbility err:"+JSON.stringify(err)); - expect(err.code).assertEqual(0); - }) - }) - - function subscribeCallBack(err, data) { - console.debug("Acts_AppRecovery_0700====> subscribeCallBack data:" + JSON.stringify(data)); - if(data.event == "ACTS_AppRecovery_First") { - expect(data.parameters.message[wantConstant.Params.ABILITY_RECOVERY_RESTART]).assertEqual(undefined); - setTimeout(()=>{ - commonEvent.subscribe(subscriber, subscribeCallBackSecond); - globalThis.abilityContext.startAbility( - { - bundleName: "com.example.apprecoveryrely", - abilityName: "EntryAbility", - action: "Acts_AppRecovery_0700_twice" - }, (err) => { - console.debug("Acts_AppRecovery_0700====> second startAbility err:" + JSON.stringify(err)); - expect(err.code).assertEqual(0); - }) - },800) - } - } - - function subscribeCallBackSecond(err, data) { - console.debug("Acts_AppRecovery_0700====> second subscribeCallBack data:" + JSON.stringify(data)); - if(data.event == "ACTS_AppRecovery_Second") { - flag=true; - expect(data.parameters.message[wantConstant.Params.ABILITY_RECOVERY_RESTART]).assertEqual(undefined); - commonEvent.unsubscribe(subscriber, unSubscribeCallback); - } - } - - function unSubscribeCallback() { - setTimeout(() => { - console.debug("Acts_AppRecovery_0700====> unSubscribeCallback"); - done(); - }, 800); - } - - setTimeout(()=>{ - if(flag==false){ - expect().assertFail(); - commonEvent.unsubscribe(subscriber, unSubscribeCallback); - } - },CASE_TIME_OUT) - }) - - /* - * @tc.number: Acts_AppRecovery_0800 - * @tc.name: Fault recovery of multi-Ability application - * @tc.desc: If the restart recovery status is not set, the Ability application pre-failure state will not be - * restored after the application exits abnormally and restarts. - */ - it('Acts_AppRecovery_0800',0, async function (done) { - let subscriber; - let flag = false; - let countFirst = 0; - let countSecond = 0; - console.info("Acts_AppRecovery_0800====> start") - commonEvent.createSubscriber(ACTS_AppRecovery).then(async (data) => { - console.debug("Acts_AppRecovery_0800====> Create Subscribe"); - subscriber = data; - commonEvent.subscribe(subscriber, subscribeCallBack); - globalThis.abilityContext.startAbility( - { - bundleName: "com.example.apprecoverysrely", - abilityName: "EntryAbility", - action: "Acts_AppRecovery_0800_once" - },(err)=>{ - console.debug("Acts_AppRecovery_0800====> startAbility err:"+JSON.stringify(err)); - expect(err.code).assertEqual(0); - }) - }) - - function subscribeCallBack(err, data) { - console.debug("Acts_AppRecovery_0800====> subscribeCallBack data:" + JSON.stringify(data)); - if(data.event == "ACTS_AppRecovery_First") { - countFirst++; - expect(data.parameters.message[wantConstant.Params.ABILITY_RECOVERY_RESTART]).assertEqual(undefined); - if (countFirst < 2) { - return; - } - setTimeout(() => { - commonEvent.subscribe(subscriber, subscribeCallBackSecond); - globalThis.abilityContext.startAbility( - { - bundleName: "com.example.apprecoverysrely", - abilityName: "EntryAbility", - action: "Acts_AppRecovery_0800_twice" - }, - (err) => { - console.debug("Acts_AppRecovery_0800====> second startAbility err:" + JSON.stringify(err)); - expect(err.code).assertEqual(0); - } - ); - }, 800); - } - } - - function subscribeCallBackSecond(err, data) { - console.debug("Acts_AppRecovery_0800====> second subscribeCallBack data:" + JSON.stringify(data)); - if(data.event == "ACTS_AppRecovery_Second") { - countSecond++; - flag=true; - expect(data.parameters.message[wantConstant.Params.ABILITY_RECOVERY_RESTART]).assertEqual(undefined); - if (countSecond < 2) { - return; - } - commonEvent.unsubscribe(subscriber, unSubscribeCallback); - } - } - - function unSubscribeCallback() { - setTimeout(() => { - console.debug("Acts_AppRecovery_0800====> unSubscribeCallback"); - done(); - }, 800); - } - - setTimeout(()=>{ - if(flag==false){ - expect().assertFail(); - commonEvent.unsubscribe(subscriber, unSubscribeCallback); - } - },CASE_TIME_OUT) - }) - - /* - * @tc.number: Acts_AppRecovery_0900 - * @tc.name: Fault recovery of multi-Ability application - * @tc.desc: When the application settings restart recovery status is valid, the application exits abnormally - * and restarts to restore the pre-failure state of Ability application. - */ - it('Acts_AppRecovery_0900',0, async function (done) { - let subscriber; - let flag = false; - console.info("Acts_AppRecovery_0900====> start") - commonEvent.createSubscriber(ACTS_AppRecovery).then(async (data) => { - console.debug("Acts_AppRecovery_0900====> Create Subscribe"); - subscriber = data; - commonEvent.subscribe(subscriber, subscribeCallBack); - globalThis.abilityContext.startAbility( - { - bundleName: "com.example.apprecoveryrely", - abilityName: "EntryAbility", - action: "Acts_AppRecovery_0900_once" - },(err)=>{ - console.debug("Acts_AppRecovery_0900====> startAbility err:"+JSON.stringify(err)); - expect(err.code).assertEqual(0); - }) - }) - - function subscribeCallBack(err, data) { - console.debug("Acts_AppRecovery_0900====> subscribeCallBack data:" + JSON.stringify(data)); - if(data.event == "ACTS_AppRecovery_First") { - expect(data.parameters.message[wantConstant.Params.ABILITY_RECOVERY_RESTART]).assertEqual(undefined); - let abilityDelegator = abilityDelegatorRegistry.getAbilityDelegator(); - let pkillCmd = "pkill -f com.example.apprecoveryrely"; - console.debug("Acts_AppRecovery_0900====> shell command call " + pkillCmd); - abilityDelegator.executeShellCommand(pkillCmd, 1, (err, data) => { - console.debug("Acts_AppRecovery_0900====> shell command callback " + JSON.stringify(err) + " " + JSON.stringify(data)); - setTimeout(() => { - commonEvent.subscribe(subscriber, subscribeCallBackSecond); - globalThis.abilityContext.startAbility( - { - bundleName: "com.example.apprecoveryrely", - abilityName: "EntryAbility", - action: "Acts_AppRecovery_0900_twice" - }, - (err) => { - console.debug("Acts_AppRecovery_0900====> second startAbility err:" + JSON.stringify(err)); - expect(err.code).assertEqual(0); - } - ); - }, 800); - }); - } - } - - function subscribeCallBackSecond(err, data) { - console.debug("Acts_AppRecovery_0900====> second subscribeCallBack data:" + JSON.stringify(data)); - if(data.event == "ACTS_AppRecovery_Second") { - flag=true; - expect(data.parameters.message[wantConstant.Params.ABILITY_RECOVERY_RESTART]).assertEqual(undefined); - commonEvent.unsubscribe(subscriber, unSubscribeCallback); - } - } - - function unSubscribeCallback() { - setTimeout(() => { - console.debug("Acts_AppRecovery_0900====> unSubscribeCallback"); - done(); - }, 800); - } - - setTimeout(()=>{ - if(flag==false){ - expect().assertFail(); - commonEvent.unsubscribe(subscriber, unSubscribeCallback); - } - },CASE_TIME_OUT) - }) - - /* - * @tc.number: Acts_AppRecovery_1000 - * @tc.name: Fault recovery of multi-Ability application - * @tc.desc: When the application settings restart recovery status is valid, the application exits abnormally - * and restarts to restore the pre-failure state of Ability application. - */ - it('Acts_AppRecovery_1000',0, async function (done) { - let subscriber; - let flag = false; - let countFirst = 0; - let countSecond = 0; - console.info("Acts_AppRecovery_1000====> start") - commonEvent.createSubscriber(ACTS_AppRecovery).then(async (data) => { - console.debug("Acts_AppRecovery_1000====> Create Subscribe"); - subscriber = data; - commonEvent.subscribe(subscriber, subscribeCallBack); - globalThis.abilityContext.startAbility( - { - bundleName: "com.example.apprecoverysrely", - abilityName: "EntryAbility", - action: "Acts_AppRecovery_1000_once" - },(err)=>{ - console.debug("Acts_AppRecovery_1000====> startAbility err:"+JSON.stringify(err)); - expect(err.code).assertEqual(0); - }) - }) - - function subscribeCallBack(err, data) { - console.debug("Acts_AppRecovery_1000====> subscribeCallBack data:" + JSON.stringify(data)); - if(data.event == "ACTS_AppRecovery_First") { - countFirst++; - expect(data.parameters.message[wantConstant.Params.ABILITY_RECOVERY_RESTART]).assertEqual(undefined); - if (countFirst < 2) { - return; - } - let abilityDelegator = abilityDelegatorRegistry.getAbilityDelegator(); - let pkillCmd = "pkill -f com.example.apprecoverysrely"; - abilityDelegator.executeShellCommand(pkillCmd, 1, (err, data) => { - setTimeout(() => { - commonEvent.subscribe(subscriber, subscribeCallBackSecond); - globalThis.abilityContext.startAbility( - { - bundleName: "com.example.apprecoverysrely", - abilityName: "EntryAbility", - action: "Acts_AppRecovery_1000_twice" - }, - (err) => { - console.debug("Acts_AppRecovery_1000====> second startAbility err:" + JSON.stringify(err)); - expect(err.code).assertEqual(0); - } - ); - }, 800); - }); - } - } - - function subscribeCallBackSecond(err, data) { - console.debug("Acts_AppRecovery_1000====> second subscribeCallBack data:" + JSON.stringify(data)); - if(data.event == "ACTS_AppRecovery_Second") { - countSecond++; - flag=true; - expect(data.parameters.message[wantConstant.Params.ABILITY_RECOVERY_RESTART]).assertEqual(undefined); - if (countSecond < 2) { - return; - } - commonEvent.unsubscribe(subscriber, unSubscribeCallback); - } - } - - function unSubscribeCallback() { - setTimeout(() => { - console.debug("Acts_AppRecovery_1000====> unSubscribeCallback"); - done(); - }, 800); - } - - setTimeout(()=>{ - if(flag==false){ - expect().assertFail(); - commonEvent.unsubscribe(subscriber, unSubscribeCallback); - } - },CASE_TIME_OUT) - }) - - /* - * @tc.number: Acts_AppRecovery_1100 - * @tc.name: Fault recovery of multi-Ability application - * @tc.desc: When setting restart recovery status is valid, exit the application by clearing the task list and - * do not restore the pre-failure state of the Ability application after the application restart. - */ - it('Acts_AppRecovery_1100',0, async function (done) { - let subscriber; - let flag = false; - console.info("Acts_AppRecovery_1100====> start") - commonEvent.createSubscriber(ACTS_AppRecovery).then(async (data) => { - console.debug("Acts_AppRecovery_1100====> Create Subscribe"); - subscriber = data; - commonEvent.subscribe(subscriber, subscribeCallBack); - globalThis.abilityContext.startAbility( - { - bundleName: "com.example.apprecoveryrely", - abilityName: "EntryAbility", - action: "Acts_AppRecovery_1100_once" - },(err)=>{ - console.debug("Acts_AppRecovery_1100====> startAbility err:"+JSON.stringify(err)); - expect(err.code).assertEqual(0); - }) - }) - - function subscribeCallBack(err, data) { - console.debug("Acts_AppRecovery_1100====> subscribeCallBack data:" + JSON.stringify(data)); - if(data.event == "ACTS_AppRecovery_First") { - expect(data.parameters.message[wantConstant.Params.ABILITY_RECOVERY_RESTART]).assertEqual(undefined); - let abilityDelegator = abilityDelegatorRegistry.getAbilityDelegator(); - let pkillCmd = "pkill -f com.example.apprecoveryrely"; - abilityDelegator.executeShellCommand(pkillCmd, 1, (err, data) => { - setTimeout(() => { - commonEvent.subscribe(subscriber, subscribeCallBackSecond); - globalThis.abilityContext.startAbility( - { - bundleName: "com.example.apprecoveryrely", - abilityName: "EntryAbility", - action: "Acts_AppRecovery_1100_twice" - }, - (err) => { - console.debug("Acts_AppRecovery_1100====> second startAbility err:" + JSON.stringify(err)); - expect(err.code).assertEqual(0); - } - ); - }, 800); - }); - } - } - - function subscribeCallBackSecond(err, data) { - console.debug("Acts_AppRecovery_1100====> second subscribeCallBack data:" + JSON.stringify(data)); - if(data.event == "ACTS_AppRecovery_Second") { - flag=true; - let message = data.parameters.message; - expect(data.parameters.message[wantConstant.Params.ABILITY_RECOVERY_RESTART] != undefined).assertTrue(); - expect(data.parameters.message[wantConstant.Params.ABILITY_RECOVERY_RESTART]).assertTrue(); - commonEvent.unsubscribe(subscriber, unSubscribeCallback); - } - } - - function unSubscribeCallback() { - setTimeout(() => { - console.debug("Acts_AppRecovery_1100====> unSubscribeCallback"); - done(); - }, 800); - } - - setTimeout(()=>{ - if(flag==false){ - expect().assertFail(); - commonEvent.unsubscribe(subscriber, unSubscribeCallback); - } - },CASE_TIME_OUT) - }) - - /* - * @tc.number: Acts_AppRecovery_1200 - * @tc.name: Fault recovery of multi-Ability application - * @tc.desc: When setting restart recovery status is valid, exit the application by clearing the task list and - * do not restore the pre-failure state of the Ability application after the application restart. - */ - it('Acts_AppRecovery_1200',0, async function (done) { - let subscriber; - let flag = false; - let countFirst = 0; - let countSecond = 0; - console.info("Acts_AppRecovery_1200====> start") - commonEvent.createSubscriber(ACTS_AppRecovery).then(async (data) => { - console.debug("Acts_AppRecovery_1200====> Create Subscribe"); - subscriber = data; - commonEvent.subscribe(subscriber, subscribeCallBack); - globalThis.abilityContext.startAbility( - { - bundleName: "com.example.apprecoverysrely", - abilityName: "EntryAbility", - action: "Acts_AppRecovery_1200_once" - },(err)=>{ - console.debug("Acts_AppRecovery_1200====> startAbility err:"+JSON.stringify(err)); - expect(err.code).assertEqual(0); - }) - }) - - function subscribeCallBack(err, data) { - console.debug("Acts_AppRecovery_1200====> subscribeCallBack data:" + JSON.stringify(data)); - if(data.event == "ACTS_AppRecovery_First") { - countFirst++; - expect(data.parameters.message[wantConstant.Params.ABILITY_RECOVERY_RESTART]).assertEqual(undefined); - if (countFirst < 2) { - return; - } - let abilityDelegator = abilityDelegatorRegistry.getAbilityDelegator(); - let pkillCmd = "pkill -f com.example.apprecoverysrely"; - abilityDelegator.executeShellCommand(pkillCmd, 1, (err, data) => { - setTimeout(() => { - commonEvent.subscribe(subscriber, subscribeCallBackSecond); - globalThis.abilityContext.startAbility( - { - bundleName: "com.example.apprecoverysrely", - abilityName: "EntryAbility", - action: "Acts_AppRecovery_1200_twice" - }, - (err) => { - console.debug("Acts_AppRecovery_1200====> second startAbility err:" + JSON.stringify(err)); - expect(err.code).assertEqual(0); - } - ); - }, 800); - }); - } - } - - function subscribeCallBackSecond(err, data) { - console.debug("Acts_AppRecovery_1200====> second subscribeCallBack data:" + JSON.stringify(data)); - if(data.event == "ACTS_AppRecovery_Second") { - countSecond++; - flag=true; - expect(data.parameters.message[wantConstant.Params.ABILITY_RECOVERY_RESTART] != undefined).assertTrue(); - expect(data.parameters.message[wantConstant.Params.ABILITY_RECOVERY_RESTART]).assertTrue(); - if (countSecond < 2) { - return; - } - commonEvent.unsubscribe(subscriber, unSubscribeCallback); - } - } - - function unSubscribeCallback() { - setTimeout(() => { - console.debug("Acts_AppRecovery_1200====> unSubscribeCallback"); - done(); - }, 800); - } - - setTimeout(()=>{ - if(flag==false){ - expect().assertFail(); - commonEvent.unsubscribe(subscriber, unSubscribeCallback); - } - },CASE_TIME_OUT) - }) - }) -} \ No newline at end of file diff --git a/ability/ability_runtime/apprecovery/ActsAppRecoveryTestCaller/entry/src/main/ets/test/List.test.ets b/ability/ability_runtime/apprecovery/ActsAppRecoveryTestCaller/entry/src/main/ets/test/List.test.ets deleted file mode 100644 index cb2e22661cde4c6c3e986a6718061d089e25fcd5..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/apprecovery/ActsAppRecoveryTestCaller/entry/src/main/ets/test/List.test.ets +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (c) 2023 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import abilityTest from './Ability.test' - -export default function testsuite() { - abilityTest() -} \ No newline at end of file diff --git a/ability/ability_runtime/apprecovery/ActsAppRecoveryTestCaller/entry/src/main/ets/testability/TestAbility.ets b/ability/ability_runtime/apprecovery/ActsAppRecoveryTestCaller/entry/src/main/ets/testability/TestAbility.ets deleted file mode 100644 index dcaeccba2925f3b37ef3830165f2982200c2e418..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/apprecovery/ActsAppRecoveryTestCaller/entry/src/main/ets/testability/TestAbility.ets +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright (c) 2023 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import hilog from '@ohos.hilog' -// import Ability from '@ohos.application.Ability' -import Ability from '@ohos.app.ability.UIAbility' -import AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry' -import { Hypium } from '@ohos/hypium' -import testsuite from '../test/List.test' -import Window from '@ohos.window' - -export default class TestAbility extends Ability { - onCreate(want, launchParam) { - globalThis.abilityContext = this.context; - hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); - hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onCreate'); - hilog.info(0x0000, 'testTag', '%{public}s', 'want param:' + JSON.stringify(want) ?? ''); - hilog.info(0x0000, 'testTag', '%{public}s', 'launchParam:'+ JSON.stringify(launchParam) ?? ''); - var abilityDelegator: any - abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() - var abilityDelegatorArguments: any - abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments() - hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); - hilog.info(0x0000, 'testTag', '%{public}s', 'start run testcase!!!'); - Hypium.hypiumTest(abilityDelegator, abilityDelegatorArguments, testsuite) - } - - onDestroy() { - hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); - hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onDestroy'); - } - - onWindowStageCreate(windowStage: Window.WindowStage) { - hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); - hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onWindowStageCreate'); - windowStage.loadContent('testability/pages/Index', (err, data) => { - if (err.code) { - hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.ERROR); - hilog.error(0x0000, 'testTag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err) ?? ''); - return; - } - hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); - hilog.info(0x0000, 'testTag', 'Succeeded in loading the content. Data: %{public}s', - JSON.stringify(data) ?? ''); - }); - } - - onWindowStageDestroy() { - hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); - hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onWindowStageDestroy'); - } - - onForeground() { - hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); - hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onForeground'); - } - - onBackground() { - hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); - hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onBackground'); - } -} \ No newline at end of file diff --git a/ability/ability_runtime/apprecovery/ActsAppRecoveryTestCaller/entry/src/main/ets/testability/pages/Index.ets b/ability/ability_runtime/apprecovery/ActsAppRecoveryTestCaller/entry/src/main/ets/testability/pages/Index.ets deleted file mode 100644 index 431674fc5573a62cfd4d76547115834080634060..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/apprecovery/ActsAppRecoveryTestCaller/entry/src/main/ets/testability/pages/Index.ets +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) 2023 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import hilog from '@ohos.hilog'; - -@Entry -@Component -struct Index { - aboutToAppear() { - hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); - hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility index aboutToAppear'); - } - @State message: string = 'Hello World' - 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/apprecovery/ActsAppRecoveryTestCaller/entry/src/main/module.json b/ability/ability_runtime/apprecovery/ActsAppRecoveryTestCaller/entry/src/main/module.json deleted file mode 100644 index 272957d369303c76a818b3c89dfa072b6ecc0774..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/apprecovery/ActsAppRecoveryTestCaller/entry/src/main/module.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "module": { - "name": "entry_test", - "type": "feature", - "description": "$string:module_test_desc", - "mainElement": "TestAbility", - "deviceTypes": [ - "default", - "tablet" - ], - "deliveryWithInstall": true, - "installationFree": false, - "pages": "$profile:test_pages", - "abilities": [ - { - "name": "TestAbility", - "srcEntrance": "./ets/testability/TestAbility.ets", - "description": "$string:TestAbility_desc", - "icon": "$media:icon", - "label": "$string:TestAbility_label", - "visible": true, - "startWindowIcon": "$media:icon", - "startWindowBackground": "$color:start_window_background", - "skills": [ - { - "actions": [ - "action.system.home" - ], - "entities": [ - "entity.system.home" - ] - } - ] - } - ], - "requestPermissions": [ - { - "name": "ohos.permission.START_ABILITIES_FROM_BACKGROUND" - }, - { - "name": "ohos.permission.MANAGE_MISSIONS" - } - ] - } -} diff --git a/ability/ability_runtime/apprecovery/ActsAppRecoveryTestCaller/entry/src/main/resources/base/element/color.json b/ability/ability_runtime/apprecovery/ActsAppRecoveryTestCaller/entry/src/main/resources/base/element/color.json deleted file mode 100644 index 3c712962da3c2751c2b9ddb53559afcbd2b54a02..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/apprecovery/ActsAppRecoveryTestCaller/entry/src/main/resources/base/element/color.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "color": [ - { - "name": "start_window_background", - "value": "#FFFFFF" - } - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/apprecovery/ActsAppRecoveryTestCaller/entry/src/main/resources/base/element/string.json b/ability/ability_runtime/apprecovery/ActsAppRecoveryTestCaller/entry/src/main/resources/base/element/string.json deleted file mode 100644 index 65d8fa5a7cf54aa3943dcd0214f58d1771bc1f6c..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/apprecovery/ActsAppRecoveryTestCaller/entry/src/main/resources/base/element/string.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "string": [ - { - "name": "module_test_desc", - "value": "test ability description" - }, - { - "name": "TestAbility_desc", - "value": "the test ability" - }, - { - "name": "TestAbility_label", - "value": "test label" - } - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/apprecovery/ActsAppRecoveryTestCaller/entry/src/main/resources/base/media/icon.png b/ability/ability_runtime/apprecovery/ActsAppRecoveryTestCaller/entry/src/main/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/apprecovery/ActsAppRecoveryTestCaller/entry/src/main/resources/base/media/icon.png and /dev/null differ diff --git a/ability/ability_runtime/apprecovery/ActsAppRecoveryTestCaller/entry/src/main/resources/base/profile/test_pages.json b/ability/ability_runtime/apprecovery/ActsAppRecoveryTestCaller/entry/src/main/resources/base/profile/test_pages.json deleted file mode 100644 index b7e7343cacb32ce982a45e76daad86e435e054fe..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/apprecovery/ActsAppRecoveryTestCaller/entry/src/main/resources/base/profile/test_pages.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "src": [ - "testability/pages/Index" - ] -} diff --git a/ability/ability_runtime/apprecovery/ActsAppRecoveryTestCaller/signature/openharmony_sx.p7b b/ability/ability_runtime/apprecovery/ActsAppRecoveryTestCaller/signature/openharmony_sx.p7b deleted file mode 100644 index e2fb0d83f985c21058e76b2bba4274f66f3edbab..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/apprecovery/ActsAppRecoveryTestCaller/signature/openharmony_sx.p7b and /dev/null differ diff --git a/ability/ability_runtime/apprecovery/AppRecoveryRely/AppScope/app.json b/ability/ability_runtime/apprecovery/AppRecoveryRely/AppScope/app.json deleted file mode 100644 index 4bb1b57b2fae1bf75a62182bb1ad0b6dcbb78784..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/apprecovery/AppRecoveryRely/AppScope/app.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "app": { - "bundleName": "com.example.apprecoveryrely", - "vendor": "example", - "versionCode": 1000000, - "versionName": "1.0.0", - "icon": "$media:app_icon", - "label": "$string:app_name", - "distributedNotificationEnabled": true, - "keepAlive" : true, - "singleUser": true, - "minAPIVersion": 10, - "targetAPIVersion": 10, - "car": { - "apiCompatibleVersion": 10, - "singleUser": false - } - } -} diff --git a/ability/ability_runtime/apprecovery/AppRecoveryRely/AppScope/resources/base/element/string.json b/ability/ability_runtime/apprecovery/AppRecoveryRely/AppScope/resources/base/element/string.json deleted file mode 100644 index 9311965cac8e15b8001612d094a8880fb5734add..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/apprecovery/AppRecoveryRely/AppScope/resources/base/element/string.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "string": [ - { - "name": "app_name", - "value": "AppRecoveryRely" - } - ] -} diff --git a/ability/ability_runtime/apprecovery/AppRecoveryRely/AppScope/resources/base/media/app_icon.png b/ability/ability_runtime/apprecovery/AppRecoveryRely/AppScope/resources/base/media/app_icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/apprecovery/AppRecoveryRely/AppScope/resources/base/media/app_icon.png and /dev/null differ diff --git a/ability/ability_runtime/apprecovery/AppRecoveryRely/BUILD.gn b/ability/ability_runtime/apprecovery/AppRecoveryRely/BUILD.gn deleted file mode 100644 index b9d8c2505d54997ee68f583fdfe1ff573c60bfbf..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/apprecovery/AppRecoveryRely/BUILD.gn +++ /dev/null @@ -1,43 +0,0 @@ -# Copyright (c) 2023 Huawei Device Co., Ltd. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import("//test/xts/tools/build/suite.gni") - -ohos_hap_assist_suite("AppRecoveryRely") { - hap_profile = "entry/src/main/module.json" - js_build_mode = "debug" - deps = [ - ":apprecoveryrely_js_assets", - ":apprecoveryrely_resources", - ] - ets2abc = true - certificate_profile = "signature/openharmony_sx.p7b" - hap_name = "AppRecoveryRely" - subsystem_name = "ability" - part_name = "ability_runtime" -} - -ohos_app_scope("apprecoveryrely_app_profile") { - app_profile = "AppScope/app.json" - sources = [ "AppScope/resources" ] -} - -ohos_js_assets("apprecoveryrely_js_assets") { - source_dir = "entry/src/main/ets" -} - -ohos_resources("apprecoveryrely_resources") { - sources = [ "entry/src/main/resources" ] - deps = [ ":apprecoveryrely_app_profile" ] - hap_profile = "entry/src/main/module.json" -} diff --git a/ability/ability_runtime/apprecovery/AppRecoveryRely/entry/src/main/ets/app/MyAbilityStage.ets b/ability/ability_runtime/apprecovery/AppRecoveryRely/entry/src/main/ets/app/MyAbilityStage.ets deleted file mode 100644 index 24519dfb74c6da66587156bc132a930348583fad..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/apprecovery/AppRecoveryRely/entry/src/main/ets/app/MyAbilityStage.ets +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) 2023 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import AbilityStage from '@ohos.app.ability.AbilityStage'; -import appRecovery from '@ohos.app.ability.appRecovery'; - -export default class MyAbilityStage extends AbilityStage { - onCreate() { - console.log("Maple Create"); - // global switch for appRecovery function in current package - appRecovery.enableAppRecovery(); - } -} \ No newline at end of file diff --git a/ability/ability_runtime/apprecovery/AppRecoveryRely/entry/src/main/ets/entryability/EntryAbility.ts b/ability/ability_runtime/apprecovery/AppRecoveryRely/entry/src/main/ets/entryability/EntryAbility.ts deleted file mode 100644 index eca2e59acd5baa3123fa9dbdd8fb6d0bcde67214..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/apprecovery/AppRecoveryRely/entry/src/main/ets/entryability/EntryAbility.ts +++ /dev/null @@ -1,125 +0,0 @@ -/* - * Copyright (c) 2023 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import hilog from '@ohos.hilog' -import Ability from '@ohos.app.ability.UIAbility' -import Window from '@ohos.window' -import commonEvent from '@ohos.commonEvent' -import appRecovery from '@ohos.app.ability.appRecovery' -import AbilityConstant from '@ohos.app.ability.AbilityConstant' -let message; -let commonEventData={ - parameters:{ - message:message, - } -} - -let strAction = ""; - -export default class EntryAbility extends Ability { - onCreate(want, launchParam) { - globalThis.context = this.context; - strAction = want.action; - console.log(strAction + "Rely====> want:" + JSON.stringify(want)); - console.log(strAction + "Rely====> launchParam:" + JSON.stringify(launchParam)); - commonEventData.parameters.message = want.parameters; - } - - onDestroy() { - hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); - hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onDestroy'); - } - - onWindowStageCreate(windowStage: Window.WindowStage) { - // Main window is created, set main page for this ability - hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); - hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageCreate'); - - windowStage.loadContent('pages/Index', (err, data) => { - if (err.code) { - hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.ERROR); - hilog.error(0x0000, 'testTag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err) ?? ''); - return; - } - hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); - hilog.info(0x0000, 'testTag', 'Succeeded in loading the content. Data: %{public}s', JSON.stringify(data) ?? ''); - }); - - } - - onWindowStageDestroy() { - // Main window is destroyed, release UI related resources - hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); - hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageDestroy'); - } - - onForeground() { - // Ability has brought to foreground - hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); - hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onForeground'); - - if (strAction == "Acts_AppRecovery_0100_once" || strAction == "Acts_AppRecovery_0300_once" || - strAction == "Acts_AppRecovery_0700_once" || strAction == "Acts_AppRecovery_0900_once" || - strAction == "Acts_AppRecovery_1100_once") { - if (strAction == "Acts_AppRecovery_0100_once" || strAction == "Acts_AppRecovery_0300_once" || - strAction == "Acts_AppRecovery_1100_once") { - appRecovery.saveAppState(this.context); - console.log(strAction + "Rely====> saveAppState"); - } else { - console.log(strAction + "Rely====> not saveAppState"); - } - setTimeout(() => { - commonEvent.publish("ACTS_AppRecovery_First",commonEventData,(err)=>{ - console.log(strAction + "Rely====> publish err:" + JSON.stringify(err)); - if (strAction == "Acts_AppRecovery_0100_once" || - strAction == "Acts_AppRecovery_0700_once") { - setTimeout(()=>{ - globalThis.context.terminateSelf().then(() => { - console.info(strAction + "Rely====> terminateSelf end"); - }).catch((err) => { - console.info(strAction + "Rely====> terminateSelf err:" + JSON.stringify(err)); - }); - }, 50) - } - }) - }, 200); - } - - if (strAction == "Acts_AppRecovery_0100_twice" || strAction == "Acts_AppRecovery_0300_twice" || - strAction == "Acts_AppRecovery_0700_twice" || strAction == "Acts_AppRecovery_0900_twice" || - strAction == "Acts_AppRecovery_1100_twice") { - commonEvent.publish("ACTS_AppRecovery_Second", commonEventData, (err) => { - console.log(strAction + "Rely====> second publish err:" + JSON.stringify(err)); - setTimeout(()=>{ - globalThis.context.terminateSelf().then(() => { - console.info(strAction + "Rely====> terminateSelf end"); - }).catch((err) => { - console.info(strAction + "Rely====> terminateSelf err:" + JSON.stringify(err)); - }); - }, 50) - }) - } - } - - onBackground() { - // Ability has back to background - hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); - hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onBackground'); - } - - onSaveState(reason, wantParam: {[key:string]: any}) { - console.log(strAction + "RelyonSaveStage====> wantParam:" + JSON.stringify(wantParam)); - return AbilityConstant.OnSaveResult.RECOVERY_AGREE; - } -} diff --git a/ability/ability_runtime/apprecovery/AppRecoveryRely/entry/src/main/ets/pages/Index.ets b/ability/ability_runtime/apprecovery/AppRecoveryRely/entry/src/main/ets/pages/Index.ets deleted file mode 100644 index ad7ec009d021f1ebecb5a816a69e3c80cf654b63..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/apprecovery/AppRecoveryRely/entry/src/main/ets/pages/Index.ets +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2023 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -@Entry -@Component -struct Index { - @State message: string = 'Hello World' - - 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/apprecovery/AppRecoveryRely/entry/src/main/module.json b/ability/ability_runtime/apprecovery/AppRecoveryRely/entry/src/main/module.json deleted file mode 100644 index 2e51e31ef31ced6fd0f15462eb940f29e382237b..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/apprecovery/AppRecoveryRely/entry/src/main/module.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "module": { - "name": "entry", - "type": "entry", - "description": "$string:module_desc", - "mainElement": "EntryAbility", - "deviceTypes": [ - "default", - "tablet" - ], - "deliveryWithInstall": true, - "installationFree": false, - "srcEntrance": "./ets/app/MyAbilityStage.ets", - "pages": "$profile:main_pages", - "abilities": [ - { - "name": "EntryAbility", - "srcEntrance": "./ets/entryability/EntryAbility.ts", - "description": "$string:EntryAbility_desc", - "icon": "$media:icon", - "label": "$string:EntryAbility_label", - "startWindowIcon": "$media:icon", - "startWindowBackground": "$color:start_window_background", - "visible": true, - "recoverable": true, - "skills": [ - { - "entities": [ - "entity.system.home" - ], - "actions": [ - "action.system.home" - ] - } - ] - } - ] - } -} \ No newline at end of file diff --git a/ability/ability_runtime/apprecovery/AppRecoveryRely/entry/src/main/resources/base/element/color.json b/ability/ability_runtime/apprecovery/AppRecoveryRely/entry/src/main/resources/base/element/color.json deleted file mode 100644 index d66f9a7d4ac61fb8d215239ab3620b7bcd77bf33..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/apprecovery/AppRecoveryRely/entry/src/main/resources/base/element/color.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "color": [ - { - "name": "start_window_background", - "value": "#FFFFFF" - } - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/apprecovery/AppRecoveryRely/entry/src/main/resources/base/element/string.json b/ability/ability_runtime/apprecovery/AppRecoveryRely/entry/src/main/resources/base/element/string.json deleted file mode 100644 index 9e99b66dcb60d89ec3bad08c8c1515475ac2fe3a..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/apprecovery/AppRecoveryRely/entry/src/main/resources/base/element/string.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "string": [ - { - "name": "module_desc", - "value": "module description" - }, - { - "name": "EntryAbility_desc", - "value": "description" - }, - { - "name": "EntryAbility_label", - "value": "AppRecoveryRely" - } - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/apprecovery/AppRecoveryRely/entry/src/main/resources/base/media/icon.png b/ability/ability_runtime/apprecovery/AppRecoveryRely/entry/src/main/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/apprecovery/AppRecoveryRely/entry/src/main/resources/base/media/icon.png and /dev/null differ diff --git a/ability/ability_runtime/apprecovery/AppRecoveryRely/entry/src/main/resources/base/profile/main_pages.json b/ability/ability_runtime/apprecovery/AppRecoveryRely/entry/src/main/resources/base/profile/main_pages.json deleted file mode 100644 index 1898d94f58d6128ab712be2c68acc7c98e9ab9ce..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/apprecovery/AppRecoveryRely/entry/src/main/resources/base/profile/main_pages.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "src": [ - "pages/Index" - ] -} diff --git a/ability/ability_runtime/apprecovery/AppRecoveryRely/entry/src/main/resources/en_US/element/string.json b/ability/ability_runtime/apprecovery/AppRecoveryRely/entry/src/main/resources/en_US/element/string.json deleted file mode 100644 index 9e99b66dcb60d89ec3bad08c8c1515475ac2fe3a..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/apprecovery/AppRecoveryRely/entry/src/main/resources/en_US/element/string.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "string": [ - { - "name": "module_desc", - "value": "module description" - }, - { - "name": "EntryAbility_desc", - "value": "description" - }, - { - "name": "EntryAbility_label", - "value": "AppRecoveryRely" - } - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/apprecovery/AppRecoveryRely/entry/src/main/resources/zh_CN/element/string.json b/ability/ability_runtime/apprecovery/AppRecoveryRely/entry/src/main/resources/zh_CN/element/string.json deleted file mode 100644 index f53b2127579abfacf37c6af916c7dc42a37f3e6c..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/apprecovery/AppRecoveryRely/entry/src/main/resources/zh_CN/element/string.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "string": [ - { - "name": "module_desc", - "value": "模块描述" - }, - { - "name": "EntryAbility_desc", - "value": "description" - }, - { - "name": "EntryAbility_label", - "value": "AppRecoveryRely" - } - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/apprecovery/AppRecoveryRely/signature/openharmony_sx.p7b b/ability/ability_runtime/apprecovery/AppRecoveryRely/signature/openharmony_sx.p7b deleted file mode 100644 index 65481a97e77bc5e916f0af1323d342a3a438e0c5..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/apprecovery/AppRecoveryRely/signature/openharmony_sx.p7b and /dev/null differ diff --git a/ability/ability_runtime/apprecovery/AppRecoverysRely/AppScope/app.json b/ability/ability_runtime/apprecovery/AppRecoverysRely/AppScope/app.json deleted file mode 100644 index 064895b60772901b0eb526c6bc222c4dd79f2a0d..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/apprecovery/AppRecoverysRely/AppScope/app.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "app": { - "bundleName": "com.example.apprecoverysrely", - "vendor": "example", - "versionCode": 1000000, - "versionName": "1.0.0", - "icon": "$media:app_icon", - "label": "$string:app_name", - "distributedNotificationEnabled": true, - "keepAlive" : true, - "singleUser": true, - "minAPIVersion": 10, - "targetAPIVersion": 10, - "car": { - "apiCompatibleVersion": 10, - "singleUser": false - } - } -} diff --git a/ability/ability_runtime/apprecovery/AppRecoverysRely/AppScope/resources/base/element/string.json b/ability/ability_runtime/apprecovery/AppRecoverysRely/AppScope/resources/base/element/string.json deleted file mode 100644 index 101d26acab7bbc32ff2d7a0e6627c4c1bebb22f5..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/apprecovery/AppRecoverysRely/AppScope/resources/base/element/string.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "string": [ - { - "name": "app_name", - "value": "AppRecoverysRely" - } - ] -} diff --git a/ability/ability_runtime/apprecovery/AppRecoverysRely/AppScope/resources/base/media/app_icon.png b/ability/ability_runtime/apprecovery/AppRecoverysRely/AppScope/resources/base/media/app_icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/apprecovery/AppRecoverysRely/AppScope/resources/base/media/app_icon.png and /dev/null differ diff --git a/ability/ability_runtime/apprecovery/AppRecoverysRely/BUILD.gn b/ability/ability_runtime/apprecovery/AppRecoverysRely/BUILD.gn deleted file mode 100644 index 1ba1513ad43639dd71cb7f5164dd0e12ee34e798..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/apprecovery/AppRecoverysRely/BUILD.gn +++ /dev/null @@ -1,42 +0,0 @@ -# Copyright (c) 2023 Huawei Device Co., Ltd. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -import("//test/xts/tools/build/suite.gni") - -ohos_hap_assist_suite("AppRecoverysRely") { - hap_profile = "entry/src/main/module.json" - js_build_mode = "debug" - deps = [ - ":apprecoverysrely_js_assets", - ":apprecoverysrely_resources", - ] - ets2abc = true - certificate_profile = "signature/openharmony_sx.p7b" - hap_name = "AppRecoverysRely" - subsystem_name = "ability" - part_name = "ability_runtime" -} - -ohos_app_scope("apprecoverysrely_app_profile") { - app_profile = "AppScope/app.json" - sources = [ "AppScope/resources" ] -} - -ohos_js_assets("apprecoverysrely_js_assets") { - source_dir = "entry/src/main/ets" -} - -ohos_resources("apprecoverysrely_resources") { - sources = [ "entry/src/main/resources" ] - deps = [ ":apprecoverysrely_app_profile" ] - hap_profile = "entry/src/main/module.json" -} diff --git a/ability/ability_runtime/apprecovery/AppRecoverysRely/entry/src/main/ets/app/MyAbilityStage.ets b/ability/ability_runtime/apprecovery/AppRecoverysRely/entry/src/main/ets/app/MyAbilityStage.ets deleted file mode 100644 index 24519dfb74c6da66587156bc132a930348583fad..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/apprecovery/AppRecoverysRely/entry/src/main/ets/app/MyAbilityStage.ets +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) 2023 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import AbilityStage from '@ohos.app.ability.AbilityStage'; -import appRecovery from '@ohos.app.ability.appRecovery'; - -export default class MyAbilityStage extends AbilityStage { - onCreate() { - console.log("Maple Create"); - // global switch for appRecovery function in current package - appRecovery.enableAppRecovery(); - } -} \ No newline at end of file diff --git a/ability/ability_runtime/apprecovery/AppRecoverysRely/entry/src/main/ets/entryability/EntryAbility.ts b/ability/ability_runtime/apprecovery/AppRecoverysRely/entry/src/main/ets/entryability/EntryAbility.ts deleted file mode 100644 index 2ec74b47ea8a46de808b36158131e47c75578397..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/apprecovery/AppRecoverysRely/entry/src/main/ets/entryability/EntryAbility.ts +++ /dev/null @@ -1,127 +0,0 @@ -/* - * Copyright (c) 2023 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import hilog from '@ohos.hilog' -import Ability from '@ohos.app.ability.UIAbility' -import Window from '@ohos.window' -import commonEvent from '@ohos.commonEvent' -import appRecovery from '@ohos.app.ability.appRecovery' -import AbilityConstant from '@ohos.app.ability.AbilityConstant' -let message; -let commonEventData={ - parameters:{ - message:message, - } -} - -let strAction = ""; - -export default class EntryAbility extends Ability { - onCreate(want, launchParam) { - globalThis.contextFirst = this.context; - strAction = want.action; - console.log(strAction + "Rely1====> want:" + JSON.stringify(want)); - console.log(strAction + "Rely1====> launchParam:" + JSON.stringify(launchParam)); - commonEventData.parameters.message = want.parameters; - } - - onDestroy() { - hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); - hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onDestroy'); - } - - onWindowStageCreate(windowStage: Window.WindowStage) { - // Main window is created, set main page for this ability - hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); - hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageCreate'); - - windowStage.loadContent('pages/Index', (err, data) => { - if (err.code) { - hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.ERROR); - hilog.error(0x0000, 'testTag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err) ?? ''); - return; - } - hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); - hilog.info(0x0000, 'testTag', 'Succeeded in loading the content. Data: %{public}s', JSON.stringify(data) ?? ''); - }); - } - - onWindowStageDestroy() { - // Main window is destroyed, release UI related resources - hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); - hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageDestroy'); - } - - onForeground() { - // Ability has brought to foreground - hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); - hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onForeground'); - if (strAction == "Acts_AppRecovery_0200_once" || strAction == "Acts_AppRecovery_0400_once" || - strAction == "Acts_AppRecovery_0800_once" || - strAction == "Acts_AppRecovery_1000_once" || strAction == "Acts_AppRecovery_1200_once") { - if (strAction == "Acts_AppRecovery_0200_once" || - strAction == "Acts_AppRecovery_0400_once" || - strAction == "Acts_AppRecovery_1200_once") { - appRecovery.saveAppState(this.context); - console.log(strAction + "Rely1====> saveAppState"); - } else { - console.log(strAction + "Rely1====> not saveAppState"); - } - setTimeout(() => { - commonEvent.publish("ACTS_AppRecovery_First",commonEventData,(err)=>{ - console.log(strAction + "Rely1====> publish err:" + JSON.stringify(err)); - }) - }, 200); - } - if (strAction == "Acts_AppRecovery_0200_twice" || strAction == "Acts_AppRecovery_0400_twice" || - strAction == "Acts_AppRecovery_0800_twice" || - strAction == "Acts_AppRecovery_1000_twice" || strAction == "Acts_AppRecovery_1200_twice") { - setTimeout(() => { - commonEvent.publish("ACTS_AppRecovery_Second", commonEventData, (err) => { - console.log(strAction + "Rely1====> second publish err:" + JSON.stringify(err)); - }) - }, 200); - } - this.context.startAbility({ - bundleName: "com.example.apprecoverysrely", - abilityName: "EntryAbilitySec", - action: strAction - },(err) => { - console.debug(strAction + "Rely1====> startAbility err:"+JSON.stringify(err)); - if (strAction == "Acts_AppRecovery_0200_once" || strAction == "Acts_AppRecovery_0200_twice" || - strAction == "Acts_AppRecovery_0400_twice" || - strAction == "Acts_AppRecovery_0800_once" || strAction == "Acts_AppRecovery_0800_twice" || - strAction == "Acts_AppRecovery_1000_twice" || strAction == "Acts_AppRecovery_1200_twice") { - setTimeout(()=>{ - globalThis.contextFirst.terminateSelf().then(() => { - console.info(strAction + "Rely1====> terminateSelf end"); - }).catch((err) => { - console.info(strAction + "Rely1====> terminateSelf err:" + JSON.stringify(err)); - }); - }, 200) - } - }); - } - - onBackground() { - // Ability has back to background - hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); - hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onBackground'); - } - - onSaveState(reason, wantParam: {[key:string]: any}) { - console.log(strAction + "Rely1onSaveStage====> wantParam:" + JSON.stringify(wantParam)); - return AbilityConstant.OnSaveResult.RECOVERY_AGREE; - } -} diff --git a/ability/ability_runtime/apprecovery/AppRecoverysRely/entry/src/main/ets/entryabilitysec/EntryAbilitySec.ts b/ability/ability_runtime/apprecovery/AppRecoverysRely/entry/src/main/ets/entryabilitysec/EntryAbilitySec.ts deleted file mode 100644 index 7cdc543560d80fb214aaf4dd2604c06b041a89e6..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/apprecovery/AppRecoverysRely/entry/src/main/ets/entryabilitysec/EntryAbilitySec.ts +++ /dev/null @@ -1,122 +0,0 @@ -/* - * Copyright (c) 2023 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import hilog from '@ohos.hilog' -import Ability from '@ohos.app.ability.UIAbility' -import Window from '@ohos.window' -import commonEvent from '@ohos.commonEvent' -import appRecovery from '@ohos.app.ability.appRecovery' -import AbilityConstant from '@ohos.app.ability.AbilityConstant' -let message; -let commonEventData={ - parameters:{ - message:message, - } -} - -let strAction = ""; - -export default class EntryAbilitySec extends Ability { - onCreate(want, launchParam) { - globalThis.contextSecond = this.context; - strAction = want.action; - console.log(strAction + "Rely2====> want:" + JSON.stringify(want)); - console.log(strAction + "Rely2====> launchParam:" + JSON.stringify(launchParam)); - commonEventData.parameters.message = want.parameters; - } - - onDestroy() { - hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); - hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onDestroy'); - } - - onWindowStageCreate(windowStage: Window.WindowStage) { - // Main window is created, set main page for this ability - hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); - hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageCreate'); - - windowStage.loadContent('pages/Index_sec', (err, data) => { - if (err.code) { - hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.ERROR); - hilog.error(0x0000, 'testTag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err) ?? ''); - return; - } - hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); - hilog.info(0x0000, 'testTag', 'Succeeded in loading the content. Data: %{public}s', JSON.stringify(data) ?? ''); - }); - } - - onWindowStageDestroy() { - // Main window is destroyed, release UI related resources - hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); - hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageDestroy'); - } - - onForeground() { - // Ability has brought to foreground - hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); - hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onForeground'); - - if (strAction == "Acts_AppRecovery_0200_once" || strAction == "Acts_AppRecovery_0400_once" || - strAction == "Acts_AppRecovery_0800_once" || - strAction == "Acts_AppRecovery_1000_once" || strAction == "Acts_AppRecovery_1200_once") { - if (strAction == "Acts_AppRecovery_0200_once" || - strAction == "Acts_AppRecovery_0400_once" || - strAction == "Acts_AppRecovery_1200_once") { - appRecovery.saveAppState(this.context); - console.log(strAction + "Rely2====> saveAppState"); - } else { - console.log(strAction + "Rely2====> not saveAppState"); - } - setTimeout(() => { - commonEvent.publish("ACTS_AppRecovery_First",commonEventData,(err)=>{ - console.log(strAction + "Rely2====> publish err:" + JSON.stringify(err)); - }) - }, 200); - } - if (strAction == "Acts_AppRecovery_0200_twice" || strAction == "Acts_AppRecovery_0400_twice" || - strAction == "Acts_AppRecovery_0800_twice" || - strAction == "Acts_AppRecovery_1000_twice" || strAction == "Acts_AppRecovery_1200_twice") { - setTimeout(() => { - commonEvent.publish("ACTS_AppRecovery_Second", commonEventData, (err) => { - console.log(strAction + "Rely2====> second publish err:" + JSON.stringify(err)); - }) - }, 200); - } - - if (strAction == "Acts_AppRecovery_0200_once" || strAction == "Acts_AppRecovery_0200_twice" || - strAction == "Acts_AppRecovery_0400_twice" || - strAction == "Acts_AppRecovery_0800_once" || strAction == "Acts_AppRecovery_0800_twice" || - strAction == "Acts_AppRecovery_1000_twice" || strAction == "Acts_AppRecovery_1200_twice") { - setTimeout(()=>{ - globalThis.contextSecond.terminateSelf().then(() => { - console.info(strAction + "Rely2====> terminateSelf end"); - }).catch((err) => { - console.info(strAction + "Rely2====> terminateSelf err:" + JSON.stringify(err)); - }); - }, 300) - } - } - - onBackground() { - // Ability has back to background - hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); - hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onBackground'); - } - - onSaveState(reason, wantParam: {[key:string]: any}) { - console.log(strAction + "Rely2onSaveStage====> wantParam:" + JSON.stringify(wantParam)); - return AbilityConstant.OnSaveResult.RECOVERY_AGREE; - } -} diff --git a/ability/ability_runtime/apprecovery/AppRecoverysRely/entry/src/main/ets/pages/Index.ets b/ability/ability_runtime/apprecovery/AppRecoverysRely/entry/src/main/ets/pages/Index.ets deleted file mode 100644 index 0caca712dc3eaf652f08c0b4d6b9f54088b96d87..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/apprecovery/AppRecoverysRely/entry/src/main/ets/pages/Index.ets +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2023 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -@Entry -@Component -struct Index { - @State message: string = 'Rely1 Abilitys' - - 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/apprecovery/AppRecoverysRely/entry/src/main/ets/pages/Index_sec.ets b/ability/ability_runtime/apprecovery/AppRecoverysRely/entry/src/main/ets/pages/Index_sec.ets deleted file mode 100644 index 3f9bb44fa307d9a67d9f39d56f23dded5023c320..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/apprecovery/AppRecoverysRely/entry/src/main/ets/pages/Index_sec.ets +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2023 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -@Entry -@Component -struct IndexSec { - @State message: string = 'Rely2 Abilitys' - - 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/apprecovery/AppRecoverysRely/entry/src/main/module.json b/ability/ability_runtime/apprecovery/AppRecoverysRely/entry/src/main/module.json deleted file mode 100644 index 2184774f7cda3ed0c82b59beb0af8dab9d5480e2..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/apprecovery/AppRecoverysRely/entry/src/main/module.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "module": { - "name": "entry", - "type": "entry", - "description": "$string:module_desc", - "mainElement": "EntryAbility", - "deviceTypes": [ - "default", - "tablet" - ], - "srcEntrance": "./ets/app/MyAbilityStage.ets", - "deliveryWithInstall": true, - "installationFree": false, - "pages": "$profile:main_pages", - "abilities": [ - { - "name": "EntryAbility", - "srcEntrance": "./ets/entryability/EntryAbility.ts", - "description": "$string:EntryAbility_desc", - "icon": "$media:icon", - "label": "$string:EntryAbility_label", - "startWindowIcon": "$media:icon", - "startWindowBackground": "$color:start_window_background", - "visible": true, - "recoverable": true, - "skills": [ - { - "entities": [ - "entity.system.home" - ], - "actions": [ - "action.system.home" - ] - } - ] - }, - { - "name": "EntryAbilitySec", - "srcEntrance": "./ets/entryabilitysec/EntryAbilitySec.ts", - "description": "$string:EntryAbilitySec_desc", - "icon": "$media:icon", - "label": "$string:EntryAbilitySec_label", - "startWindowIcon": "$media:icon", - "startWindowBackground": "$color:start_window_background", - "recoverable": true, - "visible": true - } - ] - } -} \ No newline at end of file diff --git a/ability/ability_runtime/apprecovery/AppRecoverysRely/entry/src/main/resources/base/element/color.json b/ability/ability_runtime/apprecovery/AppRecoverysRely/entry/src/main/resources/base/element/color.json deleted file mode 100644 index d66f9a7d4ac61fb8d215239ab3620b7bcd77bf33..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/apprecovery/AppRecoverysRely/entry/src/main/resources/base/element/color.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "color": [ - { - "name": "start_window_background", - "value": "#FFFFFF" - } - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/apprecovery/AppRecoverysRely/entry/src/main/resources/base/element/string.json b/ability/ability_runtime/apprecovery/AppRecoverysRely/entry/src/main/resources/base/element/string.json deleted file mode 100644 index 423c984039a382f686f7e598bad3c397b30b373a..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/apprecovery/AppRecoverysRely/entry/src/main/resources/base/element/string.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "string": [ - { - "name": "module_desc", - "value": "module description" - }, - { - "name": "EntryAbility_desc", - "value": "description" - }, - { - "name": "EntryAbility_label", - "value": "label" - }, - { - "name": "EntryAbilitySec_desc", - "value": "description" - }, - { - "name": "EntryAbilitySec_label", - "value": "label" - } - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/apprecovery/AppRecoverysRely/entry/src/main/resources/base/media/icon.png b/ability/ability_runtime/apprecovery/AppRecoverysRely/entry/src/main/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/apprecovery/AppRecoverysRely/entry/src/main/resources/base/media/icon.png and /dev/null differ diff --git a/ability/ability_runtime/apprecovery/AppRecoverysRely/entry/src/main/resources/base/profile/main_pages.json b/ability/ability_runtime/apprecovery/AppRecoverysRely/entry/src/main/resources/base/profile/main_pages.json deleted file mode 100644 index 2fea8da0ae60f7cdf8e2b22822ce5c35584ae35c..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/apprecovery/AppRecoverysRely/entry/src/main/resources/base/profile/main_pages.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "src": [ - "pages/Index", - "pages/Index_sec" - ] -} diff --git a/ability/ability_runtime/apprecovery/AppRecoverysRely/entry/src/main/resources/en_US/element/string.json b/ability/ability_runtime/apprecovery/AppRecoverysRely/entry/src/main/resources/en_US/element/string.json deleted file mode 100644 index 423c984039a382f686f7e598bad3c397b30b373a..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/apprecovery/AppRecoverysRely/entry/src/main/resources/en_US/element/string.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "string": [ - { - "name": "module_desc", - "value": "module description" - }, - { - "name": "EntryAbility_desc", - "value": "description" - }, - { - "name": "EntryAbility_label", - "value": "label" - }, - { - "name": "EntryAbilitySec_desc", - "value": "description" - }, - { - "name": "EntryAbilitySec_label", - "value": "label" - } - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/apprecovery/AppRecoverysRely/entry/src/main/resources/zh_CN/element/string.json b/ability/ability_runtime/apprecovery/AppRecoverysRely/entry/src/main/resources/zh_CN/element/string.json deleted file mode 100644 index 6db0a80e95ce52288fa45fd5872205a8efd079a8..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/apprecovery/AppRecoverysRely/entry/src/main/resources/zh_CN/element/string.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "string": [ - { - "name": "module_desc", - "value": "模块描述" - }, - { - "name": "EntryAbility_desc", - "value": "description" - }, - { - "name": "EntryAbility_label", - "value": "label" - }, - { - "name": "EntryAbilitySec_desc", - "value": "description" - }, - { - "name": "EntryAbilitySec_label", - "value": "label" - } - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/apprecovery/AppRecoverysRely/signature/openharmony_sx.p7b b/ability/ability_runtime/apprecovery/AppRecoverysRely/signature/openharmony_sx.p7b deleted file mode 100644 index 738f07f60001f580ec0ad8e973878f38b5197be4..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/apprecovery/AppRecoverysRely/signature/openharmony_sx.p7b and /dev/null differ diff --git a/ability/ability_runtime/apprecovery/BUILD.gn b/ability/ability_runtime/apprecovery/BUILD.gn deleted file mode 100644 index e9a8fcf0de7ba9e8f51458a75d692cb9d4aa465c..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/apprecovery/BUILD.gn +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright (c) 2023 Huawei Device Co., Ltd. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import("//test/xts/tools/build/suite.gni") - -group("apprecovery") { - testonly = true - if (is_standard_system) { - deps = [ - "ActsAppRecoveryTestCaller:ActsAppRecoveryTestCaller", - "AppRecoveryRely:AppRecoveryRely", - "AppRecoverysRely:AppRecoverysRely", - ] - } -}