Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
6a2dd89c
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看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
6a2dd89c
编写于
4月 18, 2023
作者:
O
openharmony_ci
提交者:
Gitee
4月 18, 2023
浏览文件
操作
浏览文件
下载
差异文件
!8475 适配多设备
Merge pull request !8475 from jerry/master
上级
48557ba4
c07638b5
变更
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
浏览文件 @
6a2dd89c
...
@@ -18,10 +18,12 @@ import commonEvent from '@ohos.commonEvent';
...
@@ -18,10 +18,12 @@ import commonEvent from '@ohos.commonEvent';
var TAG1 = "Fa:SupportFunction:MainAbility:";
var TAG1 = "Fa:SupportFunction:MainAbility:";
var listPush1 = "Fa_SupportFunction_MainAbility_";
var listPush1 = "Fa_SupportFunction_MainAbility_";
var lifeList = [];
var lifeList = [];
var lifeListActive = [];
export default {
export default {
onCreate() {
onCreate() {
console.log(TAG1 + 'onCreate');
console.log(TAG1 + 'onCreate');
lifeList.push('onCreate');
lifeList.push('onCreate');
lifeListActive.push('onCreate');
ability_featureAbility.getWant().then((data) => {
ability_featureAbility.getWant().then((data) => {
console.log(TAG1 + "getWant data = " + JSON.stringify(data));
console.log(TAG1 + "getWant data = " + JSON.stringify(data));
...
@@ -31,6 +33,7 @@ export default {
...
@@ -31,6 +33,7 @@ export default {
ability_featureAbility.getContext().setWakeUpScreen(true).then((data) => {
ability_featureAbility.getContext().setWakeUpScreen(true).then((data) => {
console.log(TAG1 + "setWakeUpScreen data = " + JSON.stringify(data));
console.log(TAG1 + "setWakeUpScreen data = " + JSON.stringify(data));
lifeList.push('wakeUpScreen');
lifeList.push('wakeUpScreen');
lifeListActive.push('wakeUpScreen');
let options = {
let options = {
parameters: {
parameters: {
lifeList: lifeList
lifeList: lifeList
...
@@ -51,6 +54,7 @@ export default {
...
@@ -51,6 +54,7 @@ export default {
console.log(TAG1 + "setWakeUpScreen data = " + JSON.stringify(data));
console.log(TAG1 + "setWakeUpScreen data = " + JSON.stringify(data));
console.log(TAG1 + "setWakeUpScreen error = " + JSON.stringify(error));
console.log(TAG1 + "setWakeUpScreen error = " + JSON.stringify(error));
lifeList.push('wakeUpScreen');
lifeList.push('wakeUpScreen');
lifeListActive.push('wakeUpScreen');
let options = {
let options = {
parameters: {
parameters: {
lifeList: lifeList
lifeList: lifeList
...
@@ -66,6 +70,7 @@ export default {
...
@@ -66,6 +70,7 @@ export default {
ability_featureAbility.getContext().setWakeUpScreen(false).then((data) => {
ability_featureAbility.getContext().setWakeUpScreen(false).then((data) => {
console.log(TAG1 + "setWakeUpScreen data = " + JSON.stringify(data));
console.log(TAG1 + "setWakeUpScreen data = " + JSON.stringify(data));
lifeList.push('wakeUpScreen');
lifeList.push('wakeUpScreen');
lifeListActive.push('wakeUpScreen');
let options = {
let options = {
parameters: {
parameters: {
lifeList: lifeList
lifeList: lifeList
...
@@ -90,11 +95,11 @@ export default {
...
@@ -90,11 +95,11 @@ export default {
},
},
onActive() {
onActive() {
console.log(TAG1 + 'onActive');
console.log(TAG1 + 'onActive');
lifeList.push('onActive');
lifeList
Active
.push('onActive');
let options = {
let options = {
parameters: {
parameters: {
lifeList: lifeList
lifeList: lifeList
Active
}
}
}
}
commonEvent.publish(listPush1 + "onActive", options, (err) => {
commonEvent.publish(listPush1 + "onActive", options, (err) => {
...
...
ability/ability_runtime/actssupportfunction/fasupportfunction/entry/src/main/ets/MainAbility2/app.ets
浏览文件 @
6a2dd89c
...
@@ -18,10 +18,12 @@ import commonEvent from '@ohos.commonEvent';
...
@@ -18,10 +18,12 @@ import commonEvent from '@ohos.commonEvent';
var TAG1 = "Fa:SupportFunction:MainAbility2:";
var TAG1 = "Fa:SupportFunction:MainAbility2:";
var listPush1 = "Fa_SupportFunction_MainAbility2_";
var listPush1 = "Fa_SupportFunction_MainAbility2_";
var lifeList = [];
var lifeList = [];
var lifeListActive = [];
export default {
export default {
async onCreate() {
async onCreate() {
console.log(TAG1 + 'onCreate');
console.log(TAG1 + 'onCreate');
lifeList.push('onCreate');
lifeList.push('onCreate');
lifeListActive.push('onCreate');
ability_featureAbility.getWant().then(async (data) => {
ability_featureAbility.getWant().then(async (data) => {
console.log(TAG1 + "getWant data = " + JSON.stringify(data));
console.log(TAG1 + "getWant data = " + JSON.stringify(data));
...
@@ -43,6 +45,7 @@ export default {
...
@@ -43,6 +45,7 @@ export default {
}
}
await sleep(300);
await sleep(300);
lifeList.push('wakeUpScreen');
lifeList.push('wakeUpScreen');
lifeListActive.push('wakeUpScreen');
let options = {
let options = {
parameters: {
parameters: {
lifeList: lifeList
lifeList: lifeList
...
@@ -60,11 +63,11 @@ export default {
...
@@ -60,11 +63,11 @@ export default {
},
},
onActive() {
onActive() {
console.log(TAG1 + 'onActive');
console.log(TAG1 + 'onActive');
lifeList.push('onActive');
lifeList
Active
.push('onActive');
let options = {
let options = {
parameters: {
parameters: {
lifeList: lifeList
lifeList: lifeList
Active
}
}
}
}
commonEvent.publish(listPush1 + "onActive", options, (err) => {
commonEvent.publish(listPush1 + "onActive", options, (err) => {
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录