提交 8ad81948 编写于 作者: X xinking129

changeCheckCode

Signed-off-by: Nxinking129 <xinxin13@huawei.com>
上级 6bdeb4ff
......@@ -50,7 +50,7 @@ export default class UiExtAbility extends UIExtensionAbility {
str: data.want.parameters.action,
result: data.resultCode
}
}
};
commonEvent.publish('ACTS_CALL_EVENT', commonEventData, (err) => {
console.debug('====>AsyncCallback_0200 first publish err:' + JSON.stringify(err));
});
......
......@@ -14,10 +14,12 @@
*/
import UIAbility from '@ohos.app.ability.UIAbility';
import hilog from '@ohos.hilog';
import window from '@ohos.window';
import type window from '@ohos.window';
const CUMULATIVE = 2;
export default class OtherAbility extends UIAbility {
asyncCallback_0300: number = 0;
circulate: number = 0;
onCreate(want, launchParam) {
console.log('=====> OtherAbility onCreate =====>');
......@@ -46,9 +48,9 @@ export default class OtherAbility extends UIAbility {
onForeground() {
console.log('=====> OtherAbility onForeground =====>');
this.asyncCallback_0300++;
console.log(`=====> OtherAbility asyncCallback_0300 count: ${this.asyncCallback_0300}`);
if (this.asyncCallback_0300 === 2) {
this.circulate++;
console.log(`=====> OtherAbility circulate count: ${this.circulate}`);
if (this.circulate === CUMULATIVE) {
this.context.terminateSelfWithResult({
resultCode: 0,
want: {
......
......@@ -39,14 +39,14 @@ export default class OpenHarmonyTestRunner implements TestRunner {
hilog.info(0x0000, 'testTag', '%{public}s', 'OpenHarmonyTestRunner onRun run');
abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments()
abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator()
var testAbilityName = abilityDelegatorArguments.bundleName + '.TestAbility';
let testAbilityName = abilityDelegatorArguments.bundleName + '.TestAbility';
let lMonitor = {
abilityName: testAbilityName,
onAbilityCreate: onAbilityCreateCallback,
};
abilityDelegator.addAbilityMonitor(lMonitor, addAbilityMonitorCallback)
var cmd = 'aa start -d 0 -a TestAbility' + ' -b ' + abilityDelegatorArguments.bundleName;
var debug = abilityDelegatorArguments.parameters['-D'];
let cmd = 'aa start -d 0 -a TestAbility' + ' -b ' + abilityDelegatorArguments.bundleName;
let debug = abilityDelegatorArguments.parameters['-D'];
if (debug == 'true') {
cmd += ' -D'
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册