diff --git a/validator/acts_validator/src/main/ets/Application/MyAbilityStage.ts b/validator/acts_validator/src/main/ets/Application/MyAbilityStage.ts index 8f1214651c57b2ae8b26efcf88ab4655043e622c..937630c76a0ee09b9408db2b6149101d47ce890f 100644 --- a/validator/acts_validator/src/main/ets/Application/MyAbilityStage.ts +++ b/validator/acts_validator/src/main/ets/Application/MyAbilityStage.ts @@ -1,4 +1,4 @@ -import AbilityStage from "@ohos.application.AbilityStage" +import AbilityStage from "@ohos.app.ability.AbilityStage" import Logger from '../pages/model/Logger' export default class MyAbilityStage extends AbilityStage { diff --git a/validator/acts_validator/src/main/ets/MainAbility/MainAbility.ts b/validator/acts_validator/src/main/ets/MainAbility/MainAbility.ts index 5eb4db42af483fb559ffabe70d57804ab85e3c18..83b643fcaa2696b47f85b3ac214e09dff0510073 100644 --- a/validator/acts_validator/src/main/ets/MainAbility/MainAbility.ts +++ b/validator/acts_validator/src/main/ets/MainAbility/MainAbility.ts @@ -1,4 +1,4 @@ -import Ability from '@ohos.application.Ability' +import Ability from '@ohos.app.ability.UIAbility' import abilityAccessCtrl from '@ohos.abilityAccessCtrl'; export default class MainAbility extends Ability { @@ -17,15 +17,15 @@ export default class MainAbility extends Ability { console.log("[Demo] MainAbility onWindowStageCreate") let AtManager = abilityAccessCtrl.createAtManager(); - AtManager.requestPermissionsFromUser(this.context,["ohos.permission.READ_MEDIA","ohos.permission.WRITE_MEDIA", - "ohos.permission.CAPTURE_SCREEN","ohos.permission.INTERNET","ohos.permission.CAMERA", - "ohos.permission.MICROPHONE", "ohos.permission.START_INVISIBLE_ABILITY"]).then(() => {}) - windowStage.loadContent("pages/index", (err, data) => { + AtManager.requestPermissionsFromUser(this.context,['ohos.permission.READ_MEDIA', 'ohos.permission.WRITE_MEDIA', + 'ohos.permission.CAPTURE_SCREEN', 'ohos.permission.INTERNET', 'ohos.permission.CAMERA', + 'ohos.permission.MICROPHONE', 'ohos.permission.START_INVISIBLE_ABILITY']).then( () => {} ); + windowStage.loadContent('pages/index', (err, data) => { if (err.code) { - console.error('Failed to load the content. Cause:' + JSON.stringify(err)); + console.error( 'Failed to load the content. Cause:' + JSON.stringify(err) ); return; } - console.info('Succeeded in loading the content. Data: ' + JSON.stringify(data)) + console.info( 'Succeeded in loading the content. Data: ' + JSON.stringify(data) ); }); }