Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
f0f55d86
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看板
提交
f0f55d86
编写于
3月 29, 2023
作者:
U
unknown
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add user
Signed-off-by:
N
unknown
<
sijunjie@huawei.com
>
上级
ca0fba4f
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
69 addition
and
10 deletion
+69
-10
ability/ability_runtime/actssupportfunction/actsonandoffscreentest/Test.json
...time/actssupportfunction/actsonandoffscreentest/Test.json
+8
-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
+16
-8
ability/ability_runtime/actssupportfunction/fasupportfunction/entry/src/main/ets/MainAbility/app.ets
.../fasupportfunction/entry/src/main/ets/MainAbility/app.ets
+11
-0
ability/ability_runtime/actssupportfunction/fasupportfunction/entry/src/main/ets/MainAbility2/app.ets
...fasupportfunction/entry/src/main/ets/MainAbility2/app.ets
+18
-2
ability/ability_runtime/apitest/Test.json
ability/ability_runtime/apitest/Test.json
+8
-0
未找到文件。
ability/ability_runtime/actssupportfunction/actsonandoffscreentest/Test.json
浏览文件 @
f0f55d86
...
@@ -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/actssupportfunctiontest/Test.json
浏览文件 @
f0f55d86
...
@@ -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
浏览文件 @
f0f55d86
...
@@ -162,7 +162,8 @@ export default function FaShowOnLockTest() {
...
@@ -162,7 +162,8 @@ export default function FaShowOnLockTest() {
bundleName: "ohos.acts.aafwk.test.fasupportfunction",
bundleName: "ohos.acts.aafwk.test.fasupportfunction",
abilityName: "ohos.acts.aafwk.test.fasupportfunction.MainAbility",
abilityName: "ohos.acts.aafwk.test.fasupportfunction.MainAbility",
parameters: {
parameters: {
number: 1
number: 1,
flag: true
}
}
}
}
await globalThis.abilityTestContext.startAbility(wantNum).then((data) => {
await globalThis.abilityTestContext.startAbility(wantNum).then((data) => {
...
@@ -243,7 +244,8 @@ export default function FaShowOnLockTest() {
...
@@ -243,7 +244,8 @@ export default function FaShowOnLockTest() {
bundleName: "ohos.acts.aafwk.test.fasupportfunction",
bundleName: "ohos.acts.aafwk.test.fasupportfunction",
abilityName: "ohos.acts.aafwk.test.fasupportfunction.MainAbility",
abilityName: "ohos.acts.aafwk.test.fasupportfunction.MainAbility",
parameters: {
parameters: {
number: 2
number: 2,
flag: true
}
}
}
}
await globalThis.abilityTestContext.startAbility(wantNum).then((data) => {
await globalThis.abilityTestContext.startAbility(wantNum).then((data) => {
...
@@ -324,7 +326,8 @@ export default function FaShowOnLockTest() {
...
@@ -324,7 +326,8 @@ export default function FaShowOnLockTest() {
bundleName: "ohos.acts.aafwk.test.fasupportfunction",
bundleName: "ohos.acts.aafwk.test.fasupportfunction",
abilityName: "ohos.acts.aafwk.test.fasupportfunction.MainAbility",
abilityName: "ohos.acts.aafwk.test.fasupportfunction.MainAbility",
parameters: {
parameters: {
number: 3
number: 3,
flag: true
}
}
}
}
await globalThis.abilityTestContext.startAbility(wantNum).then((data) => {
await globalThis.abilityTestContext.startAbility(wantNum).then((data) => {
...
@@ -412,7 +415,8 @@ export default function FaShowOnLockTest() {
...
@@ -412,7 +415,8 @@ export default function FaShowOnLockTest() {
bundleName: "ohos.acts.aafwk.test.fasupportfunction",
bundleName: "ohos.acts.aafwk.test.fasupportfunction",
abilityName: "ohos.acts.aafwk.test.fasupportfunction.MainAbility2",
abilityName: "ohos.acts.aafwk.test.fasupportfunction.MainAbility2",
parameters: {
parameters: {
number: 1
number: 1,
flag: true
}
}
}
}
await globalThis.abilityTestContext.startAbility(wantNum).then((data) => {
await globalThis.abilityTestContext.startAbility(wantNum).then((data) => {
...
@@ -500,7 +504,8 @@ export default function FaShowOnLockTest() {
...
@@ -500,7 +504,8 @@ export default function FaShowOnLockTest() {
bundleName: "ohos.acts.aafwk.test.fasupportfunction",
bundleName: "ohos.acts.aafwk.test.fasupportfunction",
abilityName: "ohos.acts.aafwk.test.fasupportfunction.MainAbility2",
abilityName: "ohos.acts.aafwk.test.fasupportfunction.MainAbility2",
parameters: {
parameters: {
number: 2
number: 2,
flag: true
}
}
}
}
await globalThis.abilityTestContext.startAbility(wantNum).then((data) => {
await globalThis.abilityTestContext.startAbility(wantNum).then((data) => {
...
@@ -588,7 +593,8 @@ export default function FaShowOnLockTest() {
...
@@ -588,7 +593,8 @@ export default function FaShowOnLockTest() {
bundleName: "ohos.acts.aafwk.test.fasupportfunction",
bundleName: "ohos.acts.aafwk.test.fasupportfunction",
abilityName: "ohos.acts.aafwk.test.fasupportfunction.MainAbility2",
abilityName: "ohos.acts.aafwk.test.fasupportfunction.MainAbility2",
parameters: {
parameters: {
number: 3
number: 3,
flag: true
}
}
}
}
await globalThis.abilityTestContext.startAbility(wantNum).then((data) => {
await globalThis.abilityTestContext.startAbility(wantNum).then((data) => {
...
@@ -676,7 +682,8 @@ export default function FaShowOnLockTest() {
...
@@ -676,7 +682,8 @@ export default function FaShowOnLockTest() {
bundleName: "ohos.acts.aafwk.test.fasupportfunction",
bundleName: "ohos.acts.aafwk.test.fasupportfunction",
abilityName: "ohos.acts.aafwk.test.fasupportfunction.MainAbility2",
abilityName: "ohos.acts.aafwk.test.fasupportfunction.MainAbility2",
parameters: {
parameters: {
number: 4
number: 4,
flag: true
}
}
}
}
await globalThis.abilityTestContext.startAbility(wantNum).then((data) => {
await globalThis.abilityTestContext.startAbility(wantNum).then((data) => {
...
@@ -764,7 +771,8 @@ export default function FaShowOnLockTest() {
...
@@ -764,7 +771,8 @@ export default function FaShowOnLockTest() {
bundleName: "ohos.acts.aafwk.test.fasupportfunction",
bundleName: "ohos.acts.aafwk.test.fasupportfunction",
abilityName: "ohos.acts.aafwk.test.fasupportfunction.MainAbility2",
abilityName: "ohos.acts.aafwk.test.fasupportfunction.MainAbility2",
parameters: {
parameters: {
number: 5
number: 5,
flag: true
}
}
}
}
await globalThis.abilityTestContext.startAbility(wantNum).then((data) => {
await globalThis.abilityTestContext.startAbility(wantNum).then((data) => {
...
...
ability/ability_runtime/actssupportfunction/fasupportfunction/entry/src/main/ets/MainAbility/app.ets
浏览文件 @
f0f55d86
...
@@ -54,6 +54,17 @@ export default {
...
@@ -54,6 +54,17 @@ export default {
console.log(TAG1 + "setWakeUpScreen catch error = " + JSON.stringify(error));
console.log(TAG1 + "setWakeUpScreen catch error = " + JSON.stringify(error));
}
}
}
}
if (data.parameters.flag) {
lifeList.push('onActive');
let options = {
parameters: {
lifeList: lifeList
}
}
commonEvent.publish(listPush1 + "onActive", options, (err) => {
console.log(TAG1 + listPush1 + "onActive");
});
}
}).catch((error) => {
}).catch((error) => {
console.log(TAG1 + "getWant error = " + JSON.stringify(error));
console.log(TAG1 + "getWant error = " + JSON.stringify(error));
})
})
...
...
ability/ability_runtime/actssupportfunction/fasupportfunction/entry/src/main/ets/MainAbility2/app.ets
浏览文件 @
f0f55d86
...
@@ -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,18 @@ export default {
...
@@ -41,6 +41,18 @@ 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);
if (data.parameters.flag) {
lifeList.push('onActive');
let options = {
parameters: {
lifeList: lifeList
}
}
commonEvent.publish(listPush1 + "onActive", options, (err) => {
console.log(TAG1 + listPush1 + "onActive");
});
}
}).catch((error) => {
}).catch((error) => {
console.log(TAG1 + "getWant error = " + JSON.stringify(error));
console.log(TAG1 + "getWant error = " + JSON.stringify(error));
})
})
...
@@ -72,6 +84,10 @@ export default {
...
@@ -72,6 +84,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/apitest/Test.json
浏览文件 @
f0f55d86
...
@@ -15,6 +15,14 @@
...
@@ -15,6 +15,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"
]
}
}
]
]
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录