From 662db2c374034c81ebb118da786dce195cd8b86f Mon Sep 17 00:00:00 2001 From: chengxingzhen Date: Sat, 9 Jul 2022 15:00:34 +0800 Subject: [PATCH] =?UTF-8?q?XTS=E5=85=83=E8=83=BD=E5=8A=9Bapi=E8=A6=86?= =?UTF-8?q?=E7=9B=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: chengxingzhen --- ability/ability_runtime/BUILD.gn | 1 + .../main/ets/test/ApiCoverAbility.test.ets | 12 +- .../src/main/ets/test/VerificationTest.ets | 83 ---- .../ets/ExtensionAbility/ExtensionAbility.ts | 95 ---- .../ExtensionAbility2/ExtensionAbility2.ts | 79 ---- .../src/main/ets/MainAbility2/MainAbility2.ts | 147 ------ .../src/main/ets/MainAbility6/MainAbility6.ts | 57 --- .../src/main/ets/MainAbility7/MainAbility7.ts | 57 --- .../src/main/ets/MainAbility8/MainAbility8.ts | 57 --- .../entry/src/main/module.json | 64 --- .../main/resources/base/element/string.json | 40 -- ability/ability_runtime/faapicover/BUILD.gn | 24 + .../faapicover/faapicoverhaptest/BUILD.gn | 32 ++ .../faapicover/faapicoverhaptest/Test.json | 19 + .../entry/src/main/config.json | 72 +++ .../entry/src/main/ets/MainAbility/app.ets | 22 + .../src/main/ets/MainAbility/pages/index.ets | 52 +++ .../main/ets/test/ApiCoverAbility.test.ets | 79 ++++ .../entry/src/main/ets/test/ListTest.ets | 22 + .../src/main/ets/test/VerificationTest.ets | 423 ++++++++++++++++++ .../main/resources/base/element/string.json | 16 + .../src/main/resources/base/media/icon.png | Bin 0 -> 6790 bytes .../signature/openharmony_sx.p7b | Bin 0 -> 3443 bytes .../faapicover/faauxiliary/BUILD.gn | 40 ++ .../faauxiliary/entry/src/main/config.json | 230 ++++++++++ .../entry/src/main/ets/MainAbility/app.ets | 65 +++ .../src/main/ets/MainAbility/pages/index.ets | 31 ++ .../entry/src/main/ets/MainAbility2/app.ets | 70 +++ .../src/main/ets/MainAbility2/pages/index.ets | 57 +++ .../entry/src/main/ets/MainAbility3/app.ets | 55 +++ .../src/main/ets/MainAbility3/pages/index.ets | 31 ++ .../entry/src/main/ets/MainAbility4/app.ets | 66 +++ .../src/main/ets/MainAbility4/pages/index.ets | 31 ++ .../entry/src/main/ets/MainAbility5/app.ets | 66 +++ .../src/main/ets/MainAbility5/pages/index.ets | 31 ++ .../entry/src/main/ets/MainAbility6/app.ets | 66 +++ .../src/main/ets/MainAbility6/pages/index.ets | 31 ++ .../src/main/ets/ServiceAbility/service.ts | 103 +++++ .../src/main/ets/ServiceAbility2/service.ts | 90 ++++ .../main/resources/base/element/string.json | 64 +++ .../src/main/resources/base/media/icon.png | Bin 0 -> 6790 bytes .../faauxiliary/signature/openharmony_sx.p7b | Bin 0 -> 3443 bytes 42 files changed, 1895 insertions(+), 685 deletions(-) delete mode 100644 ability/ability_runtime/apicover/stagesupplement/entry/src/main/ets/ExtensionAbility/ExtensionAbility.ts delete mode 100644 ability/ability_runtime/apicover/stagesupplement/entry/src/main/ets/ExtensionAbility2/ExtensionAbility2.ts delete mode 100644 ability/ability_runtime/apicover/stagesupplement/entry/src/main/ets/MainAbility2/MainAbility2.ts delete mode 100644 ability/ability_runtime/apicover/stagesupplement/entry/src/main/ets/MainAbility6/MainAbility6.ts delete mode 100644 ability/ability_runtime/apicover/stagesupplement/entry/src/main/ets/MainAbility7/MainAbility7.ts delete mode 100644 ability/ability_runtime/apicover/stagesupplement/entry/src/main/ets/MainAbility8/MainAbility8.ts create mode 100644 ability/ability_runtime/faapicover/BUILD.gn create mode 100644 ability/ability_runtime/faapicover/faapicoverhaptest/BUILD.gn create mode 100644 ability/ability_runtime/faapicover/faapicoverhaptest/Test.json create mode 100644 ability/ability_runtime/faapicover/faapicoverhaptest/entry/src/main/config.json create mode 100644 ability/ability_runtime/faapicover/faapicoverhaptest/entry/src/main/ets/MainAbility/app.ets create mode 100644 ability/ability_runtime/faapicover/faapicoverhaptest/entry/src/main/ets/MainAbility/pages/index.ets create mode 100644 ability/ability_runtime/faapicover/faapicoverhaptest/entry/src/main/ets/test/ApiCoverAbility.test.ets create mode 100644 ability/ability_runtime/faapicover/faapicoverhaptest/entry/src/main/ets/test/ListTest.ets create mode 100644 ability/ability_runtime/faapicover/faapicoverhaptest/entry/src/main/ets/test/VerificationTest.ets create mode 100644 ability/ability_runtime/faapicover/faapicoverhaptest/entry/src/main/resources/base/element/string.json create mode 100644 ability/ability_runtime/faapicover/faapicoverhaptest/entry/src/main/resources/base/media/icon.png create mode 100644 ability/ability_runtime/faapicover/faapicoverhaptest/signature/openharmony_sx.p7b create mode 100644 ability/ability_runtime/faapicover/faauxiliary/BUILD.gn create mode 100644 ability/ability_runtime/faapicover/faauxiliary/entry/src/main/config.json create mode 100644 ability/ability_runtime/faapicover/faauxiliary/entry/src/main/ets/MainAbility/app.ets create mode 100644 ability/ability_runtime/faapicover/faauxiliary/entry/src/main/ets/MainAbility/pages/index.ets create mode 100644 ability/ability_runtime/faapicover/faauxiliary/entry/src/main/ets/MainAbility2/app.ets create mode 100644 ability/ability_runtime/faapicover/faauxiliary/entry/src/main/ets/MainAbility2/pages/index.ets create mode 100644 ability/ability_runtime/faapicover/faauxiliary/entry/src/main/ets/MainAbility3/app.ets create mode 100644 ability/ability_runtime/faapicover/faauxiliary/entry/src/main/ets/MainAbility3/pages/index.ets create mode 100644 ability/ability_runtime/faapicover/faauxiliary/entry/src/main/ets/MainAbility4/app.ets create mode 100644 ability/ability_runtime/faapicover/faauxiliary/entry/src/main/ets/MainAbility4/pages/index.ets create mode 100644 ability/ability_runtime/faapicover/faauxiliary/entry/src/main/ets/MainAbility5/app.ets create mode 100644 ability/ability_runtime/faapicover/faauxiliary/entry/src/main/ets/MainAbility5/pages/index.ets create mode 100644 ability/ability_runtime/faapicover/faauxiliary/entry/src/main/ets/MainAbility6/app.ets create mode 100644 ability/ability_runtime/faapicover/faauxiliary/entry/src/main/ets/MainAbility6/pages/index.ets create mode 100644 ability/ability_runtime/faapicover/faauxiliary/entry/src/main/ets/ServiceAbility/service.ts create mode 100644 ability/ability_runtime/faapicover/faauxiliary/entry/src/main/ets/ServiceAbility2/service.ts create mode 100644 ability/ability_runtime/faapicover/faauxiliary/entry/src/main/resources/base/element/string.json create mode 100644 ability/ability_runtime/faapicover/faauxiliary/entry/src/main/resources/base/media/icon.png create mode 100644 ability/ability_runtime/faapicover/faauxiliary/signature/openharmony_sx.p7b diff --git a/ability/ability_runtime/BUILD.gn b/ability/ability_runtime/BUILD.gn index e17596b1e..b396d0522 100644 --- a/ability/ability_runtime/BUILD.gn +++ b/ability/ability_runtime/BUILD.gn @@ -34,6 +34,7 @@ group("ability_runtime") { "apicover:apicover", "context:context", "fa:fa", + "faapicover:faapicover", "featureability:featureability", "formmanager:formmanager", "killprocesswithaccountstage:killprocesswithaccountstage", diff --git a/ability/ability_runtime/apicover/apicoverhaptest/entry/src/main/ets/test/ApiCoverAbility.test.ets b/ability/ability_runtime/apicover/apicoverhaptest/entry/src/main/ets/test/ApiCoverAbility.test.ets index 42fcef466..c14a130d8 100644 --- a/ability/ability_runtime/apicover/apicoverhaptest/entry/src/main/ets/test/ApiCoverAbility.test.ets +++ b/ability/ability_runtime/apicover/apicoverhaptest/entry/src/main/ets/test/ApiCoverAbility.test.ets @@ -392,9 +392,9 @@ function checkFormInfoModule1(formInfo){ expect("This is a service widget.").assertEqual(formInfo.description) expect(FormInfo.FormType.JS).assertEqual(formInfo.type) expect(FormInfo.ColorMode.MODE_DARK).assertEqual(formInfo.colorMode) - expect(1).assertEqual(formInfo.isDefault) - expect(1).assertEqual(formInfo.updateEnabled) - expect(0).assertEqual(formInfo.formVisibleNotify) + expect(formInfo.isDefault).assertTrue() + expect(formInfo.updateEnabled).assertTrue() + expect(formInfo.formVisibleNotify).assertFalse() expect(undefined).assertEqual(formInfo.relatedBundleName) expect("ability://xxxxx").assertEqual(formInfo.formConfigAbility) expect(1).assertEqual(formInfo.updateDuration) @@ -410,9 +410,9 @@ function checkFormInfo(formInfo){ expect("This is a service widget.").assertEqual(formInfo.description) expect(FormInfo.FormType.JS).assertEqual(formInfo.type) expect(FormInfo.ColorMode.MODE_AUTO).assertEqual(formInfo.colorMode) - expect(1).assertEqual(formInfo.isDefault) - expect(1).assertEqual(formInfo.updateEnabled) - expect(0).assertEqual(formInfo.formVisibleNotify) + expect(formInfo.isDefault).assertTrue() + expect(formInfo.updateEnabled).assertTrue() + expect(formInfo.formVisibleNotify).assertFalse() expect(undefined).assertEqual(formInfo.relatedBundleName) expect("ability://xxxxx").assertEqual(formInfo.formConfigAbility) expect(1).assertEqual(formInfo.updateDuration) diff --git a/ability/ability_runtime/apicover/apicoverhaptest/entry/src/main/ets/test/VerificationTest.ets b/ability/ability_runtime/apicover/apicoverhaptest/entry/src/main/ets/test/VerificationTest.ets index 7f6ceacd8..d3a338cab 100644 --- a/ability/ability_runtime/apicover/apicoverhaptest/entry/src/main/ets/test/VerificationTest.ets +++ b/ability/ability_runtime/apicover/apicoverhaptest/entry/src/main/ets/test/VerificationTest.ets @@ -366,89 +366,6 @@ export default function verificationTest(abilityContext){ } }) - /* - * @tc.number SUB_AA_OpenHarmony_StartAbilityFlags_0100 - * @tc.name Validate the input parameter flags of startAbility. - * @tc.desc Function test - * @tc.level 3 - */ - it('SUB_AA_OpenHarmony_StartAbilityFlags_0100', 0, async function(done) { - TAG = 'SUB_AA_OpenHarmony_StartAbilityFlags_0100 ==>'; - - try { - let number1 = undefined - let number2 = 536870912 - let code1 = undefined - let code2 = undefined - let subscriber = null - let subscribeInfo = { - events: ["Stage_MainAbility7_onCreate", "Stage_MainAbility7_onDestroy"] - } - function SubscribeInfoCallback(err, data) { - console.info(TAG + "===SubscribeInfoCallback===" + JSON.stringify(data)) - if (data.event == "Stage_MainAbility7_onCreate") { - number1 = data.parameters.flags - } - if (data.event == "Stage_MainAbility7_onDestroy") { - expect(code1).assertEqual(22); - expect(code2).assertEqual(14); - expect(number1).assertEqual(number2); - commonEvent.unsubscribe(subscriber, UnSubscribeInfoCallback) - } - } - function UnSubscribeInfoCallback(err, data) { - console.info(TAG + "===UnSubscribeInfoCallback===") - done() - } - commonEvent.createSubscriber(subscribeInfo, (err, data) => { - console.info(TAG + "===CreateSubscriberCallback===") - subscriber = data - commonEvent.subscribe(subscriber, SubscribeInfoCallback) - }) - - let wantNum1 = { - bundleName: 'ohos.acts.aafwk.test.stagesupplement', - abilityName: 'MainAbility6', - flags: wantConstant.Flags.FLAG_ABILITY_CONTINUATION - } - abilityContext.startAbility(wantNum1).then((data) => { - console.info(TAG + "startAbility data = " + JSON.stringify(data)); - }).catch((err) => { - code1 = err.code - console.info(TAG + "startAbility err = " + JSON.stringify(err)); - }); - - let wantNum2 = { - bundleName: 'ohos.acts.aafwk.test.stagesupplement', - abilityName: 'MainAbility7', - flags: wantConstant.Flags.FLAG_ABILITY_MISSION_TOP - } - abilityContext.startAbility(wantNum2).then((data) => { - console.info(TAG + "startAbility data = " + JSON.stringify(data)); - }).catch((err) => { - console.info(TAG + "startAbility err = " + JSON.stringify(err)); - expect().assertFail(); - done(); - }); - - let wantNum3 = { - bundleName: 'ohos.acts.aafwk.test.stagesupplement', - abilityName: 'MainAbility8', - flags: wantConstant.Flags.FLAG_INSTALL_ON_DEMAND - } - abilityContext.startAbility(wantNum3).then((data) => { - console.info(TAG + "startAbility data = " + JSON.stringify(data)); - }).catch((err) => { - code2 = err.code - console.info(TAG + "startAbility err = " + JSON.stringify(err)); - }); - } catch (err) { - console.info(TAG + "catch err = " + JSON.stringify(err)); - expect().assertFail(); - done(); - } - }) - /* * @tc.number SUB_AA_OpenHarmony_StartAbilityLife_0100 * @tc.name Ability startup and termination will not trigger the migration lifecycle. diff --git a/ability/ability_runtime/apicover/stagesupplement/entry/src/main/ets/ExtensionAbility/ExtensionAbility.ts b/ability/ability_runtime/apicover/stagesupplement/entry/src/main/ets/ExtensionAbility/ExtensionAbility.ts deleted file mode 100644 index 5e4ffa2ea..000000000 --- a/ability/ability_runtime/apicover/stagesupplement/entry/src/main/ets/ExtensionAbility/ExtensionAbility.ts +++ /dev/null @@ -1,95 +0,0 @@ -import ServiceExtensionAbility from "@ohos.application.ServiceExtensionAbility"; -import rpc from "@ohos.rpc"; -import commonEvent from '@ohos.commonEvent'; - -class StubTest1 extends rpc.RemoteObject { - constructor(des) { - if (typeof des === 'string') { - super(des); - } - else { - return null; - } - } - queryLocalInterface(descriptor) { - return null; - } - getInterfaceDescriptor() { - return ""; - } - sendRequest(code, data, reply, options) { - return null; - } - getCallingPid() { - return 0; - } - getCallingUid() { - return 0; - } - attachLocalInterface(localInterface, descriptor) { } - onRemoteRequest(code, data, reply, options) { - console.log(printLogS1 + "onRemoteRequest"); - if (code == 1) { - console.log(printLogS1 + "onRemoteRequest code 1"); - let op1 = data.readInt(); - let op2 = data.readInt(); - console.log(printLogS1 + "onRemoteRequest op1 = " + op1 + ", op2 = " + op2); - reply.writeInt(op1 + op2); - } - else { - console.log(printLogS1 + "onRemoteRequest code = " + code); - } - return true; - } -} - -var printLogS1 = "Stage:ServiceAbility:"; -var listPushS1 = "Stage_ServiceAbility_"; -class ExtensionAbility extends ServiceExtensionAbility { - onCreate(want) { - console.log(printLogS1 + 'onCreate'); - - commonEvent.publish(listPushS1 + "onCreate", (err) => { - console.info(printLogS1 + listPushS1 + "onCreate"); - }); - } - - onDestroy() { - console.log(printLogS1 + 'onDestroy'); - - commonEvent.publish(listPushS1 + "onDestroy", (err) => { - console.info(printLogS1 + listPushS1 + "onDestroy"); - }); - } - - onRequest(want, startId) { - console.log(printLogS1 + 'onRequest'); - } - - onConnect(want) { - console.log(printLogS1 + 'onConnect'); - return new StubTest1("Test1"); - } - - onDisconnect(want) { - console.log(printLogS1 + 'onDisconnect'); - - this.context - } - - dump(param) { - console.info(printLogS1 + "dump = " + JSON.stringify(param)) - var CommonEventPublishData = { - parameters: { - dumpParam: param - } - } - commonEvent.publish(listPushS1 + "Dump", CommonEventPublishData, (err) => { - console.info(printLogS1 + listPushS1 + "Dump"); - }); - - return ["ExtensionAbility"] - } -}; - -export default ExtensionAbility \ No newline at end of file diff --git a/ability/ability_runtime/apicover/stagesupplement/entry/src/main/ets/ExtensionAbility2/ExtensionAbility2.ts b/ability/ability_runtime/apicover/stagesupplement/entry/src/main/ets/ExtensionAbility2/ExtensionAbility2.ts deleted file mode 100644 index 37c64a721..000000000 --- a/ability/ability_runtime/apicover/stagesupplement/entry/src/main/ets/ExtensionAbility2/ExtensionAbility2.ts +++ /dev/null @@ -1,79 +0,0 @@ -import ServiceExtensionAbility from "@ohos.application.ServiceExtensionAbility"; -import rpc from "@ohos.rpc"; -import commonEvent from '@ohos.commonEvent'; - -class StubTest2 extends rpc.RemoteObject { - constructor(des) { - if (typeof des === 'string') { - super(des); - } - else { - return null; - } - } - queryLocalInterface(descriptor) { - return null; - } - getInterfaceDescriptor() { - return ""; - } - sendRequest(code, data, reply, options) { - return null; - } - getCallingPid() { - return 0; - } - getCallingUid() { - return 0; - } - attachLocalInterface(localInterface, descriptor) { } - onRemoteRequest(code, data, reply, options) { - console.log(printLogS2 + "onRemoteRequest"); - if (code == 1) { - console.log(printLogS2 + "onRemoteRequest code 1"); - let op1 = data.readInt(); - let op2 = data.readInt(); - console.log(printLogS2 + "onRemoteRequest op1 = " + op1 + ", op2 = " + op2); - reply.writeInt(op1 + op2); - } - else { - console.log(printLogS2 + "onRemoteRequest code = " + code); - } - return true; - } -} - -var printLogS2 = "Stage:ServiceAbility2:"; -var listPushS2 = "Stage_ServiceAbility2_"; -class ExtensionAbility2 extends ServiceExtensionAbility { - onCreate(want) { - console.log(printLogS2 + 'onCreate'); - - commonEvent.publish(listPushS2 + "onCreate", (err) => { - console.info(printLogS2 + listPushS2 + "onCreate"); - }); - } - - onDestroy() { - console.log(printLogS2 + 'onDestroy'); - - commonEvent.publish(listPushS2 + "onDestroy", (err) => { - console.info(printLogS2 + listPushS2 + "onDestroy"); - }); - } - - onRequest(want, startId) { - console.log(printLogS2 + 'onRequest'); - } - - onConnect(want) { - console.log(printLogS2 + 'onConnect'); - return new StubTest2("Test1"); - } - - onDisconnect(want) { - console.log(printLogS2 + 'onDisconnect'); - } -}; - -export default ExtensionAbility2 \ No newline at end of file diff --git a/ability/ability_runtime/apicover/stagesupplement/entry/src/main/ets/MainAbility2/MainAbility2.ts b/ability/ability_runtime/apicover/stagesupplement/entry/src/main/ets/MainAbility2/MainAbility2.ts deleted file mode 100644 index 710de36b8..000000000 --- a/ability/ability_runtime/apicover/stagesupplement/entry/src/main/ets/MainAbility2/MainAbility2.ts +++ /dev/null @@ -1,147 +0,0 @@ -import Ability from '@ohos.application.Ability' -import commonEvent from '@ohos.commonEvent'; -import AbilityConstant from '@ohos.application.AbilityConstant'; -import distributedObject from '@ohos.data.distributedDataObject'; -import accessControl from '@ohos.abilityAccessCtrl'; -import bundle from '@ohos.bundle'; - -var BUNDLE_NAME = 'ohos.acts.aafwk.test.stagesupplement' -var PERMISSION_REJECT = -1 -var printLog2 = "Stage:MainAbility2:"; -var listPush2 = "Stage_MainAbility2_"; -class ContentStorage { - -} -var g_object = distributedObject.createDistributedObject({name:undefined}); -export default class MainAbility2 extends Ability { - contentStorage : ContentStorage - sessionId : string; - statusCallback(sessionId, networkid, status) { - // @ts-ignore - console.info(printLog2 + `continuation object status change, sessionId: ${sessionId}, status: ${status}, g_object.name: ${g_object.name}`) - } - onCreate(want, launchParam) { - console.info(printLog2 + "onCreate = " + launchParam.launchReason) - - if (launchParam.launchReason == AbilityConstant.LaunchReason.CONTINUATION) { - let input = want.parameters.input // get user data from want params - // @ts-ignore - AppStorage.SetOrCreate('ContinueInput', input) - console.info(printLog2 + `onCreate for continuation sessionId: ${this.sessionId}`) - - this.contentStorage = new ContentStorage(); - this.context.restoreWindowStage(this.contentStorage); - } - } - - onDestroy() { - console.info(printLog2 + "onDestroy") - - commonEvent.publish(listPush2 + "onDestroy", (err) => { - console.info(printLog2 + listPush2 + "onDestroy"); - }); - } - - onWindowStageCreate(windowStage) { - // Main window is created, set main page for this ability - console.info(printLog2 + "onWindowStageCreate") - -// this.requestPermissions() - windowStage.setUIContent(this.context, "pages/index", null) - } - - onWindowStageDestroy() { - // Main window is destroyed, release UI related resources - console.info(printLog2 + "onWindowStageDestroy") - } - - onForeground() { - // Ability has brought to foreground - console.info(printLog2 + "onForeground") - } - - onBackground() { - // Ability has back to background - console.info(printLog2 + "onBackground") - } - - onContinue(wantParam : {[key: string]: any}) { - console.info(printLog2 + "onContinue") - // set user input data into want params - // @ts-ignore - wantParam["input"] = AppStorage.Get('ContinueInput'); - console.info(printLog2 + `onContinue input = ${wantParam["input"]}`); - return AbilityConstant.OnContinueResult.AGREE - } - - // @ts-ignore - onNewWant(want, launchParam) { - console.info(printLog2 + "onNewWant = " + launchParam.launchReason) - - if (launchParam.launchReason == AbilityConstant.LaunchReason.CONTINUATION) { - // get distributed data object session id from want params - this.sessionId = want.parameters.session - // @ts-ignore - g_object.name = undefined; - // @ts-ignore - g_object.on("status", this.statusCallback); - // set session id, so it will sync data from remote device - g_object.setSessionId(this.sessionId); - - this.contentStorage = new ContentStorage(); - this.context.restoreWindowStage(this.contentStorage); - } - } - - onWindowStageRestore(windowStage) { - console.info(printLog2 + "onWindowStageCreate") -// this.requestPermissions() - - commonEvent.publish(listPush2 + "onWindowStageRestore", (err) => { - console.info(printLog2 + listPush2 + "onWindowStageRestore"); - }); - - setTimeout(()=>{ - this.context.terminateSelf().then((data) => { - console.info(printLog2 + "terminateSelf data = " + JSON.stringify(data)); - }).catch((err) => { - console.info(printLog2 + "terminateSelf err = " + JSON.stringify(err)); - }); - }, 3000) - } - - requestPermissions = async () => { - let permissions: Array = [ - "ohos.permission.DISTRIBUTED_DATASYNC" - ]; - let needGrantPermission = false - let accessManger = accessControl.createAtManager() - console.info(printLog2 + "app permission get bundle info") - let bundleInfo = await bundle.getApplicationInfo(BUNDLE_NAME, 0, 100) - console.info(printLog2 + `app permission query permission ${bundleInfo.accessTokenId.toString()}`) - for (const permission of permissions) { - console.info(printLog2 + `app permission query grant status ${permission}`) - try { - let grantStatus = await accessManger.verifyAccessToken(bundleInfo.accessTokenId, permission) - if (grantStatus === PERMISSION_REJECT) { - needGrantPermission = true - break; - } - } catch (err) { - console.info(printLog2 + `app permission query grant status error ${permission} ${JSON.stringify(err)}`) - needGrantPermission = true - break; - } - } - if (needGrantPermission) { - console.info(printLog2 + "app permission needGrantPermission") - try { - await this.context.requestPermissionsFromUser(permissions) - } catch (err) { - console.info(printLog2 + `app permission ${JSON.stringify(err)}`) - } - } else { - console.info(printLog2 + "app permission already granted") - } - } -}; diff --git a/ability/ability_runtime/apicover/stagesupplement/entry/src/main/ets/MainAbility6/MainAbility6.ts b/ability/ability_runtime/apicover/stagesupplement/entry/src/main/ets/MainAbility6/MainAbility6.ts deleted file mode 100644 index 6fb8d202e..000000000 --- a/ability/ability_runtime/apicover/stagesupplement/entry/src/main/ets/MainAbility6/MainAbility6.ts +++ /dev/null @@ -1,57 +0,0 @@ -import Ability from '@ohos.application.Ability' -import commonEvent from '@ohos.commonEvent'; - -var printLog6 = "Stage:MainAbility6:"; -var listPush6 = "Stage_MainAbility6_"; -export default class MainAbility6 extends Ability { - onCreate(want, launchParam) { - console.info(printLog6 + "onCreate = " + want.flags) - - var flags = { - parameters: { - flags: want.flags - } - } - commonEvent.publish(listPush6 + "onCreate", flags, (err) => { - console.info(printLog6 + listPush6 + "onCreate"); - }); - - setTimeout(()=>{ - this.context.terminateSelf().then((data) => { - console.info(printLog6 + "terminateSelf data = " + JSON.stringify(data)); - }).catch((err) => { - console.info(printLog6 + "terminateSelf err = " + JSON.stringify(err)); - }); - }, 3000) - } - - onDestroy() { - console.info(printLog6 + "onDestroy") - - commonEvent.publish(listPush6 + "onDestroy", (err) => { - console.info(printLog6 + listPush6 + "onDestroy"); - }); - } - - onWindowStageCreate(windowStage) { - // Main window is created, set main page for this ability - console.info(printLog6 + "onWindowStageCreate") - - windowStage.setUIContent(this.context, "pages/index", null) - } - - onWindowStageDestroy() { - // Main window is destroyed, release UI related resources - console.info(printLog6 + "onWindowStageDestroy") - } - - onForeground() { - // Ability has brought to foreground - console.info(printLog6 + "onForeground") - } - - onBackground() { - // Ability has back to background - console.info(printLog6 + "onBackground") - } -}; diff --git a/ability/ability_runtime/apicover/stagesupplement/entry/src/main/ets/MainAbility7/MainAbility7.ts b/ability/ability_runtime/apicover/stagesupplement/entry/src/main/ets/MainAbility7/MainAbility7.ts deleted file mode 100644 index e796a29e0..000000000 --- a/ability/ability_runtime/apicover/stagesupplement/entry/src/main/ets/MainAbility7/MainAbility7.ts +++ /dev/null @@ -1,57 +0,0 @@ -import Ability from '@ohos.application.Ability' -import commonEvent from '@ohos.commonEvent'; - -var printLog7 = "Stage:MainAbility7:"; -var listPush7 = "Stage_MainAbility7_"; -export default class MainAbility7 extends Ability { - onCreate(want, launchParam) { - console.info(printLog7 + "onCreate = " + want.flags) - - var flags = { - parameters: { - flags: want.flags - } - } - commonEvent.publish(listPush7 + "onCreate", flags, (err) => { - console.info(printLog7 + listPush7 + "onCreate"); - }); - - setTimeout(()=>{ - this.context.terminateSelf().then((data) => { - console.info(printLog7 + "terminateSelf data = " + JSON.stringify(data)); - }).catch((err) => { - console.info(printLog7 + "terminateSelf err = " + JSON.stringify(err)); - }); - }, 3000) - } - - onDestroy() { - console.info(printLog7 + "onDestroy") - - commonEvent.publish(listPush7 + "onDestroy", (err) => { - console.info(printLog7 + listPush7 + "onDestroy"); - }); - } - - onWindowStageCreate(windowStage) { - // Main window is created, set main page for this ability - console.info(printLog7 + "onWindowStageCreate") - - windowStage.setUIContent(this.context, "pages/index", null) - } - - onWindowStageDestroy() { - // Main window is destroyed, release UI related resources - console.info(printLog7 + "onWindowStageDestroy") - } - - onForeground() { - // Ability has brought to foreground - console.info(printLog7 + "onForeground") - } - - onBackground() { - // Ability has back to background - console.info(printLog7 + "onBackground") - } -}; diff --git a/ability/ability_runtime/apicover/stagesupplement/entry/src/main/ets/MainAbility8/MainAbility8.ts b/ability/ability_runtime/apicover/stagesupplement/entry/src/main/ets/MainAbility8/MainAbility8.ts deleted file mode 100644 index 954ab9348..000000000 --- a/ability/ability_runtime/apicover/stagesupplement/entry/src/main/ets/MainAbility8/MainAbility8.ts +++ /dev/null @@ -1,57 +0,0 @@ -import Ability from '@ohos.application.Ability' -import commonEvent from '@ohos.commonEvent'; - -var printLog8 = "Stage:MainAbility8:"; -var listPush8 = "Stage_MainAbility8_"; -export default class MainAbility8 extends Ability { - onCreate(want, launchParam) { - console.info(printLog8 + "onCreate = " + want.flags) - - var flags = { - parameters: { - flags: want.flags - } - } - commonEvent.publish(listPush8 + "onCreate", flags, (err) => { - console.info(printLog8 + listPush8 + "onCreate"); - }); - - setTimeout(()=>{ - this.context.terminateSelf().then((data) => { - console.info(printLog8 + "terminateSelf data = " + JSON.stringify(data)); - }).catch((err) => { - console.info(printLog8 + "terminateSelf err = " + JSON.stringify(err)); - }); - }, 3000) - } - - onDestroy() { - console.info(printLog8 + "onDestroy") - - commonEvent.publish(listPush8 + "onDestroy", (err) => { - console.info(printLog8 + listPush8 + "onDestroy"); - }); - } - - onWindowStageCreate(windowStage) { - // Main window is created, set main page for this ability - console.info(printLog8 + "onWindowStageCreate") - - windowStage.setUIContent(this.context, "pages/index", null) - } - - onWindowStageDestroy() { - // Main window is destroyed, release UI related resources - console.info(printLog8 + "onWindowStageDestroy") - } - - onForeground() { - // Ability has brought to foreground - console.info(printLog8 + "onForeground") - } - - onBackground() { - // Ability has back to background - console.info(printLog8 + "onBackground") - } -}; diff --git a/ability/ability_runtime/apicover/stagesupplement/entry/src/main/module.json b/ability/ability_runtime/apicover/stagesupplement/entry/src/main/module.json index ec4a14a8a..08e99a06a 100644 --- a/ability/ability_runtime/apicover/stagesupplement/entry/src/main/module.json +++ b/ability/ability_runtime/apicover/stagesupplement/entry/src/main/module.json @@ -34,18 +34,6 @@ } ] }, - { - "name": "MainAbility2", - "srcEntrance": "./ets/MainAbility2/MainAbility2.ts", - "description": "$string:MainAbility2_desc", - "icon": "$media:icon", - "label": "$string:MainAbility2_label", - "startWindowIcon": "$media:icon", - "startWindowBackground": "$color:white", - "visible": true, - "launchType": "singleton", - "continuable": true - }, { "name": "MainAbility3", "srcEntrance": "./ets/MainAbility3/MainAbility3.ts", @@ -79,39 +67,6 @@ "visible": true, "launchType": "singleton" }, - { - "name": "MainAbility6", - "srcEntrance": "./ets/MainAbility6/MainAbility6.ts", - "description": "$string:MainAbility6_desc", - "icon": "$media:icon", - "label": "$string:MainAbility6_label", - "startWindowIcon": "$media:icon", - "startWindowBackground": "$color:white", - "visible": true, - "launchType": "singleton" - }, - { - "name": "MainAbility7", - "srcEntrance": "./ets/MainAbility7/MainAbility7.ts", - "description": "$string:MainAbility7_desc", - "icon": "$media:icon", - "label": "$string:MainAbility7_label", - "startWindowIcon": "$media:icon", - "startWindowBackground": "$color:white", - "visible": true, - "launchType": "singleton" - }, - { - "name": "MainAbility8", - "srcEntrance": "./ets/MainAbility8/MainAbility8.ts", - "description": "$string:MainAbility8_desc", - "icon": "$media:icon", - "label": "$string:MainAbility8_label", - "startWindowIcon": "$media:icon", - "startWindowBackground": "$color:white", - "visible": true, - "launchType": "singleton" - }, { "name": "MainAbility9", "srcEntrance": "./ets/MainAbility9/MainAbility9.ts", @@ -135,25 +90,6 @@ "launchType": "singleton" } ], - "extensionAbilities": [ - { - "srcEntrance": "./ets/ExtensionAbility/ExtensionAbility.ts", - "name": "ExtensionAbility", - "icon": "$media:icon", - "description": "$string:MainAbility_desc", - "type": "service", - "visible": true - }, - { - "srcEntrance": "./ets/ExtensionAbility2/ExtensionAbility2.ts", - "name": "ExtensionAbility2", - "icon": "$media:icon", - "description": "$string:MainAbility_desc", - "type": "fileShare", - "uri": "fileshare://com.samples.filesharetest.FileShare", - "visible": true - } - ], "requestPermissions": [ { "name": "ohos.permission.DISTRIBUTED_DATASYNC" diff --git a/ability/ability_runtime/apicover/stagesupplement/entry/src/main/resources/base/element/string.json b/ability/ability_runtime/apicover/stagesupplement/entry/src/main/resources/base/element/string.json index d7438da3d..bd41aeaab 100644 --- a/ability/ability_runtime/apicover/stagesupplement/entry/src/main/resources/base/element/string.json +++ b/ability/ability_runtime/apicover/stagesupplement/entry/src/main/resources/base/element/string.json @@ -12,14 +12,6 @@ "name": "MainAbility_label", "value": "StageSupplement" }, - { - "name": "MainAbility2_desc", - "value": "description" - }, - { - "name": "MainAbility2_label", - "value": "label" - }, { "name": "MainAbility3_desc", "value": "description" @@ -44,30 +36,6 @@ "name": "MainAbility5_label", "value": "label" }, - { - "name": "MainAbility6_desc", - "value": "description" - }, - { - "name": "MainAbility6_label", - "value": "label" - }, - { - "name": "MainAbility7_desc", - "value": "description" - }, - { - "name": "MainAbility7_label", - "value": "label" - }, - { - "name": "MainAbility8_desc", - "value": "description" - }, - { - "name": "MainAbility8_label", - "value": "label" - }, { "name": "MainAbility9_desc", "value": "description" @@ -83,14 +51,6 @@ { "name": "MainAbility10_label", "value": "label" - }, - { - "name": "MainAbility11_desc", - "value": "description" - }, - { - "name": "MainAbility11_label", - "value": "label" } ] } \ No newline at end of file diff --git a/ability/ability_runtime/faapicover/BUILD.gn b/ability/ability_runtime/faapicover/BUILD.gn new file mode 100644 index 000000000..4d9a73c22 --- /dev/null +++ b/ability/ability_runtime/faapicover/BUILD.gn @@ -0,0 +1,24 @@ +# 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("//test/xts/tools/build/suite.gni") + +group("faapicover") { + testonly = true + if (is_standard_system) { + deps = [ + "faapicoverhaptest:FaApiCoverHapTest", + "faauxiliary:FaAuxiliary", + ] + } +} diff --git a/ability/ability_runtime/faapicover/faapicoverhaptest/BUILD.gn b/ability/ability_runtime/faapicover/faapicoverhaptest/BUILD.gn new file mode 100644 index 000000000..719ea475d --- /dev/null +++ b/ability/ability_runtime/faapicover/faapicoverhaptest/BUILD.gn @@ -0,0 +1,32 @@ +# 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("//test/xts/tools/build/suite.gni") + +ohos_js_hap_suite("FaApiCoverHapTest") { + hap_profile = "./entry/src/main/config.json" + deps = [ + ":faapicoverhaptest_ets_assets", + ":faapicoverhaptest_ets_resources", + ] + ets2abc = true + certificate_profile = "./signature/openharmony_sx.p7b" + hap_name = "FaApiCoverHapTest" +} +ohos_js_assets("faapicoverhaptest_ets_assets") { + source_dir = "./entry/src/main/ets/MainAbility" +} +ohos_resources("faapicoverhaptest_ets_resources") { + sources = [ "./entry/src/main/resources" ] + hap_profile = "./entry/src/main/config.json" +} diff --git a/ability/ability_runtime/faapicover/faapicoverhaptest/Test.json b/ability/ability_runtime/faapicover/faapicoverhaptest/Test.json new file mode 100644 index 000000000..6d59a08f7 --- /dev/null +++ b/ability/ability_runtime/faapicover/faapicoverhaptest/Test.json @@ -0,0 +1,19 @@ +{ + "description": "Configuration for hjunit demo Tests", + "driver": { + "type": "JSUnitTest", + "test-timeout": "180000", + "package": "com.example.faapicoverhaptest", + "shell-timeout": "600000" + }, + "kits": [ + { + "test-file-name": [ + "FaApiCoverHapTest.hap", + "FaAuxiliary.hap" + ], + "type": "AppInstallKit", + "cleanup-apps": true + } + ] +} diff --git a/ability/ability_runtime/faapicover/faapicoverhaptest/entry/src/main/config.json b/ability/ability_runtime/faapicover/faapicoverhaptest/entry/src/main/config.json new file mode 100644 index 000000000..2e7621c55 --- /dev/null +++ b/ability/ability_runtime/faapicover/faapicoverhaptest/entry/src/main/config.json @@ -0,0 +1,72 @@ +{ + "app": { + "vendor": "example", + "bundleName": "com.example.faapicoverhaptest", + "version": { + "code": 1000000, + "name": "1.0.0" + }, + "apiVersion": { + "compatible": 9, + "target": 9 + } + }, + "deviceConfig": {}, + "module": { + "mainAbility": ".MainAbility", + "deviceType": [ + "default", + "tablet" + ], + "abilities": [ + { + "skills": [ + { + "entities": [ + "entity.system.home" + ], + "actions": [ + "action.system.home" + ] + } + ], + "orientation": "unspecified", + "visible": true, + "srcPath": "MainAbility", + "name": "com.example.faapicoverhaptest.MainAbility", + "srcLanguage": "ets", + "icon": "$media:icon", + "description": "$string:MainAbility_desc", + "formsEnabled": false, + "label": "$string:MainAbility_label", + "type": "page", + "launchType": "singleton" + } + ], + "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/faapicover/faapicoverhaptest/entry/src/main/ets/MainAbility/app.ets b/ability/ability_runtime/faapicover/faapicoverhaptest/entry/src/main/ets/MainAbility/app.ets new file mode 100644 index 000000000..6f5666a4a --- /dev/null +++ b/ability/ability_runtime/faapicover/faapicoverhaptest/entry/src/main/ets/MainAbility/app.ets @@ -0,0 +1,22 @@ +/* + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +export default { + onCreate() { + console.info('Application onCreate') + }, + onDestroy() { + console.info('Application onDestroy') + }, +} \ No newline at end of file diff --git a/ability/ability_runtime/faapicover/faapicoverhaptest/entry/src/main/ets/MainAbility/pages/index.ets b/ability/ability_runtime/faapicover/faapicoverhaptest/entry/src/main/ets/MainAbility/pages/index.ets new file mode 100644 index 000000000..d2ea267cf --- /dev/null +++ b/ability/ability_runtime/faapicover/faapicoverhaptest/entry/src/main/ets/MainAbility/pages/index.ets @@ -0,0 +1,52 @@ +/* + * 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 file from '@system.file'; +import {Core, ExpectExtend, InstrumentLog, ReportExtend} from "deccjsunit/index" +import list from '../../test/ListTest' + +@Entry +@Component +struct Index { + @State message: string = 'Hello World FA MainAbility' + + aboutToAppear() { + console.info("start run testcase!!!!") + const core = Core.getInstance(); + const expectExtend = new ExpectExtend({ + 'id': 'extend' + }); + core.addService('expect', expectExtend); + const reportExtend = new ReportExtend(file); + core.addService('report', reportExtend); + core.init(); + core.subscribeEvent('task', reportExtend); + const configService = core.getDefaultService('config'); + configService.setConfig(this) + list(); + core.execute(); + } + + 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/faapicover/faapicoverhaptest/entry/src/main/ets/test/ApiCoverAbility.test.ets b/ability/ability_runtime/faapicover/faapicoverhaptest/entry/src/main/ets/test/ApiCoverAbility.test.ets new file mode 100644 index 000000000..fdcec4206 --- /dev/null +++ b/ability/ability_runtime/faapicover/faapicoverhaptest/entry/src/main/ets/test/ApiCoverAbility.test.ets @@ -0,0 +1,79 @@ +/* + * 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 "deccjsunit/index" + +import FormInfo from '@ohos.application.formInfo'; +import formError from '@ohos.application.formError'; +export default function ApiCoverTest() { + describe('ApiCoverTestTest', function () { + + /* + * @tc.number SUB_AA_Form_Provider_Test_FormErr_0100 + * @tc.name Get all FormError types. + * @tc.desc Function test + * @tc.level 3 + */ + it('SUB_AA_Form_Provider_Test_FormErr_0100', 0, async function (done) { + console.info("SUB_AA_Form_Provider_Test_FormErr_0100"); + expect(7).assertEqual(formError.FormError.ERR_ADD_INVALID_PARAM) + expect(10).assertEqual(formError.FormError.ERR_BIND_PROVIDER_FAILED) + expect(8).assertEqual(formError.FormError.ERR_CFG_NOT_MATCH_ID) + expect(1).assertEqual(formError.FormError.ERR_COMMON) + expect(31).assertEqual(formError.FormError.ERR_FORM_DUPLICATE_ADDED) + expect(20).assertEqual(formError.FormError.ERR_FORM_FA_NOT_INSTALLED) + expect(18).assertEqual(formError.FormError.ERR_FORM_NO_SUCH_ABILITY) + expect(19).assertEqual(formError.FormError.ERR_FORM_NO_SUCH_DIMENSION) + expect(17).assertEqual(formError.FormError.ERR_FORM_NO_SUCH_MODULE) + expect(5).assertEqual(formError.FormError.ERR_GET_BUNDLE_FAILED) + expect(4).assertEqual(formError.FormError.ERR_GET_INFO_FAILED) + expect(6).assertEqual(formError.FormError.ERR_GET_LAYOUT_FAILED) + expect(36).assertEqual(formError.FormError.ERR_IN_RECOVERY) + expect(15).assertEqual(formError.FormError.ERR_MAX_FORMS_PER_CLIENT) + expect(12).assertEqual(formError.FormError.ERR_MAX_INSTANCES_PER_FORM) + expect(11).assertEqual(formError.FormError.ERR_MAX_SYSTEM_FORMS) + expect(16).assertEqual(formError.FormError.ERR_MAX_SYSTEM_TEMP_FORMS) + expect(9).assertEqual(formError.FormError.ERR_NOT_EXIST_ID) + expect(13).assertEqual(formError.FormError.ERR_OPERATION_FORM_NOT_SELF) + expect(2).assertEqual(formError.FormError.ERR_PERMISSION_DENY) + expect(14).assertEqual(formError.FormError.ERR_PROVIDER_DEL_FAIL) + expect(30).assertEqual(formError.FormError.ERR_SYSTEM_RESPONSES_FAILED) + done() + }) + + /* + * @tc.number SUB_AA_Form_Provider_Test_FormInfo_0100 + * @tc.name Get all FormInfo types + * @tc.desc Function test + * @tc.level 3 + */ + it('SUB_AA_Form_Provider_Test_FormInfo_0100', 0, async function (done) { + console.info("SUB_AA_Form_Provider_Test_FormInfo_0100"); + expect("ohos.extra.param.key.form_dimension").assertEqual(FormInfo.FormParam.DIMENSION_KEY) + expect("ohos.extra.param.key.form_name").assertEqual(FormInfo.FormParam.NAME_KEY) + expect("ohos.extra.param.key.module_name").assertEqual(FormInfo.FormParam.MODULE_NAME_KEY) + expect("ohos.extra.param.key.form_width").assertEqual(FormInfo.FormParam.WIDTH_KEY) + expect("ohos.extra.param.key.form_height").assertEqual(FormInfo.FormParam.HEIGHT_KEY) + expect("ohos.extra.param.key.form_temporary").assertEqual(FormInfo.FormParam.TEMPORARY_KEY) + expect(1).assertEqual(FormInfo.FormType.JS) + expect(-1).assertEqual(FormInfo.ColorMode.MODE_AUTO) + expect(0).assertEqual(FormInfo.ColorMode.MODE_DARK) + expect(1).assertEqual(FormInfo.ColorMode.MODE_LIGHT) + expect(-1).assertEqual(FormInfo.FormState.UNKNOWN) + expect(0).assertEqual(FormInfo.FormState.DEFAULT) + expect(1).assertEqual(FormInfo.FormState.READY) + done(); + }); + }) +} \ No newline at end of file diff --git a/ability/ability_runtime/faapicover/faapicoverhaptest/entry/src/main/ets/test/ListTest.ets b/ability/ability_runtime/faapicover/faapicoverhaptest/entry/src/main/ets/test/ListTest.ets new file mode 100644 index 000000000..ac5a8244d --- /dev/null +++ b/ability/ability_runtime/faapicover/faapicoverhaptest/entry/src/main/ets/test/ListTest.ets @@ -0,0 +1,22 @@ +/* + * 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 apiCoverAbility from './ApiCoverAbility.test' +import verificationTest from './VerificationTest' + +export default function List() { + apiCoverAbility() + verificationTest() +} \ No newline at end of file diff --git a/ability/ability_runtime/faapicover/faapicoverhaptest/entry/src/main/ets/test/VerificationTest.ets b/ability/ability_runtime/faapicover/faapicoverhaptest/entry/src/main/ets/test/VerificationTest.ets new file mode 100644 index 000000000..36d8e6623 --- /dev/null +++ b/ability/ability_runtime/faapicover/faapicoverhaptest/entry/src/main/ets/test/VerificationTest.ets @@ -0,0 +1,423 @@ +/* + * 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 "deccjsunit/index" + +import ability_featureAbility from '@ohos.ability.featureAbility'; +import commonEvent from '@ohos.commonEvent'; +import appManager from "@ohos.application.appManager"; +import wantConstant from '@ohos.ability.wantConstant'; +import rpc from "@ohos.rpc"; + +var TAG +export default function verificationTest(){ + + describe('VerificationTestTest', function() { + /* + * @tc.number SUB_AA_OpenHarmony_Test_HasWindowFocus_0100 + * @tc.name Start ability to judge whether there is window focus. + * @tc.desc Function test + * @tc.level 3 + */ + it('SUB_AA_OpenHarmony_Test_HasWindowFocus_0100', 0, async function(done) { + TAG = 'SUB_AA_OpenHarmony_Test_HasWindowFocus_0100 ==>'; + + try { + let flags = false + let subscriber = null + let subscribeInfo = { + events: ["Fa_Auxiliary_MainAbility_HasWindowFocus", "Fa_Auxiliary_MainAbility_onDestroy"] + } + function SubscribeInfoCallback(err, data) { + console.info(TAG + "===SubscribeInfoCallback===" + JSON.stringify(data)) + if (data.event == "Fa_Auxiliary_MainAbility_HasWindowFocus") { + flags = data.parameters.hasWindowFocus + } + if (data.event == "Fa_Auxiliary_MainAbility_onDestroy") { + expect(flags).assertTrue(); + commonEvent.unsubscribe(subscriber, UnSubscribeInfoCallback) + } + } + function UnSubscribeInfoCallback(err, data) { + console.info(TAG + "===UnSubscribeInfoCallback===") + done() + } + commonEvent.createSubscriber(subscribeInfo, (err, data) => { + console.info(TAG + "===CreateSubscriberCallback===") + subscriber = data + commonEvent.subscribe(subscriber, SubscribeInfoCallback) + }) + + let wantNum = { + want: { + bundleName: 'ohos.acts.aafwk.test.faauxiliary', + abilityName: 'ohos.acts.aafwk.test.faauxiliary.MainAbility' + } + } + ability_featureAbility.startAbility(wantNum).then((data) => { + console.info(TAG + "startAbility data = " + JSON.stringify(data)); + }).catch((err) => { + console.info(TAG + "startAbility err = " + JSON.stringify(err)); + expect().assertFail(); + done(); + }); + } catch (err) { + console.info(TAG + "catch err = " + JSON.stringify(err)); + expect().assertFail(); + done(); + } + }) + + /* + * @tc.number SUB_AA_OpenHarmony_Test_AppManagerTest_0100 + * @tc.name Whether the user is conducting stability test verification. + * @tc.desc Function test + * @tc.level 3 + */ + it('SUB_AA_OpenHarmony_Test_AppManagerTest_0100', 0, async function(done) { + TAG = 'SUB_AA_OpenHarmony_Test_AppManagerTest_0100 ==>'; + try { + appManager.isRunningInStabilityTest((err, data) => { + console.info(TAG + "isRunningInStabilityTest err = " + JSON.stringify(err)); + console.info(TAG + "isRunningInStabilityTest data = " + data); + + expect(data).assertFalse(); + done(); + }) + } catch (err) { + console.info(TAG + "catch err = " + JSON.stringify(err)); + expect().assertFail(); + done(); + } + }) + + /* + * @tc.number SUB_AA_OpenHarmony_Test_StartAbilityFlags_0100 + * @tc.name Validate the input parameter flags of startAbility. + * @tc.desc Function test + * @tc.level 3 + */ + it('SUB_AA_OpenHarmony_Test_StartAbilityFlags_0100', 0, async function(done) { + TAG = 'SUB_AA_OpenHarmony_Test_StartAbilityFlags_0100 ==>'; + + try { + let list1 = [] + let list2 = ["Fa_Auxiliary_MainAbility4_onDestroy", "Fa_Auxiliary_MainAbility5_onDestroy"] + let number1 = undefined + let number2 = undefined + let number3 = undefined + let code1 = 536870912 + let code2 = 2048 + let subscriber = null + let subscribeInfo = { + events: ["Fa_Auxiliary_MainAbility4_onCreate", "Fa_Auxiliary_MainAbility4_onDestroy", + "Fa_Auxiliary_MainAbility5_onCreate", "Fa_Auxiliary_MainAbility5_onDestroy"] + } + function SubscribeInfoCallback(err, data) { + console.info(TAG + "===SubscribeInfoCallback===" + JSON.stringify(data)) + if (data.event == "Fa_Auxiliary_MainAbility4_onCreate") { + number1 = data.parameters.flags + } + if (data.event == "Fa_Auxiliary_MainAbility5_onCreate") { + number2 = data.parameters.flags + } + if (data.event == "Fa_Auxiliary_MainAbility4_onDestroy") { + list1[0] = "Fa_Auxiliary_MainAbility4_onDestroy" + } + if (data.event == "Fa_Auxiliary_MainAbility5_onDestroy") { + list1[1] = "Fa_Auxiliary_MainAbility5_onDestroy" + } + if (JSON.stringify(list1) == JSON.stringify(list2)) { + expect(number3).assertEqual(1); + expect(number1).assertEqual(code1); + expect(number2).assertEqual(code2); + commonEvent.unsubscribe(subscriber, UnSubscribeInfoCallback) + } + } + function UnSubscribeInfoCallback(err, data) { + console.info(TAG + "===UnSubscribeInfoCallback===") + done() + } + commonEvent.createSubscriber(subscribeInfo, (err, data) => { + console.info(TAG + "===CreateSubscriberCallback===") + subscriber = data + commonEvent.subscribe(subscriber, SubscribeInfoCallback) + }) + + let wantNum1 = { + want: { + bundleName: 'ohos.acts.aafwk.test.faauxiliary', + abilityName: 'ohos.acts.aafwk.test.faauxiliary.MainAbility3', + flags: wantConstant.Flags.FLAG_ABILITY_CONTINUATION + } + } + ability_featureAbility.startAbility(wantNum1).then((data) => { + console.info(TAG + "startAbility data = " + JSON.stringify(data)); + }).catch((err) => { + number3 = err.code + console.info(TAG + "startAbility err = " + JSON.stringify(err)); + }); + + let wantNum2 = { + want: { + bundleName: 'ohos.acts.aafwk.test.faauxiliary', + abilityName: 'ohos.acts.aafwk.test.faauxiliary.MainAbility4', + flags: wantConstant.Flags.FLAG_ABILITY_MISSION_TOP + } + } + ability_featureAbility.startAbility(wantNum2).then((data) => { + console.info(TAG + "startAbility data = " + JSON.stringify(data)); + }).catch((err) => { + console.info(TAG + "startAbility err = " + JSON.stringify(err)); + expect().assertFail(); + done(); + }); + + let wantNum3 = { + want: { + bundleName: 'ohos.acts.aafwk.test.faauxiliary', + abilityName: 'ohos.acts.aafwk.test.faauxiliary.MainAbility5', + flags: wantConstant.Flags.FLAG_INSTALL_ON_DEMAND + } + } + ability_featureAbility.startAbility(wantNum3).then((data) => { + console.info(TAG + "startAbility data = " + JSON.stringify(data)); + }).catch((err) => { + console.info(TAG + "startAbility err = " + JSON.stringify(err)); + expect().assertFail(); + done(); + }); + } catch (err) { + console.info(TAG + "catch err = " + JSON.stringify(err)); + expect().assertFail(); + done(); + } + }) + + /* + * @tc.number SUB_AA_OpenHarmony_Test_ServiceAbility_0100 + * @tc.name Start and stop serviceability. + * @tc.desc Function test + * @tc.level 3 + */ + it('SUB_AA_OpenHarmony_Test_ServiceAbility_0100', 0, async function(done) { + TAG = 'SUB_AA_OpenHarmony_Test_ServiceAbility_0100 ==>'; + + try { + let subscriber = null + let subscribeInfo = { + events: ["Fa_Auxiliary_ServiceAbility_onCommand"] + } + function SubscribeInfoCallback(err, data) { + console.info(TAG + "===SubscribeInfoCallback===" + JSON.stringify(data)) + if (data.event == "Fa_Auxiliary_ServiceAbility_onCommand") { + commonEvent.unsubscribe(subscriber, UnSubscribeInfoCallback); + } + } + function UnSubscribeInfoCallback(err, data) { + console.info(TAG + "===UnSubscribeInfoCallback===") + done() + } + commonEvent.createSubscriber(subscribeInfo, (err, data) => { + console.info(TAG + "===CreateSubscriberCallback===") + subscriber = data + commonEvent.subscribe(subscriber, SubscribeInfoCallback) + }) + + let wantNum = { + want: { + bundleName: 'ohos.acts.aafwk.test.faauxiliary', + abilityName: 'ohos.acts.aafwk.test.faauxiliary.ServiceAbility' + } + } + ability_featureAbility.startAbility(wantNum).then((data) => { + console.info(TAG + "startAbility data = " + JSON.stringify(data)); + }).catch((err) => { + console.info(TAG + "startAbility err = " + JSON.stringify(err)); + expect().assertFail(); + done(); + }); + } catch (err) { + console.info(TAG + "catch err = " + JSON.stringify(err)); + expect().assertFail(); + done(); + } + }) + + /* + * @tc.number SUB_AA_OpenHarmony_Test_ServiceAbility_0200 + * @tc.name Bind and unbind serviceability. + * @tc.desc Function test + * @tc.level 3 + */ + it('SUB_AA_OpenHarmony_Test_ServiceAbility_0200', 0, async function(done) { + TAG = 'SUB_AA_OpenHarmony_Test_ServiceAbility_0200 ==>'; + + try { + let liseList = [] + let liseListCheck = ["onConnect","onDisconnect"] + let flag1 = false + let flag2 = false + let flag3 = false + let subscriber = null + let subscribeInfo = { + events: ["Fa_Auxiliary_ServiceAbility2_onConnect", "Fa_Auxiliary_ServiceAbility2_onDisconnect"] + } + function SubscribeInfoCallback(err, data) { + console.info(TAG + "===SubscribeInfoCallback===" + JSON.stringify(data)) + if (data.event == "Fa_Auxiliary_ServiceAbility2_onConnect") { + liseList.push("onConnect") + ability_featureAbility.disconnectAbility(num).then((data) => { + console.info(TAG + "disconnectAbility data = " + JSON.stringify(data)); + }).catch((err) => { + console.info(TAG + "disconnectAbility err = " + JSON.stringify(err)); + expect().assertFail(); + done(); + }); + } + if (data.event == "Fa_Auxiliary_ServiceAbility2_onDisconnect") { + liseList.push("onDisconnect") + + setTimeout(()=>{ + expect(JSON.stringify(liseList)).assertEqual(JSON.stringify(liseListCheck)); + expect(flag1).assertTrue(); + expect(flag2).assertTrue(); + expect(flag3).assertFalse(); + commonEvent.unsubscribe(subscriber, UnSubscribeInfoCallback); + }, 1000) + } + } + function UnSubscribeInfoCallback(err, data) { + console.info(TAG + "===UnSubscribeInfoCallback===") + done() + } + commonEvent.createSubscriber(subscribeInfo, (err, data) => { + console.info(TAG + "===CreateSubscriberCallback===") + subscriber = data + commonEvent.subscribe(subscriber, SubscribeInfoCallback) + }) + + let options = { + onConnect: function (elementName, proxy) { + flag1 = true + console.info(TAG + 'Ext onConnect SUCCESS, elementName = ' + JSON.stringify(elementName)); + if (proxy == null) { + console.info(TAG + 'Ext proxy == null'); + return; + } + let option = new rpc.MessageOption(); + let data = new rpc.MessageParcel(); + let reply = new rpc.MessageParcel(); + data.writeInt(1); + data.writeInt(99); + proxy.sendRequest(1, data, reply, option, (result) => { + let msg = result.reply.readInt(); + console.info(TAG + 'Ext connect, msg = ' + msg); + }); + }, + onDisconnect: function (elementName) { + flag2 = true + console.info(TAG + 'Ext onDisconnect, elementName = ' + JSON.stringify(elementName)); + }, + onFailed: function (number) { + flag3 = true + console.info(TAG + 'Ext onFailed, number = ' + number); + } + }; + let wantNum = { + bundleName: 'ohos.acts.aafwk.test.faauxiliary', + abilityName: 'ohos.acts.aafwk.test.faauxiliary.ServiceAbility2' + } + let num = ability_featureAbility.connectAbility(wantNum, options) + } catch (err) { + console.info(TAG + "catch err = " + JSON.stringify(err)); + expect().assertFail(); + done(); + } + }) + + /* + * @tc.number SUB_AA_OpenHarmony_Test_GetWindow_0100 + * @tc.name Call GetWindow interface. + * @tc.desc Function test + * @tc.level 3 + */ + it('SUB_AA_OpenHarmony_Test_GetWindow_0100', 0, async function(done) { + TAG = 'SUB_AA_OpenHarmony_Test_GetWindow_0100 ==>'; + try { + ability_featureAbility.getWindow((err, data) => { + console.info(TAG + "getWindow err = " + JSON.stringify(err)); + console.info(TAG + "getWindow data = " + data); + done(); + }) + } catch (err) { + console.info(TAG + "getWindow catch err = " + JSON.stringify(err)); + done(); + } + }) + + /* + * @tc.number SUB_AA_OpenHarmony_Test_TerminateSelfWithResult_0100 + * @tc.name CTerminate ability through TerminateSelfWithResult. + * @tc.desc Function test + * @tc.level 3 + */ + it('SUB_AA_OpenHarmony_Test_TerminateSelfWithResult_0100', 0, async function(done) { + TAG = 'SUB_AA_OpenHarmony_Test_TerminateSelfWithResult_0100 ==>'; + try { + let resultCode = undefined + let subscriber = null + let subscribeInfo = { + events: ["Fa_Auxiliary_MainAbility6_onDestroy"] + } + function SubscribeInfoCallback(err, data) { + console.info(TAG + "===SubscribeInfoCallback===" + JSON.stringify(data)) + if (data.event == "Fa_Auxiliary_MainAbility6_onDestroy") { + setTimeout(()=>{ + expect(resultCode).assertEqual(661); + commonEvent.unsubscribe(subscriber, UnSubscribeInfoCallback) + }, 1000) + } + } + function UnSubscribeInfoCallback(err, data) { + console.info(TAG + "===UnSubscribeInfoCallback===") + done() + } + commonEvent.createSubscriber(subscribeInfo, (err, data) => { + console.info(TAG + "===CreateSubscriberCallback===") + subscriber = data + commonEvent.subscribe(subscriber, SubscribeInfoCallback) + }) + + let wantNum = { + want: { + bundleName: 'ohos.acts.aafwk.test.faauxiliary', + abilityName: 'ohos.acts.aafwk.test.faauxiliary.MainAbility6' + } + } + ability_featureAbility.startAbilityForResult(wantNum).then((data) => { + console.info(TAG + "startAbilityForResult data = " + JSON.stringify(data)); + resultCode = data.resultCode + }).catch((err) => { + console.info(TAG + "startAbilityForResult err = " + JSON.stringify(err)); + expect().assertFail(); + done(); + }); + } catch (err) { + console.info(TAG + "getWindow catch err = " + JSON.stringify(err)); + done(); + } + }) + }) +} diff --git a/ability/ability_runtime/faapicover/faapicoverhaptest/entry/src/main/resources/base/element/string.json b/ability/ability_runtime/faapicover/faapicoverhaptest/entry/src/main/resources/base/element/string.json new file mode 100644 index 000000000..26bc16c1d --- /dev/null +++ b/ability/ability_runtime/faapicover/faapicoverhaptest/entry/src/main/resources/base/element/string.json @@ -0,0 +1,16 @@ +{ + "string": [ + { + "name": "entry_desc", + "value": "description" + }, + { + "name": "MainAbility_desc", + "value": "description" + }, + { + "name": "MainAbility_label", + "value": "FaXts" + } + ] +} \ No newline at end of file diff --git a/ability/ability_runtime/faapicover/faapicoverhaptest/entry/src/main/resources/base/media/icon.png b/ability/ability_runtime/faapicover/faapicoverhaptest/entry/src/main/resources/base/media/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..ce307a8827bd75456441ceb57d530e4c8d45d36c GIT binary patch literal 6790 zcmX|G1ymHk)?T_}Vd;>R?p|tHQo6fg38|$UVM!6BLrPFWk?s;$LOP{GmJpBl$qoSA!PUg~PA65-S00{{S`XKG6NkG0RgjEntPrmV+?0|00mu7;+5 zrdpa{2QLqPJ4Y{j7=Mrl{BaxrkdY69+c~(w{Fv-v&aR%aEI&JYSeRTLWm!zbv;?)_ ziZB;fwGbbeL5Q}YLx`J$lp~A09KK8t_z}PZ=4ZzgdeKtgoc+o5EvN9A1K1_<>M?MBqb#!ASf&# zEX?<)!RH(7>1P+j=jqG(58}TVN-$psA6K}atCuI!KTJD&FMmH-78ZejBm)0qc{ESp z|LuG1{QnBUJRg_E=h1#XMWt2%fcoN@l7eAS!Es?Q+;XsRNPhiiE=@AqlLkJzF`O18 zbsbSmKN=aaq8k3NFYZfDWpKmM!coBU0(XnL8R{4=i|wi{!uWYM2je{U{B*K2PVdu&=E zTq*-XsEsJ$u5H4g6DIm2Y!DN`>^v|AqlwuCD;w45K0@eqauiqWf7l&o)+YLHm~|L~ z7$0v5mkobriU!H<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Yow^C zqOv67Mm26i&zNJdsSk}S5ZJ9i5g1b;GMLpRDryEM1hJu-awZyzc>Q+DX-4p{!Nodj z8p@BoYeJz0+)sJZt zuEPepall8Mbf92R2NrOKP{5F3h655oKi75PrZ7VWYMqI0@AnHgNidN_?~A>hO$>~4 z^Tb@Mb6p+qg%i#dPPBT6TPfsoGNel~WMtla4$I*p39k?b>wSH06QT&ecu{LS5j7WKgGt{%Qg#tlx5^zGpL0XEyDon}XtBlYX@N6O&mN9(L z$3WvjRw6q*BYjXd*Fq8jXbPB|7!qV;4<3SpL4U$-IR3dR7);6%Ng*HwQb@`@>Ox+;D8{>7P%3W3Q%Usi-A~_qV+>e)rntOWl*O-6dZMKE8F5;?K0akaPU^t@xU> z%=cfHofS|kPL6wHyBU;&9FES!DZ+6ebIF)LFY6Fz{&D!$xgA|o7k1uCUbIc31tSxH zQ9Ry%g+c*8bqSc5h(`)Dg=0P>uD!i0X1s82?ZKCCB;WhGR>U(8-7|qN3Ap)CQv0fX zX>mu>K3(2u5yPDS2i~g-k`cK-?+g}k~KDu+;-P*Btr{$~&b>;qGA|AHs7nh`J|G6Cj zFM?4Cp=2b4lMDphW2lmNDT9=hRhqu_t?@tZNiwycZ^=K%z>ov)XaXk~tj_oQ`@1 zbTo;4XZBDgPjUAKnGqx}k`C5UB78cI_yh?}-u&gMP5ZOtdzXK(qxOqy@YH| zKVg=t_U%sjdhgBr><=%#F8a;Uk{yeK)y=0CKNmdE*mmS2GpIWB>H6u#<%c`=zqcWK z9HF5KQ#7Oa~pEP2)s#v~d&wROM>gVs@EXK<+yLWhcgU&n0TfndfCpllJ0~-G1 zq|eQ>U0Y7f|Lt@0PS { + console.info(printLog1 + listPush1 + "onDestroy"); + }); + }, + onActive() { + console.info(printLog1 + 'onActive'); + + ability_featureAbility.hasWindowFocus().then((data) => { + console.info(printLog1 + "hasWindowFocus data = " + data); + var CommonEventPublishData = { + parameters: { + hasWindowFocus: data + } + } + commonEvent.publish(listPush1 + "HasWindowFocus", CommonEventPublishData, (err) => { + console.info(printLog1 + listPush1 + "HasWindowFocus"); + }); + + setTimeout(()=>{ + ability_featureAbility.terminateSelf().then((data) => { + console.info(printLog1 + "terminateSelf data = " + JSON.stringify(data)); + }).catch((err) => { + console.info(printLog1 + "terminateSelf err = " + JSON.stringify(err)); + }); + }, 3000) + }).catch((err) => { + console.info(printLog1 + "hasWindowFocus err = " + JSON.stringify(err)); + }); + }, + onInactive() { + console.info(printLog1 + 'onInactive'); + }, + onShow() { + console.info(printLog1 + 'onShow'); + }, + onHide() { + console.info(printLog1 + 'onHide'); + } +} \ No newline at end of file diff --git a/ability/ability_runtime/faapicover/faauxiliary/entry/src/main/ets/MainAbility/pages/index.ets b/ability/ability_runtime/faapicover/faauxiliary/entry/src/main/ets/MainAbility/pages/index.ets new file mode 100644 index 000000000..cd2f36dc6 --- /dev/null +++ b/ability/ability_runtime/faapicover/faauxiliary/entry/src/main/ets/MainAbility/pages/index.ets @@ -0,0 +1,31 @@ +/* + * 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 World Test Fa' + + 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/faapicover/faauxiliary/entry/src/main/ets/MainAbility2/app.ets b/ability/ability_runtime/faapicover/faauxiliary/entry/src/main/ets/MainAbility2/app.ets new file mode 100644 index 000000000..2d016f1ee --- /dev/null +++ b/ability/ability_runtime/faapicover/faauxiliary/entry/src/main/ets/MainAbility2/app.ets @@ -0,0 +1,70 @@ +/* + * 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_featureAbility from '@ohos.ability.featureAbility'; +import commonEvent from '@ohos.commonEvent'; + +var printLog1 = "Fa:Auxiliary:MainAbility2:"; +var listPush1 = "Fa_Auxiliary_MainAbility2_"; +export default { + onCreate() { + console.info(printLog1 + 'onCreate'); + + let list = ["ohos.permission.CAMERA"] + try { + ability_featureAbility.getContext().requestPermissionsFromUser(list, 100).then((permissionRequestResult) => { + console.info(printLog1 + "requestPermissionsFromUser data = " + JSON.stringify(permissionRequestResult)); + var CommonEventPublishData = { + parameters: { + permissionRequestResult: permissionRequestResult + } + } + commonEvent.publish(listPush1 + "onCreate", CommonEventPublishData, (err) => { + console.info(printLog1 + listPush1 + "onCreate"); + }); + }).catch((err) => { + console.info(printLog1 + "requestPermissionsFromUser err = " + JSON.stringify(err)); + }); + } catch(err) { + console.info(printLog1 + "requestPermissionsFromUser catch err = " + JSON.stringify(err)); + } + + setTimeout(()=>{ + ability_featureAbility.terminateSelf().then((data) => { + console.info(printLog1 + "terminateSelf data = " + JSON.stringify(data)); + }).catch((err) => { + console.info(printLog1 + "terminateSelf err = " + JSON.stringify(err)); + }); + }, 3000) + }, + onDestroy() { + console.info(printLog1 + 'onDestroy'); + + commonEvent.publish(listPush1 + "onDestroy", (err) => { + console.info(printLog1 + listPush1 + "onDestroy"); + }); + }, + onActive() { + console.info(printLog1 + 'onActive'); + }, + onInactive() { + console.info(printLog1 + 'onInactive'); + }, + onShow() { + console.info(printLog1 + 'onShow'); + }, + onHide() { + console.info(printLog1 + 'onHide'); + } +} \ No newline at end of file diff --git a/ability/ability_runtime/faapicover/faauxiliary/entry/src/main/ets/MainAbility2/pages/index.ets b/ability/ability_runtime/faapicover/faauxiliary/entry/src/main/ets/MainAbility2/pages/index.ets new file mode 100644 index 000000000..4f2305d77 --- /dev/null +++ b/ability/ability_runtime/faapicover/faauxiliary/entry/src/main/ets/MainAbility2/pages/index.ets @@ -0,0 +1,57 @@ +/* + * 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_featureAbility from '@ohos.ability.featureAbility'; + +var printLog1 = "Fa:Auxiliary:MainAbility2:"; +@Entry +@Component +struct Index { + @State message: string = 'Hello World Test Fa 2' + + build() { + Row() { + Column() { + Text(this.message) + .fontSize(50) + .fontWeight(FontWeight.Bold) + Button() { + Text('requestPermissionsFromUser') + .fontSize(20) + .fontWeight(FontWeight.Bold) + }.type(ButtonType.Capsule) + .margin({ + top: 20 + }) + .backgroundColor('#0D9FFB') + .width('30%') + .height('5%') + .onClick(()=>{ + let list = ["ohos.permission.CAMERA"] + try { + ability_featureAbility.getContext().requestPermissionsFromUser(list, 1).then((permissionRequestResult) => { + console.info(printLog1 + "requestPermissionsFromUser data = " + JSON.stringify(permissionRequestResult)); + }).catch((err) => { + console.info(printLog1 + "requestPermissionsFromUser err = " + JSON.stringify(err)); + }); + } catch(err) { + console.info(printLog1 + "requestPermissionsFromUser catch err = " + JSON.stringify(err)); + } + }) + } + .width('100%') + } + .height('100%') + } +} \ No newline at end of file diff --git a/ability/ability_runtime/faapicover/faauxiliary/entry/src/main/ets/MainAbility3/app.ets b/ability/ability_runtime/faapicover/faauxiliary/entry/src/main/ets/MainAbility3/app.ets new file mode 100644 index 000000000..848113931 --- /dev/null +++ b/ability/ability_runtime/faapicover/faauxiliary/entry/src/main/ets/MainAbility3/app.ets @@ -0,0 +1,55 @@ +/* + * 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_featureAbility from '@ohos.ability.featureAbility'; +import commonEvent from '@ohos.commonEvent'; + +var printLog1 = "Fa:Auxiliary:MainAbility3:"; +var listPush1 = "Fa_Auxiliary_MainAbility3_"; +export default { + onCreate() { + console.info(printLog1 + 'onCreate'); + + commonEvent.publish(listPush1 + "onCreate", (err) => { + console.info(printLog1 + listPush1 + "onCreate"); + }); + + setTimeout(()=>{ + ability_featureAbility.terminateSelf().then((data) => { + console.info(printLog1 + "terminateSelf data = " + JSON.stringify(data)); + }).catch((err) => { + console.info(printLog1 + "terminateSelf err = " + JSON.stringify(err)); + }); + }, 3000) + }, + onDestroy() { + console.info(printLog1 + 'onDestroy'); + + commonEvent.publish(listPush1 + "onDestroy", (err) => { + console.info(printLog1 + listPush1 + "onDestroy"); + }); + }, + onActive() { + console.info(printLog1 + 'onActive'); + }, + onInactive() { + console.info(printLog1 + 'onInactive'); + }, + onShow() { + console.info(printLog1 + 'onShow'); + }, + onHide() { + console.info(printLog1 + 'onHide'); + } +} \ No newline at end of file diff --git a/ability/ability_runtime/faapicover/faauxiliary/entry/src/main/ets/MainAbility3/pages/index.ets b/ability/ability_runtime/faapicover/faauxiliary/entry/src/main/ets/MainAbility3/pages/index.ets new file mode 100644 index 000000000..438709b7b --- /dev/null +++ b/ability/ability_runtime/faapicover/faauxiliary/entry/src/main/ets/MainAbility3/pages/index.ets @@ -0,0 +1,31 @@ +/* + * 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 World Test Fa 3' + + 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/faapicover/faauxiliary/entry/src/main/ets/MainAbility4/app.ets b/ability/ability_runtime/faapicover/faauxiliary/entry/src/main/ets/MainAbility4/app.ets new file mode 100644 index 000000000..1c3268c3f --- /dev/null +++ b/ability/ability_runtime/faapicover/faauxiliary/entry/src/main/ets/MainAbility4/app.ets @@ -0,0 +1,66 @@ +/* + * 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_featureAbility from '@ohos.ability.featureAbility'; +import commonEvent from '@ohos.commonEvent'; + +var printLog1 = "Fa:Auxiliary:MainAbility4:"; +var listPush1 = "Fa_Auxiliary_MainAbility4_"; +export default { + onCreate() { + console.info(printLog1 + 'onCreate'); + + ability_featureAbility.getWant().then((data) => { + console.info(printLog1 + "getWant data = " + JSON.stringify(data)); + + var flags = { + parameters: { + flags: data.flags + } + } + commonEvent.publish(listPush1 + "onCreate", flags, (err) => { + console.info(printLog1 + listPush1 + "onCreate"); + }); + }).catch((err) => { + console.info(printLog1 + "getWant err = " + JSON.stringify(err)); + }); + + setTimeout(()=>{ + ability_featureAbility.terminateSelf().then((data) => { + console.info(printLog1 + "terminateSelf data = " + JSON.stringify(data)); + }).catch((err) => { + console.info(printLog1 + "terminateSelf err = " + JSON.stringify(err)); + }); + }, 3000) + }, + onDestroy() { + console.info(printLog1 + 'onDestroy'); + + commonEvent.publish(listPush1 + "onDestroy", (err) => { + console.info(printLog1 + listPush1 + "onDestroy"); + }); + }, + onActive() { + console.info(printLog1 + 'onActive'); + }, + onInactive() { + console.info(printLog1 + 'onInactive'); + }, + onShow() { + console.info(printLog1 + 'onShow'); + }, + onHide() { + console.info(printLog1 + 'onHide'); + } +} \ No newline at end of file diff --git a/ability/ability_runtime/faapicover/faauxiliary/entry/src/main/ets/MainAbility4/pages/index.ets b/ability/ability_runtime/faapicover/faauxiliary/entry/src/main/ets/MainAbility4/pages/index.ets new file mode 100644 index 000000000..8393825f7 --- /dev/null +++ b/ability/ability_runtime/faapicover/faauxiliary/entry/src/main/ets/MainAbility4/pages/index.ets @@ -0,0 +1,31 @@ +/* + * 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 World Test Fa 4' + + 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/faapicover/faauxiliary/entry/src/main/ets/MainAbility5/app.ets b/ability/ability_runtime/faapicover/faauxiliary/entry/src/main/ets/MainAbility5/app.ets new file mode 100644 index 000000000..2df675b0d --- /dev/null +++ b/ability/ability_runtime/faapicover/faauxiliary/entry/src/main/ets/MainAbility5/app.ets @@ -0,0 +1,66 @@ +/* + * 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_featureAbility from '@ohos.ability.featureAbility'; +import commonEvent from '@ohos.commonEvent'; + +var printLog1 = "Fa:Auxiliary:MainAbility5:"; +var listPush1 = "Fa_Auxiliary_MainAbility5_"; +export default { + onCreate() { + console.info(printLog1 + 'onCreate'); + + ability_featureAbility.getWant().then((data) => { + console.info(printLog1 + "getWant data = " + JSON.stringify(data)); + + var flags = { + parameters: { + flags: data.flags + } + } + commonEvent.publish(listPush1 + "onCreate", flags, (err) => { + console.info(printLog1 + listPush1 + "onCreate"); + }); + }).catch((err) => { + console.info(printLog1 + "getWant err = " + JSON.stringify(err)); + }); + + setTimeout(()=>{ + ability_featureAbility.terminateSelf().then((data) => { + console.info(printLog1 + "terminateSelf data = " + JSON.stringify(data)); + }).catch((err) => { + console.info(printLog1 + "terminateSelf err = " + JSON.stringify(err)); + }); + }, 3000) + }, + onDestroy() { + console.info(printLog1 + 'onDestroy'); + + commonEvent.publish(listPush1 + "onDestroy", (err) => { + console.info(printLog1 + listPush1 + "onDestroy"); + }); + }, + onActive() { + console.info(printLog1 + 'onActive'); + }, + onInactive() { + console.info(printLog1 + 'onInactive'); + }, + onShow() { + console.info(printLog1 + 'onShow'); + }, + onHide() { + console.info(printLog1 + 'onHide'); + } +} \ No newline at end of file diff --git a/ability/ability_runtime/faapicover/faauxiliary/entry/src/main/ets/MainAbility5/pages/index.ets b/ability/ability_runtime/faapicover/faauxiliary/entry/src/main/ets/MainAbility5/pages/index.ets new file mode 100644 index 000000000..a802b1e02 --- /dev/null +++ b/ability/ability_runtime/faapicover/faauxiliary/entry/src/main/ets/MainAbility5/pages/index.ets @@ -0,0 +1,31 @@ +/* + * 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 World Test Fa 5' + + 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/faapicover/faauxiliary/entry/src/main/ets/MainAbility6/app.ets b/ability/ability_runtime/faapicover/faauxiliary/entry/src/main/ets/MainAbility6/app.ets new file mode 100644 index 000000000..3240b00e2 --- /dev/null +++ b/ability/ability_runtime/faapicover/faauxiliary/entry/src/main/ets/MainAbility6/app.ets @@ -0,0 +1,66 @@ +/* + * 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_featureAbility from '@ohos.ability.featureAbility'; +import commonEvent from '@ohos.commonEvent'; + +var printLog1 = "Fa:Auxiliary:MainAbility6:"; +var listPush1 = "Fa_Auxiliary_MainAbility6_"; +export default { + onCreate() { + console.info(printLog1 + 'onCreate'); + + setTimeout(()=>{ + let wantNum = { + want: { + bundleName: 'ohos.acts.aafwk.test.faauxiliary', + abilityName: 'ohos.acts.aafwk.test.faauxiliary.MainAbility' + }, + resultCode: 661 + } + ability_featureAbility.terminateSelfWithResult(wantNum).then((data) => { + console.info(printLog1 + "terminateSelfWithResult data = " + JSON.stringify(data)); + }).catch((err) => { + console.info(printLog1 + "terminateSelfWithResult err = " + JSON.stringify(err)); + }); + }, 3000) + }, + onDestroy() { + console.info(printLog1 + 'onDestroy'); + + commonEvent.publish(listPush1 + "onDestroy", (err) => { + console.info(printLog1 + listPush1 + "onDestroy"); + }); + }, + onActive() { + console.info(printLog1 + 'onActive'); + }, + onInactive() { + console.info(printLog1 + 'onInactive'); + }, + onShow() { + console.info(printLog1 + 'onShow'); + }, + onHide() { + console.info(printLog1 + 'onHide'); + }, + + onNewWant(want) { + console.info(printLog1 + 'onNewWant'); + + commonEvent.publish(listPush1 + "onNewWant", (err) => { + console.info(printLog1 + listPush1 + "onNewWant"); + }); + } +} \ No newline at end of file diff --git a/ability/ability_runtime/faapicover/faauxiliary/entry/src/main/ets/MainAbility6/pages/index.ets b/ability/ability_runtime/faapicover/faauxiliary/entry/src/main/ets/MainAbility6/pages/index.ets new file mode 100644 index 000000000..0b4322435 --- /dev/null +++ b/ability/ability_runtime/faapicover/faauxiliary/entry/src/main/ets/MainAbility6/pages/index.ets @@ -0,0 +1,31 @@ +/* + * 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 World Test Fa 6' + + 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/faapicover/faauxiliary/entry/src/main/ets/ServiceAbility/service.ts b/ability/ability_runtime/faapicover/faauxiliary/entry/src/main/ets/ServiceAbility/service.ts new file mode 100644 index 000000000..7ca86911a --- /dev/null +++ b/ability/ability_runtime/faapicover/faauxiliary/entry/src/main/ets/ServiceAbility/service.ts @@ -0,0 +1,103 @@ +/* + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import rpc from "@ohos.rpc"; +import commonEvent from '@ohos.commonEvent'; +import ability_particleAbility from '@ohos.ability.particleAbility'; + +class StubTest1 extends rpc.RemoteObject { + constructor(des) { + if (typeof des === 'string') { + super(des); + } + else { + return null; + } + } + queryLocalInterface(descriptor) { + return null; + } + getInterfaceDescriptor() { + return ""; + } + sendRequest(code, data, reply, options) { + return null; + } + getCallingPid() { + return 0; + } + getCallingUid() { + return 0; + } + attachLocalInterface(localInterface, descriptor) { } + onRemoteRequest(code, data, reply, options) { + console.info(printLogS1 + "onRemoteRequest"); + if (code == 1) { + console.info(printLogS1 + "onRemoteRequest code 1"); + let op1 = data.readInt(); + let op2 = data.readInt(); + console.info(printLogS1 + "onRemoteRequest op1 = " + op1 + ", op2 = " + op2); + reply.writeInt(op1 + op2); + } + else { + console.info(printLogS1 + "onRemoteRequest code = " + code); + } + return true; + } +} + +var printLogS1 = "Fa:Auxiliary:ServiceAbility:"; +var listPushS1 = "Fa_Auxiliary_ServiceAbility_"; +export default { + onStart() { + console.info(printLogS1 + 'onStart'); + + commonEvent.publish(listPushS1 + "onStart", (err) => { + console.info(printLogS1 + listPushS1 + "onStart"); + }); + }, + onStop() { + console.info(printLogS1 + 'onStop'); + + commonEvent.publish(listPushS1 + "onStop", (err) => { + console.info(printLogS1 + listPushS1 + "onStop"); + }); + }, + onCommand(want, startId) { + console.info(printLogS1 + 'onCommand'); + + commonEvent.publish(listPushS1 + "onCommand", (err) => { + console.info(printLogS1 + listPushS1 + "onCommand"); + }); + + setTimeout(()=>{ + ability_particleAbility.terminateSelf().then((data) => { + console.info(printLogS1 + "terminateSelf data = " + JSON.stringify(data)); + }).catch((err) => { + console.info(printLogS1 + "terminateSelf err = " + JSON.stringify(err)); + }); + }, 3000) + }, + onConnect(want) { + console.info(printLogS1 + 'onConnect'); + + return new StubTest1("Test1"); + }, + onDisconnect(want) { + console.info(printLogS1 + 'onDisconnect'); + }, + onReconnect(want) { + console.info(printLogS1 + 'onReconnect'); + } +}; \ No newline at end of file diff --git a/ability/ability_runtime/faapicover/faauxiliary/entry/src/main/ets/ServiceAbility2/service.ts b/ability/ability_runtime/faapicover/faauxiliary/entry/src/main/ets/ServiceAbility2/service.ts new file mode 100644 index 000000000..237859c2d --- /dev/null +++ b/ability/ability_runtime/faapicover/faauxiliary/entry/src/main/ets/ServiceAbility2/service.ts @@ -0,0 +1,90 @@ +/* + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import rpc from "@ohos.rpc"; +import commonEvent from '@ohos.commonEvent'; + +class StubTest2 extends rpc.RemoteObject { + constructor(des) { + if (typeof des === 'string') { + super(des); + } + else { + return null; + } + } + queryLocalInterface(descriptor) { + return null; + } + getInterfaceDescriptor() { + return ""; + } + sendRequest(code, data, reply, options) { + return null; + } + getCallingPid() { + return 0; + } + getCallingUid() { + return 0; + } + attachLocalInterface(localInterface, descriptor) { } + onRemoteRequest(code, data, reply, options) { + console.info(printLogS1 + "onRemoteRequest"); + if (code == 1) { + console.info(printLogS1 + "onRemoteRequest code 1"); + let op1 = data.readInt(); + let op2 = data.readInt(); + console.info(printLogS1 + "onRemoteRequest op1 = " + op1 + ", op2 = " + op2); + reply.writeInt(op1 + op2); + } + else { + console.info(printLogS1 + "onRemoteRequest code = " + code); + } + return true; + } +} + +var printLogS1 = "Fa:Auxiliary:ServiceAbility2:"; +var listPushS1 = "Fa_Auxiliary_ServiceAbility2_"; +export default { + onStart() { + console.info(printLogS1 + 'onStart'); + }, + onStop() { + console.info(printLogS1 + 'onStop'); + }, + onCommand(want, startId) { + console.info(printLogS1 + 'onCommand'); + }, + onConnect(want) { + console.info(printLogS1 + 'onConnect'); + + commonEvent.publish(listPushS1 + "onConnect", (err) => { + console.info(printLogS1 + listPushS1 + "onCreate"); + }); + + return new StubTest2("Test1"); + }, + onDisconnect(want) { + console.info(printLogS1 + 'onDisconnect'); + + commonEvent.publish(listPushS1 + "onDisconnect", (err) => { + console.info(printLogS1 + listPushS1 + "onDisconnect"); + }); + }, + onReconnect(want) { + console.info(printLogS1 + 'onReconnect'); + } +}; \ No newline at end of file diff --git a/ability/ability_runtime/faapicover/faauxiliary/entry/src/main/resources/base/element/string.json b/ability/ability_runtime/faapicover/faauxiliary/entry/src/main/resources/base/element/string.json new file mode 100644 index 000000000..c1cbcf18d --- /dev/null +++ b/ability/ability_runtime/faapicover/faauxiliary/entry/src/main/resources/base/element/string.json @@ -0,0 +1,64 @@ +{ + "string": [ + { + "name": "entry_desc", + "value": "description" + }, + { + "name": "MainAbility_desc", + "value": "description" + }, + { + "name": "MainAbility_label", + "value": "FaAuxiliary" + }, + { + "name": "MainAbility2_desc", + "value": "description" + }, + { + "name": "MainAbility2_label", + "value": "label" + }, + { + "name": "MainAbility3_desc", + "value": "description" + }, + { + "name": "MainAbility3_label", + "value": "label" + }, + { + "name": "MainAbility4_desc", + "value": "description" + }, + { + "name": "MainAbility4_label", + "value": "label" + }, + { + "name": "MainAbility5_desc", + "value": "description" + }, + { + "name": "MainAbility5_label", + "value": "label" + }, + { + "name": "MainAbility6_desc", + "value": "description" + }, + { + "name": "MainAbility6_label", + "value": "label" + }, + { + "name": "ServiceAbility_desc", + "value": "hap sample empty service" + }, + { + "name": "ServiceAbility2_desc", + "value": "hap sample empty service" + } + ] +} \ No newline at end of file diff --git a/ability/ability_runtime/faapicover/faauxiliary/entry/src/main/resources/base/media/icon.png b/ability/ability_runtime/faapicover/faauxiliary/entry/src/main/resources/base/media/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..ce307a8827bd75456441ceb57d530e4c8d45d36c GIT binary patch literal 6790 zcmX|G1ymHk)?T_}Vd;>R?p|tHQo6fg38|$UVM!6BLrPFWk?s;$LOP{GmJpBl$qoSA!PUg~PA65-S00{{S`XKG6NkG0RgjEntPrmV+?0|00mu7;+5 zrdpa{2QLqPJ4Y{j7=Mrl{BaxrkdY69+c~(w{Fv-v&aR%aEI&JYSeRTLWm!zbv;?)_ ziZB;fwGbbeL5Q}YLx`J$lp~A09KK8t_z}PZ=4ZzgdeKtgoc+o5EvN9A1K1_<>M?MBqb#!ASf&# zEX?<)!RH(7>1P+j=jqG(58}TVN-$psA6K}atCuI!KTJD&FMmH-78ZejBm)0qc{ESp z|LuG1{QnBUJRg_E=h1#XMWt2%fcoN@l7eAS!Es?Q+;XsRNPhiiE=@AqlLkJzF`O18 zbsbSmKN=aaq8k3NFYZfDWpKmM!coBU0(XnL8R{4=i|wi{!uWYM2je{U{B*K2PVdu&=E zTq*-XsEsJ$u5H4g6DIm2Y!DN`>^v|AqlwuCD;w45K0@eqauiqWf7l&o)+YLHm~|L~ z7$0v5mkobriU!H<@mVJHLlmQqzQ3d6Rh_-|%Yy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