diff --git a/ability/ability_runtime/apicover/apicoverhaptest/entry/src/main/ets/FormAbility/FormAbility.ts b/ability/ability_runtime/apicover/apicoverhaptest/entry/src/main/ets/FormAbility/FormAbility.ts index e07c8d2677a609954848949db2d116b99e7ffbe9..579b1f9ddb5eaceacd974cc51425a2ef76ec7082 100644 --- a/ability/ability_runtime/apicover/apicoverhaptest/entry/src/main/ets/FormAbility/FormAbility.ts +++ b/ability/ability_runtime/apicover/apicoverhaptest/entry/src/main/ets/FormAbility/FormAbility.ts @@ -13,7 +13,7 @@ * limitations under the License. */ -import FormExtension from '@ohos.application.FormExtension'; +import FormExtension from '@ohos.app.form.FormExtensionAbility'; import formBindingData from '@ohos.application.formBindingData'; import formInfo from '@ohos.application.formInfo'; import commonEvent from '@ohos.commonEvent'; diff --git a/ability/ability_runtime/apicover/apicoverhaptest/entry/src/main/ets/ServiceAbility/ServiceAbility.ts b/ability/ability_runtime/apicover/apicoverhaptest/entry/src/main/ets/ServiceAbility/ServiceAbility.ts index 21e5a3e438d15227342a49dcb2778470a2f518ee..33ba264f67f191bf2812d6ecb162bbeed0ef7ef4 100644 --- a/ability/ability_runtime/apicover/apicoverhaptest/entry/src/main/ets/ServiceAbility/ServiceAbility.ts +++ b/ability/ability_runtime/apicover/apicoverhaptest/entry/src/main/ets/ServiceAbility/ServiceAbility.ts @@ -13,7 +13,7 @@ * limitations under the License. */ -import ServiceExtension from '@ohos.application.ServiceExtensionAbility' +import ServiceExtension from '@ohos.app.ability.ServiceExtensionAbility' import commonEvent from "@ohos.commonEvent"; import Want from '@ohos.application.Want'; import rpc from '@ohos.rpc'; 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 8825f4d211ea5ece45e909be56fc31e5d3c51a73..2888c23ff414c84909555a182b93ea7e9a32b8ca 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 @@ -19,10 +19,10 @@ import FormInfo from '@ohos.application.formInfo'; import formInfoNew from '@ohos.app.form.formInfo'; import formError from '@ohos.application.formError'; import formHost from '@ohos.application.formHost'; -import errorManager from '@ohos.application.errorManager'; +import errorManager from '@ohos.app.ability.errorManager'; import abilityConstant from '@ohos.app.ability.AbilityConstant' import appManager from '@ohos.application.appManager' -import applicationContext from '@ohos.application.context' +import appManagerNew from '@ohos.app.ability.appManager' import commonEvent from '@ohos.commonEvent'; import ability from '@ohos.ability.ability'; import abilityDelegatorRegistry from '@ohos.app.ability.abilityDelegatorRegistry'; @@ -453,23 +453,12 @@ export default function ApiCoverTest() { expect("ohos.extra.param.key.form_name").assertEqual(FormInfo.FormParam.NAME_KEY) expect("ohos.extra.param.key.form_temporary").assertEqual(FormInfo.FormParam.TEMPORARY_KEY) expect("ohos.extra.param.key.form_identity").assertEqual(FormInfo.FormParam.IDENTITY_KEY) - expect("ohos.extra.param.key.bundle_name").assertEqual(FormInfo.FormParam.BUNDLE_NAME_KEY) - expect("ohos.extra.param.key.ability_name").assertEqual(FormInfo.FormParam.ABILITY_NAME_KEY) expect(0).assertEqual(FormInfo.FormState.DEFAULT) expect(1).assertEqual(FormInfo.FormState.READY) expect(-1).assertEqual(FormInfo.FormState.UNKNOWN) expect(0).assertEqual(FormInfo.ColorMode.MODE_DARK) expect(1).assertEqual(FormInfo.ColorMode.MODE_LIGHT) - console.info("SUB_AA_Form_provider_TestFormInfo_0100:" + FormInfo.FormDimension.Dimension_2_1); - expect(1).assertEqual(FormInfo.FormDimension.Dimension_1_2) - expect(2).assertEqual(FormInfo.FormDimension.Dimension_2_2) - expect(3).assertEqual(FormInfo.FormDimension.Dimension_2_4) - expect(4).assertEqual(FormInfo.FormDimension.Dimension_4_4) - expect(5).assertEqual(FormInfo.FormDimension.Dimension_2_1) expect(1).assertEqual(FormInfo.FormType.JS); - expect(2).assertEqual(FormInfo.FormType.eTS); - expect(1).assertEqual(FormInfo.VisibilityType.FORM_VISIBLE); - expect(2).assertEqual(FormInfo.VisibilityType.FORM_INVISIBLE); done(); }); @@ -515,50 +504,6 @@ export default function ApiCoverTest() { done(); }); - /* - * @tc.number SUB_AA_ReisterErrorObserver_0100 - * @tc.name Test ReisterErrorObserver. - * @tc.desc Function test - * @tc.level 3 - */ - it('SUB_AA_ReisterErrorObserver_0100', 0, async function (done) { - let errorObserver:errorManager.ErrorObserver; - errorObserver = { - onUnhandledException:(errMessage) => { - console.info("SUB_AA_ReisterErrorObserver_0100" + JSON.stringify(errMessage)); - } - } - let errCodeId = errorManager.registerErrorObserver(errorObserver) - expect(errCodeId).assertEqual(0) - errorManager.unregisterErrorObserver(errCodeId).then((data)=>{ - expect(data).assertEqual(undefined) - done(); - }).catch((err)=>{ - expect().assertFail() - done(); - }) - }); - - /* - * @tc.number SUB_AA_ReisterErrorObserver_0200 - * @tc.name Test unregisterErrorObserver with error number. - * @tc.desc Function test - * @tc.level 3 - */ - it('SUB_AA_ReisterErrorObserver_0200', 0, async function (done) { - errorManager.unregisterErrorObserver(-1, (err, data)=>{ - console.info("SUB_AA_ReisterErrorObserver_0200:" + JSON.stringify(err) + " " + JSON.stringify(data)); - console.info("SUB_AA_ReisterErrorObserver_0200:" + typeof(err.code)); - if(err.code != 0){ - expect(err.code).assertEqual(-2) - done() - }else{ - expect().assertFail() - done(); - } - }) - }); - /* * @tc.number SUB_AA_Test_AbilityConstant_0100 * @tc.name Test abilityConstant. @@ -584,7 +529,7 @@ export default function ApiCoverTest() { it('SUB_AA_Test_ProcessRunningInformation_0100', 0, async function (done) { let processRunningInformation:appManager.ProcessRunningInformation; let process; - appManager.getProcessRunningInformation().then((processRunningInformations)=>{ + appManagerNew.getProcessRunningInformation().then((processRunningInformations)=>{ console.info("SUB_AA_Test_ProcessRunningInformation_0100:" + JSON.stringify(processRunningInformations)); for(let i = 0; i < processRunningInformations.length; i++){ console.info("SUB_AA_Test_ProcessRunningInformation_0100:" + JSON.stringify(processRunningInformations[i])); @@ -611,24 +556,23 @@ export default function ApiCoverTest() { */ it('SUB_AA_Test_ProcessRunningInformation_0200', 0, async function (done) { let process; - appManager.getProcessRunningInformation((error, processRunningInformations)=>{ - if(error.code == 0){ - console.info("SUB_AA_Test_ProcessRunningInformation_0100:" + JSON.stringify(processRunningInformations)); - for(let i = 0; i < processRunningInformations.length; i++){ - console.info("SUB_AA_Test_ProcessRunningInformation_0100:" + JSON.stringify(processRunningInformations[i])); - expect(processRunningInformations[i].pid).assertLarger(0) - expect(processRunningInformations[i].uid).assertLarger(0) - if(processRunningInformations[i].processName == "com.example.apicoverhaptest"){ - process = processRunningInformations[i] - } - } - expect(process.bundleNames[0]).assertEqual("com.example.apicoverhaptest") - done() - }else{ - console.info("SUB_AA_Test_ProcessRunningInformation_0100:" + JSON.stringify(error)); + appManagerNew.getProcessRunningInformation((error, processRunningInformations)=>{ + if (error) { + console.info("SUB_AA_Test_ProcessRunningInformation_0200:" + JSON.stringify(error)); expect().assertFail() done() } + console.info("SUB_AA_Test_ProcessRunningInformation_0200:" + JSON.stringify(processRunningInformations)); + for(let i = 0; i < processRunningInformations.length; i++){ + console.info("SUB_AA_Test_ProcessRunningInformation_0200:" + JSON.stringify(processRunningInformations[i])); + expect(processRunningInformations[i].pid).assertLarger(0) + expect(processRunningInformations[i].uid).assertLarger(0) + if(processRunningInformations[i].processName == "com.example.apicoverhaptest"){ + process = processRunningInformations[i] + } + } + expect(process.bundleNames[0]).assertEqual("com.example.apicoverhaptest") + done() }) }); @@ -738,7 +682,7 @@ export default function ApiCoverTest() { */ it('SUB_AA_FMS_AcquireForm_0100', 0, async function (done) { let subscriber = null - let formExtensionContext:applicationContext.FormExtensionContext + let formExtensionContext:common.FormExtensionContext let pacMap:ability.PacMap let subscribeInfo = { events: ["Form_StartAbility"] diff --git a/ability/ability_runtime/apicover/apicoverhaptest/entry/src/main/ets/test/WantAgentCover.test.ets b/ability/ability_runtime/apicover/apicoverhaptest/entry/src/main/ets/test/WantAgentCover.test.ets index 03f08edb4d5628dd5c3c966ef13ff939ec4d90b0..7d9270e77250f6e879cfc73e0bc4fbc0ba5cedbb 100644 --- a/ability/ability_runtime/apicover/apicoverhaptest/entry/src/main/ets/test/WantAgentCover.test.ets +++ b/ability/ability_runtime/apicover/apicoverhaptest/entry/src/main/ets/test/WantAgentCover.test.ets @@ -13,7 +13,7 @@ * limitations under the License. */ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium' -import wantAgent from '@ohos.wantAgent'; +import wantAgent from '@ohos.app.ability.wantAgent'; var TAG export default function wantAgentCoverTest() { diff --git a/ability/ability_runtime/formmanager/stage/actsformprovidergetformsinfo/entry/src/main/ets/test/GetFormsInfoTest.test.ets b/ability/ability_runtime/formmanager/stage/actsformprovidergetformsinfo/entry/src/main/ets/test/GetFormsInfoTest.test.ets index 730bf353d64bdd57d839d39874337dfa3d1de043..965669dc47f4055eff11750d40ce5a9d02b4c73e 100644 --- a/ability/ability_runtime/formmanager/stage/actsformprovidergetformsinfo/entry/src/main/ets/test/GetFormsInfoTest.test.ets +++ b/ability/ability_runtime/formmanager/stage/actsformprovidergetformsinfo/entry/src/main/ets/test/GetFormsInfoTest.test.ets @@ -13,8 +13,8 @@ * limitations under the License. */ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium' -import formProvider from '@ohos.application.formProvider'; -import formInfo from '@ohos.application.formInfo'; +import formProvider from '@ohos.app.form.formProvider'; +import formInfo from '@ohos.app.form.formInfo'; import formError from '@ohos.application.formError'; let module1FormInfo: formInfo.FormInfo = { @@ -59,6 +59,7 @@ let module2FormInfo: formInfo.FormInfo = { customizeData: {} } +const ERR_ADD_INVALID_PARAM = 401; var expectResult = Array(); expectResult.push(module1FormInfo); expectResult.push(module2FormInfo); @@ -75,7 +76,7 @@ export default function abilityTest() { formProvider.getFormsInfo((err, value) => { console.info("formProvider::GetFormsInfoTest err: " + JSON.stringify(err)); console.info("formProvider::GetFormsInfoTest value: " + JSON.stringify(value)); - expect(err.code).assertEqual(0); + expect(err).assertEqual(null); expect(value.length).assertEqual(2); checkResultArray(expectResult, value) done(); @@ -124,12 +125,18 @@ export default function abilityTest() { */ it('SUB_AA_OpenHarmony_ProviderGetForsInfo_0400', 0, async function (done) { console.info("SUB_AA_OpenHarmony_ProviderGetForsInfo_0400"); - formProvider.getFormsInfo(undefined, function(err, value) { + try { + formProvider.getFormsInfo(undefined, function(err, value) { + console.info("formProvider::GetFormsInfoTest err: " + JSON.stringify(err)); + console.info("formProvider::GetFormsInfoTest value: " + JSON.stringify(value)); + expect().assertFail(); + done(); + }) + } catch (err) { console.info("formProvider::GetFormsInfoTest err: " + JSON.stringify(err)); - console.info("formProvider::GetFormsInfoTest value: " + JSON.stringify(value)); - expect(err.code).assertEqual(formError.FormError.ERR_ADD_INVALID_PARAM); + expect(err.code).assertEqual(ERR_ADD_INVALID_PARAM); done(); - }); + } }); /** @@ -143,7 +150,7 @@ export default function abilityTest() { formProvider.getFormsInfo(filter, function(err, value) { console.info("formProvider::GetFormsInfoTest: " + JSON.stringify(err)); console.info("formProvider::GetFormsInfoTest: " + JSON.stringify(value)); - expect(err.code).assertEqual(0); + expect(err).assertEqual(null); expect(value.length).assertEqual(2); checkResultArray(expectResult, value); done(); @@ -163,7 +170,7 @@ export default function abilityTest() { formProvider.getFormsInfo(filter, function(err, value) { console.info("formProvider::GetFormsInfoTest err: " + JSON.stringify(err)); console.info("formProvider::GetFormsInfoTest value: " + JSON.stringify(value)); - expect(err.code).assertEqual(0); + expect(err).assertEqual(null); expect(value.length).assertEqual(2); checkResultArray(expectResult, value); done(); @@ -183,7 +190,7 @@ export default function abilityTest() { formProvider.getFormsInfo(filter, function(err, value) { console.info("formProvider::GetFormsInfoTest err: " + JSON.stringify(err)); console.info("formProvider::GetFormsInfoTest value: " + JSON.stringify(value)); - expect(err.code).assertEqual(0); + expect(err).assertEqual(null); expect(value.length).assertEqual(2); checkResultArray(expectResult, value); done(); @@ -203,7 +210,7 @@ export default function abilityTest() { formProvider.getFormsInfo(filter, function(err, value) { console.info("formProvider::GetFormsInfoTest err: " + JSON.stringify(err)); console.info("formProvider::GetFormsInfoTest value: " + JSON.stringify(value)); - expect(err.code).assertEqual(0); + expect(err).assertEqual(null); expect(value.length).assertEqual(0); done(); }); @@ -222,7 +229,7 @@ export default function abilityTest() { formProvider.getFormsInfo(filter, function(err, value) { console.info("formProvider::GetFormsInfoTest err: " + JSON.stringify(err)); console.info("formProvider::GetFormsInfoTest value: " + JSON.stringify(value)); - expect(err.code).assertEqual(0); + expect(err).assertEqual(null); expect(value.length).assertEqual(1); checkResult(module1FormInfo, value[0]); done(); @@ -241,7 +248,7 @@ export default function abilityTest() { formProvider.getFormsInfo(filter, function(err, value) { console.info("formProvider::GetFormsInfoTest err: " + JSON.stringify(err)); console.info("formProvider::GetFormsInfoTest value: " + JSON.stringify(value)); - expect(err.code).assertEqual(0); + expect(err).assertEqual(null); expect(value.length).assertEqual(0); done(); }); diff --git a/ability/ability_runtime/formmanager/stage/actsformprovidergetformsinfo/module1/src/main/ets/FormAbility/FormAbility.ts b/ability/ability_runtime/formmanager/stage/actsformprovidergetformsinfo/module1/src/main/ets/FormAbility/FormAbility.ts index 2748635acfe5697f7a153fc0e98ea255714c84c7..14d2046464ff264c9dbd32282a0ffc3d0f593a47 100644 --- a/ability/ability_runtime/formmanager/stage/actsformprovidergetformsinfo/module1/src/main/ets/FormAbility/FormAbility.ts +++ b/ability/ability_runtime/formmanager/stage/actsformprovidergetformsinfo/module1/src/main/ets/FormAbility/FormAbility.ts @@ -12,7 +12,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import FormExtension from '@ohos.application.FormExtension'; +import FormExtension from '@ohos.app.form.FormExtensionAbility'; import formBindingData from '@ohos.application.formBindingData'; import formInfo from '@ohos.application.formInfo'; diff --git a/ability/ability_runtime/formmanager/stage/actsformprovidergetformsinfo/module2/src/main/ets/FormAbility/FormAbility.ts b/ability/ability_runtime/formmanager/stage/actsformprovidergetformsinfo/module2/src/main/ets/FormAbility/FormAbility.ts index 2748635acfe5697f7a153fc0e98ea255714c84c7..14d2046464ff264c9dbd32282a0ffc3d0f593a47 100644 --- a/ability/ability_runtime/formmanager/stage/actsformprovidergetformsinfo/module2/src/main/ets/FormAbility/FormAbility.ts +++ b/ability/ability_runtime/formmanager/stage/actsformprovidergetformsinfo/module2/src/main/ets/FormAbility/FormAbility.ts @@ -12,7 +12,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import FormExtension from '@ohos.application.FormExtension'; +import FormExtension from '@ohos.app.form.FormExtensionAbility'; import formBindingData from '@ohos.application.formBindingData'; import formInfo from '@ohos.application.formInfo'; diff --git a/ability/ability_runtime/freeinstalltest/connectabilityfatest/actsfreeinstallconnectabilityfatest/entry/src/main/ets/MainAbility/test/ConnectAbilityTest.ets b/ability/ability_runtime/freeinstalltest/connectabilityfatest/actsfreeinstallconnectabilityfatest/entry/src/main/ets/MainAbility/test/ConnectAbilityTest.ets index 3d26b03273556a59ca9c9caa3ae2a53775cd2a30..bbc190f0d6cfb5d4a1c50c2aa8f384d48e091d95 100644 --- a/ability/ability_runtime/freeinstalltest/connectabilityfatest/actsfreeinstallconnectabilityfatest/entry/src/main/ets/MainAbility/test/ConnectAbilityTest.ets +++ b/ability/ability_runtime/freeinstalltest/connectabilityfatest/actsfreeinstallconnectabilityfatest/entry/src/main/ets/MainAbility/test/ConnectAbilityTest.ets @@ -20,7 +20,7 @@ import rpc from '@ohos.rpc'; import featureAbility from '@ohos.ability.featureAbility'; import wantConstant from '@ohos.ability.wantConstant' import Prompt from '@system.prompt'; -import abilityManager from '@ohos.application.abilityManager'; +import abilityManager from '@ohos.app.ability.abilityManager'; import AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry' diff --git a/ability/ability_runtime/freeinstalltest/startabilityforresultstagetest/actsfreeinstallstartabilityforresultstagetest/entry/src/main/ets/test/StartAbilityForResult.ets b/ability/ability_runtime/freeinstalltest/startabilityforresultstagetest/actsfreeinstallstartabilityforresultstagetest/entry/src/main/ets/test/StartAbilityForResult.ets index 50401d70debde0d73f2518fe9b09aa1cb5e363a5..bb7864f60bfa9de7c242d1c1acb827a6b7523850 100644 --- a/ability/ability_runtime/freeinstalltest/startabilityforresultstagetest/actsfreeinstallstartabilityforresultstagetest/entry/src/main/ets/test/StartAbilityForResult.ets +++ b/ability/ability_runtime/freeinstalltest/startabilityforresultstagetest/actsfreeinstallstartabilityforresultstagetest/entry/src/main/ets/test/StartAbilityForResult.ets @@ -19,7 +19,7 @@ import ability from '@ohos.app.ability.UIAbility' import rpc from '@ohos.rpc'; import wantConstant from '@ohos.ability.wantConstant' import Prompt from '@system.prompt'; -import abilityManager from '@ohos.application.abilityManager'; +import abilityManager from '@ohos.app.ability.abilityManager'; export default function StartAbilityForResult(abilityContext) { diff --git a/ability/ability_runtime/freeinstalltest/startabilitystagetest/actsfreeinstallstartabilitystagetest/entry/src/main/ets/FormAbility/FormAbility.ts b/ability/ability_runtime/freeinstalltest/startabilitystagetest/actsfreeinstallstartabilitystagetest/entry/src/main/ets/FormAbility/FormAbility.ts index f8c8f1dd9780f433952af29d2050109185fa2869..b06fa2deb03b9c4f19810902d5681df4a02a15aa 100644 --- a/ability/ability_runtime/freeinstalltest/startabilitystagetest/actsfreeinstallstartabilitystagetest/entry/src/main/ets/FormAbility/FormAbility.ts +++ b/ability/ability_runtime/freeinstalltest/startabilitystagetest/actsfreeinstallstartabilitystagetest/entry/src/main/ets/FormAbility/FormAbility.ts @@ -13,7 +13,7 @@ * limitations under the License. */ -import FormExtension from '@ohos.application.FormExtension'; +import FormExtension from '@ohos.app.form.FormExtensionAbility'; import formBindingData from '@ohos.application.formBindingData'; import formInfo from '@ohos.application.formInfo'; diff --git a/ability/ability_runtime/freeinstalltest/startabilitystagetest/actsfreeinstallstartabilitystagetest/entry/src/main/ets/test/StartAbilityTest.ets b/ability/ability_runtime/freeinstalltest/startabilitystagetest/actsfreeinstallstartabilitystagetest/entry/src/main/ets/test/StartAbilityTest.ets index 36c43fbb00ae5350d25741656bcd8bfa919ff706..de3094a788a367b8211b6fff5152355e3b2bc63c 100644 --- a/ability/ability_runtime/freeinstalltest/startabilitystagetest/actsfreeinstallstartabilitystagetest/entry/src/main/ets/test/StartAbilityTest.ets +++ b/ability/ability_runtime/freeinstalltest/startabilitystagetest/actsfreeinstallstartabilitystagetest/entry/src/main/ets/test/StartAbilityTest.ets @@ -21,7 +21,7 @@ import ability from '@ohos.app.ability.UIAbility' import rpc from '@ohos.rpc'; import wantConstant from '@ohos.ability.wantConstant' import Prompt from '@system.prompt'; -import abilityManager from '@ohos.application.abilityManager'; +import abilityManager from '@ohos.app.ability.abilityManager'; import commonEvent from '@ohos.commonEvent'; const SYSTEM_INNER_ERROR = 16000050 diff --git a/ability/ability_runtime/freeinstalltest/startabilitystagetest/atomizationstageentry/entry/src/main/ets/ServiceAbility/ServiceAbility.ts b/ability/ability_runtime/freeinstalltest/startabilitystagetest/atomizationstageentry/entry/src/main/ets/ServiceAbility/ServiceAbility.ts index a40c991d3b5480e8485abd1ca0a790154bf4c83b..8cd26f42189830c3513d9c3f0ff87aac871d6827 100644 --- a/ability/ability_runtime/freeinstalltest/startabilitystagetest/atomizationstageentry/entry/src/main/ets/ServiceAbility/ServiceAbility.ts +++ b/ability/ability_runtime/freeinstalltest/startabilitystagetest/atomizationstageentry/entry/src/main/ets/ServiceAbility/ServiceAbility.ts @@ -13,7 +13,7 @@ * limitations under the License. */ -import FormExtension from '@ohos.application.FormExtension'; +import FormExtension from '@ohos.app.form.FormExtensionAbility'; import formBindingData from '@ohos.application.formBindingData'; export default class ServiceAbility extends FormExtension { diff --git a/bundlemanager/bundle_standard/bundlemanager/actsbundlemanagerstagetest/entry/src/main/ets/FormAbility/FormAbility.ts b/bundlemanager/bundle_standard/bundlemanager/actsbundlemanagerstagetest/entry/src/main/ets/FormAbility/FormAbility.ts index 2f94ce17654ff7562d7bc9878961bbab2219fe92..d443631109f5f73817ec907b36c1b7a3d353d357 100755 --- a/bundlemanager/bundle_standard/bundlemanager/actsbundlemanagerstagetest/entry/src/main/ets/FormAbility/FormAbility.ts +++ b/bundlemanager/bundle_standard/bundlemanager/actsbundlemanagerstagetest/entry/src/main/ets/FormAbility/FormAbility.ts @@ -1,4 +1,4 @@ -import FormExtension from '@ohos.application.FormExtension'; +import FormExtension from '@ohos.app.form.FormExtensionAbility'; import formBindingData from '@ohos.application.formBindingData'; import formInfo from '@ohos.application.formInfo'; diff --git a/bundlemanager/bundle_standard/bundlemanager/actsbundlemanagerstagetest/entry/src/main/ets/ServiceAbility/FormAbility.ts b/bundlemanager/bundle_standard/bundlemanager/actsbundlemanagerstagetest/entry/src/main/ets/ServiceAbility/FormAbility.ts index 2f94ce17654ff7562d7bc9878961bbab2219fe92..d443631109f5f73817ec907b36c1b7a3d353d357 100755 --- a/bundlemanager/bundle_standard/bundlemanager/actsbundlemanagerstagetest/entry/src/main/ets/ServiceAbility/FormAbility.ts +++ b/bundlemanager/bundle_standard/bundlemanager/actsbundlemanagerstagetest/entry/src/main/ets/ServiceAbility/FormAbility.ts @@ -1,4 +1,4 @@ -import FormExtension from '@ohos.application.FormExtension'; +import FormExtension from '@ohos.app.form.FormExtensionAbility'; import formBindingData from '@ohos.application.formBindingData'; import formInfo from '@ohos.application.formInfo'; diff --git a/bundlemanager/bundle_standard/bundlemanager/sceneProject/bmsstagedemoone/entry/src/main/ets/FormAbility/FormAbility.ts b/bundlemanager/bundle_standard/bundlemanager/sceneProject/bmsstagedemoone/entry/src/main/ets/FormAbility/FormAbility.ts index 2f94ce17654ff7562d7bc9878961bbab2219fe92..d443631109f5f73817ec907b36c1b7a3d353d357 100644 --- a/bundlemanager/bundle_standard/bundlemanager/sceneProject/bmsstagedemoone/entry/src/main/ets/FormAbility/FormAbility.ts +++ b/bundlemanager/bundle_standard/bundlemanager/sceneProject/bmsstagedemoone/entry/src/main/ets/FormAbility/FormAbility.ts @@ -1,4 +1,4 @@ -import FormExtension from '@ohos.application.FormExtension'; +import FormExtension from '@ohos.app.form.FormExtensionAbility'; import formBindingData from '@ohos.application.formBindingData'; import formInfo from '@ohos.application.formInfo'; diff --git a/bundlemanager/bundle_standard/bundlemanager/sceneProject/bmsstagedemoone/entry/src/main/ets/ServiceAbility/FormAbility.ts b/bundlemanager/bundle_standard/bundlemanager/sceneProject/bmsstagedemoone/entry/src/main/ets/ServiceAbility/FormAbility.ts index 2f94ce17654ff7562d7bc9878961bbab2219fe92..d443631109f5f73817ec907b36c1b7a3d353d357 100644 --- a/bundlemanager/bundle_standard/bundlemanager/sceneProject/bmsstagedemoone/entry/src/main/ets/ServiceAbility/FormAbility.ts +++ b/bundlemanager/bundle_standard/bundlemanager/sceneProject/bmsstagedemoone/entry/src/main/ets/ServiceAbility/FormAbility.ts @@ -1,4 +1,4 @@ -import FormExtension from '@ohos.application.FormExtension'; +import FormExtension from '@ohos.app.form.FormExtensionAbility'; import formBindingData from '@ohos.application.formBindingData'; import formInfo from '@ohos.application.formInfo'; diff --git a/bundlemanager/bundle_standard/bundlemanager/sceneProject/bmsstagedemotwo/entry/src/main/ets/FormAbility/FormAbility.ts b/bundlemanager/bundle_standard/bundlemanager/sceneProject/bmsstagedemotwo/entry/src/main/ets/FormAbility/FormAbility.ts index 2f94ce17654ff7562d7bc9878961bbab2219fe92..d443631109f5f73817ec907b36c1b7a3d353d357 100644 --- a/bundlemanager/bundle_standard/bundlemanager/sceneProject/bmsstagedemotwo/entry/src/main/ets/FormAbility/FormAbility.ts +++ b/bundlemanager/bundle_standard/bundlemanager/sceneProject/bmsstagedemotwo/entry/src/main/ets/FormAbility/FormAbility.ts @@ -1,4 +1,4 @@ -import FormExtension from '@ohos.application.FormExtension'; +import FormExtension from '@ohos.app.form.FormExtensionAbility'; import formBindingData from '@ohos.application.formBindingData'; import formInfo from '@ohos.application.formInfo'; diff --git a/bundlemanager/bundle_standard/bundlemanager/sceneProject/bmsstagedemotwo/entry/src/main/ets/ServiceAbility/FormAbility.ts b/bundlemanager/bundle_standard/bundlemanager/sceneProject/bmsstagedemotwo/entry/src/main/ets/ServiceAbility/FormAbility.ts index 2f94ce17654ff7562d7bc9878961bbab2219fe92..d443631109f5f73817ec907b36c1b7a3d353d357 100644 --- a/bundlemanager/bundle_standard/bundlemanager/sceneProject/bmsstagedemotwo/entry/src/main/ets/ServiceAbility/FormAbility.ts +++ b/bundlemanager/bundle_standard/bundlemanager/sceneProject/bmsstagedemotwo/entry/src/main/ets/ServiceAbility/FormAbility.ts @@ -1,4 +1,4 @@ -import FormExtension from '@ohos.application.FormExtension'; +import FormExtension from '@ohos.app.form.FormExtensionAbility'; import formBindingData from '@ohos.application.formBindingData'; import formInfo from '@ohos.application.formInfo'; diff --git a/distributeddatamgr/relationalStoretest/relationalStoreStagetest/entry/src/main/ets/Application/AbilityStage.ts b/distributeddatamgr/relationalStoretest/relationalStoreStagetest/entry/src/main/ets/Application/AbilityStage.ts index 02ecba3c3e620207210edec3de91aa7191f6e8c7..582953b77acfea6ba949ddb2e4c378fd08d042a8 100644 --- a/distributeddatamgr/relationalStoretest/relationalStoreStagetest/entry/src/main/ets/Application/AbilityStage.ts +++ b/distributeddatamgr/relationalStoretest/relationalStoreStagetest/entry/src/main/ets/Application/AbilityStage.ts @@ -13,7 +13,7 @@ * limitations under the License. */ -import AbilityStage from "@ohos.application.AbilityStage" +import AbilityStage from "@ohos.app.ability.AbilityStage" export default class MyAbilityStage extends AbilityStage { onCreate() { diff --git a/distributeddatamgr/relationalStoretest/relationalStoreStagetest/entry/src/main/ets/MainAbility/MainAbility.ts b/distributeddatamgr/relationalStoretest/relationalStoreStagetest/entry/src/main/ets/MainAbility/MainAbility.ts index cc6fdc5ef88488efe7bb9715a0c385c4bc32ffd0..fb807f8be22a061626b54fe23ce5f17031b4cd78 100644 --- a/distributeddatamgr/relationalStoretest/relationalStoreStagetest/entry/src/main/ets/MainAbility/MainAbility.ts +++ b/distributeddatamgr/relationalStoretest/relationalStoreStagetest/entry/src/main/ets/MainAbility/MainAbility.ts @@ -13,7 +13,7 @@ * limitations under the License. */ -import Ability from '@ohos.application.Ability' +import Ability from '@ohos.app.ability.UIAbility' import dataShare from '@ohos.data.dataShare' import rpc from "@ohos.rpc"; @@ -111,7 +111,7 @@ export default class MainAbility extends Ability { console.log("[ttt] [DataShareTest] <> MainAbility onWindowStageCreate") globalThis.abilityContext = this.context; let context = this.context; - dseConnectionId = context.connectAbility(dseWant, dseConnect); + dseConnectionId = context.connectServiceExtensionAbility(dseWant, dseConnect); globalThis.connectDataShareExtAbility = (async () => { console.log("[ttt] [DataShareTest] <> connectDataShareExtAbility begin"); await dataShare.createDataShareHelper(globalThis.abilityContext, dseUri, (err,data)=>{ @@ -122,7 +122,7 @@ export default class MainAbility extends Ability { console.info("[ttt] [DataShareTest] <> ----- 3 -----, err = " + err); console.info("[ttt] [DataShareTest] <> ----- 4 -----, JSON.stringify(err) = " + JSON.stringify(err)); }); - dseConnectionId = await context.connectAbility(dseWant, dseConnect); + dseConnectionId = await context.connectServiceExtensionAbility(dseWant, dseConnect); }) windowStage.setUIContent(this.context, "MainAbility/pages/index", null) } diff --git a/distributeddatamgr/relationalStoretest/relationalStoreStagetest/entry/src/main/ets/TestAbility/TestAbility.ts b/distributeddatamgr/relationalStoretest/relationalStoreStagetest/entry/src/main/ets/TestAbility/TestAbility.ts index 89a84730505783ba229175ab4b55d37f91a16266..8028a70f8af44690b95a08bd177bca6b09f24687 100644 --- a/distributeddatamgr/relationalStoretest/relationalStoreStagetest/entry/src/main/ets/TestAbility/TestAbility.ts +++ b/distributeddatamgr/relationalStoretest/relationalStoreStagetest/entry/src/main/ets/TestAbility/TestAbility.ts @@ -12,7 +12,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import Ability from '@ohos.application.Ability' +import Ability from '@ohos.app.ability.UIAbility' export default class TestAbility extends Ability { onCreate(want, launchParam) { diff --git a/notification/ans_standard/actsNotificationWantAgentTest/src/main/js/test/ActsNotificationWantAgentTest.js b/notification/ans_standard/actsNotificationWantAgentTest/src/main/js/test/ActsNotificationWantAgentTest.js index e729c69ad2e579aee65c55525b4e8117a2937040..9bc97bd597eca14bb126ea79d13bbffb7d21ac75 100644 --- a/notification/ans_standard/actsNotificationWantAgentTest/src/main/js/test/ActsNotificationWantAgentTest.js +++ b/notification/ans_standard/actsNotificationWantAgentTest/src/main/js/test/ActsNotificationWantAgentTest.js @@ -779,72 +779,6 @@ export default function ActsNotificationWantAgentTest() { console.info(`${TAG} SUB_NOTIFICATION_ANS_GET_WANT_AGENT_TEST_2800 END`) }) - /* - * @tc.number : SUB_NOTIFICATION_ANS_GET_WANT_AGENT_TEST_2900 - * @tc.name : function getOperationType(agent: WantAgent, callback: AsyncCallback): void - * @tc.desc : Obtains the {@link OperationType} of a {@link WantAgent} - */ - it('SUB_NOTIFICATION_ANS_GET_WANT_AGENT_TEST_2900', 0, async function (done) { - console.info(`${TAG} SUB_NOTIFICATION_ANS_GET_WANT_AGENT_TEST_2900 START`) - WantAgentInfo.operationType = wantAgent.OperationType.START_ABILITY - WantAgentInfo.wantAgentFlags = [wantAgent.WantAgentFlags.UPDATE_PRESENT_FLAG] - wantAgent.getWantAgent(WantAgentInfo, (err, data) => { - if (err.code) { - console.info(`${TAG} getWantAgent AsyncCallback err: ${err.code}`) - expect(false).assertTrue() - done() - } else { - WantAgent = data - console.info(`${TAG} getWantAgent AsyncCallback success: ${JSON.stringify(data)}`) - wantAgent.getOperationType(WantAgent, (err, data) => { - if (err.code) { - console.info(`${TAG} getOperationType AsyncCallback err: ${err.code}`) - expect(false).assertTrue() - done() - } else { - console.info(`${TAG} getOperationType AsyncCallback success: ${JSON.stringify(data)}`) - expect(true).assertTrue() - done() - } - }) - } - }) - - console.info(`${TAG} SUB_NOTIFICATION_ANS_GET_WANT_AGENT_TEST_2900 END`) - }) - - /* - * @tc.number : SUB_NOTIFICATION_ANS_GET_WANT_AGENT_TEST_3000 - * @tc.name : function getOperationType(agent: WantAgent): Promise - * @tc.desc : Obtains the {@link OperationType} of a {@link WantAgent} - */ - it('SUB_NOTIFICATION_ANS_GET_WANT_AGENT_TEST_3000', 0, async function (done) { - console.info(`${TAG} SUB_NOTIFICATION_ANS_GET_WANT_AGENT_TEST_3000 START`) - WantAgentInfo.operationType = wantAgent.OperationType.START_ABILITY - WantAgentInfo.wantAgentFlags = [wantAgent.WantAgentFlags.UPDATE_PRESENT_FLAG] - wantAgent.getWantAgent(WantAgentInfo).then((data) => { - WantAgent = data - console.info(`${TAG} getWantAgent Promise success: ${JSON.stringify(data)}`) - wantAgent.getOperationType(WantAgent) - .then((data) => { - console.info(`${TAG} getOperationType Promise success: ${JSON.stringify(data)}`) - expect(true).assertTrue() - done() - }) - .catch((err) => { - console.info(`${TAG} getOperationType Promise err: ${err.code}`) - expect(false).assertTrue() - done() - }) - }).catch((err) => { - console.info(`${TAG} getWantAgent Promise err: ${err.code}`) - expect(false).assertTrue() - done() - }) - - console.info(`${TAG} SUB_NOTIFICATION_ANS_GET_WANT_AGENT_TEST_3000 END`) - }) - /* * @tc.number : SUB_NOTIFICATION_ANS_GET_WANT_AGENT_TEST_3100 * @tc.name : function trigger(agent: WantAgent, triggerInfo: TriggerInfo, callback?: AsyncCallback): void diff --git a/request/RequestTest_Stage/entry/src/main/ets/Application/MyAbilityStage.ts b/request/RequestTest_Stage/entry/src/main/ets/Application/MyAbilityStage.ts index 4bea34b35db86d55f1a555e4bfb97778968567d6..63c0efb17ceebd35073960da80893eb3040b0426 100644 --- a/request/RequestTest_Stage/entry/src/main/ets/Application/MyAbilityStage.ts +++ b/request/RequestTest_Stage/entry/src/main/ets/Application/MyAbilityStage.ts @@ -1,5 +1,5 @@ import hilog from '@ohos.hilog'; -import AbilityStage from "@ohos.application.AbilityStage" +import AbilityStage from "@ohos.app.ability.AbilityStage" export default class MyAbilityStage extends AbilityStage { onCreate() { diff --git a/request/RequestTest_Stage/entry/src/main/ets/MainAbility/MainAbility.ts b/request/RequestTest_Stage/entry/src/main/ets/MainAbility/MainAbility.ts index ad865b2b2787af7cc278153dbfc1ed070e59f09e..ef31b90804bc66568248b24b04826f672614b2f6 100644 --- a/request/RequestTest_Stage/entry/src/main/ets/MainAbility/MainAbility.ts +++ b/request/RequestTest_Stage/entry/src/main/ets/MainAbility/MainAbility.ts @@ -2,7 +2,7 @@ import hilog from '@ohos.hilog'; import Window from '@ohos.window'; import { Hypium } from '@ohos/hypium'; import testsuite from '../test/List.test'; -import Ability from '@ohos.application.Ability'; +import Ability from '@ohos.app.ability.UIAbility'; import AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry'; export default class MainAbility extends Ability { diff --git a/wukong/actswukongtest/entry/src/main/ets/Application/AbilityStage.ts b/wukong/actswukongtest/entry/src/main/ets/Application/AbilityStage.ts index 8d437d73a82bd94a6ef7c8a68a5b1e437ae41586..1d1d739c3fa2bd3ea97dcabfdeef7c850a96253e 100644 --- a/wukong/actswukongtest/entry/src/main/ets/Application/AbilityStage.ts +++ b/wukong/actswukongtest/entry/src/main/ets/Application/AbilityStage.ts @@ -13,7 +13,7 @@ * limitations under the License. */ -import AbilityStage from "@ohos.application.AbilityStage" +import AbilityStage from "@ohos.app.ability.AbilityStage" export default class MyAbilityStage extends AbilityStage { onCreate() { diff --git a/wukong/actswukongtest/entry/src/main/ets/MainAbility/MainAbility.ts b/wukong/actswukongtest/entry/src/main/ets/MainAbility/MainAbility.ts index eb03ab5e6d6eb668c4b9b09aabb2cd0b8cc98346..82fe2dfe3bdeda9ec3c73e2aed3d92140b94268f 100644 --- a/wukong/actswukongtest/entry/src/main/ets/MainAbility/MainAbility.ts +++ b/wukong/actswukongtest/entry/src/main/ets/MainAbility/MainAbility.ts @@ -15,7 +15,7 @@ import AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry' import { Hypium } from '@ohos/hypium' import testsuite from '../test/List.test' -import Ability from '@ohos.application.Ability' +import Ability from '@ohos.app.ability.UIAbility' export default class MainAbility extends Ability { onCreate(want, launchParam) {