Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
4624207a
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看板
提交
4624207a
编写于
4月 18, 2023
作者:
U
unknown
提交者:
jerry
4月 18, 2023
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fixed
c07638b5
from
https://gitee.com/littlejerry1/xts_acts/pulls/8475
add user Signed-off-by:
N
unknown
<
sijunjie@huawei.com
>
上级
dbb24d56
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
12 addition
and
4 deletion
+12
-4
ability/ability_runtime/actssupportfunction/fasupportfunction/entry/src/main/ets/MainAbility/app.ets
.../fasupportfunction/entry/src/main/ets/MainAbility/app.ets
+7
-2
ability/ability_runtime/actssupportfunction/fasupportfunction/entry/src/main/ets/MainAbility2/app.ets
...fasupportfunction/entry/src/main/ets/MainAbility2/app.ets
+5
-2
未找到文件。
ability/ability_runtime/actssupportfunction/fasupportfunction/entry/src/main/ets/MainAbility/app.ets
浏览文件 @
4624207a
...
...
@@ -18,10 +18,12 @@ import commonEvent from '@ohos.commonEvent';
var TAG1 = "Fa:SupportFunction:MainAbility:";
var listPush1 = "Fa_SupportFunction_MainAbility_";
var lifeList = [];
var lifeListActive = [];
export default {
onCreate() {
console.log(TAG1 + 'onCreate');
lifeList.push('onCreate');
lifeListActive.push('onCreate');
ability_featureAbility.getWant().then((data) => {
console.log(TAG1 + "getWant data = " + JSON.stringify(data));
...
...
@@ -31,6 +33,7 @@ export default {
ability_featureAbility.getContext().setWakeUpScreen(true).then((data) => {
console.log(TAG1 + "setWakeUpScreen data = " + JSON.stringify(data));
lifeList.push('wakeUpScreen');
lifeListActive.push('wakeUpScreen');
let options = {
parameters: {
lifeList: lifeList
...
...
@@ -51,6 +54,7 @@ export default {
console.log(TAG1 + "setWakeUpScreen data = " + JSON.stringify(data));
console.log(TAG1 + "setWakeUpScreen error = " + JSON.stringify(error));
lifeList.push('wakeUpScreen');
lifeListActive.push('wakeUpScreen');
let options = {
parameters: {
lifeList: lifeList
...
...
@@ -66,6 +70,7 @@ export default {
ability_featureAbility.getContext().setWakeUpScreen(false).then((data) => {
console.log(TAG1 + "setWakeUpScreen data = " + JSON.stringify(data));
lifeList.push('wakeUpScreen');
lifeListActive.push('wakeUpScreen');
let options = {
parameters: {
lifeList: lifeList
...
...
@@ -90,11 +95,11 @@ export default {
},
onActive() {
console.log(TAG1 + 'onActive');
lifeList.push('onActive');
lifeList
Active
.push('onActive');
let options = {
parameters: {
lifeList: lifeList
lifeList: lifeList
Active
}
}
commonEvent.publish(listPush1 + "onActive", options, (err) => {
...
...
ability/ability_runtime/actssupportfunction/fasupportfunction/entry/src/main/ets/MainAbility2/app.ets
浏览文件 @
4624207a
...
...
@@ -18,10 +18,12 @@ import commonEvent from '@ohos.commonEvent';
var TAG1 = "Fa:SupportFunction:MainAbility2:";
var listPush1 = "Fa_SupportFunction_MainAbility2_";
var lifeList = [];
var lifeListActive = [];
export default {
async onCreate() {
console.log(TAG1 + 'onCreate');
lifeList.push('onCreate');
lifeListActive.push('onCreate');
ability_featureAbility.getWant().then(async (data) => {
console.log(TAG1 + "getWant data = " + JSON.stringify(data));
...
...
@@ -43,6 +45,7 @@ export default {
}
await sleep(300);
lifeList.push('wakeUpScreen');
lifeListActive.push('wakeUpScreen');
let options = {
parameters: {
lifeList: lifeList
...
...
@@ -60,11 +63,11 @@ export default {
},
onActive() {
console.log(TAG1 + 'onActive');
lifeList.push('onActive');
lifeList
Active
.push('onActive');
let options = {
parameters: {
lifeList: lifeList
lifeList: lifeList
Active
}
}
commonEvent.publish(listPush1 + "onActive", options, (err) => {
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录