提交 e469f5f4 编写于 作者: C chengxingzhen

xts-签名文件整改

Signed-off-by: Nchengxingzhen <chengxingzhen@huawei.com>
上级 2c07a3a1
...@@ -57,8 +57,6 @@ group("ability_runtime") { ...@@ -57,8 +57,6 @@ group("ability_runtime") {
"stage:stage", "stage:stage",
"want:want", "want:want",
"workercontextcover:workercontextcover", "workercontextcover:workercontextcover",
#"zidltest:zidltest",
] ]
} }
} }
...@@ -9,12 +9,7 @@ ...@@ -9,12 +9,7 @@
}, },
"kits": [ "kits": [
{ {
"type": "ShellKit", "type": "ShellKit"
"run-command": [
" hilog -Q pidoff",
"hilog -Q domainoff",
"hilog -b D"
]
}, },
{ {
"test-file-name": [ "test-file-name": [
......
...@@ -33,12 +33,6 @@ ...@@ -33,12 +33,6 @@
} }
] ]
} }
],
"requestPermissions": [
{
"name":"ohos.permission.START_ABILITIES_FROM_BACKGROUND",
"reason":"need use ohos.permission.START_ABILITIES_FROM_BACKGROUND"
}
] ]
} }
} }
\ No newline at end of file
...@@ -9,12 +9,7 @@ ...@@ -9,12 +9,7 @@
}, },
"kits": [ "kits": [
{ {
"type": "ShellKit", "type": "ShellKit"
"run-command": [
" hilog -Q pidoff",
"hilog -Q domainoff",
"hilog -b D"
]
}, },
{ {
"type": "PushKit", "type": "PushKit",
......
...@@ -33,12 +33,6 @@ ...@@ -33,12 +33,6 @@
} }
] ]
} }
],
"requestPermissions": [
{
"name":"ohos.permission.START_ABILITIES_FROM_BACKGROUND",
"reason":"need use ohos.permission.START_ABILITIES_FROM_BACKGROUND"
}
] ]
} }
} }
\ No newline at end of file
...@@ -33,12 +33,6 @@ ...@@ -33,12 +33,6 @@
} }
] ]
} }
],
"requestPermissions": [
{
"name":"ohos.permission.START_ABILITIES_FROM_BACKGROUND",
"reason":"need use ohos.permission.START_ABILITIES_FROM_BACKGROUND"
}
] ]
} }
} }
\ No newline at end of file
...@@ -66,36 +66,6 @@ ...@@ -66,36 +66,6 @@
"launchType": "singleton" "launchType": "singleton"
} }
], ],
"reqPermissions": [
{
"name": "ohos.permission.INSTALL_BUNDLE",
"reason": "need use ohos.permission.INSTALL_BUNDLE"
},
{
"name":"ohos.permission.GET_BUNDLE_INFO_PRIVILEGED",
"reason":"need use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED"
},
{
"name":"ohos.permission.CHANGE_ABILITY_ENABLED_STATE",
"reason":"need use ohos.permission.CHANGE_ABILITY_ENABLED_STATE"
},
{
"name":"ohos.permission.REMOVE_CACHE_FILES",
"reason":"need use ohos.permission.REMOVE_CACHE_FILES"
},
{
"name":"ohos.permission.LISTEN_BUNDLE_CHANGE",
"reason":"need use ohos.permission.LISTEN_BUNDLE_CHANGE"
},
{
"name":"ohos.permission.CLEAN_BACKGROUND_PROCESSES",
"reason":"need use ohos.permission.CLEAN_BACKGROUND_PROCESSES"
},
{
"name":"ohos.permission.MANAGE_MISSIONS",
"reason":"need use ohos.permission.MANAGE_MISSIONS"
}
],
"js": [ "js": [
{ {
"pages": [ "pages": [
......
...@@ -66,40 +66,6 @@ ...@@ -66,40 +66,6 @@
"launchType": "singleton" "launchType": "singleton"
} }
], ],
"reqPermissions": [
{
"name": "ohos.permission.INSTALL_BUNDLE",
"reason": "need use ohos.permission.INSTALL_BUNDLE"
},
{
"name":"ohos.permission.GET_BUNDLE_INFO_PRIVILEGED",
"reason":"need use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED"
},
{
"name":"ohos.permission.CHANGE_ABILITY_ENABLED_STATE",
"reason":"need use ohos.permission.CHANGE_ABILITY_ENABLED_STATE"
},
{
"name":"ohos.permission.REMOVE_CACHE_FILES",
"reason":"need use ohos.permission.REMOVE_CACHE_FILES"
},
{
"name":"ohos.permission.LISTEN_BUNDLE_CHANGE",
"reason":"need use ohos.permission.LISTEN_BUNDLE_CHANGE"
},
{
"name":"ohos.permission.CLEAN_BACKGROUND_PROCESSES",
"reason":"need use ohos.permission.CLEAN_BACKGROUND_PROCESSES"
},
{
"name":"ohos.permission.MANAGE_MISSIONS",
"reason":"need use ohos.permission.MANAGE_MISSIONS"
},
{
"name":"ohos.permission.GET_RUNNING_INFO",
"reason":"need use ohos.permission.GET_RUNNING_INFO"
}
],
"js": [ "js": [
{ {
"pages": [ "pages": [
......
...@@ -66,40 +66,6 @@ ...@@ -66,40 +66,6 @@
"launchType": "singleton" "launchType": "singleton"
} }
], ],
"reqPermissions": [
{
"name": "ohos.permission.INSTALL_BUNDLE",
"reason": "need use ohos.permission.INSTALL_BUNDLE"
},
{
"name":"ohos.permission.GET_BUNDLE_INFO_PRIVILEGED",
"reason":"need use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED"
},
{
"name":"ohos.permission.CHANGE_ABILITY_ENABLED_STATE",
"reason":"need use ohos.permission.CHANGE_ABILITY_ENABLED_STATE"
},
{
"name":"ohos.permission.REMOVE_CACHE_FILES",
"reason":"need use ohos.permission.REMOVE_CACHE_FILES"
},
{
"name":"ohos.permission.LISTEN_BUNDLE_CHANGE",
"reason":"need use ohos.permission.LISTEN_BUNDLE_CHANGE"
},
{
"name":"ohos.permission.CLEAN_BACKGROUND_PROCESSES",
"reason":"need use ohos.permission.CLEAN_BACKGROUND_PROCESSES"
},
{
"name":"ohos.permission.MANAGE_MISSIONS",
"reason":"need use ohos.permission.MANAGE_MISSIONS"
},
{
"name":"ohos.permission.GET_RUNNING_INFO",
"reason":"need use ohos.permission.GET_RUNNING_INFO"
}
],
"js": [ "js": [
{ {
"pages": [ "pages": [
......
...@@ -66,40 +66,6 @@ ...@@ -66,40 +66,6 @@
"launchType": "singleton" "launchType": "singleton"
} }
], ],
"reqPermissions": [
{
"name": "ohos.permission.INSTALL_BUNDLE",
"reason": "need use ohos.permission.INSTALL_BUNDLE"
},
{
"name":"ohos.permission.GET_BUNDLE_INFO_PRIVILEGED",
"reason":"need use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED"
},
{
"name":"ohos.permission.CHANGE_ABILITY_ENABLED_STATE",
"reason":"need use ohos.permission.CHANGE_ABILITY_ENABLED_STATE"
},
{
"name":"ohos.permission.REMOVE_CACHE_FILES",
"reason":"need use ohos.permission.REMOVE_CACHE_FILES"
},
{
"name":"ohos.permission.LISTEN_BUNDLE_CHANGE",
"reason":"need use ohos.permission.LISTEN_BUNDLE_CHANGE"
},
{
"name":"ohos.permission.CLEAN_BACKGROUND_PROCESSES",
"reason":"need use ohos.permission.CLEAN_BACKGROUND_PROCESSES"
},
{
"name":"ohos.permission.MANAGE_MISSIONS",
"reason":"need use ohos.permission.MANAGE_MISSIONS"
},
{
"name":"ohos.permission.GET_RUNNING_INFO",
"reason":"need use ohos.permission.GET_RUNNING_INFO"
}
],
"js": [ "js": [
{ {
"pages": [ "pages": [
......
...@@ -66,40 +66,6 @@ ...@@ -66,40 +66,6 @@
"launchType": "singleton" "launchType": "singleton"
} }
], ],
"reqPermissions": [
{
"name": "ohos.permission.INSTALL_BUNDLE",
"reason": "need use ohos.permission.INSTALL_BUNDLE"
},
{
"name":"ohos.permission.GET_BUNDLE_INFO_PRIVILEGED",
"reason":"need use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED"
},
{
"name":"ohos.permission.CHANGE_ABILITY_ENABLED_STATE",
"reason":"need use ohos.permission.CHANGE_ABILITY_ENABLED_STATE"
},
{
"name":"ohos.permission.REMOVE_CACHE_FILES",
"reason":"need use ohos.permission.REMOVE_CACHE_FILES"
},
{
"name":"ohos.permission.LISTEN_BUNDLE_CHANGE",
"reason":"need use ohos.permission.LISTEN_BUNDLE_CHANGE"
},
{
"name":"ohos.permission.CLEAN_BACKGROUND_PROCESSES",
"reason":"need use ohos.permission.CLEAN_BACKGROUND_PROCESSES"
},
{
"name":"ohos.permission.MANAGE_MISSIONS",
"reason":"need use ohos.permission.MANAGE_MISSIONS"
},
{
"name":"ohos.permission.GET_RUNNING_INFO",
"reason":"need use ohos.permission.GET_RUNNING_INFO"
}
],
"js": [ "js": [
{ {
"pages": [ "pages": [
......
...@@ -66,40 +66,6 @@ ...@@ -66,40 +66,6 @@
"launchType": "singleton" "launchType": "singleton"
} }
], ],
"reqPermissions": [
{
"name": "ohos.permission.INSTALL_BUNDLE",
"reason": "need use ohos.permission.INSTALL_BUNDLE"
},
{
"name":"ohos.permission.GET_BUNDLE_INFO_PRIVILEGED",
"reason":"need use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED"
},
{
"name":"ohos.permission.CHANGE_ABILITY_ENABLED_STATE",
"reason":"need use ohos.permission.CHANGE_ABILITY_ENABLED_STATE"
},
{
"name":"ohos.permission.REMOVE_CACHE_FILES",
"reason":"need use ohos.permission.REMOVE_CACHE_FILES"
},
{
"name":"ohos.permission.LISTEN_BUNDLE_CHANGE",
"reason":"need use ohos.permission.LISTEN_BUNDLE_CHANGE"
},
{
"name":"ohos.permission.CLEAN_BACKGROUND_PROCESSES",
"reason":"need use ohos.permission.CLEAN_BACKGROUND_PROCESSES"
},
{
"name":"ohos.permission.MANAGE_MISSIONS",
"reason":"need use ohos.permission.MANAGE_MISSIONS"
},
{
"name":"ohos.permission.GET_RUNNING_INFO",
"reason":"need use ohos.permission.GET_RUNNING_INFO"
}
],
"js": [ "js": [
{ {
"pages": [ "pages": [
......
...@@ -65,40 +65,6 @@ ...@@ -65,40 +65,6 @@
"launchType": "singleton" "launchType": "singleton"
} }
], ],
"reqPermissions": [
{
"name": "ohos.permission.INSTALL_BUNDLE",
"reason": "need use ohos.permission.INSTALL_BUNDLE"
},
{
"name":"ohos.permission.GET_BUNDLE_INFO_PRIVILEGED",
"reason":"need use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED"
},
{
"name":"ohos.permission.CHANGE_ABILITY_ENABLED_STATE",
"reason":"need use ohos.permission.CHANGE_ABILITY_ENABLED_STATE"
},
{
"name":"ohos.permission.REMOVE_CACHE_FILES",
"reason":"need use ohos.permission.REMOVE_CACHE_FILES"
},
{
"name":"ohos.permission.LISTEN_BUNDLE_CHANGE",
"reason":"need use ohos.permission.LISTEN_BUNDLE_CHANGE"
},
{
"name":"ohos.permission.CLEAN_BACKGROUND_PROCESSES",
"reason":"need use ohos.permission.CLEAN_BACKGROUND_PROCESSES"
},
{
"name":"ohos.permission.MANAGE_MISSIONS",
"reason":"need use ohos.permission.MANAGE_MISSIONS"
},
{
"name":"ohos.permission.GET_RUNNING_INFO",
"reason":"need use ohos.permission.GET_RUNNING_INFO"
}
],
"js": [ "js": [
{ {
"pages": [ "pages": [
......
...@@ -66,40 +66,6 @@ ...@@ -66,40 +66,6 @@
"launchType": "singleton" "launchType": "singleton"
} }
], ],
"reqPermissions": [
{
"name": "ohos.permission.INSTALL_BUNDLE",
"reason": "need use ohos.permission.INSTALL_BUNDLE"
},
{
"name":"ohos.permission.GET_BUNDLE_INFO_PRIVILEGED",
"reason":"need use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED"
},
{
"name":"ohos.permission.CHANGE_ABILITY_ENABLED_STATE",
"reason":"need use ohos.permission.CHANGE_ABILITY_ENABLED_STATE"
},
{
"name":"ohos.permission.REMOVE_CACHE_FILES",
"reason":"need use ohos.permission.REMOVE_CACHE_FILES"
},
{
"name":"ohos.permission.LISTEN_BUNDLE_CHANGE",
"reason":"need use ohos.permission.LISTEN_BUNDLE_CHANGE"
},
{
"name":"ohos.permission.CLEAN_BACKGROUND_PROCESSES",
"reason":"need use ohos.permission.CLEAN_BACKGROUND_PROCESSES"
},
{
"name":"ohos.permission.MANAGE_MISSIONS",
"reason":"need use ohos.permission.MANAGE_MISSIONS"
},
{
"name":"ohos.permission.GET_RUNNING_INFO",
"reason":"need use ohos.permission.GET_RUNNING_INFO"
}
],
"js": [ "js": [
{ {
"pages": [ "pages": [
......
...@@ -66,40 +66,6 @@ ...@@ -66,40 +66,6 @@
"launchType": "singleton" "launchType": "singleton"
} }
], ],
"reqPermissions": [
{
"name": "ohos.permission.INSTALL_BUNDLE",
"reason": "need use ohos.permission.INSTALL_BUNDLE"
},
{
"name":"ohos.permission.GET_BUNDLE_INFO_PRIVILEGED",
"reason":"need use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED"
},
{
"name":"ohos.permission.CHANGE_ABILITY_ENABLED_STATE",
"reason":"need use ohos.permission.CHANGE_ABILITY_ENABLED_STATE"
},
{
"name":"ohos.permission.REMOVE_CACHE_FILES",
"reason":"need use ohos.permission.REMOVE_CACHE_FILES"
},
{
"name":"ohos.permission.LISTEN_BUNDLE_CHANGE",
"reason":"need use ohos.permission.LISTEN_BUNDLE_CHANGE"
},
{
"name":"ohos.permission.CLEAN_BACKGROUND_PROCESSES",
"reason":"need use ohos.permission.CLEAN_BACKGROUND_PROCESSES"
},
{
"name":"ohos.permission.MANAGE_MISSIONS",
"reason":"need use ohos.permission.MANAGE_MISSIONS"
},
{
"name":"ohos.permission.GET_RUNNING_INFO",
"reason":"need use ohos.permission.GET_RUNNING_INFO"
}
],
"js": [ "js": [
{ {
"pages": [ "pages": [
......
...@@ -66,40 +66,6 @@ ...@@ -66,40 +66,6 @@
"launchType": "singleton" "launchType": "singleton"
} }
], ],
"reqPermissions": [
{
"name": "ohos.permission.INSTALL_BUNDLE",
"reason": "need use ohos.permission.INSTALL_BUNDLE"
},
{
"name":"ohos.permission.GET_BUNDLE_INFO_PRIVILEGED",
"reason":"need use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED"
},
{
"name":"ohos.permission.CHANGE_ABILITY_ENABLED_STATE",
"reason":"need use ohos.permission.CHANGE_ABILITY_ENABLED_STATE"
},
{
"name":"ohos.permission.REMOVE_CACHE_FILES",
"reason":"need use ohos.permission.REMOVE_CACHE_FILES"
},
{
"name":"ohos.permission.LISTEN_BUNDLE_CHANGE",
"reason":"need use ohos.permission.LISTEN_BUNDLE_CHANGE"
},
{
"name":"ohos.permission.CLEAN_BACKGROUND_PROCESSES",
"reason":"need use ohos.permission.CLEAN_BACKGROUND_PROCESSES"
},
{
"name":"ohos.permission.MANAGE_MISSIONS",
"reason":"need use ohos.permission.MANAGE_MISSIONS"
},
{
"name":"ohos.permission.GET_RUNNING_INFO",
"reason":"need use ohos.permission.GET_RUNNING_INFO"
}
],
"js": [ "js": [
{ {
"pages": [ "pages": [
......
...@@ -37,28 +37,6 @@ ...@@ -37,28 +37,6 @@
"launchType": "standard" "launchType": "standard"
} }
], ],
"reqPermissions": [
{
"name": "ohos.permission.INSTALL_BUNDLE",
"reason": "need use ohos.permission.INSTALL_BUNDLE"
},
{
"name":"ohos.permission.GET_BUNDLE_INFO_PRIVILEGED",
"reason":"need use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED"
},
{
"name":"ohos.permission.CHANGE_ABILITY_ENABLED_STATE",
"reason":"need use ohos.permission.CHANGE_ABILITY_ENABLED_STATE"
},
{
"name":"ohos.permission.REMOVE_CACHE_FILES",
"reason":"need use ohos.permission.REMOVE_CACHE_FILES"
},
{
"name":"ohos.permission.LISTEN_BUNDLE_CHANGE",
"reason":"need use ohos.permission.LISTEN_BUNDLE_CHANGE"
}
],
"js": [ "js": [
{ {
"pages": [ "pages": [
......
...@@ -37,28 +37,6 @@ ...@@ -37,28 +37,6 @@
"launchType": "standard" "launchType": "standard"
} }
], ],
"reqPermissions": [
{
"name": "ohos.permission.INSTALL_BUNDLE",
"reason": "need use ohos.permission.INSTALL_BUNDLE"
},
{
"name":"ohos.permission.GET_BUNDLE_INFO_PRIVILEGED",
"reason":"need use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED"
},
{
"name":"ohos.permission.CHANGE_ABILITY_ENABLED_STATE",
"reason":"need use ohos.permission.CHANGE_ABILITY_ENABLED_STATE"
},
{
"name":"ohos.permission.REMOVE_CACHE_FILES",
"reason":"need use ohos.permission.REMOVE_CACHE_FILES"
},
{
"name":"ohos.permission.LISTEN_BUNDLE_CHANGE",
"reason":"need use ohos.permission.LISTEN_BUNDLE_CHANGE"
}
],
"js": [ "js": [
{ {
"pages": [ "pages": [
......
...@@ -37,28 +37,6 @@ ...@@ -37,28 +37,6 @@
"launchType": "standard" "launchType": "standard"
} }
], ],
"reqPermissions": [
{
"name": "ohos.permission.INSTALL_BUNDLE",
"reason": "need use ohos.permission.INSTALL_BUNDLE"
},
{
"name":"ohos.permission.GET_BUNDLE_INFO_PRIVILEGED",
"reason":"need use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED"
},
{
"name":"ohos.permission.CHANGE_ABILITY_ENABLED_STATE",
"reason":"need use ohos.permission.CHANGE_ABILITY_ENABLED_STATE"
},
{
"name":"ohos.permission.REMOVE_CACHE_FILES",
"reason":"need use ohos.permission.REMOVE_CACHE_FILES"
},
{
"name":"ohos.permission.LISTEN_BUNDLE_CHANGE",
"reason":"need use ohos.permission.LISTEN_BUNDLE_CHANGE"
}
],
"js": [ "js": [
{ {
"pages": [ "pages": [
......
...@@ -37,28 +37,6 @@ ...@@ -37,28 +37,6 @@
"launchType": "singleton" "launchType": "singleton"
} }
], ],
"reqPermissions": [
{
"name": "ohos.permission.INSTALL_BUNDLE",
"reason": "need use ohos.permission.INSTALL_BUNDLE"
},
{
"name":"ohos.permission.GET_BUNDLE_INFO_PRIVILEGED",
"reason":"need use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED"
},
{
"name":"ohos.permission.CHANGE_ABILITY_ENABLED_STATE",
"reason":"need use ohos.permission.CHANGE_ABILITY_ENABLED_STATE"
},
{
"name":"ohos.permission.REMOVE_CACHE_FILES",
"reason":"need use ohos.permission.REMOVE_CACHE_FILES"
},
{
"name":"ohos.permission.LISTEN_BUNDLE_CHANGE",
"reason":"need use ohos.permission.LISTEN_BUNDLE_CHANGE"
}
],
"js": [ "js": [
{ {
"pages": [ "pages": [
......
...@@ -37,28 +37,6 @@ ...@@ -37,28 +37,6 @@
"launchType": "singleton" "launchType": "singleton"
} }
], ],
"reqPermissions": [
{
"name": "ohos.permission.INSTALL_BUNDLE",
"reason": "need use ohos.permission.INSTALL_BUNDLE"
},
{
"name":"ohos.permission.GET_BUNDLE_INFO_PRIVILEGED",
"reason":"need use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED"
},
{
"name":"ohos.permission.CHANGE_ABILITY_ENABLED_STATE",
"reason":"need use ohos.permission.CHANGE_ABILITY_ENABLED_STATE"
},
{
"name":"ohos.permission.REMOVE_CACHE_FILES",
"reason":"need use ohos.permission.REMOVE_CACHE_FILES"
},
{
"name":"ohos.permission.LISTEN_BUNDLE_CHANGE",
"reason":"need use ohos.permission.LISTEN_BUNDLE_CHANGE"
}
],
"js": [ "js": [
{ {
"pages": [ "pages": [
......
...@@ -14,12 +14,6 @@ ...@@ -14,12 +14,6 @@
"ActsAbilityMonitorTest.hap" "ActsAbilityMonitorTest.hap"
], ],
"type": "AppInstallKit", "type": "AppInstallKit",
"run-command": [
" hilog -Q pidoff",
"hilog -Q domainoff",
"hilog -b D",
"hilog -r"
],
"cleanup-apps": true "cleanup-apps": true
} }
] ]
......
...@@ -59,12 +59,6 @@ ...@@ -59,12 +59,6 @@
"visible": true, "visible": true,
"launchType": "singleton" "launchType": "singleton"
} }
],
"reqPermissions": [
{
"name":"ohos.permission.START_ABILITIES_FROM_BACKGROUND",
"reason":"need use ohos.permission.START_ABILITIES_FROM_BACKGROUND"
}
] ]
} }
} }
\ No newline at end of file
...@@ -34,52 +34,6 @@ ...@@ -34,52 +34,6 @@
} }
] ]
} }
],
"requestPermissions": [
{
"name":"ohos.permission.GET_BUNDLE_INFO_PRIVILEGED",
"reason":"need use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED"
},
{
"name":"ohos.permission.GET_BUNDLE_INFO",
"reason":"need use ohos.permission.GET_BUNDLE_INFO"
},
{
"name":"ohos.permission.CHANGE_ABILITY_ENABLED_STATE",
"reason":"need use ohos.permission.CHANGE_ABILITY_ENABLED_STATE"
},
{
"name":"ohos.permission.REMOVE_CACHE_FILES",
"reason":"need use ohos.permission.REMOVE_CACHE_FILES"
},
{
"name":"ohos.permission.LISTEN_BUNDLE_CHANGE",
"reason":"need use ohos.permission.LISTEN_BUNDLE_CHANGE"
},
{
"name":"ohos.permission.INSTALL_BUNDLE",
"reason":"need use ohos.permission.INSTALL_BUNDLE"
},
{
"name":"ohos.permission.MANAGE_MISSIONS",
"reason":"need use ohos.permission.MANAGE_MISSIONS"
},
{
"name":"ohos.permission.GET_RUNNING_INFO",
"reason":"need use ohos.permission.GET_RUNNING_INFO"
},
{
"name":"ohos.permission.CLEAN_BACKGROUND_PROCESSES",
"reason":"need use ohos.permission.CLEAN_BACKGROUND_PROCESSES"
},
{
"name":"ohos.permission.CLEAN_APPLICATION_DATA",
"reason":"need use ohos.permission.CLEAN_APPLICATION_DATA"
},
{
"name":"ohos.permission.START_ABILITIES_FROM_BACKGROUND",
"reason":"need use ohos.permission.START_ABILITIES_FROM_BACKGROUND"
}
] ]
} }
} }
...@@ -34,52 +34,6 @@ ...@@ -34,52 +34,6 @@
} }
] ]
} }
],
"requestPermissions": [
{
"name":"ohos.permission.GET_BUNDLE_INFO_PRIVILEGED",
"reason":"need use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED"
},
{
"name":"ohos.permission.GET_BUNDLE_INFO",
"reason":"need use ohos.permission.GET_BUNDLE_INFO"
},
{
"name":"ohos.permission.CHANGE_ABILITY_ENABLED_STATE",
"reason":"need use ohos.permission.CHANGE_ABILITY_ENABLED_STATE"
},
{
"name":"ohos.permission.REMOVE_CACHE_FILES",
"reason":"need use ohos.permission.REMOVE_CACHE_FILES"
},
{
"name":"ohos.permission.LISTEN_BUNDLE_CHANGE",
"reason":"need use ohos.permission.LISTEN_BUNDLE_CHANGE"
},
{
"name":"ohos.permission.INSTALL_BUNDLE",
"reason":"need use ohos.permission.INSTALL_BUNDLE"
},
{
"name":"ohos.permission.MANAGE_MISSIONS",
"reason":"need use ohos.permission.MANAGE_MISSIONS"
},
{
"name":"ohos.permission.GET_RUNNING_INFO",
"reason":"need use ohos.permission.GET_RUNNING_INFO"
},
{
"name":"ohos.permission.CLEAN_BACKGROUND_PROCESSES",
"reason":"need use ohos.permission.CLEAN_BACKGROUND_PROCESSES"
},
{
"name":"ohos.permission.CLEAN_APPLICATION_DATA",
"reason":"need use ohos.permission.CLEAN_APPLICATION_DATA"
},
{
"name":"ohos.permission.START_ABILITIES_FROM_BACKGROUND",
"reason":"need use ohos.permission.START_ABILITIES_FROM_BACKGROUND"
}
] ]
} }
} }
...@@ -34,52 +34,6 @@ ...@@ -34,52 +34,6 @@
} }
] ]
} }
],
"requestPermissions": [
{
"name":"ohos.permission.GET_BUNDLE_INFO_PRIVILEGED",
"reason":"need use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED"
},
{
"name":"ohos.permission.GET_BUNDLE_INFO",
"reason":"need use ohos.permission.GET_BUNDLE_INFO"
},
{
"name":"ohos.permission.CHANGE_ABILITY_ENABLED_STATE",
"reason":"need use ohos.permission.CHANGE_ABILITY_ENABLED_STATE"
},
{
"name":"ohos.permission.REMOVE_CACHE_FILES",
"reason":"need use ohos.permission.REMOVE_CACHE_FILES"
},
{
"name":"ohos.permission.LISTEN_BUNDLE_CHANGE",
"reason":"need use ohos.permission.LISTEN_BUNDLE_CHANGE"
},
{
"name":"ohos.permission.INSTALL_BUNDLE",
"reason":"need use ohos.permission.INSTALL_BUNDLE"
},
{
"name":"ohos.permission.MANAGE_MISSIONS",
"reason":"need use ohos.permission.MANAGE_MISSIONS"
},
{
"name":"ohos.permission.GET_RUNNING_INFO",
"reason":"need use ohos.permission.GET_RUNNING_INFO"
},
{
"name":"ohos.permission.CLEAN_BACKGROUND_PROCESSES",
"reason":"need use ohos.permission.CLEAN_BACKGROUND_PROCESSES"
},
{
"name":"ohos.permission.CLEAN_APPLICATION_DATA",
"reason":"need use ohos.permission.CLEAN_APPLICATION_DATA"
},
{
"name":"ohos.permission.START_ABILITIES_FROM_BACKGROUND",
"reason":"need use ohos.permission.START_ABILITIES_FROM_BACKGROUND"
}
] ]
} }
} }
...@@ -74,52 +74,6 @@ ...@@ -74,52 +74,6 @@
} }
] ]
} }
],
"requestPermissions": [
{
"name":"ohos.permission.GET_BUNDLE_INFO_PRIVILEGED",
"reason":"need use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED"
},
{
"name":"ohos.permission.GET_BUNDLE_INFO",
"reason":"need use ohos.permission.GET_BUNDLE_INFO"
},
{
"name":"ohos.permission.CHANGE_ABILITY_ENABLED_STATE",
"reason":"need use ohos.permission.CHANGE_ABILITY_ENABLED_STATE"
},
{
"name":"ohos.permission.REMOVE_CACHE_FILES",
"reason":"need use ohos.permission.REMOVE_CACHE_FILES"
},
{
"name":"ohos.permission.LISTEN_BUNDLE_CHANGE",
"reason":"need use ohos.permission.LISTEN_BUNDLE_CHANGE"
},
{
"name":"ohos.permission.INSTALL_BUNDLE",
"reason":"need use ohos.permission.INSTALL_BUNDLE"
},
{
"name":"ohos.permission.MANAGE_MISSIONS",
"reason":"need use ohos.permission.MANAGE_MISSIONS"
},
{
"name":"ohos.permission.GET_RUNNING_INFO",
"reason":"need use ohos.permission.GET_RUNNING_INFO"
},
{
"name":"ohos.permission.CLEAN_BACKGROUND_PROCESSES",
"reason":"need use ohos.permission.CLEAN_BACKGROUND_PROCESSES"
},
{
"name":"ohos.permission.CLEAN_APPLICATION_DATA",
"reason":"need use ohos.permission.CLEAN_APPLICATION_DATA"
},
{
"name":"ohos.permission.START_ABILITIES_FROM_BACKGROUND",
"reason":"need use ohos.permission.START_ABILITIES_FROM_BACKGROUND"
}
] ]
} }
} }
...@@ -50,40 +50,6 @@ ...@@ -50,40 +50,6 @@
"launchType": "standard" "launchType": "standard"
} }
], ],
"reqPermissions": [
{
"name": "ohos.permission.INSTALL_BUNDLE",
"reason": "need use ohos.permission.INSTALL_BUNDLE"
},
{
"name": "ohos.permission.GET_BUNDLE_INFO_PRIVILEGED",
"reason": "need use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED"
},
{
"name": "ohos.permission.MANAGE_MISSIONS",
"reason": "need use ohos.permission.MANAGE_MISSIONS"
},
{
"name": "ohos.permission.GET_BUNDLE_INFO",
"reason": "need use ohos.permission.GET_BUNDLE_INFO"
},
{
"name": "ohos.permission.CHANGE_ABILITY_ENABLED_STATE",
"reason": "need use ohos.permission.CHANGE_ABILITY_ENABLED_STATE"
},
{
"name": "ohos.permission.REMOVE_CACHE_FILES",
"reason": "need use ohos.permission.REMOVE_CACHE_FILES"
},
{
"name": "ohos.permission.LISTEN_BUNDLE_CHANGE",
"reason": "need use ohos.permission.LISTEN_BUNDLE_CHANGE"
},
{
"name":"ohos.permission.START_ABILITIES_FROM_BACKGROUND",
"reason":"need use ohos.permission.START_ABILITIES_FROM_BACKGROUND"
}
],
"js": [ "js": [
{ {
"pages": [ "pages": [
......
...@@ -36,49 +36,13 @@ ...@@ -36,49 +36,13 @@
} }
], ],
"requestPermissions": [ "requestPermissions": [
{
"name":"ohos.permission.GET_BUNDLE_INFO_PRIVILEGED",
"reason":"need use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED"
},
{ {
"name":"ohos.permission.GET_BUNDLE_INFO", "name":"ohos.permission.GET_BUNDLE_INFO",
"reason":"need use ohos.permission.GET_BUNDLE_INFO" "reason":"need use ohos.permission.GET_BUNDLE_INFO"
}, },
{
"name":"ohos.permission.CHANGE_ABILITY_ENABLED_STATE",
"reason":"need use ohos.permission.CHANGE_ABILITY_ENABLED_STATE"
},
{
"name":"ohos.permission.REMOVE_CACHE_FILES",
"reason":"need use ohos.permission.REMOVE_CACHE_FILES"
},
{
"name":"ohos.permission.LISTEN_BUNDLE_CHANGE",
"reason":"need use ohos.permission.LISTEN_BUNDLE_CHANGE"
},
{
"name":"ohos.permission.INSTALL_BUNDLE",
"reason":"need use ohos.permission.INSTALL_BUNDLE"
},
{
"name":"ohos.permission.MANAGE_MISSIONS",
"reason":"need use ohos.permission.MANAGE_MISSIONS"
},
{
"name":"ohos.permission.GET_RUNNING_INFO",
"reason":"need use ohos.permission.GET_RUNNING_INFO"
},
{ {
"name":"ohos.permission.CLEAN_BACKGROUND_PROCESSES", "name":"ohos.permission.CLEAN_BACKGROUND_PROCESSES",
"reason":"need use ohos.permission.CLEAN_BACKGROUND_PROCESSES" "reason":"need use ohos.permission.CLEAN_BACKGROUND_PROCESSES"
},
{
"name":"ohos.permission.CLEAN_APPLICATION_DATA",
"reason":"need use ohos.permission.CLEAN_APPLICATION_DATA"
},
{
"name":"ohos.permission.START_ABILITIES_FROM_BACKGROUND",
"reason":"need use ohos.permission.START_ABILITIES_FROM_BACKGROUND"
} }
] ]
} }
......
...@@ -61,36 +61,6 @@ ...@@ -61,36 +61,6 @@
"launchType": "singleton" "launchType": "singleton"
} }
], ],
"reqPermissions": [
{
"name": "ohos.permission.INSTALL_BUNDLE",
"reason": "need use ohos.permission.INSTALL_BUNDLE"
},
{
"name":"ohos.permission.GET_BUNDLE_INFO",
"reason":"need use ohos.permission.GET_BUNDLE_INFO"
},
{
"name":"ohos.permission.GET_BUNDLE_INFO_PRIVILEGED",
"reason":"need use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED"
},
{
"name":"ohos.permission.CHANGE_ABILITY_ENABLED_STATE",
"reason":"need use ohos.permission.CHANGE_ABILITY_ENABLED_STATE"
},
{
"name":"ohos.permission.REMOVE_CACHE_FILES",
"reason":"need use ohos.permission.REMOVE_CACHE_FILES"
},
{
"name":"ohos.permission.LISTEN_BUNDLE_CHANGE",
"reason":"need use ohos.permission.LISTEN_BUNDLE_CHANGE"
},
{
"name":"ohos.permission.MANAGE_LOCAL_ACCOUNTS",
"reason":"need use ohos.permission.MANAGE_LOCAL_ACCOUNTS"
}
],
"js": [ "js": [
{ {
"pages": [ "pages": [
......
...@@ -46,16 +46,6 @@ ...@@ -46,16 +46,6 @@
"icon": "$media:icon", "icon": "$media:icon",
"label": "$string:MainAbility3_label" "label": "$string:MainAbility3_label"
} }
],
"requestPermissions": [
{
"name":"ohos.permission.START_ABILITIES_FROM_BACKGROUND",
"reason":"need use ohos.permission.START_ABILITIES_FROM_BACKGROUND"
},
{
"name":"ohos.permission.START_INVISIBLE_ABILITY",
"reason":"need use ohos.permission.START_INVISIBLE_ABILITY"
}
] ]
} }
} }
\ No newline at end of file
...@@ -20,17 +20,8 @@ ...@@ -20,17 +20,8 @@
"tablet" "tablet"
], ],
"reqPermissions": [ "reqPermissions": [
{
"name": "ohos.permission.GET_BUNDLE_INFO_PRIVILEGED"
},
{ {
"name": "ohos.permission.GET_BUNDLE_INFO" "name": "ohos.permission.GET_BUNDLE_INFO"
},
{
"name": "ohos.permission.READ_CONTACTS"
},
{
"name": "ohos.permission.WRITE_CONTACTS"
} }
], ],
"abilities": [ "abilities": [
......
...@@ -17,14 +17,7 @@ group("actscalltest") { ...@@ -17,14 +17,7 @@ group("actscalltest") {
testonly = true testonly = true
if (is_standard_system) { if (is_standard_system) {
deps = [ deps = [
"systemappcalleea:ActsSystemAppCalleeARelyHap",
"systemappcallera:ActsSystemAppCallerARelyHap",
"systemappcallerb:ActsSystemAppCallerBRelyHap",
"systemappcallerc:ActsSystemAppCallerCRelyHap",
"systemcallentrytest:ActsCallTestEntryTest", "systemcallentrytest:ActsCallTestEntryTest",
"systemcallfeature:ActsCallTestFeatureRelyHap",
"thirdappa:ActsThirdAppARelyHap",
"thirdcalltest:ActsThirdCallTest",
] ]
} }
} }
{
"app":{
"bundleName":"com.example.systemappcalleea",
"vendor":"huawei",
"versionCode":1000000,
"versionName":"1.0.0",
"debug":false,
"icon":"$media:icon",
"label":"$string:app_name",
"description":"$string:description_application",
"distributedNotificationEnabled":true,
"keepAlive":true,
"singleUser":true,
"minAPIVersion":8,
"targetAPIVersion":8,
"car":{
"apiCompatibleVersion":8,
"singleUser":false
}
}
}
{
"string":[
{
"name":"app_name",
"value":"ohosProject"
}
]
}
\ No newline at end of file
# Copyright (c) 2022 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import("//test/xts/tools/build/suite.gni")
ohos_hap_assist_suite("ActsSystemAppCalleeARelyHap") {
hap_profile = "entry/src/main/module.json"
js_build_mode = "debug"
deps = [
":systemappcalleea_js_assets",
":systemappcalleea_resources",
]
ets2abc = true
certificate_profile = "signature/openharmony_sx.p7b"
hap_name = "ActsSystemAppCalleeARelyHap"
testonly = true
subsystem_name = "ability"
part_name = "ability_runtime"
}
ohos_app_scope("systemappcalleea_app_profile") {
app_profile = "AppScope/app.json"
sources = [ "AppScope/resources" ]
}
ohos_js_assets("systemappcalleea_js_assets") {
source_dir = "entry/src/main/ets"
}
ohos_resources("systemappcalleea_resources") {
sources = [ "entry/src/main/resources" ]
deps = [ ":systemappcalleea_app_profile" ]
hap_profile = "entry/src/main/module.json"
}
/*
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import AbilityStage from "@ohos.application.AbilityStage"
var onAcceptWantCalledSeq;
export default class MyAbilityStage extends AbilityStage {
onCreate() {
console.log("SystemCallTest MyAbilityStage onCreate")
}
}
\ No newline at end of file
/*
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import Ability from '@ohos.application.Ability'
import commonEvent from '@ohos.commonEvent'
class MySequenceable {
num: number = 0;
str: String = "";
result: String = "";
constructor(num, string, result) {
this.num = num;
this.str = string;
this.result = result;
}
setMySequence(num, string, result) {
this.num = num;
this.str = string;
this.result = result;
}
marshalling(messageParcel) {
messageParcel.writeInt(this.num);
messageParcel.writeString(this.str);
messageParcel.writeString(this.result);
return true;
}
unmarshalling(messageParcel) {
this.num = messageParcel.readInt();
this.str = messageParcel.readString();
this.result = messageParcel.readString();
return true;
}
}
var event_case2000 = "call_case2000_test";
var subscribeInfo = {
events: [event_case2000, ],
};
var subscriber;
function test2200ReleaseCallback(data) {
console.log('SystemAppCalleeA MainAbility test2200ReleaseCallback:' + data);
test2200ReleaseFlag = data.toString();
}
var test2200ReleaseFlag = '';
function testCall(data) {
let recvSequence = new MySequenceable(0, '', '');
console.log('======>SystemAppCalleeA MainAbility on testCall <======')
data.readSequenceable(recvSequence);
var result = recvSequence.str + 'processed';
var commonEventData = {
code: 0,
data: 'calleeCheckCallParam',
parameters: {
num: recvSequence.num,
str: recvSequence.str,
result: result
}
}
commonEvent.publish('CallTest', commonEventData, (err) => {
console.log('======>CallTestSysA SecondAbility Call_Finish<======')
})
return recvSequence;
}
function testCallWithResult(data) {
let recvSequence = new MySequenceable(0, '', '');
console.log('======>SystemAppCalleeA MainAbility on testCall <======')
data.readSequenceable(recvSequence);
let result = recvSequence.str + 'processed';
recvSequence.setMySequence(recvSequence.num, recvSequence.str, result);
return recvSequence;
}
export default class MainAbility extends Ability {
test2200(data) {
console.log("SystemAppCalleeA MainAbility test2200");
let recvData = new MySequenceable(0, '', '');
data.readSequenceable(recvData);
let want = {
bundleName: "com.example.systemappcalleea",
abilityName: "com.example.systemappcalleea.SecondAbility",
};
console.log("SystemAppCalleeA MainAbility test2200 before startAbilityByCall");
let resultData = new MySequenceable(0, '', '');
globalThis.abilityContext.startAbilityByCall(want).then((caller) => {
let param = new MySequenceable(recvData.num + 1, recvData.str + "SystemAppCalleeA", '');
caller.onRelease(test2200ReleaseCallback);
caller.callWithResult('test2200', param).then((data2) => {
data2.readSequenceable(resultData);
caller.release();
for (let start=Date.now(); Date.now() - start <= 200;);
resultData.result = test2200ReleaseFlag;
let commonEventData = {
parameters: {
num: resultData.num,
str: resultData.str,
result: resultData.result,
}
};
commonEvent.publish('call_case2200_test_result', commonEventData, (err) => {
console.log('SystemAppCalleeA publish call_case2200_test_result event')
})
});
});
return resultData;
}
subscribeCallBack(err, data) {
console.log('SystemAppCalleeA MainAbility subscribeCallBack data:' + JSON.stringify(data));
switch (data.event) {
case event_case2000:
globalThis.abilityContext.terminateSelf();
break;
default:
console.log('SystemAppCalleeA MainAbility subscribeCallBack event error:' + data.event);
break;
}
}
onCreate(want, launchParam) {
// Ability is creating, initialize resources for this ability
console.log("SystemAppCalleeA MainAbility onCreate")
globalThis.abilityWant = want;
globalThis.abilityContext = this.context;
this.callee.on('test2200', this.test2200);
this.callee.on('testCall', testCall);
this.callee.on('testCallWithResult', testCallWithResult);
commonEvent.createSubscriber(subscribeInfo).then((data) => {
console.log("SystemAppCalleeA MainAbility createSubscriber");
subscriber = data;
commonEvent.subscribe(subscriber, this.subscribeCallBack);
});
}
onDestroy() {
// Ability is destroying, release resources for this ability
console.log("SystemAppCalleeA MainAbility onDestroy")
}
onWindowStageCreate(windowStage) {
// Main window is created, set main page for this ability
console.log("SystemAppCalleeA MainAbility onWindowStageCreate")
windowStage.setUIContent(this.context, "pages/index/index", null)
}
onWindowStageDestroy() {
// Main window is destroyed, release UI related resources
console.log("SystemAppCalleeA MainAbility onWindowStageDestroy")
}
onForeground() {
// Ability has brought to foreground
console.log("SystemAppCalleeA MainAbility onForeground");
}
onBackground() {
// Ability has back to background
console.log("SystemAppCalleeA MainAbility onBackground")
}
};
/*
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import Ability from '@ohos.application.Ability'
import commonEvent from '@ohos.commonEvent'
class MySequenceable {
num: number = 0;
str: String = "";
result: String = "";
constructor(num, string, result) {
this.num = num;
this.str = string;
this.result = result;
}
setMySequence(num, string, result) {
this.num = num;
this.str = string;
this.result = result;
}
marshalling(messageParcel) {
messageParcel.writeInt(this.num);
messageParcel.writeString(this.str);
messageParcel.writeString(this.result);
return true;
}
unmarshalling(messageParcel) {
this.num = messageParcel.readInt();
this.str = messageParcel.readString();
this.result = messageParcel.readString();
return true;
}
}
function testCall(data) {
let recvSequence = new MySequenceable(0, '', '');
console.log('======>SystemAppCalleeA MainAbility on testCall <======')
data.readSequenceable(recvSequence);
var result = recvSequence.str + 'processed';
var commonEventData = {
code: 0,
data: 'calleeCheckCallParam',
parameters: {
num: recvSequence.num,
str: recvSequence.str,
result: result
}
}
commonEvent.publish('CallTest', commonEventData, (err) => {
console.log('======>CallTestSysA SecondAbility Call_Finish<======')
})
return recvSequence;
}
function testCallWithResult(data) {
let recvSequence = new MySequenceable(0, '', '');
console.log('======>SystemAppCalleeA MainAbility on testCall <======')
data.readSequenceable(recvSequence);
let result = recvSequence.str + 'processed';
recvSequence.setMySequence(recvSequence.num, recvSequence.str, result);
return recvSequence;
}
export default class SecondAbility extends Ability {
test2200(data) {
console.log("SystemAppCalleeA SecondAbility test2200");
let recvData = new MySequenceable(0, '', '');
data.readSequenceable(recvData);
let result = new MySequenceable(recvData.num + 1, recvData.str + "SystemAppCalleeA", '');
return result;
}
onCreate(want, launchParam) {
// Ability is creating, initialize resources for this ability
console.log("SystemAppCalleeA SecondAbility onCreate")
globalThis.abilityWant = want;
globalThis.abilityContext2 = this.context;
this.callee.on('test2200', this.test2200);
this.callee.on('testCall', testCall);
this.callee.on('testCallWithResult', testCallWithResult);
}
onDestroy() {
// Ability is destroying, release resources for this ability
console.log("SystemAppCalleeA SecondAbility onDestroy")
}
onWindowStageCreate(windowStage) {
// Main window is created, set main page for this ability
console.log("SystemAppCalleeA SecondAbility onWindowStageCreate")
windowStage.setUIContent(this.context, "pages/index/index", null)
}
onWindowStageDestroy() {
// Main window is destroyed, release UI related resources
console.log("SystemAppCalleeA SecondAbility onWindowStageDestroy")
}
onForeground() {
// Ability has brought to foreground
console.log("SystemAppCalleeA SecondAbility onForeground");
}
onBackground() {
// Ability has back to background
console.log("SystemAppCalleeA SecondAbility onBackground")
}
};
/*
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import Ability from '@ohos.application.Ability'
import commonEvent from '@ohos.commonEvent'
class MySequenceable {
num: number = 0;
str: String = "";
result: String = "";
constructor(num, string, result) {
this.num = num;
this.str = string;
this.result = result;
}
setMySequence(num, string, result) {
this.num = num;
this.str = string;
this.result = result;
}
marshalling(messageParcel) {
messageParcel.writeInt(this.num);
messageParcel.writeString(this.str);
messageParcel.writeString(this.result);
return true;
}
unmarshalling(messageParcel) {
this.num = messageParcel.readInt();
this.str = messageParcel.readString();
this.result = messageParcel.readString();
return true;
}
}
function testCall(data) {
let recvSequence = new MySequenceable(0, '', '');
console.log('======>SystemAppCallerA MainAbility on testCall <======')
data.readSequenceable(recvSequence);
var result = recvSequence.str + 'processed';
var commonEventData = {
code: 0,
data: 'calleeCheckCallParam',
parameters: {
num: recvSequence.num,
str: recvSequence.str,
result: result
}
}
commonEvent.publish('CallTest', commonEventData, (err) => {
console.log('======>CallTestSysA SecondAbility Call_Finish<======')
})
return recvSequence;
}
function testCallWithResult(data) {
let recvSequence = new MySequenceable(0, '', '');
console.log('======>SystemAppCallerA MainAbility on testCall <======')
data.readSequenceable(recvSequence);
let result = recvSequence.str + 'processed';
recvSequence.setMySequence(recvSequence.num, recvSequence.str, result);
return recvSequence;
}
export default class ThirdAbility extends Ability {
onCreate(want, launchParam) {
// Ability is creating, initialize resources for this ability
console.log("SystemAppCalleeA ThirdAbility onCreate")
this.callee.on('testCall', testCall);
this.callee.on('testCallWithResult', testCallWithResult);
globalThis.abilityWant = want;
globalThis.abilityContext3 = this.context;
}
onDestroy() {
// Ability is destroying, release resources for this ability
console.log("SystemAppCalleeA ThirdAbility onDestroy")
}
onWindowStageCreate(windowStage) {
// Main window is created, set main page for this ability
console.log("SystemAppCalleeA ThirdAbility onWindowStageCreate")
windowStage.setUIContent(this.context, "pages/index/index", null)
}
onWindowStageDestroy() {
// Main window is destroyed, release UI related resources
console.log("SystemAppCalleeA ThirdAbility onWindowStageDestroy")
}
onForeground() {
// Ability has brought to foreground
console.log("SystemAppCalleeA ThirdAbility onForeground");
}
onBackground() {
// Ability has back to background
console.log("SystemAppCalleeA ThirdAbility onBackground")
}
};
/*
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import router from '@system.router';
async function routePage() {
let options = {
uri: 'pages/second'
}
try {
await router.push(options)
} catch (err) {
console.error(`fail callback, code: ${err.code}, msg: ${err.msg}`)
}
}
@Entry
@Component
struct Index {
build() {
Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) {
Text('Hello World')
.fontSize(50)
.fontWeight(FontWeight.Bold)
Button() {
Text('next page')
.fontSize(25)
.fontWeight(FontWeight.Bold)
}.type(ButtonType.Capsule)
.margin({
top: 20
})
.backgroundColor('#0D9FFB')
.onClick(() => {
routePage()
})
}
.width('100%')
.height('100%')
}
}
\ No newline at end of file
/*
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import router from '@system.router';
@Entry
@Component
struct Second {
private content: string = "Second Page"
build() {
Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) {
Text(`${this.content}`)
.fontSize(50)
.fontWeight(FontWeight.Bold)
Button() {
Text('back to index')
.fontSize(20)
.fontWeight(FontWeight.Bold)
}.type(ButtonType.Capsule)
.margin({
top: 20
})
.backgroundColor('#0D9FFB')
.onClick(() => {
router.back()
})
}
.width('100%')
.height('100%')
}
}
\ No newline at end of file
{
"module": {
"name": "phone",
"type": "entry",
"srcEntrance": "./ets/Application/AbilityStage.ts",
"description": "$string:phone_entry_dsc",
"mainElement": "MainAbility",
"deviceTypes": [
"default",
"tablet"
],
"deliveryWithInstall": true,
"installationFree": false,
"uiSyntax": "ets",
"pages": "$profile:main_pages",
"abilities": [
{
"name": "com.example.systemappcalleea.MainAbility",
"srcEntrance": "./ets/MainAbility/MainAbility.ts",
"description": "$string:phone_entry_main",
"icon": "$media:icon",
"label": "$string:entry_label",
"visible": true,
"orientation": "portrait",
"launchType": "singleton",
"skills": [
{
"actions": [
"action.system.home"
],
"entities":[
"entity.system.home"
]
}
]
},
{
"name": "com.example.systemappcalleea.SecondAbility",
"srcEntrance": "./ets/SecondAbility/SecondAbility.ts",
"description": "$string:phone_entry_main",
"icon": "$media:icon",
"label": "$string:entry_label",
"visible": true,
"orientation": "portrait",
"launchType": "singleton"
},
{
"name": "com.example.systemappcalleea.ThirdAbility",
"srcEntrance": "./ets/ThirdAbility/ThirdAbility.ts",
"description": "$string:phone_entry_main",
"icon": "$media:icon",
"label": "$string:entry_label",
"visible": true,
"orientation": "portrait",
"launchType": "standard"
}
],
"requestPermissions": [
{
"name": "ohos.permission.INSTALL_BUNDLE",
"reason": "need use ohos.permission.INSTALL_BUNDLE"
},
{
"name": "ohos.permission.GET_BUNDLE_INFO_PRIVILEGED",
"reason": "need use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED"
},
{
"name": "ohos.permission.GET_BUNDLE_INFO",
"reason": "need use ohos.permission.GET_BUNDLE_INFO"
},
{
"name": "ohos.permission.CHANGE_ABILITY_ENABLED_STATE",
"reason": "need use ohos.permission.CHANGE_ABILITY_ENABLED_STATE"
},
{
"name": "ohos.permission.REMOVE_CACHE_FILES",
"reason": "need use ohos.permission.REMOVE_CACHE_FILES"
},
{
"name": "ohos.permission.LISTEN_BUNDLE_CHANGE",
"reason": "need use ohos.permission.LISTEN_BUNDLE_CHANGE"
},
{
"name": "ohos.permission.MANAGE_MISSIONS",
"reason": "need use ohos.permission.MANAGE_MISSIONS"
}
]
}
}
{
"string": [
{
"name": "phone_entry_dsc",
"value": "i am an entry for phone"
},
{
"name": "phone_entry_main",
"value": "the phone entry ability"
},
{
"name": "entry_label",
"value": "ActsContextTest"
},
{
"name": "form_description",
"value": "my form"
},
{
"name": "serviceability_description",
"value": "my whether"
},
{
"name": "description_application",
"value": "demo for test"
},
{
"name": "app_name",
"value": "Demo"
}
]
}
{
"src": [
"pages/index/index",
"pages/second/second"
]
}
\ No newline at end of file
{
"app":{
"bundleName":"com.example.systemappcallera",
"vendor":"huawei",
"versionCode":1000000,
"versionName":"1.0.0",
"debug":false,
"icon":"$media:icon",
"label":"$string:app_name",
"description":"$string:description_application",
"distributedNotificationEnabled":true,
"keepAlive":true,
"singleUser":true,
"minAPIVersion":8,
"targetAPIVersion":8,
"car":{
"apiCompatibleVersion":8,
"singleUser":false
}
}
}
{
"string":[
{
"name":"app_name",
"value":"ohosProject"
}
]
}
\ No newline at end of file
# Copyright (c) 2022 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import("//test/xts/tools/build/suite.gni")
ohos_hap_assist_suite("ActsSystemAppCallerARelyHap") {
hap_profile = "entry/src/main/module.json"
js_build_mode = "debug"
deps = [
":systemappcallera_js_assets",
":systemappcallera_resources",
]
ets2abc = true
certificate_profile = "signature/openharmony_sx.p7b"
hap_name = "ActsSystemAppCallerARelyHap"
testonly = true
subsystem_name = "ability"
part_name = "ability_runtime"
}
ohos_app_scope("systemappcallera_app_profile") {
app_profile = "AppScope/app.json"
sources = [ "AppScope/resources" ]
}
ohos_js_assets("systemappcallera_js_assets") {
source_dir = "entry/src/main/ets"
}
ohos_resources("systemappcallera_resources") {
sources = [ "entry/src/main/resources" ]
deps = [ ":systemappcallera_app_profile" ]
hap_profile = "entry/src/main/module.json"
}
/*
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import AbilityStage from "@ohos.application.AbilityStage"
var onAcceptWantCalledSeq;
export default class MyAbilityStage extends AbilityStage {
onCreate() {
console.log("SystemCallTest MyAbilityStage onCreate")
}
}
\ No newline at end of file
/*
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import Ability from '@ohos.application.Ability'
import commonEvent from '@ohos.commonEvent'
var bundleNameCallee = "com.example.systemcalltest";
var abilityNameCallee = "com.example.systemcalltest.SecondAbility";
var subscriber;
var caller;
var event_getcaller = "getcaller.com.example.systemcalltest.SecondAbility";
var event_call = "call.com.example.systemcalltest.SecondAbility";
var event_release = "release.com.example.systemcalltest.SecondAbility";
var subscribeInfo = {
events: [event_getcaller, event_call, event_release, ],
};
class MySequenceable {
num: number = 0;
str: String = "";
result: String = "";
constructor(num, string, result) {
this.num = num;
this.str = string;
this.result = result;
}
setMySequence(num, string, result) {
this.num = num;
this.str = string;
this.result = result;
}
marshalling(messageParcel) {
messageParcel.writeInt(this.num);
messageParcel.writeString(this.str);
messageParcel.writeString(this.result);
return true;
}
unmarshalling(messageParcel) {
this.num = messageParcel.readInt();
this.str = messageParcel.readString();
this.result = messageParcel.readString();
return true;
}
}
function getCaller(context) {
console.log("SystemAppCallerA MainAbility getCaller");
let want = {
bundleName: bundleNameCallee,
abilityName: abilityNameCallee,
};
context.startAbilityByCall(want).then(data => {
if (typeof data !== "object" || data == null) {
console.log('SystemAppCallerA MainAbility startAbilityByCall fail');
}
caller = data;
});
}
function stressCall() {
console.log('SystemAppCallerA MainAbility stressCall begin');
if (typeof caller !== "object" || caller == null) {
console.log('SystemAppCallerA MainAbility caller error in stressCall');
}
let times = 10;
for (let i = 0; i < times; i++) {
let data = new MySequenceable(i, "SystemAppCallerA", '');
caller.call('stressMethod', data);
}
}
function unsubscribeCallback() {
console.debug("SystemAppCallerA MainAbility unsubscribeCallback");
}
function releaseCallee() {
try {
caller.onRelease(data => {
console.log('SystemAppCallerA MainAbility releaseCallBack:' + data);
});
caller.release();
} catch (e) {
console.log('SystemAppCallerA MainAbility release fail ' + e);
}
commonEvent.unsubscribe(subscriber, unsubscribeCallback);
}
function startNext(context) {
console.log("SystemAppCallerA MainAbility startNext");
let want = {
bundleName: "com.example.systemappcallerb",
abilityName: "com.example.systemappcallerb.MainAbility",
parameters: {case_num: "case5600"},
}
context.startAbility(want,
(err) => {console.log("SystemAppCallerA MainAbility startAbility callback");});
}
function testCall(data) {
let recvSequence = new MySequenceable(0, '', '');
console.log('======>SystemAppCallerA MainAbility on testCall <======')
data.readSequenceable(recvSequence);
var result = recvSequence.str + 'processed';
var commonEventData = {
code: 0,
data: 'calleeCheckCallParam',
parameters: {
num: recvSequence.num,
str: recvSequence.str,
result: result
}
}
commonEvent.publish('CallTest', commonEventData, (err) => {
console.log('======>CallTestSysA SecondAbility Call_Finish<======')
})
return recvSequence;
}
function testCallWithResult(data) {
let recvSequence = new MySequenceable(0, '', '');
console.log('======>SystemAppCallerA MainAbility on testCall <======')
data.readSequenceable(recvSequence);
let result = recvSequence.str + 'processed';
recvSequence.setMySequence(recvSequence.num, recvSequence.str, result);
return recvSequence;
}
export default class MainAbility extends Ability {
subscribeCallBack(err, data) {
console.log('SystemAppCallerA MainAbility subscribeCallBack data:' + JSON.stringify(data));
switch (data.event) {
case event_call:
stressCall();
break;
case event_release:
releaseCallee();
break;
default:
console.log('SystemAppCallerA MainAbility subscribeCallBack event error:' + data.event);
break;
}
}
onCreate(want, launchParam) {
// Ability is creating, initialize resources for this ability
console.log("SystemAppCallerA MainAbility onCreate")
globalThis.abilityWant = want;
globalThis.abilityContext = this.context;
this.callee.on('testCall', testCall);
this.callee.on('testCallWithResult', testCallWithResult);
}
onDestroy() {
// Ability is destroying, release resources for this ability
console.log("SystemAppCallerA MainAbility onDestroy")
}
onWindowStageCreate(windowStage) {
// Main window is created, set main page for this ability
console.log("SystemAppCallerA MainAbility onWindowStageCreate")
windowStage.setUIContent(this.context, "pages/index/index", null)
}
onWindowStageDestroy() {
// Main window is destroyed, release UI related resources
console.log("SystemAppCallerA MainAbility onWindowStageDestroy")
}
onForeground() {
// Ability has brought to foreground
console.log("SystemAppCallerA MainAbility onForeground");
commonEvent.createSubscriber(subscribeInfo).then((data) => {
console.log("SystemAppCallerA MainAbility createSubscriber");
subscriber = data;
commonEvent.subscribe(subscriber, this.subscribeCallBack);
if (globalThis.abilityWant.parameters["case_num"] == "case5600") {
getCaller(this.context);
startNext(this.context);
}
});
}
onBackground() {
// Ability has back to background
console.log("SystemAppCallerA MainAbility onBackground")
}
};
/*
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import Ability from '@ohos.application.Ability'
import commonEvent from '@ohos.commonEvent'
class MySequenceable {
num: number = 0;
str: String = "";
result: String = "";
constructor(num, string, result) {
this.num = num;
this.str = string;
this.result = result;
}
setMySequence(num, string, result) {
this.num = num;
this.str = string;
this.result = result;
}
marshalling(messageParcel) {
messageParcel.writeInt(this.num);
messageParcel.writeString(this.str);
messageParcel.writeString(this.result);
return true;
}
unmarshalling(messageParcel) {
this.num = messageParcel.readInt();
this.str = messageParcel.readString();
this.result = messageParcel.readString();
return true;
}
}
function testCall(data) {
let recvSequence = new MySequenceable(0, '', '');
console.log('======>SystemAppCallerA SecondAbility on testCall <======')
data.readSequenceable(recvSequence);
var result = recvSequence.str + 'processed';
var commonEventData = {
code: 0,
data: 'calleeCheckCallParam',
parameters: {
num: recvSequence.num,
str: recvSequence.str,
result: result
}
}
commonEvent.publish('CallTest', commonEventData, (err) => {
console.log('======>CallTestSysA SecondAbility Call_Finish<======')
})
return recvSequence;
}
function testCallWithResult(data) {
let recvSequence = new MySequenceable(0, '', '');
console.log('======>SystemAppCallerA SecondAbility on testCall <======')
data.readSequenceable(recvSequence);
let result = recvSequence.str + 'processed';
recvSequence.setMySequence(recvSequence.num, recvSequence.str, result);
return recvSequence;
}
export default class SecondAbility extends Ability {
onCreate(want, launchParam) {
// Ability is creating, initialize resources for this ability
console.log("SystemAppCallerA SecondAbility onCreate")
globalThis.abilityWant = want;
globalThis.abilityContext = this.context;
this.callee.on('testCall', testCall);
this.callee.on('testCallWithResult', testCallWithResult);
}
onDestroy() {
// Ability is destroying, release resources for this ability
console.log("SystemAppCallerA SecondAbility onDestroy")
}
onWindowStageCreate(windowStage) {
// Main window is created, set main page for this ability
console.log("SystemAppCallerA SecondAbility onWindowStageCreate")
windowStage.setUIContent(this.context, "pages/index/index", null)
}
onWindowStageDestroy() {
// Main window is destroyed, release UI related resources
console.log("SystemAppCallerA SecondAbility onWindowStageDestroy")
}
onForeground() {
// Ability has brought to foreground
console.log("SystemAppCallerA SecondAbility onForeground");
if ((globalThis.abilityWant.parameters.case_num == "case0700") ||
(globalThis.abilityWant.parameters.case_num == "case0800")) {
console.log("SystemAppCallerA SecondAbility special process in");
var publishData = globalThis.abilityWant.parameters.case_num + "targetForeground";
var commonEventData = {
data: publishData,
}
commonEvent.publish('CallTest', commonEventData, (err) => {
console.log('======>SystemAppCallerA SecondAbility Call_Finish<======')
})
}
}
onBackground() {
// Ability has back to background
console.log("SystemAppCallerA SecondAbility onBackground")
}
};
/*
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import Ability from '@ohos.application.Ability'
import commonEvent from '@ohos.commonEvent'
class MySequenceable {
num: number = 0;
str: String = "";
result: String = "";
constructor(num, string, result) {
this.num = num;
this.str = string;
this.result = result;
}
setMySequence(num, string, result) {
this.num = num;
this.str = string;
this.result = result;
}
marshalling(messageParcel) {
messageParcel.writeInt(this.num);
messageParcel.writeString(this.str);
messageParcel.writeString(this.result);
return true;
}
unmarshalling(messageParcel) {
this.num = messageParcel.readInt();
this.str = messageParcel.readString();
this.result = messageParcel.readString();
return true;
}
}
function testCall(data) {
let recvSequence = new MySequenceable(0, '', '');
console.log('======>SystemAppCallerA ThirdAbility on testCall <======')
data.readSequenceable(recvSequence);
var result = recvSequence.str + 'processed';
var commonEventData = {
code: 0,
data: 'calleeCheckCallParam',
parameters: {
num: recvSequence.num,
str: recvSequence.str,
result: result
}
}
commonEvent.publish('CallTest', commonEventData, (err) => {
console.log('======>CallTestSysA ThirdAbility Call_Finish<======')
})
return recvSequence;
}
function testCallWithResult(data) {
let recvSequence = new MySequenceable(0, '', '');
console.log('======>SystemAppCallerA ThirdAbility on testCall <======')
data.readSequenceable(recvSequence);
let result = recvSequence.str + 'processed';
recvSequence.setMySequence(recvSequence.num, recvSequence.str, result);
return recvSequence;
}
export default class ThirdAbility extends Ability {
onCreate(want, launchParam) {
// Ability is creating, initialize resources for this ability
console.log("SystemAppCallerA ThirdAbility onCreate")
globalThis.abilityWant = want;
globalThis.abilityContext = this.context;
this.callee.on('testCall', testCall);
this.callee.on('testCallWithResult', testCallWithResult);
}
onDestroy() {
// Ability is destroying, release resources for this ability
console.log("SystemAppCallerA ThirdAbility onDestroy")
}
onWindowStageCreate(windowStage) {
// Main window is created, set main page for this ability
console.log("SystemAppCallerA ThirdAbility onWindowStageCreate")
windowStage.setUIContent(this.context, "pages/index/index", null)
}
onWindowStageDestroy() {
// Main window is destroyed, release UI related resources
console.log("SystemAppCallerA ThirdAbility onWindowStageDestroy")
}
onForeground() {
// Ability has brought to foreground
console.log("SystemAppCallerA ThirdAbility onForeground");
if ((globalThis.abilityWant.parameters.case_num == "case0700") ||
(globalThis.abilityWant.parameters.case_num == "case0800")) {
var publishData = globalThis.abilityWant.parameters.case_num + "targetForeground";
var commonEventData = {
data: publishData,
}
commonEvent.publish('CallTest', commonEventData, (err) => {
console.log('======>SystemAppCallerA ThirdAbility Call_Finish<======')
})
}
}
onBackground() {
// Ability has back to background
console.log("SystemAppCallerA ThirdAbility onBackground")
}
};
/*
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import router from '@system.router';
async function routePage() {
let options = {
uri: 'pages/second'
}
try {
await router.push(options)
} catch (err) {
console.error(`fail callback, code: ${err.code}, msg: ${err.msg}`)
}
}
@Entry
@Component
struct Index {
build() {
Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) {
Text('Hello World')
.fontSize(50)
.fontWeight(FontWeight.Bold)
Button() {
Text('next page')
.fontSize(25)
.fontWeight(FontWeight.Bold)
}.type(ButtonType.Capsule)
.margin({
top: 20
})
.backgroundColor('#0D9FFB')
.onClick(() => {
routePage()
})
}
.width('100%')
.height('100%')
}
}
\ No newline at end of file
/*
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import router from '@system.router';
@Entry
@Component
struct Second {
private content: string = "Second Page"
build() {
Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) {
Text(`${this.content}`)
.fontSize(50)
.fontWeight(FontWeight.Bold)
Button() {
Text('back to index')
.fontSize(20)
.fontWeight(FontWeight.Bold)
}.type(ButtonType.Capsule)
.margin({
top: 20
})
.backgroundColor('#0D9FFB')
.onClick(() => {
router.back()
})
}
.width('100%')
.height('100%')
}
}
\ No newline at end of file
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册