Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
9254cff6
X
Xts Acts
项目概览
OpenHarmony
/
Xts Acts
1 年多 前同步成功
通知
9
Star
22
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
X
Xts Acts
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
9254cff6
编写于
7月 04, 2023
作者:
O
openharmony_ci
提交者:
Gitee
7月 04, 2023
浏览文件
操作
浏览文件
下载
差异文件
!9203 修复ActsAbilityMonitorTest偶现事件订阅对象被回收造成失败
Merge pull request !9203 from songjindian/change_monitor
上级
8bacc473
271a314b
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
466 addition
and
460 deletion
+466
-460
ability/ability_runtime/abilitymontior/entry/src/main/ets/test/Ability.test.ets
...e/abilitymontior/entry/src/main/ets/test/Ability.test.ets
+466
-460
未找到文件。
ability/ability_runtime/abilitymontior/entry/src/main/ets/test/Ability.test.ets
浏览文件 @
9254cff6
...
...
@@ -115,15 +115,8 @@ export default function abilityTest() {
}
}, (async (err) => {
console.debug("====>ACTS_AddAbilityMonitor_0200 success====>" + err.code);
await globalThis.abilitydelegator.startAbility(
{
bundleName: 'com.example.abilitymonitortest',
abilityName: 'MainAbility2'
}).then(async () => {
console.debug("====>0200startAbility success====>");
await Subscriber.createSubscriber(commonEventSubscribeInfo, async (err, data) => {
console.info("===ACTS_AddAbilityMonitor_0200===createSubscriber"
+ JSON.stringify(data));
Subscriber.createSubscriber(commonEventSubscribeInfo, async (err, data) => {
console.info("===ACTS_AddAbilityMonitor_0200===createSubscriber" + JSON.stringify(data));
var AddAbility = data
await Subscriber.subscribe(data, (err, data) => {
console.log('===ACTS_AddAbilityMonitor_0200CallBack==='
...
...
@@ -145,6 +138,12 @@ export default function abilityTest() {
}
})
})
await globalThis.abilitydelegator.startAbility(
{
bundleName: 'com.example.abilitymonitortest',
abilityName: 'MainAbility2'
}).then(async () => {
console.debug("====>0200startAbility success====>");
})
}))
})
...
...
@@ -268,17 +267,10 @@ export default function abilityTest() {
onAbilityDestroy: onAbilityDestroy
}, (async (err) => {
console.debug("====>ACTS_AddAbilityMonitor_0400 success====>" + err.code);
await globalThis.abilitydelegator.startAbility(
{
bundleName: 'com.example.abilitymonitortest',
abilityName: 'MainAbility4'
}).then(async () => {
console.debug("====>0400startAbility success====>");
await Subscriber.createSubscriber(commonEventSubscribeInfo, async (err, data) => {
console.info("===ACTS_AddAbilityMonitor_0400===createSubscriber"
+ JSON.stringify(data));
Subscriber.createSubscriber(commonEventSubscribeInfo, async (err, data) => {
console.info("===ACTS_AddAbilityMonitor_0400===createSubscriber" + JSON.stringify(data));
var AddAbility = data
await
Subscriber.subscribe(data, (err, data) => {
Subscriber.subscribe(data, (err, data) => {
console.log('===ACTS_AddAbilityMonitor_0400CallBack==='
+ err.code + JSON.stringify(data))
Subscriber.unsubscribe(AddAbility, (err, data) => {
...
...
@@ -298,6 +290,12 @@ export default function abilityTest() {
}
})
})
await globalThis.abilitydelegator.startAbility(
{
bundleName: 'com.example.abilitymonitortest',
abilityName: 'MainAbility4'
}).then(async () => {
console.debug("====>0400startAbility success====>");
})
}))
})
...
...
@@ -332,17 +330,11 @@ export default function abilityTest() {
onWindowStageCreate: onWindowStageCreate
}, (async (err) => {
console.debug("====>ACTS_AddAbilityMonitor_0500 success====>" + err.code);
await globalThis.abilitydelegator.startAbility(
{
bundleName: 'com.example.abilitymonitortest',
abilityName: 'MainAbility2'
}).then(async () => {
console.debug("====>0500startAbility success====>");
await Subscriber.createSubscriber(commonEventSubscribeInfo, async (err, data) => {
Subscriber.createSubscriber(commonEventSubscribeInfo, async (err, data) => {
console.info("===ACTS_AddAbilityMonitor_0500===createSubscriber"
+ JSON.stringify(data));
var AddAbility = data
await
Subscriber.subscribe(data, (err, data) => {
Subscriber.subscribe(data, (err, data) => {
console.log('===ACTS_AddAbilityMonitor_0500CallBack==='
+ err.code + JSON.stringify(data))
Subscriber.unsubscribe(AddAbility, (err, data) => {
...
...
@@ -362,6 +354,12 @@ export default function abilityTest() {
}
})
})
await globalThis.abilitydelegator.startAbility(
{
bundleName: 'com.example.abilitymonitortest',
abilityName: 'MainAbility2'
}).then(async () => {
console.debug("====>0500startAbility success====>");
})
}))
})
...
...
@@ -396,17 +394,11 @@ export default function abilityTest() {
onWindowStageDestroy: onWindowStageDestroy
}, (async (err) => {
console.debug("====>ACTS_AddAbilityMonitor_0600 success====>" + err.code);
await globalThis.abilitydelegator.startAbility(
{
bundleName: 'com.example.abilitymonitortest',
abilityName: 'MainAbility4'
}).then(async () => {
console.debug("====>0600startAbility success====>");
await Subscriber.createSubscriber(commonEventSubscribeInfo, async (err, data) => {
Subscriber.createSubscriber(commonEventSubscribeInfo, async (err, data) => {
console.info("===ACTS_AddAbilityMonitor_0600===createSubscriber"
+ JSON.stringify(data));
var AddAbility = data
await
Subscriber.subscribe(data, (err, data) => {
Subscriber.subscribe(data, (err, data) => {
console.log('===ACTS_AddAbilityMonitor_0600CallBack==='
+ err.code + JSON.stringify(data))
Subscriber.unsubscribe(AddAbility, () => {
...
...
@@ -426,6 +418,12 @@ export default function abilityTest() {
}
})
})
await globalThis.abilitydelegator.startAbility(
{
bundleName: 'com.example.abilitymonitortest',
abilityName: 'MainAbility4'
}).then(async () => {
console.debug("====>0600startAbility success====>");
})
}))
})
...
...
@@ -468,17 +466,11 @@ export default function abilityTest() {
onAbilityCreate: onAbilityCreate
}, (async (err) => {
console.debug("====>ACTS_AddAbilityMonitor_0700 addAbilityMonitorsec====>" + err.code);
await globalThis.abilitydelegator.startAbility(
{
bundleName: 'com.example.abilitymonitortest',
abilityName: 'MainAbility2'
}).then(async () => {
console.debug("====>0700startAbility success====>");
await Subscriber.createSubscriber(commonEventSubscribeInfo, async (err, data) => {
Subscriber.createSubscriber(commonEventSubscribeInfo, async (err, data) => {
console.info("===ACTS_AddAbilityMonitor_0700===createSubscriber"
+ JSON.stringify(data));
var AddAbility = data
await
Subscriber.subscribe(AddAbility, (err, data) => {
Subscriber.subscribe(AddAbility, (err, data) => {
console.log('===ACTS_AddAbilityMonitor_0700CallBack==='
+ err.code + JSON.stringify(data))
Subscriber.unsubscribe(AddAbility, (err, data) => {
...
...
@@ -498,6 +490,12 @@ export default function abilityTest() {
}
})
})
await globalThis.abilitydelegator.startAbility(
{
bundleName: 'com.example.abilitymonitortest',
abilityName: 'MainAbility2'
}).then(async () => {
console.debug("====>0700startAbility success====>");
})
}))
}))
...
...
@@ -533,17 +531,11 @@ export default function abilityTest() {
onAbilityCreate: onAbilityCreatePromise
}).then(() => {
console.debug("====>ACTS_AddAbilityMonitor_0800 success====>");
globalThis.abilitydelegator.startAbility(
{
bundleName: 'com.example.abilitymonitortest',
abilityName: 'MainAbility2'
}).then(async () => {
console.debug("====>0800startAbility success====>");
await Subscriber.createSubscriber(commonEventSubscribeInfo, async (err, data) => {
Subscriber.createSubscriber(commonEventSubscribeInfo, async (err, data) => {
console.info("===ACTS_AddAbilityMonitor_0800===createSubscriber"
+ JSON.stringify(data));
var AddAbility = data
await
Subscriber.subscribe(AddAbility, (err, data) => {
Subscriber.subscribe(AddAbility, (err, data) => {
console.log('===ACTS_AddAbilityMonitor_0800CallBack==='
+ err.code + JSON.stringify(data))
Subscriber.unsubscribe(AddAbility, (err, data) => {
...
...
@@ -563,6 +555,12 @@ export default function abilityTest() {
}
})
})
globalThis.abilitydelegator.startAbility(
{
bundleName: 'com.example.abilitymonitortest',
abilityName: 'MainAbility2'
}).then(async () => {
console.debug("====>0800startAbility success====>");
})
})
})
...
...
@@ -597,17 +595,11 @@ export default function abilityTest() {
onAbilityForeground: onAbilityForegroundPromise
}).then(async () => {
console.debug("====>ACTS_AddAbilityMonitor_0900 success====>");
await globalThis.abilitydelegator.startAbility(
{
bundleName: 'com.example.abilitymonitortest',
abilityName: 'MainAbility2'
}).then(async () => {
console.debug("====>0900startAbility success====>");
await Subscriber.createSubscriber(commonEventSubscribeInfo, async (err, data) => {
Subscriber.createSubscriber(commonEventSubscribeInfo, async (err, data) => {
console.info("===ACTS_AddAbilityMonitor_0900===createSubscriber"
+ JSON.stringify(data));
var AddAbility = data
await
Subscriber.subscribe(AddAbility, (err, data) => {
Subscriber.subscribe(AddAbility, (err, data) => {
console.log('===ACTS_AddAbilityMonitor_0900CallBack==='
+ err.code + JSON.stringify(data))
Subscriber.unsubscribe(AddAbility, () => {
...
...
@@ -627,6 +619,12 @@ export default function abilityTest() {
}
})
})
await globalThis.abilitydelegator.startAbility(
{
bundleName: 'com.example.abilitymonitortest',
abilityName: 'MainAbility2'
}).then(async () => {
console.debug("====>0900startAbility success====>");
})
})
})
...
...
@@ -751,17 +749,11 @@ export default function abilityTest() {
onAbilityDestroy: onAbilityDestroyPromise
}).then(async () => {
console.debug("====>ACTS_AddAbilityMonitor_1100 success====>");
await globalThis.abilitydelegator.startAbility(
{
bundleName: 'com.example.abilitymonitortest',
abilityName: 'MainAbility4'
}).then(async () => {
console.debug("====>1100startAbility success====>");
await Subscriber.createSubscriber(commonEventSubscribeInfo, async (err, data) => {
Subscriber.createSubscriber(commonEventSubscribeInfo, async (err, data) => {
console.info("===ACTS_AddAbilityMonitor_1100===createSubscriber"
+ JSON.stringify(data));
var AddAbility = data
await
Subscriber.subscribe(data, (err, data) => {
Subscriber.subscribe(data, (err, data) => {
console.log('===ACTS_AddAbilityMonitor_1100CallBack==='
+ err.code + JSON.stringify(data))
Subscriber.unsubscribe(AddAbility, (err, data) => {
...
...
@@ -781,6 +773,12 @@ export default function abilityTest() {
}
})
})
await globalThis.abilitydelegator.startAbility(
{
bundleName: 'com.example.abilitymonitortest',
abilityName: 'MainAbility4'
}).then(async () => {
console.debug("====>1100startAbility success====>");
})
})
})
...
...
@@ -815,17 +813,11 @@ export default function abilityTest() {
onWindowStageCreate: onWindowStageCreatePromise
}).then(async () => {
console.debug("====>ACTS_AddAbilityMonitor_1200 success====>");
await globalThis.abilitydelegator.startAbility(
{
bundleName: 'com.example.abilitymonitortest',
abilityName: 'MainAbility2'
}).then(async () => {
console.debug("====>1200startAbility success====>");
await Subscriber.createSubscriber(commonEventSubscribeInfo, async (err, data) => {
Subscriber.createSubscriber(commonEventSubscribeInfo, async (err, data) => {
console.info("===ACTS_AddAbilityMonitor_1200===createSubscriber"
+ JSON.stringify(data));
var AddAbility = data
await
Subscriber.subscribe(data, (err, data) => {
Subscriber.subscribe(data, (err, data) => {
console.log('===ACTS_AddAbilityMonitor_1200CallBack==='
+ err.code + JSON.stringify(data))
Subscriber.unsubscribe(AddAbility, (err, data) => {
...
...
@@ -845,6 +837,12 @@ export default function abilityTest() {
}
})
})
await globalThis.abilitydelegator.startAbility(
{
bundleName: 'com.example.abilitymonitortest',
abilityName: 'MainAbility2'
}).then(async () => {
console.debug("====>1200startAbility success====>");
})
})
})
...
...
@@ -879,17 +877,11 @@ export default function abilityTest() {
onWindowStageDestroy: onWindowStageDestroyPromsie
}).then(async () => {
console.debug("====>ACTS_AddAbilityMonitor_1300 success====>");
await globalThis.abilitydelegator.startAbility(
{
bundleName: 'com.example.abilitymonitortest',
abilityName: 'MainAbility4'
}).then(async () => {
console.debug("====>1300startAbility success====>");
await Subscriber.createSubscriber(commonEventSubscribeInfo, async (err, data) => {
Subscriber.createSubscriber(commonEventSubscribeInfo, async (err, data) => {
console.info("===ACTS_AddAbilityMonitor_1300===createSubscriber"
+ JSON.stringify(data));
var AddAbility = data
await
Subscriber.subscribe(data, (err, data) => {
Subscriber.subscribe(data, (err, data) => {
console.log('===ACTS_AddAbilityMonitor_1300CallBack==='
+ err.code + JSON.stringify(data))
Subscriber.unsubscribe(AddAbility, () => {
...
...
@@ -909,6 +901,12 @@ export default function abilityTest() {
}
})
})
await globalThis.abilitydelegator.startAbility(
{
bundleName: 'com.example.abilitymonitortest',
abilityName: 'MainAbility4'
}).then(async () => {
console.debug("====>1300startAbility success====>");
})
})
})
...
...
@@ -948,17 +946,11 @@ export default function abilityTest() {
abilityName: 'MainAbility2',
onAbilityCreate: onAbilityCreate
}).then(async () => {
await globalThis.abilitydelegator.startAbility(
{
bundleName: 'com.example.abilitymonitortest',
abilityName: 'MainAbility2'
}).then(async () => {
console.debug("====>1400startAbility success====>");
await Subscriber.createSubscriber(commonEventSubscribeInfo, async (err, data) => {
Subscriber.createSubscriber(commonEventSubscribeInfo, async (err, data) => {
console.info("===ACTS_AddAbilityMonitor_1400===createSubscriber"
+ JSON.stringify(data));
var AddAbility = data
await
Subscriber.subscribe(AddAbility, (err, data) => {
Subscriber.subscribe(AddAbility, (err, data) => {
console.log('===ACTS_AddAbilityMonitor_1400CallBack==='
+ err.code + JSON.stringify(data))
Subscriber.unsubscribe(AddAbility, (err, data) => {
...
...
@@ -978,6 +970,12 @@ export default function abilityTest() {
}
})
})
await globalThis.abilitydelegator.startAbility(
{
bundleName: 'com.example.abilitymonitortest',
abilityName: 'MainAbility2'
}).then(async () => {
console.debug("====>1400startAbility success====>");
})
})
})
...
...
@@ -1600,15 +1598,10 @@ export default function abilityTest() {
expect(err.code).assertEqual(0)
console.debug("====>ACTS_WaitAbilityMonitor_Callback_0100 success====>");
})
await globalThis.abilitydelegator.startAbility(
{
bundleName: 'com.example.abilitymonitortest',
abilityName: 'MainAbility2'
}).then(async () => {
await Subscriber.createSubscriber(commonEventSubscribeInfo, async (err, data) => {
Subscriber.createSubscriber(commonEventSubscribeInfo, async (err, data) => {
console.info("===ACTS_WaitAbilityMonitor_Callback_0100===createSubscriber" + JSON.stringify(data));
var AddAbility = data
await
Subscriber.subscribe(AddAbility, (err, data) => {
Subscriber.subscribe(AddAbility, (err, data) => {
console.log('===ACTS_WaitAbilityMonitor_Callback_0100===' + err.code + JSON.stringify(data))
Subscriber.unsubscribe(AddAbility, () => {
console.log('===UnSubscribeCallBack===')
...
...
@@ -1627,6 +1620,12 @@ export default function abilityTest() {
}
})
})
await globalThis.abilitydelegator.startAbility(
{
bundleName: 'com.example.abilitymonitortest',
abilityName: 'MainAbility2'
}).then(async () => {
console.debug("====>ACTS_WaitAbilityMonitor_Callback_0100 startAbility success====>");
})
})
...
...
@@ -1704,16 +1703,11 @@ export default function abilityTest() {
expect(err.code).assertEqual(0)
console.debug("====>ACTS_WaitAbilityMonitor_Callback_0300 success====>");
})
await globalThis.abilitydelegator.startAbility(
{
bundleName: 'com.example.abilitymonitortest',
abilityName: 'MainAbility2'
}).then(async () => {
await Subscriber.createSubscriber(commonEventSubscribeInfo, async (err, data) => {
Subscriber.createSubscriber(commonEventSubscribeInfo, async (err, data) => {
console.info("===ACTS_WaitAbilityMonitor_Callback_0300===createSubscriber"
+ JSON.stringify(data));
var AddAbility = data
await
Subscriber.subscribe(AddAbility, (err, data) => {
Subscriber.subscribe(AddAbility, (err, data) => {
console.log('===ACTS_WaitAbilityMonitor_Callback_0300==='
+ err.code + JSON.stringify(data))
Subscriber.unsubscribe(AddAbility, () => {
...
...
@@ -1733,6 +1727,12 @@ export default function abilityTest() {
}
})
})
await globalThis.abilitydelegator.startAbility(
{
bundleName: 'com.example.abilitymonitortest',
abilityName: 'MainAbility2'
}).then(async () => {
console.debug("====>ACTS_WaitAbilityMonitor_Callback_0300 startAbility success====>");
})
})
...
...
@@ -1810,16 +1810,11 @@ export default function abilityTest() {
expect(err.code).assertEqual(0)
console.debug("====>ACTS_WaitAbilityMonitor_Callback_0500 success====>");
})
await globalThis.abilitydelegator.startAbility(
{
bundleName: 'com.example.abilitymonitortest',
abilityName: 'MainAbility2'
}).then(async () => {
await Subscriber.createSubscriber(commonEventSubscribeInfo, async (err, data) => {
Subscriber.createSubscriber(commonEventSubscribeInfo, async (err, data) => {
console.info("===ACTS_WaitAbilityMonitor_Callback_0500===createSubscriber"
+ JSON.stringify(data));
var AddAbility = data
await
Subscriber.subscribe(AddAbility, (err, data) => {
Subscriber.subscribe(AddAbility, (err, data) => {
console.log('===ACTS_WaitAbilityMonitor_Callback_0500===' + err.code
+ JSON.stringify(data))
Subscriber.unsubscribe(AddAbility, () => {
...
...
@@ -1839,6 +1834,12 @@ export default function abilityTest() {
}
})
})
await globalThis.abilitydelegator.startAbility(
{
bundleName: 'com.example.abilitymonitortest',
abilityName: 'MainAbility2'
}).then(async () => {
console.debug("====>ACTS_WaitAbilityMonitor_Callback_0500 startAbility success====>");
})
})
...
...
@@ -1876,16 +1877,11 @@ export default function abilityTest() {
expect(err.code).assertEqual(0)
console.debug("====>ACTS_WaitAbilityMonitor_Callback_0600 success====>");
})
await globalThis.abilitydelegator.startAbility(
{
bundleName: 'com.example.abilitymonitortest',
abilityName: 'MainAbility2'
}).then(async () => {
await Subscriber.createSubscriber(commonEventSubscribeInfo, async (err, data) => {
Subscriber.createSubscriber(commonEventSubscribeInfo, async (err, data) => {
console.info("===ACTS_WaitAbilityMonitor_Callback_0600===createSubscriber"
+ JSON.stringify(data));
var AddAbility = data
await
Subscriber.subscribe(AddAbility, (err, data) => {
Subscriber.subscribe(AddAbility, (err, data) => {
console.log('===ACTS_WaitAbilityMonitor_Callback_0600==='
+ err.code + JSON.stringify(data))
Subscriber.unsubscribe(AddAbility, () => {
...
...
@@ -1905,6 +1901,12 @@ export default function abilityTest() {
}
})
})
await globalThis.abilitydelegator.startAbility(
{
bundleName: 'com.example.abilitymonitortest',
abilityName: 'MainAbility2'
}).then(async () => {
console.debug("====>ACTS_WaitAbilityMonitor_Callback_0600 startAbility success====>");
})
})
...
...
@@ -1939,16 +1941,11 @@ export default function abilityTest() {
data.waitAbilityMonitor(monitor).then(async (data) => {
console.debug("====>ACTS_WaitAbilityMonitor_Promise_0100 success====>");
})
await globalThis.abilitydelegator.startAbility(
{
bundleName: 'com.example.abilitymonitortest',
abilityName: 'MainAbility2'
}).then(async () => {
await Subscriber.createSubscriber(commonEventSubscribeInfo, async (err, data) => {
Subscriber.createSubscriber(commonEventSubscribeInfo, async (err, data) => {
console.info("===ACTS_WaitAbilityMonitor_Promise_0100===createSubscriber"
+ JSON.stringify(data));
var AddAbility = data
await
Subscriber.subscribe(AddAbility, (err, data) => {
Subscriber.subscribe(AddAbility, (err, data) => {
console.log('===ACTS_WaitAbilityMonitor_Promise_0100==='
+ err.code + JSON.stringify(data))
Subscriber.unsubscribe(AddAbility, () => {
...
...
@@ -1968,6 +1965,12 @@ export default function abilityTest() {
}
})
})
await globalThis.abilitydelegator.startAbility(
{
bundleName: 'com.example.abilitymonitortest',
abilityName: 'MainAbility2'
}).then(async () => {
console.debug("====>ACTS_WaitAbilityMonitor_Promise_0100 startAbility success====>");
})
})
...
...
@@ -2040,16 +2043,11 @@ export default function abilityTest() {
data.waitAbilityMonitor(monitor, 1000).then(async (data) => {
console.debug("====>ACTS_WaitAbilityMonitor_Promise_0300 success====>");
})
await globalThis.abilitydelegator.startAbility(
{
bundleName: 'com.example.abilitymonitortest',
abilityName: 'MainAbility2'
}).then(async () => {
await Subscriber.createSubscriber(commonEventSubscribeInfo, async (err, data) => {
Subscriber.createSubscriber(commonEventSubscribeInfo, async (err, data) => {
console.info("===ACTS_WaitAbilityMonitor_Promise_0300===createSubscriber"
+ JSON.stringify(data));
var AddAbility = data
await
Subscriber.subscribe(AddAbility, (err, data) => {
Subscriber.subscribe(AddAbility, (err, data) => {
console.log('===ACTS_WaitAbilityMonitor_Promise_0300==='
+ err.code + JSON.stringify(data))
Subscriber.unsubscribe(AddAbility, () => {
...
...
@@ -2069,6 +2067,12 @@ export default function abilityTest() {
}
})
})
await globalThis.abilitydelegator.startAbility(
{
bundleName: 'com.example.abilitymonitortest',
abilityName: 'MainAbility2'
}).then(async () => {
console.debug("====>ACTS_WaitAbilityMonitor_Promise_0300 startAbility success====>");
})
})
...
...
@@ -2142,11 +2146,6 @@ export default function abilityTest() {
data.waitAbilityMonitor(monitor, 100).then(async (data) => {
console.debug("====>ACTS_WaitAbilityMonitor_Promise_0500 success====>");
})
await globalThis.abilitydelegator.startAbility(
{
bundleName: 'com.example.abilitymonitortest',
abilityName: 'MainAbility2'
}).then(async () => {
await Subscriber.createSubscriber(commonEventSubscribeInfo, async (err, data) => {
console.info("===ACTS_WaitAbilityMonitor_Promise_0500===createSubscriber"
+ JSON.stringify(data));
...
...
@@ -2171,6 +2170,12 @@ export default function abilityTest() {
}
})
})
await globalThis.abilitydelegator.startAbility(
{
bundleName: 'com.example.abilitymonitortest',
abilityName: 'MainAbility2'
}).then(async () => {
console.debug("====>ACTS_WaitAbilityMonitor_Promise_0500 startAbility success====>");
})
})
...
...
@@ -2206,16 +2211,11 @@ export default function abilityTest() {
data.waitAbilityMonitor(monitor, -1).then(async (data) => {
console.debug("====>ACTS_WaitAbilityMonitor_Promise_0600 success====>");
})
await globalThis.abilitydelegator.startAbility(
{
bundleName: 'com.example.abilitymonitortest',
abilityName: 'MainAbility2'
}).then(async () => {
await Subscriber.createSubscriber(commonEventSubscribeInfo, async (err, data) => {
Subscriber.createSubscriber(commonEventSubscribeInfo, async (err, data) => {
console.info("===ACTS_WaitAbilityMonitor_Promise_0600===createSubscriber"
+ JSON.stringify(data));
var AddAbility = data
await
Subscriber.subscribe(AddAbility, (err, data) => {
Subscriber.subscribe(AddAbility, (err, data) => {
console.log('===ACTS_WaitAbilityMonitor_Promise_0600==='
+ err.code + JSON.stringify(data))
Subscriber.unsubscribe(AddAbility, () => {
...
...
@@ -2235,6 +2235,12 @@ export default function abilityTest() {
}
})
})
await globalThis.abilitydelegator.startAbility(
{
bundleName: 'com.example.abilitymonitortest',
abilityName: 'MainAbility2'
}).then(async () => {
console.debug("====>ACTS_WaitAbilityMonitor_Promise_0600 startAbility success====>");
})
})
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录