Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
656de45a
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看板
未验证
提交
656de45a
编写于
4月 13, 2023
作者:
O
openharmony_ci
提交者:
Gitee
4月 13, 2023
浏览文件
操作
浏览文件
下载
差异文件
!8434 Solve XTS ActsSupportFunctionTest Fail Problem
Merge pull request !8434 from zhoujun62/my_xts_acts
上级
03e3414b
cf9adc65
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
123 addition
and
34 deletion
+123
-34
ability/ability_runtime/actsqueryfunctiontest/actsgetcurrenttopabilitystageatest/Test.json
...functiontest/actsgetcurrenttopabilitystageatest/Test.json
+8
-0
ability/ability_runtime/actssupportfunction/actsonandoffscreentest/Test.json
...time/actssupportfunction/actsonandoffscreentest/Test.json
+8
-0
ability/ability_runtime/actssupportfunction/actsonandoffscreentest/entry/src/main/module.json
...unction/actsonandoffscreentest/entry/src/main/module.json
+6
-0
ability/ability_runtime/actssupportfunction/actssupportfunctiontest/Test.json
...ime/actssupportfunction/actssupportfunctiontest/Test.json
+8
-0
ability/ability_runtime/actssupportfunction/actssupportfunctiontest/entry/src/main/ets/test/FaShowOnLock.test.ets
...unctiontest/entry/src/main/ets/test/FaShowOnLock.test.ets
+32
-32
ability/ability_runtime/actssupportfunction/actssupportfunctiontest/entry/src/main/module.json
...nction/actssupportfunctiontest/entry/src/main/module.json
+6
-0
ability/ability_runtime/actssupportfunction/fasupportfunction/entry/src/main/ets/MainAbility/app.ets
.../fasupportfunction/entry/src/main/ets/MainAbility/app.ets
+27
-0
ability/ability_runtime/actssupportfunction/fasupportfunction/entry/src/main/ets/MainAbility2/app.ets
...fasupportfunction/entry/src/main/ets/MainAbility2/app.ets
+16
-2
ability/ability_runtime/actssupportfunction/stageonandoffscreen/entry/src/main/module.json
...rtfunction/stageonandoffscreen/entry/src/main/module.json
+6
-0
ability/ability_runtime/actssupportfunction/stagesupportfunction/entry/src/main/module.json
...tfunction/stagesupportfunction/entry/src/main/module.json
+6
-0
未找到文件。
ability/ability_runtime/actsqueryfunctiontest/actsgetcurrenttopabilitystageatest/Test.json
浏览文件 @
656de45a
...
@@ -14,6 +14,14 @@
...
@@ -14,6 +14,14 @@
],
],
"type"
:
"AppInstallKit"
,
"type"
:
"AppInstallKit"
,
"cleanup-apps"
:
true
"cleanup-apps"
:
true
},
{
"type"
:
"ShellKit"
,
"run-command"
:
[
"power-shell wakeup"
,
"power-shell setmode 602"
,
"uinput -T -d 300 600 -m 300 600 300 100 -u 300 100"
]
}
}
]
]
}
}
...
...
ability/ability_runtime/actssupportfunction/actsonandoffscreentest/Test.json
浏览文件 @
656de45a
...
@@ -17,6 +17,14 @@
...
@@ -17,6 +17,14 @@
],
],
"type"
:
"AppInstallKit"
,
"type"
:
"AppInstallKit"
,
"cleanup-apps"
:
true
"cleanup-apps"
:
true
},
{
"type"
:
"ShellKit"
,
"run-command"
:
[
"power-shell wakeup"
,
"power-shell setmode 602"
,
"uinput -T -d 300 600 -m 300 600 300 100 -u 300 100"
]
}
}
]
]
}
}
...
...
ability/ability_runtime/actssupportfunction/actsonandoffscreentest/entry/src/main/module.json
浏览文件 @
656de45a
...
@@ -13,6 +13,12 @@
...
@@ -13,6 +13,12 @@
"installationFree"
:
false
,
"installationFree"
:
false
,
"pages"
:
"$profile:main_pages"
,
"pages"
:
"$profile:main_pages"
,
"uiSyntax"
:
"ets"
,
"uiSyntax"
:
"ets"
,
"metadata"
:
[
{
"name"
:
"ArkTSPartialUpdate"
,
"value"
:
"false"
}
],
"abilities"
:
[
"abilities"
:
[
{
{
"name"
:
"MainAbility"
,
"name"
:
"MainAbility"
,
...
...
ability/ability_runtime/actssupportfunction/actssupportfunctiontest/Test.json
浏览文件 @
656de45a
...
@@ -19,6 +19,14 @@
...
@@ -19,6 +19,14 @@
],
],
"type"
:
"AppInstallKit"
,
"type"
:
"AppInstallKit"
,
"cleanup-apps"
:
true
"cleanup-apps"
:
true
},
{
"type"
:
"ShellKit"
,
"run-command"
:
[
"power-shell wakeup"
,
"power-shell setmode 602"
,
"uinput -T -d 300 600 -m 300 600 300 100 -u 300 100"
]
}
}
]
]
}
}
...
...
ability/ability_runtime/actssupportfunction/actssupportfunctiontest/entry/src/main/ets/test/FaShowOnLock.test.ets
浏览文件 @
656de45a
...
@@ -105,12 +105,12 @@ export default function FaShowOnLockTest() {
...
@@ -105,12 +105,12 @@ export default function FaShowOnLockTest() {
let status1 = undefined;
let status1 = undefined;
let status2 = undefined;
let status2 = undefined;
let lifeList = [];
let lifeList = [];
let listCheck = ["onCreate", "
onActive
"];
let listCheck = ["onCreate", "
wakeUpScreen
"];
let
onActive = "Fa_SupportFunction_MainAbility_onActive
";
let
wakeUpScreen = "Fa_SupportFunction_MainAbility_wakeUpScreen
";
var subscriber;
var subscriber;
var subscribeInfo = {
var subscribeInfo = {
events: [
onActive
]
events: [
wakeUpScreen
]
}
}
await commonEvent.createSubscriber(subscribeInfo).then(async (data) => {
await commonEvent.createSubscriber(subscribeInfo).then(async (data) => {
console.log(TAG + "createSubscriber data : " + JSON.stringify(data));
console.log(TAG + "createSubscriber data : " + JSON.stringify(data));
...
@@ -119,7 +119,7 @@ export default function FaShowOnLockTest() {
...
@@ -119,7 +119,7 @@ export default function FaShowOnLockTest() {
commonEvent.subscribe(subscriber, async (err, data) => {
commonEvent.subscribe(subscriber, async (err, data) => {
console.log(TAG + "SubscribeInfoCallback : " + JSON.stringify(data));
console.log(TAG + "SubscribeInfoCallback : " + JSON.stringify(data));
if (data.event ==
onActive
) {
if (data.event ==
wakeUpScreen
) {
lifeList = data.parameters.lifeList;
lifeList = data.parameters.lifeList;
setTimeout(async () => {
setTimeout(async () => {
await power.isScreenOn().then((data) => {
await power.isScreenOn().then((data) => {
...
@@ -186,12 +186,12 @@ export default function FaShowOnLockTest() {
...
@@ -186,12 +186,12 @@ export default function FaShowOnLockTest() {
let status1 = undefined;
let status1 = undefined;
let status2 = undefined;
let status2 = undefined;
let lifeList = [];
let lifeList = [];
let listCheck = ["onCreate", "
onActive
"];
let listCheck = ["onCreate", "
wakeUpScreen
"];
let
onActive = "Fa_SupportFunction_MainAbility_onActive
";
let
wakeUpScreen = "Fa_SupportFunction_MainAbility_wakeUpScreen
";
var subscriber;
var subscriber;
var subscribeInfo = {
var subscribeInfo = {
events: [
onActive
]
events: [
wakeUpScreen
]
}
}
await commonEvent.createSubscriber(subscribeInfo).then(async (data) => {
await commonEvent.createSubscriber(subscribeInfo).then(async (data) => {
console.log(TAG + "createSubscriber data : " + JSON.stringify(data));
console.log(TAG + "createSubscriber data : " + JSON.stringify(data));
...
@@ -200,7 +200,7 @@ export default function FaShowOnLockTest() {
...
@@ -200,7 +200,7 @@ export default function FaShowOnLockTest() {
commonEvent.subscribe(subscriber, async (err, data) => {
commonEvent.subscribe(subscriber, async (err, data) => {
console.log(TAG + "SubscribeInfoCallback : " + JSON.stringify(data));
console.log(TAG + "SubscribeInfoCallback : " + JSON.stringify(data));
if (data.event ==
onActive
) {
if (data.event ==
wakeUpScreen
) {
lifeList = data.parameters.lifeList;
lifeList = data.parameters.lifeList;
setTimeout(async () => {
setTimeout(async () => {
await power.isScreenOn().then((data) => {
await power.isScreenOn().then((data) => {
...
@@ -267,12 +267,12 @@ export default function FaShowOnLockTest() {
...
@@ -267,12 +267,12 @@ export default function FaShowOnLockTest() {
let status1 = undefined;
let status1 = undefined;
let status2 = undefined;
let status2 = undefined;
let lifeList = [];
let lifeList = [];
let listCheck = ["onCreate", "
onActive
"];
let listCheck = ["onCreate", "
wakeUpScreen
"];
let
onActive = "Fa_SupportFunction_MainAbility_onActive
";
let
wakeUpScreen = "Fa_SupportFunction_MainAbility_wakeUpScreen
";
var subscriber;
var subscriber;
var subscribeInfo = {
var subscribeInfo = {
events: [
onActive
]
events: [
wakeUpScreen
]
}
}
await commonEvent.createSubscriber(subscribeInfo).then(async (data) => {
await commonEvent.createSubscriber(subscribeInfo).then(async (data) => {
console.log(TAG + "createSubscriber data : " + JSON.stringify(data));
console.log(TAG + "createSubscriber data : " + JSON.stringify(data));
...
@@ -281,7 +281,7 @@ export default function FaShowOnLockTest() {
...
@@ -281,7 +281,7 @@ export default function FaShowOnLockTest() {
commonEvent.subscribe(subscriber, async (err, data) => {
commonEvent.subscribe(subscriber, async (err, data) => {
console.log(TAG + "SubscribeInfoCallback : " + JSON.stringify(data));
console.log(TAG + "SubscribeInfoCallback : " + JSON.stringify(data));
if (data.event ==
onActive
) {
if (data.event ==
wakeUpScreen
) {
lifeList = data.parameters.lifeList;
lifeList = data.parameters.lifeList;
setTimeout(async () => {
setTimeout(async () => {
await power.isScreenOn().then((data) => {
await power.isScreenOn().then((data) => {
...
@@ -349,13 +349,13 @@ export default function FaShowOnLockTest() {
...
@@ -349,13 +349,13 @@ export default function FaShowOnLockTest() {
let status2 = undefined;
let status2 = undefined;
let status3 = undefined;
let status3 = undefined;
let lifeList = [];
let lifeList = [];
let listCheck = ["onCreate", "
onActive
"];
let listCheck = ["onCreate", "
wakeUpScreen
"];
let
onActive = "Fa_SupportFunction_MainAbility2_onActive
";
let
wakeUpScreen = "Fa_SupportFunction_MainAbility2_wakeUpScreen
";
let wakeUpErr = "Fa_SupportFunction_MainAbility2_wakeUpErr";
let wakeUpErr = "Fa_SupportFunction_MainAbility2_wakeUpErr";
var subscriber;
var subscriber;
var subscribeInfo = {
var subscribeInfo = {
events: [
onActive
, wakeUpErr]
events: [
wakeUpScreen
, wakeUpErr]
}
}
await commonEvent.createSubscriber(subscribeInfo).then(async (data) => {
await commonEvent.createSubscriber(subscribeInfo).then(async (data) => {
console.log(TAG + "createSubscriber data : " + JSON.stringify(data));
console.log(TAG + "createSubscriber data : " + JSON.stringify(data));
...
@@ -368,7 +368,7 @@ export default function FaShowOnLockTest() {
...
@@ -368,7 +368,7 @@ export default function FaShowOnLockTest() {
status3 = true;
status3 = true;
}
}
if (data.event ==
onActive
) {
if (data.event ==
wakeUpScreen
) {
lifeList = data.parameters.lifeList;
lifeList = data.parameters.lifeList;
setTimeout(async () => {
setTimeout(async () => {
await power.isScreenOn().then((data) => {
await power.isScreenOn().then((data) => {
...
@@ -437,13 +437,13 @@ export default function FaShowOnLockTest() {
...
@@ -437,13 +437,13 @@ export default function FaShowOnLockTest() {
let status2 = undefined;
let status2 = undefined;
let status3 = undefined;
let status3 = undefined;
let lifeList = [];
let lifeList = [];
let listCheck = ["onCreate", "
onActive
"];
let listCheck = ["onCreate", "
wakeUpScreen
"];
let
onActive = "Fa_SupportFunction_MainAbility2_onActive
";
let
wakeUpScreen = "Fa_SupportFunction_MainAbility2_wakeUpScreen
";
let wakeUpErr = "Fa_SupportFunction_MainAbility2_wakeUpErr";
let wakeUpErr = "Fa_SupportFunction_MainAbility2_wakeUpErr";
var subscriber;
var subscriber;
var subscribeInfo = {
var subscribeInfo = {
events: [
onActive
, wakeUpErr]
events: [
wakeUpScreen
, wakeUpErr]
}
}
await commonEvent.createSubscriber(subscribeInfo).then(async (data) => {
await commonEvent.createSubscriber(subscribeInfo).then(async (data) => {
console.log(TAG + "createSubscriber data : " + JSON.stringify(data));
console.log(TAG + "createSubscriber data : " + JSON.stringify(data));
...
@@ -456,7 +456,7 @@ export default function FaShowOnLockTest() {
...
@@ -456,7 +456,7 @@ export default function FaShowOnLockTest() {
status3 = true;
status3 = true;
}
}
if (data.event ==
onActive
) {
if (data.event ==
wakeUpScreen
) {
lifeList = data.parameters.lifeList;
lifeList = data.parameters.lifeList;
setTimeout(async () => {
setTimeout(async () => {
await power.isScreenOn().then((data) => {
await power.isScreenOn().then((data) => {
...
@@ -525,13 +525,13 @@ export default function FaShowOnLockTest() {
...
@@ -525,13 +525,13 @@ export default function FaShowOnLockTest() {
let status2 = undefined;
let status2 = undefined;
let status3 = undefined;
let status3 = undefined;
let lifeList = [];
let lifeList = [];
let listCheck = ["onCreate", "
onActive
"];
let listCheck = ["onCreate", "
wakeUpScreen
"];
let
onActive = "Fa_SupportFunction_MainAbility2_onActive
";
let
wakeUpScreen = "Fa_SupportFunction_MainAbility2_wakeUpScreen
";
let wakeUpErr = "Fa_SupportFunction_MainAbility2_wakeUpErr";
let wakeUpErr = "Fa_SupportFunction_MainAbility2_wakeUpErr";
var subscriber;
var subscriber;
var subscribeInfo = {
var subscribeInfo = {
events: [
onActive
, wakeUpErr]
events: [
wakeUpScreen
, wakeUpErr]
}
}
await commonEvent.createSubscriber(subscribeInfo).then(async (data) => {
await commonEvent.createSubscriber(subscribeInfo).then(async (data) => {
console.log(TAG + "createSubscriber data : " + JSON.stringify(data));
console.log(TAG + "createSubscriber data : " + JSON.stringify(data));
...
@@ -544,7 +544,7 @@ export default function FaShowOnLockTest() {
...
@@ -544,7 +544,7 @@ export default function FaShowOnLockTest() {
status3 = true;
status3 = true;
}
}
if (data.event ==
onActive
) {
if (data.event ==
wakeUpScreen
) {
lifeList = data.parameters.lifeList;
lifeList = data.parameters.lifeList;
setTimeout(async () => {
setTimeout(async () => {
await power.isScreenOn().then((data) => {
await power.isScreenOn().then((data) => {
...
@@ -613,13 +613,13 @@ export default function FaShowOnLockTest() {
...
@@ -613,13 +613,13 @@ export default function FaShowOnLockTest() {
let status2 = undefined;
let status2 = undefined;
let status3 = undefined;
let status3 = undefined;
let lifeList = [];
let lifeList = [];
let listCheck = ["onCreate", "
onActive
"];
let listCheck = ["onCreate", "
wakeUpScreen
"];
let
onActive = "Fa_SupportFunction_MainAbility2_onActive
";
let
wakeUpScreen = "Fa_SupportFunction_MainAbility2_wakeUpScreen
";
let wakeUpErr = "Fa_SupportFunction_MainAbility2_wakeUpErr";
let wakeUpErr = "Fa_SupportFunction_MainAbility2_wakeUpErr";
var subscriber;
var subscriber;
var subscribeInfo = {
var subscribeInfo = {
events: [
onActive
, wakeUpErr]
events: [
wakeUpScreen
, wakeUpErr]
}
}
await commonEvent.createSubscriber(subscribeInfo).then(async (data) => {
await commonEvent.createSubscriber(subscribeInfo).then(async (data) => {
console.log(TAG + "createSubscriber data : " + JSON.stringify(data));
console.log(TAG + "createSubscriber data : " + JSON.stringify(data));
...
@@ -632,7 +632,7 @@ export default function FaShowOnLockTest() {
...
@@ -632,7 +632,7 @@ export default function FaShowOnLockTest() {
status3 = true;
status3 = true;
}
}
if (data.event ==
onActive
) {
if (data.event ==
wakeUpScreen
) {
lifeList = data.parameters.lifeList;
lifeList = data.parameters.lifeList;
setTimeout(async () => {
setTimeout(async () => {
await power.isScreenOn().then((data) => {
await power.isScreenOn().then((data) => {
...
@@ -701,13 +701,13 @@ export default function FaShowOnLockTest() {
...
@@ -701,13 +701,13 @@ export default function FaShowOnLockTest() {
let status2 = undefined;
let status2 = undefined;
let status3 = undefined;
let status3 = undefined;
let lifeList = [];
let lifeList = [];
let listCheck = ["onCreate", "
onActive
"];
let listCheck = ["onCreate", "
wakeUpScreen
"];
let
onActive = "Fa_SupportFunction_MainAbility2_onActive
";
let
wakeUpScreen = "Fa_SupportFunction_MainAbility2_wakeUpScreen
";
let wakeUpErr = "Fa_SupportFunction_MainAbility2_wakeUpErr";
let wakeUpErr = "Fa_SupportFunction_MainAbility2_wakeUpErr";
var subscriber;
var subscriber;
var subscribeInfo = {
var subscribeInfo = {
events: [
onActive
, wakeUpErr]
events: [
wakeUpScreen
, wakeUpErr]
}
}
await commonEvent.createSubscriber(subscribeInfo).then(async (data) => {
await commonEvent.createSubscriber(subscribeInfo).then(async (data) => {
console.log(TAG + "createSubscriber data : " + JSON.stringify(data));
console.log(TAG + "createSubscriber data : " + JSON.stringify(data));
...
@@ -720,7 +720,7 @@ export default function FaShowOnLockTest() {
...
@@ -720,7 +720,7 @@ export default function FaShowOnLockTest() {
status3 = true;
status3 = true;
}
}
if (data.event ==
onActive
) {
if (data.event ==
wakeUpScreen
) {
lifeList = data.parameters.lifeList;
lifeList = data.parameters.lifeList;
setTimeout(async () => {
setTimeout(async () => {
await power.isScreenOn().then((data) => {
await power.isScreenOn().then((data) => {
...
...
ability/ability_runtime/actssupportfunction/actssupportfunctiontest/entry/src/main/module.json
浏览文件 @
656de45a
...
@@ -13,6 +13,12 @@
...
@@ -13,6 +13,12 @@
"installationFree"
:
false
,
"installationFree"
:
false
,
"pages"
:
"$profile:main_pages"
,
"pages"
:
"$profile:main_pages"
,
"uiSyntax"
:
"ets"
,
"uiSyntax"
:
"ets"
,
"metadata"
:
[
{
"name"
:
"ArkTSPartialUpdate"
,
"value"
:
"false"
}
],
"abilities"
:
[
"abilities"
:
[
{
{
"name"
:
"MainAbility"
,
"name"
:
"MainAbility"
,
...
...
ability/ability_runtime/actssupportfunction/fasupportfunction/entry/src/main/ets/MainAbility/app.ets
浏览文件 @
656de45a
...
@@ -30,6 +30,15 @@ export default {
...
@@ -30,6 +30,15 @@ export default {
try {
try {
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');
let options = {
parameters: {
lifeList: lifeList
}
}
commonEvent.publish(listPush1 + "wakeUpScreen", options, (err) => {
console.log(TAG1 + listPush1 + "wakeUpScreen");
});
}).catch((error) => {
}).catch((error) => {
console.log(TAG1 + "setWakeUpScreen error = " + JSON.stringify(error));
console.log(TAG1 + "setWakeUpScreen error = " + JSON.stringify(error));
})
})
...
@@ -41,12 +50,30 @@ export default {
...
@@ -41,12 +50,30 @@ export default {
ability_featureAbility.getContext().setWakeUpScreen(true, (error, data) => {
ability_featureAbility.getContext().setWakeUpScreen(true, (error, data) => {
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');
let options = {
parameters: {
lifeList: lifeList
}
}
commonEvent.publish(listPush1 + "wakeUpScreen", options, (err) => {
console.log(TAG1 + listPush1 + "wakeUpScreen");
});
})
})
}
}
if(data.parameters.number == 3) {
if(data.parameters.number == 3) {
try {
try {
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');
let options = {
parameters: {
lifeList: lifeList
}
}
commonEvent.publish(listPush1 + "wakeUpScreen", options, (err) => {
console.log(TAG1 + listPush1 + "wakeUpScreen");
});
}).catch((error) => {
}).catch((error) => {
console.log(TAG1 + "setWakeUpScreen error = " + JSON.stringify(error));
console.log(TAG1 + "setWakeUpScreen error = " + JSON.stringify(error));
})
})
...
...
ability/ability_runtime/actssupportfunction/fasupportfunction/entry/src/main/ets/MainAbility2/app.ets
浏览文件 @
656de45a
...
@@ -19,11 +19,11 @@ var TAG1 = "Fa:SupportFunction:MainAbility2:";
...
@@ -19,11 +19,11 @@ var TAG1 = "Fa:SupportFunction:MainAbility2:";
var listPush1 = "Fa_SupportFunction_MainAbility2_";
var listPush1 = "Fa_SupportFunction_MainAbility2_";
var lifeList = [];
var lifeList = [];
export default {
export default {
onCreate() {
async
onCreate() {
console.log(TAG1 + 'onCreate');
console.log(TAG1 + 'onCreate');
lifeList.push('onCreate');
lifeList.push('onCreate');
ability_featureAbility.getWant().then((data) => {
ability_featureAbility.getWant().then(
async
(data) => {
console.log(TAG1 + "getWant data = " + JSON.stringify(data));
console.log(TAG1 + "getWant data = " + JSON.stringify(data));
if(data.parameters.number == 1) {
if(data.parameters.number == 1) {
...
@@ -41,6 +41,16 @@ export default {
...
@@ -41,6 +41,16 @@ export default {
if(data.parameters.number == 5) {
if(data.parameters.number == 5) {
setWakeUpScreenP(ability_featureAbility, {status1: true, status2: true})
setWakeUpScreenP(ability_featureAbility, {status1: true, status2: true})
}
}
await sleep(300);
lifeList.push('wakeUpScreen');
let options = {
parameters: {
lifeList: lifeList
}
}
commonEvent.publish(listPush1 + "wakeUpScreen", options, (err) => {
console.log(TAG1 + listPush1 + "wakeUpScreen");
});
}).catch((error) => {
}).catch((error) => {
console.log(TAG1 + "getWant error = " + JSON.stringify(error));
console.log(TAG1 + "getWant error = " + JSON.stringify(error));
})
})
...
@@ -72,6 +82,10 @@ export default {
...
@@ -72,6 +82,10 @@ export default {
}
}
}
}
function sleep(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
function setWakeUpScreenP(featureAbility, wakeUp) {
function setWakeUpScreenP(featureAbility, wakeUp) {
try {
try {
console.log(TAG1 + "setWakeUpScreenP start");
console.log(TAG1 + "setWakeUpScreenP start");
...
...
ability/ability_runtime/actssupportfunction/stageonandoffscreen/entry/src/main/module.json
浏览文件 @
656de45a
...
@@ -13,6 +13,12 @@
...
@@ -13,6 +13,12 @@
"installationFree"
:
false
,
"installationFree"
:
false
,
"pages"
:
"$profile:main_pages"
,
"pages"
:
"$profile:main_pages"
,
"uiSyntax"
:
"ets"
,
"uiSyntax"
:
"ets"
,
"metadata"
:
[
{
"name"
:
"ArkTSPartialUpdate"
,
"value"
:
"false"
}
],
"abilities"
:
[
"abilities"
:
[
{
{
"name"
:
"MainAbility"
,
"name"
:
"MainAbility"
,
...
...
ability/ability_runtime/actssupportfunction/stagesupportfunction/entry/src/main/module.json
浏览文件 @
656de45a
...
@@ -13,6 +13,12 @@
...
@@ -13,6 +13,12 @@
"installationFree"
:
false
,
"installationFree"
:
false
,
"pages"
:
"$profile:main_pages"
,
"pages"
:
"$profile:main_pages"
,
"uiSyntax"
:
"ets"
,
"uiSyntax"
:
"ets"
,
"metadata"
:
[
{
"name"
:
"ArkTSPartialUpdate"
,
"value"
:
"false"
}
],
"abilities"
:
[
"abilities"
:
[
{
{
"skills"
:
[
"skills"
:
[
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录