diff --git a/ability/ability_runtime/BUILD.gn b/ability/ability_runtime/BUILD.gn index f798abccf898a75c1178373edbecdb497952b1e0..98dd3c81b9a51640bf1dac870767c4ac2b428a31 100644 --- a/ability/ability_runtime/BUILD.gn +++ b/ability/ability_runtime/BUILD.gn @@ -57,8 +57,6 @@ group("ability_runtime") { "stage:stage", "want:want", "workercontextcover:workercontextcover", - - #"zidltest:zidltest", ] } } diff --git a/ability/ability_runtime/aacommand/AACommand07/signature/openharmony_sx.p7b b/ability/ability_runtime/aacommand/AACommand07/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/aacommand/AACommand07/signature/openharmony_sx.p7b and b/ability/ability_runtime/aacommand/AACommand07/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/aacommand/AACommand08/signature/openharmony_sx.p7b b/ability/ability_runtime/aacommand/AACommand08/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/aacommand/AACommand08/signature/openharmony_sx.p7b and b/ability/ability_runtime/aacommand/AACommand08/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/aacommand/AACommandPrintOneTest/Test.json b/ability/ability_runtime/aacommand/AACommandPrintOneTest/Test.json index 01bf0c4589a60f2e1e32f0abf0e7c92f14963b83..234f9bed81de3f0dd97f805e7aaf5b4cfedec24e 100644 --- a/ability/ability_runtime/aacommand/AACommandPrintOneTest/Test.json +++ b/ability/ability_runtime/aacommand/AACommandPrintOneTest/Test.json @@ -9,12 +9,7 @@ }, "kits": [ { - "type": "ShellKit", - "run-command": [ - " hilog -Q pidoff", - "hilog -Q domainoff", - "hilog -b D" - ] + "type": "ShellKit" }, { "test-file-name": [ diff --git a/ability/ability_runtime/aacommand/AACommandPrintOneTest/entry/src/main/module.json b/ability/ability_runtime/aacommand/AACommandPrintOneTest/entry/src/main/module.json index 73d4d156e3461a015e404be55d0383214d193922..7ac0abaddf4e2cfa0be1396c8b80a5c4f022174b 100644 --- a/ability/ability_runtime/aacommand/AACommandPrintOneTest/entry/src/main/module.json +++ b/ability/ability_runtime/aacommand/AACommandPrintOneTest/entry/src/main/module.json @@ -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 diff --git a/ability/ability_runtime/aacommand/AACommandPrintOneTest/signature/openharmony_sx.p7b b/ability/ability_runtime/aacommand/AACommandPrintOneTest/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/aacommand/AACommandPrintOneTest/signature/openharmony_sx.p7b and b/ability/ability_runtime/aacommand/AACommandPrintOneTest/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/aacommand/AACommandPrintSync/signature/openharmony_sx.p7b b/ability/ability_runtime/aacommand/AACommandPrintSync/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/aacommand/AACommandPrintSync/signature/openharmony_sx.p7b and b/ability/ability_runtime/aacommand/AACommandPrintSync/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/aacommand/AACommandPrintSyncTest/Test.json b/ability/ability_runtime/aacommand/AACommandPrintSyncTest/Test.json index 22ff5fbdd03fbdff63b230ccd8d2c1e58410e74f..da34e02a8e9222a8d07f18ae216cfb01639ee4de 100644 --- a/ability/ability_runtime/aacommand/AACommandPrintSyncTest/Test.json +++ b/ability/ability_runtime/aacommand/AACommandPrintSyncTest/Test.json @@ -9,12 +9,7 @@ }, "kits": [ { - "type": "ShellKit", - "run-command": [ - " hilog -Q pidoff", - "hilog -Q domainoff", - "hilog -b D" - ] + "type": "ShellKit" }, { "type": "PushKit", diff --git a/ability/ability_runtime/aacommand/AACommandPrintSyncTest/entry/src/main/module.json b/ability/ability_runtime/aacommand/AACommandPrintSyncTest/entry/src/main/module.json index ccf3be6d02ac81841c037f716f2b94934ad6dbb7..34441664894c5461c8ca036386e21a240b10711b 100644 --- a/ability/ability_runtime/aacommand/AACommandPrintSyncTest/entry/src/main/module.json +++ b/ability/ability_runtime/aacommand/AACommandPrintSyncTest/entry/src/main/module.json @@ -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 diff --git a/ability/ability_runtime/aacommand/AACommandPrintSyncTest/signature/openharmony_sx.p7b b/ability/ability_runtime/aacommand/AACommandPrintSyncTest/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/aacommand/AACommandPrintSyncTest/signature/openharmony_sx.p7b and b/ability/ability_runtime/aacommand/AACommandPrintSyncTest/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/aacommand/AACommandRelyHap/signature/openharmony_sx.p7b b/ability/ability_runtime/aacommand/AACommandRelyHap/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/aacommand/AACommandRelyHap/signature/openharmony_sx.p7b and b/ability/ability_runtime/aacommand/AACommandRelyHap/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/aacommand/AACommandpackage/signature/openharmony_sx.p7b b/ability/ability_runtime/aacommand/AACommandpackage/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/aacommand/AACommandpackage/signature/openharmony_sx.p7b and b/ability/ability_runtime/aacommand/AACommandpackage/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/aacommand/AACommandtest/entry/src/main/module.json b/ability/ability_runtime/aacommand/AACommandtest/entry/src/main/module.json index ccf3be6d02ac81841c037f716f2b94934ad6dbb7..34441664894c5461c8ca036386e21a240b10711b 100644 --- a/ability/ability_runtime/aacommand/AACommandtest/entry/src/main/module.json +++ b/ability/ability_runtime/aacommand/AACommandtest/entry/src/main/module.json @@ -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 diff --git a/ability/ability_runtime/aacommand/AACommandtest/signature/openharmony_sx.p7b b/ability/ability_runtime/aacommand/AACommandtest/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/aacommand/AACommandtest/signature/openharmony_sx.p7b and b/ability/ability_runtime/aacommand/AACommandtest/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/abilitymanager/actsamscallbackfifthscene/signature/openharmony_sx.p7b b/ability/ability_runtime/abilitymanager/actsamscallbackfifthscene/signature/openharmony_sx.p7b index bf893c5fa3f7c335b731c76c5ad1b45620889f25..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/abilitymanager/actsamscallbackfifthscene/signature/openharmony_sx.p7b and b/ability/ability_runtime/abilitymanager/actsamscallbackfifthscene/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/abilitymanager/actsamscallbackfifthscene/src/main/config.json b/ability/ability_runtime/abilitymanager/actsamscallbackfifthscene/src/main/config.json index c1a25c510f3db52703fa1c1ac5e5c46d81429f41..77f8f3ed6432f10a67ff186789c59cd2584c7946 100644 --- a/ability/ability_runtime/abilitymanager/actsamscallbackfifthscene/src/main/config.json +++ b/ability/ability_runtime/abilitymanager/actsamscallbackfifthscene/src/main/config.json @@ -66,36 +66,6 @@ "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": [ { "pages": [ diff --git a/ability/ability_runtime/abilitymanager/actsamscallbackfirstscene/signature/openharmony_sx.p7b b/ability/ability_runtime/abilitymanager/actsamscallbackfirstscene/signature/openharmony_sx.p7b index 08850aafd13674d188c4c642f45b3ccf1cb28f97..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/abilitymanager/actsamscallbackfirstscene/signature/openharmony_sx.p7b and b/ability/ability_runtime/abilitymanager/actsamscallbackfirstscene/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/abilitymanager/actsamscallbackfirstscene/src/main/config.json b/ability/ability_runtime/abilitymanager/actsamscallbackfirstscene/src/main/config.json index 163c4c613a0d96273a801ac34f2721ee929e708f..35caa49f060a98b5c8b5d410a78aa9c9166e9ee9 100644 --- a/ability/ability_runtime/abilitymanager/actsamscallbackfirstscene/src/main/config.json +++ b/ability/ability_runtime/abilitymanager/actsamscallbackfirstscene/src/main/config.json @@ -66,40 +66,6 @@ "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": [ { "pages": [ diff --git a/ability/ability_runtime/abilitymanager/actsamscallbackfourthscene/signature/openharmony_sx.p7b b/ability/ability_runtime/abilitymanager/actsamscallbackfourthscene/signature/openharmony_sx.p7b index ff671512c0c9cb2a4287350e0758a577e432ff11..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/abilitymanager/actsamscallbackfourthscene/signature/openharmony_sx.p7b and b/ability/ability_runtime/abilitymanager/actsamscallbackfourthscene/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/abilitymanager/actsamscallbackfourthscene/src/main/config.json b/ability/ability_runtime/abilitymanager/actsamscallbackfourthscene/src/main/config.json index 2dc58d05a87d513a9899eb70d1fdf6f7a57c0f7a..6d29e66a104655869ec905ccac9252213886f812 100644 --- a/ability/ability_runtime/abilitymanager/actsamscallbackfourthscene/src/main/config.json +++ b/ability/ability_runtime/abilitymanager/actsamscallbackfourthscene/src/main/config.json @@ -66,40 +66,6 @@ "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": [ { "pages": [ diff --git a/ability/ability_runtime/abilitymanager/actsamscallbacksecondscene/signature/openharmony_sx.p7b b/ability/ability_runtime/abilitymanager/actsamscallbacksecondscene/signature/openharmony_sx.p7b index 3f581c43476851e85978d022eb4a269fa6a7ae04..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/abilitymanager/actsamscallbacksecondscene/signature/openharmony_sx.p7b and b/ability/ability_runtime/abilitymanager/actsamscallbacksecondscene/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/abilitymanager/actsamscallbacksecondscene/src/main/config.json b/ability/ability_runtime/abilitymanager/actsamscallbacksecondscene/src/main/config.json index 7da3bc9d8e447f2e6fb13007161c8a1464c03e66..c47ce0a6ad1e9bbda3aff1bc765e211ed374fc14 100644 --- a/ability/ability_runtime/abilitymanager/actsamscallbacksecondscene/src/main/config.json +++ b/ability/ability_runtime/abilitymanager/actsamscallbacksecondscene/src/main/config.json @@ -66,40 +66,6 @@ "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": [ { "pages": [ diff --git a/ability/ability_runtime/abilitymanager/actsamscallbackthirdscene/signature/openharmony_sx.p7b b/ability/ability_runtime/abilitymanager/actsamscallbackthirdscene/signature/openharmony_sx.p7b index 81546dbb33cb8cc744f7e90d8887aebb71355b7f..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/abilitymanager/actsamscallbackthirdscene/signature/openharmony_sx.p7b and b/ability/ability_runtime/abilitymanager/actsamscallbackthirdscene/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/abilitymanager/actsamscallbackthirdscene/src/main/config.json b/ability/ability_runtime/abilitymanager/actsamscallbackthirdscene/src/main/config.json index e39e8d1441b3af03dc1ef8afd53164e26092cef5..8ced7064ddb0e5a1e9810e1cc6a951f038634f5f 100644 --- a/ability/ability_runtime/abilitymanager/actsamscallbackthirdscene/src/main/config.json +++ b/ability/ability_runtime/abilitymanager/actsamscallbackthirdscene/src/main/config.json @@ -66,40 +66,6 @@ "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": [ { "pages": [ diff --git a/ability/ability_runtime/abilitymanager/actsamstestfifthscene/signature/openharmony_sx.p7b b/ability/ability_runtime/abilitymanager/actsamstestfifthscene/signature/openharmony_sx.p7b index a5df9f02bca11378394043282115c8e6389b9b19..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/abilitymanager/actsamstestfifthscene/signature/openharmony_sx.p7b and b/ability/ability_runtime/abilitymanager/actsamstestfifthscene/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/abilitymanager/actsamstestfifthscene/src/main/config.json b/ability/ability_runtime/abilitymanager/actsamstestfifthscene/src/main/config.json index 1389c4db53a622ab91e30ec249c4cf6a16048d5e..7786f0c0a3bc33331194a0eebb6eef7124b9040c 100644 --- a/ability/ability_runtime/abilitymanager/actsamstestfifthscene/src/main/config.json +++ b/ability/ability_runtime/abilitymanager/actsamstestfifthscene/src/main/config.json @@ -66,40 +66,6 @@ "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": [ { "pages": [ diff --git a/ability/ability_runtime/abilitymanager/actsamstestfirstscene/signature/openharmony_sx.p7b b/ability/ability_runtime/abilitymanager/actsamstestfirstscene/signature/openharmony_sx.p7b index 8a8e5f6d50d18ed3ee012fb3f416fce87a9aed18..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/abilitymanager/actsamstestfirstscene/signature/openharmony_sx.p7b and b/ability/ability_runtime/abilitymanager/actsamstestfirstscene/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/abilitymanager/actsamstestfirstscene/src/main/config.json b/ability/ability_runtime/abilitymanager/actsamstestfirstscene/src/main/config.json index 233e494bc2a958b65e1e954d8f19e4bf2ab210a1..c5fe32f6bb2bf80734047b94a8ab0ec18d03cbf6 100644 --- a/ability/ability_runtime/abilitymanager/actsamstestfirstscene/src/main/config.json +++ b/ability/ability_runtime/abilitymanager/actsamstestfirstscene/src/main/config.json @@ -65,40 +65,6 @@ "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": [ { "pages": [ diff --git a/ability/ability_runtime/abilitymanager/actsamstestfourthscene/signature/openharmony_sx.p7b b/ability/ability_runtime/abilitymanager/actsamstestfourthscene/signature/openharmony_sx.p7b index d9943d2b89d1b6c1f37c96c330fb3ac1fb15fe54..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/abilitymanager/actsamstestfourthscene/signature/openharmony_sx.p7b and b/ability/ability_runtime/abilitymanager/actsamstestfourthscene/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/abilitymanager/actsamstestfourthscene/src/main/config.json b/ability/ability_runtime/abilitymanager/actsamstestfourthscene/src/main/config.json index d158d92abb7e48609a7aea2f9454eaa6aa769ecb..9c093c9daa770d51c3d991a58e57ac694db51aba 100644 --- a/ability/ability_runtime/abilitymanager/actsamstestfourthscene/src/main/config.json +++ b/ability/ability_runtime/abilitymanager/actsamstestfourthscene/src/main/config.json @@ -66,40 +66,6 @@ "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": [ { "pages": [ diff --git a/ability/ability_runtime/abilitymanager/actsamstestsecondscene/signature/openharmony_sx.p7b b/ability/ability_runtime/abilitymanager/actsamstestsecondscene/signature/openharmony_sx.p7b index 11c4de2f70e08c0b42ec6d6483c91a18304131e6..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/abilitymanager/actsamstestsecondscene/signature/openharmony_sx.p7b and b/ability/ability_runtime/abilitymanager/actsamstestsecondscene/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/abilitymanager/actsamstestsecondscene/src/main/config.json b/ability/ability_runtime/abilitymanager/actsamstestsecondscene/src/main/config.json index 1942e8a49ec76572ba334bb9082de38b32745d72..f4cb5433f2c465232dfbed428c1fbcb62e55a9e5 100644 --- a/ability/ability_runtime/abilitymanager/actsamstestsecondscene/src/main/config.json +++ b/ability/ability_runtime/abilitymanager/actsamstestsecondscene/src/main/config.json @@ -66,40 +66,6 @@ "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": [ { "pages": [ diff --git a/ability/ability_runtime/abilitymanager/actsamstestthirdscene/signature/openharmony_sx.p7b b/ability/ability_runtime/abilitymanager/actsamstestthirdscene/signature/openharmony_sx.p7b index cd17207278e8f3aa00b962bdd866d781e748fd04..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/abilitymanager/actsamstestthirdscene/signature/openharmony_sx.p7b and b/ability/ability_runtime/abilitymanager/actsamstestthirdscene/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/abilitymanager/actsamstestthirdscene/src/main/config.json b/ability/ability_runtime/abilitymanager/actsamstestthirdscene/src/main/config.json index 80e9a593ec8609b051777bc17a0214d956131116..b2248e5e48ef5de0b038b8043221e194349ea3ec 100644 --- a/ability/ability_runtime/abilitymanager/actsamstestthirdscene/src/main/config.json +++ b/ability/ability_runtime/abilitymanager/actsamstestthirdscene/src/main/config.json @@ -66,40 +66,6 @@ "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": [ { "pages": [ diff --git a/ability/ability_runtime/abilitymanager/sceneProject/simulateEAbility/signature/openharmony_sx.p7b b/ability/ability_runtime/abilitymanager/sceneProject/simulateEAbility/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/abilitymanager/sceneProject/simulateEAbility/signature/openharmony_sx.p7b and b/ability/ability_runtime/abilitymanager/sceneProject/simulateEAbility/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/abilitymanager/sceneProject/simulateEAbility/src/main/config.json b/ability/ability_runtime/abilitymanager/sceneProject/simulateEAbility/src/main/config.json index 3b9800c47ecefb5b3968c0c2fb2ec46b0e6d3a56..a2686c07db82b5337c706f1674b032e12c3f7aa3 100644 --- a/ability/ability_runtime/abilitymanager/sceneProject/simulateEAbility/src/main/config.json +++ b/ability/ability_runtime/abilitymanager/sceneProject/simulateEAbility/src/main/config.json @@ -37,28 +37,6 @@ "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": [ { "pages": [ diff --git a/ability/ability_runtime/abilitymanager/sceneProject/simulateFAbilityFir/signature/openharmony_sx.p7b b/ability/ability_runtime/abilitymanager/sceneProject/simulateFAbilityFir/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/abilitymanager/sceneProject/simulateFAbilityFir/signature/openharmony_sx.p7b and b/ability/ability_runtime/abilitymanager/sceneProject/simulateFAbilityFir/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/abilitymanager/sceneProject/simulateFAbilityFir/src/main/config.json b/ability/ability_runtime/abilitymanager/sceneProject/simulateFAbilityFir/src/main/config.json index d1751bdf0af27118a13ae775f2e91bd285ec0ea1..c9ca6419ac2e016c5552c8a754ef04ab28a9b3ff 100644 --- a/ability/ability_runtime/abilitymanager/sceneProject/simulateFAbilityFir/src/main/config.json +++ b/ability/ability_runtime/abilitymanager/sceneProject/simulateFAbilityFir/src/main/config.json @@ -37,28 +37,6 @@ "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": [ { "pages": [ diff --git a/ability/ability_runtime/abilitymanager/sceneProject/simulateFAbilitySed/signature/openharmony_sx.p7b b/ability/ability_runtime/abilitymanager/sceneProject/simulateFAbilitySed/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/abilitymanager/sceneProject/simulateFAbilitySed/signature/openharmony_sx.p7b and b/ability/ability_runtime/abilitymanager/sceneProject/simulateFAbilitySed/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/abilitymanager/sceneProject/simulateFAbilitySed/src/main/config.json b/ability/ability_runtime/abilitymanager/sceneProject/simulateFAbilitySed/src/main/config.json index 432d0f513b37c5991dfcba61570c44eefb31b431..e9f779808f71a83e391aa8b43fbe600c699abf78 100644 --- a/ability/ability_runtime/abilitymanager/sceneProject/simulateFAbilitySed/src/main/config.json +++ b/ability/ability_runtime/abilitymanager/sceneProject/simulateFAbilitySed/src/main/config.json @@ -37,28 +37,6 @@ "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": [ { "pages": [ diff --git a/ability/ability_runtime/abilitymanager/sceneProject/verifyAAbility/signature/openharmony_sx.p7b b/ability/ability_runtime/abilitymanager/sceneProject/verifyAAbility/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/abilitymanager/sceneProject/verifyAAbility/signature/openharmony_sx.p7b and b/ability/ability_runtime/abilitymanager/sceneProject/verifyAAbility/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/abilitymanager/sceneProject/verifyAAbility/src/main/config.json b/ability/ability_runtime/abilitymanager/sceneProject/verifyAAbility/src/main/config.json index bfe95670ad95a47b96744b2d41baed4c3f09c8b6..0317e4485fb0465f1ad0d506ffbef77452be3310 100644 --- a/ability/ability_runtime/abilitymanager/sceneProject/verifyAAbility/src/main/config.json +++ b/ability/ability_runtime/abilitymanager/sceneProject/verifyAAbility/src/main/config.json @@ -37,28 +37,6 @@ "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": [ { "pages": [ diff --git a/ability/ability_runtime/abilitymanager/sceneProject/verifyIAbility/signature/openharmony_sx.p7b b/ability/ability_runtime/abilitymanager/sceneProject/verifyIAbility/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/abilitymanager/sceneProject/verifyIAbility/signature/openharmony_sx.p7b and b/ability/ability_runtime/abilitymanager/sceneProject/verifyIAbility/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/abilitymanager/sceneProject/verifyIAbility/src/main/config.json b/ability/ability_runtime/abilitymanager/sceneProject/verifyIAbility/src/main/config.json index 76f4aad49e89af35531032fc806b3a0e85b114ec..fb3b70220cd455e957f909e8b9c681995044fde9 100644 --- a/ability/ability_runtime/abilitymanager/sceneProject/verifyIAbility/src/main/config.json +++ b/ability/ability_runtime/abilitymanager/sceneProject/verifyIAbility/src/main/config.json @@ -37,28 +37,6 @@ "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": [ { "pages": [ diff --git a/ability/ability_runtime/abilitymontior/Test.json b/ability/ability_runtime/abilitymontior/Test.json index a42ff7e9a295a1b38de8aaa7fe64b5b32dc4cd3a..71788e3e309889b43ef1a881a16d0b61e32e785a 100644 --- a/ability/ability_runtime/abilitymontior/Test.json +++ b/ability/ability_runtime/abilitymontior/Test.json @@ -14,12 +14,6 @@ "ActsAbilityMonitorTest.hap" ], "type": "AppInstallKit", - "run-command": [ - " hilog -Q pidoff", - "hilog -Q domainoff", - "hilog -b D", - "hilog -r" - ], "cleanup-apps": true } ] diff --git a/ability/ability_runtime/abilitymontior/entry/src/main/module.json b/ability/ability_runtime/abilitymontior/entry/src/main/module.json index ac51b9a2a9dcb09896c06ade25a5fbb897887893..f6d605fcb9bc64a46f0efcf7ebc0281a09b92151 100644 --- a/ability/ability_runtime/abilitymontior/entry/src/main/module.json +++ b/ability/ability_runtime/abilitymontior/entry/src/main/module.json @@ -59,12 +59,6 @@ "visible": true, "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 diff --git a/ability/ability_runtime/abilitymontior/signature/openharmony_sx.p7b b/ability/ability_runtime/abilitymontior/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/abilitymontior/signature/openharmony_sx.p7b and b/ability/ability_runtime/abilitymontior/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/abilitymultiinstance/amsabilitymultiinstanceappa/entry/src/main/module.json b/ability/ability_runtime/abilitymultiinstance/amsabilitymultiinstanceappa/entry/src/main/module.json index cf6064fe914111199c1b24473ba7f47f13b56894..2228579c683371298546fe06eacbcf1cde8f5ca3 100644 --- a/ability/ability_runtime/abilitymultiinstance/amsabilitymultiinstanceappa/entry/src/main/module.json +++ b/ability/ability_runtime/abilitymultiinstance/amsabilitymultiinstanceappa/entry/src/main/module.json @@ -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" - } ] } } diff --git a/ability/ability_runtime/abilitymultiinstance/amsabilitymultiinstanceappa/signature/openharmony_sx.p7b b/ability/ability_runtime/abilitymultiinstance/amsabilitymultiinstanceappa/signature/openharmony_sx.p7b index cc53179a48f88f20acc379c138a001e9a15838f6..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/abilitymultiinstance/amsabilitymultiinstanceappa/signature/openharmony_sx.p7b and b/ability/ability_runtime/abilitymultiinstance/amsabilitymultiinstanceappa/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/abilitymultiinstance/amsabilitymultiinstanceappb/entry/src/main/module.json b/ability/ability_runtime/abilitymultiinstance/amsabilitymultiinstanceappb/entry/src/main/module.json index fa7bd64fa181a3f34ab4ca170cd16800563de101..acfbc9b0d04e142c65d65efadcb577d20ddd3631 100644 --- a/ability/ability_runtime/abilitymultiinstance/amsabilitymultiinstanceappb/entry/src/main/module.json +++ b/ability/ability_runtime/abilitymultiinstance/amsabilitymultiinstanceappb/entry/src/main/module.json @@ -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" - } ] } } diff --git a/ability/ability_runtime/abilitymultiinstance/amsabilitymultiinstanceappb/signature/openharmony_sx.p7b b/ability/ability_runtime/abilitymultiinstance/amsabilitymultiinstanceappb/signature/openharmony_sx.p7b index cc53179a48f88f20acc379c138a001e9a15838f6..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/abilitymultiinstance/amsabilitymultiinstanceappb/signature/openharmony_sx.p7b and b/ability/ability_runtime/abilitymultiinstance/amsabilitymultiinstanceappb/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/abilitymultiinstance/amsabilitymultiinstanceappc/entry/src/main/module.json b/ability/ability_runtime/abilitymultiinstance/amsabilitymultiinstanceappc/entry/src/main/module.json index 1a33399b1ca2f67a6a1ad0849443d003b5dd3d30..12ef5a1266c6d1b1b0e4bacf7d240ab7301b0185 100644 --- a/ability/ability_runtime/abilitymultiinstance/amsabilitymultiinstanceappc/entry/src/main/module.json +++ b/ability/ability_runtime/abilitymultiinstance/amsabilitymultiinstanceappc/entry/src/main/module.json @@ -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" - } ] } } diff --git a/ability/ability_runtime/abilitymultiinstance/amsabilitymultiinstanceappc/signature/openharmony_sx.p7b b/ability/ability_runtime/abilitymultiinstance/amsabilitymultiinstanceappc/signature/openharmony_sx.p7b index cc53179a48f88f20acc379c138a001e9a15838f6..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/abilitymultiinstance/amsabilitymultiinstanceappc/signature/openharmony_sx.p7b and b/ability/ability_runtime/abilitymultiinstance/amsabilitymultiinstanceappc/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/abilitymultiinstance/amsabilitymultiinstanceappd/entry/src/main/module.json b/ability/ability_runtime/abilitymultiinstance/amsabilitymultiinstanceappd/entry/src/main/module.json index 19abfe0f875189a378bfdd5c090d2cbcc4d1ba18..dd66d53652b58f1379228f2c26c4dd26d808ef11 100644 --- a/ability/ability_runtime/abilitymultiinstance/amsabilitymultiinstanceappd/entry/src/main/module.json +++ b/ability/ability_runtime/abilitymultiinstance/amsabilitymultiinstanceappd/entry/src/main/module.json @@ -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" - } ] } } diff --git a/ability/ability_runtime/abilitymultiinstance/amsabilitymultiinstanceappd/signature/openharmony_sx.p7b b/ability/ability_runtime/abilitymultiinstance/amsabilitymultiinstanceappd/signature/openharmony_sx.p7b index cc53179a48f88f20acc379c138a001e9a15838f6..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/abilitymultiinstance/amsabilitymultiinstanceappd/signature/openharmony_sx.p7b and b/ability/ability_runtime/abilitymultiinstance/amsabilitymultiinstanceappd/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/abilitymultiinstance/amsabilitymultiinstanceappe/signature/openharmony_sx.p7b b/ability/ability_runtime/abilitymultiinstance/amsabilitymultiinstanceappe/signature/openharmony_sx.p7b index dcec6c9615032c1b48bf185e839d9720dd68aab0..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100755 Binary files a/ability/ability_runtime/abilitymultiinstance/amsabilitymultiinstanceappe/signature/openharmony_sx.p7b and b/ability/ability_runtime/abilitymultiinstance/amsabilitymultiinstanceappe/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/abilitymultiinstance/amsabilitymultiinstanceappe/src/main/config.json b/ability/ability_runtime/abilitymultiinstance/amsabilitymultiinstanceappe/src/main/config.json index 2c52089fc49002be3a973c480c2893d1b664f929..9614e4e2eee309ec7db6868797243b704e31373e 100644 --- a/ability/ability_runtime/abilitymultiinstance/amsabilitymultiinstanceappe/src/main/config.json +++ b/ability/ability_runtime/abilitymultiinstance/amsabilitymultiinstanceappe/src/main/config.json @@ -50,40 +50,6 @@ "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": [ { "pages": [ diff --git a/ability/ability_runtime/abilitymultiinstance/amsabilitymultiinstancetest/entry/src/main/module.json b/ability/ability_runtime/abilitymultiinstance/amsabilitymultiinstancetest/entry/src/main/module.json index 88cab05c391b681bdaba8de6be53bc71405444df..503034172add3b386886585837596854204ea274 100644 --- a/ability/ability_runtime/abilitymultiinstance/amsabilitymultiinstancetest/entry/src/main/module.json +++ b/ability/ability_runtime/abilitymultiinstance/amsabilitymultiinstancetest/entry/src/main/module.json @@ -36,49 +36,13 @@ } ], "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" } ] } diff --git a/ability/ability_runtime/abilitymultiinstance/amsabilitymultiinstancetest/signature/openharmony_sx.p7b b/ability/ability_runtime/abilitymultiinstance/amsabilitymultiinstancetest/signature/openharmony_sx.p7b index cc53179a48f88f20acc379c138a001e9a15838f6..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/abilitymultiinstance/amsabilitymultiinstancetest/signature/openharmony_sx.p7b and b/ability/ability_runtime/abilitymultiinstance/amsabilitymultiinstancetest/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/abilitystagemonitor/abilitystagemonitorassista/signature/openharmony_sx.p7b b/ability/ability_runtime/abilitystagemonitor/abilitystagemonitorassista/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/abilitystagemonitor/abilitystagemonitorassista/signature/openharmony_sx.p7b and b/ability/ability_runtime/abilitystagemonitor/abilitystagemonitorassista/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/abilitystagemonitor/abilitystagemonitorassistc/signature/openharmony_sx.p7b b/ability/ability_runtime/abilitystagemonitor/abilitystagemonitorassistc/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/abilitystagemonitor/abilitystagemonitorassistc/signature/openharmony_sx.p7b and b/ability/ability_runtime/abilitystagemonitor/abilitystagemonitorassistc/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/abilitystagemonitor/abilitystagemonitorassistd/signature/openharmony_sx.p7b b/ability/ability_runtime/abilitystagemonitor/abilitystagemonitorassistd/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/abilitystagemonitor/abilitystagemonitorassistd/signature/openharmony_sx.p7b and b/ability/ability_runtime/abilitystagemonitor/abilitystagemonitorassistd/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/abilitystagemonitor/abilitystagemonitorassiste/signature/openharmony_sx.p7b b/ability/ability_runtime/abilitystagemonitor/abilitystagemonitorassiste/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/abilitystagemonitor/abilitystagemonitorassiste/signature/openharmony_sx.p7b and b/ability/ability_runtime/abilitystagemonitor/abilitystagemonitorassiste/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/abilitystagemonitor/abilitystagemonitorassistf/signature/openharmony_sx.p7b b/ability/ability_runtime/abilitystagemonitor/abilitystagemonitorassistf/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/abilitystagemonitor/abilitystagemonitorassistf/signature/openharmony_sx.p7b and b/ability/ability_runtime/abilitystagemonitor/abilitystagemonitorassistf/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/abilitystagemonitor/abilitystagemonitorassistg/signature/openharmony_sx.p7b b/ability/ability_runtime/abilitystagemonitor/abilitystagemonitorassistg/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/abilitystagemonitor/abilitystagemonitorassistg/signature/openharmony_sx.p7b and b/ability/ability_runtime/abilitystagemonitor/abilitystagemonitorassistg/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/abilitystagemonitor/abilitystagemonitorassisth/signature/openharmony_sx.p7b b/ability/ability_runtime/abilitystagemonitor/abilitystagemonitorassisth/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/abilitystagemonitor/abilitystagemonitorassisth/signature/openharmony_sx.p7b and b/ability/ability_runtime/abilitystagemonitor/abilitystagemonitorassisth/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/abilitystagemonitor/abilitystagemonitortest/signature/openharmony_sx.p7b b/ability/ability_runtime/abilitystagemonitor/abilitystagemonitortest/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/abilitystagemonitor/abilitystagemonitortest/signature/openharmony_sx.p7b and b/ability/ability_runtime/abilitystagemonitor/abilitystagemonitortest/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/actsabilitydelegatorcase/entry/src/main/config.json b/ability/ability_runtime/actsabilitydelegatorcase/entry/src/main/config.json index f39c3ec2fb7bf6df59c6cf1120be15b6ae23e865..abd3a4967e39b45118d5bc89795409f6c7b591b0 100644 --- a/ability/ability_runtime/actsabilitydelegatorcase/entry/src/main/config.json +++ b/ability/ability_runtime/actsabilitydelegatorcase/entry/src/main/config.json @@ -61,36 +61,6 @@ "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": [ { "pages": [ diff --git a/ability/ability_runtime/actsabilitydelegatorcase/signature/openharmony_sx.p7b b/ability/ability_runtime/actsabilitydelegatorcase/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/actsabilitydelegatorcase/signature/openharmony_sx.p7b and b/ability/ability_runtime/actsabilitydelegatorcase/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/actsabilitymanageretstest/signature/openharmony_sx.p7b b/ability/ability_runtime/actsabilitymanageretstest/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..ed13ca1e3a1ebe98e72039d8a317e90375a71ba2 100644 Binary files a/ability/ability_runtime/actsabilitymanageretstest/signature/openharmony_sx.p7b and b/ability/ability_runtime/actsabilitymanageretstest/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/actsabilityusertest/entry/src/main/module.json b/ability/ability_runtime/actsabilityusertest/entry/src/main/module.json index 65be6e3dca5231cdb68411322020e9ba9b15b989..8f318e5236019cf55c466ba0799390021823b159 100644 --- a/ability/ability_runtime/actsabilityusertest/entry/src/main/module.json +++ b/ability/ability_runtime/actsabilityusertest/entry/src/main/module.json @@ -46,16 +46,6 @@ "icon": "$media:icon", "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 diff --git a/ability/ability_runtime/actsabilityusertest/signature/openharmony_sx.p7b b/ability/ability_runtime/actsabilityusertest/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/actsabilityusertest/signature/openharmony_sx.p7b and b/ability/ability_runtime/actsabilityusertest/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/actscalldataabilitytest/entry/src/main/config.json b/ability/ability_runtime/actscalldataabilitytest/entry/src/main/config.json index c3821c7e6db18761143ce70c0dc991e867fdaf2a..66f64ebf9886643027b1f030fb8f26d8e475fbf3 100644 --- a/ability/ability_runtime/actscalldataabilitytest/entry/src/main/config.json +++ b/ability/ability_runtime/actscalldataabilitytest/entry/src/main/config.json @@ -20,17 +20,8 @@ "tablet" ], "reqPermissions": [ - { - "name": "ohos.permission.GET_BUNDLE_INFO_PRIVILEGED" - }, { "name": "ohos.permission.GET_BUNDLE_INFO" - }, - { - "name": "ohos.permission.READ_CONTACTS" - }, - { - "name": "ohos.permission.WRITE_CONTACTS" } ], "abilities": [ diff --git a/ability/ability_runtime/actscalldataabilitytest/signature/openharmony_sx.p7b b/ability/ability_runtime/actscalldataabilitytest/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/actscalldataabilitytest/signature/openharmony_sx.p7b and b/ability/ability_runtime/actscalldataabilitytest/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/actscalltest/BUILD.gn b/ability/ability_runtime/actscalltest/BUILD.gn index c8addfd7978cb58b32b8141365acd5c1c2d0b2ea..7f40a9fd564d346458ff0b073a9a6b10ac6e214e 100644 --- a/ability/ability_runtime/actscalltest/BUILD.gn +++ b/ability/ability_runtime/actscalltest/BUILD.gn @@ -17,14 +17,7 @@ group("actscalltest") { testonly = true if (is_standard_system) { deps = [ - "systemappcalleea:ActsSystemAppCalleeARelyHap", - "systemappcallera:ActsSystemAppCallerARelyHap", - "systemappcallerb:ActsSystemAppCallerBRelyHap", - "systemappcallerc:ActsSystemAppCallerCRelyHap", "systemcallentrytest:ActsCallTestEntryTest", - "systemcallfeature:ActsCallTestFeatureRelyHap", - "thirdappa:ActsThirdAppARelyHap", - "thirdcalltest:ActsThirdCallTest", ] } } diff --git a/ability/ability_runtime/actscalltest/systemappcalleea/AppScope/app.json b/ability/ability_runtime/actscalltest/systemappcalleea/AppScope/app.json deleted file mode 100644 index 785f8459d6838ce0df58f7ca178277e18fdb41b3..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actscalltest/systemappcalleea/AppScope/app.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "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 - } - } -} diff --git a/ability/ability_runtime/actscalltest/systemappcalleea/AppScope/resources/base/element/string.json b/ability/ability_runtime/actscalltest/systemappcalleea/AppScope/resources/base/element/string.json deleted file mode 100644 index ee69f9a861d9dc269ed6638735d52674583498e1..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actscalltest/systemappcalleea/AppScope/resources/base/element/string.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "string":[ - { - "name":"app_name", - "value":"ohosProject" - } - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/actscalltest/systemappcalleea/AppScope/resources/base/media/app_icon.png b/ability/ability_runtime/actscalltest/systemappcalleea/AppScope/resources/base/media/app_icon.png deleted file mode 100644 index 474a55588fd7216113dd42073aadf254d4dba023..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actscalltest/systemappcalleea/AppScope/resources/base/media/app_icon.png and /dev/null differ diff --git a/ability/ability_runtime/actscalltest/systemappcalleea/BUILD.gn b/ability/ability_runtime/actscalltest/systemappcalleea/BUILD.gn deleted file mode 100644 index a74e73e61320aa7d5438dcd74a67dbc0b5804978..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actscalltest/systemappcalleea/BUILD.gn +++ /dev/null @@ -1,44 +0,0 @@ -# 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" -} diff --git a/ability/ability_runtime/actscalltest/systemappcalleea/entry/src/main/ets/Application/AbilityStage.ts b/ability/ability_runtime/actscalltest/systemappcalleea/entry/src/main/ets/Application/AbilityStage.ts deleted file mode 100644 index 21606483f3457f3a691d5d0a28e111ffc5d9d4bf..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actscalltest/systemappcalleea/entry/src/main/ets/Application/AbilityStage.ts +++ /dev/null @@ -1,23 +0,0 @@ -/* - * 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 diff --git a/ability/ability_runtime/actscalltest/systemappcalleea/entry/src/main/ets/MainAbility/MainAbility.ts b/ability/ability_runtime/actscalltest/systemappcalleea/entry/src/main/ets/MainAbility/MainAbility.ts deleted file mode 100644 index f5ab8d609a11eca1eef13477d6b47d4b77b6e9d6..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actscalltest/systemappcalleea/entry/src/main/ets/MainAbility/MainAbility.ts +++ /dev/null @@ -1,181 +0,0 @@ -/* - * 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") - } -}; diff --git a/ability/ability_runtime/actscalltest/systemappcalleea/entry/src/main/ets/SecondAbility/SecondAbility.ts b/ability/ability_runtime/actscalltest/systemappcalleea/entry/src/main/ets/SecondAbility/SecondAbility.ts deleted file mode 100644 index b0f77555b9fae8b1970fb42a61a82b8a3141877c..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actscalltest/systemappcalleea/entry/src/main/ets/SecondAbility/SecondAbility.ts +++ /dev/null @@ -1,125 +0,0 @@ -/* - * 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") - } -}; diff --git a/ability/ability_runtime/actscalltest/systemappcalleea/entry/src/main/ets/ThirdAbility/ThirdAbility.ts b/ability/ability_runtime/actscalltest/systemappcalleea/entry/src/main/ets/ThirdAbility/ThirdAbility.ts deleted file mode 100644 index 5fe516ffb0539e304ff8a7917656f867e73bbfb3..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actscalltest/systemappcalleea/entry/src/main/ets/ThirdAbility/ThirdAbility.ts +++ /dev/null @@ -1,116 +0,0 @@ -/* - * 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") - } -}; diff --git a/ability/ability_runtime/actscalltest/systemappcalleea/entry/src/main/ets/pages/index/index.ets b/ability/ability_runtime/actscalltest/systemappcalleea/entry/src/main/ets/pages/index/index.ets deleted file mode 100644 index 30b8d934e2b7e2d5f07c2deb7495797e78e6b3d3..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actscalltest/systemappcalleea/entry/src/main/ets/pages/index/index.ets +++ /dev/null @@ -1,52 +0,0 @@ -/* - * 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 diff --git a/ability/ability_runtime/actscalltest/systemappcalleea/entry/src/main/ets/pages/second/second.ets b/ability/ability_runtime/actscalltest/systemappcalleea/entry/src/main/ets/pages/second/second.ets deleted file mode 100644 index 33d9ae45245db03fd252ef7c1a85c9e284028e0d..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actscalltest/systemappcalleea/entry/src/main/ets/pages/second/second.ets +++ /dev/null @@ -1,43 +0,0 @@ -/* - * 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 diff --git a/ability/ability_runtime/actscalltest/systemappcalleea/entry/src/main/module.json b/ability/ability_runtime/actscalltest/systemappcalleea/entry/src/main/module.json deleted file mode 100644 index 40958567f9b8c2b93436ca153134178585b0fd6f..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actscalltest/systemappcalleea/entry/src/main/module.json +++ /dev/null @@ -1,89 +0,0 @@ -{ - "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" - } - ] - } -} diff --git a/ability/ability_runtime/actscalltest/systemappcalleea/entry/src/main/resources/base/element/string.json b/ability/ability_runtime/actscalltest/systemappcalleea/entry/src/main/resources/base/element/string.json deleted file mode 100644 index 2977b612ec4595b13eaaffe3e8fc578e83c42d48..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actscalltest/systemappcalleea/entry/src/main/resources/base/element/string.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "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" - } - ] -} diff --git a/ability/ability_runtime/actscalltest/systemappcalleea/entry/src/main/resources/base/media/icon.png b/ability/ability_runtime/actscalltest/systemappcalleea/entry/src/main/resources/base/media/icon.png deleted file mode 100644 index 474a55588fd7216113dd42073aadf254d4dba023..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actscalltest/systemappcalleea/entry/src/main/resources/base/media/icon.png and /dev/null differ diff --git a/ability/ability_runtime/actscalltest/systemappcalleea/entry/src/main/resources/base/profile/main_pages.json b/ability/ability_runtime/actscalltest/systemappcalleea/entry/src/main/resources/base/profile/main_pages.json deleted file mode 100644 index 6898b31d2085f478ee1ed9d933a5910cbf901d92..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actscalltest/systemappcalleea/entry/src/main/resources/base/profile/main_pages.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "src": [ - "pages/index/index", - "pages/second/second" - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/actscalltest/systemappcalleea/signature/openharmony_sx.p7b b/ability/ability_runtime/actscalltest/systemappcalleea/signature/openharmony_sx.p7b deleted file mode 100644 index cc53179a48f88f20acc379c138a001e9a15838f6..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actscalltest/systemappcalleea/signature/openharmony_sx.p7b and /dev/null differ diff --git a/ability/ability_runtime/actscalltest/systemappcallera/AppScope/app.json b/ability/ability_runtime/actscalltest/systemappcallera/AppScope/app.json deleted file mode 100644 index 182091df8b68144d654f4a2ed1be27fffd229fc3..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actscalltest/systemappcallera/AppScope/app.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "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 - } - } -} diff --git a/ability/ability_runtime/actscalltest/systemappcallera/AppScope/resources/base/element/string.json b/ability/ability_runtime/actscalltest/systemappcallera/AppScope/resources/base/element/string.json deleted file mode 100644 index ee69f9a861d9dc269ed6638735d52674583498e1..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actscalltest/systemappcallera/AppScope/resources/base/element/string.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "string":[ - { - "name":"app_name", - "value":"ohosProject" - } - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/actscalltest/systemappcallera/AppScope/resources/base/media/app_icon.png b/ability/ability_runtime/actscalltest/systemappcallera/AppScope/resources/base/media/app_icon.png deleted file mode 100644 index 474a55588fd7216113dd42073aadf254d4dba023..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actscalltest/systemappcallera/AppScope/resources/base/media/app_icon.png and /dev/null differ diff --git a/ability/ability_runtime/actscalltest/systemappcallera/BUILD.gn b/ability/ability_runtime/actscalltest/systemappcallera/BUILD.gn deleted file mode 100644 index 0ba3dcfd5e8775fba761dfd63cff29b3491775f0..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actscalltest/systemappcallera/BUILD.gn +++ /dev/null @@ -1,45 +0,0 @@ -# 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" -} diff --git a/ability/ability_runtime/actscalltest/systemappcallera/entry/src/main/ets/Application/AbilityStage.ts b/ability/ability_runtime/actscalltest/systemappcallera/entry/src/main/ets/Application/AbilityStage.ts deleted file mode 100644 index 21606483f3457f3a691d5d0a28e111ffc5d9d4bf..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actscalltest/systemappcallera/entry/src/main/ets/Application/AbilityStage.ts +++ /dev/null @@ -1,23 +0,0 @@ -/* - * 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 diff --git a/ability/ability_runtime/actscalltest/systemappcallera/entry/src/main/ets/MainAbility/MainAbility.ts b/ability/ability_runtime/actscalltest/systemappcallera/entry/src/main/ets/MainAbility/MainAbility.ts deleted file mode 100644 index 00f76f1120f25ab9351f6a134a192e5515f2c077..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actscalltest/systemappcallera/entry/src/main/ets/MainAbility/MainAbility.ts +++ /dev/null @@ -1,204 +0,0 @@ -/* - * 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") - } -}; diff --git a/ability/ability_runtime/actscalltest/systemappcallera/entry/src/main/ets/SecondAbility/SecondAbility.ts b/ability/ability_runtime/actscalltest/systemappcallera/entry/src/main/ets/SecondAbility/SecondAbility.ts deleted file mode 100644 index f341cffce6df6944696e810e129308726440188f..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actscalltest/systemappcallera/entry/src/main/ets/SecondAbility/SecondAbility.ts +++ /dev/null @@ -1,126 +0,0 @@ -/* - * 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") - } -}; diff --git a/ability/ability_runtime/actscalltest/systemappcallera/entry/src/main/ets/ThirdAbility/ThirdAbility.ts b/ability/ability_runtime/actscalltest/systemappcallera/entry/src/main/ets/ThirdAbility/ThirdAbility.ts deleted file mode 100644 index 5f17f742f548f280c4e7f86103610d2daa55258e..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actscalltest/systemappcallera/entry/src/main/ets/ThirdAbility/ThirdAbility.ts +++ /dev/null @@ -1,125 +0,0 @@ -/* - * 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") - } -}; diff --git a/ability/ability_runtime/actscalltest/systemappcallera/entry/src/main/ets/pages/index/index.ets b/ability/ability_runtime/actscalltest/systemappcallera/entry/src/main/ets/pages/index/index.ets deleted file mode 100644 index 30b8d934e2b7e2d5f07c2deb7495797e78e6b3d3..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actscalltest/systemappcallera/entry/src/main/ets/pages/index/index.ets +++ /dev/null @@ -1,52 +0,0 @@ -/* - * 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 diff --git a/ability/ability_runtime/actscalltest/systemappcallera/entry/src/main/ets/pages/second/second.ets b/ability/ability_runtime/actscalltest/systemappcallera/entry/src/main/ets/pages/second/second.ets deleted file mode 100644 index 33d9ae45245db03fd252ef7c1a85c9e284028e0d..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actscalltest/systemappcallera/entry/src/main/ets/pages/second/second.ets +++ /dev/null @@ -1,43 +0,0 @@ -/* - * 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 diff --git a/ability/ability_runtime/actscalltest/systemappcallera/entry/src/main/module.json b/ability/ability_runtime/actscalltest/systemappcallera/entry/src/main/module.json deleted file mode 100644 index 2796b797c5b40cd9dfc88fd79e69fc244960817b..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actscalltest/systemappcallera/entry/src/main/module.json +++ /dev/null @@ -1,89 +0,0 @@ -{ - "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.systemappcallera.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.systemappcallera.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.systemappcallera.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" - } - ] - } -} diff --git a/ability/ability_runtime/actscalltest/systemappcallera/entry/src/main/resources/base/element/string.json b/ability/ability_runtime/actscalltest/systemappcallera/entry/src/main/resources/base/element/string.json deleted file mode 100644 index 2977b612ec4595b13eaaffe3e8fc578e83c42d48..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actscalltest/systemappcallera/entry/src/main/resources/base/element/string.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "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" - } - ] -} diff --git a/ability/ability_runtime/actscalltest/systemappcallera/entry/src/main/resources/base/media/icon.png b/ability/ability_runtime/actscalltest/systemappcallera/entry/src/main/resources/base/media/icon.png deleted file mode 100644 index 474a55588fd7216113dd42073aadf254d4dba023..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actscalltest/systemappcallera/entry/src/main/resources/base/media/icon.png and /dev/null differ diff --git a/ability/ability_runtime/actscalltest/systemappcallera/entry/src/main/resources/base/profile/main_pages.json b/ability/ability_runtime/actscalltest/systemappcallera/entry/src/main/resources/base/profile/main_pages.json deleted file mode 100644 index 6898b31d2085f478ee1ed9d933a5910cbf901d92..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actscalltest/systemappcallera/entry/src/main/resources/base/profile/main_pages.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "src": [ - "pages/index/index", - "pages/second/second" - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/actscalltest/systemappcallera/signature/openharmony_sx.p7b b/ability/ability_runtime/actscalltest/systemappcallera/signature/openharmony_sx.p7b deleted file mode 100644 index cc53179a48f88f20acc379c138a001e9a15838f6..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actscalltest/systemappcallera/signature/openharmony_sx.p7b and /dev/null differ diff --git a/ability/ability_runtime/actscalltest/systemappcallerb/AppScope/app.json b/ability/ability_runtime/actscalltest/systemappcallerb/AppScope/app.json deleted file mode 100644 index cc201ae2713fc6305d1d02da58f842b08bf8e026..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actscalltest/systemappcallerb/AppScope/app.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "app":{ - "bundleName":"com.example.systemappcallerb", - "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 - } - } -} diff --git a/ability/ability_runtime/actscalltest/systemappcallerb/AppScope/resources/base/element/string.json b/ability/ability_runtime/actscalltest/systemappcallerb/AppScope/resources/base/element/string.json deleted file mode 100644 index ee69f9a861d9dc269ed6638735d52674583498e1..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actscalltest/systemappcallerb/AppScope/resources/base/element/string.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "string":[ - { - "name":"app_name", - "value":"ohosProject" - } - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/actscalltest/systemappcallerb/AppScope/resources/base/media/app_icon.png b/ability/ability_runtime/actscalltest/systemappcallerb/AppScope/resources/base/media/app_icon.png deleted file mode 100644 index 474a55588fd7216113dd42073aadf254d4dba023..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actscalltest/systemappcallerb/AppScope/resources/base/media/app_icon.png and /dev/null differ diff --git a/ability/ability_runtime/actscalltest/systemappcallerb/BUILD.gn b/ability/ability_runtime/actscalltest/systemappcallerb/BUILD.gn deleted file mode 100644 index f819712803137a32a754a78967d8dad062ec5fd6..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actscalltest/systemappcallerb/BUILD.gn +++ /dev/null @@ -1,45 +0,0 @@ -# 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("ActsSystemAppCallerBRelyHap") { - hap_profile = "entry/src/main/module.json" - js_build_mode = "debug" - deps = [ - ":systemappcallerb_js_assets", - ":systemappcallerb_resources", - ] - ets2abc = true - certificate_profile = "signature/openharmony_sx.p7b" - hap_name = "ActsSystemAppCallerBRelyHap" - - testonly = true - subsystem_name = "ability" - part_name = "ability_runtime" -} - -ohos_app_scope("systemappcallerb_app_profile") { - app_profile = "AppScope/app.json" - sources = [ "AppScope/resources" ] -} - -ohos_js_assets("systemappcallerb_js_assets") { - source_dir = "entry/src/main/ets" -} - -ohos_resources("systemappcallerb_resources") { - sources = [ "entry/src/main/resources" ] - deps = [ ":systemappcallerb_app_profile" ] - hap_profile = "entry/src/main/module.json" -} diff --git a/ability/ability_runtime/actscalltest/systemappcallerb/entry/src/main/ets/Application/AbilityStage.ts b/ability/ability_runtime/actscalltest/systemappcallerb/entry/src/main/ets/Application/AbilityStage.ts deleted file mode 100644 index 21606483f3457f3a691d5d0a28e111ffc5d9d4bf..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actscalltest/systemappcallerb/entry/src/main/ets/Application/AbilityStage.ts +++ /dev/null @@ -1,23 +0,0 @@ -/* - * 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 diff --git a/ability/ability_runtime/actscalltest/systemappcallerb/entry/src/main/ets/MainAbility/MainAbility.ts b/ability/ability_runtime/actscalltest/systemappcallerb/entry/src/main/ets/MainAbility/MainAbility.ts deleted file mode 100644 index d11d7350b7890f8a270e80beb71e1b3fcb9bbb69..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actscalltest/systemappcallerb/entry/src/main/ets/MainAbility/MainAbility.ts +++ /dev/null @@ -1,171 +0,0 @@ -/* - * 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) { - let want = { - bundleName: bundleNameCallee, - abilityName: abilityNameCallee, - }; - context.startAbilityByCall(want).then(data => { - if (typeof data !== "object" || data == null) { - console.log('SystemAppCallerB MainAbility startAbilityByCall fail'); - } - caller = data; - }); -} - -function stressCall() { - console.log('SystemAppCallerB MainAbility stressCall begin'); - if (typeof caller !== "object" || caller == null) { - console.log('SystemAppCallerB MainAbility caller error in stressCall'); - return; - } - let times = 10; - for (let i = 0; i < times; i++) { - let data = new MySequenceable(i, "SystemAppCallerB", ''); - caller.call('stressMethod', data); - } -} - -function unsubscribeCallback() { - console.debug("SystemAppCallerB MainAbility unsubscribeCallback"); -} - -function releaseCallee() { - try { - caller.onRelease(data => { - console.log('SystemAppCallerB MainAbility releaseCallBack:' + data); - }); - caller.release(); - } catch (e) { - console.log('SystemAppCallerB MainAbility release fail ' + e); - } - commonEvent.unsubscribe(subscriber, unsubscribeCallback); -} - -function startNext(context) { - let want = { - bundleName: "com.example.systemappcallerc", - abilityName: "com.example.systemappcallerc.MainAbility", - parameters: {case_num: "case5600"}, - } - context.startAbility(want, - (err) => {console.log("SystemAppCallerB MainAbility startAbility callback");}); - -} - -export default class MainAbility extends Ability { - - subscribeCallBack(err, data) { - console.log('SystemAppCallerB MainAbility subscribeCallBack data:' + JSON.stringify(data)); - switch (data.event) { - case event_call: - stressCall(); - break; - case event_release: - releaseCallee(); - break; - default: - console.log('SystemAppCallerB MainAbility subscribeCallBack event error:' + data.event); - break; - } - } - onCreate(want, launchParam) { - // Ability is creating, initialize resources for this ability - console.log("SystemAppCallerB MainAbility onCreate") - globalThis.abilityWant = want; - globalThis.abilityContext = this.context - } - - onDestroy() { - // Ability is destroying, release resources for this ability - console.log("SystemAppCallerB MainAbility onDestroy") - } - - onWindowStageCreate(windowStage) { - // Main window is created, set main page for this ability - console.log("SystemAppCallerB MainAbility onWindowStageCreate") - windowStage.setUIContent(this.context, "pages/index/index", null) - } - - onWindowStageDestroy() { - // Main window is destroyed, release UI related resources - console.log("SystemAppCallerB MainAbility onWindowStageDestroy") - } - - onForeground() { - // Ability has brought to foreground - console.log("SystemAppCallerB MainAbility onForeground"); - commonEvent.createSubscriber(subscribeInfo).then((data) => { - console.log("SystemAppCallerB 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("SystemAppCallerB MainAbility onBackground") - } -}; diff --git a/ability/ability_runtime/actscalltest/systemappcallerb/entry/src/main/ets/pages/index/index.ets b/ability/ability_runtime/actscalltest/systemappcallerb/entry/src/main/ets/pages/index/index.ets deleted file mode 100644 index 30b8d934e2b7e2d5f07c2deb7495797e78e6b3d3..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actscalltest/systemappcallerb/entry/src/main/ets/pages/index/index.ets +++ /dev/null @@ -1,52 +0,0 @@ -/* - * 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 diff --git a/ability/ability_runtime/actscalltest/systemappcallerb/entry/src/main/ets/pages/second/second.ets b/ability/ability_runtime/actscalltest/systemappcallerb/entry/src/main/ets/pages/second/second.ets deleted file mode 100644 index 33d9ae45245db03fd252ef7c1a85c9e284028e0d..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actscalltest/systemappcallerb/entry/src/main/ets/pages/second/second.ets +++ /dev/null @@ -1,43 +0,0 @@ -/* - * 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 diff --git a/ability/ability_runtime/actscalltest/systemappcallerb/entry/src/main/module.json b/ability/ability_runtime/actscalltest/systemappcallerb/entry/src/main/module.json deleted file mode 100644 index 5c9cb56cc678b8df43eccbebd6f923964ef5412a..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actscalltest/systemappcallerb/entry/src/main/module.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "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.systemappcallerb.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" - ] - } - ] - } - ], - "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" - } - ] - } -} diff --git a/ability/ability_runtime/actscalltest/systemappcallerb/entry/src/main/resources/base/element/string.json b/ability/ability_runtime/actscalltest/systemappcallerb/entry/src/main/resources/base/element/string.json deleted file mode 100644 index 2977b612ec4595b13eaaffe3e8fc578e83c42d48..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actscalltest/systemappcallerb/entry/src/main/resources/base/element/string.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "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" - } - ] -} diff --git a/ability/ability_runtime/actscalltest/systemappcallerb/entry/src/main/resources/base/media/icon.png b/ability/ability_runtime/actscalltest/systemappcallerb/entry/src/main/resources/base/media/icon.png deleted file mode 100644 index 474a55588fd7216113dd42073aadf254d4dba023..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actscalltest/systemappcallerb/entry/src/main/resources/base/media/icon.png and /dev/null differ diff --git a/ability/ability_runtime/actscalltest/systemappcallerb/entry/src/main/resources/base/profile/main_pages.json b/ability/ability_runtime/actscalltest/systemappcallerb/entry/src/main/resources/base/profile/main_pages.json deleted file mode 100644 index 6898b31d2085f478ee1ed9d933a5910cbf901d92..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actscalltest/systemappcallerb/entry/src/main/resources/base/profile/main_pages.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "src": [ - "pages/index/index", - "pages/second/second" - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/actscalltest/systemappcallerb/signature/openharmony_sx.p7b b/ability/ability_runtime/actscalltest/systemappcallerb/signature/openharmony_sx.p7b deleted file mode 100644 index cc53179a48f88f20acc379c138a001e9a15838f6..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actscalltest/systemappcallerb/signature/openharmony_sx.p7b and /dev/null differ diff --git a/ability/ability_runtime/actscalltest/systemappcallerc/AppScope/app.json b/ability/ability_runtime/actscalltest/systemappcallerc/AppScope/app.json deleted file mode 100644 index 9e36f5a9795e642910f225ac9bce010d53c2e2ae..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actscalltest/systemappcallerc/AppScope/app.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "app":{ - "bundleName":"com.example.systemappcallerc", - "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 - } - } -} diff --git a/ability/ability_runtime/actscalltest/systemappcallerc/AppScope/resources/base/element/string.json b/ability/ability_runtime/actscalltest/systemappcallerc/AppScope/resources/base/element/string.json deleted file mode 100644 index ee69f9a861d9dc269ed6638735d52674583498e1..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actscalltest/systemappcallerc/AppScope/resources/base/element/string.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "string":[ - { - "name":"app_name", - "value":"ohosProject" - } - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/actscalltest/systemappcallerc/AppScope/resources/base/media/app_icon.png b/ability/ability_runtime/actscalltest/systemappcallerc/AppScope/resources/base/media/app_icon.png deleted file mode 100644 index 474a55588fd7216113dd42073aadf254d4dba023..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actscalltest/systemappcallerc/AppScope/resources/base/media/app_icon.png and /dev/null differ diff --git a/ability/ability_runtime/actscalltest/systemappcallerc/BUILD.gn b/ability/ability_runtime/actscalltest/systemappcallerc/BUILD.gn deleted file mode 100644 index bf229ae9165434e188021aae6263cbdb037128e3..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actscalltest/systemappcallerc/BUILD.gn +++ /dev/null @@ -1,45 +0,0 @@ -# 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("ActsSystemAppCallerCRelyHap") { - hap_profile = "entry/src/main/module.json" - js_build_mode = "debug" - deps = [ - ":systemappcallerc_js_assets", - ":systemappcallerc_resources", - ] - ets2abc = true - certificate_profile = "signature/openharmony_sx.p7b" - hap_name = "ActsSystemAppCallerCRelyHap" - - testonly = true - subsystem_name = "ability" - part_name = "ability_runtime" -} - -ohos_app_scope("systemappcallerc_app_profile") { - app_profile = "AppScope/app.json" - sources = [ "AppScope/resources" ] -} - -ohos_js_assets("systemappcallerc_js_assets") { - source_dir = "entry/src/main/ets" -} - -ohos_resources("systemappcallerc_resources") { - sources = [ "entry/src/main/resources" ] - deps = [ ":systemappcallerc_app_profile" ] - hap_profile = "entry/src/main/module.json" -} diff --git a/ability/ability_runtime/actscalltest/systemappcallerc/entry/src/main/ets/Application/AbilityStage.ts b/ability/ability_runtime/actscalltest/systemappcallerc/entry/src/main/ets/Application/AbilityStage.ts deleted file mode 100644 index 21606483f3457f3a691d5d0a28e111ffc5d9d4bf..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actscalltest/systemappcallerc/entry/src/main/ets/Application/AbilityStage.ts +++ /dev/null @@ -1,23 +0,0 @@ -/* - * 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 diff --git a/ability/ability_runtime/actscalltest/systemappcallerc/entry/src/main/ets/MainAbility/MainAbility.ts b/ability/ability_runtime/actscalltest/systemappcallerc/entry/src/main/ets/MainAbility/MainAbility.ts deleted file mode 100644 index cc055a484694a2ef969992088acb238a1ed47e23..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actscalltest/systemappcallerc/entry/src/main/ets/MainAbility/MainAbility.ts +++ /dev/null @@ -1,168 +0,0 @@ -/* - * 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) { - let want = { - bundleName: bundleNameCallee, - abilityName: abilityNameCallee, - }; - context.startAbilityByCall(want).then(data => { - if (typeof data !== "object" || data == null) { - console.log('SystemAppCallerC MainAbility startAbilityByCall fail'); - } - caller = data; - }); -} - -function stressCall() { - console.log('SystemAppCallerC MainAbility stressCall begin'); - if (typeof caller !== "object" || caller == null) { - console.log('SystemAppCallerC MainAbility caller error in stressCall'); - } - let times = 10; - for (let i = 0; i < times; i++) { - let data = new MySequenceable(i, "SystemAppCallerC", ''); - caller.call('stressMethod', data); - } -} - -function unsubscribeCallback() { - console.debug("SystemAppCallerC MainAbility unsubscribeCallback"); -} - -function releaseCallee() { - try { - caller.onRelease(data => { - console.log('SystemAppCallerC MainAbility releaseCallBack:' + data); - }); - caller.release(); - } catch (e) { - console.log('SystemAppCallerC MainAbility release fail ' + e); - } - commonEvent.unsubscribe(subscriber, unsubscribeCallback); -} - -function triggerStressEvent() { - let commonEventData = {} - commonEvent.publish(event_call, commonEventData, (err) => { - console.log('SystemAppCallerC publish event') - }) -} - -export default class MainAbility extends Ability { - - subscribeCallBack(err, data) { - console.log('SystemAppCallerC MainAbility subscribeCallBack data:' + JSON.stringify(data)); - switch (data.event) { - case event_call: - stressCall(); - break; - case event_release: - releaseCallee(); - break; - default: - console.log('SystemAppCallerC MainAbility subscribeCallBack event error:' + data.event); - break; - } - } - - onCreate(want, launchParam) { - // Ability is creating, initialize resources for this ability - console.log("SystemAppCallerC MainAbility onCreate") - globalThis.abilityWant = want; - globalThis.abilityContext = this.context; - } - - onDestroy() { - // Ability is destroying, release resources for this ability - console.log("SystemAppCallerC MainAbility onDestroy") - } - - onWindowStageCreate(windowStage) { - // Main window is created, set main page for this ability - console.log("SystemAppCallerC MainAbility onWindowStageCreate") - windowStage.setUIContent(this.context, "pages/index/index", null) - } - - onWindowStageDestroy() { - // Main window is destroyed, release UI related resources - console.log("SystemAppCallerC MainAbility onWindowStageDestroy") - } - - onForeground() { - // Ability has brought to foreground - console.log("SystemAppCallerC MainAbility onForeground"); - commonEvent.createSubscriber(subscribeInfo).then((data) => { - console.log("SystemAppCallerC MainAbility createSubscriber"); - subscriber = data; - commonEvent.subscribe(subscriber, this.subscribeCallBack); - for (let start=Date.now(); Date.now() - start <= 100;); - if (globalThis.abilityWant.parameters["case_num"] == "case5600") { - getCaller(this.context); - triggerStressEvent(); - } - }); - } - - onBackground() { - // Ability has back to background - console.log("SystemAppCallerC MainAbility onBackground") - } -}; diff --git a/ability/ability_runtime/actscalltest/systemappcallerc/entry/src/main/ets/pages/index/index.ets b/ability/ability_runtime/actscalltest/systemappcallerc/entry/src/main/ets/pages/index/index.ets deleted file mode 100644 index 30b8d934e2b7e2d5f07c2deb7495797e78e6b3d3..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actscalltest/systemappcallerc/entry/src/main/ets/pages/index/index.ets +++ /dev/null @@ -1,52 +0,0 @@ -/* - * 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 diff --git a/ability/ability_runtime/actscalltest/systemappcallerc/entry/src/main/ets/pages/second/second.ets b/ability/ability_runtime/actscalltest/systemappcallerc/entry/src/main/ets/pages/second/second.ets deleted file mode 100644 index 33d9ae45245db03fd252ef7c1a85c9e284028e0d..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actscalltest/systemappcallerc/entry/src/main/ets/pages/second/second.ets +++ /dev/null @@ -1,43 +0,0 @@ -/* - * 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 diff --git a/ability/ability_runtime/actscalltest/systemappcallerc/entry/src/main/module.json b/ability/ability_runtime/actscalltest/systemappcallerc/entry/src/main/module.json deleted file mode 100644 index 5a425a94da95908a0d8fd63a6926acd288de0784..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actscalltest/systemappcallerc/entry/src/main/module.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "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.systemappcallerc.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" - ] - } - ] - } - ], - "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" - } - ] - } -} diff --git a/ability/ability_runtime/actscalltest/systemappcallerc/entry/src/main/resources/base/element/string.json b/ability/ability_runtime/actscalltest/systemappcallerc/entry/src/main/resources/base/element/string.json deleted file mode 100644 index 2977b612ec4595b13eaaffe3e8fc578e83c42d48..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actscalltest/systemappcallerc/entry/src/main/resources/base/element/string.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "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" - } - ] -} diff --git a/ability/ability_runtime/actscalltest/systemappcallerc/entry/src/main/resources/base/media/icon.png b/ability/ability_runtime/actscalltest/systemappcallerc/entry/src/main/resources/base/media/icon.png deleted file mode 100644 index 474a55588fd7216113dd42073aadf254d4dba023..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actscalltest/systemappcallerc/entry/src/main/resources/base/media/icon.png and /dev/null differ diff --git a/ability/ability_runtime/actscalltest/systemappcallerc/entry/src/main/resources/base/profile/main_pages.json b/ability/ability_runtime/actscalltest/systemappcallerc/entry/src/main/resources/base/profile/main_pages.json deleted file mode 100644 index 6898b31d2085f478ee1ed9d933a5910cbf901d92..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actscalltest/systemappcallerc/entry/src/main/resources/base/profile/main_pages.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "src": [ - "pages/index/index", - "pages/second/second" - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/actscalltest/systemappcallerc/signature/openharmony_sx.p7b b/ability/ability_runtime/actscalltest/systemappcallerc/signature/openharmony_sx.p7b deleted file mode 100644 index cc53179a48f88f20acc379c138a001e9a15838f6..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actscalltest/systemappcallerc/signature/openharmony_sx.p7b and /dev/null differ diff --git a/ability/ability_runtime/actscalltest/systemcallentrytest/Test.json b/ability/ability_runtime/actscalltest/systemcallentrytest/Test.json index f5428dc794d6fcc3f92f732e75eca69f4b86bc6e..6d0317ea7f5e462e0aead8a097fd424a483c6a8a 100644 --- a/ability/ability_runtime/actscalltest/systemcallentrytest/Test.json +++ b/ability/ability_runtime/actscalltest/systemcallentrytest/Test.json @@ -11,13 +11,7 @@ "kits": [ { "test-file-name": [ - "ActsCallTestEntryTest.hap", - "ActsCallTestFeatureRelyHap.hap", - "ActsSystemAppCallerARelyHap.hap", - "ActsSystemAppCallerBRelyHap.hap", - "ActsSystemAppCallerCRelyHap.hap", - "ActsSystemAppCalleeARelyHap.hap", - "ActsThirdAppARelyHap.hap" + "ActsCallTestEntryTest.hap" ], "type": "AppInstallKit", "cleanup-apps": true diff --git a/ability/ability_runtime/actscalltest/systemcallentrytest/entry/src/main/ets/SecondAbility/SecondAbility.ts b/ability/ability_runtime/actscalltest/systemcallentrytest/entry/src/main/ets/SecondAbility/SecondAbility.ts deleted file mode 100644 index 9ea84282ba560a8efd2656ee3e120d38c7e60717..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actscalltest/systemcallentrytest/entry/src/main/ets/SecondAbility/SecondAbility.ts +++ /dev/null @@ -1,253 +0,0 @@ -/* - * 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 callerA = "SystemAppCallerA" -var callSeqA= new Array(); -var callerB = "SystemAppCallerB" -var callSeqB= new Array(); -var callerC = "SystemAppCallerC" -var callSeqC= new Array(); -var seq = 0; - -function isArrayEqual(a1, a2) { - return a1.length==a2.length && a1.every(function(value,index) { return value === a2[index]}); -} -function isArrayEqualWithoutOrder(a1, a2) { - if (a1.length != a2.length) { - return false; - } - for (let ind in a1) { - if (a2.indexOf(a1[ind]) == -1) { - return false; - }; - } - return true; -} -var expectStressResult=[0,1,2,3,4,5,6,7,8,9]; - -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('======>SystemCallTest 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 testCall2(data) { - let recvSequence = new MySequenceable(0, '', ''); - console.log('======>SystemCallTest SecondAbility on testCall <======') - data.readSequenceable(recvSequence); - var result = recvSequence.str + 'processed2'; - var commonEventData = { - code: 0, - data: 'calleeCheckCall2Param', - 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('======>SystemCallTest SecondAbility on testCall <======') - data.readSequenceable(recvSequence); - let result = recvSequence.str + 'processed'; - recvSequence.setMySequence(recvSequence.num, recvSequence.str, result); - - return recvSequence; -} - -function test2100ReleaseCallback(data) { - console.log('SystemCallTest SecondAbility test2100ReleaseCallback:' + data); - test2100ReleaseFlag = data.toString(); -} - -var test2100ReleaseFlag = ''; - -export default class SecondAbility extends Ability { - - test2100(data) { - let recvData = new MySequenceable(0, '', ''); - data.readSequenceable(recvData); - let want = { - bundleName: "com.example.systemcalltest", - abilityName: "com.example.systemcalltest.MainAbility", - }; - console.log("SystemCallTest SecondAbility test2100 before startAbilityByCall"); - let resultData = new MySequenceable(0, '', ''); - globalThis.abilityContext2.startAbilityByCall(want).then((caller) => { - let param = new MySequenceable(recvData.num + 1, recvData.str + "Second", recvData.result); - caller.onRelease(test2100ReleaseCallback); - for (let start=Date.now(); Date.now() - start <= 200;); - caller.callWithResult('test2100', param).then((data2) => { - data2.readSequenceable(resultData); - caller.release(); - for (let start=Date.now(); Date.now() - start <= 200;); - resultData.result = test2100ReleaseFlag; - let commonEventData = { - parameters: { - num: resultData.num, - str: resultData.str, - result: resultData.result, - } - }; - commonEvent.publish('call_case2100_test_result', commonEventData, (err) => { - console.log('SystemCallTest SecondAbility publish call_case2200_test_result event'); - }) - - }); - }); - return resultData; - } - - testOff(data) { - let recvSequence = new MySequenceable(0, '', ''); - data.readSequenceable(recvSequence); - return recvSequence; - } - - stressMethod(data) { - let recvData = new MySequenceable(0, '', ''); - data.readSequenceable(recvData); - console.log('SystemCallTest SecondAbility stressMethod caller ' + recvData.str); - if (recvData.str == callerA) { - callSeqA.push(recvData.num); - } else if (recvData.str == callerB) { - callSeqB.push(recvData.num); - } else if (recvData.str == callerC) { - callSeqC.push(recvData.num); - } - seq++; - if (seq >= 30) { - console.log('SystemCallTest SecondAbility stressMethod SystemAppCallerA ' + callSeqA); - console.log('SystemCallTest SecondAbility stressMethod SystemAppCallerB ' + callSeqB); - console.log('SystemCallTest SecondAbility stressMethod SystemAppCallerC ' + callSeqC); - let stressResult=isArrayEqualWithoutOrder(callSeqA, expectStressResult); - stressResult=stressResult&&isArrayEqualWithoutOrder(callSeqB, expectStressResult); - stressResult=stressResult&&isArrayEqualWithoutOrder(callSeqC, expectStressResult); - console.log('SystemCallTest SecondAbility stressMethod stressResult ' + stressResult); - let commonEventData = { - data: stressResult.toString(), - }; - commonEvent.publish('com.example.systemcalltest.Test5600', commonEventData, (err) => { - console.log('SystemCallTest SecondAbility stress test result event'); - }); - seq=0; - callSeqA = []; - callSeqB = []; - callSeqC = []; - } - return recvData; - } - - loopMethod(data) { - let recvData = new MySequenceable(0, '', ''); - data.readSequenceable(recvData); - return new MySequenceable(recvData.num + 1, recvData.str, ''); - } - - onCreate(want, launchParam) { - // Ability is creating, initialize resources for this ability - console.log("SystemCallTest SecondAbility onCreate") - globalThis.abilityWant = want; - globalThis.secondCallee = this.callee; - globalThis.abilityContext2 = this.context; - this.callee.on('test2100', this.test2100); - this.callee.on('testOff', this.testOff); - this.callee.on('stressMethod', this.stressMethod); - this.callee.on('loopMethod', this.loopMethod); - this.callee.on('testCall', testCall); - this.callee.on('testCall2', testCall2); - this.callee.on('testCallWithResult', testCallWithResult); - } - - onDestroy() { - // Ability is destroying, release resources for this ability - console.log("SystemCallTest SecondAbility onDestroy") - } - - onWindowStageCreate(windowStage) { - // Main window is created, set main page for this ability - console.log("SystemCallTest SecondAbility onWindowStageCreate") - windowStage.setUIContent(this.context, "pages/second/second", null) - } - - onWindowStageDestroy() { - // Main window is destroyed, release UI related resources - console.log("SystemCallTest SecondAbility onWindowStageDestroy") - } - - onForeground() { - // Ability has brought to foreground - console.log("SystemCallTest SecondAbility onForeground") - } - - onBackground() { - // Ability has back to background - console.log("SystemCallTest SecondAbility onBackground") - } -}; diff --git a/ability/ability_runtime/actscalltest/systemcallentrytest/entry/src/main/ets/test/Ability.test.ets b/ability/ability_runtime/actscalltest/systemcallentrytest/entry/src/main/ets/test/Ability.test.ets index 0e03bc48c939ecc2a4da756019d7a2058f73b68f..79848a43cff5c4b69092df0d2fe328301b1f5433 100644 --- a/ability/ability_runtime/actscalltest/systemcallentrytest/entry/src/main/ets/test/Ability.test.ets +++ b/ability/ability_runtime/actscalltest/systemcallentrytest/entry/src/main/ets/test/Ability.test.ets @@ -12,643 +12,15 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from "@ohos/hypium" -import commonEvent from '@ohos.commonEvent' -import missionManager from '@ohos.application.missionManager' -import appManager from '@ohos.application.appManager' - -const MAX_MISSION_NUM = 1024; -var sysABundleName = "com.example.systemcalltest"; -var sysAMainAbilityName = "com.example.systemcalltest.MainAbility"; -var sysASecondAbilityName = "com.example.systemcalltest.SecondAbility"; -var systemAppCallerABundleName = "com.example.systemappcallera"; -var systemAppCallerAMainAbilityName = "com.example.systemappcallera.MainAbility"; -var systemAppCallerASecondAbilityName = "com.example.systemappcallera.SecondAbility"; -var systemAppCallerAThirdAbilityName = "com.example.systemappcallera.ThirdAbility"; - -var systemAppCalleeABundleName = "com.example.systemappcalleea"; -var systemAppCalleeAMainAbilityName = "com.example.systemappcalleea.MainAbility"; -var systemAppCalleeASecondAbilityName = "com.example.systemappcalleea.SecondAbility"; -var systemAppCalleeAThirdAbilityName = "com.example.systemappcalleea.ThirdAbility"; - -var systemAppCalleeBBundleName = "com.example.systemappcalleeb"; -var systemAppCalleeBMainAbilityName = "com.example.systemappcalleeb.MainAbility"; -var systemAppCalleeBSecondAbilityName = "com.example.systemappcalleeb.SecondAbility"; - -var systemAppCalleeCBundleName = "com.example.systemappcalleec"; -var systemAppCalleeCMainAbilityName = "com.example.systemappcalleec.MainAbility"; -var systemAppCalleeCSecondAbilityName = "com.example.systemappcalleec.SecondAbility"; - -var thirdAppABundleName = "com.example.thirdappa"; -var thirdAppAMainAbilityName = "com.example.thirdappa.MainAbility"; -var subscriberInfo = { - events: ["CallTest"], -}; -var caseDepBundles = []; -var subscriber = null; +import { describe, it, expect } from "@ohos/hypium" const ERROR_CODE_INVALID_PARAM = 401; -const ERROR_CODE_CALLER_RELEASED = 16200001; -const ERROR_CODE_CLAAEE_INVALID = 16200002; const ERROR_CODE_FUNC_REGISTERED = 16200004; const ERROR_CODE_FUNC_NOT_EXIST = 16200005; -const ERROR_CODE_INNER_ERROR = 16000050; -const ERROR_CODE_TYPE_ERROR = 16000002; - -class MySequenceable { - num: number = 0; - str: String = "default"; - result: String = "default"; - - 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 getMissionId(abilityName, state) { - return new Promise(async (resolve, reject) => { - let missionId = -1; - let missionInfos = await missionManager.getMissionInfos('', MAX_MISSION_NUM); - for (let i = 0; i < missionInfos.length; i++) { - if ((missionInfos[i].want.abilityName == abilityName) - && (missionInfos[i].runningState == state)) { - missionId = missionInfos[i].missionId; - break; - } - } - console.log('======>getMissionId resolve missionId<=======' + missionId); - resolve(missionId); - }) -} - -function sleep(time) { - return new Promise((resolve)=>setTimeout(resolve,time)); -} - -function delay(time) { - let delta; - if (typeof time != 'number' || time <= 0) { - delta = 100; - } else { - delta = Math.round(time); - } - for (let start = Date.now(); Date.now() - start <= delta; ); -} - -function clearDepProcess(bundleNames, callback, undoneCallBack) { - var result; - var cnt = 0; - - if (bundleNames.length == 0) { - undoneCallBack(); - } - for (let i = 0; i < bundleNames.length; i++) { - result = appManager.killProcessesByBundleName(bundleNames[i], (err, data) => { - console.log("clearDepProcess killProcessesByBundleName bundleName: " + bundleNames[i]); - console.log("clearDepProcess killProcessesByBundleName err: " + JSON.stringify(err)); - console.log("clearDepProcess killProcessesByBundleName data: " + JSON.stringify(data)); - cnt++; - if (cnt == bundleNames.length) { - callback(); - } - }); - } -} export default function abilityTest() { describe('ActsAbilityTest', function () { - beforeEach(async (done) => { - done(); - }) - - afterEach(async (done) => { - var testMissionId; - - if (subscriber != null) { - commonEvent.unsubscribe(subscriber, () => { - console.log('======>afterEach unsubscribe<======='); - }); - subscriber = null; - } - - testMissionId = await getMissionId(sysAMainAbilityName, 0); - console.log('======>afterEach test missionId<=======' + testMissionId); - if (testMissionId != -1) { - await missionManager.moveMissionToFront(testMissionId); - } - console.log('======>afterEach test missionId move to front<======='); - - clearDepProcess(caseDepBundles, () => { - caseDepBundles = []; - setTimeout(() => { - done(); - }, 500) - }, () => { - done(); - }); - }) - - /** - * @tc.number: ACTS_CommonComponent_Call_0100 - * @tc.name: The parameter "method" of the Caller.callWithResult function is an empty string. - * @tc.desc: Verify that the parameter "method" of the Caller.callWithResult function is an empty string. - */ - it('ACTS_CommonComponent_Call_0100', 0, async function (done) { - console.log('ACTS_CommonComponent_Call_0100 begin'); - let want = { - bundleName: sysABundleName, - abilityName: sysASecondAbilityName, - } - globalThis.abilityContext.startAbilityByCall(want) - .then(data => { - console.info(`ACTS_CommonComponent_Call_0100 startAbilityByCall SUCCESS`); - expect().assertFail(); - done(); - }) - .catch(error => { - console.info(`ACTS_CommonComponent_Call_0100 startAbilityByCall Catch`); - done(); - }); - }) - - /** - * @tc.number: ACTS_CommonComponent_Call_0300 - * @tc.name: The parameter "method" of the Caller.callWithResult function is an empty string. - * @tc.desc: Verify that the parameter "method" of the Caller.callWithResult function is an empty string. - */ - it('ACTS_CommonComponent_Call_0300', 0, async function (done) { - console.log('ACTS_CommonComponent_Call_0300 begin'); - caseDepBundles = [systemAppCalleeABundleName]; - - function unSubscribeCallBack() { - console.log('ACTS_CommonComponent_Call_0300 unSubscribeCallBack') - subscriber = null; - done(); - } - - function releaseCallback(data) { - expect(data).assertEqual('release'); - console.log('ACTS_CommonComponent_Call_0300 releaseCallBack' + data); - commonEvent.unsubscribe(subscriber, unSubscribeCallBack); - } - - function subscribeCallBack(err, data) { - console.log('ACTS_CommonComponent_Call_0300 subscribeCallBack data:' + JSON.stringify(data)) - expect(data.data).assertEqual('calleeCheckCallParam'); - expect(data.parameters.num).assertEqual(300); - expect(data.parameters.str).assertEqual('ACTS_CommonComponent_Call_0300'); - expect(data.parameters.result).assertEqual('ACTS_CommonComponent_Call_0300processed'); - console.log('ACTS_CommonComponent_Call_0300 do release'); - caller.release(); - } - - subscriber = await commonEvent.createSubscriber(subscriberInfo); - commonEvent.subscribe(subscriber, subscribeCallBack); - - let caller = await globalThis.globalThis.abilityContext.startAbilityByCall({ - bundleName: systemAppCalleeABundleName, - abilityName: systemAppCalleeAMainAbilityName, - }); - - caller.onRelease(releaseCallback); - let param = new MySequenceable(300, "ACTS_CommonComponent_Call_0300", 'default'); - caller.call('testCall', param).then(() => { - console.log('ACTS_CommonComponent_Call_0300 call success'); - }).catch(err => { - console.log('ACTS_CommonComponent_Call_0300 call exception' + err); - expect().assertFail(); - }) - }) - - /** - * @tc.number: ACTS_CommonComponent_Call_0400 - * @tc.name: The parameter "method" of the Caller.callWithResult function is an empty string. - * @tc.desc: Verify that the parameter "method" of the Caller.callWithResult function is an empty string. - */ - it('ACTS_CommonComponent_Call_0400', 0, async function (done) { - caseDepBundles = [systemAppCalleeABundleName]; - console.log('ACTS_CommonComponent_Call_0400 begin'); - - function releaseCallback(data) { - expect(data).assertEqual('release'); - console.log('ACTS_CommonComponent_Call_0400 releaseCallBack' + data); - done(); - } - - let caller = await globalThis.globalThis.abilityContext.startAbilityByCall({ - bundleName: systemAppCalleeABundleName, - abilityName: systemAppCalleeAMainAbilityName, - }); - - caller.onRelease(releaseCallback); - let param = new MySequenceable(400, "ACTS_CommonComponent_Call_0400", 'default'); - caller.callWithResult('testCallWithResult', param).then((data) => { - console.log('ACTS_CommonComponent_Call_0400 call success'); - var result = new MySequenceable(0, '', ''); - data.readSequenceable(result); - expect(result.num).assertEqual(400); - expect(result.str).assertEqual('ACTS_CommonComponent_Call_0400'); - expect(result.result).assertEqual('ACTS_CommonComponent_Call_0400processed'); - caller.release(); - }).catch(err => { - console.log('ACTS_CommonComponent_Call_0400 call exception' + err); - expect().assertFail(); - caller.release(); - }) - }) - - /** - * @tc.number: ACTS_CommonComponent_Call_0500 - * @tc.name: The parameter "method" of the Caller.callWithResult function is an empty string. - * @tc.desc: Verify that the parameter "method" of the Caller.callWithResult function is an empty string. - */ - it('ACTS_CommonComponent_Call_0500', 0, async function (done) { - console.log('ACTS_CommonComponent_Call_0500 begin'); - var caller1; - var caller2; - caseDepBundles = [systemAppCalleeABundleName]; - - function unSubscribeCallBack() { - console.log('ACTS_CommonComponent_Call_0500 unSubscribeCallBack') - subscriber = null; - caller1.release(); - done(); - } - - function releaseCallback(data) { - expect(data).assertEqual('release'); - console.log('ACTS_CommonComponent_Call_0500 releaseCallBack' + data); - commonEvent.unsubscribe(subscriber, unSubscribeCallBack); - } - - function subscribeCallBack(err, data) { - console.log('ACTS_CommonComponent_Call_0500 subscribeCallBack data:' + JSON.stringify(data)) - expect(data.data).assertEqual('calleeCheckCallParam'); - expect(data.parameters.num).assertEqual(500); - expect(data.parameters.str).assertEqual('ACTS_CommonComponent_Call_0500'); - expect(data.parameters.result).assertEqual('ACTS_CommonComponent_Call_0500processed'); - console.log('ACTS_CommonComponent_Call_0500 do release'); - caller2.release(); - } - - subscriber = await commonEvent.createSubscriber(subscriberInfo); - commonEvent.subscribe(subscriber, subscribeCallBack); - - caller1 = await globalThis.globalThis.abilityContext.startAbilityByCall({ - bundleName: systemAppCalleeABundleName, - abilityName: systemAppCalleeAMainAbilityName, - }); - - caller2 = await globalThis.globalThis.abilityContext.startAbilityByCall({ - bundleName: systemAppCalleeABundleName, - abilityName: systemAppCalleeASecondAbilityName, - }); - - caller2.onRelease(releaseCallback); - let param = new MySequenceable(500, "ACTS_CommonComponent_Call_0500", 'default'); - caller2.call('testCall', param).then(() => { - console.log('ACTS_CommonComponent_Call_0500 call success'); - }).catch(err => { - console.log('ACTS_CommonComponent_Call_0500 call exception' + err); - expect().assertFail(); - }) - }) - - /** - * @tc.number: ACTS_CommonComponent_Call_0600 - * @tc.name: The parameter "method" of the Caller.callWithResult function is an empty string. - * @tc.desc: Verify that the parameter "method" of the Caller.callWithResult function is an empty string. - */ - it('ACTS_CommonComponent_Call_0600', 0, async function (done) { - caseDepBundles = [systemAppCalleeABundleName]; - console.log('ACTS_CommonComponent_Call_0600 begin'); - - function releaseCallback(data) { - expect(data).assertEqual('release'); - console.log('ACTS_CommonComponent_Call_0600 releaseCallBack' + data); - caller1.release(); - done(); - } - - let caller1 = await globalThis.globalThis.abilityContext.startAbilityByCall({ - bundleName: systemAppCalleeABundleName, - abilityName: systemAppCalleeAMainAbilityName, - }); - let caller2 = await globalThis.globalThis.abilityContext.startAbilityByCall({ - bundleName: systemAppCalleeABundleName, - abilityName: systemAppCalleeASecondAbilityName, - }); - - caller2.onRelease(releaseCallback); - let param = new MySequenceable(600, "ACTS_CommonComponent_Call_0600", 'default'); - caller2.callWithResult('testCallWithResult', param).then((data) => { - console.log('ACTS_CommonComponent_Call_0600 call success'); - var result = new MySequenceable(0, '', ''); - data.readSequenceable(result); - expect(result.num).assertEqual(600); - expect(result.str).assertEqual('ACTS_CommonComponent_Call_0600'); - expect(result.result).assertEqual('ACTS_CommonComponent_Call_0600processed'); - caller2.release(); - }).catch(err => { - console.log('ACTS_CommonComponent_Call_0600 call exception' + err); - expect().assertFail(); - caller2.release(); - }) - }) - - /** - * @tc.number: ACTS_CommonComponent_Call_0700 - * @tc.name: The parameter "method" of the Caller.callWithResult function is an empty string. - * @tc.desc: Verify that the parameter "method" of the Caller.callWithResult function is an empty string. - */ - it('ACTS_CommonComponent_Call_0700', 0, async function (done) { - console.log('ACTS_CommonComponent_Call_0700 begin'); - var caller; - caseDepBundles = [systemAppCalleeABundleName]; - - function unSubscribeCallBack() { - console.log('ACTS_CommonComponent_Call_0700 unSubscribeCallBack') - subscriber = null; - done(); - } - - function releaseCallback(data) { - expect(data).assertEqual('release'); - console.log('ACTS_CommonComponent_Call_0700 releaseCallBack' + data); - commonEvent.unsubscribe(subscriber, unSubscribeCallBack); - } - - function releaseCallback1(data) { - expect(data).assertEqual('release'); - console.log('ACTS_CommonComponent_Call_0700 releaseCallBack1' + data); - setTimeout(() => { - globalThis.globalThis.abilityContext.startAbilityByCall({ - bundleName: systemAppCalleeABundleName, - abilityName: systemAppCalleeASecondAbilityName, - }).then(data => { - caller = data; - console.log('ACTS_CommonComponent_Call_0700 caller get') - caller.onRelease(releaseCallback); - let param = new MySequenceable(700, "ACTS_CommonComponent_Call_0700", 'default'); - caller.call('testCall', param).then(() => { - console.log('ACTS_CommonComponent_Call_0700 call success'); - }).catch(err => { - console.log('ACTS_CommonComponent_Call_0700 call exception' + err); - expect().assertFail(); - }) - }) - }, 100); - } - - function subscribeCallBack(err, data) { - console.log('ACTS_CommonComponent_Call_0700 subscribeCallBack data:' + JSON.stringify(data)) - expect(data.data).assertEqual('calleeCheckCallParam'); - expect(data.parameters.num).assertEqual(700); - expect(data.parameters.str).assertEqual('ACTS_CommonComponent_Call_0700'); - expect(data.parameters.result).assertEqual('ACTS_CommonComponent_Call_0700processed'); - console.log('ACTS_CommonComponent_Call_0700 do release'); - caller.release(); - } - - subscriber = await commonEvent.createSubscriber(subscriberInfo); - commonEvent.subscribe(subscriber, subscribeCallBack); - - globalThis.globalThis.abilityContext.startAbilityByCall({ - bundleName: systemAppCalleeABundleName, - abilityName: systemAppCalleeASecondAbilityName, - }).then(data => { - caller = data; - console.log('ACTS_CommonComponent_Call_0700 caller get') - caller.onRelease(releaseCallback1); - caller.release(); - }) - }) - - /** - * @tc.number: ACTS_CommonComponent_Call_0800 - * @tc.name: The parameter "method" of the Caller.callWithResult function is an empty string. - * @tc.desc: Verify that the parameter "method" of the Caller.callWithResult function is an empty string. - */ - it('ACTS_CommonComponent_Call_0800', 0, async function (done) { - console.log('ACTS_CommonComponent_Call_0800 begin'); - var caller; - caseDepBundles = [systemAppCalleeABundleName]; - - function releaseCallback(data) { - expect(data).assertEqual('release'); - console.log('ACTS_CommonComponent_Call_0800 releaseCallBack' + data); - done(); - } - - function releaseCallback1(data) { - expect(data).assertEqual('release'); - console.log('ACTS_CommonComponent_Call_0800 releaseCallBack' + data); - setTimeout(() => { - globalThis.globalThis.abilityContext.startAbilityByCall({ - bundleName: systemAppCalleeABundleName, - abilityName: systemAppCalleeASecondAbilityName, - }).then(data => { - caller = data; - caller.onRelease(releaseCallback); - let param = new MySequenceable(800, "ACTS_CommonComponent_Call_0800", 'default'); - caller.callWithResult('testCallWithResult', param).then((data) => { - console.log('ACTS_CommonComponent_Call_0800 call success'); - var result = new MySequenceable(0, '', ''); - data.readSequenceable(result); - expect(result.num).assertEqual(800); - expect(result.str).assertEqual('ACTS_CommonComponent_Call_0800'); - expect(result.result).assertEqual('ACTS_CommonComponent_Call_0800processed'); - caller.release(); - }).catch(err => { - console.log('ACTS_CommonComponent_Call_0800 call exception' + err); - expect().assertFail(); - caller.release(); - }) - }); - }, 100); - } - - globalThis.globalThis.abilityContext.startAbilityByCall({ - bundleName: systemAppCalleeABundleName, - abilityName: systemAppCalleeASecondAbilityName, - }).then(data => { - caller = data; - console.log('ACTS_CommonComponent_Call_0800 caller get') - caller.onRelease(releaseCallback1); - caller.release(); - }) - }) - - /** - * @tc.number: ACTS_CommonComponent_Call_0900 - * @tc.name: The parameter "method" of the Caller.callWithResult function is an empty string. - * @tc.desc: Verify that the parameter "method" of the Caller.callWithResult function is an empty string. - */ - it('ACTS_CommonComponent_Call_0900', 0, async function (done) { - console.log('ACTS_CommonComponent_Call_0900 begin'); - caseDepBundles = [thirdAppABundleName]; - var caller; - - function unSubscribeCallBack() { - console.log('ACTS_CommonComponent_Call_0900 unSubscribeCallBack') - subscriber = null; - done(); - } - - function releaseCallback(data) { - expect(data).assertEqual('release'); - console.log('ACTS_CommonComponent_Call_0900 releaseCallBack' + data); - commonEvent.unsubscribe(subscriber, unSubscribeCallBack); - } - - function subscribeCallBack(err, data) { - console.log('ACTS_CommonComponent_Call_0900 subscribeCallBack data:' + JSON.stringify(data)) - expect(data.data).assertEqual('calleeCheckCallParam'); - expect(data.parameters.num).assertEqual(900); - expect(data.parameters.str).assertEqual('ACTS_CommonComponent_Call_0900'); - expect(data.parameters.result).assertEqual('ACTS_CommonComponent_Call_0900processed'); - console.log('AMS_CallTest_0100 do release'); - caller.release(); - } - - subscriber = await commonEvent.createSubscriber(subscriberInfo); - commonEvent.subscribe(subscriber, subscribeCallBack); - caller = await globalThis.globalThis.abilityContext.startAbilityByCall({ - bundleName: thirdAppABundleName, - abilityName: thirdAppAMainAbilityName, - }); - - caller.onRelease(releaseCallback); - let param = new MySequenceable(900, "ACTS_CommonComponent_Call_0900", 'default'); - caller.call('testCall', param).then(() => { - console.log('ACTS_CommonComponent_Call_0900 call success'); - }).catch(err => { - console.log('ACTS_CommonComponent_Call_0900 call exception' + err); - expect().assertFail(); - }) - }) - - /** - * @tc.number: ACTS_CommonComponent_Call_1000 - * @tc.name: The parameter "method" of the Caller.callWithResult function is an empty string. - * @tc.desc: Verify that the parameter "method" of the Caller.callWithResult function is an empty string. - */ - it('ACTS_CommonComponent_Call_1000', 0, async function (done) { - caseDepBundles = [thirdAppABundleName]; - console.log('ACTS_CommonComponent_Call_1000 begin'); - var caller; - - function releaseCallback(data) { - expect(data).assertEqual('release'); - console.log('ACTS_CommonComponent_Call_1000 releaseCallBack' + data); - done(); - } - - caller = await globalThis.globalThis.abilityContext.startAbilityByCall({ - bundleName: thirdAppABundleName, - abilityName: thirdAppAMainAbilityName, - }); - - caller.onRelease(releaseCallback); - let param = new MySequenceable(1000, "ACTS_CommonComponent_Call_1000", 'default'); - caller.callWithResult('testCallWithResult', param).then((data) => { - console.log('ACTS_CommonComponent_Call_1000 call success'); - var result = new MySequenceable(0, '', ''); - data.readSequenceable(result); - expect(result.num).assertEqual(1000); - expect(result.str).assertEqual('ACTS_CommonComponent_Call_1000'); - expect(result.result).assertEqual('ACTS_CommonComponent_Call_1000processed'); - caller.release(); - }).catch(err => { - console.log('ACTS_CommonComponent_Call_1000 call exception' + err); - expect().assertFail(); - caller.release(); - }) - }) - - /** - * @tc.number: ACTS_CommonComponent_Call_1700 - * @tc.name: The parameter "method" of the Caller.callWithResult function is an empty string. - * @tc.desc: Verify that the parameter "method" of the Caller.callWithResult function is an empty string. - */ - it('ACTS_CommonComponent_Call_1700', 0, async function (done) { - console.log('ACTS_CommonComponent_Call_1700 begin'); - var exceptionFlag = false; - - await globalThis.globalThis.abilityContext.startAbilityByCall({ - bundleName: systemAppCalleeABundleName, - abilityName: systemAppCalleeAThirdAbilityName, - }).then(data => { - expect().assertFail(); - done(); - }).catch(err => { - console.log('ACTS_CommonComponent_Call_1700 call err.code: ' + JSON.stringify(err.code) + - ' err.msg: ' + JSON.stringify(err.message)); - expect(err.code).assertEqual(ERROR_CODE_TYPE_ERROR); - exceptionFlag = true; - }); - - expect(exceptionFlag).assertEqual(true); - done(); - }) - - /** - * @tc.number: ACTS_CommonComponent_Call_2000 - * @tc.name: The callee exits abnormally after the caller requests the call to be called successfully. - * @tc.desc: Verify that the caller can register the server's death listener. - */ - it('ACTS_CommonComponent_Call_2000', 0, async function (done) { - console.log('ACTS_CommonComponent_Call_2000 begin'); - - function releaseCallback(data) { - console.log('ACTS_CommonComponent_Call_2000 releaseCallBack:' + data); - expect(data).assertEqual("died"); - done(); - } - - let bundleNameCallee = "com.example.systemappcalleea"; - let abilityNameCallee = "com.example.systemappcalleea.MainAbility"; - let want = { - bundleName: bundleNameCallee, - abilityName: abilityNameCallee, - } - let caller = await globalThis.globalThis.abilityContext.startAbilityByCall(want); - if (typeof caller !== "object" || caller == null) { - console.log('ACTS_CommonComponent_Call_2000 startAbilityByCall fail'); - expect().assertFail(); - } - try { - caller.onRelease(releaseCallback); - } catch (e) { - console.log('ACTS_CommonComponent_Call_2000 Caller onRelease fail ' + e); - expect().assertFail(); - } - await appManager.killProcessesByBundleName(bundleNameCallee); - }) - /** * @tc.number: ACTS_CommonComponent_Call_3100 * @tc.name: The parameter method of the Callee.on function is an empty string. @@ -927,250 +299,5 @@ export default function abilityTest() { console.log('ACTS_CommonComponent_Call_5100 finished'); done(); }) - - /* - * @tc.number: ACTS_CommonComponent_Call_5200 - * @tc.name: Connects a service ability, which is used to start a cloned page ability. - * @tc.desc: Check the event data of executor page ability publishes - */ - it('ACTS_CommonComponent_Call_5200', 0, async function (done) { - console.log('ACTS_CommonComponent_Call_5200 begin'); - let exceptionFlag = false; - - - await globalThis.globalThis.abilityContext.startAbilityByCall(null) - .then(data => { - expect().assertFail(); - done(); - }).catch(err => { - console.log('ACTS_CommonComponent_Call_5200 call err.code: ' + JSON.stringify(err.code) + - ' err.msg: ' + JSON.stringify(err.message)); - expect(err.code).assertEqual(ERROR_CODE_INVALID_PARAM); - exceptionFlag = true; - }); - - expect(exceptionFlag).assertEqual(true); - done(); - }) - - /* - * @tc.number: ACTS_CommonComponent_Call_5300 - * @tc.name: Connects a service ability, which is used to start a cloned page ability. - * @tc.desc: Check the event data of executor page ability publishes - */ - it('ACTS_CommonComponent_Call_5300', 0, async function (done) { - console.log('ACTS_CommonComponent_Call_5300 begin'); - let exceptionFlag = false; - - await globalThis.globalThis.abilityContext.startAbilityByCall({ - bundleName: "", - abilityName: "", - }).then(data => { - expect().assertFail(); - done(); - }).catch(err => { - console.log('ACTS_CommonComponent_Call_5300 call err.code: ' + JSON.stringify(err.code) + - ' err.msg: ' + JSON.stringify(err.message)); - expect(err.code).assertEqual(ERROR_CODE_INNER_ERROR); - exceptionFlag = true; - }); - - expect(exceptionFlag).assertEqual(true); - done(); - }) - - /* - * @tc.number: ACTS_CommonComponent_Call_5400 - * @tc.name: Connects a service ability, which is used to start a cloned page ability. - * @tc.desc: Check the event data of executor page ability publishes - */ - it('ACTS_CommonComponent_Call_5400', 0, async function (done) { - console.log('ACTS_CommonComponent_Call_5400 begin'); - let exceptionFlag = false; - - await globalThis.globalThis.abilityContext.startAbilityByCall(undefined) - .then(data => { - expect().assertFail(); - done(); - }).catch(err => { - console.log('ACTS_CommonComponent_Call_5400 call err.code: ' + JSON.stringify(err.code) + - ' err.msg: ' + JSON.stringify(err.message)); - expect(err.code).assertEqual(ERROR_CODE_INVALID_PARAM); - exceptionFlag = true; - }); - - expect(exceptionFlag).assertEqual(true); - done(); - }) - - /** - * @tc.number: ACTS_CommonComponent_Call_5600 - * @tc.name: The callee exits abnormally after the caller requests the call to be called successfully. - * @tc.desc: Verify that the caller can unregister the server's death listener. - */ - it('ACTS_CommonComponent_Call_5600', 0, async function (done) { - console.log('ACTS_CommonComponent_Call_5600 begin'); - - function releaseCallback(data) { - console.log('ACTS_CommonComponent_Call_5600 releaseCallBack:' + data); - expect(data).assertEqual("died"); - done(); - } - - let bundleNameCallee = "com.example.systemappcalleea"; - let abilityNameCallee = "com.example.systemappcalleea.MainAbility"; - let want = { - bundleName: bundleNameCallee, - abilityName: abilityNameCallee, - } - let caller = await globalThis.globalThis.abilityContext.startAbilityByCall(want); - if (typeof caller !== "object" || caller == null) { - console.log('ACTS_CommonComponent_Call_5600 startAbilityByCall fail'); - expect().assertFail(); - } - try { - caller.off('release', releaseCallback); - } catch (e) { - console.log('ACTS_CommonComponent_Call_5600 Caller onRelease fail ' + e); - expect().assertFail(); - done(); - } - done(); - }) - - /** - * @tc.number: ACTS_CommonComponent_Call_5700 - * @tc.name: The callee exits abnormally after the caller requests the call to be called successfully. - * @tc.desc: Verify that the caller can unregister the server's death listener. - */ - it('ACTS_CommonComponent_Call_5700', 0, async function (done) { - console.log('ACTS_CommonComponent_Call_5700 begin'); - - function releaseCallback(data) { - console.log('ACTS_CommonComponent_Call_5700 releaseCallBack:' + data); - expect(data).assertEqual("died"); - done(); - } - - let bundleNameCallee = "com.example.systemappcalleea"; - let abilityNameCallee = "com.example.systemappcalleea.MainAbility"; - let want = { - bundleName: bundleNameCallee, - abilityName: abilityNameCallee, - } - let caller = await globalThis.globalThis.abilityContext.startAbilityByCall(want); - if (typeof caller !== "object" || caller == null) { - console.log('ACTS_CommonComponent_Call_5700 startAbilityByCall fail'); - expect().assertFail(); - done(); - } - let flag = false; - try { - caller.off('release'); - } catch (e) { - console.log('ACTS_CommonComponent_Call_5700 Caller onRelease fail ' + e); - flag = true; - done(); - } - }) - - /** - * @tc.number: ACTS_CommonComponent_Call_5800 - * @tc.name: The callee exits abnormally after the caller requests the call to be called successfully. - * @tc.desc: Verify that the caller can unregister the server's death listener. - */ - it('ACTS_CommonComponent_Call_5800', 0, async function (done) { - console.log('ACTS_CommonComponent_Call_5800 begin'); - - function releaseCallback(data) { - console.log('ACTS_CommonComponent_Call_5800 releaseCallBack:' + data); - expect(data).assertEqual("died"); - done(); - } - - let bundleNameCallee = "com.example.systemappcalleea"; - let abilityNameCallee = "com.example.systemappcalleea.MainAbility"; - let want = { - bundleName: bundleNameCallee, - abilityName: abilityNameCallee, - } - let caller = await globalThis.globalThis.abilityContext.startAbilityByCall(want); - if (typeof caller !== "object" || caller == null) { - console.log('ACTS_CommonComponent_Call_5800 startAbilityByCall fail'); - expect().assertFail(); - done(); - } - let flag = false; - try { - caller.off('Not release', releaseCallback); - } catch (e) { - console.log('ACTS_CommonComponent_Call_5800 Caller onRelease fail ' + e); - done(); - } - }) - - /** - * @tc.number: ACTS_CommonComponent_Call_5900 - * @tc.name: The callee exits abnormally after the caller requests the call to be called successfully. - * @tc.desc: Verify that the caller can unregister the server's death listener. - */ - it('ACTS_CommonComponent_Call_5900', 0, async function (done) { - console.log('ACTS_CommonComponent_Call_5900 begin'); - - let bundleNameCallee = "com.example.systemappcalleea"; - let abilityNameCallee = "com.example.systemappcalleea.MainAbility"; - let want = { - bundleName: bundleNameCallee, - abilityName: abilityNameCallee, - } - let caller = await globalThis.globalThis.abilityContext.startAbilityByCall(want); - if (typeof caller !== "object" || caller == null) { - console.log('ACTS_CommonComponent_Call_5900 startAbilityByCall fail'); - expect().assertFail(); - done(); - } - let flag = false; - try { - caller.off('Not release'); - } catch (e) { - console.log('ACTS_CommonComponent_Call_5900 Caller onRelease fail ' + e); - done(); - } - }) - - /** - * @tc.number: ACTS_CommonComponent_Call_5500 - * @tc.name: The callee exits abnormally after the caller requests the call to be called successfully. - * @tc.desc: Verify that the caller can register the server's death listener. - */ - it('ACTS_CommonComponent_Call_5500', 0, async function (done) { - console.log('ACTS_CommonComponent_Call_5500 begin'); - - function releaseCallback(data) { - console.log('ACTS_CommonComponent_Call_5500 releaseCallBack:' + data); - expect(data).assertEqual("died"); - done(); - } - - let bundleNameCallee = "com.example.systemappcalleea"; - let abilityNameCallee = "com.example.systemappcalleea.MainAbility"; - let want = { - bundleName: bundleNameCallee, - abilityName: abilityNameCallee, - } - let caller = await globalThis.globalThis.abilityContext.startAbilityByCall(want); - if (typeof caller !== "object" || caller == null) { - console.log('ACTS_CommonComponent_Call_5500 startAbilityByCall fail'); - expect().assertFail(); - } - try { - caller.on('release', releaseCallback); - } catch (e) { - console.log('ACTS_CommonComponent_Call_5500 Caller onRelease fail ' + e); - expect().assertFail(); - done(); - } - await appManager.killProcessesByBundleName(bundleNameCallee); - }) }) } \ No newline at end of file diff --git a/ability/ability_runtime/actscalltest/systemcallentrytest/entry/src/main/module.json b/ability/ability_runtime/actscalltest/systemcallentrytest/entry/src/main/module.json index 33afd6111b856a10ba072a19945c64d87e0162dd..7f13ec44efa1630a4f071a6affb845f3c972615a 100644 --- a/ability/ability_runtime/actscalltest/systemcallentrytest/entry/src/main/module.json +++ b/ability/ability_runtime/actscalltest/systemcallentrytest/entry/src/main/module.json @@ -33,67 +33,7 @@ ] } ] - }, - { - "name": "com.example.systemcalltest.SecondAbility", - "srcEntrance": "./ets/SecondAbility/SecondAbility.ts", - "description": "$string:phone_entry_main", - "icon": "$media:icon", - "label": "$string:entry_label", - "visible": true, - "launchType": "singleton", - "orientation": "portrait" - } - ], - "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" - }, - { - "name":"ohos.permission.MANAGE_LOCAL_ACCOUNTS", - "reason":"need use ohos.permission.MANAGE_LOCAL_ACCOUNTS" - }, - { - "name":"ohos.permission.CLEAN_BACKGROUND_PROCESSES", - "reason":"need use ohos.permission.CLEAN_BACKGROUND_PROCESSES" - }, - { - "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" - }, - { - "name":"ohos.permission.ABILITY_BACKGROUND_COMMUNICATION", - "reason":"need use ohos.permission.ABILITY_BACKGROUND_COMMUNICATION" - } + } ] } } diff --git a/ability/ability_runtime/actscalltest/systemcallentrytest/signature/openharmony_sx.p7b b/ability/ability_runtime/actscalltest/systemcallentrytest/signature/openharmony_sx.p7b index cc53179a48f88f20acc379c138a001e9a15838f6..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/actscalltest/systemcallentrytest/signature/openharmony_sx.p7b and b/ability/ability_runtime/actscalltest/systemcallentrytest/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/actscalltest/systemcallfeature/AppScope/app.json b/ability/ability_runtime/actscalltest/systemcallfeature/AppScope/app.json deleted file mode 100644 index 9553812f3c2e1911fb8167dc4facbed4a05b9c03..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actscalltest/systemcallfeature/AppScope/app.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "app":{ - "bundleName":"com.example.systemcalltest", - "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 - } - } -} diff --git a/ability/ability_runtime/actscalltest/systemcallfeature/AppScope/resources/base/element/string.json b/ability/ability_runtime/actscalltest/systemcallfeature/AppScope/resources/base/element/string.json deleted file mode 100644 index ee69f9a861d9dc269ed6638735d52674583498e1..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actscalltest/systemcallfeature/AppScope/resources/base/element/string.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "string":[ - { - "name":"app_name", - "value":"ohosProject" - } - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/actscalltest/systemcallfeature/AppScope/resources/base/media/app_icon.png b/ability/ability_runtime/actscalltest/systemcallfeature/AppScope/resources/base/media/app_icon.png deleted file mode 100644 index 474a55588fd7216113dd42073aadf254d4dba023..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actscalltest/systemcallfeature/AppScope/resources/base/media/app_icon.png and /dev/null differ diff --git a/ability/ability_runtime/actscalltest/systemcallfeature/BUILD.gn b/ability/ability_runtime/actscalltest/systemcallfeature/BUILD.gn deleted file mode 100644 index 3f7a94967c73df7eb6bf8b5c8af542fca3bea9da..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actscalltest/systemcallfeature/BUILD.gn +++ /dev/null @@ -1,45 +0,0 @@ -# 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("ActsCallTestFeatureRelyHap") { - hap_profile = "entry/src/main/module.json" - js_build_mode = "debug" - deps = [ - ":systemcallfeature_js_assets", - ":systemcallfeature_resources", - ] - ets2abc = true - certificate_profile = "signature/openharmony_sx.p7b" - hap_name = "ActsCallTestFeatureRelyHap" - - testonly = true - subsystem_name = "ability" - part_name = "ability_runtime" -} - -ohos_app_scope("systemcallfeature_app_profile") { - app_profile = "AppScope/app.json" - sources = [ "AppScope/resources" ] -} - -ohos_js_assets("systemcallfeature_js_assets") { - source_dir = "entry/src/main/ets" -} - -ohos_resources("systemcallfeature_resources") { - sources = [ "entry/src/main/resources" ] - deps = [ ":systemcallfeature_app_profile" ] - hap_profile = "entry/src/main/module.json" -} diff --git a/ability/ability_runtime/actscalltest/systemcallfeature/entry/src/main/ets/Application/AbilityStage.ts b/ability/ability_runtime/actscalltest/systemcallfeature/entry/src/main/ets/Application/AbilityStage.ts deleted file mode 100644 index ebc3c76435b7ce717d56b1cbf9b4463782559c12..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actscalltest/systemcallfeature/entry/src/main/ets/Application/AbilityStage.ts +++ /dev/null @@ -1,25 +0,0 @@ -/* - * 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 Second Hap MyAbilityStage onCreate") - globalThis.stageOnCreateRun = 1; - globalThis.stageContext = this.context; - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actscalltest/systemcallfeature/entry/src/main/ets/MainAbility/MainAbility.ts b/ability/ability_runtime/actscalltest/systemcallfeature/entry/src/main/ets/MainAbility/MainAbility.ts deleted file mode 100644 index f9945fc7250a29654b778002e54611cea8f762ec..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actscalltest/systemcallfeature/entry/src/main/ets/MainAbility/MainAbility.ts +++ /dev/null @@ -1,116 +0,0 @@ -/* - * 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' - -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; - } -} -let callSeq = ""; - -export default class MainAbility extends Ability { - test2300(data) { - let recvData = new MySequenceable(0, '', ''); - data.readSequenceable(recvData); - let sendData = new MySequenceable(0, '', ''); - if (recvData.num == 2300 && recvData.str == 'case2300') { - sendData.num = 0; - } else { - sendData.num = 1; - } - sendData.str = callSeq; - return sendData; - } - - test4600(data) { - let recvData = new MySequenceable(0, '', ''); - data.readSequenceable(recvData); - let sendData = new MySequenceable(0, '', ''); - if (recvData.num == 4600 && recvData.str == 'case4600') { - sendData.num = 0; - } else { - sendData.num = 1; - } - sendData.str = callSeq; - return sendData; - } - - onCreate(want, launchParam) { - // Ability is creating, initialize resources for this ability - console.log("SystemCallTest Second Hap MainAbility onCreate") - globalThis.abilityWant = want; - this.callee.on('test2300', this.test2300); - this.callee.on('test4600', this.test4600); - callSeq = callSeq + "onCreate"; - } - - onDestroy() { - // Ability is destroying, release resources for this ability - console.log("SystemCallTest Second Hap MainAbility onDestroy") - callSeq = callSeq + "onDestroy"; - } - - onWindowStageCreate(windowStage) { - // Main window is created, set main page for this ability - console.log("SystemCallTest Second Hap MainAbility onWindowStageCreate") - windowStage.setUIContent(this.context, "pages/index", null) - callSeq = callSeq + "onWindowStageCreate"; - } - - onWindowStageDestroy() { - // Main window is destroyed, release UI related resources - console.log("SystemCallTest Second Hap MainAbility onWindowStageDestroy") - } - - onForeground() { - // Ability has brought to foreground - console.log("SystemCallTest Second Hap MainAbility onForeground") - callSeq = callSeq + "onForeground"; - } - - onBackground() { - // Ability has back to background - console.log("SystemCallTest Second Hap MainAbility onBackground") - callSeq = callSeq + "onBackground"; - } -}; - diff --git a/ability/ability_runtime/actscalltest/systemcallfeature/entry/src/main/ets/pages/index/index.ets b/ability/ability_runtime/actscalltest/systemcallfeature/entry/src/main/ets/pages/index/index.ets deleted file mode 100644 index 6c1e0c8a8105c66af288fbeed942a7d7a67d67c1..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actscalltest/systemcallfeature/entry/src/main/ets/pages/index/index.ets +++ /dev/null @@ -1,28 +0,0 @@ -/* - * 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. - */ - -@Entry -@Component -struct Index { - build() { - Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { - Text('second module') - .fontSize(50) - .fontWeight(FontWeight.Bold) - } - .width('100%') - .height('100%') - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actscalltest/systemcallfeature/entry/src/main/ets/pages/second/second.ets b/ability/ability_runtime/actscalltest/systemcallfeature/entry/src/main/ets/pages/second/second.ets deleted file mode 100644 index ff7d4541726c5f8b893f51c4a01be570066c33a0..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actscalltest/systemcallfeature/entry/src/main/ets/pages/second/second.ets +++ /dev/null @@ -1,27 +0,0 @@ -/* - * 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. - */ -@Entry -@Component -struct Second { - build() { - Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { - Text('SystemCallTest SecondAbility)') - .fontSize(50) - .fontWeight(FontWeight.Bold) - } - .width('100%') - .height('100%') - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actscalltest/systemcallfeature/entry/src/main/module.json b/ability/ability_runtime/actscalltest/systemcallfeature/entry/src/main/module.json deleted file mode 100644 index 49f4ef13504f7736ee45bc7a840439572e6a0318..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actscalltest/systemcallfeature/entry/src/main/module.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "module": { - "name": "com.example.second", - "process": "com.example.secondprocess", - "type": "feature", - "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.second.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" - ] - } - ] - } - ], - "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" - }, - { - "name":"ohos.permission.MANAGE_LOCAL_ACCOUNTS", - "reason":"need use ohos.permission.MANAGE_LOCAL_ACCOUNTS" - } - ] - } -} diff --git a/ability/ability_runtime/actscalltest/systemcallfeature/entry/src/main/resources/base/element/string.json b/ability/ability_runtime/actscalltest/systemcallfeature/entry/src/main/resources/base/element/string.json deleted file mode 100644 index 2977b612ec4595b13eaaffe3e8fc578e83c42d48..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actscalltest/systemcallfeature/entry/src/main/resources/base/element/string.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "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" - } - ] -} diff --git a/ability/ability_runtime/actscalltest/systemcallfeature/entry/src/main/resources/base/media/icon.png b/ability/ability_runtime/actscalltest/systemcallfeature/entry/src/main/resources/base/media/icon.png deleted file mode 100644 index 474a55588fd7216113dd42073aadf254d4dba023..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actscalltest/systemcallfeature/entry/src/main/resources/base/media/icon.png and /dev/null differ diff --git a/ability/ability_runtime/actscalltest/systemcallfeature/entry/src/main/resources/base/profile/main_pages.json b/ability/ability_runtime/actscalltest/systemcallfeature/entry/src/main/resources/base/profile/main_pages.json deleted file mode 100644 index 6898b31d2085f478ee1ed9d933a5910cbf901d92..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actscalltest/systemcallfeature/entry/src/main/resources/base/profile/main_pages.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "src": [ - "pages/index/index", - "pages/second/second" - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/actscalltest/systemcallfeature/signature/openharmony_sx.p7b b/ability/ability_runtime/actscalltest/systemcallfeature/signature/openharmony_sx.p7b deleted file mode 100755 index dcec6c9615032c1b48bf185e839d9720dd68aab0..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actscalltest/systemcallfeature/signature/openharmony_sx.p7b and /dev/null differ diff --git a/ability/ability_runtime/actscalltest/thirdappa/AppScope/app.json b/ability/ability_runtime/actscalltest/thirdappa/AppScope/app.json deleted file mode 100644 index 57198db7f722344bce0b5ff68aa6be4ede5800a2..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actscalltest/thirdappa/AppScope/app.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "app":{ - "bundleName":"com.example.thirdappa", - "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 - } - } -} diff --git a/ability/ability_runtime/actscalltest/thirdappa/AppScope/resources/base/element/string.json b/ability/ability_runtime/actscalltest/thirdappa/AppScope/resources/base/element/string.json deleted file mode 100644 index ee69f9a861d9dc269ed6638735d52674583498e1..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actscalltest/thirdappa/AppScope/resources/base/element/string.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "string":[ - { - "name":"app_name", - "value":"ohosProject" - } - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/actscalltest/thirdappa/AppScope/resources/base/media/app_icon.png b/ability/ability_runtime/actscalltest/thirdappa/AppScope/resources/base/media/app_icon.png deleted file mode 100644 index 474a55588fd7216113dd42073aadf254d4dba023..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actscalltest/thirdappa/AppScope/resources/base/media/app_icon.png and /dev/null differ diff --git a/ability/ability_runtime/actscalltest/thirdappa/BUILD.gn b/ability/ability_runtime/actscalltest/thirdappa/BUILD.gn deleted file mode 100644 index e64c9f7fb566ab89aaa43c8ad378cdf0d292ddbc..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actscalltest/thirdappa/BUILD.gn +++ /dev/null @@ -1,45 +0,0 @@ -# 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("ActsThirdAppARelyHap") { - hap_profile = "entry/src/main/module.json" - js_build_mode = "debug" - deps = [ - ":thirdappa_js_assets", - ":thirdappa_resources", - ] - ets2abc = true - certificate_profile = "signature/openharmony_sx.p7b" - hap_name = "ActsThirdAppARelyHap" - - testonly = true - subsystem_name = "ability" - part_name = "ability_runtime" -} - -ohos_app_scope("thirdappa_app_profile") { - app_profile = "AppScope/app.json" - sources = [ "AppScope/resources" ] -} - -ohos_js_assets("thirdappa_js_assets") { - source_dir = "entry/src/main/ets" -} - -ohos_resources("thirdappa_resources") { - sources = [ "entry/src/main/resources" ] - deps = [ ":thirdappa_app_profile" ] - hap_profile = "entry/src/main/module.json" -} diff --git a/ability/ability_runtime/actscalltest/thirdappa/entry/src/main/ets/Application/AbilityStage.ts b/ability/ability_runtime/actscalltest/thirdappa/entry/src/main/ets/Application/AbilityStage.ts deleted file mode 100644 index 21606483f3457f3a691d5d0a28e111ffc5d9d4bf..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actscalltest/thirdappa/entry/src/main/ets/Application/AbilityStage.ts +++ /dev/null @@ -1,23 +0,0 @@ -/* - * 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 diff --git a/ability/ability_runtime/actscalltest/thirdappa/entry/src/main/ets/MainAbility/MainAbility.ts b/ability/ability_runtime/actscalltest/thirdappa/entry/src/main/ets/MainAbility/MainAbility.ts deleted file mode 100644 index d6587c63e264b9e85dd77e4c7235ef1a4a2767d6..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actscalltest/thirdappa/entry/src/main/ets/MainAbility/MainAbility.ts +++ /dev/null @@ -1,116 +0,0 @@ -/* - * 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('======>ThirdAppA 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('======>ThirdAppA MainAbility Call_Finish<======') - }) - return recvSequence; -} - -function testCallWithResult(data) { - let recvSequence = new MySequenceable(0, '', ''); - console.log('======>ThirdAppA 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 { - onCreate(want, launchParam) { - // Ability is creating, initialize resources for this ability - console.log("ThirdAppA 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("ThirdAppA MainAbility onDestroy") - } - - onWindowStageCreate(windowStage) { - // Main window is created, set main page for this ability - console.log("ThirdAppA MainAbility onWindowStageCreate") - windowStage.setUIContent(this.context, "pages/index/index", null) - } - - onWindowStageDestroy() { - // Main window is destroyed, release UI related resources - console.log("ThirdAppA MainAbility onWindowStageDestroy") - } - - onForeground() { - // Ability has brought to foreground - console.log("ThirdAppA MainAbility onForeground"); - } - - onBackground() { - // Ability has back to background - console.log("ThirdAppA MainAbility onBackground") - } -}; diff --git a/ability/ability_runtime/actscalltest/thirdappa/entry/src/main/ets/pages/index/index.ets b/ability/ability_runtime/actscalltest/thirdappa/entry/src/main/ets/pages/index/index.ets deleted file mode 100644 index 30b8d934e2b7e2d5f07c2deb7495797e78e6b3d3..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actscalltest/thirdappa/entry/src/main/ets/pages/index/index.ets +++ /dev/null @@ -1,52 +0,0 @@ -/* - * 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 diff --git a/ability/ability_runtime/actscalltest/thirdappa/entry/src/main/ets/pages/second/second.ets b/ability/ability_runtime/actscalltest/thirdappa/entry/src/main/ets/pages/second/second.ets deleted file mode 100644 index 33d9ae45245db03fd252ef7c1a85c9e284028e0d..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actscalltest/thirdappa/entry/src/main/ets/pages/second/second.ets +++ /dev/null @@ -1,43 +0,0 @@ -/* - * 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 diff --git a/ability/ability_runtime/actscalltest/thirdappa/entry/src/main/module.json b/ability/ability_runtime/actscalltest/thirdappa/entry/src/main/module.json deleted file mode 100644 index 5505f6ca87f0dfb2a0d641a465a438c7cc0160ea..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actscalltest/thirdappa/entry/src/main/module.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "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.thirdappa.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" - ] - } - ] - } - ] - } -} diff --git a/ability/ability_runtime/actscalltest/thirdappa/entry/src/main/resources/base/element/string.json b/ability/ability_runtime/actscalltest/thirdappa/entry/src/main/resources/base/element/string.json deleted file mode 100644 index 2977b612ec4595b13eaaffe3e8fc578e83c42d48..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actscalltest/thirdappa/entry/src/main/resources/base/element/string.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "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" - } - ] -} diff --git a/ability/ability_runtime/actscalltest/thirdappa/entry/src/main/resources/base/media/icon.png b/ability/ability_runtime/actscalltest/thirdappa/entry/src/main/resources/base/media/icon.png deleted file mode 100644 index 474a55588fd7216113dd42073aadf254d4dba023..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actscalltest/thirdappa/entry/src/main/resources/base/media/icon.png and /dev/null differ diff --git a/ability/ability_runtime/actscalltest/thirdappa/entry/src/main/resources/base/profile/main_pages.json b/ability/ability_runtime/actscalltest/thirdappa/entry/src/main/resources/base/profile/main_pages.json deleted file mode 100644 index 6898b31d2085f478ee1ed9d933a5910cbf901d92..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actscalltest/thirdappa/entry/src/main/resources/base/profile/main_pages.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "src": [ - "pages/index/index", - "pages/second/second" - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/actscalltest/thirdappa/signature/openharmony_sx.p7b b/ability/ability_runtime/actscalltest/thirdappa/signature/openharmony_sx.p7b deleted file mode 100644 index f06e218defa7f707e22a3890903c574e1c498217..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actscalltest/thirdappa/signature/openharmony_sx.p7b and /dev/null differ diff --git a/ability/ability_runtime/actscalltest/thirdcalltest/AppScope/app.json b/ability/ability_runtime/actscalltest/thirdcalltest/AppScope/app.json deleted file mode 100644 index 3a18f6bfaf46b34f6674bbeb3dbeb13bf47fee4c..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actscalltest/thirdcalltest/AppScope/app.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "app":{ - "bundleName":"com.example.thirdcalltest", - "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 - } - } -} diff --git a/ability/ability_runtime/actscalltest/thirdcalltest/AppScope/resources/base/element/string.json b/ability/ability_runtime/actscalltest/thirdcalltest/AppScope/resources/base/element/string.json deleted file mode 100644 index ee69f9a861d9dc269ed6638735d52674583498e1..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actscalltest/thirdcalltest/AppScope/resources/base/element/string.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "string":[ - { - "name":"app_name", - "value":"ohosProject" - } - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/actscalltest/thirdcalltest/AppScope/resources/base/media/app_icon.png b/ability/ability_runtime/actscalltest/thirdcalltest/AppScope/resources/base/media/app_icon.png deleted file mode 100644 index 474a55588fd7216113dd42073aadf254d4dba023..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actscalltest/thirdcalltest/AppScope/resources/base/media/app_icon.png and /dev/null differ diff --git a/ability/ability_runtime/actscalltest/thirdcalltest/BUILD.gn b/ability/ability_runtime/actscalltest/thirdcalltest/BUILD.gn deleted file mode 100644 index 018fcd69650361240fef9f9b236ac0c4feab91eb..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actscalltest/thirdcalltest/BUILD.gn +++ /dev/null @@ -1,43 +0,0 @@ -# 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_js_hap_suite("ActsThirdCallTest") { - hap_profile = "./entry/src/main/module.json" - js_build_mode = "debug" - deps = [ - ":thirdcalltest_js_assets", - ":thirdcalltest_resources", - ] - ets2abc = true - certificate_profile = "signature/openharmony_sx.p7b" - hap_name = "ActsThirdCallTest" - subsystem_name = "ability" - part_name = "ability_runtime" -} - -ohos_app_scope("thirdcalltest_app_profile") { - app_profile = "AppScope/app.json" - sources = [ "AppScope/resources" ] -} - -ohos_js_assets("thirdcalltest_js_assets") { - source_dir = "./entry/src/main/ets" -} - -ohos_resources("thirdcalltest_resources") { - sources = [ "./entry/src/main/resources" ] - deps = [ ":thirdcalltest_app_profile" ] - hap_profile = "./entry/src/main/module.json" -} diff --git a/ability/ability_runtime/actscalltest/thirdcalltest/Test.json b/ability/ability_runtime/actscalltest/thirdcalltest/Test.json deleted file mode 100644 index 297aca2bb0f0fe8c0791ed19dba1b0d85d113191..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actscalltest/thirdcalltest/Test.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "description": "Configuration for hjunit demo Tests", - "driver": { - "type": "OHJSUnitTest", - "test-timeout": "100000", - "bundle-name": "com.example.thirdcalltest", - "module-name": "phone", - "shell-timeout": "60000", - "testcase-timeout": 100000 - }, - "kits": [ - { - "test-file-name": [ - "ActsThirdCallTest.hap", - "ActsSystemAppCalleeARelyHap.hap", - "ActsThirdAppARelyHap.hap" - ], - "type": "AppInstallKit", - "cleanup-apps": true - }, - { - "type": "ShellKit", - "run-command": [ - "remount" - ] - } - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/actscalltest/thirdcalltest/entry/src/main/ets/Application/AbilityStage.ts b/ability/ability_runtime/actscalltest/thirdcalltest/entry/src/main/ets/Application/AbilityStage.ts deleted file mode 100644 index 21606483f3457f3a691d5d0a28e111ffc5d9d4bf..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actscalltest/thirdcalltest/entry/src/main/ets/Application/AbilityStage.ts +++ /dev/null @@ -1,23 +0,0 @@ -/* - * 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 diff --git a/ability/ability_runtime/actscalltest/thirdcalltest/entry/src/main/ets/FifthAbility/FifthAbility.ts b/ability/ability_runtime/actscalltest/thirdcalltest/entry/src/main/ets/FifthAbility/FifthAbility.ts deleted file mode 100644 index 291bc68b349fa7950d02afe9c33d85244f2675e7..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actscalltest/thirdcalltest/entry/src/main/ets/FifthAbility/FifthAbility.ts +++ /dev/null @@ -1,124 +0,0 @@ -/* - * 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('======>SystemCallTest FifthAbility 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 FifthAbility Call_Finish<======') - }) - return recvSequence; -} - -function testCallWithResult(data) { - let recvSequence = new MySequenceable(0, '', ''); - console.log('======>SystemCallTest FifthAbility on testCall <======') - data.readSequenceable(recvSequence); - let result = recvSequence.str + 'processed'; - recvSequence.setMySequence(recvSequence.num, recvSequence.str, result); - - return recvSequence; -} - -export default class FifthAbility extends Ability { - onCreate(want, launchParam) { - // Ability is creating, initialize resources for this ability - console.log("SystemCallTest FifthAbility onCreate") - globalThis.abilityWant = want; - this.callee.on('testCall', testCall); - this.callee.on('testCallWithResult', testCallWithResult); - } - - onDestroy() { - // Ability is destroying, release resources for this ability - console.log("SystemCallTest FifthAbility onDestroy") - } - - onWindowStageCreate(windowStage) { - // Main window is created, set main page for this ability - console.log("SystemCallTest FifthAbility onWindowStageCreate") - windowStage.setUIContent(this.context, "MainAbility/pages/second/second", null) - } - - onWindowStageDestroy() { - // Main window is destroyed, release UI related resources - console.log("SystemCallTest FifthAbility onWindowStageDestroy") - } - - onForeground() { - // Ability has brought to foreground - console.log("SystemCallTest FifthAbility onForeground") - if ((globalThis.abilityWant.parameters.case_num == "case1300") || - (globalThis.abilityWant.parameters.case_num == "case1400")) { - var publishData = globalThis.abilityWant.parameters.case_num + "targetForeground"; - var commonEventData = { - data: publishData, - } - commonEvent.publish('CallTest', commonEventData, (err) => { - console.log('======>SystemAppCallerA FifthAbility Call_Finish<======') - }) - } - } - - onBackground() { - // Ability has back to background - console.log("SystemCallTest FifthAbility onBackground") - } -}; diff --git a/ability/ability_runtime/actscalltest/thirdcalltest/entry/src/main/ets/ForthAbility/ForthAbility.ts b/ability/ability_runtime/actscalltest/thirdcalltest/entry/src/main/ets/ForthAbility/ForthAbility.ts deleted file mode 100644 index e431367ed50c0f7715f0529b699d7b7112fd7ef6..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actscalltest/thirdcalltest/entry/src/main/ets/ForthAbility/ForthAbility.ts +++ /dev/null @@ -1,124 +0,0 @@ -/* - * 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('======>SystemCallTest ForthAbility 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 ForthAbility Call_Finish<======') - }) - return recvSequence; -} - -function testCallWithResult(data) { - let recvSequence = new MySequenceable(0, '', ''); - console.log('======>SystemCallTest ForthAbility on testCall <======') - data.readSequenceable(recvSequence); - let result = recvSequence.str + 'processed'; - recvSequence.setMySequence(recvSequence.num, recvSequence.str, result); - - return recvSequence; -} - -export default class ForthAbility extends Ability { - onCreate(want, launchParam) { - // Ability is creating, initialize resources for this ability - console.log("SystemCallTest ForthAbility onCreate") - globalThis.abilityWant = want; - this.callee.on('testCall', testCall); - this.callee.on('testCallWithResult', testCallWithResult); - } - - onDestroy() { - // Ability is destroying, release resources for this ability - console.log("SystemCallTest ForthAbility onDestroy") - } - - onWindowStageCreate(windowStage) { - // Main window is created, set main page for this ability - console.log("SystemCallTest ForthAbility onWindowStageCreate") - windowStage.setUIContent(this.context, "MainAbility/pages/second/second", null) - } - - onWindowStageDestroy() { - // Main window is destroyed, release UI related resources - console.log("SystemCallTest ForthAbility onWindowStageDestroy") - } - - onForeground() { - // Ability has brought to foreground - console.log("SystemCallTest ForthAbility onForeground") - if ((globalThis.abilityWant.parameters.case_num == "case1300") || - (globalThis.abilityWant.parameters.case_num == "case1400")) { - var publishData = globalThis.abilityWant.parameters.case_num + "targetForeground"; - var commonEventData = { - data: publishData, - } - commonEvent.publish('CallTest', commonEventData, (err) => { - console.log('======>SystemAppCallerA ForthAbility Call_Finish<======') - }) - } - } - - onBackground() { - // Ability has back to background - console.log("SystemCallTest ForthAbility onBackground") - } -}; diff --git a/ability/ability_runtime/actscalltest/thirdcalltest/entry/src/main/ets/MainAbility/MainAbility.ts b/ability/ability_runtime/actscalltest/thirdcalltest/entry/src/main/ets/MainAbility/MainAbility.ts deleted file mode 100644 index adcdc096bf0706b35956f69f1c7188c8079ea5ac..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actscalltest/thirdcalltest/entry/src/main/ets/MainAbility/MainAbility.ts +++ /dev/null @@ -1,51 +0,0 @@ -/* - * 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' - -export default class MainAbility extends Ability { - onCreate(want, launchParam) { - // Ability is creating, initialize resources for this ability - console.log("ThirdCallTest MainAbility onCreate") - globalThis.abilityWant = want; - globalThis.callee = this.callee; - } - - onDestroy() { - // Ability is destroying, release resources for this ability - console.log("ThirdCallTest MainAbility onDestroy") - } - - onWindowStageCreate(windowStage) { - // Main window is created, set main page for this ability - console.log("ThirdCallTest MainAbility onWindowStageCreate") - globalThis.abilityContext = this.context - windowStage.setUIContent(this.context, "MainAbility/pages/index/index", null) - } - - onWindowStageDestroy() { - // Main window is destroyed, release UI related resources - console.log("ThirdCallTest MainAbility onWindowStageDestroy") - } - - onForeground() { - // Ability has brought to foreground - console.log("ThirdCallTest MainAbility onForeground") - } - - onBackground() { - // Ability has back to background - console.log("ThirdCallTest MainAbility onBackground") - } -}; diff --git a/ability/ability_runtime/actscalltest/thirdcalltest/entry/src/main/ets/MainAbility/pages/index/index.ets b/ability/ability_runtime/actscalltest/thirdcalltest/entry/src/main/ets/MainAbility/pages/index/index.ets deleted file mode 100644 index 920d38843fdb8c55729dedc90576a438529cac79..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actscalltest/thirdcalltest/entry/src/main/ets/MainAbility/pages/index/index.ets +++ /dev/null @@ -1,56 +0,0 @@ -/* - * 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 AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry' -import { Hypium } from '@ohos/hypium' -import testsuite from '../../../test/List.test' -import router from '@ohos.router'; - - -@Entry -@Component -struct Index { - - aboutToAppear(){ - console.info("start run testcase!!!!") - var abilityDelegator: any - abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() - var abilityDelegatorArguments: any - abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments() - console.info('start run testcase!!!') - Hypium.hypiumTest(abilityDelegator, abilityDelegatorArguments, testsuite) - } - - 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(() => { - - }) - } - .width('100%') - .height('100%') - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actscalltest/thirdcalltest/entry/src/main/ets/MainAbility/pages/second/second.ets b/ability/ability_runtime/actscalltest/thirdcalltest/entry/src/main/ets/MainAbility/pages/second/second.ets deleted file mode 100644 index 33d9ae45245db03fd252ef7c1a85c9e284028e0d..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actscalltest/thirdcalltest/entry/src/main/ets/MainAbility/pages/second/second.ets +++ /dev/null @@ -1,43 +0,0 @@ -/* - * 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 diff --git a/ability/ability_runtime/actscalltest/thirdcalltest/entry/src/main/ets/SecondAbility/SecondAbility.ts b/ability/ability_runtime/actscalltest/thirdcalltest/entry/src/main/ets/SecondAbility/SecondAbility.ts deleted file mode 100644 index f774b0d2895a2823c30b81c87118a084fbba8313..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actscalltest/thirdcalltest/entry/src/main/ets/SecondAbility/SecondAbility.ts +++ /dev/null @@ -1,124 +0,0 @@ -/* - * 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('======>SystemCallTest 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('======>SystemCallTest 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("SystemCallTest SecondAbility onCreate") - globalThis.abilityWant = want; - this.callee.on('testCall', testCall); - this.callee.on('testCallWithResult', testCallWithResult); - } - - onDestroy() { - // Ability is destroying, release resources for this ability - console.log("SystemCallTest SecondAbility onDestroy") - } - - onWindowStageCreate(windowStage) { - // Main window is created, set main page for this ability - console.log("SystemCallTest SecondAbility onWindowStageCreate") - windowStage.setUIContent(this.context, "MainAbility/pages/second/second", null) - } - - onWindowStageDestroy() { - // Main window is destroyed, release UI related resources - console.log("SystemCallTest SecondAbility onWindowStageDestroy") - } - - onForeground() { - // Ability has brought to foreground - console.log("SystemCallTest SecondAbility onForeground") - if ((globalThis.abilityWant.parameters.case_num == "case1300") || - (globalThis.abilityWant.parameters.case_num == "case1400")) { - 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("SystemCallTest SecondAbility onBackground") - } -}; diff --git a/ability/ability_runtime/actscalltest/thirdcalltest/entry/src/main/ets/TestAbility/TestAbility.ts b/ability/ability_runtime/actscalltest/thirdcalltest/entry/src/main/ets/TestAbility/TestAbility.ts deleted file mode 100644 index 0ab4ba7a8289564124520cbea7a01767ae7feb04..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actscalltest/thirdcalltest/entry/src/main/ets/TestAbility/TestAbility.ts +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) 2021 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' - -export default class TestAbility extends Ability { - onCreate(want, launchParam) { - console.log('TestAbility onCreate') - } - - onDestroy() { - console.log('TestAbility onDestroy') - } - - onWindowStageCreate(windowStage) { - console.log('TestAbility onWindowStageCreate') - windowStage.loadContent("TestAbility/pages/index", (err, data) => { - if (err.code) { - console.error('Failed to load the content. Cause:' + JSON.stringify(err)); - return; - } - console.info('Succeeded in loading the content. Data: ' + JSON.stringify(data)) - }); - - globalThis.abilityContext = this.context; - } - - onWindowStageDestroy() { - console.log('TestAbility onWindowStageDestroy') - } - - onForeground() { - console.log('TestAbility onForeground') - } - - onBackground() { - console.log('TestAbility onBackground') - } -}; \ No newline at end of file diff --git a/ability/ability_runtime/actscalltest/thirdcalltest/entry/src/main/ets/TestAbility/pages/index.ets b/ability/ability_runtime/actscalltest/thirdcalltest/entry/src/main/ets/TestAbility/pages/index.ets deleted file mode 100644 index fae969f985ff5bf7432de71e36c792364ebac1f6..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actscalltest/thirdcalltest/entry/src/main/ets/TestAbility/pages/index.ets +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2021 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 '@ohos.router'; - -@Entry -@Component -struct Index { - aboutToAppear() { - console.info('TestAbility index aboutToAppear') - } - @State message: string = 'Hello World' - build() { - Row() { - Column() { - Text(this.message) - .fontSize(50) - .fontWeight(FontWeight.Bold) - Button() { - Text('next page') - .fontSize(20) - .fontWeight(FontWeight.Bold) - }.type(ButtonType.Capsule) - .margin({ - top: 20 - }) - .backgroundColor('#0D9FFB') - .width('35%') - .height('5%') - .onClick(()=>{ - }) - } - .width('100%') - } - .height('100%') - } - } \ No newline at end of file diff --git a/ability/ability_runtime/actscalltest/thirdcalltest/entry/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts b/ability/ability_runtime/actscalltest/thirdcalltest/entry/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts deleted file mode 100644 index 1dbe178e049a2f3f76f072306f750970f58ce93c..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actscalltest/thirdcalltest/entry/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright (c) 2021 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 TestRunner from '@ohos.application.testRunner' -import AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry' - -var abilityDelegator = undefined -var abilityDelegatorArguments = undefined - -function translateParamsToString(parameters) { - const keySet = new Set([ - '-s class', '-s notClass', '-s suite', '-s it', - '-s level', '-s testType', '-s size', '-s timeout', - '-s dryRun' - ]) - let targetParams = ''; - for (const key in parameters) { - if (keySet.has(key)) { - targetParams = `${targetParams} ${key} ${parameters[key]}` - } - } - return targetParams.trim() -} - -async function onAbilityCreateCallback() { - console.log("onAbilityCreateCallback"); -} - -async function addAbilityMonitorCallback(err: any) { - console.info("addAbilityMonitorCallback : " + JSON.stringify(err)) -} - -export default class OpenHarmonyTestRunner implements TestRunner { - constructor() { - } - - onPrepare() { - console.info("OpenHarmonyTestRunner OnPrepare ") - } - - async onRun() { - console.log('OpenHarmonyTestRunner onRun run') - abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments() - abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() - var testAbilityName = abilityDelegatorArguments.bundleName + '.MainAbility' - let lMonitor = { - abilityName: testAbilityName, - onAbilityCreate: onAbilityCreateCallback, - }; - abilityDelegator.addAbilityMonitor(lMonitor, addAbilityMonitorCallback) - var cmd = 'aa start -d 0 -a com.example.thirdcalltest.MainAbility' + ' -b ' + abilityDelegatorArguments.bundleName - cmd += ' '+translateParamsToString(abilityDelegatorArguments.parameters) - var debug = abilityDelegatorArguments.parameters["-D"] - if (debug == 'true') - { - cmd += ' -D' - } - console.info('cmd : '+cmd) - abilityDelegator.executeShellCommand(cmd, - (err: any, d: any) => { - console.info('executeShellCommand : err : ' + JSON.stringify(err)); - console.info('executeShellCommand : data : ' + d.stdResult); - console.info('executeShellCommand : data : ' + d.exitCode); - }) - console.info('OpenHarmonyTestRunner onRun end') - } -}; \ No newline at end of file diff --git a/ability/ability_runtime/actscalltest/thirdcalltest/entry/src/main/ets/ThirdAbility/ThirdAbility.ts b/ability/ability_runtime/actscalltest/thirdcalltest/entry/src/main/ets/ThirdAbility/ThirdAbility.ts deleted file mode 100644 index fa352fee5fc8f1f88607e9776c4321fe301324f9..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actscalltest/thirdcalltest/entry/src/main/ets/ThirdAbility/ThirdAbility.ts +++ /dev/null @@ -1,124 +0,0 @@ -/* - * 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('======>SystemCallTest 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('======>SystemCallTest 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("SystemCallTest ThirdAbility onCreate") - globalThis.abilityWant = want; - this.callee.on('testCall', testCall); - this.callee.on('testCallWithResult', testCallWithResult); - } - - onDestroy() { - // Ability is destroying, release resources for this ability - console.log("SystemCallTest ThirdAbility onDestroy") - } - - onWindowStageCreate(windowStage) { - // Main window is created, set main page for this ability - console.log("SystemCallTest ThirdAbility onWindowStageCreate") - windowStage.setUIContent(this.context, "MainAbility/pages/second/second", null) - } - - onWindowStageDestroy() { - // Main window is destroyed, release UI related resources - console.log("SystemCallTest ThirdAbility onWindowStageDestroy") - } - - onForeground() { - // Ability has brought to foreground - console.log("SystemCallTest ThirdAbility onForeground") - if ((globalThis.abilityWant.parameters.case_num == "case1300") || - (globalThis.abilityWant.parameters.case_num == "case1400")) { - 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("SystemCallTest ThirdAbility onBackground") - } -}; diff --git a/ability/ability_runtime/actscalltest/thirdcalltest/entry/src/main/ets/test/Ability.test.ets b/ability/ability_runtime/actscalltest/thirdcalltest/entry/src/main/ets/test/Ability.test.ets deleted file mode 100644 index 5c30ed1898afd300885f5920ec2660bd26ffea09..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actscalltest/thirdcalltest/entry/src/main/ets/test/Ability.test.ets +++ /dev/null @@ -1,158 +0,0 @@ -/* - * 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 {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "@ohos/hypium" -import commonEvent from '@ohos.commonEvent' - -const MAX_MISSION_NUM = 1024; - -var systemAppCalleeABundleName = "com.example.systemappcalleea"; -var systemAppCalleeAMainAbilityName = "com.example.systemappcalleea.MainAbility"; -var thirdAppABundleName = "com.example.thirdappa"; -var thirdAppAMainAbilityName = "com.example.thirdappa.MainAbility"; -var thirdCallTestBundleName = "com.example.thirdcalltest"; -var thirdCallTestMainAbilityName = "com.example.thirdcalltest.MainAbility"; -var thirdCallTestSecondAbilityName = "com.example.thirdcalltest.SecondAbility"; -var thirdCallTestThirdAbilityName = "com.example.thirdcalltest.ThirdAbility"; -var thirdCallTestForthAbilityName = "com.example.thirdcalltest.ForthAbility"; -var thirdCallTestFifthAbilityName = "com.example.thirdcalltest.FifthAbility"; -var subscriberInfo = { - events: ["CallTest"], -}; - -class MySequenceable { - num: number = 0; - str: string = "default"; - result: string = "default"; - - 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 delay(time) { - let delta; - if (typeof time != 'number' || time <= 0) { - delta = 100; - } else { - delta = Math.round(time); - } - for (let start = Date.now(); Date.now() - start <= delta; ); -} - -export default function abilityTest() { - describe('ActsAbilityTest', function () { - - beforeEach(async (done) => { - done(); - }) - - afterEach(async (done) => { - setTimeout(() => { - done(); - }, 500) - }) - - /** - * @tc.number: ACTS_CommonComponent_Call_1100 - * @tc.name: The thirdApp is not allowed to startAbilityByCall. - * @tc.desc: Verify that the thirdApp is not allowed to startAbilityByCall. - */ - it('ACTS_CommonComponent_Call_1100', 0, async function (done) { - console.log('ACTS_CommonComponent_Call_1100 begin'); - let want = { - bundleName: thirdCallTestBundleName, - abilityName: thirdCallTestForthAbilityName, - } - globalThis.abilityContext.startAbilityByCall(want) - .then(data => { - console.info(`ACTS_CommonComponent_Call_1100 startAbilityByCall SUCCESS`); - expect().assertFail(); - done(); - }) - .catch(error => { - console.info(`ACTS_CommonComponent_Call_1100 startAbilityByCall Catch`); - done(); - }); - }) - - /** - * @tc.number: ACTS_CommonComponent_Call_1500 - * @tc.name: The thirdApp is not allowed to startAbilityByCall. - * @tc.desc: Verify that the thirdApp is not allowed to startAbilityByCall. - */ - it('ACTS_CommonComponent_Call_1500', 0, async function (done) { - console.log('ACTS_CommonComponent_Call_1500 begin'); - let want = { - bundleName: systemAppCalleeABundleName, - abilityName: systemAppCalleeAMainAbilityName, - } - globalThis.abilityContext.startAbilityByCall(want) - .then(data => { - console.info(`ACTS_CommonComponent_Call_1500 startAbilityByCall SUCCESS`); - expect().assertFail(); - done(); - }) - .catch(error => { - console.info(`ACTS_CommonComponent_Call_1500 startAbilityByCall Catch`); - done(); - }); - }) - - /** - * @tc.number: ACTS_CommonComponent_Call_1600 - * @tc.name: The thirdApp is not allowed to startAbilityByCall. - * @tc.desc: Verify that the thirdApp is not allowed to startAbilityByCall. - */ - it('ACTS_CommonComponent_Call_1600', 0, async function (done) { - console.log('ACTS_CommonComponent_Call_1600 begin'); - let want = { - bundleName: thirdAppABundleName, - abilityName: thirdAppAMainAbilityName, - } - globalThis.abilityContext.startAbilityByCall(want) - .then(data => { - console.info(`ACTS_CommonComponent_Call_1600 startAbilityByCall SUCCESS`); - expect().assertFail(); - done(); - }) - .catch(error => { - console.info(`ACTS_CommonComponent_Call_1600 startAbilityByCall Catch`); - done(); - }); - }) - }) -} \ No newline at end of file diff --git a/ability/ability_runtime/actscalltest/thirdcalltest/entry/src/main/ets/test/List.test.ets b/ability/ability_runtime/actscalltest/thirdcalltest/entry/src/main/ets/test/List.test.ets deleted file mode 100644 index f6a5bd8d95cac42bcdc862e9976dfc58d4cef99b..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actscalltest/thirdcalltest/entry/src/main/ets/test/List.test.ets +++ /dev/null @@ -1,22 +0,0 @@ -/* - * 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 abilityTest from './Ability.test.ets' - - -export default function testsuite() { - - abilityTest() - -} \ No newline at end of file diff --git a/ability/ability_runtime/actscalltest/thirdcalltest/entry/src/main/module.json b/ability/ability_runtime/actscalltest/thirdcalltest/entry/src/main/module.json deleted file mode 100644 index b2306f445a32948c3d550e0c1b3cd788a872fd33..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actscalltest/thirdcalltest/entry/src/main/module.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "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.thirdcalltest.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.thirdcalltest.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.thirdcalltest.ThirdAbility", - "srcEntrance": "./ets/ThirdAbility/ThirdAbility.ts", - "description": "$string:phone_entry_main", - "icon": "$media:icon", - "label": "$string:entry_label", - "visible": true, - "orientation": "portrait", - "launchType": "standard" - }, - { - "name": "com.example.thirdcalltest.ForthAbility", - "srcEntrance": "./ets/ForthAbility/ForthAbility.ts", - "description": "$string:phone_entry_main", - "icon": "$media:icon", - "label": "$string:entry_label", - "visible": true, - "orientation": "portrait", - "launchType": "singleton" - }, - { - "name": "com.example.thirdcalltest.FifthAbility", - "srcEntrance": "./ets/FifthAbility/FifthAbility.ts", - "description": "$string:phone_entry_main", - "icon": "$media:icon", - "label": "$string:entry_label", - "visible": true, - "orientation": "portrait", - "launchType": "singleton" - } - ] - } -} diff --git a/ability/ability_runtime/actscalltest/thirdcalltest/entry/src/main/resources/base/element/string.json b/ability/ability_runtime/actscalltest/thirdcalltest/entry/src/main/resources/base/element/string.json deleted file mode 100644 index 2977b612ec4595b13eaaffe3e8fc578e83c42d48..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actscalltest/thirdcalltest/entry/src/main/resources/base/element/string.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "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" - } - ] -} diff --git a/ability/ability_runtime/actscalltest/thirdcalltest/entry/src/main/resources/base/media/icon.png b/ability/ability_runtime/actscalltest/thirdcalltest/entry/src/main/resources/base/media/icon.png deleted file mode 100644 index 474a55588fd7216113dd42073aadf254d4dba023..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actscalltest/thirdcalltest/entry/src/main/resources/base/media/icon.png and /dev/null differ diff --git a/ability/ability_runtime/actscalltest/thirdcalltest/entry/src/main/resources/base/profile/main_pages.json b/ability/ability_runtime/actscalltest/thirdcalltest/entry/src/main/resources/base/profile/main_pages.json deleted file mode 100644 index 02221db61d317863114ff0ca4dd2b33586abff12..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actscalltest/thirdcalltest/entry/src/main/resources/base/profile/main_pages.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "src": [ - "MainAbility/pages/index/index", - "MainAbility/pages/second/second" - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/actscalltest/thirdcalltest/signature/openharmony_sx.p7b b/ability/ability_runtime/actscalltest/thirdcalltest/signature/openharmony_sx.p7b deleted file mode 100644 index f06e218defa7f707e22a3890903c574e1c498217..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actscalltest/thirdcalltest/signature/openharmony_sx.p7b and /dev/null differ diff --git a/ability/ability_runtime/actsdataabilityaccessdatasharetest/actsdataabilityaccessdatasharetest/signature/openharmony_sx.p7b b/ability/ability_runtime/actsdataabilityaccessdatasharetest/actsdataabilityaccessdatasharetest/signature/openharmony_sx.p7b index 9be1e98fa4c0c28ca997ed660112fa16b194f0f5..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/actsdataabilityaccessdatasharetest/actsdataabilityaccessdatasharetest/signature/openharmony_sx.p7b and b/ability/ability_runtime/actsdataabilityaccessdatasharetest/actsdataabilityaccessdatasharetest/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/actsdataabilityaccessdatasharetest/datashareserverhap/signature/openharmony_sx.p7b b/ability/ability_runtime/actsdataabilityaccessdatasharetest/datashareserverhap/signature/openharmony_sx.p7b index 1bc7370912ff0914f3ccbcf639788d441f8d2dcc..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/actsdataabilityaccessdatasharetest/datashareserverhap/signature/openharmony_sx.p7b and b/ability/ability_runtime/actsdataabilityaccessdatasharetest/datashareserverhap/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/actsfwkdataaccessortest/actsdataabilityrelyhap/signature/openharmony_sx.p7b b/ability/ability_runtime/actsfwkdataaccessortest/actsdataabilityrelyhap/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/actsfwkdataaccessortest/actsdataabilityrelyhap/signature/openharmony_sx.p7b and b/ability/ability_runtime/actsfwkdataaccessortest/actsdataabilityrelyhap/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/actsfwkdataaccessortest/actsfwkdataaccessortest/signature/openharmony_sx.p7b b/ability/ability_runtime/actsfwkdataaccessortest/actsfwkdataaccessortest/signature/openharmony_sx.p7b index 9be1e98fa4c0c28ca997ed660112fa16b194f0f5..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/actsfwkdataaccessortest/actsfwkdataaccessortest/signature/openharmony_sx.p7b and b/ability/ability_runtime/actsfwkdataaccessortest/actsfwkdataaccessortest/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/actsqueryfunctiontest/actsgetabilitystatestagetest/entry/src/main/module.json b/ability/ability_runtime/actsqueryfunctiontest/actsgetabilitystatestagetest/entry/src/main/module.json index 729da1714ed48c5e97df799de6be0174eaa55982..69a80af0ca698cae287a179ba741fdfd2e2e0fe2 100644 --- a/ability/ability_runtime/actsqueryfunctiontest/actsgetabilitystatestagetest/entry/src/main/module.json +++ b/ability/ability_runtime/actsqueryfunctiontest/actsgetabilitystatestagetest/entry/src/main/module.json @@ -53,16 +53,6 @@ "icon": "$media:icon", "label": "$string:MainAbility4_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 diff --git a/ability/ability_runtime/actsqueryfunctiontest/actsgetabilitystatestagetest/signature/openharmony_sx.p7b b/ability/ability_runtime/actsqueryfunctiontest/actsgetabilitystatestagetest/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/actsqueryfunctiontest/actsgetabilitystatestagetest/signature/openharmony_sx.p7b and b/ability/ability_runtime/actsqueryfunctiontest/actsgetabilitystatestagetest/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/actsqueryfunctiontest/actsgetappcontextstageatest/entry/src/main/module.json b/ability/ability_runtime/actsqueryfunctiontest/actsgetappcontextstageatest/entry/src/main/module.json index 6a920661b545ada1870a716bd904911b646634b4..41ecb73effa4f4cb1ce8f2fd9c6884559c7d1866 100644 --- a/ability/ability_runtime/actsqueryfunctiontest/actsgetappcontextstageatest/entry/src/main/module.json +++ b/ability/ability_runtime/actsqueryfunctiontest/actsgetappcontextstageatest/entry/src/main/module.json @@ -41,16 +41,6 @@ "visible": true, "launchType": "singleton" } - ], - "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 diff --git a/ability/ability_runtime/actsqueryfunctiontest/actsgetappcontextstageatest/signature/openharmony_sx.p7b b/ability/ability_runtime/actsqueryfunctiontest/actsgetappcontextstageatest/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/actsqueryfunctiontest/actsgetappcontextstageatest/signature/openharmony_sx.p7b and b/ability/ability_runtime/actsqueryfunctiontest/actsgetappcontextstageatest/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/actsqueryfunctiontest/actsgetappcontextstagebtest/entry/src/main/module.json b/ability/ability_runtime/actsqueryfunctiontest/actsgetappcontextstagebtest/entry/src/main/module.json index 6a920661b545ada1870a716bd904911b646634b4..41ecb73effa4f4cb1ce8f2fd9c6884559c7d1866 100644 --- a/ability/ability_runtime/actsqueryfunctiontest/actsgetappcontextstagebtest/entry/src/main/module.json +++ b/ability/ability_runtime/actsqueryfunctiontest/actsgetappcontextstagebtest/entry/src/main/module.json @@ -41,16 +41,6 @@ "visible": true, "launchType": "singleton" } - ], - "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 diff --git a/ability/ability_runtime/actsqueryfunctiontest/actsgetappcontextstagebtest/signature/openharmony_sx.p7b b/ability/ability_runtime/actsqueryfunctiontest/actsgetappcontextstagebtest/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/actsqueryfunctiontest/actsgetappcontextstagebtest/signature/openharmony_sx.p7b and b/ability/ability_runtime/actsqueryfunctiontest/actsgetappcontextstagebtest/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/actsqueryfunctiontest/actsgetappcontexttest/entry/src/main/module.json b/ability/ability_runtime/actsqueryfunctiontest/actsgetappcontexttest/entry/src/main/module.json index 6a920661b545ada1870a716bd904911b646634b4..41ecb73effa4f4cb1ce8f2fd9c6884559c7d1866 100644 --- a/ability/ability_runtime/actsqueryfunctiontest/actsgetappcontexttest/entry/src/main/module.json +++ b/ability/ability_runtime/actsqueryfunctiontest/actsgetappcontexttest/entry/src/main/module.json @@ -41,16 +41,6 @@ "visible": true, "launchType": "singleton" } - ], - "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 diff --git a/ability/ability_runtime/actsqueryfunctiontest/actsgetappcontexttest/signature/openharmony_sx.p7b b/ability/ability_runtime/actsqueryfunctiontest/actsgetappcontexttest/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/actsqueryfunctiontest/actsgetappcontexttest/signature/openharmony_sx.p7b and b/ability/ability_runtime/actsqueryfunctiontest/actsgetappcontexttest/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/actsqueryfunctiontest/actsgetcurrenttopabilitystageatest/entry/src/main/module.json b/ability/ability_runtime/actsqueryfunctiontest/actsgetcurrenttopabilitystageatest/entry/src/main/module.json index 98903f29d92c381aecaf9aee4707acf1ac047c20..09fdb067a2aa9fe01a1c2498ac415aec5c1d85cf 100644 --- a/ability/ability_runtime/actsqueryfunctiontest/actsgetcurrenttopabilitystageatest/entry/src/main/module.json +++ b/ability/ability_runtime/actsqueryfunctiontest/actsgetcurrenttopabilitystageatest/entry/src/main/module.json @@ -46,16 +46,6 @@ "icon": "$media:icon", "label": "$string:Ability2_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 diff --git a/ability/ability_runtime/actsqueryfunctiontest/actsgetcurrenttopabilitystageatest/signature/openharmony_sx.p7b b/ability/ability_runtime/actsqueryfunctiontest/actsgetcurrenttopabilitystageatest/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/actsqueryfunctiontest/actsgetcurrenttopabilitystageatest/signature/openharmony_sx.p7b and b/ability/ability_runtime/actsqueryfunctiontest/actsgetcurrenttopabilitystageatest/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/actsqueryfunctiontest/actsgetcurrenttopabilitystagebtest/entry/src/main/module.json b/ability/ability_runtime/actsqueryfunctiontest/actsgetcurrenttopabilitystagebtest/entry/src/main/module.json index 98903f29d92c381aecaf9aee4707acf1ac047c20..09fdb067a2aa9fe01a1c2498ac415aec5c1d85cf 100644 --- a/ability/ability_runtime/actsqueryfunctiontest/actsgetcurrenttopabilitystagebtest/entry/src/main/module.json +++ b/ability/ability_runtime/actsqueryfunctiontest/actsgetcurrenttopabilitystagebtest/entry/src/main/module.json @@ -46,16 +46,6 @@ "icon": "$media:icon", "label": "$string:Ability2_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 diff --git a/ability/ability_runtime/actsqueryfunctiontest/actsgetcurrenttopabilitystagebtest/signature/openharmony_sx.p7b b/ability/ability_runtime/actsqueryfunctiontest/actsgetcurrenttopabilitystagebtest/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/actsqueryfunctiontest/actsgetcurrenttopabilitystagebtest/signature/openharmony_sx.p7b and b/ability/ability_runtime/actsqueryfunctiontest/actsgetcurrenttopabilitystagebtest/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/actsserviceabilityclienttest/actsserviceabilityclienttest/signature/openharmony_sx.p7b b/ability/ability_runtime/actsserviceabilityclienttest/actsserviceabilityclienttest/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/actsserviceabilityclienttest/actsserviceabilityclienttest/signature/openharmony_sx.p7b and b/ability/ability_runtime/actsserviceabilityclienttest/actsserviceabilityclienttest/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/actsserviceabilityclienttest/actsserviceabilityclienttest/src/main/config.json b/ability/ability_runtime/actsserviceabilityclienttest/actsserviceabilityclienttest/src/main/config.json index 62421dfebb0c78bfe7a32a2e83536366cd86bc3c..8e3bd12159b333b0bf70acad4f26a35d1a41ad9d 100644 --- a/ability/ability_runtime/actsserviceabilityclienttest/actsserviceabilityclienttest/src/main/config.json +++ b/ability/ability_runtime/actsserviceabilityclienttest/actsserviceabilityclienttest/src/main/config.json @@ -66,34 +66,10 @@ } ], "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": [ { diff --git a/ability/ability_runtime/actsserviceabilityclienttest/actsserviceabilityserverrelyhap/signature/openharmony_sx.p7b b/ability/ability_runtime/actsserviceabilityclienttest/actsserviceabilityserverrelyhap/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/actsserviceabilityclienttest/actsserviceabilityserverrelyhap/signature/openharmony_sx.p7b and b/ability/ability_runtime/actsserviceabilityclienttest/actsserviceabilityserverrelyhap/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/actsserviceabilityclienttest/actsserviceabilityserversecondrelyhap/signature/openharmony_sx.p7b b/ability/ability_runtime/actsserviceabilityclienttest/actsserviceabilityserversecondrelyhap/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/actsserviceabilityclienttest/actsserviceabilityserversecondrelyhap/signature/openharmony_sx.p7b and b/ability/ability_runtime/actsserviceabilityclienttest/actsserviceabilityserversecondrelyhap/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/actsshellcommandfunctionalitytest/ActskillProcessWithAccountCloseTest/signature/openharmony_sx.p7b b/ability/ability_runtime/actsshellcommandfunctionalitytest/ActskillProcessWithAccountCloseTest/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/actsshellcommandfunctionalitytest/ActskillProcessWithAccountCloseTest/signature/openharmony_sx.p7b and b/ability/ability_runtime/actsshellcommandfunctionalitytest/ActskillProcessWithAccountCloseTest/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/actsshellcommandfunctionalitytest/ExecuteShellCommand/signature/openharmony_sx.p7b b/ability/ability_runtime/actsshellcommandfunctionalitytest/ExecuteShellCommand/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/actsshellcommandfunctionalitytest/ExecuteShellCommand/signature/openharmony_sx.p7b and b/ability/ability_runtime/actsshellcommandfunctionalitytest/ExecuteShellCommand/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/actssingleton/BUILD.gn b/ability/ability_runtime/actssingleton/BUILD.gn index f372f33aec78f44d77053856ff772172f5d4db54..e3e0fa671e571477d6e1fb1a9da0de41e35a7e9d 100644 --- a/ability/ability_runtime/actssingleton/BUILD.gn +++ b/ability/ability_runtime/actssingleton/BUILD.gn @@ -18,12 +18,9 @@ group("actssingleton") { if (is_standard_system) { deps = [ "SystemSingleton:ActsSystemSingletonTest", - "SystemSingletonExtension:ActsSystemSingletonExtensionTest", - "SystemSingletonExtensionFalse:ActsSystemSingletonExtensionFalseTest", "SystemSingletonFalse:ActsSystemSingletonFalseTest", "ThirdSingleton:ActsThirdSingletonTest", - "ThirdSingletonExtension:ActsThirdSingletonExtensionTest", - "ThirdSingletonExtensionFalse:ActsThirdSingletonExtensionFalseTest", + #"ThirdSingletonExtension:ActsThirdSingletonExtensionTest", "ThirdSingletonFalse:ActsThirdSingletonFalseTest", ] } diff --git a/ability/ability_runtime/actssingleton/SystemSingleton/signature/openharmony_sx.p7b b/ability/ability_runtime/actssingleton/SystemSingleton/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/actssingleton/SystemSingleton/signature/openharmony_sx.p7b and b/ability/ability_runtime/actssingleton/SystemSingleton/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/actssingleton/SystemSingletonExtension/AppScope/app.json b/ability/ability_runtime/actssingleton/SystemSingletonExtension/AppScope/app.json deleted file mode 100644 index e81865770b773a3af7f1f9e9457eed41f7ec460a..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actssingleton/SystemSingletonExtension/AppScope/app.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "app": { - "bundleName": "com.singleusermodel.actssingleusertest", - "vendor": "example", - "versionCode": 1000000, - "versionName": "1.0.0", - "icon": "$media:app_icon", - "label": "$string:app_name", - "distributedNotificationEnabled": true, - "keepAlive" : true, - "singleUser": true, - "minAPIVersion": 9, - "targetAPIVersion": 9, - "car": { - "apiCompatibleVersion": 9, - "singleUser": false - } - } -} diff --git a/ability/ability_runtime/actssingleton/SystemSingletonExtension/AppScope/resources/base/element/string.json b/ability/ability_runtime/actssingleton/SystemSingletonExtension/AppScope/resources/base/element/string.json deleted file mode 100644 index f593f601dc2bd04e71695e6c8846f423e2c9e326..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actssingleton/SystemSingletonExtension/AppScope/resources/base/element/string.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "string": [ - { - "name": "app_name", - "value": "SystemExtensionB" - } - ] -} diff --git a/ability/ability_runtime/actssingleton/SystemSingletonExtension/AppScope/resources/base/media/app_icon.png b/ability/ability_runtime/actssingleton/SystemSingletonExtension/AppScope/resources/base/media/app_icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actssingleton/SystemSingletonExtension/AppScope/resources/base/media/app_icon.png and /dev/null differ diff --git a/ability/ability_runtime/actssingleton/SystemSingletonExtension/BUILD.gn b/ability/ability_runtime/actssingleton/SystemSingletonExtension/BUILD.gn deleted file mode 100644 index e3569275a562a9aa044d50b532383a9a402d386e..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actssingleton/SystemSingletonExtension/BUILD.gn +++ /dev/null @@ -1,43 +0,0 @@ -# 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_js_hap_suite("ActsSystemSingletonExtensionTest") { - hap_profile = "entry/src/main/module.json" - js_build_mode = "debug" - deps = [ - ":systemsingletonextension_js_assets", - ":systemsingletonextension_resources", - ] - ets2abc = true - certificate_profile = "signature/openharmony_sx.p7b" - hap_name = "ActsSystemSingletonExtensionTest" - subsystem_name = "ability" - part_name = "ability_runtime" -} - -ohos_app_scope("systemsingletonextension_app_profile") { - app_profile = "AppScope/app.json" - sources = [ "AppScope/resources" ] -} - -ohos_js_assets("systemsingletonextension_js_assets") { - source_dir = "entry/src/main/ets" -} - -ohos_resources("systemsingletonextension_resources") { - sources = [ "entry/src/main/resources" ] - deps = [ ":systemsingletonextension_app_profile" ] - hap_profile = "entry/src/main/module.json" -} diff --git a/ability/ability_runtime/actssingleton/SystemSingletonExtension/Test.json b/ability/ability_runtime/actssingleton/SystemSingletonExtension/Test.json deleted file mode 100644 index 16b6b4b9523b85b1eb84d2507ccd2893bbb10f9e..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actssingleton/SystemSingletonExtension/Test.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "description": "Configuration for aceceshi Tests", - "driver": { - "type": "OHJSUnitTest", - "test-timeout": "600000", - "bundle-name": "com.singleusermodel.actssingleusertest", - "module-name": "entry", - "shell-timeout": "600000", - "testcase-timeout": "10000" - }, - "kits": [ - { - "type": "ShellKit", - "run-command": [ - "acm create -n 101 -t normal" - ], - "teardown-command":[ - "acm delete -i 101" - ] - }, - { - "type": "PushKit", - "push": [ - "ActsSystemSingletonExtensionTest.hap->/system/ActsSystemSingletonExtensionTest.hap" - ] - }, - { - "test-file-name": [ - "ActsSystemSingletonExtensionTest.hap" - ], - "type": "AppInstallKit", - "cleanup-apps": true - } - ] -} - diff --git a/ability/ability_runtime/actssingleton/SystemSingletonExtension/entry/src/main/ets/Application/AbilityStage.ts b/ability/ability_runtime/actssingleton/SystemSingletonExtension/entry/src/main/ets/Application/AbilityStage.ts deleted file mode 100644 index 6ceb0c290ae831a45143a5e2b42d4351f2fc3d7e..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actssingleton/SystemSingletonExtension/entry/src/main/ets/Application/AbilityStage.ts +++ /dev/null @@ -1,21 +0,0 @@ -/* - * 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" - -export default class MyAbilityStage extends AbilityStage { - onCreate() { - console.log("[Demo] MyAbilityStage onCreate") - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actssingleton/SystemSingletonExtension/entry/src/main/ets/MainAbility/MainAbility.ts b/ability/ability_runtime/actssingleton/SystemSingletonExtension/entry/src/main/ets/MainAbility/MainAbility.ts deleted file mode 100644 index 82e750043f94fd2451ef7d920762765021eccbd0..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actssingleton/SystemSingletonExtension/entry/src/main/ets/MainAbility/MainAbility.ts +++ /dev/null @@ -1,53 +0,0 @@ -/* - * 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 AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry' -import { Hypium } from '@ohos/hypium' -import testsuite from '../test/List.test' - -export default class MainAbility extends Ability { - onCreate(want, launchParam) { - globalThis.abilityContext = this.context; - console.log('MainAbility onCreate') - var abilityDelegator: any - abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() - var abilityDelegatorArguments: any - abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments() - console.info('start run testcase!!!') - Hypium.hypiumTest(abilityDelegator, abilityDelegatorArguments, testsuite) - } - - onDestroy() { - console.log('MainAbility onDestroy') - } - - onWindowStageCreate(windowStage) { - console.log('MainAbility onWindowStageCreate') - windowStage.setUIContent(this.context, 'MainAbility/pages/index', null) - - } - - onWindowStageDestroy() { - console.log('MainAbility onWindowStageDestroy') - } - - onForeground() { - console.log('MainAbility onForeground') - } - - onBackground() { - console.log('MainAbility onBackground') - } -}; diff --git a/ability/ability_runtime/actssingleton/SystemSingletonExtension/entry/src/main/ets/MainAbility/pages/index.ets b/ability/ability_runtime/actssingleton/SystemSingletonExtension/entry/src/main/ets/MainAbility/pages/index.ets deleted file mode 100644 index ba39ca0b8a7b5945c39305a283fa45295b384511..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actssingleton/SystemSingletonExtension/entry/src/main/ets/MainAbility/pages/index.ets +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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 '@ohos.router'; - -@Entry -@Component -struct Index { - aboutToAppear() { - console.info('MainAbility index aboutToAppear') - } - @State message: string = 'Hello World' - build() { - Row() { - Column() { - Text(this.message) - .fontSize(50) - .fontWeight(FontWeight.Bold) - Button() { - Text('next page') - .fontSize(20) - .fontWeight(FontWeight.Bold) - }.type(ButtonType.Capsule) - .margin({ - top: 20 - }) - .backgroundColor('#0D9FFB') - .width('35%') - .height('5%') - .onClick(()=>{ - }) - } - .width('100%') - } - .height('100%') - } - } \ No newline at end of file diff --git a/ability/ability_runtime/actssingleton/SystemSingletonExtension/entry/src/main/ets/ServiceAbility1/ServiceAbility1.ts b/ability/ability_runtime/actssingleton/SystemSingletonExtension/entry/src/main/ets/ServiceAbility1/ServiceAbility1.ts deleted file mode 100644 index 85ac958ed08457b8aa029454f421ae52ca53c0d4..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actssingleton/SystemSingletonExtension/entry/src/main/ets/ServiceAbility1/ServiceAbility1.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * 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 rpc from '@ohos.rpc'; -import ServiceExtension from '@ohos.application.ServiceExtensionAbility' - -export default class ServiceAbility1 extends ServiceExtension { - onCreate(want) { - console.log('ServiceAbility1 onCreate, want: ' + want.abilityName); - } - - onRequest(want, startId) { - console.log('ServiceAbility1 onRequest, want: ' + want.abilityName + ', startId: ' + startId); - } - - onConnect(want) { - console.log('ServiceAbility1 onConnect, want:' + want.abilityName); - if (want.action == 'StartAbilityPromise') { - console.log('stub SerivceAbilityServer OnConnect start 1'); - console.log('=======startAbilityPromise======='); - return new rpc.RemoteObject('ServiceAbility1'); - } - } - - onDisconnect(want) { - console.log('ServiceAbility1 onDisconnect, want:' + want.abilityName); - } - - onDestroy() { - console.log('ServiceAbility1 onDestroy'); - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actssingleton/SystemSingletonExtension/entry/src/main/ets/ServiceAbility2/ServiceAbility2.ts b/ability/ability_runtime/actssingleton/SystemSingletonExtension/entry/src/main/ets/ServiceAbility2/ServiceAbility2.ts deleted file mode 100644 index b37d7441e677e042a8855f09c20ef0ff184615fc..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actssingleton/SystemSingletonExtension/entry/src/main/ets/ServiceAbility2/ServiceAbility2.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* - * 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 rpc from '@ohos.rpc'; -import ServiceExtension from '@ohos.application.ServiceExtensionAbility' - -export default class ServiceAbility2 extends ServiceExtension { - onCreate(want) { - console.log('ServiceAbility2 onCreate, want: ' + want.abilityName); - } - - onRequest(want, startId) { - console.log('ServiceAbility2 onRequest, want: ' + want.abilityName + ', startId: ' + startId); - } - - onConnect(want) { - console.log('ServiceAbility2 onConnect, want:' + want.abilityName); - if (want.action == 'StartAbilityPromise') { - return new rpc.RemoteObject('ServiceAbility2'); - } - } - - onDisconnect(want) { - console.log('ServiceAbility2 onDisconnect, want:' + want.abilityName); - } - - onDestroy() { - console.log('ServiceAbility2 onDestroy'); - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actssingleton/SystemSingletonExtension/entry/src/main/ets/ServiceAbility3/ServiceAbility3.ts b/ability/ability_runtime/actssingleton/SystemSingletonExtension/entry/src/main/ets/ServiceAbility3/ServiceAbility3.ts deleted file mode 100644 index f5eb1975f2d7975c898d04dc6610bcf97c51e4c3..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actssingleton/SystemSingletonExtension/entry/src/main/ets/ServiceAbility3/ServiceAbility3.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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 rpc from '@ohos.rpc'; -import ServiceExtension from '@ohos.application.ServiceExtensionAbility' - -export default class ServiceAbility5 extends ServiceExtension { - onCreate(want) { - console.log('ServiceAbility5 onCreate, want: ' + want.abilityName); - } - - onRequest(want, startId) { - console.log('ServiceAbility5 onRequest, want: ' + want.abilityName + ', startId: ' + startId); - } - - onConnect(want) { - console.log('ServiceAbility5 onConnect, want:' + want.abilityName); - if (want.action == 'StartAbilityPromise') { - return new rpc.RemoteObject('ServiceAbility5'); - } - } - - onDisconnect(want) { - console.log('ServiceAbility5 onDisconnect, want:' + want.abilityName); - } - - onDestroy() { - console.log('ServiceAbility5 onDestroy'); - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actssingleton/SystemSingletonExtension/entry/src/main/ets/ServiceAbility4/ServiceAbility4.ts b/ability/ability_runtime/actssingleton/SystemSingletonExtension/entry/src/main/ets/ServiceAbility4/ServiceAbility4.ts deleted file mode 100644 index ffe69994931fd83d731645e4d2ac4514d4d67ec5..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actssingleton/SystemSingletonExtension/entry/src/main/ets/ServiceAbility4/ServiceAbility4.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* - * 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 rpc from '@ohos.rpc'; -import ServiceExtension from '@ohos.application.ServiceExtensionAbility' - -export default class ServiceAbility4 extends ServiceExtension { - onCreate(want) { - console.log('ServiceAbility4 onCreate, want: ' + want.abilityName); - } - - onRequest(want, startId) { - console.log('ServiceAbility4 onRequest, want: ' + want.abilityName + ', startId: ' + startId); - } - - onConnect(want) { - console.log('ServiceAbility4 onConnect, want:' + want.abilityName); - if (want.action == 'StartAbilityPromise') { - return new rpc.RemoteObject('ServiceAbility4'); - } - } - - onDisconnect(want) { - console.log('ServiceAbility4 onDisconnect, want:' + want.abilityName); - } - - onDestroy() { - console.log('ServiceAbility4 onDestroy'); - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actssingleton/SystemSingletonExtension/entry/src/main/ets/ServiceAbility4/service4.ts b/ability/ability_runtime/actssingleton/SystemSingletonExtension/entry/src/main/ets/ServiceAbility4/service4.ts deleted file mode 100644 index eeded288941dc3898e44cab2082e800f6b6f8a14..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actssingleton/SystemSingletonExtension/entry/src/main/ets/ServiceAbility4/service4.ts +++ /dev/null @@ -1,25 +0,0 @@ -/* - * 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. - */ -export default { - onStart() { - console.info('ServiceAbility onStart'); - }, - onStop() { - console.info('ServiceAbility onStop'); - }, - onCommand(want, startId) { - console.info('ServiceAbility onCommand'); - } -}; \ No newline at end of file diff --git a/ability/ability_runtime/actssingleton/SystemSingletonExtension/entry/src/main/ets/ServiceAbility5/ServiceAbility5.ts b/ability/ability_runtime/actssingleton/SystemSingletonExtension/entry/src/main/ets/ServiceAbility5/ServiceAbility5.ts deleted file mode 100644 index c25b3b418ff6893ac4b2859832c3a7bba17bcb90..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actssingleton/SystemSingletonExtension/entry/src/main/ets/ServiceAbility5/ServiceAbility5.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* - * 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 rpc from '@ohos.rpc'; -import ServiceExtension from '@ohos.application.ServiceExtensionAbility' - -export default class ServiceAbility5 extends ServiceExtension { - onCreate(want) { - console.log('ServiceAbility5 onCreate, want: ' + want.abilityName); - } - - onRequest(want, startId) { - console.log('ServiceAbility5 onRequest, want: ' + want.abilityName + ', startId: ' + startId); - } - - onConnect(want) { - console.log('ServiceAbility5 onConnect, want:' + want.abilityName); - if (want.action == 'StartAbilityPromise') { - return new rpc.RemoteObject('ServiceAbility5'); - } - } - - onDisconnect(want) { - console.log('ServiceAbility5 onDisconnect, want:' + want.abilityName); - } - - onDestroy() { - console.log('ServiceAbility5 onDestroy'); - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actssingleton/SystemSingletonExtension/entry/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts b/ability/ability_runtime/actssingleton/SystemSingletonExtension/entry/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts deleted file mode 100644 index 5dde9f061128f2dd7cb5ec9d169c44891f0217aa..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actssingleton/SystemSingletonExtension/entry/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts +++ /dev/null @@ -1,72 +0,0 @@ -/* - * 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 TestRunner from '@ohos.application.testRunner' -import AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry' - -var abilityDelegator = undefined -var abilityDelegatorArguments = undefined - -function translateParamsToString(parameters) { - const keySet = new Set([ - '-s class', '-s notClass', '-s suite', '-s it', - '-s level', '-s testType', '-s size', '-s timeout' - ]) - let targetParams = ''; - for (const key in parameters) { - if (keySet.has(key)) { - targetParams = `${targetParams} ${key} ${parameters[key]}` - } - } - return targetParams.trim() -} - -async function onAbilityCreateCallback() { - console.log("onAbilityCreateCallback"); -} - -async function addAbilityMonitorCallback(err: any) { - console.info("addAbilityMonitorCallback : " + JSON.stringify(err)) -} - -export default class OpenHarmonyTestRunner implements TestRunner { - constructor() { - } - - onPrepare() { - console.info("OpenHarmonyTestRunner OnPrepare ") - } - - async onRun() { - console.log('OpenHarmonyTestRunner onRun run') - abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments() - abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() - var testAbilityName = abilityDelegatorArguments.bundleName + '.MainAbility' - let lMonitor = { - abilityName: testAbilityName, - onAbilityCreate: onAbilityCreateCallback, - }; - abilityDelegator.addAbilityMonitor(lMonitor, addAbilityMonitorCallback) - var cmd = 'aa start -d 0 -a MainAbility' + ' -b ' + abilityDelegatorArguments.bundleName - cmd += ' '+translateParamsToString(abilityDelegatorArguments.parameters) - console.info('cmd : '+cmd) - abilityDelegator.executeShellCommand(cmd, - (err: any, d: any) => { - console.info('executeShellCommand : err : ' + JSON.stringify(err)); - console.info('executeShellCommand : data : ' + d.stdResult); - console.info('executeShellCommand : data : ' + d.exitCode); - }) - console.info('OpenHarmonyTestRunner onRun end') - } -}; \ No newline at end of file diff --git a/ability/ability_runtime/actssingleton/SystemSingletonExtension/entry/src/main/ets/pages/index.ets b/ability/ability_runtime/actssingleton/SystemSingletonExtension/entry/src/main/ets/pages/index.ets deleted file mode 100644 index 0fe7cdfafd92a8824eb8aa5bf92539bee63a2904..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actssingleton/SystemSingletonExtension/entry/src/main/ets/pages/index.ets +++ /dev/null @@ -1,31 +0,0 @@ -/* - * 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. - */ -@Entry -@Component -struct Index { - @State message: string = 'Hello World' - - build() { - Row() { - Column() { - Text(this.message) - .fontSize(50) - .fontWeight(FontWeight.Bold) - } - .width('100%') - } - .height('100%') - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actssingleton/SystemSingletonExtension/entry/src/main/ets/test/Ability.test.ets b/ability/ability_runtime/actssingleton/SystemSingletonExtension/entry/src/main/ets/test/Ability.test.ets deleted file mode 100644 index efbb1f09e27934dcc99cf7c5b8b5440d20dd7f88..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actssingleton/SystemSingletonExtension/entry/src/main/ets/test/Ability.test.ets +++ /dev/null @@ -1,383 +0,0 @@ - -/* - * 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. - */ -// @ts-nocheck -import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium' -import AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry' - -const START_ABILITY_TIMEOUT = 3000; -const ABILITY_TIMEOUT = 5000; -export default function singleusermodelTest() { - describe('ActsSingleUserTest', function () { - var user100 = 100 - var user101 = 101 - var user102 = 102 - - function onConnectCallbackA(element, remote) { - console.log('ACTS_ExtensionSingleUserModel_0500 onConnectCallback====> element=' + JSON.stringify(element)); - console.log('ACTS_ExtensionSingleUserModel_0500 onConnectCallback====> remote=' + JSON.stringify(remote)); - } - function onDisconnectCallbackA(element) { - console.log('onDisconnectCallback====> element=' + JSON.stringify(element)); - } - function onFailedCallbackA(code) { - console.log('ACTS_ExtensionSingleUserModel_0500====>ACTS_ConnectAbility ' + - 'ConnectAbility onFailed errCode : ' + code) - } - - /** - *@tc.number: ACTS_ExtensionSingleUserModel_0500 - *@tc.name: Support singleuser operation mode - *@tc.desc:When singleuser is false under the system application, the current user starts a serviceability - */ - it('ACTS_ExtensionSingleUserModel_0500', 0, async function (done) { - console.log("ACTS_ExtensionSingleUserModel_0500====>callback start====>") - let connId; - - console.debug("====>start connectAbilityWithAccount====>"); - - connId = globalThis.abilityContext.connectServiceExtensionAbilityWithAccount( - { - bundleName: "com.singleusermodel.actssingleusertest", - abilityName: "ServiceAbility1", - action: "StartAbilityPromise" - }, - user100, - { - onConnect: onConnectCallbackA, - onDisconnect: onDisconnectCallbackA, - onFailed: onFailedCallbackA, - } - ); - console.log('ACTS_ExtensionSingleUserModel_0500====>StartConnectNative ' + - 'connectAbilityWithAccount connId : ' + connId); - setTimeout(async () => { - let abilityDelegator = undefined - abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() - let temp - let cmd = 'aa dump -e' - await abilityDelegator.executeShellCommand(cmd).then((data) => { - console.info('executeShellCommand : data : ' + JSON.stringify(data)); - temp = data["stdResult"]; - expect(temp.indexOf("ServiceAbility1") >= 0).assertTrue() - console.info('executeShellCommand : data : ' + data.exitCode); - }).catch((err) => { - console.info('executeShellCommand : err : ' + JSON.stringify(err)); - }) - cmd = 'aa dump -e -u 0' - await abilityDelegator.executeShellCommand(cmd).then((data) => { - console.info('executeShellCommand : data 0: ' + JSON.stringify(data)); - temp = data["stdResult"]; - expect(temp.indexOf("ServiceAbility1") == -1).assertTrue() - console.info('executeShellCommand 0: data : ' + data.exitCode); - }).catch((err) => { - console.info('executeShellCommand : err : ' + JSON.stringify(err)); - }) - console.debug('ACTS_ExtensionSingleUserModel_0500====>timeout====>'); - await globalThis.abilityContext.disconnectServiceExtensionAbility(connId).then((data) => { - console.debug("====>data is====>" + JSON.stringify(data)); - }) - }, START_ABILITY_TIMEOUT); - setTimeout(() => { - console.debug('ACTS_ExtensionSingleUserModel_0500====>done====>'); - done(); - }, ABILITY_TIMEOUT) - }) - function onConnectCallbackB(element, remote) { - console.log('ACTS_ExtensionSingleUserModel_0600 onConnectCallback====> element=' + JSON.stringify(element)); - console.log('ACTS_ExtensionSingleUserModel_0600 onConnectCallback====> remote=' + JSON.stringify(remote)); - } - function onDisconnectCallbackB(element) { - console.log('onDisconnectCallback====> element=' + JSON.stringify(element)); - } - function onFailedCallbackB(code) { - console.log('ACTS_ExtensionSingleUserModel_0600====>ACTS_ConnectAbility ' + - 'ConnectAbility onFailed errCode : ' + code) - } - - /** - *@tc.number: ACTS_ExtensionSingleUserModel_0600 - *@tc.name: Support singleuser operation mode - *@tc.desc:When singleuser is false under the system application, other existing users start a serviceability - */ - it('ACTS_ExtensionSingleUserModel_0600', 0, async function (done) { - console.log("ACTS_ExtensionSingleUserModel_0600====>callback start====>") - let connId; - console.debug("====>start connectAbilityWithAccount====>"); - connId = globalThis.abilityContext.connectAbilityWithAccount( - { - bundleName: "com.singleusermodel.actssingleusertest", - abilityName: "ServiceAbility2", - action: "StartAbilityPromise" - }, - user101, - { - onConnect: onConnectCallbackB, - onDisconnect: onDisconnectCallbackB, - onFailed: onFailedCallbackB, - } - ); - console.log('ACTS_ExtensionSingleUserModel_0600====>StartConnectNative ' + - 'connectAbilityWithAccount connId : ' + connId); - - setTimeout(async () => { - let abilityDelegator = undefined - abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() - let temp - let cmd = 'aa dump -e' - await abilityDelegator.executeShellCommand(cmd).then((data) => { - console.info('executeShellCommand : data : ' + JSON.stringify(data)); - temp = data["stdResult"]; - expect(temp.indexOf("ServiceAbility2") == -1).assertTrue() - console.info('executeShellCommand : data : ' + data.exitCode); - }).catch((err) => { - console.info('executeShellCommand : err : ' + JSON.stringify(err)); - }) - cmd = 'aa dump -e -u 0' - await abilityDelegator.executeShellCommand(cmd).then((data) => { - console.info('executeShellCommand : data 0: ' + JSON.stringify(data)); - temp = data["stdResult"]; - expect(temp.indexOf("ServiceAbility2") == -1).assertTrue() - console.info('executeShellCommand 0: data : ' + data.exitCode); - }).catch((err) => { - console.info('executeShellCommand : err : ' + JSON.stringify(err)); - }) - console.debug('ACTS_ExtensionSingleUserModel_0600====>timeout====>'); - }, START_ABILITY_TIMEOUT); - setTimeout(() => { - console.debug('ACTS_ExtensionSingleUserModel_0600====>done====>'); - done(); - }, ABILITY_TIMEOUT) - }) - - function onConnectCallbackC(element, remote) { - console.log('ACTS_ExtensionSingleUserModel_0700 onConnectCallback====> element=' + JSON.stringify(element)); - console.log('ACTS_ExtensionSingleUserModel_0700 onConnectCallback====> remote=' + JSON.stringify(remote)); - } - function onDisconnectCallbackC(element) { - console.log('onDisconnectCallback====> element=' + JSON.stringify(element)); - } - function onFailedCallbackC(code) { - console.log('ACTS_ExtensionSingleUserModel_0700====>ACTS_ConnectAbility ' + - 'ConnectAbility onFailed errCode : ' + code) - } - - /** - *@tc.number: ACTS_ExtensionSingleUserModel_0700 - *@tc.name: Support singleuser operation mode - *@tc.desc:When singleuser is false under the system application, other users that do not exist - * tart a serviceability - */ - it('ACTS_ExtensionSingleUserModel_0700', 0, async function (done) { - console.log("ACTS_ExtensionSingleUserModel_0700====>callback start====>"); - try { - let connId; - console.debug("====>start connectAbilityWithAccount====>"); - connId = globalThis.abilityContext.connectAbilityWithAccount( - { - bundleName: "com.singleusermodel.actssingleusertest", - abilityName: "ServiceAbility3", - action: "StartAbilityPromise" - }, - null, - { - onConnect: onConnectCallbackC, - onDisconnect: onDisconnectCallbackC, - onFailed: onFailedCallbackC, - } - ); - console.log('ACTS_ExtensionSingleUserModel_0700====>StartConnectNative ' + - 'connectAbilityWithAccount connId : ' + connId); - } catch (err) { - let e = err.toString() - let errLog = "Invalid input parameter" - console.debug("====>e====>" + e); - expect(e.indexOf(errLog) >= 0).assertTrue() - } - - setTimeout(async () => { - let abilityDelegator = undefined - abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() - let temp - let cmd = 'aa dump -e' - await abilityDelegator.executeShellCommand(cmd).then((data) => { - console.info('executeShellCommand : data : ' + JSON.stringify(data)); - temp = data["stdResult"]; - expect(temp.indexOf("ServiceAbility3") == -1).assertTrue() - console.info('executeShellCommand : data : ' + data.exitCode); - }).catch((err) => { - console.info('executeShellCommand : err : ' + JSON.stringify(err)); - }) - cmd = 'aa dump -e -u 0' - await abilityDelegator.executeShellCommand(cmd).then((data) => { - console.info('executeShellCommand : data 0: ' + JSON.stringify(data)); - temp = data["stdResult"]; - expect(temp.indexOf("ServiceAbility3") == -1).assertTrue() - console.info('executeShellCommand 0: data : ' + data.exitCode); - }).catch((err) => { - console.info('executeShellCommand : err : ' + JSON.stringify(err)); - }) - console.debug('ACTS_ExtensionSingleUserModel_0700====>timeout====>'); - }, START_ABILITY_TIMEOUT); - setTimeout(() => { - console.debug('ACTS_ExtensionSingleUserModel_0700====>done====>'); - done(); - }, ABILITY_TIMEOUT) - }) - - function onConnectCallbackD(element, remote) { - console.log('ACTS_ExtensionSingleUserModel_0800 onConnectCallback====> element=' + JSON.stringify(element)); - console.log('ACTS_ExtensionSingleUserModel_0800 onConnectCallback====> remote=' + JSON.stringify(remote)); - } - function onDisconnectCallbackD(element) { - console.log('onDisconnectCallback====> element=' + JSON.stringify(element)); - } - function onFailedCallbackD(code) { - console.log('ACTS_ExtensionSingleUserModel_0800====>ACTS_ConnectAbility ' + - 'ConnectAbility onFailed errCode : ' + code) - } - - /** - *@tc.number: ACTS_ExtensionSingleUserModel_0800 - *@tc.name: Support singleuser operation mode - *@tc.desc:When singleuser is false, create an ability page with the current user under the influence of - * the system - */ - it('ACTS_ExtensionSingleUserModel_0800', 0, async function (done) { - console.log("ACTS_ExtensionSingleUserModel_0800====>callback start====>") - let connId; - - console.debug("====>start connectAbilityWithAccount====>"); - connId = globalThis.abilityContext.connectAbilityWithAccount( - { - bundleName: "com.singleusermodel.actssingleusertest", - abilityName: "ServiceAbility4", - action: "StartAbilityPromise" - }, - user102, - { - onConnect: onConnectCallbackD, - onDisconnect: onDisconnectCallbackD, - onFailed: onFailedCallbackD, - } - ); - console.log('ACTS_ExtensionSingleUserModel_0800====>StartConnectNative ' + - 'connectAbilityWithAccount connId : ' + connId); - setTimeout(async () => { - let abilityDelegator = undefined - abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() - let temp - let cmd = 'aa dump -e' - await abilityDelegator.executeShellCommand(cmd).then((data) => { - console.info('executeShellCommand : data : ' + JSON.stringify(data)); - temp = data["stdResult"]; - expect(temp.indexOf("ServiceAbility4") == -1).assertTrue() - console.info('executeShellCommand : data : ' + data.exitCode); - }).catch((err) => { - console.info('executeShellCommand : err : ' + JSON.stringify(err)); - }) - cmd = 'aa dump -e -u 0' - await abilityDelegator.executeShellCommand(cmd).then((data) => { - console.info('executeShellCommand : data 0: ' + JSON.stringify(data)); - temp = data["stdResult"]; - expect(temp.indexOf("ServiceAbility4") == -1).assertTrue() - console.info('executeShellCommand 0: data : ' + data.exitCode); - }).catch((err) => { - console.info('executeShellCommand : err : ' + JSON.stringify(err)); - }) - console.debug('ACTS_ExtensionSingleUserModel_0800====>timeout====>'); - }, START_ABILITY_TIMEOUT); - setTimeout(() => { - console.debug('ACTS_ExtensionSingleUserModel_0800====>done====>'); - done(); - }, ABILITY_TIMEOUT) - }) - - function onConnectCallbackE(element, remote) { - console.log('ACTS_ExtensionSingleUserModel_1300 onConnectCallback====> element=' + JSON.stringify(element)); - console.log('ACTS_ExtensionSingleUserModel_1300 onConnectCallback====> remote=' + JSON.stringify(remote)); - } - function onDisconnectCallbackE(element) { - console.log('onDisconnectCallback====> element=' + JSON.stringify(element)); - } - function onFailedCallbackE(code) { - console.log('ACTS_ExtensionSingleUserModel_1300====>ACTS_ConnectAbility ' + - 'ConnectAbility onFailed errCode : ' + code) - } - - /** - *@tc.number: ACTS_ExtensionSingleUserModel_1300 - *@tc.name: Support singleuser operation mode - *@tc.desc:When singleuser is false under the system application, other users that do not exist - * tart a serviceability - */ - it('ACTS_ExtensionSingleUserModel_1300', 0, async function (done) { - console.log("ACTS_ExtensionSingleUserModel_1300====>callback start====>"); - try { - let connId; - connId = globalThis.abilityContext.connectAbilityWithAccount( - { - bundleName: "com.singleusermodel.actssingleusertest", - abilityName: "ServiceAbility5", - action: "StartAbilityPromise" - }, - undefined, - { - onConnect: onConnectCallbackE, - onDisconnect: onDisconnectCallbackE, - onFailed: onFailedCallbackE, - } - ); - console.log('ACTS_ExtensionSingleUserModel_1300====>StartConnectNative ' + - 'connectAbilityWithAccount connId : ' + connId); - } catch (err) { - let e = err.toString() - let errLog = "Invalid input parameter" - console.debug("====>e====>" + e); - expect(e.indexOf(errLog) >= 0).assertTrue() - } - - setTimeout(async () => { - let abilityDelegator = undefined - abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() - let temp - let cmd = 'aa dump -e' - await abilityDelegator.executeShellCommand(cmd).then((data) => { - console.info('executeShellCommand : data : ' + JSON.stringify(data)); - temp = data["stdResult"]; - expect(temp.indexOf("ServiceAbility5") == -1).assertTrue() - console.info('executeShellCommand : data : ' + data.exitCode); - }).catch((err) => { - console.info('executeShellCommand : err : ' + JSON.stringify(err)); - }) - cmd = 'aa dump -e -u 0' - await abilityDelegator.executeShellCommand(cmd).then((data) => { - console.info('executeShellCommand : data 0: ' + JSON.stringify(data)); - temp = data["stdResult"]; - expect(temp.indexOf("ServiceAbility5") == -1).assertTrue() - console.info('executeShellCommand 0: data : ' + data.exitCode); - }).catch((err) => { - console.info('executeShellCommand : err : ' + JSON.stringify(err)); - }) - console.debug('ACTS_ExtensionSingleUserModel_1300====>timeout====>'); - }, START_ABILITY_TIMEOUT); - setTimeout(() => { - console.debug('ACTS_ExtensionSingleUserModel_1300====>done====>'); - done(); - }, ABILITY_TIMEOUT) - console.debug("====>start connectAbilityWithAccount====>"); - }) - }) -} \ No newline at end of file diff --git a/ability/ability_runtime/actssingleton/SystemSingletonExtension/entry/src/main/ets/test/List.test.ets b/ability/ability_runtime/actssingleton/SystemSingletonExtension/entry/src/main/ets/test/List.test.ets deleted file mode 100644 index effe726fa006c3f48f7f6f818e434311ce7a9ba8..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actssingleton/SystemSingletonExtension/entry/src/main/ets/test/List.test.ets +++ /dev/null @@ -1,19 +0,0 @@ -/* - * 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 singleusermodelTest from './Ability.test' - -export default function testsuite() { - singleusermodelTest() -} \ No newline at end of file diff --git a/ability/ability_runtime/actssingleton/SystemSingletonExtension/entry/src/main/module.json b/ability/ability_runtime/actssingleton/SystemSingletonExtension/entry/src/main/module.json deleted file mode 100644 index c87da7251c9700dfaa7e05adfacffc579394fccd..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actssingleton/SystemSingletonExtension/entry/src/main/module.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "module": { - "name": "entry", - "type": "entry", - "srcEntrance": "./ets/Application/AbilityStage.ts", - "description": "$string:entry_desc", - "mainElement": "MainAbility", - "deviceTypes": [ - "default", - "tablet" - ], - "deliveryWithInstall": true, - "installationFree": false, - "pages": "$profile:main_pages", - "uiSyntax": "ets", - "abilities": [ - { - "name": "MainAbility", - "srcEntrance": "./ets/MainAbility/MainAbility.ts", - "description": "$string:MainAbility_desc", - "icon": "$media:icon", - "label": "$string:MainAbility_label", - "visible": true, - "skills": [ - { - "actions": [ - "action.system.home" - ], - "entities": [ - "entity.system.home" - ] - } - ] - } - ], - "extensionAbilities": [ - { - "name": "ServiceAbility1", - "srcEntrance": "./ets/ServiceAbility1/ServiceAbility1.ts", - "label": "$string:form_ServiceAbility1_label", - "description": "$string:form_ServiceAbility1_desc", - "type": "service|dataShare" - }, - { - "name": "ServiceAbility2", - "srcEntrance": "./ets/ServiceAbility2/ServiceAbility2.ts", - "label": "$string:form_ServiceAbility1_label", - "description": "$string:form_ServiceAbility1_desc", - "type": "service|dataShare" - }, - { - "name": "ServiceAbility3", - "srcEntrance": "./ets/ServiceAbility3/ServiceAbility3.ts", - "label": "$string:form_ServiceAbility1_label", - "description": "$string:form_ServiceAbility1_desc", - "type": "service|dataShare" - }, - { - "name": "ServiceAbility4", - "srcEntrance": "./ets/ServiceAbility4/ServiceAbility4.ts", - "label": "$string:form_ServiceAbility1_label", - "description": "$string:form_ServiceAbility1_desc", - "type": "service|dataShare" - }, - { - "name": "ServiceAbility5", - "srcEntrance": "./ets/ServiceAbility5/ServiceAbility5.ts", - "label": "$string:form_ServiceAbility1_label", - "description": "$string:form_ServiceAbility1_desc", - "type": "service|dataShare" - } - ] - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actssingleton/SystemSingletonExtension/entry/src/main/resources/base/element/string.json b/ability/ability_runtime/actssingleton/SystemSingletonExtension/entry/src/main/resources/base/element/string.json deleted file mode 100644 index d7eb4ff7e9d3261a46da1ff28b30208da50182a2..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actssingleton/SystemSingletonExtension/entry/src/main/resources/base/element/string.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "string": [ - { - "name": "entry_desc", - "value": "description" - }, - { - "name": "MainAbility_desc", - "value": "description" - }, - { - "name": "MainAbility_label", - "value": "label" - }, - { - "name": "form_ServiceAbility1_desc", - "value": "form_description" - }, - { - "name": "form_ServiceAbility1_label", - "value": "form_label" - }, - { - "name": "form_ServiceAbility2_desc", - "value": "form_description" - }, - { - "name": "form_ServiceAbility2_label", - "value": "form_label" - }, - { - "name": "form_ServiceAbility3_desc", - "value": "form_description" - }, - { - "name": "form_ServiceAbility3_label", - "value": "form_label" - }, - { - "name": "form_ServiceAbility4_desc", - "value": "form_description" - }, - { - "name": "form_ServiceAbility4_label", - "value": "form_label" - }, - { - "name": "form_ServiceAbility5_desc", - "value": "form_description" - }, - { - "name": "form_ServiceAbility5_label", - "value": "form_label" - } - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/actssingleton/SystemSingletonExtension/entry/src/main/resources/base/media/icon.png b/ability/ability_runtime/actssingleton/SystemSingletonExtension/entry/src/main/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actssingleton/SystemSingletonExtension/entry/src/main/resources/base/media/icon.png and /dev/null differ diff --git a/ability/ability_runtime/actssingleton/SystemSingletonExtension/entry/src/main/resources/base/profile/main_pages.json b/ability/ability_runtime/actssingleton/SystemSingletonExtension/entry/src/main/resources/base/profile/main_pages.json deleted file mode 100644 index feec276e105eeb8d621c20aaf838f318b0a94150..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actssingleton/SystemSingletonExtension/entry/src/main/resources/base/profile/main_pages.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "src": [ - "pages/index" - ] -} diff --git a/ability/ability_runtime/actssingleton/SystemSingletonExtension/signature/openharmony_sx.p7b b/ability/ability_runtime/actssingleton/SystemSingletonExtension/signature/openharmony_sx.p7b deleted file mode 100644 index 66b4457a8a81fb8d3356cf46d67226c850944858..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actssingleton/SystemSingletonExtension/signature/openharmony_sx.p7b and /dev/null differ diff --git a/ability/ability_runtime/actssingleton/SystemSingletonExtensionFalse/AppScope/app.json b/ability/ability_runtime/actssingleton/SystemSingletonExtensionFalse/AppScope/app.json deleted file mode 100644 index 7a443e9b58b85d824c83f3aadb09708c0d4e7eb5..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actssingleton/SystemSingletonExtensionFalse/AppScope/app.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "app": { - "bundleName": "com.singleusermodel.actssingleusertest", - "vendor": "example", - "versionCode": 1000000, - "versionName": "1.0.0", - "icon": "$media:app_icon", - "label": "$string:app_name", - "distributedNotificationEnabled": true, - "singleton":false, - "keepAlive" : true, - "singleUser": true, - "minAPIVersion": 9, - "targetAPIVersion": 9, - "car": { - "apiCompatibleVersion": 9, - "singleUser": false - } - } -} diff --git a/ability/ability_runtime/actssingleton/SystemSingletonExtensionFalse/AppScope/resources/base/element/string.json b/ability/ability_runtime/actssingleton/SystemSingletonExtensionFalse/AppScope/resources/base/element/string.json deleted file mode 100644 index f593f601dc2bd04e71695e6c8846f423e2c9e326..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actssingleton/SystemSingletonExtensionFalse/AppScope/resources/base/element/string.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "string": [ - { - "name": "app_name", - "value": "SystemExtensionB" - } - ] -} diff --git a/ability/ability_runtime/actssingleton/SystemSingletonExtensionFalse/AppScope/resources/base/media/app_icon.png b/ability/ability_runtime/actssingleton/SystemSingletonExtensionFalse/AppScope/resources/base/media/app_icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actssingleton/SystemSingletonExtensionFalse/AppScope/resources/base/media/app_icon.png and /dev/null differ diff --git a/ability/ability_runtime/actssingleton/SystemSingletonExtensionFalse/BUILD.gn b/ability/ability_runtime/actssingleton/SystemSingletonExtensionFalse/BUILD.gn deleted file mode 100644 index 72c41ec8345bdd3bfd8bf36479043d9388232dfc..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actssingleton/SystemSingletonExtensionFalse/BUILD.gn +++ /dev/null @@ -1,43 +0,0 @@ -# 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_js_hap_suite("ActsSystemSingletonExtensionFalseTest") { - hap_profile = "entry/src/main/module.json" - js_build_mode = "debug" - deps = [ - ":systemsingletonextensionfalse_js_assets", - ":systemsingletonextensionfalse_resources", - ] - ets2abc = true - certificate_profile = "signature/openharmony_sx.p7b" - hap_name = "ActsSystemSingletonExtensionFalseTest" - subsystem_name = "ability" - part_name = "ability_runtime" -} - -ohos_app_scope("systemsingletonextensionfalse_app_profile") { - app_profile = "AppScope/app.json" - sources = [ "AppScope/resources" ] -} - -ohos_js_assets("systemsingletonextensionfalse_js_assets") { - source_dir = "entry/src/main/ets" -} - -ohos_resources("systemsingletonextensionfalse_resources") { - sources = [ "entry/src/main/resources" ] - deps = [ ":systemsingletonextensionfalse_app_profile" ] - hap_profile = "entry/src/main/module.json" -} diff --git a/ability/ability_runtime/actssingleton/SystemSingletonExtensionFalse/Test.json b/ability/ability_runtime/actssingleton/SystemSingletonExtensionFalse/Test.json deleted file mode 100644 index 3af1504bae6af5c9bc602cb776cb7d9834bb592b..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actssingleton/SystemSingletonExtensionFalse/Test.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "description": "Configuration for aceceshi Tests", - "driver": { - "type": "OHJSUnitTest", - "test-timeout": "600000", - "bundle-name": "com.singleusermodel.actssingleusertest", - "module-name": "entry", - "shell-timeout": "600000", - "testcase-timeout": "10000" - }, - "kits": [ - { - "type": "ShellKit", - "run-command": [ - "acm create -n 101 -t normal" - ], - "teardown-command":[ - "acm delete -i 101" - ] - }, - { - "type": "PushKit", - "push": [ - "ActsSystemSingletonExtensionFalseTest.hap->/system/ActsSystemSingletonExtensionFalseTest.hap" - ] - }, - { - "test-file-name": [ - "ActsSystemSingletonExtensionFalseTest.hap" - ], - "type": "AppInstallKit", - "cleanup-apps": true - } - ] -} - diff --git a/ability/ability_runtime/actssingleton/SystemSingletonExtensionFalse/entry/src/main/ets/Application/AbilityStage.ts b/ability/ability_runtime/actssingleton/SystemSingletonExtensionFalse/entry/src/main/ets/Application/AbilityStage.ts deleted file mode 100644 index 6ceb0c290ae831a45143a5e2b42d4351f2fc3d7e..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actssingleton/SystemSingletonExtensionFalse/entry/src/main/ets/Application/AbilityStage.ts +++ /dev/null @@ -1,21 +0,0 @@ -/* - * 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" - -export default class MyAbilityStage extends AbilityStage { - onCreate() { - console.log("[Demo] MyAbilityStage onCreate") - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actssingleton/SystemSingletonExtensionFalse/entry/src/main/ets/MainAbility/MainAbility.ts b/ability/ability_runtime/actssingleton/SystemSingletonExtensionFalse/entry/src/main/ets/MainAbility/MainAbility.ts deleted file mode 100644 index 7e962a25a66b5ca4ae0c3122f4aecdc3110e7d78..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actssingleton/SystemSingletonExtensionFalse/entry/src/main/ets/MainAbility/MainAbility.ts +++ /dev/null @@ -1,53 +0,0 @@ -/* - * 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 AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry' -import { Hypium } from '@ohos/hypium' -import testsuite from '../test/List.test' - -export default class MainAbility extends Ability { - onCreate(want, launchParam) { - globalThis.abilityContext = this.context; - console.log('MainAbility onCreate') - var abilityDelegator: any - abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() - var abilityDelegatorArguments: any - abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments() - console.info('start run testcase!!!') - Hypium.hypiumTest(abilityDelegator, abilityDelegatorArguments, testsuite) - } - - onDestroy() { - console.log('MainAbility onDestroy') - } - - onWindowStageCreate(windowStage) { - console.log('MainAbility onWindowStageCreate') - windowStage.setUIContent(this.context, '../pages/index', null) - - } - - onWindowStageDestroy() { - console.log('MainAbility onWindowStageDestroy') - } - - onForeground() { - console.log('MainAbility onForeground') - } - - onBackground() { - console.log('MainAbility onBackground') - } -}; diff --git a/ability/ability_runtime/actssingleton/SystemSingletonExtensionFalse/entry/src/main/ets/ServiceAbility1/ServiceAbility1.ts b/ability/ability_runtime/actssingleton/SystemSingletonExtensionFalse/entry/src/main/ets/ServiceAbility1/ServiceAbility1.ts deleted file mode 100644 index 85ac958ed08457b8aa029454f421ae52ca53c0d4..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actssingleton/SystemSingletonExtensionFalse/entry/src/main/ets/ServiceAbility1/ServiceAbility1.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * 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 rpc from '@ohos.rpc'; -import ServiceExtension from '@ohos.application.ServiceExtensionAbility' - -export default class ServiceAbility1 extends ServiceExtension { - onCreate(want) { - console.log('ServiceAbility1 onCreate, want: ' + want.abilityName); - } - - onRequest(want, startId) { - console.log('ServiceAbility1 onRequest, want: ' + want.abilityName + ', startId: ' + startId); - } - - onConnect(want) { - console.log('ServiceAbility1 onConnect, want:' + want.abilityName); - if (want.action == 'StartAbilityPromise') { - console.log('stub SerivceAbilityServer OnConnect start 1'); - console.log('=======startAbilityPromise======='); - return new rpc.RemoteObject('ServiceAbility1'); - } - } - - onDisconnect(want) { - console.log('ServiceAbility1 onDisconnect, want:' + want.abilityName); - } - - onDestroy() { - console.log('ServiceAbility1 onDestroy'); - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actssingleton/SystemSingletonExtensionFalse/entry/src/main/ets/ServiceAbility2/ServiceAbility2.ts b/ability/ability_runtime/actssingleton/SystemSingletonExtensionFalse/entry/src/main/ets/ServiceAbility2/ServiceAbility2.ts deleted file mode 100644 index b37d7441e677e042a8855f09c20ef0ff184615fc..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actssingleton/SystemSingletonExtensionFalse/entry/src/main/ets/ServiceAbility2/ServiceAbility2.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* - * 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 rpc from '@ohos.rpc'; -import ServiceExtension from '@ohos.application.ServiceExtensionAbility' - -export default class ServiceAbility2 extends ServiceExtension { - onCreate(want) { - console.log('ServiceAbility2 onCreate, want: ' + want.abilityName); - } - - onRequest(want, startId) { - console.log('ServiceAbility2 onRequest, want: ' + want.abilityName + ', startId: ' + startId); - } - - onConnect(want) { - console.log('ServiceAbility2 onConnect, want:' + want.abilityName); - if (want.action == 'StartAbilityPromise') { - return new rpc.RemoteObject('ServiceAbility2'); - } - } - - onDisconnect(want) { - console.log('ServiceAbility2 onDisconnect, want:' + want.abilityName); - } - - onDestroy() { - console.log('ServiceAbility2 onDestroy'); - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actssingleton/SystemSingletonExtensionFalse/entry/src/main/ets/ServiceAbility3/ServiceAbility3.ts b/ability/ability_runtime/actssingleton/SystemSingletonExtensionFalse/entry/src/main/ets/ServiceAbility3/ServiceAbility3.ts deleted file mode 100644 index 668d3478caee0a77bfff0b1e4822700d6cdfd114..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actssingleton/SystemSingletonExtensionFalse/entry/src/main/ets/ServiceAbility3/ServiceAbility3.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * 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 rpc from '@ohos.rpc'; -import ServiceExtension from'@ohos.application.ServiceExtensionAbility' - -export default class ServiceAbility3 extends ServiceExtension { - onCreate(want) { - console.log('ServiceAbility3 onCreate, want: ' + want.abilityName); - } - - onRequest(want, startId) { - console.log('ServiceAbility3 onRequest, want: ' + want.abilityName + ', startId: ' + startId); - } - - onConnect(want) { - console.log('ServiceAbility3 onConnect, want:' + want.abilityName); - if (want.action == 'StartAbilityPromise') { - console.log('stub SerivceAbilityServer OnConnect start 1'); - console.log('=======startAbilityPromise======='); - return new rpc.RemoteObject('ServiceAbility3'); - } - } - - onDisconnect(want) { - console.log('ServiceAbility3 onDisconnect, want:' + want.abilityName); - } - - onDestroy() { - console.log('ServiceAbility3 onDestroy'); - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actssingleton/SystemSingletonExtensionFalse/entry/src/main/ets/ServiceAbility4/ServiceAbility4.ts b/ability/ability_runtime/actssingleton/SystemSingletonExtensionFalse/entry/src/main/ets/ServiceAbility4/ServiceAbility4.ts deleted file mode 100644 index ffe69994931fd83d731645e4d2ac4514d4d67ec5..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actssingleton/SystemSingletonExtensionFalse/entry/src/main/ets/ServiceAbility4/ServiceAbility4.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* - * 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 rpc from '@ohos.rpc'; -import ServiceExtension from '@ohos.application.ServiceExtensionAbility' - -export default class ServiceAbility4 extends ServiceExtension { - onCreate(want) { - console.log('ServiceAbility4 onCreate, want: ' + want.abilityName); - } - - onRequest(want, startId) { - console.log('ServiceAbility4 onRequest, want: ' + want.abilityName + ', startId: ' + startId); - } - - onConnect(want) { - console.log('ServiceAbility4 onConnect, want:' + want.abilityName); - if (want.action == 'StartAbilityPromise') { - return new rpc.RemoteObject('ServiceAbility4'); - } - } - - onDisconnect(want) { - console.log('ServiceAbility4 onDisconnect, want:' + want.abilityName); - } - - onDestroy() { - console.log('ServiceAbility4 onDestroy'); - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actssingleton/SystemSingletonExtensionFalse/entry/src/main/ets/ServiceAbility5/ServiceAbility5.ts b/ability/ability_runtime/actssingleton/SystemSingletonExtensionFalse/entry/src/main/ets/ServiceAbility5/ServiceAbility5.ts deleted file mode 100644 index c25b3b418ff6893ac4b2859832c3a7bba17bcb90..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actssingleton/SystemSingletonExtensionFalse/entry/src/main/ets/ServiceAbility5/ServiceAbility5.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* - * 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 rpc from '@ohos.rpc'; -import ServiceExtension from '@ohos.application.ServiceExtensionAbility' - -export default class ServiceAbility5 extends ServiceExtension { - onCreate(want) { - console.log('ServiceAbility5 onCreate, want: ' + want.abilityName); - } - - onRequest(want, startId) { - console.log('ServiceAbility5 onRequest, want: ' + want.abilityName + ', startId: ' + startId); - } - - onConnect(want) { - console.log('ServiceAbility5 onConnect, want:' + want.abilityName); - if (want.action == 'StartAbilityPromise') { - return new rpc.RemoteObject('ServiceAbility5'); - } - } - - onDisconnect(want) { - console.log('ServiceAbility5 onDisconnect, want:' + want.abilityName); - } - - onDestroy() { - console.log('ServiceAbility5 onDestroy'); - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actssingleton/SystemSingletonExtensionFalse/entry/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts b/ability/ability_runtime/actssingleton/SystemSingletonExtensionFalse/entry/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts deleted file mode 100644 index 1762cda6dd8f03996989e42dfeb364161e91c0b7..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actssingleton/SystemSingletonExtensionFalse/entry/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts +++ /dev/null @@ -1,75 +0,0 @@ -/* -* 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 TestRunner from '@ohos.application.testRunner' -import AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry' - -var abilityDelegator = undefined -var abilityDelegatorArguments = undefined - -function translateParamsToString(parameters) { - const keySet = new Set([ - '-s class', '-s notClass', '-s suite', '-s it', - '-s level', '-s testType', '-s size', '-s timeout', - '-s dryRun' - ]) - let targetParams = ''; - for (const key in parameters) { - if (keySet.has(key)) { - targetParams = `${targetParams} ${key} ${parameters[key]}` - } - } - return targetParams.trim() -} - -async function onAbilityCreateCallback() { - console.log("onAbilityCreateCallback"); -} - -async function addAbilityMonitorCallback(err: any) { - console.info("addAbilityMonitorCallback : " + JSON.stringify(err)) -} - -export default class OpenHarmonyTestRunner implements TestRunner { - constructor() { - } - - onPrepare() { - console.info("OpenHarmonyTestRunner OnPrepare ") - } - - async onRun() { - console.log('OpenHarmonyTestRunner onRun run') - abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments() - abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() - globalThis.abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() - var MainAbilityName = abilityDelegatorArguments.bundleName + '.MainAbility' - let lMonitor = { - abilityName: MainAbilityName, - onAbilityCreate: onAbilityCreateCallback, - }; - abilityDelegator.addAbilityMonitor(lMonitor, addAbilityMonitorCallback) - var cmd = 'aa start -d 0 -a MainAbility' + ' -b ' + abilityDelegatorArguments.bundleName - cmd += ' '+translateParamsToString(abilityDelegatorArguments.parameters) - console.info('cmd : '+cmd) - abilityDelegator.executeShellCommand(cmd, - (err: any, d: any) => { - console.info('executeShellCommand : err : ' + JSON.stringify(err)); - console.info('executeShellCommand : data : ' + d.stdResult); - console.info('executeShellCommand : data : ' + d.exitCode); - }) - console.info('OpenHarmonyTestRunner onRun end') - } -}; \ No newline at end of file diff --git a/ability/ability_runtime/actssingleton/SystemSingletonExtensionFalse/entry/src/main/ets/pages/index.ets b/ability/ability_runtime/actssingleton/SystemSingletonExtensionFalse/entry/src/main/ets/pages/index.ets deleted file mode 100644 index 0fe7cdfafd92a8824eb8aa5bf92539bee63a2904..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actssingleton/SystemSingletonExtensionFalse/entry/src/main/ets/pages/index.ets +++ /dev/null @@ -1,31 +0,0 @@ -/* - * 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. - */ -@Entry -@Component -struct Index { - @State message: string = 'Hello World' - - build() { - Row() { - Column() { - Text(this.message) - .fontSize(50) - .fontWeight(FontWeight.Bold) - } - .width('100%') - } - .height('100%') - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actssingleton/SystemSingletonExtensionFalse/entry/src/main/ets/test/Ability.test.ets b/ability/ability_runtime/actssingleton/SystemSingletonExtensionFalse/entry/src/main/ets/test/Ability.test.ets deleted file mode 100644 index db8014fd761627d68a6d99f28691ea28e245d89d..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actssingleton/SystemSingletonExtensionFalse/entry/src/main/ets/test/Ability.test.ets +++ /dev/null @@ -1,390 +0,0 @@ - -/* - * 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. - */ -// @ts-nocheck -import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium' -import AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry' -const ABILITY_TIMEOUT=5000; -const START_ABILITY_TIMEOUT = 3000; -export default function singleusermodelTest() { - describe('ActsSingleUserTest', function () { - var user100=100 - var user101=101 - var user102=102 - function onConnectCallbackA(element, remote) { - console.log('ACTS_ExtensionSingleUserModel_1400 onConnectCallback====> element=' + JSON.stringify(element)); - console.log('ACTS_ExtensionSingleUserModel_1400 onConnectCallback====> remote=' + JSON.stringify(remote)); - } - function onDisconnectCallbackA(element) { - console.log('onDisconnectCallback====> element=' + JSON.stringify(element)); - } - function onFailedCallbackA(code) { - console.log('ACTS_ExtensionSingleUserModel_1400====>ACTS_ConnectAbility ' + - 'ConnectAbility onFailed errCode : ' + code) - } - - /** - *@tc.number: ACTS_ExtensionSingleUserModel_1400 - *@tc.name: Support singleuser operation mode - *@tc.desc:When singleuser is false under the system application, the current user starts a serviceability - */ - it('ACTS_ExtensionSingleUserModel_1400', 0, async function(done){ - console.log("ACTS_ExtensionSingleUserModel_1400====>callback start====>") - let connId; - - console.debug("====>start connectAbilityWithAccount====>"); - - connId = globalThis.abilityContext.connectAbilityWithAccount( - { - bundleName: "com.singleusermodel.actssingleusertest", - abilityName:"ServiceAbility1", - action: "StartAbilityPromise" - }, - user100, - { - onConnect: onConnectCallbackA, - onDisconnect: onDisconnectCallbackA, - onFailed: onFailedCallbackA, - } - ); - setTimeout(async()=>{ - let abilityDelegator = undefined - abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() - let temp - let cmd ='aa dump -e' - await abilityDelegator.executeShellCommand(cmd).then((data) => { - console.info('executeShellCommand : data : ' + JSON.stringify(data)); - temp = data["stdResult"]; - expect(temp.indexOf("ServiceAbility1") >= 0).assertTrue() - console.info('executeShellCommand : data : ' + data.exitCode); - }).catch((err) => { - console.info('executeShellCommand : err : ' + JSON.stringify(err)); - }) - cmd ='aa dump -e -u 0' - await abilityDelegator.executeShellCommand(cmd).then((data) => { - console.info('executeShellCommand : data 0: ' + JSON.stringify(data)); - temp = data["stdResult"]; - expect(temp.indexOf("ServiceAbility1") == -1).assertTrue() - console.info('executeShellCommand 0: data : ' + data.exitCode); - }).catch((err) => { - console.info('executeShellCommand : err : ' + JSON.stringify(err)); - }) - console.debug('ACTS_ExtensionSingleUserModel_1400====>timeout====>'); - globalThis.abilityContex.disconnectAbility(connId).then((data)=>{ - console.debug("====>data is====>" + JSON.stringify(data)); - }) - },START_ABILITY_TIMEOUT); - console.log('ACTS_ExtensionSingleUserModel_1400====>StartConnectNative ' + - 'connectAbilityWithAccount connId : ' + connId); - setTimeout(()=>{ - console.debug('ACTS_ExtensionSingleUserModel_1400====>done====>'); - done(); - },ABILITY_TIMEOUT) - }) - - function onConnectCallbackB(element, remote) { - console.log('ACTS_ExtensionSingleUserModel_1500 onConnectCallback====> element=' + JSON.stringify(element)); - console.log('ACTS_ExtensionSingleUserModel_1500 onConnectCallback====> remote=' + JSON.stringify(remote)); - } - function onDisconnectCallbackB(element) { - console.log('onDisconnectCallback====> element=' + JSON.stringify(element)); - } - function onFailedCallbackB(code) { - console.log('ACTS_ExtensionSingleUserModel_1500====>ACTS_ConnectAbility ' + - 'ConnectAbility onFailed errCode : ' + code) - } - - /** - *@tc.number: ACTS_ExtensionSingleUserModel_1500 - *@tc.name: Support singleuser operation mode - *@tc.desc:When singleuser is false under the system application, other existing users start a serviceability - */ - it('ACTS_ExtensionSingleUserModel_1500', 0, async function(done){ - console.log("ACTS_ExtensionSingleUserModel_1500====>callback start====>") - let connId; - console.debug("====>start connectAbilityWithAccount====>"); - connId = globalThis.abilityContext.connectAbilityWithAccount( - { - bundleName: "com.singleusermodel.actssingleusertest", - abilityName: "ServiceAbility2", - action: "StartAbilityPromise" - }, - user101, - { - onConnect: onConnectCallbackB, - onDisconnect: onDisconnectCallbackB, - onFailed: onFailedCallbackB, - } - ); - console.log('ACTS_ExtensionSingleUserModel_1500====>StartConnectNative ' + - 'connectAbilityWithAccount connId : ' + connId); - - setTimeout(async()=>{ - let abilityDelegator = undefined - abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() - let temp - let cmd ='aa dump -e' - await abilityDelegator.executeShellCommand(cmd).then((data) => { - console.info('executeShellCommand : err : ' + JSON.stringify(err)); - console.info('executeShellCommand : data : ' + JSON.stringify(data)); - temp = data["stdResult"]; - expect(temp.indexOf("ServiceAbility2") == -1).assertTrue() - console.info('executeShellCommand : data : ' + data.exitCode); - }).catch((err) => { - console.info('executeShellCommand : err : ' + JSON.stringify(err)); - }) - cmd ='aa dump -e -u 0' - await abilityDelegator.executeShellCommand(cmd).then((data) => { - console.info('executeShellCommand 0: err : ' + JSON.stringify(err)); - console.info('executeShellCommand : data 0: ' + JSON.stringify(data)); - temp = data["stdResult"]; - expect(temp.indexOf("ServiceAbility2") == -1).assertTrue() - console.info('executeShellCommand 0: data : ' + data.exitCode); - }).catch((err) => { - console.info('executeShellCommand : err : ' + JSON.stringify(err)); - }) - console.debug('ACTS_ExtensionSingleUserModel_1500====>timeout====>'); - },START_ABILITY_TIMEOUT); - setTimeout(()=>{ - console.debug('ACTS_ExtensionSingleUserModel_1500====>done====>'); - done(); - },ABILITY_TIMEOUT) - }) - - function onConnectCallbackC(element, remote) { - console.log('ACTS_ExtensionSingleUserModel_1600 onConnectCallback====> element=' + JSON.stringify(element)); - console.log('ACTS_ExtensionSingleUserModel_1600 onConnectCallback====> remote=' + JSON.stringify(remote)); - } - function onDisconnectCallbackC(element) { - console.log('onDisconnectCallback====> element=' + JSON.stringify(element)); - } - function onFailedCallbackC(code) { - console.log('ACTS_ExtensionSingleUserModel_1600====>ACTS_ConnectAbility ' + - 'ConnectAbility onFailed errCode : ' + code) - } - - /** - *@tc.number: ACTS_ExtensionSingleUserModel_1600 - *@tc.name: Support singleuser operation mode - *@tc.desc:When singleuser is false under the system application, other users that do not exist - * tart a serviceability - */ - it('ACTS_ExtensionSingleUserModel_1600', 0, async function(done){ - console.log("ACTS_ExtensionSingleUserModel_1600====>callback start====>"); - - try { - let connId; - console.debug("====>start connectAbilityWithAccount====>"); - connId = globalThis.abilityContext.connectAbilityWithAccount( - { - bundleName: "com.singleusermodel.actssingleusertest", - abilityName: "ServiceAbility3", - action: "StartAbilityPromise" - }, - null, - { - onConnect: onConnectCallbackC, - onDisconnect: onDisconnectCallbackC, - onFailed: onFailedCallbackC, - } - ); - console.log('ACTS_ExtensionSingleUserModel_1600====>StartConnectNative ' + - 'connectAbilityWithAccount connId : ' + connId); - } catch (err) { - let e = err.toString() - let errLog = "Invalid input parameter" - console.debug("====>e====>" + e); - expect(e.indexOf(errLog) >= 0).assertTrue() - } - - setTimeout(async()=> { - let abilityDelegator = undefined - abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() - let temp - let cmd ='aa dump -e' - await abilityDelegator.executeShellCommand(cmd).then((data) => { - console.info('executeShellCommand : err : ' + JSON.stringify(err)); - console.info('executeShellCommand : data : ' + JSON.stringify(data)); - temp = data["stdResult"]; - expect(temp.indexOf("ServiceAbility3") == -1).assertTrue() - console.info('executeShellCommand : data : ' + data.exitCode); - }).catch((err) => { - console.info('executeShellCommand : err : ' + JSON.stringify(err)); - }) - cmd ='aa dump -e -u 0' - await abilityDelegator.executeShellCommand(cmd).then((data) => { - console.info('executeShellCommand 0: err : ' + JSON.stringify(err)); - console.info('executeShellCommand : data 0: ' + JSON.stringify(data)); - temp = data["stdResult"]; - expect(temp.indexOf("ServiceAbility3") == -1).assertTrue() - console.info('executeShellCommand 0: data : ' + data.exitCode); - }).catch((err) => { - console.info('executeShellCommand : err : ' + JSON.stringify(err)); - }) - console.debug('ACTS_ExtensionSingleUserModel_1600====>timeout====>'); - },START_ABILITY_TIMEOUT); - setTimeout(()=>{ - console.debug('ACTS_ExtensionSingleUserModel_1600====>done====>'); - done(); - },ABILITY_TIMEOUT) - }) - - function onConnectCallbackD(element, remote) { - console.log('ACTS_ExtensionSingleUserModel_1700 onConnectCallback====> element=' + JSON.stringify(element)); - console.log('ACTS_ExtensionSingleUserModel_1700 onConnectCallback====> remote=' + JSON.stringify(remote)); - } - function onDisconnectCallbackD(element) { - console.log('onDisconnectCallback====> element=' + JSON.stringify(element)); - } - function onFailedCallbackD(code) { - console.log('ACTS_ExtensionSingleUserModel_1700====>ACTS_ConnectAbility ' + - 'ConnectAbility onFailed errCode : ' + code) - } - - /** - *@tc.number: ACTS_ExtensionSingleUserModel_1700 - *@tc.name: Support singleuser operation mode - *@tc.desc:When singleuser is false, create an ability page with the current user under the influence of - * the system - */ - it('ACTS_ExtensionSingleUserModel_1700', 0, async function(done){ - console.log("ACTS_ExtensionSingleUserModel_1700====>callback start====>") - let connId; - console.debug("====>start connectAbilityWithAccount====>"); - connId = globalThis.abilityContext.connectAbilityWithAccount( - { - bundleName: "com.singleusermodel.actssingleusertest", - abilityName: "ServiceAbility4", - action: "StartAbilityPromise" - }, - user102, - { - onConnect: onConnectCallbackD, - onDisconnect: onDisconnectCallbackD, - onFailed: onFailedCallbackD, - } - ); - console.log('ACTS_ExtensionSingleUserModel_1700====>StartConnectNative ' + - 'connectAbilityWithAccount connId : ' + connId); - setTimeout(async()=>{ - let abilityDelegator = undefined - abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() - let temp - let cmd ='aa dump -e' - await abilityDelegator.executeShellCommand(cmd).then((data) => { - console.info('executeShellCommand : err : ' + JSON.stringify(err)); - console.info('executeShellCommand : data : ' + JSON.stringify(data)); - temp = data["stdResult"]; - expect(temp.indexOf("ServiceAbility4") == -1).assertTrue() - console.info('executeShellCommand : data : ' + data.exitCode); - }).catch((err) => { - console.info('executeShellCommand : err : ' + JSON.stringify(err)); - }) - cmd ='aa dump -e -u 0' - await abilityDelegator.executeShellCommand(cmd).then((data) => { - console.info('executeShellCommand 0: err : ' + JSON.stringify(err)); - console.info('executeShellCommand : data 0: ' + JSON.stringify(data)); - temp = data["stdResult"]; - expect(temp.indexOf("ServiceAbility4") == -1).assertTrue() - console.info('executeShellCommand 0: data : ' + data.exitCode); - }).catch((err) => { - console.info('executeShellCommand : err : ' + JSON.stringify(err)); - }) - console.debug('ACTS_ExtensionSingleUserModel_1700====>timeout====>'); - },START_ABILITY_TIMEOUT); - setTimeout(()=>{ - console.debug('ACTS_ExtensionSingleUserModel_1700====>done====>'); - done(); - },ABILITY_TIMEOUT) - }) - - function onConnectCallbackE(element, remote) { - console.log('ACTS_ExtensionSingleUserModel_1900 onConnectCallback====> element=' + JSON.stringify(element)); - console.log('ACTS_ExtensionSingleUserModel_1900 onConnectCallback====> remote=' + JSON.stringify(remote)); - } - function onDisconnectCallbackE(element) { - console.log('onDisconnectCallback====> element=' + JSON.stringify(element)); - } - function onFailedCallbackE(code) { - console.log('ACTS_ExtensionSingleUserModel_1900====>ACTS_ConnectAbility ' + - 'ConnectAbility onFailed errCode : ' + code) - } - - /** - *@tc.number: ACTS_ExtensionSingleUserModel_1900 - *@tc.name: Support singleuser operation mode - *@tc.desc:When singleuser is false under the system application, other users that do not exist - * tart a serviceability - */ - it('ACTS_ExtensionSingleUserModel_1900', 0, async function(done){ - console.log("ACTS_ExtensionSingleUserModel_1900====>callback start====>"); - - try { - let connId; - connId = globalThis.abilityContext.connectAbilityWithAccount( - { - bundleName: "com.singleusermodel.actssingleusertest", - abilityName: "ServiceAbility5", - action: "StartAbilityPromise" - }, - undefined, - { - onConnect: onConnectCallbackE, - onDisconnect: onDisconnectCallbackE, - onFailed: onFailedCallbackE, - } - ); - console.log('ACTS_ExtensionSingleUserModel_1900====>StartConnectNative ' + - 'connectAbilityWithAccount connId : ' + connId); - } catch (err) { - let e = err.toString() - let errLog = "Invalid input parameter" - console.debug("====>e====>" + e); - expect(e.indexOf(errLog) >= 0).assertTrue() - } - - setTimeout(async()=> { - let abilityDelegator = undefined - abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() - let temp - let cmd ='aa dump -e' - await abilityDelegator.executeShellCommand(cmd).then((data) => { - console.info('executeShellCommand : err : ' + JSON.stringify(err)); - console.info('executeShellCommand : data : ' + JSON.stringify(data)); - temp = data["stdResult"]; - expect(temp.indexOf("ServiceAbility5") == -1).assertTrue() - console.info('executeShellCommand : data : ' + data.exitCode); - }).catch((err) => { - console.info('executeShellCommand : err : ' + JSON.stringify(err)); - }) - cmd ='aa dump -e -u 0' - await abilityDelegator.executeShellCommand(cmd).then((data) => { - console.info('executeShellCommand 0: err : ' + JSON.stringify(err)); - console.info('executeShellCommand : data 0: ' + JSON.stringify(data)); - temp = data["stdResult"]; - expect(temp.indexOf("ServiceAbility5") == -1).assertTrue() - console.info('executeShellCommand 0: data : ' + data.exitCode); - }).catch((err) => { - console.info('executeShellCommand : err : ' + JSON.stringify(err)); - }) - console.debug('ACTS_ExtensionSingleUserModel_1900====>timeout====>'); - },START_ABILITY_TIMEOUT); - setTimeout(()=>{ - console.debug('ACTS_ExtensionSingleUserModel_1900====>done====>'); - done(); - },ABILITY_TIMEOUT) - }) - }) -} \ No newline at end of file diff --git a/ability/ability_runtime/actssingleton/SystemSingletonExtensionFalse/entry/src/main/ets/test/List.test.ets b/ability/ability_runtime/actssingleton/SystemSingletonExtensionFalse/entry/src/main/ets/test/List.test.ets deleted file mode 100644 index 8c59c40c4e3887023fe8b8a910334f52d9234ca8..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actssingleton/SystemSingletonExtensionFalse/entry/src/main/ets/test/List.test.ets +++ /dev/null @@ -1,20 +0,0 @@ -/* - * 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 singleusermodelTest from './Ability.test' - -export default function testsuite() { - singleusermodelTest() -} \ No newline at end of file diff --git a/ability/ability_runtime/actssingleton/SystemSingletonExtensionFalse/entry/src/main/module.json b/ability/ability_runtime/actssingleton/SystemSingletonExtensionFalse/entry/src/main/module.json deleted file mode 100644 index c87da7251c9700dfaa7e05adfacffc579394fccd..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actssingleton/SystemSingletonExtensionFalse/entry/src/main/module.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "module": { - "name": "entry", - "type": "entry", - "srcEntrance": "./ets/Application/AbilityStage.ts", - "description": "$string:entry_desc", - "mainElement": "MainAbility", - "deviceTypes": [ - "default", - "tablet" - ], - "deliveryWithInstall": true, - "installationFree": false, - "pages": "$profile:main_pages", - "uiSyntax": "ets", - "abilities": [ - { - "name": "MainAbility", - "srcEntrance": "./ets/MainAbility/MainAbility.ts", - "description": "$string:MainAbility_desc", - "icon": "$media:icon", - "label": "$string:MainAbility_label", - "visible": true, - "skills": [ - { - "actions": [ - "action.system.home" - ], - "entities": [ - "entity.system.home" - ] - } - ] - } - ], - "extensionAbilities": [ - { - "name": "ServiceAbility1", - "srcEntrance": "./ets/ServiceAbility1/ServiceAbility1.ts", - "label": "$string:form_ServiceAbility1_label", - "description": "$string:form_ServiceAbility1_desc", - "type": "service|dataShare" - }, - { - "name": "ServiceAbility2", - "srcEntrance": "./ets/ServiceAbility2/ServiceAbility2.ts", - "label": "$string:form_ServiceAbility1_label", - "description": "$string:form_ServiceAbility1_desc", - "type": "service|dataShare" - }, - { - "name": "ServiceAbility3", - "srcEntrance": "./ets/ServiceAbility3/ServiceAbility3.ts", - "label": "$string:form_ServiceAbility1_label", - "description": "$string:form_ServiceAbility1_desc", - "type": "service|dataShare" - }, - { - "name": "ServiceAbility4", - "srcEntrance": "./ets/ServiceAbility4/ServiceAbility4.ts", - "label": "$string:form_ServiceAbility1_label", - "description": "$string:form_ServiceAbility1_desc", - "type": "service|dataShare" - }, - { - "name": "ServiceAbility5", - "srcEntrance": "./ets/ServiceAbility5/ServiceAbility5.ts", - "label": "$string:form_ServiceAbility1_label", - "description": "$string:form_ServiceAbility1_desc", - "type": "service|dataShare" - } - ] - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actssingleton/SystemSingletonExtensionFalse/entry/src/main/resources/base/element/string.json b/ability/ability_runtime/actssingleton/SystemSingletonExtensionFalse/entry/src/main/resources/base/element/string.json deleted file mode 100644 index 1139969f5128a1fd647bd758c41e7f947968a822..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actssingleton/SystemSingletonExtensionFalse/entry/src/main/resources/base/element/string.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "string": [ - { - "name": "entry_desc", - "value": "description" - }, - { - "name": "MainAbility_desc", - "value": "description" - }, - { - "name": "MainAbility_label", - "value": "label" - }, - { - "name": "form_ServiceAbility1_desc", - "value": "form_description" - }, - { - "name": "form_ServiceAbility1_label", - "value": "form_label" - }, - { - "name": "form_ServiceAbility2_desc", - "value": "form_description" - }, - { - "name": "form_ServiceAbility2_label", - "value": "form_label" - }, - { - "name": "form_ServiceAbility3_desc", - "value": "form_description" - }, - { - "name": "form_ServiceAbility3_label", - "value": "form_label" - }, - { - "name": "form_ServiceAbility4_desc", - "value": "form_description" - }, - { - "name": "form_ServiceAbility4_label", - "value": "form_label" - }, - { - "name": "form_ServiceAbility5_desc", - "value": "form_description" - }, - { - "name": "form_ServiceAbility5_label", - "value": "form_label" - } - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/actssingleton/SystemSingletonExtensionFalse/entry/src/main/resources/base/media/icon.png b/ability/ability_runtime/actssingleton/SystemSingletonExtensionFalse/entry/src/main/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actssingleton/SystemSingletonExtensionFalse/entry/src/main/resources/base/media/icon.png and /dev/null differ diff --git a/ability/ability_runtime/actssingleton/SystemSingletonExtensionFalse/entry/src/main/resources/base/profile/main_pages.json b/ability/ability_runtime/actssingleton/SystemSingletonExtensionFalse/entry/src/main/resources/base/profile/main_pages.json deleted file mode 100644 index feec276e105eeb8d621c20aaf838f318b0a94150..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actssingleton/SystemSingletonExtensionFalse/entry/src/main/resources/base/profile/main_pages.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "src": [ - "pages/index" - ] -} diff --git a/ability/ability_runtime/actssingleton/SystemSingletonExtensionFalse/signature/openharmony_sx.p7b b/ability/ability_runtime/actssingleton/SystemSingletonExtensionFalse/signature/openharmony_sx.p7b deleted file mode 100644 index 66b4457a8a81fb8d3356cf46d67226c850944858..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actssingleton/SystemSingletonExtensionFalse/signature/openharmony_sx.p7b and /dev/null differ diff --git a/ability/ability_runtime/actssingleton/SystemSingletonFalse/signature/openharmony_sx.p7b b/ability/ability_runtime/actssingleton/SystemSingletonFalse/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/actssingleton/SystemSingletonFalse/signature/openharmony_sx.p7b and b/ability/ability_runtime/actssingleton/SystemSingletonFalse/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/actssingleton/ThirdSingleton/signature/openharmony_sx.p7b b/ability/ability_runtime/actssingleton/ThirdSingleton/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/actssingleton/ThirdSingleton/signature/openharmony_sx.p7b and b/ability/ability_runtime/actssingleton/ThirdSingleton/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/actssingleton/ThirdSingletonExtension/AppScope/app.json b/ability/ability_runtime/actssingleton/ThirdSingletonExtension/AppScope/app.json deleted file mode 100644 index 7a443e9b58b85d824c83f3aadb09708c0d4e7eb5..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actssingleton/ThirdSingletonExtension/AppScope/app.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "app": { - "bundleName": "com.singleusermodel.actssingleusertest", - "vendor": "example", - "versionCode": 1000000, - "versionName": "1.0.0", - "icon": "$media:app_icon", - "label": "$string:app_name", - "distributedNotificationEnabled": true, - "singleton":false, - "keepAlive" : true, - "singleUser": true, - "minAPIVersion": 9, - "targetAPIVersion": 9, - "car": { - "apiCompatibleVersion": 9, - "singleUser": false - } - } -} diff --git a/ability/ability_runtime/actssingleton/ThirdSingletonExtension/AppScope/resources/base/element/string.json b/ability/ability_runtime/actssingleton/ThirdSingletonExtension/AppScope/resources/base/element/string.json deleted file mode 100644 index 21e7dfda534dfe9e4b4eba1273fbe02aa6e9f982..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actssingleton/ThirdSingletonExtension/AppScope/resources/base/element/string.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "string": [ - { - "name": "app_name", - "value": "ThirdPartyExtensionB" - } - ] -} diff --git a/ability/ability_runtime/actssingleton/ThirdSingletonExtension/AppScope/resources/base/media/app_icon.png b/ability/ability_runtime/actssingleton/ThirdSingletonExtension/AppScope/resources/base/media/app_icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actssingleton/ThirdSingletonExtension/AppScope/resources/base/media/app_icon.png and /dev/null differ diff --git a/ability/ability_runtime/actssingleton/ThirdSingletonExtension/BUILD.gn b/ability/ability_runtime/actssingleton/ThirdSingletonExtension/BUILD.gn deleted file mode 100644 index fdc50c71f7879adcb8cf8172c53f2444b084a27f..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actssingleton/ThirdSingletonExtension/BUILD.gn +++ /dev/null @@ -1,43 +0,0 @@ -# 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_js_hap_suite("ActsThirdSingletonExtensionTest") { - hap_profile = "entry/src/main/module.json" - js_build_mode = "debug" - deps = [ - ":thirdsingletonextension_js_assets", - ":thirdsingletonextension_resources", - ] - ets2abc = true - certificate_profile = "signature/openharmony_sx.p7b" - hap_name = "ActsThirdSingletonExtensionTest" - subsystem_name = "ability" - part_name = "ability_runtime" -} - -ohos_app_scope("thirdsingletonextension_app_profile") { - app_profile = "AppScope/app.json" - sources = [ "AppScope/resources" ] -} - -ohos_js_assets("thirdsingletonextension_js_assets") { - source_dir = "entry/src/main/ets" -} - -ohos_resources("thirdsingletonextension_resources") { - sources = [ "entry/src/main/resources" ] - deps = [ ":thirdsingletonextension_app_profile" ] - hap_profile = "entry/src/main/module.json" -} diff --git a/ability/ability_runtime/actssingleton/ThirdSingletonExtension/Test.json b/ability/ability_runtime/actssingleton/ThirdSingletonExtension/Test.json deleted file mode 100644 index 7cbf262b7c812f7eb0c21c7000b55678fc545113..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actssingleton/ThirdSingletonExtension/Test.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "description": "Configuration for aceceshi Tests", - "driver": { - "type": "OHJSUnitTest", - "test-timeout": "600000", - "bundle-name": "com.singleusermodel.actssingleusertest", - "module-name": "entry", - "shell-timeout": "600000", - "testcase-timeout": "10000" - }, - "kits": [ - { - "type": "ShellKit", - "run-command": [ - "acm create -n 101 -t normal" - ], - "teardown-command":[ - "acm delete -i 101" - ] - }, - { - "type": "PushKit", - "push": [ - "ActsThirdSingletonExtensionTest.hap->/data/ActsThirdSingletonExtensionTest.hap" - ] - }, - { - "test-file-name": [ - "ActsThirdSingletonExtensionTest.hap" - ], - "type": "AppInstallKit", - "cleanup-apps": true - } - ] -} - diff --git a/ability/ability_runtime/actssingleton/ThirdSingletonExtension/entry/src/main/ets/Application/AbilityStage.ts b/ability/ability_runtime/actssingleton/ThirdSingletonExtension/entry/src/main/ets/Application/AbilityStage.ts deleted file mode 100644 index 6ceb0c290ae831a45143a5e2b42d4351f2fc3d7e..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actssingleton/ThirdSingletonExtension/entry/src/main/ets/Application/AbilityStage.ts +++ /dev/null @@ -1,21 +0,0 @@ -/* - * 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" - -export default class MyAbilityStage extends AbilityStage { - onCreate() { - console.log("[Demo] MyAbilityStage onCreate") - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actssingleton/ThirdSingletonExtension/entry/src/main/ets/MainAbility/MainAbility.ts b/ability/ability_runtime/actssingleton/ThirdSingletonExtension/entry/src/main/ets/MainAbility/MainAbility.ts deleted file mode 100644 index f4b4d0da22df2a680983a51cd8daf653cf140d6c..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actssingleton/ThirdSingletonExtension/entry/src/main/ets/MainAbility/MainAbility.ts +++ /dev/null @@ -1,54 +0,0 @@ -/* - * 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 AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry' -import { Hypium } from '@ohos/hypium' -import testsuite from '../test/List.test' - -export default class MainAbility extends Ability { - onCreate(want, launchParam) { - globalThis.abilityContext = this.context; - console.log('MainAbility onCreate') - var abilityDelegator: any - abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() - var abilityDelegatorArguments: any - abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments() - console.info('start run testcase!!!') - Hypium.hypiumTest(abilityDelegator, abilityDelegatorArguments, testsuite) - } - - onDestroy() { - console.log('MainAbility onDestroy') - } - - onWindowStageCreate(windowStage) { - console.log('MainAbility onWindowStageCreate') - windowStage.setUIContent(this.context, 'MainAbility/pages/index', null) - - - } - - onWindowStageDestroy() { - console.log('MainAbility onWindowStageDestroy') - } - - onForeground() { - console.log('MainAbility onForeground') - } - - onBackground() { - console.log('MainAbility onBackground') - } -}; diff --git a/ability/ability_runtime/actssingleton/ThirdSingletonExtension/entry/src/main/ets/MainAbility/pages/index.ets b/ability/ability_runtime/actssingleton/ThirdSingletonExtension/entry/src/main/ets/MainAbility/pages/index.ets deleted file mode 100644 index ba39ca0b8a7b5945c39305a283fa45295b384511..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actssingleton/ThirdSingletonExtension/entry/src/main/ets/MainAbility/pages/index.ets +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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 '@ohos.router'; - -@Entry -@Component -struct Index { - aboutToAppear() { - console.info('MainAbility index aboutToAppear') - } - @State message: string = 'Hello World' - build() { - Row() { - Column() { - Text(this.message) - .fontSize(50) - .fontWeight(FontWeight.Bold) - Button() { - Text('next page') - .fontSize(20) - .fontWeight(FontWeight.Bold) - }.type(ButtonType.Capsule) - .margin({ - top: 20 - }) - .backgroundColor('#0D9FFB') - .width('35%') - .height('5%') - .onClick(()=>{ - }) - } - .width('100%') - } - .height('100%') - } - } \ No newline at end of file diff --git a/ability/ability_runtime/actssingleton/ThirdSingletonExtension/entry/src/main/ets/ServiceAbility1/ServiceAbility1.ts b/ability/ability_runtime/actssingleton/ThirdSingletonExtension/entry/src/main/ets/ServiceAbility1/ServiceAbility1.ts deleted file mode 100644 index 10b73e73a6cc4154e7ae971c47ef8cb8a2c9548e..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actssingleton/ThirdSingletonExtension/entry/src/main/ets/ServiceAbility1/ServiceAbility1.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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 rpc from '@ohos.rpc'; -import ServiceExtension from '@ohos.application.ServiceExtensionAbility' - -export default class ServiceAbility1 extends ServiceExtension { - onCreate(want) { - console.log('ServiceAbility1 onCreate, want: ' + want.abilityName); - } - - onRequest(want, startId) { - console.log('ServiceAbility1 onRequest, want: ' + want.abilityName + ', startId: ' + startId); - } - - onConnect(want) { - console.log('ServiceAbility1 onConnect, want:' + want.abilityName); - if (want.action == 'StartAbilityPromise') { - console.log('stub SerivceAbilityServer OnConnect start 1'); - return new rpc.RemoteObject('ServiceAbility1'); - } - } - - onDisconnect(want) { - console.log('ServiceAbility1 onDisconnect, want:' + want.abilityName); - } - - onDestroy() { - console.log('ServiceAbility1 onDestroy'); - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actssingleton/ThirdSingletonExtension/entry/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts b/ability/ability_runtime/actssingleton/ThirdSingletonExtension/entry/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts deleted file mode 100644 index 1762cda6dd8f03996989e42dfeb364161e91c0b7..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actssingleton/ThirdSingletonExtension/entry/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts +++ /dev/null @@ -1,75 +0,0 @@ -/* -* 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 TestRunner from '@ohos.application.testRunner' -import AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry' - -var abilityDelegator = undefined -var abilityDelegatorArguments = undefined - -function translateParamsToString(parameters) { - const keySet = new Set([ - '-s class', '-s notClass', '-s suite', '-s it', - '-s level', '-s testType', '-s size', '-s timeout', - '-s dryRun' - ]) - let targetParams = ''; - for (const key in parameters) { - if (keySet.has(key)) { - targetParams = `${targetParams} ${key} ${parameters[key]}` - } - } - return targetParams.trim() -} - -async function onAbilityCreateCallback() { - console.log("onAbilityCreateCallback"); -} - -async function addAbilityMonitorCallback(err: any) { - console.info("addAbilityMonitorCallback : " + JSON.stringify(err)) -} - -export default class OpenHarmonyTestRunner implements TestRunner { - constructor() { - } - - onPrepare() { - console.info("OpenHarmonyTestRunner OnPrepare ") - } - - async onRun() { - console.log('OpenHarmonyTestRunner onRun run') - abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments() - abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() - globalThis.abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() - var MainAbilityName = abilityDelegatorArguments.bundleName + '.MainAbility' - let lMonitor = { - abilityName: MainAbilityName, - onAbilityCreate: onAbilityCreateCallback, - }; - abilityDelegator.addAbilityMonitor(lMonitor, addAbilityMonitorCallback) - var cmd = 'aa start -d 0 -a MainAbility' + ' -b ' + abilityDelegatorArguments.bundleName - cmd += ' '+translateParamsToString(abilityDelegatorArguments.parameters) - console.info('cmd : '+cmd) - abilityDelegator.executeShellCommand(cmd, - (err: any, d: any) => { - console.info('executeShellCommand : err : ' + JSON.stringify(err)); - console.info('executeShellCommand : data : ' + d.stdResult); - console.info('executeShellCommand : data : ' + d.exitCode); - }) - console.info('OpenHarmonyTestRunner onRun end') - } -}; \ No newline at end of file diff --git a/ability/ability_runtime/actssingleton/ThirdSingletonExtension/entry/src/main/ets/pages/index.ets b/ability/ability_runtime/actssingleton/ThirdSingletonExtension/entry/src/main/ets/pages/index.ets deleted file mode 100644 index 0fe7cdfafd92a8824eb8aa5bf92539bee63a2904..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actssingleton/ThirdSingletonExtension/entry/src/main/ets/pages/index.ets +++ /dev/null @@ -1,31 +0,0 @@ -/* - * 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. - */ -@Entry -@Component -struct Index { - @State message: string = 'Hello World' - - build() { - Row() { - Column() { - Text(this.message) - .fontSize(50) - .fontWeight(FontWeight.Bold) - } - .width('100%') - } - .height('100%') - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actssingleton/ThirdSingletonExtension/entry/src/main/ets/test/Ability.test.ets b/ability/ability_runtime/actssingleton/ThirdSingletonExtension/entry/src/main/ets/test/Ability.test.ets deleted file mode 100644 index 43e4ce151b5f926d8576330dd4f062a40ed7bd90..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actssingleton/ThirdSingletonExtension/entry/src/main/ets/test/Ability.test.ets +++ /dev/null @@ -1,100 +0,0 @@ -/* - * 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. - */ -// @ts-nocheck -import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium' -import AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry' - -const START_ABILITY_TIMEOUT = 3000; -const ABILITY_TIMEOUT = 5000; - -export default function singleusermodelTest() { - describe('ActsSingleUserTest', function () { - var user100 = 100 - function onConnectCallback(element, remote) { - console.log("ACTS_ExtensionSingleUserModel_1800====>callback start====>") - console.log('ACTS_ExtensionSingleUserModel_1800 onConnectCallback====> element=' + JSON.stringify(element)); - console.log('ACTS_ExtensionSingleUserModel_1800 onConnectCallback====> remote=' + JSON.stringify(remote)); - } - - function onDisconnectCallback(element) { - console.log('ACTS_ConnectAbility onDisconnectCallback') - } - - function onFailedCallback(code) { - console.log('ACTS_ConnectAbility ConnectAbility onFailed errCode : ' + code) - } - /** - *@tc.number: ACTS_ExtensionSingleUserModel_1800 - *@tc.name: Support singleuser operation mode - *@tc.desc:When singleuser not set under the third-party application, the current user starts a serviceability - */ - it('ACTS_ExtensionSingleUserModel_1800', 0, async function (done) { - let abilityDelegator = undefined - abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() - console.log("ACTS_ExtensionSingleUserModel_1800====>callback start====>") - let connId; - - console.debug("====>start connectAbilityWithAccount====>"); - console.info('executeShellCommand : globalThis.abilityContext : ' + - JSON.stringify(globalThis.abilityContext)); - connId = await globalThis.abilityContext.connectAbilityWithAccount( - { - bundleName: "com.singleusermodel.actssingleusertest", - abilityName: "ServiceAbility1", - action: "StartAbilityPromise" - }, - user100, - { - onConnect: onConnectCallback, - onDisconnect: onDisconnectCallback, - onFailed: onFailedCallback, - } - ); - console.log('StartConnectNative ConnectAbility connId : ' + connId); - setTimeout(async () => { - let temp - var cmd = 'aa dump -e' - await abilityDelegator.executeShellCommand(cmd).then((data) => { - console.info('executeShellCommand : data : ' + JSON.stringify(data)); - temp = data["stdResult"]; - expect(temp.indexOf("ServiceAbility1") >= 0).assertTrue() - console.info('executeShellCommand : data : ' + data.exitCode); - }) - .catch((err) => { - console.info('executeShellCommand 0: err : ' + JSON.stringify(err)); - }) - cmd = 'aa dump -e -u 0' - await abilityDelegator.executeShellCommand(cmd).then((data) => { - console.info('executeShellCommand 0: data : ' + JSON.stringify(data)); - temp = data["stdResult"]; - expect(temp.indexOf("ServiceAbility1") == -1).assertTrue() - console.info('executeShellCommand 0: data : ' + data.exitCode); - }).catch((err) => { - console.info('executeShellCommand 0: err : ' + JSON.stringify(err)); - }) - globalThis.ability2Context.terminateSelf(); - console.debug('ACTS_ExtensionSingleUserModel_1800====>timeout====>'); - globalThis.abilityContex.disconnectAbility(connId).then((data, err) => { - console.debug("====>data is====>" + JSON.stringify(data)); - console.debug("====>err is====>" + JSON.stringify(err)); - }) - }, START_ABILITY_TIMEOUT); - setTimeout(() => { - console.debug('ACTS_ExtensionSingleUserModel_1800====>done====>'); - done(); - }, ABILITY_TIMEOUT) - }) - }) -} \ No newline at end of file diff --git a/ability/ability_runtime/actssingleton/ThirdSingletonExtension/entry/src/main/ets/test/List.test.ets b/ability/ability_runtime/actssingleton/ThirdSingletonExtension/entry/src/main/ets/test/List.test.ets deleted file mode 100644 index 6a8ae1d4f7a89fc330d0e7bfe8129a88ef648d41..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actssingleton/ThirdSingletonExtension/entry/src/main/ets/test/List.test.ets +++ /dev/null @@ -1,19 +0,0 @@ -/* - * 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 singleusermodelTest from '../test/Ability.test' - -export default function testsuite() { - singleusermodelTest() -} \ No newline at end of file diff --git a/ability/ability_runtime/actssingleton/ThirdSingletonExtension/entry/src/main/module.json b/ability/ability_runtime/actssingleton/ThirdSingletonExtension/entry/src/main/module.json deleted file mode 100644 index c0886534bbc4e2a1a3fe91c99266e6a13bec49f7..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actssingleton/ThirdSingletonExtension/entry/src/main/module.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "module": { - "name": "entry", - "type": "entry", - "srcEntrance": "./ets/Application/AbilityStage.ts", - "description": "$string:entry_desc", - "mainElement": "MainAbility", - "deviceTypes": [ - "default", - "tablet" - ], - "deliveryWithInstall": true, - "installationFree": false, - "pages": "$profile:main_pages", - "uiSyntax": "ets", - "abilities": [ - { - "name": "MainAbility", - "srcEntrance": "./ets/MainAbility/MainAbility.ts", - "description": "$string:MainAbility_desc", - "icon": "$media:icon", - "label": "$string:MainAbility_label", - "visible": true, - "skills": [ - { - "actions": [ - "action.system.home" - ], - "entities": [ - "entity.system.home" - ] - } - ] - } - ], - "extensionAbilities": [ - { - "name": "ServiceAbility1", - "srcEntrance": "./ets/ServiceAbility1/ServiceAbility1.ts", - "label": "$string:form_ServiceAbility1_label", - "description": "$string:form_ServiceAbility1_desc", - "type": "service|dataShare" - } - ] - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actssingleton/ThirdSingletonExtension/entry/src/main/resources/base/element/string.json b/ability/ability_runtime/actssingleton/ThirdSingletonExtension/entry/src/main/resources/base/element/string.json deleted file mode 100644 index bdb59a6c7282ea5b7bc1f6fc9b77a4a338b5c2c0..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actssingleton/ThirdSingletonExtension/entry/src/main/resources/base/element/string.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "string": [ - { - "name": "entry_desc", - "value": "description" - }, - { - "name": "MainAbility_desc", - "value": "description" - }, - { - "name": "MainAbility_label", - "value": "label" - }, - { - "name": "form_ServiceAbility1_desc", - "value": "form_description" - }, - { - "name": "form_ServiceAbility1_label", - "value": "form_label" - } - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/actssingleton/ThirdSingletonExtension/entry/src/main/resources/base/media/icon.png b/ability/ability_runtime/actssingleton/ThirdSingletonExtension/entry/src/main/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actssingleton/ThirdSingletonExtension/entry/src/main/resources/base/media/icon.png and /dev/null differ diff --git a/ability/ability_runtime/actssingleton/ThirdSingletonExtension/entry/src/main/resources/base/profile/form_config.json b/ability/ability_runtime/actssingleton/ThirdSingletonExtension/entry/src/main/resources/base/profile/form_config.json deleted file mode 100644 index eb1be756968a34e5b508588d108fb90318dfd2f6..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actssingleton/ThirdSingletonExtension/entry/src/main/resources/base/profile/form_config.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "forms": [ - { - "name": "ServiceAbility1", - "description": "This is a service widget.", - "src": "./js/ServiceAbility1/pages/index/index", - "window": { - "designWidth": 720, - "autoDesignWidth": true - }, - "colorMode": "auto", - "isDefault": true, - "updateEnabled": true, - "scheduledUpdateTime": "10:30", - "updateDuration": 1, - "defaultDimension": "2*2", - "supportDimensions": [ - "2*2" - ], - "formConfigAbility": "ability://xxxxx" - } - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/actssingleton/ThirdSingletonExtension/entry/src/main/resources/base/profile/main_pages.json b/ability/ability_runtime/actssingleton/ThirdSingletonExtension/entry/src/main/resources/base/profile/main_pages.json deleted file mode 100644 index feec276e105eeb8d621c20aaf838f318b0a94150..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actssingleton/ThirdSingletonExtension/entry/src/main/resources/base/profile/main_pages.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "src": [ - "pages/index" - ] -} diff --git a/ability/ability_runtime/actssingleton/ThirdSingletonExtension/signature/openharmony_sx.p7b b/ability/ability_runtime/actssingleton/ThirdSingletonExtension/signature/openharmony_sx.p7b deleted file mode 100644 index 66b4457a8a81fb8d3356cf46d67226c850944858..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actssingleton/ThirdSingletonExtension/signature/openharmony_sx.p7b and /dev/null differ diff --git a/ability/ability_runtime/actssingleton/ThirdSingletonExtensionFalse/AppScope/app.json b/ability/ability_runtime/actssingleton/ThirdSingletonExtensionFalse/AppScope/app.json deleted file mode 100644 index 23a134a95941fdcf6d61bed5f9df26a244311ed8..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actssingleton/ThirdSingletonExtensionFalse/AppScope/app.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "app": { - "bundleName": "com.singleusermodel.actssingleusertest", - "singleton": false, - "vendor": "example", - "versionCode": 1000000, - "versionName": "1.0.0", - "icon": "$media:app_icon", - "label": "$string:app_name", - "distributedNotificationEnabled": true, - "keepAlive" : true, - "singleUser": true, - "minAPIVersion": 9, - "targetAPIVersion": 9, - "car": { - "apiCompatibleVersion": 9, - "singleUser": false - } - } -} diff --git a/ability/ability_runtime/actssingleton/ThirdSingletonExtensionFalse/AppScope/resources/base/element/string.json b/ability/ability_runtime/actssingleton/ThirdSingletonExtensionFalse/AppScope/resources/base/element/string.json deleted file mode 100644 index 21e7dfda534dfe9e4b4eba1273fbe02aa6e9f982..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actssingleton/ThirdSingletonExtensionFalse/AppScope/resources/base/element/string.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "string": [ - { - "name": "app_name", - "value": "ThirdPartyExtensionB" - } - ] -} diff --git a/ability/ability_runtime/actssingleton/ThirdSingletonExtensionFalse/AppScope/resources/base/media/app_icon.png b/ability/ability_runtime/actssingleton/ThirdSingletonExtensionFalse/AppScope/resources/base/media/app_icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actssingleton/ThirdSingletonExtensionFalse/AppScope/resources/base/media/app_icon.png and /dev/null differ diff --git a/ability/ability_runtime/actssingleton/ThirdSingletonExtensionFalse/BUILD.gn b/ability/ability_runtime/actssingleton/ThirdSingletonExtensionFalse/BUILD.gn deleted file mode 100644 index 1c4879667f1853793a677d17ec6e2c9a2eb81aa8..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actssingleton/ThirdSingletonExtensionFalse/BUILD.gn +++ /dev/null @@ -1,43 +0,0 @@ -# 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_js_hap_suite("ActsThirdSingletonExtensionFalseTest") { - hap_profile = "entry/src/main/module.json" - js_build_mode = "debug" - deps = [ - ":thirdsingletonextensionfalse_js_assets", - ":thirdsingletonextensionfalse_resources", - ] - ets2abc = true - certificate_profile = "signature/openharmony_sx.p7b" - hap_name = "ActsThirdSingletonExtensionFalseTest" - subsystem_name = "ability" - part_name = "ability_runtime" -} - -ohos_app_scope("thirdsingletonextensionfalse_app_profile") { - app_profile = "AppScope/app.json" - sources = [ "AppScope/resources" ] -} - -ohos_js_assets("thirdsingletonextensionfalse_js_assets") { - source_dir = "entry/src/main/ets" -} - -ohos_resources("thirdsingletonextensionfalse_resources") { - sources = [ "entry/src/main/resources" ] - deps = [ ":thirdsingletonextensionfalse_app_profile" ] - hap_profile = "entry/src/main/module.json" -} diff --git a/ability/ability_runtime/actssingleton/ThirdSingletonExtensionFalse/Test.json b/ability/ability_runtime/actssingleton/ThirdSingletonExtensionFalse/Test.json deleted file mode 100644 index dccf91435bd1f2d746caeef8148fe6addf20365b..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actssingleton/ThirdSingletonExtensionFalse/Test.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "description": "Configuration for aceceshi Tests", - "driver": { - "type": "OHJSUnitTest", - "test-timeout": "600000", - "bundle-name": "com.singleusermodel.actssingleusertest", - "module-name": "entry", - "shell-timeout": "600000", - "testcase-timeout": "10000" - }, - "kits": [ - { - "type": "ShellKit", - "run-command": [ - "acm create -n 101 -t normal" - ], - "teardown-command":[ - "acm delete -i 101" - ] - }, - { - "type": "PushKit", - "push": [ - "ActsThirdSingletonExtensionFalseTest.hap->/data/ActsThirdSingletonExtensionFalseTest.hap" - ] - }, - { - "test-file-name": [ - "ActsThirdSingletonExtensionFalseTest.hap" - ], - "type": "AppInstallKit", - "cleanup-apps": true - } - ] -} - diff --git a/ability/ability_runtime/actssingleton/ThirdSingletonExtensionFalse/entry/src/main/ets/Application/AbilityStage.ts b/ability/ability_runtime/actssingleton/ThirdSingletonExtensionFalse/entry/src/main/ets/Application/AbilityStage.ts deleted file mode 100644 index 6ceb0c290ae831a45143a5e2b42d4351f2fc3d7e..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actssingleton/ThirdSingletonExtensionFalse/entry/src/main/ets/Application/AbilityStage.ts +++ /dev/null @@ -1,21 +0,0 @@ -/* - * 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" - -export default class MyAbilityStage extends AbilityStage { - onCreate() { - console.log("[Demo] MyAbilityStage onCreate") - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actssingleton/ThirdSingletonExtensionFalse/entry/src/main/ets/MainAbility/MainAbility.ts b/ability/ability_runtime/actssingleton/ThirdSingletonExtensionFalse/entry/src/main/ets/MainAbility/MainAbility.ts deleted file mode 100644 index fee691e92c9d08a214dc0c89bb7a9309fdbb8065..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actssingleton/ThirdSingletonExtensionFalse/entry/src/main/ets/MainAbility/MainAbility.ts +++ /dev/null @@ -1,52 +0,0 @@ -/* - * 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 AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry' -import { Hypium } from '@ohos/hypium' -import testsuite from '../test/List.test' - -export default class MainAbility extends Ability { - onCreate(want, launchParam) { - globalThis.abilityContext = this.context; - console.log('MainAbility onCreate') - var abilityDelegator: any - abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() - var abilityDelegatorArguments: any - abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments() - console.info('start run testcase!!!') - Hypium.hypiumTest(abilityDelegator, abilityDelegatorArguments, testsuite) - } - - onDestroy() { - console.log('MainAbility onDestroy') - } - - onWindowStageCreate(windowStage) { - console.log('MainAbility onWindowStageCreate') - windowStage.setUIContent(this.context, 'MainAbility/pages/index', null) - } - - onWindowStageDestroy() { - console.log('MainAbility onWindowStageDestroy') - } - - onForeground() { - console.log('MainAbility onForeground') - } - - onBackground() { - console.log('MainAbility onBackground') - } -}; diff --git a/ability/ability_runtime/actssingleton/ThirdSingletonExtensionFalse/entry/src/main/ets/MainAbility/pages/index.ets b/ability/ability_runtime/actssingleton/ThirdSingletonExtensionFalse/entry/src/main/ets/MainAbility/pages/index.ets deleted file mode 100644 index ba39ca0b8a7b5945c39305a283fa45295b384511..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actssingleton/ThirdSingletonExtensionFalse/entry/src/main/ets/MainAbility/pages/index.ets +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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 '@ohos.router'; - -@Entry -@Component -struct Index { - aboutToAppear() { - console.info('MainAbility index aboutToAppear') - } - @State message: string = 'Hello World' - build() { - Row() { - Column() { - Text(this.message) - .fontSize(50) - .fontWeight(FontWeight.Bold) - Button() { - Text('next page') - .fontSize(20) - .fontWeight(FontWeight.Bold) - }.type(ButtonType.Capsule) - .margin({ - top: 20 - }) - .backgroundColor('#0D9FFB') - .width('35%') - .height('5%') - .onClick(()=>{ - }) - } - .width('100%') - } - .height('100%') - } - } \ No newline at end of file diff --git a/ability/ability_runtime/actssingleton/ThirdSingletonExtensionFalse/entry/src/main/ets/ServiceAbility1/ServiceAbility1.ts b/ability/ability_runtime/actssingleton/ThirdSingletonExtensionFalse/entry/src/main/ets/ServiceAbility1/ServiceAbility1.ts deleted file mode 100644 index 1caa7c556137795865e891b6e6b118bf69106f44..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actssingleton/ThirdSingletonExtensionFalse/entry/src/main/ets/ServiceAbility1/ServiceAbility1.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* - * 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 rpc from '@ohos.rpc'; -import ServiceExtension from '@ohos.application.ServiceExtensionAbility' - -export default class ServiceAbility1 extends ServiceExtension { - onCreate(want) { - console.log('ServiceAbility1 onCreate, want: ' + want.abilityName); - } - - onRequest(want, startId) { - console.log('ServiceAbility1 onRequest, want: ' + want.abilityName + ', startId: ' + startId); - } - - onConnect(want) { - console.log('ServiceAbility1 onConnect, want:' + want.abilityName); - if (want.action == 'StartAbilityPromise') { - return new rpc.RemoteObject('ServiceAbility1'); - } - } - - onDisconnect(want) { - console.log('ServiceAbility1 onDisconnect, want:' + want.abilityName); - } - - onDestroy() { - console.log('ServiceAbility1 onDestroy'); - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actssingleton/ThirdSingletonExtensionFalse/entry/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts b/ability/ability_runtime/actssingleton/ThirdSingletonExtensionFalse/entry/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts deleted file mode 100644 index 1762cda6dd8f03996989e42dfeb364161e91c0b7..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actssingleton/ThirdSingletonExtensionFalse/entry/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts +++ /dev/null @@ -1,75 +0,0 @@ -/* -* 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 TestRunner from '@ohos.application.testRunner' -import AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry' - -var abilityDelegator = undefined -var abilityDelegatorArguments = undefined - -function translateParamsToString(parameters) { - const keySet = new Set([ - '-s class', '-s notClass', '-s suite', '-s it', - '-s level', '-s testType', '-s size', '-s timeout', - '-s dryRun' - ]) - let targetParams = ''; - for (const key in parameters) { - if (keySet.has(key)) { - targetParams = `${targetParams} ${key} ${parameters[key]}` - } - } - return targetParams.trim() -} - -async function onAbilityCreateCallback() { - console.log("onAbilityCreateCallback"); -} - -async function addAbilityMonitorCallback(err: any) { - console.info("addAbilityMonitorCallback : " + JSON.stringify(err)) -} - -export default class OpenHarmonyTestRunner implements TestRunner { - constructor() { - } - - onPrepare() { - console.info("OpenHarmonyTestRunner OnPrepare ") - } - - async onRun() { - console.log('OpenHarmonyTestRunner onRun run') - abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments() - abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() - globalThis.abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() - var MainAbilityName = abilityDelegatorArguments.bundleName + '.MainAbility' - let lMonitor = { - abilityName: MainAbilityName, - onAbilityCreate: onAbilityCreateCallback, - }; - abilityDelegator.addAbilityMonitor(lMonitor, addAbilityMonitorCallback) - var cmd = 'aa start -d 0 -a MainAbility' + ' -b ' + abilityDelegatorArguments.bundleName - cmd += ' '+translateParamsToString(abilityDelegatorArguments.parameters) - console.info('cmd : '+cmd) - abilityDelegator.executeShellCommand(cmd, - (err: any, d: any) => { - console.info('executeShellCommand : err : ' + JSON.stringify(err)); - console.info('executeShellCommand : data : ' + d.stdResult); - console.info('executeShellCommand : data : ' + d.exitCode); - }) - console.info('OpenHarmonyTestRunner onRun end') - } -}; \ No newline at end of file diff --git a/ability/ability_runtime/actssingleton/ThirdSingletonExtensionFalse/entry/src/main/ets/pages/index.ets b/ability/ability_runtime/actssingleton/ThirdSingletonExtensionFalse/entry/src/main/ets/pages/index.ets deleted file mode 100644 index 0fe7cdfafd92a8824eb8aa5bf92539bee63a2904..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actssingleton/ThirdSingletonExtensionFalse/entry/src/main/ets/pages/index.ets +++ /dev/null @@ -1,31 +0,0 @@ -/* - * 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. - */ -@Entry -@Component -struct Index { - @State message: string = 'Hello World' - - build() { - Row() { - Column() { - Text(this.message) - .fontSize(50) - .fontWeight(FontWeight.Bold) - } - .width('100%') - } - .height('100%') - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actssingleton/ThirdSingletonExtensionFalse/entry/src/main/ets/test/Ability.test.ets b/ability/ability_runtime/actssingleton/ThirdSingletonExtensionFalse/entry/src/main/ets/test/Ability.test.ets deleted file mode 100644 index d41cb5a5d62f9a73e53b1ba2da1e54d01851c613..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actssingleton/ThirdSingletonExtensionFalse/entry/src/main/ets/test/Ability.test.ets +++ /dev/null @@ -1,98 +0,0 @@ -/* - * 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. - */ -// @ts-nocheck -import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium' -import AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry' - -const START_ABILITY_TIMEOUT = 3000; -const ABILITY_TIMEOUT = 5000; - -export default function singleusermodelTest() { - describe('ActsSingleUserTest', function () { - var user100 = 100 - function onConnectCallback(element, remote) { - console.log("ACTS_ExtensionSingleUserModel_1000====>callback start====>") - console.log('ACTS_ExtensionSingleUserModel_1000 onConnectCallback====> element=' + JSON.stringify(element)); - console.log('ACTS_ExtensionSingleUserModel_1000 onConnectCallback====> remote=' + JSON.stringify(remote)); - } - - function onDisconnectCallback(element) { - console.log('ACTS_ConnectAbility onDisconnectCallback') - } - - function onFailedCallback(code) { - console.log('ACTS_ConnectAbility ConnectAbility onFailed errCode : ' + code) - } - /** - *@tc.number: ACTS_ExtensionSingleUserModel_1000 - *@tc.name: Support singleuser operation mode - *@tc.desc:When singleuser not set under the third-party application, the current user starts a serviceability - */ - it('ACTS_ExtensionSingleUserModel_1000', 0, async function (done) { - console.log("ACTS_ExtensionSingleUserModel_1000====>callback start====>") - let connId; - - console.debug("====>start connectAbilityWithAccount====>"); - console.info('executeShellCommand : globalThis.abilityContext : ' + - JSON.stringify(globalThis.abilityContext)); - connId = await globalThis.abilityContext.connectAbilityWithAccount( - { - bundleName: "com.singleusermodel.actssingleusertest", - abilityName: "ServiceAbility1", - action: "StartAbilityPromise" - }, - user100, - { - onConnect: onConnectCallback, - onDisconnect: onDisconnectCallback, - onFailed: onFailedCallback, - } - ); - console.log('StartConnectNative ConnectAbility connId : ' + connId); - setTimeout(async () => { - let abilityDelegator = undefined - abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() - let temp - let cmd = 'aa dump -a' - await abilityDelegator.executeShellCommand(cmd).then((data) => { - console.info('executeShellCommand : data : ' + JSON.stringify(data)); - temp = data["stdResult"]; - expect(temp.indexOf("ServiceAbility1") >= 0).assertTrue() - console.info('executeShellCommand : data : ' + data.exitCode); - }).catch((err) => { - console.info('executeShellCommand 0: err : ' + JSON.stringify(err)); - }) - cmd = 'aa dump -a -u 0' - await abilityDelegator.executeShellCommand(cmd).then((data) => { - console.info('executeShellCommand 0: data : ' + JSON.stringify(data)); - temp = data["stdResult"]; - expect(temp.indexOf("ServiceAbility1") == -1).assertTrue() - console.info('executeShellCommand 0: data : ' + data.exitCode); - }).catch((err) => { - console.info('executeShellCommand 0: err : ' + JSON.stringify(err)); - }) - console.debug('ACTS_ExtensionSingleUserModel_1000====>timeout====>'); - await globalThis.abilityContext.disconnectAbility(connId).then((data, err) => { - console.debug("====>data is====>" + JSON.stringify(data)); - console.debug("====>err is====>" + JSON.stringify(err)); - }) - }, START_ABILITY_TIMEOUT); - setTimeout(() => { - console.debug('ACTS_ExtensionSingleUserModel_1000====>done====>'); - done(); - }, ABILITY_TIMEOUT) - }) - }) -} \ No newline at end of file diff --git a/ability/ability_runtime/actssingleton/ThirdSingletonExtensionFalse/entry/src/main/ets/test/List.test.ets b/ability/ability_runtime/actssingleton/ThirdSingletonExtensionFalse/entry/src/main/ets/test/List.test.ets deleted file mode 100644 index effe726fa006c3f48f7f6f818e434311ce7a9ba8..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actssingleton/ThirdSingletonExtensionFalse/entry/src/main/ets/test/List.test.ets +++ /dev/null @@ -1,19 +0,0 @@ -/* - * 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 singleusermodelTest from './Ability.test' - -export default function testsuite() { - singleusermodelTest() -} \ No newline at end of file diff --git a/ability/ability_runtime/actssingleton/ThirdSingletonExtensionFalse/entry/src/main/module.json b/ability/ability_runtime/actssingleton/ThirdSingletonExtensionFalse/entry/src/main/module.json deleted file mode 100644 index 3f565f3588e0578dbf54b53cf2e7acd4480782d9..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actssingleton/ThirdSingletonExtensionFalse/entry/src/main/module.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "module": { - "name": "entry", - "type": "entry", - "srcEntrance": "./ets/Application/AbilityStage.ts", - "description": "$string:entry_desc", - "mainElement": "MainAbility", - "deviceTypes": [ - "default", - "tablet" - ], - "deliveryWithInstall": true, - "installationFree": false, - "pages": "$profile:main_pages", - "uiSyntax": "ets", - "abilities": [ - { - "name": "MainAbility", - "srcEntrance": "./ets/MainAbility/MainAbility.ts", - "description": "$string:MainAbility_desc", - "icon": "$media:icon", - "label": "$string:MainAbility_label", - "visible": true, - "skills": [ - { - "actions": [ - "action.system.home" - ], - "entities": [ - "entity.system.home" - ] - } - ] - } - ], - "extensionAbilities": [ - { - "name": "ServiceAbility1", - "srcEntrance": "./ets/ServiceAbility1/ServiceAbility1.ts", - "label": "$string:form_ServiceAbility1_label", - "description": "$string:form_ServiceAbility1_desc", - "type": "service|dataShare" - } - ] - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actssingleton/ThirdSingletonExtensionFalse/entry/src/main/resources/base/element/string.json b/ability/ability_runtime/actssingleton/ThirdSingletonExtensionFalse/entry/src/main/resources/base/element/string.json deleted file mode 100644 index bdb59a6c7282ea5b7bc1f6fc9b77a4a338b5c2c0..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actssingleton/ThirdSingletonExtensionFalse/entry/src/main/resources/base/element/string.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "string": [ - { - "name": "entry_desc", - "value": "description" - }, - { - "name": "MainAbility_desc", - "value": "description" - }, - { - "name": "MainAbility_label", - "value": "label" - }, - { - "name": "form_ServiceAbility1_desc", - "value": "form_description" - }, - { - "name": "form_ServiceAbility1_label", - "value": "form_label" - } - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/actssingleton/ThirdSingletonExtensionFalse/entry/src/main/resources/base/media/icon.png b/ability/ability_runtime/actssingleton/ThirdSingletonExtensionFalse/entry/src/main/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actssingleton/ThirdSingletonExtensionFalse/entry/src/main/resources/base/media/icon.png and /dev/null differ diff --git a/ability/ability_runtime/actssingleton/ThirdSingletonExtensionFalse/entry/src/main/resources/base/profile/main_pages.json b/ability/ability_runtime/actssingleton/ThirdSingletonExtensionFalse/entry/src/main/resources/base/profile/main_pages.json deleted file mode 100644 index feec276e105eeb8d621c20aaf838f318b0a94150..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actssingleton/ThirdSingletonExtensionFalse/entry/src/main/resources/base/profile/main_pages.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "src": [ - "pages/index" - ] -} diff --git a/ability/ability_runtime/actssingleton/ThirdSingletonExtensionFalse/signature/openharmony_sx.p7b b/ability/ability_runtime/actssingleton/ThirdSingletonExtensionFalse/signature/openharmony_sx.p7b deleted file mode 100644 index 66b4457a8a81fb8d3356cf46d67226c850944858..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actssingleton/ThirdSingletonExtensionFalse/signature/openharmony_sx.p7b and /dev/null differ diff --git a/ability/ability_runtime/actssingleton/ThirdSingletonFalse/signature/openharmony_sx.p7b b/ability/ability_runtime/actssingleton/ThirdSingletonFalse/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/actssingleton/ThirdSingletonFalse/signature/openharmony_sx.p7b and b/ability/ability_runtime/actssingleton/ThirdSingletonFalse/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/actsstartrunnertest/signature/openharmony_sx.p7b b/ability/ability_runtime/actsstartrunnertest/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/actsstartrunnertest/signature/openharmony_sx.p7b and b/ability/ability_runtime/actsstartrunnertest/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/actsstserviceabilityclientcase/entry/src/main/config.json b/ability/ability_runtime/actsstserviceabilityclientcase/entry/src/main/config.json index 87a3f4aad83bb9d06cdaa1ef7e9c4076d014d293..ca6fd6dd999b85f7aa8a5b8ab70b5e510db92859 100644 --- a/ability/ability_runtime/actsstserviceabilityclientcase/entry/src/main/config.json +++ b/ability/ability_runtime/actsstserviceabilityclientcase/entry/src/main/config.json @@ -64,34 +64,10 @@ } ], "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": [ { diff --git a/ability/ability_runtime/actsstserviceabilityclientcase/signature/openharmony_sx.p7b b/ability/ability_runtime/actsstserviceabilityclientcase/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/actsstserviceabilityclientcase/signature/openharmony_sx.p7b and b/ability/ability_runtime/actsstserviceabilityclientcase/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/actssupportfunction/actsonandoffscreentest/entry/src/main/module.json b/ability/ability_runtime/actssupportfunction/actsonandoffscreentest/entry/src/main/module.json index b7cc0275a740cd54fee4f14ff760cbb4c25b4909..ed5d8aed611e5521c53c7550a4ea4c6265f9cdf4 100644 --- a/ability/ability_runtime/actssupportfunction/actsonandoffscreentest/entry/src/main/module.json +++ b/ability/ability_runtime/actssupportfunction/actsonandoffscreentest/entry/src/main/module.json @@ -35,16 +35,6 @@ } ] } - ], - "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 diff --git a/ability/ability_runtime/actssupportfunction/actsonandoffscreentest/signature/openharmony_sx.p7b b/ability/ability_runtime/actssupportfunction/actsonandoffscreentest/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/actssupportfunction/actsonandoffscreentest/signature/openharmony_sx.p7b and b/ability/ability_runtime/actssupportfunction/actsonandoffscreentest/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/actssupportfunction/actssupportfunctiontest/entry/src/main/module.json b/ability/ability_runtime/actssupportfunction/actssupportfunctiontest/entry/src/main/module.json index b7cc0275a740cd54fee4f14ff760cbb4c25b4909..ed5d8aed611e5521c53c7550a4ea4c6265f9cdf4 100644 --- a/ability/ability_runtime/actssupportfunction/actssupportfunctiontest/entry/src/main/module.json +++ b/ability/ability_runtime/actssupportfunction/actssupportfunctiontest/entry/src/main/module.json @@ -35,16 +35,6 @@ } ] } - ], - "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 diff --git a/ability/ability_runtime/actssupportfunction/actssupportfunctiontest/signature/openharmony_sx.p7b b/ability/ability_runtime/actssupportfunction/actssupportfunctiontest/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/actssupportfunction/actssupportfunctiontest/signature/openharmony_sx.p7b and b/ability/ability_runtime/actssupportfunction/actssupportfunctiontest/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/actssupportfunction/faonandoffscreen/signature/openharmony_sx.p7b b/ability/ability_runtime/actssupportfunction/faonandoffscreen/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/actssupportfunction/faonandoffscreen/signature/openharmony_sx.p7b and b/ability/ability_runtime/actssupportfunction/faonandoffscreen/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/actssupportfunction/fasupportfunction/signature/openharmony_sx.p7b b/ability/ability_runtime/actssupportfunction/fasupportfunction/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/actssupportfunction/fasupportfunction/signature/openharmony_sx.p7b and b/ability/ability_runtime/actssupportfunction/fasupportfunction/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/actssupportfunction/fasupportfunctionthree/signature/openharmony_sx.p7b b/ability/ability_runtime/actssupportfunction/fasupportfunctionthree/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/actssupportfunction/fasupportfunctionthree/signature/openharmony_sx.p7b and b/ability/ability_runtime/actssupportfunction/fasupportfunctionthree/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/actssupportfunction/stageonandoffscreen/signature/openharmony_sx.p7b b/ability/ability_runtime/actssupportfunction/stageonandoffscreen/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/actssupportfunction/stageonandoffscreen/signature/openharmony_sx.p7b and b/ability/ability_runtime/actssupportfunction/stageonandoffscreen/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/actssupportfunction/stagesupportfunction/signature/openharmony_sx.p7b b/ability/ability_runtime/actssupportfunction/stagesupportfunction/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/actssupportfunction/stagesupportfunction/signature/openharmony_sx.p7b and b/ability/ability_runtime/actssupportfunction/stagesupportfunction/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/actsusers/ActsAmsUsersApi7AppA/signature/openharmony_sx.p7b b/ability/ability_runtime/actsusers/ActsAmsUsersApi7AppA/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/actsusers/ActsAmsUsersApi7AppA/signature/openharmony_sx.p7b and b/ability/ability_runtime/actsusers/ActsAmsUsersApi7AppA/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/actsusers/ActsAmsUsersExtensionSystemTest/AppScope/app.json b/ability/ability_runtime/actsusers/ActsAmsUsersExtensionSystemTest/AppScope/app.json deleted file mode 100644 index ac69de9d75e0483c9d396bd8c06ecc7e6996bb4c..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsusers/ActsAmsUsersExtensionSystemTest/AppScope/app.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "app": { - "bundleName": "com.acts.actsinterfacemultiusersextensiontest", - "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 - } - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsusers/ActsAmsUsersExtensionSystemTest/AppScope/resources/base/element/string.json b/ability/ability_runtime/actsusers/ActsAmsUsersExtensionSystemTest/AppScope/resources/base/element/string.json deleted file mode 100644 index be09cccde1bc7369ef47a5cd45d2b06884c88602..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsusers/ActsAmsUsersExtensionSystemTest/AppScope/resources/base/element/string.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "string": [ - { - "name": "app_name", - "value": "ohosProject" - } - ] -} diff --git a/ability/ability_runtime/actsusers/ActsAmsUsersExtensionSystemTest/AppScope/resources/base/media/app_icon.png b/ability/ability_runtime/actsusers/ActsAmsUsersExtensionSystemTest/AppScope/resources/base/media/app_icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actsusers/ActsAmsUsersExtensionSystemTest/AppScope/resources/base/media/app_icon.png and /dev/null differ diff --git a/ability/ability_runtime/actsusers/ActsAmsUsersExtensionSystemTest/BUILD.gn b/ability/ability_runtime/actsusers/ActsAmsUsersExtensionSystemTest/BUILD.gn deleted file mode 100644 index d290d611a58241e3198723fa25b106805ce13c54..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsusers/ActsAmsUsersExtensionSystemTest/BUILD.gn +++ /dev/null @@ -1,43 +0,0 @@ -# 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_js_hap_suite("ActsAmsUsersExtensionSystemTest") { - hap_profile = "./entry/src/main/module.json" - js_build_mode = "debug" - deps = [ - ":actsamsusersextensionsystemtest_js_assets", - ":actsamsusersextensionsystemtest_resources", - ] - ets2abc = true - certificate_profile = "signature/openharmony_sx.p7b" - hap_name = "ActsAmsUsersExtensionSystemTest" - subsystem_name = "ability" - part_name = "ability_runtime" -} - -ohos_app_scope("actsamsusersextensionsystemtest_app_profile") { - app_profile = "AppScope/app.json" - sources = [ "AppScope/resources" ] -} - -ohos_js_assets("actsamsusersextensionsystemtest_js_assets") { - source_dir = "./entry/src/main/ets" -} - -ohos_resources("actsamsusersextensionsystemtest_resources") { - sources = [ "./entry/src/main/resources" ] - deps = [ ":actsamsusersextensionsystemtest_app_profile" ] - hap_profile = "./entry/src/main/module.json" -} diff --git a/ability/ability_runtime/actsusers/ActsAmsUsersExtensionSystemTest/Test.json b/ability/ability_runtime/actsusers/ActsAmsUsersExtensionSystemTest/Test.json deleted file mode 100644 index 23c3021a3f7e6c9520d14f4c446efa4580c7faf3..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsusers/ActsAmsUsersExtensionSystemTest/Test.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "description": "Configuration for hjunit demo Tests", - "driver": { - "type": "OHJSUnitTest", - "test-timeout": "300000", - "bundle-name": "com.acts.actsinterfacemultiusersextensiontest", - "module-name":"phone", - "shell-timeout": "300000", - "testcase-timeout": "30000" - }, - "kits": [ - { - "type": "ShellKit", - "run-command": [ - "acm create -n user101 -t normal", - "acm switch -i 101" - ], - "teardown-command": [ - "acm switch -i 100", - "acm delete -i 101" - ] - }, - { - "test-file-name": [ - "ActsAmsUsersExtensionSystemTest.hap", - "ActsAmsUsersApi7AppA.hap" - ], - "type": "AppInstallKit", - "cleanup-apps": true - } - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/actsusers/ActsAmsUsersExtensionSystemTest/entry/src/main/ets/Application/AbilityStage.ts b/ability/ability_runtime/actsusers/ActsAmsUsersExtensionSystemTest/entry/src/main/ets/Application/AbilityStage.ts deleted file mode 100644 index 5e2915fe4fc033cd5c9bd579dc08fe7369e51016..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsusers/ActsAmsUsersExtensionSystemTest/entry/src/main/ets/Application/AbilityStage.ts +++ /dev/null @@ -1,23 +0,0 @@ -/* - * 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" - -export default class MyAbilityStage extends AbilityStage { - onCreate() { - console.log("MyAbilityStage onCreate") - globalThis.stageOnCreateRun = 1; - globalThis.stageContext = this.context; - } -} diff --git a/ability/ability_runtime/actsusers/ActsAmsUsersExtensionSystemTest/entry/src/main/ets/MainAbility/MainAbility.ts b/ability/ability_runtime/actsusers/ActsAmsUsersExtensionSystemTest/entry/src/main/ets/MainAbility/MainAbility.ts deleted file mode 100644 index 627735a9b31509b0636ac5c410c996deb725d036..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsusers/ActsAmsUsersExtensionSystemTest/entry/src/main/ets/MainAbility/MainAbility.ts +++ /dev/null @@ -1,54 +0,0 @@ -/* - * 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 AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry' -import { Hypium } from '@ohos/hypium' -import testsuite from '../test/List.test' - -export default class MainAbility extends Ability { - onCreate(want, launchParam) { - console.log('MainAbility onCreate') - globalThis.abilityWant = want; - globalThis.abilityContext = this.context; - var abilityDelegator: any - abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() - var abilityDelegatorArguments: any - abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments() - console.info('start run testcase!!!') - Hypium.hypiumTest(abilityDelegator, abilityDelegatorArguments, testsuite) - } - - onDestroy() { - console.log('MainAbility onDestroy') - } - - onWindowStageCreate(windowStage) { - console.log('MainAbility onWindowStageCreate') - windowStage.setUIContent(this.context, 'MainAbility/pages/index/index', null) - } - - onWindowStageDestroy() { - console.log('MainAbility onWindowStageDestroy') - } - - onForeground() { - console.log('MainAbility onForeground') - } - - onBackground() { - console.log('MainAbility onBackground') - } - -}; \ No newline at end of file diff --git a/ability/ability_runtime/actsusers/ActsAmsUsersExtensionSystemTest/entry/src/main/ets/MainAbility/pages/index/index.ets b/ability/ability_runtime/actsusers/ActsAmsUsersExtensionSystemTest/entry/src/main/ets/MainAbility/pages/index/index.ets deleted file mode 100644 index 3213051cd207a81d45aa7fac27cf772e8eade194..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsusers/ActsAmsUsersExtensionSystemTest/entry/src/main/ets/MainAbility/pages/index/index.ets +++ /dev/null @@ -1,31 +0,0 @@ -/* - * 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. - */ -@Entry -@Component -struct Index { - @State message: string = 'ActsAmsUsersExtensionSystemTest' - - build() { - Row() { - Column() { - Text(this.message) - .fontSize(50) - .fontWeight(FontWeight.Bold) - } - .width('100%') - } - .height('100%') - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsusers/ActsAmsUsersExtensionSystemTest/entry/src/main/ets/MainAbility/pages/second/second.ets b/ability/ability_runtime/actsusers/ActsAmsUsersExtensionSystemTest/entry/src/main/ets/MainAbility/pages/second/second.ets deleted file mode 100644 index f9009a3e8567d1f4557ebc11dded54c7e27c0b0d..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsusers/ActsAmsUsersExtensionSystemTest/entry/src/main/ets/MainAbility/pages/second/second.ets +++ /dev/null @@ -1,43 +0,0 @@ -/* - * 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 diff --git a/ability/ability_runtime/actsusers/ActsAmsUsersExtensionSystemTest/entry/src/main/ets/MainAbility2/MainAbility2.ts b/ability/ability_runtime/actsusers/ActsAmsUsersExtensionSystemTest/entry/src/main/ets/MainAbility2/MainAbility2.ts deleted file mode 100644 index 3a23181f8bcee8f27646f6d5015002e5dc73480c..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsusers/ActsAmsUsersExtensionSystemTest/entry/src/main/ets/MainAbility2/MainAbility2.ts +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (c) 2021 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" - -export default class MainAbility2 extends Ability { - - onCreate(want, launchParam) { - console.log("MainAbility2 onCreate"); - globalThis.abilityContext2 = this.context - } - - onDestroy() { - console.log("MainAbility2 onDestroy"); - } - - onWindowStageCreate(windowStage) { - console.log("MainAbility2 onWindowStageCreate"); - windowStage.setUIContent(this.context, "MainAbility/pages/index/second", null); - commonEvent.publish("ACTS_InterfaceMultiUsersExtension_CommonEvent", () => { - console.log("publish Publish ACTS_InterfaceMultiUsersExtension_CommonEvent callback") - globalThis.abilityContext2.terminateSelf().then(() => { - commonEvent.publish("ACTS_TerminateSelf_CommonEvent", ()=>{ - console.log('terminateSelf promise'); - }); - }); - }) - } - - onWindowStageDestroy() { - console.log("MainAbility2 onWindowStageDestroy"); - } - - onForeground() { - console.log("MainAbility2 onForeground"); - } - - onBackground() { - console.log("MainAbility2 onBackground"); - } -}; diff --git a/ability/ability_runtime/actsusers/ActsAmsUsersExtensionSystemTest/entry/src/main/ets/ServiceAbility/ServiceAbility.ts b/ability/ability_runtime/actsusers/ActsAmsUsersExtensionSystemTest/entry/src/main/ets/ServiceAbility/ServiceAbility.ts deleted file mode 100644 index 9585ba864f16191e33e635e2e1d8336044bcd90d..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsusers/ActsAmsUsersExtensionSystemTest/entry/src/main/ets/ServiceAbility/ServiceAbility.ts +++ /dev/null @@ -1,246 +0,0 @@ -/* - * Copyright (c) 2021 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 ServiceExtensionAbility from '@ohos.application.ServiceExtensionAbility' -import rpc from '@ohos.rpc'; -class Stub extends rpc.RemoteObject { - constructor(des) { - super(des); - } - onRemoteRequest(code, data, reply, option) { - reply.writeNoException(); - reply.writeString("success"); - return true; - } -} -export default class ServiceAbility extends ServiceExtensionAbility { - onCreate(want) { - console.log('ServiceAbility onCreate'); - } - onDestory(){ - console.log('ServiceAbility onDestory'); - } - onRequest(want,startId) { - console.log('ServiceAbility onRequest'); - } - - onConnect(want) { - console.log('ServiceAbility onConnect'); - console.log('globalThis.startnum is' + globalThis.startnum); - switch (globalThis.startnum) { - case 1: - this.context.startAbility( - { - bundleName: 'com.acts.actsinterfacemultiusersextensiontest', - abilityName: 'com.acts.actsinterfacemultiusersextensiontest.MainAbility2' - },{ - windowMode:0 - } - ).then((data) => { - console.debug("====>startAbility end====>"); - console.debug("====>data is====>" + JSON.stringify(data)); - }).catch((err)=>{ - console.debug("==== err is====>"+ JSON.stringify(err)); - console.debug("==== errCode is====>"+ JSON.stringify(err.code)); - }) - break; - case 2: - this.context.startAbility( - { - bundleName: 'com.acts.error', - abilityName: 'com.acts.error.MainAbility2' - },{ - windowMode:0 - }).then(()=>{ - console.debug("====>startAbility end====>"); - }) - console.debug("====>case 2 end====>"); - var myStub1 = new Stub("com.acts.actsinterfacemultiusersextensiontest.MainAbility"); - console.log('ThirdAbility onConnect before return:') - return myStub1; - break; - case 3: - this.context.startAbility( - { - bundleName: 'com.acts.actsinterfacemultiusersextensiontest', - abilityName: 'com.acts.actsinterfacemultiusersextensiontest.MainAbility2' - },{ - windowMode:0 - },(err,data) => { - console.debug("==== err is====>"+ JSON.stringify(err)); - console.debug("==== errCode is====>"+ JSON.stringify(err.code)); - console.debug("====>startAbility end====>" ); - }) - var myStub7 = new Stub("com.acts.actsinterfacemultiusersextensiontest.MainAbility"); - console.log('ThirdAbility onConnect before return:') - return myStub7; - break; - case 4: - this.context.startAbility( - { - bundleName: 'com.acts.error', - abilityName: 'com.acts.error.MainAbility2' - },{ - windowMode:0 - },(err,data) => { - console.debug("==== err is====>"+ JSON.stringify(err)); - console.debug("==== errCode is====>"+ JSON.stringify(err.code)); - console.debug("====>startAbility end====>" ); - }) - var myStub2 = new Stub("com.acts.actsinterfacemultiusersextensiontest.MainAbility"); - console.log('ThirdAbility onConnect before return:') - return myStub2; - break; - case 5: - this.context.startAbility( - { - bundleName: 'com.acts.actsinterfacemultiusersextensiontest', - abilityName: 'com.acts.actsinterfacemultiusersextensiontest.ServiceAbility2' - }).then((data)=>{ - console.debug("====>startAbility end====>"); - console.debug("====>data is====>" + JSON.stringify(data)); - }) - break; - case 6: - this.context.startAbility( - { - bundleName: 'com.acts.error', - abilityName: 'com.acts.error.ServiceAbility2' - }).then(()=>{ - console.debug("====>startAbility end====>"); - }) - var myStub3 = new Stub("com.acts.actsinterfacemultiusersextensiontest.MainAbility"); - console.log('ThirdAbility onConnect before return:') - return myStub3; - break; - case 7: - this.context.startAbility( - { - bundleName: 'com.acts.actsinterfacemultiusersextensiontest', - abilityName: 'com.acts.actsinterfacemultiusersextensiontest.ServiceAbility2' - },(err,data) => { - console.debug("==== err is====>"+ JSON.stringify(err)); - console.debug("==== errCode is====>"+ JSON.stringify(err.code)); - console.debug("====>startAbility end====>" ); - }) - var myStub8 = new Stub("com.acts.actsinterfacemultiusersextensiontest.MainAbility"); - console.log('ThirdAbility onConnect before return:') - return myStub8; - break; - case 8: - this.context.startAbility( - { - bundleName: 'com.acts.error', - abilityName: 'com.acts.error.ServiceAbility2' - },(err,data) => { - console.debug("==== err is====>"+ JSON.stringify(err)); - console.debug("==== errCode is====>"+ JSON.stringify(err.code)); - console.debug("====>startAbility end====>" ); - }) - var myStub4 = new Stub("com.acts.actsinterfacemultiusersextensiontest.MainAbility"); - console.log('ThirdAbility onConnect before return:') - return myStub4; - break; - case 9: - this.context.startAbility( - { - bundleName: 'com.acts.actsinterfacemultiusersextensiontest', - abilityName: 'com.acts.actsinterfacemultiusersextensiontest.ServiceAbility2' - }).then(()=>{ - console.debug("====>startAbility end====>"); - }) - var myStub11 = new Stub("com.acts.actsinterfacemultiusersextensiontest.MainAbility"); - console.log('ThirdAbility onConnect before return:') - return myStub11; - break; - case 10: - this.context.startAbility( - { - bundleName: 'com.acts.error', - abilityName: 'com.acts.error.ServiceAbility2' - }).then(()=>{ - console.debug("====>startAbility end====>"); - }) - var myStub5 = new Stub("com.acts.actsinterfacemultiusersextensiontest.MainAbility"); - console.log('ThirdAbility onConnect before return:') - return myStub5; - break; - case 11: - this.context.startAbility( - { - bundleName: 'com.acts.actsinterfacemultiusersextensiontest', - abilityName: 'com.acts.actsinterfacemultiusersextensiontest.ServiceAbility2' - }).then(()=>{ - console.debug("====>startAbility end====>"); - }) - var myStub12 = new Stub("com.acts.actsinterfacemultiusersextensiontest.MainAbility"); - console.log('ThirdAbility onConnect before return:') - return myStub12; - break; - case 12: - this.context.startAbility( - { - bundleName: 'com.acts.error', - abilityName: 'com.acts.error.ServiceAbility2' - },(err,data) => { - console.debug("==== err is====>"+ JSON.stringify(err)); - console.debug("==== errCode is====>"+ JSON.stringify(err.code)); - console.debug("====>startAbility end====>" ); - }) - var myStub6 = new Stub("com.acts.actsinterfacemultiusersextensiontest.MainAbility"); - console.log('ThirdAbility onConnect before return:') - return myStub6; - break; - case 13: - this.context.startAbility( - { - bundleName: 'com.example.userservicesystemapi7', - abilityName: 'com.example.userservicesystemapi7.ServiceAbility' - }).then(() => { - console.debug("====>startAbility end====>" ); - }) - var myStub9 = new Stub("com.acts.actsinterfacemultiusersextensiontest.MainAbility"); - console.log('ThirdAbility onConnect before return:') - return myStub9; - break; - case 14: - this.context.startAbility( - { - bundleName: 'com.example.userservicesystemapi7', - abilityName: 'com.example.userservicesystemapi7.ServiceAbility' - },(err,data) => { - console.debug("==== err is====>"+ JSON.stringify(err)); - console.debug("==== errCode is====>"+ JSON.stringify(err.code)); - console.debug("====>startAbility end====>" ); - }) - var myStub10 = new Stub("com.acts.actsinterfacemultiusersextensiontest.MainAbility"); - console.log('ThirdAbility onConnect before return:') - return myStub10; - break; - default: - break; - } - return new rpc.RemoteObject('connect'); - - } - - onDisconnect(want) { - console.log('ServiceAbility onDisconnect'); - } - - onDestroy() { - console.log('ServiceAbility onDestroy'); - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsusers/ActsAmsUsersExtensionSystemTest/entry/src/main/ets/ServiceAbility2/ServiceAbility2.ts b/ability/ability_runtime/actsusers/ActsAmsUsersExtensionSystemTest/entry/src/main/ets/ServiceAbility2/ServiceAbility2.ts deleted file mode 100644 index 9d589e3d095c8c8899b9f412478a188b0bb20651..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsusers/ActsAmsUsersExtensionSystemTest/entry/src/main/ets/ServiceAbility2/ServiceAbility2.ts +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (c) 2021 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 ServiceExtensionAbility from '@ohos.application.ServiceExtensionAbility' -import commonEvent from "@ohos.commonEvent" -import rpc from '@ohos.rpc'; - -export default class ServiceAbility2 extends ServiceExtensionAbility { - onCreate(want) { - console.log('ServiceAbility2 onCreate'); - } - - onDestory(){ - console.log('ServiceAbility2 onDestory'); - } - - onRequest(want,startId) { - console.log('ServiceAbility2 onRequest'); - commonEvent.publish("ACTS_InterfaceMultiUsersExtension_CommonEvent", () => { - console.log("publish Publish ACTS_InterfaceMultiUsersExtension_CommonEvent callback") - this.context.terminateSelf().then(() => { - commonEvent.publish("ACTS_TerminateSelf_CommonEvent", ()=>{ - console.log('terminateSelf promise'); - }); - }); - }) - } - - onConnect(want) { - console.log('ServiceAbility2 onConnect'); - return new rpc.RemoteObject('connect'); - } - - onDisconnect(want) { - console.log('ServiceAbility2 onDisconnect, want:' + want.abilityName); - } - - onDestroy() { - console.log('ServiceAbility2 onDestroy'); - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsusers/ActsAmsUsersExtensionSystemTest/entry/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts b/ability/ability_runtime/actsusers/ActsAmsUsersExtensionSystemTest/entry/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts deleted file mode 100644 index 9f9cabbe3239cf9f61c388d0912f2373a2aec4f5..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsusers/ActsAmsUsersExtensionSystemTest/entry/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts +++ /dev/null @@ -1,78 +0,0 @@ -/* - * 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 TestRunner from '@ohos.application.testRunner' -import AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry' - -var abilityDelegator = undefined -var abilityDelegatorArguments = undefined - -function translateParamsToString(parameters) { - const keySet = new Set([ - '-s class', '-s notClass', '-s suite', '-s it', - '-s level', '-s testType', '-s size', '-s timeout', - '-s dryRun' - ]) - let targetParams = ''; - for (const key in parameters) { - if (keySet.has(key)) { - targetParams = `${targetParams} ${key} ${parameters[key]}` - } - } - return targetParams.trim() -} - -async function onAbilityCreateCallback() { - console.log("onAbilityCreateCallback"); -} - -async function addAbilityMonitorCallback(err: any) { - console.info("addAbilityMonitorCallback : " + JSON.stringify(err)) -} - -export default class OpenHarmonyTestRunner implements TestRunner { - constructor() { - } - - onPrepare() { - console.info("OpenHarmonyTestRunner OnPrepare ") - } - - async onRun() { - console.log('OpenHarmonyTestRunner onRun run') - abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments() - abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() - var testAbilityName = abilityDelegatorArguments.bundleName + '.MainAbility' - let lMonitor = { - abilityName: testAbilityName, - onAbilityCreate: onAbilityCreateCallback, - }; - abilityDelegator.addAbilityMonitor(lMonitor, addAbilityMonitorCallback) - var cmd = 'aa start -d 0 -a com.acts.actsinterfacemultiusersextensiontest.MainAbility' + ' -b ' + abilityDelegatorArguments.bundleName - cmd += ' '+translateParamsToString(abilityDelegatorArguments.parameters) - var debug = abilityDelegatorArguments.parameters["-D"] - if (debug == 'true') - { - cmd += ' -D' - } - console.info('cmd : '+cmd) - abilityDelegator.executeShellCommand(cmd, - (err: any, d: any) => { - console.info('executeShellCommand : err : ' + JSON.stringify(err)); - console.info('executeShellCommand : data : ' + d.stdResult); - console.info('executeShellCommand : data : ' + d.exitCode); - }) - console.info('OpenHarmonyTestRunner onRun end') - } -}; \ No newline at end of file diff --git a/ability/ability_runtime/actsusers/ActsAmsUsersExtensionSystemTest/entry/src/main/ets/test/Ability.test.ets b/ability/ability_runtime/actsusers/ActsAmsUsersExtensionSystemTest/entry/src/main/ets/test/Ability.test.ets deleted file mode 100644 index a20fe5e8ad3860dbb227886a1f9e84f3025dabd2..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsusers/ActsAmsUsersExtensionSystemTest/entry/src/main/ets/test/Ability.test.ets +++ /dev/null @@ -1,968 +0,0 @@ -/* - * Copyright (c) 2021 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 { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from "@ohos/hypium" -import commonEvent from '@ohos.commonEvent' -import osaccount from '@ohos.account.osAccount' - -var subscriberInfo_MainAbility = { - events: ["ACTS_InterfaceMultiUsersExtension_CommonEvent"] -}; -var subscriberInfo_MainAbility2 = { - events: ["ACTS_TerminateSelf_CommonEvent"] -}; -var subscriberInfo_MainAbility3 = { - events: ["ACTS_InterfaceMultiUsers_0100_Start_CommonEvent"] -}; -var osAccountManager -const START_ABILITY_TIMEOUT = 6000; -globalThis.number = 0; -console.debug("====>in Ability.test====>"); -export default function abilityTest() { - console.debug("====>in function abilityTest====>"); - describe('ActsInterfaceMultiUsersExtensionTest', function () { - console.debug("====>in ACTS_InterfaceMultiUsers====>"); - - /* - * @tc.number : ACTS_ExtensionStartAbility_0100 - * @tc.name : start new ability - * @tc.desc : Start an ability with the parameter startability with options succeeded.(promise) - */ - it('ACTS_ExtensionStartAbility_0100', 0, async function (done) { - let Subscriber - var flag = true - var startresult = false - globalThis.startnum = 1 - console.log('====>globalThis.startnum is====>' + globalThis.startnum); - function SubscribeCallBack(err, data) { - expect(data.event == "ACTS_InterfaceMultiUsersExtension_CommonEvent").assertTrue(); - console.debug("====>0100 Subscribe CallBack data:====>" + JSON.stringify(data)); - if (data.event == "ACTS_InterfaceMultiUsersExtension_CommonEvent") { - startresult = true - } - globalThis.abilityContext.disconnectAbility(globalThis.number).then((data) => { - console.debug("====>data is====>" + JSON.stringify(data)); - }) - console.log('====>disconnectAbility finish'); - commonEvent.unsubscribe(Subscriber, UnSubscribeCallback); - } - commonEvent.createSubscriber(subscriberInfo_MainAbility).then(async (data) => { - console.debug("====>Create Subscriber====>"); - data.getSubscribeInfo().then(async (SubscribeInfo) => { - console.debug("====>SubscribeInfo is====>" + JSON.stringify(SubscribeInfo)); - Subscriber = data; - commonEvent.subscribe(Subscriber, SubscribeCallBack); - console.debug("====>0100start connectAbility====>"); - globalThis.number = await globalThis.abilityContext.connectAbility( - { - bundleName: 'com.acts.actsinterfacemultiusersextensiontest', - abilityName: 'com.acts.actsinterfacemultiusersextensiontest.ServiceAbility' - }) - console.debug("====>number is====>" + JSON.stringify(globalThis.number)); - }) - }) - - function UnSubscribeCallback() { - console.debug("====>UnSubscribeCallback====>"); - flag = false - expect(startresult).assertEqual(true); - setTimeout(() => { - done() - }, 1000) - } - - function timeout() { - console.debug('in ACTS_ExtensionStartAbility_0100 timeout'); - if (flag == true) { - expect().assertFail(); - console.debug('ACTS_ExtensionStartAbility_0100 - timeout'); - commonEvent.unsubscribe(Subscriber, UnSubscribeCallback) - } - } - - setTimeout(timeout, START_ABILITY_TIMEOUT); - }) - - /* - * @tc.number : ACTS_ExtensionStartAbility_0200 - * @tc.name : start new ability - * @tc.desc : Start an ability with the parameter startability with options failed.(promise) - */ - it('ACTS_ExtensionStartAbility_0200', 0, async function (done) { - let Subscriber - var flag = true - var startresult = false - globalThis.startnum = 2 - console.log('====>globalThis.startnum is====>' + globalThis.startnum); - function SubscribeCallBack(err, data) { - expect().assertFail(); - expect(data.event == "ACTS_InterfaceMultiUsersExtension_CommonEvent").assertTrue(); - console.debug("====>0200 Subscribe CallBack data:====>" + JSON.stringify(data)); - if (data.event == "ACTS_InterfaceMultiUsersExtension_CommonEvent") { - startresult = true - } - commonEvent.unsubscribe(Subscriber, UnSubscribeCallback); - } - function UnSubscribeCallback() { - console.debug("====>UnSubscribeCallback====>"); - flag = false - expect(startresult).assertEqual(false); - globalThis.abilityContext.disconnectAbility(globalThis.number).then((data) => { - console.debug("====>data is====>" + JSON.stringify(data)); - }) - console.log('====>disconnectAbility finish'); - setTimeout(() => { - done(); - }, 1000) - } - function onConnectCallback(element, remote) { - console.log(' onConnectCallback====> element=' + JSON.stringify(element)); - console.log(' onConnectCallback====> remote=' + JSON.stringify(remote)); - setTimeout(() => { - console.log('====>in timeout'); - console.debug("====>flag is====>" + JSON.stringify(flag)); - if (flag == true) { - console.debug('ACTS_ExtensionStartAbility_0200 - timeout'); - commonEvent.unsubscribe(Subscriber, UnSubscribeCallback); - } - }, 1000); - } - function onDisconnectCallback(element) { - console.log('onDisconnectCallback====> element=' + JSON.stringify(element)); - } - - function onFailedCallback(code) { - console.log('onFailedCallback====> code=' + JSON.stringify(code)) - } - commonEvent.createSubscriber(subscriberInfo_MainAbility).then(async (data) => { - console.debug("====>Create Subscriber====>"); - data.getSubscribeInfo().then(async (SubscribeInfo) => { - console.debug("====>SubscribeInfo is====>" + JSON.stringify(SubscribeInfo)); - Subscriber = data; - commonEvent.subscribe(Subscriber, SubscribeCallBack); - console.debug("====>0200start connectAbility====>"); - globalThis.number = await globalThis.abilityContext.connectAbility( - { - bundleName: 'com.acts.actsinterfacemultiusersextensiontest', - abilityName: 'com.acts.actsinterfacemultiusersextensiontest.ServiceAbility' - }, { - onConnect: onConnectCallback, - onDisconnect: onDisconnectCallback, - onFailed: onFailedCallback - }) - console.debug("====>number is====>" + JSON.stringify(globalThis.number)); - }) - }) - }) - - /* - * @tc.number : ACTS_ExtensionStartAbility_0300 - * @tc.name : start new ability - * @tc.desc : Start an ability with the parameter startability with options succeeded.(callback) - */ - it('ACTS_ExtensionStartAbility_0300', 0, async function (done) { - let Subscriber - var flag = true - var startresult = false - globalThis.startnum = 3 - console.log('====>globalThis.startnum is====>' + globalThis.startnum); - function SubscribeCallBack(err, data) { - expect(data.event == "ACTS_InterfaceMultiUsersExtension_CommonEvent").assertTrue(); - console.debug("====>0300 Subscribe CallBack data:====>" + JSON.stringify(data)); - if (data.event == "ACTS_InterfaceMultiUsersExtension_CommonEvent") { - startresult = true - } - globalThis.abilityContext.disconnectAbility(globalThis.number).then((data) => { - console.debug("====>data is====>" + JSON.stringify(data)); - }) - console.log('====>disconnectAbility finish'); - commonEvent.unsubscribe(Subscriber, UnSubscribeCallback); - } - commonEvent.createSubscriber(subscriberInfo_MainAbility).then(async (data) => { - console.debug("====>Create Subscriber====>"); - data.getSubscribeInfo().then(async (SubscribeInfo) => { - console.debug("====>SubscribeInfo is====>" + JSON.stringify(SubscribeInfo)); - Subscriber = data; - commonEvent.subscribe(Subscriber, SubscribeCallBack); - console.debug("====>0300start connectAbility====>"); - globalThis.number = await globalThis.abilityContext.connectAbility( - { - bundleName: 'com.acts.actsinterfacemultiusersextensiontest', - abilityName: 'com.acts.actsinterfacemultiusersextensiontest.ServiceAbility' - }) - console.debug("====>number is====>" + JSON.stringify(globalThis.number)); - }) - }) - - function UnSubscribeCallback() { - console.debug("====>UnSubscribeCallback====>"); - flag = false - expect(startresult).assertEqual(true); - setTimeout(() => { - done() - }, 1000) - } - - function timeout() { - console.debug('in ACTS_ExtensionStartAbility_0300 timeout'); - if (flag == true) { - expect().assertFail(); - console.debug('ACTS_ExtensionStartAbility_0300 - timeout'); - commonEvent.unsubscribe(Subscriber, UnSubscribeCallback) - } - } - - setTimeout(timeout, START_ABILITY_TIMEOUT); - }) - - /* - * @tc.number : ACTS_ExtensionStartAbility_0400 - * @tc.name : start new ability - * @tc.desc : Start an ability with the parameter startability with options failed.(callback) - */ - it('ACTS_ExtensionStartAbility_0400', 0, async function (done) { - let Subscriber - var flag = true - var startresult = false - globalThis.startnum = 4 - console.log('====>globalThis.startnum is====>' + globalThis.startnum); - function SubscribeCallBack(err, data) { - expect().assertFail(); - expect(data.event == "ACTS_InterfaceMultiUsersExtension_CommonEvent").assertTrue(); - console.debug("====>0400 Subscribe CallBack data:====>" + JSON.stringify(data)); - if (data.event == "ACTS_InterfaceMultiUsersExtension_CommonEvent") { - startresult = true - } - commonEvent.unsubscribe(Subscriber, UnSubscribeCallback); - } - function UnSubscribeCallback() { - console.debug("====>UnSubscribeCallback====>"); - flag = false - expect(startresult).assertEqual(false); - globalThis.abilityContext.disconnectAbility(globalThis.number).then((data) => { - console.debug("====>data is====>" + JSON.stringify(data)); - }) - console.log('====>disconnectAbility finish'); - setTimeout(() => { - done(); - }, 1000) - } - function onConnectCallback(element, remote) { - console.log(' onConnectCallback====> element=' + JSON.stringify(element)); - console.log(' onConnectCallback====> remote=' + JSON.stringify(remote)); - setTimeout(() => { - console.log('====>in timeout'); - console.debug("====>flag is====>" + JSON.stringify(flag)); - if (flag == true) { - console.debug('ACTS_ExtensionStartAbility_0400 - timeout'); - commonEvent.unsubscribe(Subscriber, UnSubscribeCallback); - } - }, 1000); - } - function onDisconnectCallback(element) { - console.log('onDisconnectCallback====> element=' + JSON.stringify(element)); - } - - function onFailedCallback(code) { - console.log('onFailedCallback====> code=' + JSON.stringify(code)) - } - commonEvent.createSubscriber(subscriberInfo_MainAbility).then(async (data) => { - console.debug("====>Create Subscriber====>"); - data.getSubscribeInfo().then(async (SubscribeInfo) => { - console.debug("====>SubscribeInfo is====>" + JSON.stringify(SubscribeInfo)); - Subscriber = data; - commonEvent.subscribe(Subscriber, SubscribeCallBack); - console.debug("====>0400start connectAbility====>"); - globalThis.number = await globalThis.abilityContext.connectAbility( - { - bundleName: 'com.acts.actsinterfacemultiusersextensiontest', - abilityName: 'com.acts.actsinterfacemultiusersextensiontest.ServiceAbility' - }, { - onConnect: onConnectCallback, - onDisconnect: onDisconnectCallback, - onFailed: onFailedCallback - }) - console.debug("====>number is====>" + JSON.stringify(globalThis.number)); - }) - }) - - }) - - /* - * @tc.number : ACTS_ExtensionStartAbility_0500 - * @tc.name : start new ability - * @tc.desc : Starting mainability2 with startability succeeded.(promise) - */ - it('ACTS_ExtensionStartAbility_0500', 0, async function (done) { - let Subscriber - var flag = true - var startresult = false - globalThis.startnum = 5 - console.log('====>globalThis.startnum is====>' + globalThis.startnum); - function SubscribeCallBack(err, data) { - expect(data.event == "ACTS_InterfaceMultiUsersExtension_CommonEvent").assertTrue(); - console.debug("====>0500 Subscribe CallBack data:====>" + JSON.stringify(data)); - if (data.event == "ACTS_InterfaceMultiUsersExtension_CommonEvent") { - startresult = true - } - globalThis.abilityContext.disconnectAbility(globalThis.number).then((data) => { - console.debug("====>data is====>" + JSON.stringify(data)); - }) - console.log('====>disconnectAbility finish'); - commonEvent.unsubscribe(Subscriber, UnSubscribeCallback); - } - commonEvent.createSubscriber(subscriberInfo_MainAbility).then(async (data) => { - console.debug("====>Create Subscriber====>"); - data.getSubscribeInfo().then(async (SubscribeInfo) => { - console.debug("====>SubscribeInfo is====>" + JSON.stringify(SubscribeInfo)); - Subscriber = data; - commonEvent.subscribe(Subscriber, SubscribeCallBack); - console.debug("====>0500start connectAbility====>"); - globalThis.number = await globalThis.abilityContext.connectAbility( - { - bundleName: 'com.acts.actsinterfacemultiusersextensiontest', - abilityName: 'com.acts.actsinterfacemultiusersextensiontest.ServiceAbility' - }) - console.debug("====>number is====>" + JSON.stringify(globalThis.number)); - }) - }) - - function UnSubscribeCallback() { - console.debug("====>UnSubscribeCallback====>"); - flag = false - expect(startresult).assertEqual(true); - setTimeout(() => { - done() - }, 1000) - } - - function timeout() { - console.debug('in ACTS_ExtensionStartAbility_0500 timeout'); - if (flag == true) { - expect().assertFail(); - console.debug('ACTS_ExtensionStartAbility_0500 - timeout'); - commonEvent.unsubscribe(Subscriber, UnSubscribeCallback) - } - } - - setTimeout(timeout, START_ABILITY_TIMEOUT); - }) - - /* - * @tc.number : ACTS_ExtensionStartAbility_0600 - * @tc.name : start new ability - * @tc.desc : Starting mainability2 with startability failed.(promise) - */ - it('ACTS_ExtensionStartAbility_0600', 0, async function (done) { - let Subscriber - var flag = true - var startresult = false - globalThis.startnum = 6 - console.log('====>globalThis.startnum is====>' + globalThis.startnum); - function SubscribeCallBack(err, data) { - expect().assertFail(); - expect(data.event == "ACTS_InterfaceMultiUsersExtension_CommonEvent").assertTrue(); - console.debug("====>0600 Subscribe CallBack data:====>" + JSON.stringify(data)); - if (data.event == "ACTS_InterfaceMultiUsersExtension_CommonEvent") { - startresult = true - } - commonEvent.unsubscribe(Subscriber, UnSubscribeCallback); - } - function UnSubscribeCallback() { - console.debug("====>UnSubscribeCallback====>"); - flag = false - expect(startresult).assertEqual(false); - globalThis.abilityContext.disconnectAbility(globalThis.number).then((data) => { - console.debug("====>data is====>" + JSON.stringify(data)); - }) - console.log('====>disconnectAbility finish'); - setTimeout(() => { - done(); - }, 1000) - } - function onConnectCallback(element, remote) { - console.log(' onConnectCallback====> element=' + JSON.stringify(element)); - console.log(' onConnectCallback====> remote=' + JSON.stringify(remote)); - setTimeout(() => { - console.log('====>in timeout'); - console.debug("====>flag is====>" + JSON.stringify(flag)); - if (flag == true) { - console.debug('ACTS_ExtensionStartAbility_0600 - timeout'); - commonEvent.unsubscribe(Subscriber, UnSubscribeCallback); - } - }, 1000); - } - function onDisconnectCallback(element) { - console.log('onDisconnectCallback====> element=' + JSON.stringify(element)); - } - - function onFailedCallback(code) { - console.log('onFailedCallback====> code=' + JSON.stringify(code)) - } - commonEvent.createSubscriber(subscriberInfo_MainAbility).then(async (data) => { - console.debug("====>Create Subscriber====>"); - data.getSubscribeInfo().then(async (SubscribeInfo) => { - console.debug("====>SubscribeInfo is====>" + JSON.stringify(SubscribeInfo)); - Subscriber = data; - commonEvent.subscribe(Subscriber, SubscribeCallBack); - console.debug("====>0600start connectAbility====>"); - globalThis.number = await globalThis.abilityContext.connectAbility( - { - bundleName: 'com.acts.actsinterfacemultiusersextensiontest', - abilityName: 'com.acts.actsinterfacemultiusersextensiontest.ServiceAbility' - }, { - onConnect: onConnectCallback, - onDisconnect: onDisconnectCallback, - onFailed: onFailedCallback - }) - console.debug("====>number is====>" + JSON.stringify(globalThis.number)); - }) - }) - }) - - /* - * @tc.number : ACTS_ExtensionStartAbility_0700 - * @tc.name : start new ability - * @tc.desc : Starting mainability2 with startability succeeded.(callback) - */ - it('ACTS_ExtensionStartAbility_0700', 0, async function (done) { - let Subscriber - var flag = true - var startresult = false - globalThis.startnum = 7 - console.log('====>globalThis.startnum is====>' + globalThis.startnum); - function SubscribeCallBack(err, data) { - expect(data.event == "ACTS_InterfaceMultiUsersExtension_CommonEvent").assertTrue(); - console.debug("====>0700 Subscribe CallBack data:====>" + JSON.stringify(data)); - if (data.event == "ACTS_InterfaceMultiUsersExtension_CommonEvent") { - startresult = true - } - globalThis.abilityContext.disconnectAbility(globalThis.number).then((data) => { - console.debug("====>data is====>" + JSON.stringify(data)); - }) - console.log('====>disconnectAbility finish'); - commonEvent.unsubscribe(Subscriber, UnSubscribeCallback); - } - commonEvent.createSubscriber(subscriberInfo_MainAbility).then(async (data) => { - console.debug("====>Create Subscriber====>"); - data.getSubscribeInfo().then(async (SubscribeInfo) => { - console.debug("====>SubscribeInfo is====>" + JSON.stringify(SubscribeInfo)); - Subscriber = data; - commonEvent.subscribe(Subscriber, SubscribeCallBack); - console.debug("====>0700start connectAbility====>"); - globalThis.number = await globalThis.abilityContext.connectAbility( - { - bundleName: 'com.acts.actsinterfacemultiusersextensiontest', - abilityName: 'com.acts.actsinterfacemultiusersextensiontest.ServiceAbility' - }) - console.debug("====>number is====>" + JSON.stringify(globalThis.number)); - }) - }) - - function UnSubscribeCallback() { - console.debug("====>UnSubscribeCallback====>"); - flag = false - expect(startresult).assertEqual(true); - setTimeout(() => { - done() - }, 1000) - } - - function timeout() { - console.debug('in ACTS_ExtensionStartAbility_0700 timeout'); - if (flag == true) { - expect().assertFail(); - console.debug('ACTS_ExtensionStartAbility_0700 - timeout'); - commonEvent.unsubscribe(Subscriber, UnSubscribeCallback) - } - } - - setTimeout(timeout, START_ABILITY_TIMEOUT); - - }) - - /* - * @tc.number : ACTS_ExtensionStartAbility_0800 - * @tc.name : start new ability - * @tc.desc : Starting mainability2 with startability failed.(callback) - */ - it('ACTS_ExtensionStartAbility_0800', 0, async function (done) { - let Subscriber - var flag = true - var startresult = false - globalThis.startnum = 8 - console.log('====>globalThis.startnum is====>' + globalThis.startnum); - function SubscribeCallBack(err, data) { - expect().assertFail(); - expect(data.event == "ACTS_InterfaceMultiUsersExtension_CommonEvent").assertTrue(); - console.debug("====>0800 Subscribe CallBack data:====>" + JSON.stringify(data)); - if (data.event == "ACTS_InterfaceMultiUsersExtension_CommonEvent") { - startresult = true - } - commonEvent.unsubscribe(Subscriber, UnSubscribeCallback); - } - function UnSubscribeCallback() { - console.debug("====>UnSubscribeCallback====>"); - flag = false - expect(startresult).assertEqual(false); - globalThis.abilityContext.disconnectAbility(globalThis.number).then((data) => { - console.debug("====>data is====>" + JSON.stringify(data)); - }) - console.log('====>disconnectAbility finish'); - setTimeout(() => { - done(); - }, 1000) - } - function onConnectCallback(element, remote) { - console.log(' onConnectCallback====> element=' + JSON.stringify(element)); - console.log(' onConnectCallback====> remote=' + JSON.stringify(remote)); - setTimeout(() => { - console.log('====>in timeout'); - console.debug("====>flag is====>" + JSON.stringify(flag)); - if (flag == true) { - console.debug('ACTS_ExtensionStartAbility_0800 - timeout'); - commonEvent.unsubscribe(Subscriber, UnSubscribeCallback); - } - }, 1000); - } - function onDisconnectCallback(element) { - console.log('onDisconnectCallback====> element=' + JSON.stringify(element)); - } - - function onFailedCallback(code) { - console.log('onFailedCallback====> code=' + JSON.stringify(code)) - } - commonEvent.createSubscriber(subscriberInfo_MainAbility).then(async (data) => { - console.debug("====>Create Subscriber====>"); - data.getSubscribeInfo().then(async (SubscribeInfo) => { - console.debug("====>SubscribeInfo is====>" + JSON.stringify(SubscribeInfo)); - Subscriber = data; - commonEvent.subscribe(Subscriber, SubscribeCallBack); - console.debug("====>0800start connectAbility====>"); - globalThis.number = await globalThis.abilityContext.connectAbility( - { - bundleName: 'com.acts.actsinterfacemultiusersextensiontest', - abilityName: 'com.acts.actsinterfacemultiusersextensiontest.ServiceAbility' - }, { - onConnect: onConnectCallback, - onDisconnect: onDisconnectCallback, - onFailed: onFailedCallback - }) - console.debug("====>number is====>" + JSON.stringify(globalThis.number)); - }) - }) - }) - - /* - * @tc.number : ACTS_ExtensionStartAbility_0900 - * @tc.name : start new ability - * @tc.desc : Starting mainability2 with startability succeeded.(callback) - */ - it('ACTS_ExtensionStartAbility_0900', 0, async function (done) { - let Subscriber - var flag = true - var startresult = false - globalThis.startnum = 13 - console.log('====>globalThis.startnum is====>' + globalThis.startnum); - function SubscribeCallBack(err, data) { - expect(data.event == "ACTS_InterfaceMultiUsers_0100_Start_CommonEvent").assertTrue(); - console.debug("====>0900 Subscribe CallBack data:====>" + JSON.stringify(data)); - if (data.event == "ACTS_InterfaceMultiUsers_0100_Start_CommonEvent") { - startresult = true - } - globalThis.abilityContext.disconnectAbility(globalThis.number).then((data) => { - console.debug("====>data is====>" + JSON.stringify(data)); - }) - console.log('====>disconnectAbility finish'); - commonEvent.unsubscribe(Subscriber, UnSubscribeCallback); - } - commonEvent.createSubscriber(subscriberInfo_MainAbility3).then(async (data) => { - console.debug("====>Create Subscriber====>"); - data.getSubscribeInfo().then(async (SubscribeInfo) => { - console.debug("====>SubscribeInfo is====>" + JSON.stringify(SubscribeInfo)); - Subscriber = data; - commonEvent.subscribe(Subscriber, SubscribeCallBack); - console.debug("====>0900start connectAbility====>"); - globalThis.number = await globalThis.abilityContext.connectAbility( - { - bundleName: 'com.acts.actsinterfacemultiusersextensiontest', - abilityName: 'com.acts.actsinterfacemultiusersextensiontest.ServiceAbility' - }) - console.debug("====>number is====>" + JSON.stringify(globalThis.number)); - }) - }) - - function UnSubscribeCallback() { - console.debug("====>UnSubscribeCallback====>"); - flag = false - expect(startresult).assertEqual(true); - setTimeout(() => { - done() - }, 1000) - } - - function timeout() { - console.debug('in ACTS_ExtensionStartAbility_0900 timeout'); - if (flag == true) { - expect().assertFail(); - console.debug('ACTS_ExtensionStartAbility_0900 - timeout'); - commonEvent.unsubscribe(Subscriber, UnSubscribeCallback) - } - } - - setTimeout(timeout, START_ABILITY_TIMEOUT); - - }) - - /* - * @tc.number : ACTS_ExtensionStartAbility_1000 - * @tc.name : start new ability - * @tc.desc : Starting mainability2 with startability succeeded.(callback) - */ - it('ACTS_ExtensionStartAbility_1000', 0, async function (done) { - let Subscriber - var flag = true - var startresult = false - globalThis.startnum = 14 - console.log('====>globalThis.startnum is====>' + globalThis.startnum); - function SubscribeCallBack(err, data) { - expect(data.event == "ACTS_InterfaceMultiUsers_0100_Start_CommonEvent").assertTrue(); - console.debug("====>1000 Subscribe CallBack data:====>" + JSON.stringify(data)); - if (data.event == "ACTS_InterfaceMultiUsers_0100_Start_CommonEvent") { - startresult = true - } - globalThis.abilityContext.disconnectAbility(globalThis.number).then((data) => { - console.debug("====>data is====>" + JSON.stringify(data)); - }) - console.log('====>disconnectAbility finish'); - commonEvent.unsubscribe(Subscriber, UnSubscribeCallback); - } - commonEvent.createSubscriber(subscriberInfo_MainAbility3).then(async (data) => { - console.debug("====>Create Subscriber====>"); - data.getSubscribeInfo().then(async (SubscribeInfo) => { - console.debug("====>SubscribeInfo is====>" + JSON.stringify(SubscribeInfo)); - Subscriber = data; - commonEvent.subscribe(Subscriber, SubscribeCallBack); - console.debug("====>1000start connectAbility====>"); - globalThis.number = await globalThis.abilityContext.connectAbility( - { - bundleName: 'com.acts.actsinterfacemultiusersextensiontest', - abilityName: 'com.acts.actsinterfacemultiusersextensiontest.ServiceAbility' - }) - console.debug("====>number is====>" + JSON.stringify(globalThis.number)); - }) - }) - - function UnSubscribeCallback() { - console.debug("====>UnSubscribeCallback====>"); - flag = false - expect(startresult).assertEqual(true); - setTimeout(() => { - done() - }, 1000) - } - - function timeout() { - console.debug('in ACTS_ExtensionStartAbility_1000 timeout'); - if (flag == true) { - expect().assertFail(); - console.debug('ACTS_ExtensionStartAbility_1000 - timeout'); - commonEvent.unsubscribe(Subscriber, UnSubscribeCallback) - } - } - - setTimeout(timeout, START_ABILITY_TIMEOUT); - - }) - - /* - * @tc.number : ACTS_ExtensionTerminateSelf_0100 - * @tc.name : Use terminateself to terminate ability - * @tc.desc : Starting mainability2 with startAbility then terminateself ability succeeded.(promise) - */ - it('ACTS_ExtensionTerminateSelf_0100', 0, async function (done) { - let Subscriber - var flag = true - var startresult = false - globalThis.startnum = 9 - console.log('====>globalThis.startnum is====>' + globalThis.startnum); - function SubscribeCallBack(err, data) { - expect(data.event == "ACTS_TerminateSelf_CommonEvent").assertTrue(); - console.debug("====>0100 Subscribe CallBack data:====>" + JSON.stringify(data)); - if (data.event == "ACTS_TerminateSelf_CommonEvent") { - startresult = true - } - globalThis.abilityContext.disconnectAbility(globalThis.number).then((data) => { - console.debug("====>data is====>" + JSON.stringify(data)); - }) - console.log('====>disconnectAbility finish'); - commonEvent.unsubscribe(Subscriber, UnSubscribeCallback); - } - function onConnectCallback(element, remote) { - console.log('onConnectCallback====> element=' + JSON.stringify(element)); - } - function onDisconnectCallback(element) { - console.log('onDisconnectCallback====> element=' + JSON.stringify(element)); - } - function onFailedCallback(code) { - console.log('onFailedCallback====> code=' + JSON.stringify(code)) - } - commonEvent.createSubscriber(subscriberInfo_MainAbility2).then(async (data) => { - console.debug("====>Create Subscriber====>"); - data.getSubscribeInfo().then(async (SubscribeInfo) => { - console.debug("====>SubscribeInfo is====>" + JSON.stringify(SubscribeInfo)); - Subscriber = data; - commonEvent.subscribe(Subscriber, SubscribeCallBack); - console.debug("====>0100start connectAbility====>"); - globalThis.number = await globalThis.abilityContext.connectAbility( - { - bundleName: 'com.acts.actsinterfacemultiusersextensiontest', - abilityName: 'com.acts.actsinterfacemultiusersextensiontest.ServiceAbility' - }, { - onConnect: onConnectCallback, - onDisconnect: onDisconnectCallback, - onFailed: onFailedCallback - }) - console.debug("====>number is====>" + JSON.stringify(globalThis.number)); - }) - }) - - function UnSubscribeCallback() { - console.debug("====>UnSubscribeCallback====>"); - flag = false - expect(startresult).assertEqual(true); - setTimeout(() => { - done() - }, 1000) - } - - function timeout() { - console.debug('in ACTS_ExtensionTerminateSelf_0100 timeout'); - if (flag == true) { - expect().assertFail(); - console.debug('ACTS_ExtensionTerminateSelf_0100 - timeout'); - commonEvent.unsubscribe(Subscriber, UnSubscribeCallback) - } - } - - setTimeout(timeout, START_ABILITY_TIMEOUT); - }) - - /* - * @tc.number : - * @tc.name : Use terminateself to terminate ability - * @tc.desc : Starting mainability2 with startAbility then terminateself ability failed.(promise) - */ - it('ACTS_ExtensionTerminateSelf_0200', 0, async function (done) { - let Subscriber - var flag = true - var startresult = false - globalThis.startnum = 10 - console.log('====>globalThis.startnum is====>' + globalThis.startnum); - function SubscribeCallBack(err, data) { - expect().assertFail(); - expect(data.event == "ACTS_TerminateSelf_CommonEvent").assertTrue(); - console.debug("====>0200 Subscribe CallBack data:====>" + JSON.stringify(data)); - if (data.event == "ACTS_TerminateSelf_CommonEvent") { - startresult = true - } - commonEvent.unsubscribe(Subscriber, UnSubscribeCallback); - } - function UnSubscribeCallback() { - console.debug("====>UnSubscribeCallback====>"); - flag = false - expect(startresult).assertEqual(false); - globalThis.abilityContext.disconnectAbility(globalThis.number).then((data) => { - console.debug("====>data is====>" + JSON.stringify(data)); - }) - console.log('====>disconnectAbility finish'); - setTimeout(() => { - done(); - }, 1000) - } - function onConnectCallback(element, remote) { - console.log(' onConnectCallback====> element=' + JSON.stringify(element)); - console.log(' onConnectCallback====> remote=' + JSON.stringify(remote)); - setTimeout(() => { - console.log('====>in timeout'); - console.debug("====>flag is====>" + JSON.stringify(flag)); - if (flag == true) { - console.debug(' - timeout'); - commonEvent.unsubscribe(Subscriber, UnSubscribeCallback); - } - }, 1000); - } - function onDisconnectCallback(element) { - console.log('onDisconnectCallback====> element=' + JSON.stringify(element)); - } - - function onFailedCallback(code) { - console.log('onFailedCallback====> code=' + JSON.stringify(code)) - } - commonEvent.createSubscriber(subscriberInfo_MainAbility2).then(async (data) => { - console.debug("====>Create Subscriber====>"); - data.getSubscribeInfo().then(async (SubscribeInfo) => { - console.debug("====>SubscribeInfo is====>" + JSON.stringify(SubscribeInfo)); - Subscriber = data; - commonEvent.subscribe(Subscriber, SubscribeCallBack); - console.debug("====>0200start connectAbility====>"); - globalThis.number = await globalThis.abilityContext.connectAbility( - { - bundleName: 'com.acts.actsinterfacemultiusersextensiontest', - abilityName: 'com.acts.actsinterfacemultiusersextensiontest.ServiceAbility' - }, { - onConnect: onConnectCallback, - onDisconnect: onDisconnectCallback, - onFailed: onFailedCallback - }) - console.debug("====>number is====>" + JSON.stringify(globalThis.number)); - }) - }) - - }) - - /* - * @tc.number : ACTS_ExtensionTerminateSelf_0300 - * @tc.name : Use terminateself to terminate ability - * @tc.desc : Starting mainability2 with startAbility then terminateself ability succeeded.(callback) - */ - it('ACTS_ExtensionTerminateSelf_0300', 0, async function (done) { - let Subscriber - var flag = true - var startresult = false - globalThis.startnum = 11 - console.log('====>globalThis.startnum is====>' + globalThis.startnum); - function SubscribeCallBack(err, data) { - expect(data.event == "ACTS_TerminateSelf_CommonEvent").assertTrue(); - console.debug("====>0300 Subscribe CallBack data:====>" + JSON.stringify(data)); - if (data.event == "ACTS_TerminateSelf_CommonEvent") { - startresult = true - } - globalThis.abilityContext.disconnectAbility(globalThis.number).then((data) => { - console.debug("====>data is====>" + JSON.stringify(data)); - }) - console.log('====>disconnectAbility finish'); - commonEvent.unsubscribe(Subscriber, UnSubscribeCallback); - } - commonEvent.createSubscriber(subscriberInfo_MainAbility2).then(async (data) => { - console.debug("====>Create Subscriber====>"); - data.getSubscribeInfo().then(async (SubscribeInfo) => { - console.debug("====>SubscribeInfo is====>" + JSON.stringify(SubscribeInfo)); - Subscriber = data; - commonEvent.subscribe(Subscriber, SubscribeCallBack); - console.debug("====>0300start connectAbility====>"); - globalThis.number = await globalThis.abilityContext.connectAbility( - { - bundleName: 'com.acts.actsinterfacemultiusersextensiontest', - abilityName: 'com.acts.actsinterfacemultiusersextensiontest.ServiceAbility' - }) - console.debug("====>number is====>" + JSON.stringify(globalThis.number)); - }) - }) - - function UnSubscribeCallback() { - console.debug("====>UnSubscribeCallback====>"); - flag = false - expect(startresult).assertEqual(true); - setTimeout(() => { - done() - }, 1000) - } - - function timeout() { - console.debug('in ACTS_ExtensionTerminateSelf_0300 timeout'); - if (flag == true) { - expect().assertFail(); - console.debug('ACTS_ExtensionTerminateSelf_0300 - timeout'); - commonEvent.unsubscribe(Subscriber, UnSubscribeCallback) - } - } - - setTimeout(timeout, START_ABILITY_TIMEOUT); - - }) - - /* - * @tc.number : ACTS_ExtensionTerminateSelf_0400 - * @tc.name : Use terminateself to terminate ability - * @tc.desc : Starting mainability2 with startAbility then terminateself ability failed.(callback) - */ - it('ACTS_ExtensionTerminateSelf_0400', 0, async function (done) { - let Subscriber - var flag = true - var startresult = false - globalThis.startnum = 12 - console.log('====>globalThis.startnum is====>' + globalThis.startnum); - function SubscribeCallBack(err, data) { - expect().assertFail(); - expect(data.event == "ACTS_TerminateSelf_CommonEvent").assertTrue(); - console.debug("====>0400 Subscribe CallBack data:====>" + JSON.stringify(data)); - if (data.event == "ACTS_TerminateSelf_CommonEvent") { - startresult = true - } - commonEvent.unsubscribe(Subscriber, UnSubscribeCallback); - } - function UnSubscribeCallback() { - console.debug("====>UnSubscribeCallback====>"); - flag = false - expect(startresult).assertEqual(false); - globalThis.abilityContext.disconnectAbility(globalThis.number).then((data) => { - console.debug("====>data is====>" + JSON.stringify(data)); - }) - console.log('====>disconnectAbility finish'); - setTimeout(() => { - done(); - }, 1000) - } - function onConnectCallback(element, remote) { - console.log('ACTS_ExtensionTerminateSelf_0400 onConnectCallback====> element=' + JSON.stringify(element)); - console.log('ACTS_ExtensionTerminateSelf_0400 onConnectCallback====> remote=' + JSON.stringify(remote)); - setTimeout(() => { - console.log('====>in timeout'); - console.debug("====>flag is====>" + JSON.stringify(flag)); - if (flag == true) { - console.debug('ACTS_ExtensionTerminateSelf_0400 - timeout'); - commonEvent.unsubscribe(Subscriber, UnSubscribeCallback); - } - }, 1000); - } - function onDisconnectCallback(element) { - console.log('onDisconnectCallback====> element=' + JSON.stringify(element)); - } - - function onFailedCallback(code) { - console.log('onFailedCallback====> code=' + JSON.stringify(code)) - } - commonEvent.createSubscriber(subscriberInfo_MainAbility2).then(async (data) => { - console.debug("====>Create Subscriber====>"); - data.getSubscribeInfo().then(async (SubscribeInfo) => { - console.debug("====>SubscribeInfo is====>" + JSON.stringify(SubscribeInfo)); - Subscriber = data; - commonEvent.subscribe(Subscriber, SubscribeCallBack); - console.debug("====>0400start connectAbility====>"); - globalThis.number = await globalThis.abilityContext.connectAbility( - { - bundleName: 'com.acts.actsinterfacemultiusersextensiontest', - abilityName: 'com.acts.actsinterfacemultiusersextensiontest.ServiceAbility' - }, { - onConnect: onConnectCallback, - onDisconnect: onDisconnectCallback, - onFailed: onFailedCallback - }) - console.debug("====>number is====>" + JSON.stringify(globalThis.number)); - }) - }) - }) - }) -} \ No newline at end of file diff --git a/ability/ability_runtime/actsusers/ActsAmsUsersExtensionSystemTest/entry/src/main/ets/test/List.test.ets b/ability/ability_runtime/actsusers/ActsAmsUsersExtensionSystemTest/entry/src/main/ets/test/List.test.ets deleted file mode 100644 index 87a37045ffc9e7898182239819b483d50d9dafac..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsusers/ActsAmsUsersExtensionSystemTest/entry/src/main/ets/test/List.test.ets +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (c) 2021 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 abilityTest from './Ability.test.ets' - -export default function testsuite() { - console.debug("====>in list.test====>"); - abilityTest() -} \ No newline at end of file diff --git a/ability/ability_runtime/actsusers/ActsAmsUsersExtensionSystemTest/entry/src/main/module.json b/ability/ability_runtime/actsusers/ActsAmsUsersExtensionSystemTest/entry/src/main/module.json deleted file mode 100644 index c72433e358cbfe2390953f60c9d4b8a421913450..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsusers/ActsAmsUsersExtensionSystemTest/entry/src/main/module.json +++ /dev/null @@ -1,129 +0,0 @@ -{ - "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.acts.actsinterfacemultiusersextensiontest.MainAbility", - "srcEntrance": "./ets/MainAbility/MainAbility.ts", - "description": "$string:phone_entry_main", - "icon": "$media:icon", - "label": "$string:entry_label", - "visible": true, - "orientation": "portrait", - "skills": [ - { - "actions": [ - "action.system.home" - ], - "entities": [ - "entity.system.home" - ] - } - ] - }, - { - "name": "com.acts.actsinterfacemultiusersextensiontest.MainAbility2", - "srcEntrance": "./ets/MainAbility2/MainAbility2.ts", - "description": "$string:phone_entry_main", - "icon": "$media:icon", - "label": "$string:entry_label", - "visible": true, - "orientation": "portrait" - } - ], - "extensionAbilities": [ - { - "srcEntrance": "./ets/ServiceAbility/ServiceAbility.ts", - "name": "com.acts.actsinterfacemultiusersextensiontest.ServiceAbility", - "icon": "$media:icon", - "srcLanguage": "ets", - "description": "$string:phone_entry_main", - "type": "service", - "visible": true - }, - { - "srcEntrance": "./ets/ServiceAbility2/ServiceAbility2.ts", - "name": "com.acts.actsinterfacemultiusersextensiontest.ServiceAbility2", - "icon": "$media:icon", - "srcLanguage": "ets", - "description": "$string:phone_entry_main", - "type": "service", - "visible": true - } - ], - "defPermissions": [ - { - "availableScope": [], - "grantMode": "system_grant", - "name": "ohos.permission.MANAGE_LOCAL_ACCOUNTS" - }, - { - "availableScope": [], - "grantMode": "system_grant", - "name": "ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS_EXTENSION" - } - ], - "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.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.MANAGE_LOCAL_ACCOUNTS", - "reason": "need use ohos.permission.MANAGE_LOCAL_ACCOUNTS" - }, - { - "name": "ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS_EXTENSION", - "reason": "need use ohos.permission.MANAGE_LOCAL_ACCOUNTS" - }, - { - "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" - } - ] - } -} diff --git a/ability/ability_runtime/actsusers/ActsAmsUsersExtensionSystemTest/entry/src/main/resources/base/element/string.json b/ability/ability_runtime/actsusers/ActsAmsUsersExtensionSystemTest/entry/src/main/resources/base/element/string.json deleted file mode 100644 index d75325f3cf0a50c1dfe4dbc5162c8737276c3dd9..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsusers/ActsAmsUsersExtensionSystemTest/entry/src/main/resources/base/element/string.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "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" - } - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/actsusers/ActsAmsUsersExtensionSystemTest/entry/src/main/resources/base/media/icon.png b/ability/ability_runtime/actsusers/ActsAmsUsersExtensionSystemTest/entry/src/main/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actsusers/ActsAmsUsersExtensionSystemTest/entry/src/main/resources/base/media/icon.png and /dev/null differ diff --git a/ability/ability_runtime/actsusers/ActsAmsUsersExtensionSystemTest/entry/src/main/resources/base/profile/main_pages.json b/ability/ability_runtime/actsusers/ActsAmsUsersExtensionSystemTest/entry/src/main/resources/base/profile/main_pages.json deleted file mode 100644 index 02221db61d317863114ff0ca4dd2b33586abff12..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsusers/ActsAmsUsersExtensionSystemTest/entry/src/main/resources/base/profile/main_pages.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "src": [ - "MainAbility/pages/index/index", - "MainAbility/pages/second/second" - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/actsusers/ActsAmsUsersExtensionSystemTest/signature/openharmony_sx.p7b b/ability/ability_runtime/actsusers/ActsAmsUsersExtensionSystemTest/signature/openharmony_sx.p7b deleted file mode 100644 index dcec6c9615032c1b48bf185e839d9720dd68aab0..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actsusers/ActsAmsUsersExtensionSystemTest/signature/openharmony_sx.p7b and /dev/null differ diff --git a/ability/ability_runtime/actsusers/ActsAmsUsersExtensionThirdTest/AppScope/app.json b/ability/ability_runtime/actsusers/ActsAmsUsersExtensionThirdTest/AppScope/app.json deleted file mode 100644 index 2dccd99e896b2eaf5691f18ec780f1f5509dbddf..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsusers/ActsAmsUsersExtensionThirdTest/AppScope/app.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "app": { - "bundleName": "com.acts.actsinterfacemultiusersextensionthirdtest", - "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 - } - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsusers/ActsAmsUsersExtensionThirdTest/AppScope/resources/base/element/string.json b/ability/ability_runtime/actsusers/ActsAmsUsersExtensionThirdTest/AppScope/resources/base/element/string.json deleted file mode 100644 index 0d3507c0d180557b94bc5f0071ba146b4909fe51..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsusers/ActsAmsUsersExtensionThirdTest/AppScope/resources/base/element/string.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "string": [ - { - "name": "app_name", - "value": "ohosProject" - } - ] -} diff --git a/ability/ability_runtime/actsusers/ActsAmsUsersExtensionThirdTest/AppScope/resources/base/media/app_icon.png b/ability/ability_runtime/actsusers/ActsAmsUsersExtensionThirdTest/AppScope/resources/base/media/app_icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actsusers/ActsAmsUsersExtensionThirdTest/AppScope/resources/base/media/app_icon.png and /dev/null differ diff --git a/ability/ability_runtime/actsusers/ActsAmsUsersExtensionThirdTest/BUILD.gn b/ability/ability_runtime/actsusers/ActsAmsUsersExtensionThirdTest/BUILD.gn deleted file mode 100644 index 55d3e644f20fb3c75d9e27a31f187fed014012ca..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsusers/ActsAmsUsersExtensionThirdTest/BUILD.gn +++ /dev/null @@ -1,43 +0,0 @@ -# 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_js_hap_suite("ActsAmsUsersExtensionThirdTest") { - hap_profile = "entry/src/main/module.json" - js_build_mode = "debug" - deps = [ - ":actsamsusersextensionthirdtest_js_assets", - ":actsamsusersextensionthirdtest_resources", - ] - ets2abc = true - certificate_profile = "signature/openharmony_sx.p7b" - hap_name = "ActsAmsUsersExtensionThirdTest" - subsystem_name = "ability" - part_name = "ability_runtime" -} - -ohos_app_scope("actsamsusersextensionthirdtest_app_profile") { - app_profile = "AppScope/app.json" - sources = [ "AppScope/resources" ] -} - -ohos_js_assets("actsamsusersextensionthirdtest_js_assets") { - source_dir = "entry/src/main/ets" -} - -ohos_resources("actsamsusersextensionthirdtest_resources") { - sources = [ "entry/src/main/resources" ] - deps = [ ":actsamsusersextensionthirdtest_app_profile" ] - hap_profile = "entry/src/main/module.json" -} diff --git a/ability/ability_runtime/actsusers/ActsAmsUsersExtensionThirdTest/Test.json b/ability/ability_runtime/actsusers/ActsAmsUsersExtensionThirdTest/Test.json deleted file mode 100644 index c63a35a36676032db176e329090140cfd878418f..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsusers/ActsAmsUsersExtensionThirdTest/Test.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "description": "Configuration for hjunit demo Tests", - "driver": { - "type": "OHJSUnitTest", - "test-timeout": "300000", - "bundle-name": "com.acts.actsinterfacemultiusersextensionthirdtest", - "module-name":"phone", - "shell-timeout": "300000", - "testcase-timeout": "30000" - }, - "kits": [ - { - "type": "ShellKit", - "run-command": [ - "acm create -n user101 -t normal", - "acm switch -i 101" - ], - "teardown-command": [ - "acm switch -i 100", - "acm delete -i 101" - ] - }, - { - "test-file-name": [ - "ActsAmsUsersExtensionThirdTest.hap" - ], - "type": "AppInstallKit", - "cleanup-apps": true - } - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/actsusers/ActsAmsUsersExtensionThirdTest/entry/src/main/ets/Application/AbilityStage.ts b/ability/ability_runtime/actsusers/ActsAmsUsersExtensionThirdTest/entry/src/main/ets/Application/AbilityStage.ts deleted file mode 100644 index 159f48742031f407af4b1016035bf01e8e12a10a..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsusers/ActsAmsUsersExtensionThirdTest/entry/src/main/ets/Application/AbilityStage.ts +++ /dev/null @@ -1,23 +0,0 @@ -/* -* 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" - -export default class MyAbilityStage extends AbilityStage { - onCreate() { - console.log("MyAbilityStage onCreate") - globalThis.stageOnCreateRun = 1; - globalThis.stageContext = this.context; - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsusers/ActsAmsUsersExtensionThirdTest/entry/src/main/ets/MainAbility/MainAbility.ts b/ability/ability_runtime/actsusers/ActsAmsUsersExtensionThirdTest/entry/src/main/ets/MainAbility/MainAbility.ts deleted file mode 100644 index e2707cec8cbc04da7acb6f4cb23f4060c1e6d10d..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsusers/ActsAmsUsersExtensionThirdTest/entry/src/main/ets/MainAbility/MainAbility.ts +++ /dev/null @@ -1,54 +0,0 @@ -/* - * 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 AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry' -import { Hypium } from '@ohos/hypium' -import testsuite from '../test/List.test' - -export default class MainAbility extends Ability { - onCreate(want, launchParam) { - console.log('MainAbility onCreate') - globalThis.abilityWant = want; - globalThis.abilityContext = this.context; - var abilityDelegator: any - abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() - var abilityDelegatorArguments: any - abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments() - console.info('start run testcase!!!') - Hypium.hypiumTest(abilityDelegator, abilityDelegatorArguments, testsuite) - } - - onDestroy() { - console.log('MainAbility onDestroy') - } - - onWindowStageCreate(windowStage) { - console.log('MainAbility onWindowStageCreate') - windowStage.setUIContent(this.context, 'MainAbility/pages/index/index', null) - } - - onWindowStageDestroy() { - console.log('MainAbility onWindowStageDestroy') - } - - onForeground() { - console.log('MainAbility onForeground') - } - - onBackground() { - console.log('MainAbility onBackground') - } - -}; \ No newline at end of file diff --git a/ability/ability_runtime/actsusers/ActsAmsUsersExtensionThirdTest/entry/src/main/ets/MainAbility/pages/index/index.ets b/ability/ability_runtime/actsusers/ActsAmsUsersExtensionThirdTest/entry/src/main/ets/MainAbility/pages/index/index.ets deleted file mode 100644 index 3213051cd207a81d45aa7fac27cf772e8eade194..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsusers/ActsAmsUsersExtensionThirdTest/entry/src/main/ets/MainAbility/pages/index/index.ets +++ /dev/null @@ -1,31 +0,0 @@ -/* - * 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. - */ -@Entry -@Component -struct Index { - @State message: string = 'ActsAmsUsersExtensionSystemTest' - - build() { - Row() { - Column() { - Text(this.message) - .fontSize(50) - .fontWeight(FontWeight.Bold) - } - .width('100%') - } - .height('100%') - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsusers/ActsAmsUsersExtensionThirdTest/entry/src/main/ets/MainAbility/pages/second/second.ets b/ability/ability_runtime/actsusers/ActsAmsUsersExtensionThirdTest/entry/src/main/ets/MainAbility/pages/second/second.ets deleted file mode 100644 index 7d77623164cfc87c809713272776bff63fefbbd9..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsusers/ActsAmsUsersExtensionThirdTest/entry/src/main/ets/MainAbility/pages/second/second.ets +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 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 diff --git a/ability/ability_runtime/actsusers/ActsAmsUsersExtensionThirdTest/entry/src/main/ets/MainAbility2/MainAbility2.ts b/ability/ability_runtime/actsusers/ActsAmsUsersExtensionThirdTest/entry/src/main/ets/MainAbility2/MainAbility2.ts deleted file mode 100644 index 9623986e8c1deb65c7e033e1de0449e94bddd80a..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsusers/ActsAmsUsersExtensionThirdTest/entry/src/main/ets/MainAbility2/MainAbility2.ts +++ /dev/null @@ -1,53 +0,0 @@ -/* - * 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" - -export default class MainAbility2 extends Ability { - - onCreate(want, launchParam) { - console.log("MainAbility2 onCreate"); - globalThis.abilityContext2 = this.context - } - - onDestroy() { - console.log("MainAbility2 onDestroy"); - } - - onWindowStageCreate(windowStage) { - console.log("MainAbility2 onWindowStageCreate"); - windowStage.setUIContent(this.context, "MainAbility/pages/index/second", null); - commonEvent.publish("ACTS_InterfaceMultiUsersExtension_CommonEvent", () => { - console.log("publish Publish ACTS_InterfaceMultiUsersExtension_CommonEvent callback") - globalThis.abilityContext2.terminateSelf().then(() => { - commonEvent.publish("ACTS_TerminateSelf_CommonEvent", ()=>{ - console.log('terminateSelf promise'); - }); - }); - }) - } - - onWindowStageDestroy() { - console.log("MainAbility2 onWindowStageDestroy"); - } - - onForeground() { - console.log("MainAbility2 onForeground"); - } - - onBackground() { - console.log("MainAbility2 onBackground"); - } -}; diff --git a/ability/ability_runtime/actsusers/ActsAmsUsersExtensionThirdTest/entry/src/main/ets/ServiceAbility/ServiceAbility.ts b/ability/ability_runtime/actsusers/ActsAmsUsersExtensionThirdTest/entry/src/main/ets/ServiceAbility/ServiceAbility.ts deleted file mode 100644 index f363a918d8db101f7e8ac80356b701290fc88e0d..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsusers/ActsAmsUsersExtensionThirdTest/entry/src/main/ets/ServiceAbility/ServiceAbility.ts +++ /dev/null @@ -1,206 +0,0 @@ -/* - * 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 ServiceExtensionAbility from '@ohos.application.ServiceExtensionAbility' -import Want from '@ohos.application.Want'; -import rpc from '@ohos.rpc'; -class Stub extends rpc.RemoteObject { - constructor(des) { - super(des); - } - onRemoteRequest(code, data, reply, option) { - reply.writeNoException(); - reply.writeString("success"); - return true; - } -} -export default class ServiceAbility extends ServiceExtensionAbility { - onCreate(want:Want) { - console.log('ServiceAbility onCreate'); - } - onDestory(){ - console.log('ServiceAbility onDestory'); - } - onRequest(want,startId) { - console.log('ServiceAbility onRequest'); - } - - onConnect(want) { - console.log('ServiceAbility onConnect'); - console.log('globalThis.startnum is' + globalThis.startnum); - switch (globalThis.startnum) { - case 1: - this.context.startAbility( - { - bundleName: 'com.acts.actsinterfacemultiusersextensionthirdtest', - abilityName: 'com.acts.actsinterfacemultiusersextensionthirdtest.MainAbility2' - },{ - windowMode:0 - } - ).then((data) => { - console.debug("====>startAbility end====>"); - console.debug("====>data is====>" + JSON.stringify(data)); - }) - break; - case 2: - this.context.startAbility( - { - bundleName: 'com.acts.error', - abilityName: 'com.acts.error.MainAbility2' - },{ - windowMode:0 - }).then(()=>{ - console.debug("====>startAbility end====>"); - }) - console.debug("====>case 2 end====>"); - var myStub1 = new Stub("com.acts.actsinterfacemultiusersextensionthirdtest.MainAbility"); - console.log('ThirdAbility onConnect before return:') - return myStub1; - break; - case 3: - this.context.startAbility( - { - bundleName: 'com.acts.actsinterfacemultiusersextensionthirdtest', - abilityName: 'com.acts.actsinterfacemultiusersextensionthirdtest.MainAbility2' - },{ - windowMode:0 - },(err,data) => { - console.debug("====>err is====>" + JSON.stringify(err)); - console.debug("====>startAbility end====>" ); - }) - var myStub7 = new Stub("com.acts.actsinterfacemultiusersextensionthirdtest.MainAbility"); - console.log('ThirdAbility onConnect before return:') - return myStub7; - break; - case 4: - this.context.startAbility( - { - bundleName: 'com.acts.error', - abilityName: 'com.acts.error.MainAbility2' - },{ - windowMode:0 - },(err,data) => { - console.debug("====>err is====>" + JSON.stringify(err)); - console.debug("====>startAbility end====>" ); - }) - var myStub2 = new Stub("com.acts.actsinterfacemultiusersextensionthirdtest.MainAbility"); - console.log('ThirdAbility onConnect before return:') - return myStub2; - break; - case 5: - this.context.startAbility( - { - bundleName: 'com.acts.actsinterfacemultiusersextensionthirdtest', - abilityName: 'com.acts.actsinterfacemultiusersextensionthirdtest.ServiceAbility2' - }).then((data)=>{ - console.debug("====>startAbility end====>"); - console.debug("====>data is====>" + JSON.stringify(data)); - }) - break; - case 6: - this.context.startAbility( - { - bundleName: 'com.acts.error', - abilityName: 'com.acts.error.ServiceAbility2' - }).then(()=>{ - console.debug("====>startAbility end====>"); - }) - var myStub3 = new Stub("com.acts.actsinterfacemultiusersextensionthirdtest.MainAbility"); - console.log('ThirdAbility onConnect before return:') - return myStub3; - break; - case 7: - this.context.startAbility( - { - bundleName: 'com.acts.actsinterfacemultiusersextensionthirdtest', - abilityName: 'com.acts.actsinterfacemultiusersextensionthirdtest.ServiceAbility2' - },(err,data) => { - console.debug("====>err is====>" + JSON.stringify(err)); - console.debug("====>startAbility end====>" ); - }) - var myStub8 = new Stub("com.acts.actsinterfacemultiusersextensionthirdtest.MainAbility"); - console.log('ThirdAbility onConnect before return:') - return myStub8; - break; - case 8: - this.context.startAbility( - { - bundleName: 'com.acts.error', - abilityName: 'com.acts.error.ServiceAbility2' - },(err,data) => { - console.debug("====>err is====>" + JSON.stringify(err)); - console.debug("====>startAbility end====>" ); - }) - var myStub4 = new Stub("com.acts.actsinterfacemultiusersextensionthirdtest.MainAbility"); - console.log('ThirdAbility onConnect before return:') - return myStub4; - break; - case 9: - this.context.startAbility( - { - bundleName: 'com.acts.actsinterfacemultiusersextensionthirdtest', - abilityName: 'com.acts.actsinterfacemultiusersextensionthirdtest.ServiceAbility2' - }).then(()=>{ - console.debug("====>startAbility end====>"); - }) - break; - case 10: - this.context.startAbility( - { - bundleName: 'com.acts.error', - abilityName: 'com.acts.error.ServiceAbility2' - }).then(()=>{ - console.debug("====>startAbility end====>"); - }) - var myStub5 = new Stub("com.acts.actsinterfacemultiusersextensionthirdtest.MainAbility"); - console.log('ThirdAbility onConnect before return:') - return myStub5; - break; - case 11: - this.context.startAbility( - { - bundleName: 'com.acts.actsinterfacemultiusersextensionthirdtest', - abilityName: 'com.acts.actsinterfacemultiusersextensionthirdtest.ServiceAbility2' - }).then(()=>{ - console.debug("====>startAbility end====>"); - }) - break; - case 12: - this.context.startAbility( - { - bundleName: 'com.acts.error', - abilityName: 'com.acts.error.ServiceAbility2' - },(err,data) => { - console.debug("====>err is====>" + JSON.stringify(err)); - console.debug("====>startAbility end====>" ); - }) - var myStub6 = new Stub("com.acts.actsinterfacemultiusersextensionthirdtest.MainAbility"); - console.log('ThirdAbility onConnect before return:') - return myStub6; - break; - default: - break; - } - return new rpc.RemoteObject('connect'); - } - - onDisconnect(want) { - console.log('ServiceAbility onDisconnect'); - } - - onDestroy() { - console.log('ServiceAbility onDestroy'); - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsusers/ActsAmsUsersExtensionThirdTest/entry/src/main/ets/ServiceAbility2/ServiceAbility2.ts b/ability/ability_runtime/actsusers/ActsAmsUsersExtensionThirdTest/entry/src/main/ets/ServiceAbility2/ServiceAbility2.ts deleted file mode 100644 index d871d5edf1ac0c2fb29fbb88dc33044537aa6c26..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsusers/ActsAmsUsersExtensionThirdTest/entry/src/main/ets/ServiceAbility2/ServiceAbility2.ts +++ /dev/null @@ -1,54 +0,0 @@ -/* - * 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 ServiceExtensionAbility from '@ohos.application.ServiceExtensionAbility' -import commonEvent from "@ohos.commonEvent" -import Want from '@ohos.application.Want'; -import rpc from "@ohos.rpc"; - -export default class ServiceAbility2 extends ServiceExtensionAbility { - onCreate(want:Want) { - console.log('ServiceAbility2 onCreate'); - } - - onDestory(){ - console.log('ServiceAbility2 onDestory'); - } - - onRequest(want,startId) { - console.log('ServiceAbility2 onRequest'); - commonEvent.publish("ACTS_InterfaceMultiUsersExtension_CommonEvent", () => { - console.log("publish Publish ACTS_InterfaceMultiUsersExtension_CommonEvent callback") - this.context.terminateSelf().then(() => { - commonEvent.publish("ACTS_TerminateSelf_CommonEvent", ()=>{ - console.log('terminateSelf promise'); - }); - }); - }) - } - - onConnect(want) { - console.log('ServiceAbility2 onConnect'); - return new rpc.RemoteObject('connect'); - } - - onDisconnect(want) { - console.log('ServiceAbility2 onDisconnect, want:' + want.abilityName); - } - - onDestroy() { - console.log('ServiceAbility2 onDestroy'); - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsusers/ActsAmsUsersExtensionThirdTest/entry/src/main/ets/TestAbility/TestAbility.ts b/ability/ability_runtime/actsusers/ActsAmsUsersExtensionThirdTest/entry/src/main/ets/TestAbility/TestAbility.ts deleted file mode 100644 index e9f9aadff45f162df116bfe3a90661ea6ab331dc..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsusers/ActsAmsUsersExtensionThirdTest/entry/src/main/ets/TestAbility/TestAbility.ts +++ /dev/null @@ -1,51 +0,0 @@ -/* - * 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' - -export default class TestAbility extends Ability { - onCreate(want, launchParam) { - console.log('TestAbility onCreate') - } - - onDestroy() { - console.log('TestAbility onDestroy') - } - - onWindowStageCreate(windowStage) { - console.log('TestAbility onWindowStageCreate') - windowStage.loadContent("TestAbility/pages/index", (err, data) => { - if (err.code) { - console.error('Failed to load the content. Cause:' + JSON.stringify(err)); - return; - } - console.info('Succeeded in loading the content. Data: ' + JSON.stringify(data)) - }); - - globalThis.abilityContext = this.context; - } - - onWindowStageDestroy() { - console.log('TestAbility onWindowStageDestroy') - } - - onForeground() { - console.log('TestAbility onForeground') - } - - onBackground() { - console.log('TestAbility onBackground') - } -}; \ No newline at end of file diff --git a/ability/ability_runtime/actsusers/ActsAmsUsersExtensionThirdTest/entry/src/main/ets/TestAbility/pages/index.ets b/ability/ability_runtime/actsusers/ActsAmsUsersExtensionThirdTest/entry/src/main/ets/TestAbility/pages/index.ets deleted file mode 100644 index fae969f985ff5bf7432de71e36c792364ebac1f6..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsusers/ActsAmsUsersExtensionThirdTest/entry/src/main/ets/TestAbility/pages/index.ets +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2021 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 '@ohos.router'; - -@Entry -@Component -struct Index { - aboutToAppear() { - console.info('TestAbility index aboutToAppear') - } - @State message: string = 'Hello World' - build() { - Row() { - Column() { - Text(this.message) - .fontSize(50) - .fontWeight(FontWeight.Bold) - Button() { - Text('next page') - .fontSize(20) - .fontWeight(FontWeight.Bold) - }.type(ButtonType.Capsule) - .margin({ - top: 20 - }) - .backgroundColor('#0D9FFB') - .width('35%') - .height('5%') - .onClick(()=>{ - }) - } - .width('100%') - } - .height('100%') - } - } \ No newline at end of file diff --git a/ability/ability_runtime/actsusers/ActsAmsUsersExtensionThirdTest/entry/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts b/ability/ability_runtime/actsusers/ActsAmsUsersExtensionThirdTest/entry/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts deleted file mode 100644 index 8b106a82e3b4cc5d0d6046651a54aa9a1d7ed46d..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsusers/ActsAmsUsersExtensionThirdTest/entry/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts +++ /dev/null @@ -1,78 +0,0 @@ -/* - * 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 TestRunner from '@ohos.application.testRunner' -import AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry' - -var abilityDelegator = undefined -var abilityDelegatorArguments = undefined - -function translateParamsToString(parameters) { - const keySet = new Set([ - '-s class', '-s notClass', '-s suite', '-s it', - '-s level', '-s testType', '-s size', '-s timeout', - '-s dryRun' - ]) - let targetParams = ''; - for (const key in parameters) { - if (keySet.has(key)) { - targetParams = `${targetParams} ${key} ${parameters[key]}` - } - } - return targetParams.trim() -} - -async function onAbilityCreateCallback() { - console.log("onAbilityCreateCallback"); -} - -async function addAbilityMonitorCallback(err: any) { - console.info("addAbilityMonitorCallback : " + JSON.stringify(err)) -} - -export default class OpenHarmonyTestRunner implements TestRunner { - constructor() { - } - - onPrepare() { - console.info("OpenHarmonyTestRunner OnPrepare ") - } - - async onRun() { - console.log('OpenHarmonyTestRunner onRun run') - abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments() - abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() - var testAbilityName = abilityDelegatorArguments.bundleName + '.MainAbility' - let lMonitor = { - abilityName: testAbilityName, - onAbilityCreate: onAbilityCreateCallback, - }; - abilityDelegator.addAbilityMonitor(lMonitor, addAbilityMonitorCallback) - var cmd = 'aa start -d 0 -a com.acts.actsinterfacemultiusersextensionthirdtest.MainAbility' + ' -b ' + abilityDelegatorArguments.bundleName - cmd += ' '+translateParamsToString(abilityDelegatorArguments.parameters) - var debug = abilityDelegatorArguments.parameters["-D"] - if (debug == 'true') - { - cmd += ' -D' - } - console.info('cmd : '+cmd) - abilityDelegator.executeShellCommand(cmd, - (err: any, d: any) => { - console.info('executeShellCommand : err : ' + JSON.stringify(err)); - console.info('executeShellCommand : data : ' + d.stdResult); - console.info('executeShellCommand : data : ' + d.exitCode); - }) - console.info('OpenHarmonyTestRunner onRun end') - } -}; \ No newline at end of file diff --git a/ability/ability_runtime/actsusers/ActsAmsUsersExtensionThirdTest/entry/src/main/ets/test/Ability.test.ets b/ability/ability_runtime/actsusers/ActsAmsUsersExtensionThirdTest/entry/src/main/ets/test/Ability.test.ets deleted file mode 100644 index 044a87d3647bfd0ffc8dc13bb18a207f97e83335..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsusers/ActsAmsUsersExtensionThirdTest/entry/src/main/ets/test/Ability.test.ets +++ /dev/null @@ -1,828 +0,0 @@ -/* - * 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 {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "@ohos/hypium" -import commonEvent from '@ohos.commonEvent' -import osaccount from '@ohos.account.osAccount' - -var subscriberInfo_MainAbility = { - events: ["ACTS_InterfaceMultiUsersExtension_CommonEvent"] -}; -var subscriberInfo_MainAbility2 = { - events: ["ACTS_TerminateSelf_CommonEvent"] -}; -var osAccountManager -const START_ABILITY_TIMEOUT = 6000; -globalThis.number = 0; -console.debug("====>in Ability.test====>"); -export default function abilityTest() { - console.debug("====>in function abilityTest====>"); - describe('ActsInterfaceMultiUsersExtensionThirdTest', function () { - console.debug("====>in ACTS_InterfaceMultiUsers====>"); - - /* - * @tc.number : ACTS_ThirdPartyExtensionStartAbility_0100 - * @tc.name : start new ability - * @tc.desc : Start an ability with the parameter startability with options succeeded.(promise) - */ - it('ACTS_ThirdPartyExtensionStartAbility_0100', 0, async function (done) { - let Subscriber - var flag = true - var startresult = false - globalThis.startnum = 1 - console.log('====>globalThis.startnum is====>' + globalThis.startnum); - function SubscribeCallBack (err, data) { - expect(data.event == "ACTS_InterfaceMultiUsersExtension_CommonEvent").assertTrue(); - console.debug("====>0100 Subscribe CallBack data:====>" + JSON.stringify(data)); - if(data.event == "ACTS_InterfaceMultiUsersExtension_CommonEvent"){ - startresult = true - } - globalThis.abilityContext.disconnectAbility(globalThis.number).then((data)=>{ - console.debug("====>data is====>" + JSON.stringify(data)); - }) - console.log('====>disconnectAbility finish'); - commonEvent.unsubscribe(Subscriber, UnSubscribeCallback); - } - commonEvent.createSubscriber(subscriberInfo_MainAbility).then(async (data) => { - console.debug("====>Create Subscriber====>"); - data.getSubscribeInfo().then(async (SubscribeInfo)=>{ - console.debug("====>SubscribeInfo is====>" + JSON.stringify(SubscribeInfo)); - Subscriber = data; - commonEvent.subscribe(Subscriber, SubscribeCallBack); - console.debug("====>0100start connectAbility====>"); - globalThis.number = await globalThis.abilityContext.connectAbility( - { - bundleName: 'com.acts.actsinterfacemultiusersextensionthirdtest', - abilityName: 'com.acts.actsinterfacemultiusersextensionthirdtest.ServiceAbility' - }) - console.debug("====>number is====>" + JSON.stringify(globalThis.number)); - }) - }) - - function UnSubscribeCallback() { - console.debug("====>UnSubscribeCallback====>"); - flag = false - expect(startresult).assertEqual(true); - setTimeout(()=>{ - done() - },1000) - } - - function timeout() { - console.debug('in ACTS_ThirdPartyExtensionStartAbility_0100 timeout'); - if(flag == true) { - expect().assertFail(); - console.debug('ACTS_ThirdPartyExtensionStartAbility_0100 - timeout'); - commonEvent.unsubscribe(Subscriber, UnSubscribeCallback) - } - } - - setTimeout(timeout, START_ABILITY_TIMEOUT); - }) - - /* - * @tc.number : ACTS_ThirdPartyExtensionStartAbility_0200 - * @tc.name : start new ability - * @tc.desc : Start an ability with the parameter startability with options failed.(promise) - */ - it('ACTS_ThirdPartyExtensionStartAbility_0200', 0, async function (done) { - let Subscriber - var flag = true - var startresult = false - globalThis.startnum = 2 - console.log('====>globalThis.startnum is====>' + globalThis.startnum); - function SubscribeCallBack (err, data) { - expect().assertFail(); - expect(data.event == "ACTS_InterfaceMultiUsersExtension_CommonEvent").assertTrue(); - console.debug("====>0200 Subscribe CallBack data:====>" + JSON.stringify(data)); - if(data.event == "ACTS_InterfaceMultiUsersExtension_CommonEvent"){ - startresult = true - } - commonEvent.unsubscribe(Subscriber, UnSubscribeCallback); - } - function UnSubscribeCallback() { - console.debug("====>UnSubscribeCallback====>"); - flag = false - expect(startresult).assertEqual(false); - globalThis.abilityContext.disconnectAbility(globalThis.number).then((data)=>{ - console.debug("====>data is====>" + JSON.stringify(data)); - }) - console.log('====>disconnectAbility finish'); - setTimeout(()=>{ - done(); - },1000) - } - function onConnectCallback(element, remote) { - console.log(' onConnectCallback====> element=' + JSON.stringify(element)); - console.log(' onConnectCallback====> remote=' + JSON.stringify(remote)); - setTimeout(()=> { - console.log('====>in timeout'); - console.debug("====>flag is====>" + JSON.stringify(flag)); - if(flag == true) { - console.debug('ACTS_ThirdPartyExtensionStartAbility_0200 - timeout'); - commonEvent.unsubscribe(Subscriber, UnSubscribeCallback); - } - }, 1000); - } - function onDisconnectCallback(element) { - console.log('onDisconnectCallback====> element=' + JSON.stringify(element)); - } - - function onFailedCallback(code) { - console.log('onFailedCallback====> code=' + JSON.stringify(code)) - } - commonEvent.createSubscriber(subscriberInfo_MainAbility).then(async (data) => { - console.debug("====>Create Subscriber====>"); - data.getSubscribeInfo().then(async (SubscribeInfo)=>{ - console.debug("====>SubscribeInfo is====>" + JSON.stringify(SubscribeInfo)); - Subscriber = data; - commonEvent.subscribe(Subscriber, SubscribeCallBack); - console.debug("====>0200start connectAbility====>"); - globalThis.number = await globalThis.abilityContext.connectAbility( - { - bundleName: 'com.acts.actsinterfacemultiusersextensionthirdtest', - abilityName: 'com.acts.actsinterfacemultiusersextensionthirdtest.ServiceAbility' - },{ - onConnect:onConnectCallback, - onDisconnect:onDisconnectCallback, - onFailed: onFailedCallback - }) - console.debug("====>number is====>" + JSON.stringify(globalThis.number)); - }) - }) - }) - - /* - * @tc.number : ACTS_ThirdPartyExtensionStartAbility_0300 - * @tc.name : start new ability - * @tc.desc : Start an ability with the parameter startability with options succeeded.(callback) - */ - it('ACTS_ThirdPartyExtensionStartAbility_0300', 0, async function (done) { - let Subscriber - var flag = true - var startresult = false - globalThis.startnum=3 - console.log('====>globalThis.startnum is====>' + globalThis.startnum); - function SubscribeCallBack (err, data) { - expect(data.event == "ACTS_InterfaceMultiUsersExtension_CommonEvent").assertTrue(); - console.debug("====>0300 Subscribe CallBack data:====>" + JSON.stringify(data)); - if(data.event == "ACTS_InterfaceMultiUsersExtension_CommonEvent"){ - startresult = true - } - globalThis.abilityContext.disconnectAbility(globalThis.number).then((data)=>{ - console.debug("====>data is====>" + JSON.stringify(data)); - }) - console.log('====>disconnectAbility finish'); - commonEvent.unsubscribe(Subscriber, UnSubscribeCallback); - } - commonEvent.createSubscriber(subscriberInfo_MainAbility).then(async (data) => { - console.debug("====>Create Subscriber====>"); - data.getSubscribeInfo().then(async (SubscribeInfo)=>{ - console.debug("====>SubscribeInfo is====>" + JSON.stringify(SubscribeInfo)); - Subscriber = data; - commonEvent.subscribe(Subscriber, SubscribeCallBack); - console.debug("====>0300start connectAbility====>"); - globalThis.number = await globalThis.abilityContext.connectAbility( - { - bundleName: 'com.acts.actsinterfacemultiusersextensionthirdtest', - abilityName: 'com.acts.actsinterfacemultiusersextensionthirdtest.ServiceAbility' - }) - console.debug("====>number is====>" + JSON.stringify(globalThis.number)); - }) - }) - - function UnSubscribeCallback() { - console.debug("====>UnSubscribeCallback====>"); - flag = false - expect(startresult).assertEqual(true); - setTimeout(()=>{ - done() - },1000) - } - - function timeout() { - console.debug('in ACTS_ThirdPartyExtensionStartAbility_0300 timeout'); - if(flag == true) { - expect().assertFail(); - console.debug('ACTS_ThirdPartyExtensionStartAbility_0300 - timeout'); - commonEvent.unsubscribe(Subscriber, UnSubscribeCallback) - } - } - - setTimeout(timeout, START_ABILITY_TIMEOUT); - }) - - /* - * @tc.number : ACTS_ThirdPartyExtensionStartAbility_0400 - * @tc.name : start new ability - * @tc.desc : Start an ability with the parameter startability with options failed.(callback) - */ - it('ACTS_ThirdPartyExtensionStartAbility_0400', 0, async function (done) { - let Subscriber - var flag = true - var startresult = false - globalThis.startnum = 4 - console.log('====>globalThis.startnum is====>' + globalThis.startnum); - function SubscribeCallBack (err, data) { - expect().assertFail(); - expect(data.event == "ACTS_InterfaceMultiUsersExtension_CommonEvent").assertTrue(); - console.debug("====>0400 Subscribe CallBack data:====>" + JSON.stringify(data)); - if(data.event == "ACTS_InterfaceMultiUsersExtension_CommonEvent"){ - startresult = true - } - commonEvent.unsubscribe(Subscriber, UnSubscribeCallback); - } - function UnSubscribeCallback() { - console.debug("====>UnSubscribeCallback====>"); - flag = false - expect(startresult).assertEqual(false); - globalThis.abilityContext.disconnectAbility(globalThis.number).then((data)=>{ - console.debug("====>data is====>" + JSON.stringify(data)); - }) - console.log('====>disconnectAbility finish'); - setTimeout(()=>{ - done(); - },1000) - } - function onConnectCallback(element, remote) { - console.log(' onConnectCallback====> element=' + JSON.stringify(element)); - console.log(' onConnectCallback====> remote=' + JSON.stringify(remote)); - setTimeout(()=> { - console.log('====>in timeout'); - console.debug("====>flag is====>" + JSON.stringify(flag)); - if(flag == true) { - console.debug('ACTS_ThirdPartyExtensionStartAbility_0400 - timeout'); - commonEvent.unsubscribe(Subscriber, UnSubscribeCallback); - } - }, 1000); - } - function onDisconnectCallback(element) { - console.log('onDisconnectCallback====> element=' + JSON.stringify(element)); - } - - function onFailedCallback(code) { - console.log('onFailedCallback====> code=' + JSON.stringify(code)) - } - commonEvent.createSubscriber(subscriberInfo_MainAbility).then(async (data) => { - console.debug("====>Create Subscriber====>"); - data.getSubscribeInfo().then(async (SubscribeInfo)=>{ - console.debug("====>SubscribeInfo is====>" + JSON.stringify(SubscribeInfo)); - Subscriber = data; - commonEvent.subscribe(Subscriber, SubscribeCallBack); - console.debug("====>0400start connectAbility====>"); - globalThis.number = await globalThis.abilityContext.connectAbility( - { - bundleName: 'com.acts.actsinterfacemultiusersextensionthirdtest', - abilityName: 'com.acts.actsinterfacemultiusersextensionthirdtest.ServiceAbility' - },{ - onConnect:onConnectCallback, - onDisconnect:onDisconnectCallback, - onFailed: onFailedCallback - }) - console.debug("====>number is====>" + JSON.stringify(globalThis.number)); - }) - }) - - }) - - /* - * @tc.number : ACTS_ThirdPartyExtensionStartAbility_0500 - * @tc.name : start new ability - * @tc.desc : Starting mainability2 with startability succeeded.(promise) - */ - it('ACTS_ThirdPartyExtensionStartAbility_0500', 0, async function (done) { - let Subscriber - var flag = true - var startresult = false - globalThis.startnum = 5 - console.log('====>globalThis.startnum is====>' + globalThis.startnum); - function SubscribeCallBack (err, data) { - expect(data.event == "ACTS_InterfaceMultiUsersExtension_CommonEvent").assertTrue(); - console.debug("====>0500 Subscribe CallBack data:====>" + JSON.stringify(data)); - if(data.event == "ACTS_InterfaceMultiUsersExtension_CommonEvent"){ - startresult = true - } - globalThis.abilityContext.disconnectAbility(globalThis.number).then((data)=>{ - console.debug("====>data is====>" + JSON.stringify(data)); - }) - console.log('====>disconnectAbility finish'); - commonEvent.unsubscribe(Subscriber, UnSubscribeCallback); - } - commonEvent.createSubscriber(subscriberInfo_MainAbility).then(async (data) => { - console.debug("====>Create Subscriber====>"); - data.getSubscribeInfo().then(async (SubscribeInfo)=>{ - console.debug("====>SubscribeInfo is====>" + JSON.stringify(SubscribeInfo)); - Subscriber = data; - commonEvent.subscribe(Subscriber, SubscribeCallBack); - console.debug("====>0500start connectAbility====>"); - globalThis.number = await globalThis.abilityContext.connectAbility( - { - bundleName: 'com.acts.actsinterfacemultiusersextensionthirdtest', - abilityName: 'com.acts.actsinterfacemultiusersextensionthirdtest.ServiceAbility' - }) - console.debug("====>number is====>" + JSON.stringify(globalThis.number)); - }) - }) - - function UnSubscribeCallback() { - console.debug("====>UnSubscribeCallback====>"); - flag = false - expect(startresult).assertEqual(true); - setTimeout(()=>{ - done() - },1000) - } - - function timeout() { - console.debug('in ACTS_ThirdPartyExtensionStartAbility_0500 timeout'); - if(flag == true) { - expect().assertFail(); - console.debug('ACTS_ThirdPartyExtensionStartAbility_0500 - timeout'); - commonEvent.unsubscribe(Subscriber, UnSubscribeCallback) - } - } - - setTimeout(timeout, START_ABILITY_TIMEOUT); - }) - - /* - * @tc.number : ACTS_ThirdPartyExtensionStartAbility_0600 - * @tc.name : start new ability - * @tc.desc : Starting mainability2 with startability failed.(promise) - */ - it('ACTS_ThirdPartyExtensionStartAbility_0600', 0, async function (done) { - let Subscriber - var flag = true - var startresult = false - globalThis.startnum = 6 - console.log('====>globalThis.startnum is====>' + globalThis.startnum); - function SubscribeCallBack (err, data) { - expect().assertFail(); - expect(data.event == "ACTS_InterfaceMultiUsersExtension_CommonEvent").assertTrue(); - console.debug("====>0600 Subscribe CallBack data:====>" + JSON.stringify(data)); - if(data.event == "ACTS_InterfaceMultiUsersExtension_CommonEvent"){ - startresult = true - } - commonEvent.unsubscribe(Subscriber, UnSubscribeCallback); - } - function UnSubscribeCallback() { - console.debug("====>UnSubscribeCallback====>"); - flag = false - expect(startresult).assertEqual(false); - globalThis.abilityContext.disconnectAbility(globalThis.number).then((data)=>{ - console.debug("====>data is====>" + JSON.stringify(data)); - }) - console.log('====>disconnectAbility finish'); - setTimeout(()=>{ - done(); - },1000) - } - function onConnectCallback(element, remote) { - console.log(' onConnectCallback====> element=' + JSON.stringify(element)); - console.log(' onConnectCallback====> remote=' + JSON.stringify(remote)); - setTimeout(()=> { - console.log('====>in timeout'); - console.debug("====>flag is====>" + JSON.stringify(flag)); - if(flag == true) { - console.debug('ACTS_ThirdPartyExtensionStartAbility_0600 - timeout'); - commonEvent.unsubscribe(Subscriber, UnSubscribeCallback); - } - }, 1000); - } - function onDisconnectCallback(element) { - console.log('onDisconnectCallback====> element=' + JSON.stringify(element)); - } - - function onFailedCallback(code) { - console.log('onFailedCallback====> code=' + JSON.stringify(code)) - } - commonEvent.createSubscriber(subscriberInfo_MainAbility).then(async (data) => { - console.debug("====>Create Subscriber====>"); - data.getSubscribeInfo().then(async (SubscribeInfo)=>{ - console.debug("====>SubscribeInfo is====>" + JSON.stringify(SubscribeInfo)); - Subscriber = data; - commonEvent.subscribe(Subscriber, SubscribeCallBack); - console.debug("====>0600start connectAbility====>"); - globalThis.number = await globalThis.abilityContext.connectAbility( - { - bundleName: 'com.acts.actsinterfacemultiusersextensionthirdtest', - abilityName: 'com.acts.actsinterfacemultiusersextensionthirdtest.ServiceAbility' - },{ - onConnect:onConnectCallback, - onDisconnect:onDisconnectCallback, - onFailed: onFailedCallback - }) - console.debug("====>number is====>" + JSON.stringify(globalThis.number)); - }) - }) - }) - - /* - * @tc.number : ACTS_ThirdPartyExtensionStartAbility_0700 - * @tc.name : start new ability - * @tc.desc : Starting mainability2 with startability succeeded.(callback) - */ - it('ACTS_ThirdPartyExtensionStartAbility_0700', 0, async function (done) { - let Subscriber - var flag = true - var startresult = false - globalThis.startnum=7 - console.log('====>globalThis.startnum is====>' + globalThis.startnum); - function SubscribeCallBack (err, data) { - expect(data.event == "ACTS_InterfaceMultiUsersExtension_CommonEvent").assertTrue(); - console.debug("====>0700 Subscribe CallBack data:====>" + JSON.stringify(data)); - if(data.event == "ACTS_InterfaceMultiUsersExtension_CommonEvent"){ - startresult = true - } - globalThis.abilityContext.disconnectAbility(globalThis.number).then((data)=>{ - console.debug("====>data is====>" + JSON.stringify(data)); - }) - console.log('====>disconnectAbility finish'); - commonEvent.unsubscribe(Subscriber, UnSubscribeCallback); - } - commonEvent.createSubscriber(subscriberInfo_MainAbility).then(async (data) => { - console.debug("====>Create Subscriber====>"); - data.getSubscribeInfo().then(async (SubscribeInfo)=>{ - console.debug("====>SubscribeInfo is====>" + JSON.stringify(SubscribeInfo)); - Subscriber = data; - commonEvent.subscribe(Subscriber, SubscribeCallBack); - console.debug("====>0700start connectAbility====>"); - globalThis.number = await globalThis.abilityContext.connectAbility( - { - bundleName: 'com.acts.actsinterfacemultiusersextensionthirdtest', - abilityName: 'com.acts.actsinterfacemultiusersextensionthirdtest.ServiceAbility' - }) - console.debug("====>number is====>" + JSON.stringify(globalThis.number)); - }) - }) - - function UnSubscribeCallback() { - console.debug("====>UnSubscribeCallback====>"); - flag = false - expect(startresult).assertEqual(true); - setTimeout(()=>{ - done() - },1000) - } - - function timeout() { - console.debug('in ACTS_ThirdPartyExtensionStartAbility_0700 timeout'); - if(flag == true) { - expect().assertFail(); - console.debug('ACTS_ThirdPartyExtensionStartAbility_0700 - timeout'); - commonEvent.unsubscribe(Subscriber, UnSubscribeCallback) - } - } - - setTimeout(timeout, START_ABILITY_TIMEOUT); - - }) - - /* - * @tc.number : ACTS_ThirdPartyExtensionStartAbility_0800 - * @tc.name : start new ability - * @tc.desc : Starting mainability2 with startability failed.(callback) - */ - it('ACTS_ThirdPartyExtensionStartAbility_0800', 0, async function (done) { - let Subscriber - var flag = true - var startresult = false - globalThis.startnum = 8 - console.log('====>globalThis.startnum is====>' + globalThis.startnum); - function SubscribeCallBack (err, data) { - expect().assertFail(); - expect(data.event == "ACTS_InterfaceMultiUsersExtension_CommonEvent").assertTrue(); - console.debug("====>0800 Subscribe CallBack data:====>" + JSON.stringify(data)); - if(data.event == "ACTS_InterfaceMultiUsersExtension_CommonEvent"){ - startresult = true - } - commonEvent.unsubscribe(Subscriber, UnSubscribeCallback); - } - function UnSubscribeCallback() { - console.debug("====>UnSubscribeCallback====>"); - flag = false - expect(startresult).assertEqual(false); - globalThis.abilityContext.disconnectAbility(globalThis.number).then((data)=>{ - console.debug("====>data is====>" + JSON.stringify(data)); - }) - console.log('====>disconnectAbility finish'); - setTimeout(()=>{ - done(); - },1000) - } - function onConnectCallback(element, remote) { - console.log(' onConnectCallback====> element=' + JSON.stringify(element)); - console.log(' onConnectCallback====> remote=' + JSON.stringify(remote)); - setTimeout(()=> { - console.log('====>in timeout'); - console.debug("====>flag is====>" + JSON.stringify(flag)); - if(flag == true) { - console.debug('ACTS_ThirdPartyExtensionStartAbility_0800 - timeout'); - commonEvent.unsubscribe(Subscriber, UnSubscribeCallback); - } - }, 1000); - } - function onDisconnectCallback(element) { - console.log('onDisconnectCallback====> element=' + JSON.stringify(element)); - } - - function onFailedCallback(code) { - console.log('onFailedCallback====> code=' + JSON.stringify(code)) - } - commonEvent.createSubscriber(subscriberInfo_MainAbility).then(async (data) => { - console.debug("====>Create Subscriber====>"); - data.getSubscribeInfo().then(async (SubscribeInfo)=>{ - console.debug("====>SubscribeInfo is====>" + JSON.stringify(SubscribeInfo)); - Subscriber = data; - commonEvent.subscribe(Subscriber, SubscribeCallBack); - console.debug("====>0800start connectAbility====>"); - globalThis.number = await globalThis.abilityContext.connectAbility( - { - bundleName: 'com.acts.actsinterfacemultiusersextensionthirdtest', - abilityName: 'com.acts.actsinterfacemultiusersextensionthirdtest.ServiceAbility' - },{ - onConnect:onConnectCallback, - onDisconnect:onDisconnectCallback, - onFailed: onFailedCallback - }) - console.debug("====>number is====>" + JSON.stringify(globalThis.number)); - }) - }) - }) - /* - * @tc.number : ACTS_ThirdPartyExtensionTerminateSelf_0100 - * @tc.name : Use terminateself to terminate ability - * @tc.desc : Starting mainability2 with startAbility then terminateself ability succeeded.(promise) - */ - it('ACTS_ThirdPartyExtensionTerminateSelf_0100', 0, async function (done) { - let Subscriber - var flag = true - var startresult = false - globalThis.startnum = 9 - console.log('====>globalThis.startnum is====>' + globalThis.startnum); - function SubscribeCallBack (err, data) { - expect(data.event == "ACTS_TerminateSelf_CommonEvent").assertTrue(); - console.debug("====>0100 Subscribe CallBack data:====>" + JSON.stringify(data)); - if(data.event == "ACTS_TerminateSelf_CommonEvent"){ - startresult = true - } - globalThis.abilityContext.disconnectAbility(globalThis.number).then((data)=>{ - console.debug("====>data is====>" + JSON.stringify(data)); - }) - console.log('====>disconnectAbility finish'); - commonEvent.unsubscribe(Subscriber, UnSubscribeCallback); - } - commonEvent.createSubscriber(subscriberInfo_MainAbility2).then(async (data) => { - console.debug("====>Create Subscriber====>"); - data.getSubscribeInfo().then(async (SubscribeInfo)=>{ - console.debug("====>SubscribeInfo is====>" + JSON.stringify(SubscribeInfo)); - Subscriber = data; - commonEvent.subscribe(Subscriber, SubscribeCallBack); - console.debug("====>0100start connectAbility====>"); - globalThis.number = await globalThis.abilityContext.connectAbility( - { - bundleName: 'com.acts.actsinterfacemultiusersextensionthirdtest', - abilityName: 'com.acts.actsinterfacemultiusersextensionthirdtest.ServiceAbility' - }) - console.debug("====>number is====>" + JSON.stringify(globalThis.number)); - }) - }) - - function UnSubscribeCallback() { - console.debug("====>UnSubscribeCallback====>"); - flag = false - expect(startresult).assertEqual(true); - setTimeout(()=>{ - done() - },1000) - } - - function timeout() { - console.debug('in ACTS_ThirdPartyExtensionTerminateSelf_0100 timeout'); - if(flag == true) { - expect().assertFail(); - console.debug('ACTS_ThirdPartyExtensionTerminateSelf_0100 - timeout'); - commonEvent.unsubscribe(Subscriber, UnSubscribeCallback) - } - } - - setTimeout(timeout, START_ABILITY_TIMEOUT); - }) - /* - * @tc.number : ACTS_ThirdPartyExtensionTerminateSelf_0200 - * @tc.name : Use terminateself to terminate ability - * @tc.desc : Starting mainability2 with startAbility then terminateself ability failed.(promise) - */ - it('ACTS_ThirdPartyExtensionTerminateSelf_0200', 0, async function (done) { - let Subscriber - var flag = true - var startresult = false - globalThis.startnum = 10 - console.log('====>globalThis.startnum is====>' + globalThis.startnum); - function SubscribeCallBack (err, data) { - expect().assertFail(); - expect(data.event == "ACTS_TerminateSelf_CommonEvent").assertTrue(); - console.debug("====>0200 Subscribe CallBack data:====>" + JSON.stringify(data)); - if(data.event == "ACTS_TerminateSelf_CommonEvent"){ - startresult = true - } - commonEvent.unsubscribe(Subscriber, UnSubscribeCallback); - } - function UnSubscribeCallback() { - console.debug("====>UnSubscribeCallback====>"); - flag = false - expect(startresult).assertEqual(false); - globalThis.abilityContext.disconnectAbility(globalThis.number).then((data)=>{ - console.debug("====>data is====>" + JSON.stringify(data)); - }) - console.log('====>disconnectAbility finish'); - setTimeout(()=>{ - done(); - },1000) - } - function onConnectCallback(element, remote) { - console.log(' onConnectCallback====> element=' + JSON.stringify(element)); - console.log(' onConnectCallback====> remote=' + JSON.stringify(remote)); - setTimeout(()=> { - console.log('====>in timeout'); - console.debug("====>flag is====>" + JSON.stringify(flag)); - if(flag == true) { - console.debug(' - timeout'); - commonEvent.unsubscribe(Subscriber, UnSubscribeCallback); - } - }, 1000); - } - function onDisconnectCallback(element) { - console.log('onDisconnectCallback====> element=' + JSON.stringify(element)); - } - - function onFailedCallback(code) { - console.log('onFailedCallback====> code=' + JSON.stringify(code)) - } - commonEvent.createSubscriber(subscriberInfo_MainAbility2).then(async (data) => { - console.debug("====>Create Subscriber====>"); - data.getSubscribeInfo().then(async (SubscribeInfo)=>{ - console.debug("====>SubscribeInfo is====>" + JSON.stringify(SubscribeInfo)); - Subscriber = data; - commonEvent.subscribe(Subscriber, SubscribeCallBack); - console.debug("====>0200start connectAbility====>"); - globalThis.number = await globalThis.abilityContext.connectAbility( - { - bundleName: 'com.acts.actsinterfacemultiusersextensionthirdtest', - abilityName: 'com.acts.actsinterfacemultiusersextensionthirdtest.ServiceAbility' - },{ - onConnect:onConnectCallback, - onDisconnect:onDisconnectCallback, - onFailed: onFailedCallback - }) - console.debug("====>number is====>" + JSON.stringify(globalThis.number)); - }) - }) - - }) - /* - * @tc.number : ACTS_ThirdPartyExtensionTerminateSelf_0300 - * @tc.name : Use terminateself to terminate ability - * @tc.desc : Starting mainability2 with startAbility then terminateself ability succeeded.(callback) - */ - it('ACTS_ThirdPartyExtensionTerminateSelf_0300', 0, async function (done) { - let Subscriber - var flag = true - var startresult = false - globalThis.startnum = 11 - console.log('====>globalThis.startnum is====>' + globalThis.startnum); - function SubscribeCallBack (err, data) { - expect(data.event == "ACTS_TerminateSelf_CommonEvent").assertTrue(); - console.debug("====>0300 Subscribe CallBack data:====>" + JSON.stringify(data)); - if(data.event == "ACTS_TerminateSelf_CommonEvent"){ - startresult = true - } - globalThis.abilityContext.disconnectAbility(globalThis.number).then((data)=>{ - console.debug("====>data is====>" + JSON.stringify(data)); - }) - console.log('====>disconnectAbility finish'); - commonEvent.unsubscribe(Subscriber, UnSubscribeCallback); - } - commonEvent.createSubscriber(subscriberInfo_MainAbility2).then(async (data) => { - console.debug("====>Create Subscriber====>"); - data.getSubscribeInfo().then(async (SubscribeInfo)=>{ - console.debug("====>SubscribeInfo is====>" + JSON.stringify(SubscribeInfo)); - Subscriber = data; - commonEvent.subscribe(Subscriber, SubscribeCallBack); - console.debug("====>0300start connectAbility====>"); - globalThis.number = await globalThis.abilityContext.connectAbility( - { - bundleName: 'com.acts.actsinterfacemultiusersextensionthirdtest', - abilityName: 'com.acts.actsinterfacemultiusersextensionthirdtest.ServiceAbility' - }) - console.debug("====>number is====>" + JSON.stringify(globalThis.number)); - }) - }) - - function UnSubscribeCallback() { - console.debug("====>UnSubscribeCallback====>"); - flag = false - expect(startresult).assertEqual(true); - setTimeout(()=>{ - done() - },1000) - } - - function timeout() { - console.debug('in ACTS_ThirdPartyExtensionTerminateSelf_0300 timeout'); - if(flag == true) { - expect().assertFail(); - console.debug('ACTS_ThirdPartyExtensionTerminateSelf_0300 - timeout'); - commonEvent.unsubscribe(Subscriber, UnSubscribeCallback) - } - } - - setTimeout(timeout, START_ABILITY_TIMEOUT); - - }) - /* - * @tc.number : ACTS_ThirdPartyExtensionTerminateSelf_0400 - * @tc.name : Use terminateself to terminate ability - * @tc.desc : Starting mainability2 with startAbility then terminateself ability failed.(callback) - */ - it('ACTS_ThirdPartyExtensionTerminateSelf_0400', 0, async function (done) { - let Subscriber - var flag = true - var startresult = false - globalThis.startnum = 12 - console.log('====>globalThis.startnum is====>' + globalThis.startnum); - function SubscribeCallBack (err, data) { - expect().assertFail(); - expect(data.event == "ACTS_TerminateSelf_CommonEvent").assertTrue(); - console.debug("====>0400 Subscribe CallBack data:====>" + JSON.stringify(data)); - if(data.event == "ACTS_TerminateSelf_CommonEvent"){ - startresult = true - } - commonEvent.unsubscribe(Subscriber, UnSubscribeCallback); - } - function UnSubscribeCallback() { - console.debug("====>UnSubscribeCallback====>"); - flag = false - expect(startresult).assertEqual(false); - globalThis.abilityContext.disconnectAbility(globalThis.number).then((data)=>{ - console.debug("====>data is====>" + JSON.stringify(data)); - }) - console.log('====>disconnectAbility finish'); - setTimeout(()=>{ - done(); - },1000) - } - function onConnectCallback(element, remote) { - console.log('ACTS_ThirdPartyExtensionTerminateSelf_0400 onConnectCallback====> element=' - + JSON.stringify(element)); - console.log('ACTS_ThirdPartyExtensionTerminateSelf_0400 onConnectCallback====> remote=' - + JSON.stringify(remote)); - setTimeout(()=> { - console.log('====>in timeout'); - console.debug("====>flag is====>" + JSON.stringify(flag)); - if(flag == true) { - console.debug('ACTS_ThirdPartyExtensionTerminateSelf_0400 - timeout'); - commonEvent.unsubscribe(Subscriber, UnSubscribeCallback); - } - }, 1000); - } - function onDisconnectCallback(element) { - console.log('onDisconnectCallback====> element=' + JSON.stringify(element)); - } - - function onFailedCallback(code) { - console.log('onFailedCallback====> code=' + JSON.stringify(code)) - } - commonEvent.createSubscriber(subscriberInfo_MainAbility2).then(async (data) => { - console.debug("====>Create Subscriber====>"); - data.getSubscribeInfo().then(async (SubscribeInfo)=>{ - console.debug("====>SubscribeInfo is====>" + JSON.stringify(SubscribeInfo)); - Subscriber = data; - commonEvent.subscribe(Subscriber, SubscribeCallBack); - console.debug("====>0400start connectAbility====>"); - globalThis.number = await globalThis.abilityContext.connectAbility( - { - bundleName: 'com.acts.actsinterfacemultiusersextensionthirdtest', - abilityName: 'com.acts.actsinterfacemultiusersextensionthirdtest.ServiceAbility' - },{ - onConnect:onConnectCallback, - onDisconnect:onDisconnectCallback, - onFailed: onFailedCallback - }) - console.debug("====>number is====>" + JSON.stringify(globalThis.number)); - }) - }) - }) - }) -} \ No newline at end of file diff --git a/ability/ability_runtime/actsusers/ActsAmsUsersExtensionThirdTest/entry/src/main/ets/test/List.test.ets b/ability/ability_runtime/actsusers/ActsAmsUsersExtensionThirdTest/entry/src/main/ets/test/List.test.ets deleted file mode 100644 index 3a84309ab20a5fdffbd08c23ea8f50735b79ef54..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsusers/ActsAmsUsersExtensionThirdTest/entry/src/main/ets/test/List.test.ets +++ /dev/null @@ -1,20 +0,0 @@ -/* - * 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 abilityTest from './Ability.test.ets' - -export default function testsuite() { - console.debug("====>in list.test====>"); - abilityTest() -} \ No newline at end of file diff --git a/ability/ability_runtime/actsusers/ActsAmsUsersExtensionThirdTest/entry/src/main/module.json b/ability/ability_runtime/actsusers/ActsAmsUsersExtensionThirdTest/entry/src/main/module.json deleted file mode 100644 index 90713d43e62ab49c68b0a6a69b9f7066982acdc4..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsusers/ActsAmsUsersExtensionThirdTest/entry/src/main/module.json +++ /dev/null @@ -1,77 +0,0 @@ -{ - "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.acts.actsinterfacemultiusersextensionthirdtest.MainAbility", - "srcEntrance": "./ets/MainAbility/MainAbility.ts", - "description": "$string:phone_entry_main", - "icon": "$media:icon", - "label": "$string:entry_label", - "visible": true, - "orientation": "portrait", - "skills": [ - { - "actions": [ - "action.system.home" - ], - "entities": [ - "entity.system.home" - ] - } - ] - }, - { - "name": "com.acts.actsinterfacemultiusersextensionthirdtest.MainAbility2", - "srcEntrance": "./ets/MainAbility2/MainAbility2.ts", - "description": "$string:phone_entry_main", - "icon": "$media:icon", - "label": "$string:entry_label", - "visible": true, - "orientation": "portrait" - } - ], - "extensionAbilities": [ - { - "srcEntrance": "./ets/ServiceAbility/ServiceAbility.ts", - "name": "com.acts.actsinterfacemultiusersextensionthirdtest.ServiceAbility", - "icon": "$media:icon", - "srcLanguage": "ets", - "description": "$string:phone_entry_main", - "type": "service", - "visible": true - }, - { - "srcEntrance": "./ets/ServiceAbility2/ServiceAbility2.ts", - "name": "com.acts.actsinterfacemultiusersextensionthirdtest.ServiceAbility2", - "icon": "$media:icon", - "srcLanguage": "ets", - "description": "$string:phone_entry_main", - "type": "service", - "visible": true - } - ], - "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" - } - ] - } -} diff --git a/ability/ability_runtime/actsusers/ActsAmsUsersExtensionThirdTest/entry/src/main/resources/base/element/string.json b/ability/ability_runtime/actsusers/ActsAmsUsersExtensionThirdTest/entry/src/main/resources/base/element/string.json deleted file mode 100644 index f03b06594a7d47bd569242c9a9871cd1e11c2d52..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsusers/ActsAmsUsersExtensionThirdTest/entry/src/main/resources/base/element/string.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "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" - } - ] -} diff --git a/ability/ability_runtime/actsusers/ActsAmsUsersExtensionThirdTest/entry/src/main/resources/base/media/icon.png b/ability/ability_runtime/actsusers/ActsAmsUsersExtensionThirdTest/entry/src/main/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actsusers/ActsAmsUsersExtensionThirdTest/entry/src/main/resources/base/media/icon.png and /dev/null differ diff --git a/ability/ability_runtime/actsusers/ActsAmsUsersExtensionThirdTest/entry/src/main/resources/base/profile/main_pages.json b/ability/ability_runtime/actsusers/ActsAmsUsersExtensionThirdTest/entry/src/main/resources/base/profile/main_pages.json deleted file mode 100644 index 010134e5cdcb46ef62097816f127dac0bb93a398..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsusers/ActsAmsUsersExtensionThirdTest/entry/src/main/resources/base/profile/main_pages.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "src": [ - "MainAbility/pages/index/index", - "MainAbility/pages/second/second" - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/actsusers/ActsAmsUsersExtensionThirdTest/signature/openharmony_sx.p7b b/ability/ability_runtime/actsusers/ActsAmsUsersExtensionThirdTest/signature/openharmony_sx.p7b deleted file mode 100644 index dcec6c9615032c1b48bf185e839d9720dd68aab0..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actsusers/ActsAmsUsersExtensionThirdTest/signature/openharmony_sx.p7b and /dev/null differ diff --git a/ability/ability_runtime/actsusers/ActsAmsUsersKillProcessAppA/signature/openharmony_sx.p7b b/ability/ability_runtime/actsusers/ActsAmsUsersKillProcessAppA/signature/openharmony_sx.p7b index f06e218defa7f707e22a3890903c574e1c498217..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/actsusers/ActsAmsUsersKillProcessAppA/signature/openharmony_sx.p7b and b/ability/ability_runtime/actsusers/ActsAmsUsersKillProcessAppA/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/actsusers/ActsAmsUsersKillProcessAppB/signature/openharmony_sx.p7b b/ability/ability_runtime/actsusers/ActsAmsUsersKillProcessAppB/signature/openharmony_sx.p7b index f06e218defa7f707e22a3890903c574e1c498217..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/actsusers/ActsAmsUsersKillProcessAppB/signature/openharmony_sx.p7b and b/ability/ability_runtime/actsusers/ActsAmsUsersKillProcessAppB/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/actsusers/ActsAmsUsersKillProcessAppC/signature/openharmony_sx.p7b b/ability/ability_runtime/actsusers/ActsAmsUsersKillProcessAppC/signature/openharmony_sx.p7b index f06e218defa7f707e22a3890903c574e1c498217..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/actsusers/ActsAmsUsersKillProcessAppC/signature/openharmony_sx.p7b and b/ability/ability_runtime/actsusers/ActsAmsUsersKillProcessAppC/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/actsusers/ActsAmsUsersSystemTest/entry/src/main/ets/ServiceAbility/ServiceAbility.ts b/ability/ability_runtime/actsusers/ActsAmsUsersSystemTest/entry/src/main/ets/ServiceAbility/ServiceAbility.ts deleted file mode 100644 index c12571f077e3f3d2e4624c7904bd78811c477c18..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsusers/ActsAmsUsersSystemTest/entry/src/main/ets/ServiceAbility/ServiceAbility.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) 2021 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 ServiceExtensionAbility from '@ohos.application.ServiceExtensionAbility' -import commonEvent from "@ohos.commonEvent" -import rpc from '@ohos.rpc'; - -export default class ServiceAbility extends ServiceExtensionAbility { - onCreate(want) { - console.log('ServiceAbility onCreate'); - } - onDestory(){ - console.log('ServiceAbility onDestory'); - } - onRequest(want,startId) { - console.log('ServiceAbility onRequest'); - commonEvent.publish("ACTS_InterfaceMultiUsers_0100_Start_CommonEvent", () => { - console.log(" Publish ACTS_InterfaceMultiUsersExtension_CommonEvent callback") - this.context.terminateSelf().then(()=>{ - console.log(" terminateSelf callback") - }) - }) - } - - onConnect(want) { - console.log('ServiceAbility onConnect'); - return new rpc.RemoteObject('connect'); - } - - onDisconnect(want) { - console.log('ServiceAbility onDisconnect'); - } - - onDestroy() { - console.log('ServiceAbility onDestroy'); - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsusers/ActsAmsUsersSystemTest/entry/src/main/module.json b/ability/ability_runtime/actsusers/ActsAmsUsersSystemTest/entry/src/main/module.json index 5f645cbbf8093e4b8ec1db4fe9fbe70b0d916a7b..a2aab205623dcfced0e7474f2413c8ac436e14f1 100644 --- a/ability/ability_runtime/actsusers/ActsAmsUsersSystemTest/entry/src/main/module.json +++ b/ability/ability_runtime/actsusers/ActsAmsUsersSystemTest/entry/src/main/module.json @@ -52,17 +52,6 @@ "orientation": "portrait" } ], - "extensionAbilities": [ - { - "srcEntrance": "./ets/ServiceAbility/ServiceAbility.ts", - "name": "com.acts.actsinterfacemultiuserstest.ServiceAbility", - "icon": "$media:icon", - "srcLanguage": "ets", - "description": "$string:phone_entry_main", - "type": "service", - "visible": true - } - ], "defPermissions": [ { "availableScope": [], @@ -76,54 +65,22 @@ } ], "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.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.MANAGE_LOCAL_ACCOUNTS", - "reason": "need use ohos.permission.MANAGE_LOCAL_ACCOUNTS" - }, - { - "name": "ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS_EXTENSION", - "reason": "need use ohos.permission.MANAGE_LOCAL_ACCOUNTS" - }, - { - "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" - } + { + "name": "ohos.permission.CLEAN_BACKGROUND_PROCESSES", + "reason": "need use ohos.permission.CLEAN_BACKGROUND_PROCESSES" + }, + { + "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.GET_RUNNING_INFO", + "reason": "need use ohos.permission.GET_RUNNING_INFO" + } ] } } diff --git a/ability/ability_runtime/actsusers/ActsAmsUsersSystemTest/signature/openharmony_sx.p7b b/ability/ability_runtime/actsusers/ActsAmsUsersSystemTest/signature/openharmony_sx.p7b index dcec6c9615032c1b48bf185e839d9720dd68aab0..788c4c1502063dd2fd2c5771fcc85fe69b670f5e 100644 Binary files a/ability/ability_runtime/actsusers/ActsAmsUsersSystemTest/signature/openharmony_sx.p7b and b/ability/ability_runtime/actsusers/ActsAmsUsersSystemTest/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/actsusers/ActsAmsUsersThirdTest/signature/openharmony_sx_thirdparty.p7b b/ability/ability_runtime/actsusers/ActsAmsUsersThirdTest/signature/openharmony_sx_thirdparty.p7b index f06e218defa7f707e22a3890903c574e1c498217..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/actsusers/ActsAmsUsersThirdTest/signature/openharmony_sx_thirdparty.p7b and b/ability/ability_runtime/actsusers/ActsAmsUsersThirdTest/signature/openharmony_sx_thirdparty.p7b differ diff --git a/ability/ability_runtime/actsusers/BUILD.gn b/ability/ability_runtime/actsusers/BUILD.gn index 48b6afef0c6d58085b7e0f7b50022c80fea8bbe8..05fab2101f3da91a8ae7e6030128418d9054d0fe 100644 --- a/ability/ability_runtime/actsusers/BUILD.gn +++ b/ability/ability_runtime/actsusers/BUILD.gn @@ -18,15 +18,11 @@ group("actsusers") { if (is_standard_system) { deps = [ "ActsAmsUsersApi7AppA:ActsAmsUsersApi7AppA", - "ActsAmsUsersExtensionSystemTest:ActsAmsUsersExtensionSystemTest", - "ActsAmsUsersExtensionThirdTest:ActsAmsUsersExtensionThirdTest", "ActsAmsUsersKillProcessAppA:ActsAmsUsersKillProcessAppA", "ActsAmsUsersKillProcessAppB:ActsAmsUsersKillProcessAppB", "ActsAmsUsersKillProcessAppC:ActsAmsUsersKillProcessAppC", "ActsAmsUsersSystemTest:ActsAmsUsersSystemTest", "ActsAmsUsersThirdTest:ActsAmsUsersThirdTest", - "actsconnectabilitysystemabilitytest:ActsConnectAbilitySystemAbilityTest", - "actsmanyuserthirdabilitytest:ActsManyUsersAbilityTest", ] } } diff --git a/ability/ability_runtime/actsusers/actsconnectabilitysystemabilitytest/AppScope/app.json b/ability/ability_runtime/actsusers/actsconnectabilitysystemabilitytest/AppScope/app.json deleted file mode 100644 index 1a44bb9e690d0089cd5b7407bcb41183ba2838c8..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsusers/actsconnectabilitysystemabilitytest/AppScope/app.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "app": { - "bundleName": "com.example.actsconnectabilitysystemabilitytest", - "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 - } - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsusers/actsconnectabilitysystemabilitytest/AppScope/resources/base/element/string.json b/ability/ability_runtime/actsusers/actsconnectabilitysystemabilitytest/AppScope/resources/base/element/string.json deleted file mode 100644 index 0d3507c0d180557b94bc5f0071ba146b4909fe51..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsusers/actsconnectabilitysystemabilitytest/AppScope/resources/base/element/string.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "string": [ - { - "name": "app_name", - "value": "ohosProject" - } - ] -} diff --git a/ability/ability_runtime/actsusers/actsconnectabilitysystemabilitytest/AppScope/resources/base/media/app_icon.png b/ability/ability_runtime/actsusers/actsconnectabilitysystemabilitytest/AppScope/resources/base/media/app_icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actsusers/actsconnectabilitysystemabilitytest/AppScope/resources/base/media/app_icon.png and /dev/null differ diff --git a/ability/ability_runtime/actsusers/actsconnectabilitysystemabilitytest/BUILD.gn b/ability/ability_runtime/actsusers/actsconnectabilitysystemabilitytest/BUILD.gn deleted file mode 100644 index 74548f078efc8177989886998ecf77dd7a9e3e2a..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsusers/actsconnectabilitysystemabilitytest/BUILD.gn +++ /dev/null @@ -1,43 +0,0 @@ -# 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_js_hap_suite("ActsConnectAbilitySystemAbilityTest") { - hap_profile = "entry/src/main/module.json" - js_build_mode = "debug" - deps = [ - ":actsconnectabilitysystemabilitytest_js_assets", - ":actsconnectabilitysystemabilitytest_resources", - ] - ets2abc = true - certificate_profile = "signature/openharmony_sx.p7b" - hap_name = "ActsConnectAbilitySystemAbilityTest" - subsystem_name = "ability" - part_name = "ability_runtime" -} - -ohos_app_scope("actsconnectabilitysystemabilitytest_app_profile") { - app_profile = "AppScope/app.json" - sources = [ "AppScope/resources" ] -} - -ohos_js_assets("actsconnectabilitysystemabilitytest_js_assets") { - source_dir = "entry/src/main/ets" -} - -ohos_resources("actsconnectabilitysystemabilitytest_resources") { - sources = [ "entry/src/main/resources" ] - deps = [ ":actsconnectabilitysystemabilitytest_app_profile" ] - hap_profile = "entry/src/main/module.json" -} diff --git a/ability/ability_runtime/actsusers/actsconnectabilitysystemabilitytest/Test.json b/ability/ability_runtime/actsusers/actsconnectabilitysystemabilitytest/Test.json deleted file mode 100644 index 59844f8e02a2864c6c39e214cd10d6dd2dbbffef..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsusers/actsconnectabilitysystemabilitytest/Test.json +++ /dev/null @@ -1,33 +0,0 @@ - -{ - "description": "Configuration for hjunit demo Tests", - "driver": { - "type": "OHJSUnitTest", - "test-timeout": "300000", - "bundle-name": "com.example.actsconnectabilitysystemabilitytest", - "module-name":"phone", - "shell-timeout": "300000", - "testcase-timeout": "30000" - }, - "kits": [ - { - "type": "ShellKit", - "run-command": [ - "acm create -n 101 -t normal", - "acm switch -i 101" - ], - "teardown-command":[ - "acm switch -i 101", - "acm delete -i 101" - ] - }, - { - "test-file-name": [ - "ActsConnectAbilitySystemAbilityTest.hap" - ], - "type": "AppInstallKit", - "cleanup-apps": true - } - ] -} - diff --git a/ability/ability_runtime/actsusers/actsconnectabilitysystemabilitytest/entry/src/main/ets/Application/AbilityStage.ts b/ability/ability_runtime/actsusers/actsconnectabilitysystemabilitytest/entry/src/main/ets/Application/AbilityStage.ts deleted file mode 100644 index 159f48742031f407af4b1016035bf01e8e12a10a..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsusers/actsconnectabilitysystemabilitytest/entry/src/main/ets/Application/AbilityStage.ts +++ /dev/null @@ -1,23 +0,0 @@ -/* -* 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" - -export default class MyAbilityStage extends AbilityStage { - onCreate() { - console.log("MyAbilityStage onCreate") - globalThis.stageOnCreateRun = 1; - globalThis.stageContext = this.context; - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsusers/actsconnectabilitysystemabilitytest/entry/src/main/ets/MainAbility/MainAbility.ts b/ability/ability_runtime/actsusers/actsconnectabilitysystemabilitytest/entry/src/main/ets/MainAbility/MainAbility.ts deleted file mode 100644 index 7f32c4093a7b1c2defff0cebb83e074cd1cf6cbc..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsusers/actsconnectabilitysystemabilitytest/entry/src/main/ets/MainAbility/MainAbility.ts +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 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' - -export default class MainAbility extends Ability { - onCreate(want,launchParam){ - // Ability is creating, initialize resources for this ability - console.log("MainAbility onCreate") - globalThis.abilityWant = want; - } - - onDestroy() { - // Ability is destroying, release resources for this ability - console.log("MainAbility onDestroy") - } - - onWindowStageCreate(windowStage) { - // Main window is created, set main page for this ability - console.log("MainAbility onWindowStageCreate") - globalThis.abilityContext = this.context - windowStage.setUIContent(this.context, "MainAbility/pages/index/index", null) - } - - onWindowStageDestroy() { - //Main window is destroyed, release UI related resources - console.log("MainAbility onWindowStageDestroy") - } - - onForeground() { - // Ability has brought to foreground - console.log("MainAbility onForeground") - } - - onBackground() { - // Ability has back to background - console.log("MainAbility onBackground") - } -}; \ No newline at end of file diff --git a/ability/ability_runtime/actsusers/actsconnectabilitysystemabilitytest/entry/src/main/ets/MainAbility/pages/index/index.ets b/ability/ability_runtime/actsusers/actsconnectabilitysystemabilitytest/entry/src/main/ets/MainAbility/pages/index/index.ets deleted file mode 100644 index 5a7b56cd65dee907f5d21f00139c9c4158d58d4f..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsusers/actsconnectabilitysystemabilitytest/entry/src/main/ets/MainAbility/pages/index/index.ets +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) 2021 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 AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry' -import { Hypium } from '@ohos/hypium' -import testsuite from '../../../test/List.test' -import router from '@ohos.router' - -@Entry -@Component -struct Index { - aboutToAppear() { - console.info("start run testcase!!!!") - var abilityDelegator: any - abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() - var abilityDelegatorArguments: any - abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments() - console.info('start run testcase!!!') - Hypium.hypiumTest(abilityDelegator, abilityDelegatorArguments, testsuite) - - } - build() { - Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { - Text('MainAbility') - .fontSize(50) - .fontWeight(FontWeight.Bold) - } - .width('100%') - .height('100%') - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsusers/actsconnectabilitysystemabilitytest/entry/src/main/ets/MainAbility/pages/second/second.ets b/ability/ability_runtime/actsusers/actsconnectabilitysystemabilitytest/entry/src/main/ets/MainAbility/pages/second/second.ets deleted file mode 100644 index caa9f1c5fbc706c60414d23f0be4cbadeb8ee346..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsusers/actsconnectabilitysystemabilitytest/entry/src/main/ets/MainAbility/pages/second/second.ets +++ /dev/null @@ -1,43 +0,0 @@ -/* - * 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 diff --git a/ability/ability_runtime/actsusers/actsconnectabilitysystemabilitytest/entry/src/main/ets/ServiceAbility/ServiceAbility.ts b/ability/ability_runtime/actsusers/actsconnectabilitysystemabilitytest/entry/src/main/ets/ServiceAbility/ServiceAbility.ts deleted file mode 100644 index b6d7515c05b17403eed25d20c133c67d6e80c1f4..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsusers/actsconnectabilitysystemabilitytest/entry/src/main/ets/ServiceAbility/ServiceAbility.ts +++ /dev/null @@ -1,205 +0,0 @@ -/* - * 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 commonEvent from '@ohos.commonEvent' -import ServiceExtension from '@ohos.application.ServiceExtensionAbility' -import rpc from '@ohos.rpc'; -var conn = -1; -function publishCallBackOne() { - console.log("========Publish CallBack AMS_ConnectAbility_0100_commonEvent========"); -} -function publishCallBackTwo() { - console.log("========Publish CallBack AMS_ConnectAbility_0200_commonEvent========"); -} -function publishCallBackThree() { - console.log("========Publish CallBack AMS_ConnectAbility_0300_commonEvent========"); -} -function publishCallBackFour() { - console.log("========Publish CallBack AMS_ConnectAbility_0400_commonEvent========"); -} -function publishCallBackFive() { - console.log("========Publish CallBack AMS_ConnectAbility_0500_commonEvent========"); -} -function publishCallBackSix() { - console.log("========Publish CallBack AMS_ConnectAbility_0600_commonEvent========"); -} -function publishCallBackzero() { - console.log("========Publish CallBack AMSc_disonnectAbility_0100_commonEvent========"); -} -function publishCallBackttwo() { - console.log("========Publish CallBack AMSc_disonnectAbility_0200_commonEvent========"); -} - -function onConnectCallback(element, remote) { - console.log('onConnectCallback====> element=' + JSON.stringify(element)); - console.log('onConnectCallback====> remote=' + JSON.stringify(remote)); -} - -function onDisconnectCallback(element) { - console.log('onDisconnectCallback====> element=' + JSON.stringify(element)); -} - -function onFailedCallback(code) { - console.log('onFailedCallback====> code=' + JSON.stringify(code)) -} - -export default class ServiceAbility extends ServiceExtension { - onCreate(want) { - console.log('ServiceAbility onCreate, want: ' + want.abilityName); - } - - onRequest(want, startId) { - console.log('ServiceAbility onRequest, want: ' + want.abilityName + ', startId: ' + startId); - - console.log('ServiceAbility registerApplicationStateObserver begin'); - console.log('ServiceAbility registerApplicationStateObserver end, conn: ' + conn); - } - - onConnect(want) { - console.log('ServiceAbility onConnect, want:' + want.abilityName); - let extensionContext = this.context - if (want.action == "one") { - commonEvent.publish("AMS_ConnectAbility_0100_commonEvent", publishCallBackOne); - } - ; - if (want.action == "two") { - commonEvent.publish("AMS_ConnectAbility_0200_commonEvent", publishCallBackTwo); - } - ; - if (want.action == "Three") { - commonEvent.publish("AMS_ConnectAbility_0300_commonEvent", publishCallBackThree); - } - ; - if (want.action == "Four") { - commonEvent.publish("AMS_ConnectAbility_0400_commonEvent", publishCallBackFour); - } - ; - if (want.action == "Five") { - commonEvent.publish("AMS_ConnectAbility_0500_commonEvent", publishCallBackFive); - } - ; - if (want.action == "Six") { - commonEvent.publish("AMS_ConnectAbility_0600_commonEvent", publishCallBackSix); - } - ; - if (want.action == "Seven") { - extensionContext.connectAbility( - { - bundleName: "com.example.actsconnectabilitysystemabilitytest", - abilityName: "com.example.actsconnectabilitysystemabilitytest.ServiceAbility2", - }, { - onConnect: onConnectCallback, - onDisconnect: onDisconnectCallback, - onFailed: onFailedCallback - } - ); - }; - if (want.action == "Eight") { - extensionContext.connectAbility( - { - bundleName: "com.example.actsconnectabilitysystemabilitytest", - abilityName: "com.example.actsconnectabilitysystemabilitytest.ServiceAbility3", - }, { - onConnect: onConnectCallback, - onDisconnect: onDisconnectCallback, - onFailed: onFailedCallback - } - ); - }; - if (want.action == "Nine") { - console.log('connectAbility 111'); - let num = extensionContext.connectAbility( - { - bundleName: 'com.example.actsconnectabilitysystemabilitytest', - abilityName: 'com.example.actsconnectabilitysystemabilitytest.ServiceAbility2' - }, { - onConnect: onConnectCallback, - onDisconnect: onDisconnectCallback, - onFailed: onFailedCallback - }) - setTimeout(() => { - extensionContext.disconnectAbility(num).then(() => { - console.log('in disconnectAbility'); - }) - }, 1000) - - }; - if (want.action == "Ten") { - console.log('connectAbility 222'); - let num = extensionContext.connectAbility( - { - bundleName: 'com.example.actsconnectabilitysystemabilitytest', - abilityName: 'com.example.actsconnectabilitysystemabilitytest.ServiceAbility2' - }, { - onConnect: onConnectCallback, - onDisconnect: onDisconnectCallback, - onFailed: onFailedCallback - }) - setTimeout(() => { - extensionContext.disconnectAbility(num).then(() => { - console.log('in disconnectAbility2'); - }) - }, 1000) - - }; - if (want.action == "Ten one") { - console.log('connectAbility 333'); - let num = extensionContext.connectAbility( - { - bundleName: 'com.example.actsconnectabilitysystemabilitytest', - abilityName: 'com.example.actsconnectabilitysystemabilitytest.ServiceAbility2' - }, { - onConnect: onConnectCallback, - onDisconnect: onDisconnectCallback, - onFailed: onFailedCallback - }) - setTimeout(() => { - extensionContext.disconnectAbility(2222).then(() => { - console.log('in disconnectAbility3'); - }) - }, 1000) - - }; - if (want.action == "Ten two") { - console.log('connectAbility 444'); - let num = extensionContext.connectAbility( - { - bundleName: 'com.example.actsconnectabilitysystemabilitytest', - abilityName: 'com.example.actsconnectabilitysystemabilitytest.ServiceAbility2' - }, { - onConnect: onConnectCallback, - onDisconnect: onDisconnectCallback, - onFailed: onFailedCallback - }) - setTimeout(() => { - extensionContext.disconnectAbility(2222).then(() => { - console.log('in disconnectAbility4'); - }) - }, 1000) - - }; - return new rpc.RemoteObject('connect'); - } - - onDisconnect(want) { - console.log('ServiceAbility onDisconnect, want:' + want.abilityName); - commonEvent.publish("AMSc_disonnectAbility_0100_commonEvent", publishCallBackzero); - commonEvent.publish("AMSc_disonnectAbility_0200_commonEvent", publishCallBackttwo); - } - - onDestroy() { - console.log('ServiceAbility onDestroy'); - } -} - diff --git a/ability/ability_runtime/actsusers/actsconnectabilitysystemabilitytest/entry/src/main/ets/ServiceAbility/service.ts b/ability/ability_runtime/actsusers/actsconnectabilitysystemabilitytest/entry/src/main/ets/ServiceAbility/service.ts deleted file mode 100644 index b49731a414958a281c2f0c4eab0e7fb408eb2c2f..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsusers/actsconnectabilitysystemabilitytest/entry/src/main/ets/ServiceAbility/service.ts +++ /dev/null @@ -1,25 +0,0 @@ -/* -* 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. -*/ -export default { - onStart() { - console.info('ServiceAbility onStart'); - }, - onStop() { - console.info('ServiceAbility onStop'); - }, - onCommand(want, startId) { - console.info('ServiceAbility onCommand'); - } -}; \ No newline at end of file diff --git a/ability/ability_runtime/actsusers/actsconnectabilitysystemabilitytest/entry/src/main/ets/ServiceAbility2/ServiceAbility2.ts b/ability/ability_runtime/actsusers/actsconnectabilitysystemabilitytest/entry/src/main/ets/ServiceAbility2/ServiceAbility2.ts deleted file mode 100644 index be37720dc7d68cd89fcc51c895a467bf89079cc1..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsusers/actsconnectabilitysystemabilitytest/entry/src/main/ets/ServiceAbility2/ServiceAbility2.ts +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright (c) 2021 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 ServiceExtension from '@ohos.application.ServiceExtensionAbility' -import commonEvent from "@ohos.commonEvent" -import rpc from '@ohos.rpc'; -export default class ServiceAbility2 extends ServiceExtension { - onCreate(want) { - console.log('ServiceAbility2 onCreate'); - globalThis.abilityWant = want; - } - - onDestory(){ - console.log('ServiceAbility2 onDestory'); - } - - onRequest(want,startId) { - console.log('ServiceAbility2 onRequest'); - } - - onConnect(want) { - console.log('ServiceAbility2 onConnect'); - commonEvent.publish("AMS_ConnectAbility_0700_commonEvent", () => { - console.log("publish Publish AMS_ConnectAbility_0700_commonEvent callback"); - }) - commonEvent.publish("AMS_ConnectAbility_0900_commonEvent", () => { - console.log("publish Publish AMS_ConnectAbility_0900_commonEvent callback"); - }) - commonEvent.publish("AMS_ConnectAbility_1000_commonEvent", () => { - console.log("publish Publish AMS_ConnectAbility_1000_commonEvent callback"); - }) - commonEvent.publish("AMS_ConnectAbility_1100_commonEvent", () => { - console.log("publish Publish AMS_ConnectAbility_1100_commonEvent callback"); - }) - commonEvent.publish("AMS_ConnectAbility_1200_commonEvent", () => { - console.log("publish Publish AMS_ConnectAbility_1200_commonEvent callback"); - }) - return new rpc.RemoteObject('connect'); - } - - - onDisconnect(want) { - console.log('ServiceAbility2 onDisconnect, want:' + want.abilityName); - } - - onDestroy() { - console.log('ServiceAbility2 onDestroy'); - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsusers/actsconnectabilitysystemabilitytest/entry/src/main/ets/ServiceAbility2/service.ts b/ability/ability_runtime/actsusers/actsconnectabilitysystemabilitytest/entry/src/main/ets/ServiceAbility2/service.ts deleted file mode 100644 index 340a610cb718c70c98add0b5d052bb4589185174..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsusers/actsconnectabilitysystemabilitytest/entry/src/main/ets/ServiceAbility2/service.ts +++ /dev/null @@ -1,25 +0,0 @@ -/* - * 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. - */ -export default { - onStart() { - console.info('ServiceAbility2 onStart'); - }, - onStop() { - console.info('ServiceAbility2 onStop'); - }, - onCommand(want, startId) { - console.info('ServiceAbility2 onCommand'); - } -}; \ No newline at end of file diff --git a/ability/ability_runtime/actsusers/actsconnectabilitysystemabilitytest/entry/src/main/ets/TestAbility/TestAbility.ts b/ability/ability_runtime/actsusers/actsconnectabilitysystemabilitytest/entry/src/main/ets/TestAbility/TestAbility.ts deleted file mode 100644 index e9f9aadff45f162df116bfe3a90661ea6ab331dc..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsusers/actsconnectabilitysystemabilitytest/entry/src/main/ets/TestAbility/TestAbility.ts +++ /dev/null @@ -1,51 +0,0 @@ -/* - * 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' - -export default class TestAbility extends Ability { - onCreate(want, launchParam) { - console.log('TestAbility onCreate') - } - - onDestroy() { - console.log('TestAbility onDestroy') - } - - onWindowStageCreate(windowStage) { - console.log('TestAbility onWindowStageCreate') - windowStage.loadContent("TestAbility/pages/index", (err, data) => { - if (err.code) { - console.error('Failed to load the content. Cause:' + JSON.stringify(err)); - return; - } - console.info('Succeeded in loading the content. Data: ' + JSON.stringify(data)) - }); - - globalThis.abilityContext = this.context; - } - - onWindowStageDestroy() { - console.log('TestAbility onWindowStageDestroy') - } - - onForeground() { - console.log('TestAbility onForeground') - } - - onBackground() { - console.log('TestAbility onBackground') - } -}; \ No newline at end of file diff --git a/ability/ability_runtime/actsusers/actsconnectabilitysystemabilitytest/entry/src/main/ets/TestAbility/pages/index.ets b/ability/ability_runtime/actsusers/actsconnectabilitysystemabilitytest/entry/src/main/ets/TestAbility/pages/index.ets deleted file mode 100644 index fae969f985ff5bf7432de71e36c792364ebac1f6..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsusers/actsconnectabilitysystemabilitytest/entry/src/main/ets/TestAbility/pages/index.ets +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2021 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 '@ohos.router'; - -@Entry -@Component -struct Index { - aboutToAppear() { - console.info('TestAbility index aboutToAppear') - } - @State message: string = 'Hello World' - build() { - Row() { - Column() { - Text(this.message) - .fontSize(50) - .fontWeight(FontWeight.Bold) - Button() { - Text('next page') - .fontSize(20) - .fontWeight(FontWeight.Bold) - }.type(ButtonType.Capsule) - .margin({ - top: 20 - }) - .backgroundColor('#0D9FFB') - .width('35%') - .height('5%') - .onClick(()=>{ - }) - } - .width('100%') - } - .height('100%') - } - } \ No newline at end of file diff --git a/ability/ability_runtime/actsusers/actsconnectabilitysystemabilitytest/entry/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts b/ability/ability_runtime/actsusers/actsconnectabilitysystemabilitytest/entry/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts deleted file mode 100644 index 764da81c43c1e9c379697d92068c79604eb7fb7c..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsusers/actsconnectabilitysystemabilitytest/entry/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts +++ /dev/null @@ -1,78 +0,0 @@ -/* - * 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 TestRunner from '@ohos.application.testRunner' -import AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry' - -var abilityDelegator = undefined -var abilityDelegatorArguments = undefined - -function translateParamsToString(parameters) { - const keySet = new Set([ - '-s class', '-s notClass', '-s suite', '-s it', - '-s level', '-s testType', '-s size', '-s timeout', - '-s dryRun' - ]) - let targetParams = ''; - for (const key in parameters) { - if (keySet.has(key)) { - targetParams = `${targetParams} ${key} ${parameters[key]}` - } - } - return targetParams.trim() -} - -async function onAbilityCreateCallback() { - console.log("onAbilityCreateCallback"); -} - -async function addAbilityMonitorCallback(err: any) { - console.info("addAbilityMonitorCallback : " + JSON.stringify(err)) -} - -export default class OpenHarmonyTestRunner implements TestRunner { - constructor() { - } - - onPrepare() { - console.info("OpenHarmonyTestRunner OnPrepare ") - } - - async onRun() { - console.log('OpenHarmonyTestRunner onRun run') - abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments() - abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() - var testAbilityName = abilityDelegatorArguments.bundleName + '.MainAbility' - let lMonitor = { - abilityName: testAbilityName, - onAbilityCreate: onAbilityCreateCallback, - }; - abilityDelegator.addAbilityMonitor(lMonitor, addAbilityMonitorCallback) - var cmd = 'aa start -d 0 -a com.example.actsconnectabilitysystemabilitytest.MainAbility' + ' -b ' + abilityDelegatorArguments.bundleName - cmd += ' '+translateParamsToString(abilityDelegatorArguments.parameters) - var debug = abilityDelegatorArguments.parameters["-D"] - if (debug == 'true') - { - cmd += ' -D' - } - console.info('cmd : '+cmd) - abilityDelegator.executeShellCommand(cmd, - (err: any, d: any) => { - console.info('executeShellCommand : err : ' + JSON.stringify(err)); - console.info('executeShellCommand : data : ' + d.stdResult); - console.info('executeShellCommand : data : ' + d.exitCode); - }) - console.info('OpenHarmonyTestRunner onRun end') - } -}; \ No newline at end of file diff --git a/ability/ability_runtime/actsusers/actsconnectabilitysystemabilitytest/entry/src/main/ets/test/List.test.ets b/ability/ability_runtime/actsusers/actsconnectabilitysystemabilitytest/entry/src/main/ets/test/List.test.ets deleted file mode 100644 index 28df98361684afa7098165888c1e1a088d291475..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsusers/actsconnectabilitysystemabilitytest/entry/src/main/ets/test/List.test.ets +++ /dev/null @@ -1,18 +0,0 @@ -/* - * 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 abilityTest from './manyusersabilitytest.test.ets' -export default function testsuite() { - abilityTest() -} \ No newline at end of file diff --git a/ability/ability_runtime/actsusers/actsconnectabilitysystemabilitytest/entry/src/main/ets/test/manyusersabilitytest.test.ets b/ability/ability_runtime/actsusers/actsconnectabilitysystemabilitytest/entry/src/main/ets/test/manyusersabilitytest.test.ets deleted file mode 100644 index 6da29857f1c1b9c884ff27177dfcd6a02c831fe8..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsusers/actsconnectabilitysystemabilitytest/entry/src/main/ets/test/manyusersabilitytest.test.ets +++ /dev/null @@ -1,838 +0,0 @@ -/* - * 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 { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from "@ohos/hypium" -import commonEvent from '@ohos.commonEvent' - - -var subscriberInfoStartAbility_0100 = { - events: ["AMS_ConnectAbility_0100_commonEvent"], -}; -var subscriberInfoStartAbility_0200 = { - events: ["AMS_ConnectAbility_0200_commonEvent"], -}; -var subscriberInfoStartAbility_0300 = { - events: ["AMS_ConnectAbility_0300_commonEvent"], -}; -var subscriberInfoStartAbility_0400 = { - events: ["AMS_ConnectAbility_0400_commonEvent"], -}; -var subscriberInfoStartAbility_0500 = { - events: ["AMS_ConnectAbility_0500_commonEvent"], -}; -var subscriberInfoStartAbility_0600 = { - events: ["AMS_ConnectAbility_0600_commonEvent"], -}; -var subscriberInfoStartAbility_0700 = { - events: ["AMS_ConnectAbility_0700_commonEvent"], -}; -var subscriberInfoStartAbility_0800 = { - events: ["AMS_ConnectAbility_0800_commonEvent"], -}; -var subscriberInfoStartAbility_0900 = { - events: ["AMS_ConnectAbility_0900_commonEvent"], -}; - -var subscriberInfoStartAbility_1000 = { - events: ["AMS_ConnectAbility_1000_commonEvent"], -}; - -var subscriberInfoStartAbility_1100 = { - events: ["AMS_ConnectAbility_1100_commonEvent"], -}; - -var subscriberInfoStartAbility_1200 = { - events: ["AMS_ConnectAbility_1200_commonEvent"], -}; -var unsubscriberInfoStartAbility_0100 = { - events: ["AMSc_disonnectAbility_0100_commonEvent"], -}; -var unsubscriberInfoStartAbility_0200 = { - events: ["AMSc_disonnectAbility_0200_commonEvent"], -}; - - -const START_ABILITY_TIMEOUT = 1000; -globalThis.number = 0; - -export default function abilityTest() { - describe('ActssystemabilityTest', function () { - - /* - * @tc.number: ACTS_ConnectAbility_0100 - * @tc.name: Connects a service ability - * @tc.desc: Connects a service ability - */ - it('ACTS_ConnectAbility_0100', 0, async function (done) { - console.log('ACTS_ConnectAbility_0100====ACTS_ConnectAbility_0100 7 CallBack data:====>" + JSON.stringify(data)); - clearTimeout(id); - expect(data.event).assertEqual("AMS_ConnectAbility_0100_commonEvent"); - console.debug("====>ACTS_ConnectAbility_0100 5 "); - globalThis.abilityContext.disconnectServiceExtensionAbility( - connId, - (error, data) => { - console.log('featureAbilityTest DisconnectAbility result errCode : ' + error.code + " data: " + data) - } - ); - console.debug("====>ACTS_ConnectAbility_0100 6 "); - commonEvent.unsubscribe(subscriber, unSubscribeCallback) - - } - - commonEvent.createSubscriber(subscriberInfoStartAbility_0100).then(async (data) => { - console.debug("====>ACTS_ConnectAbility_0100 2 Subscriber1====>"); - subscriber = data; - await commonEvent.subscribe(subscriber, subscribeCallBack); - }) - - function unSubscribeCallback() { - console.debug("====>UnSubscribe CallBack1====>"); - done(); - } - - function timeout() { - expect().assertFail(); - console.debug('AMS_ConnectAbility_0100 timeout'); - commonEvent.unsubscribe(subscriber, unSubscribeCallback) - globalThis.abilityContext.disconnectServiceExtensionAbility( - connId, - (error, data) => { - console.log('featureAbilityTest DisconnectAbility result errCode : ' + error.code + " data: " + data) - }); - } - function onConnectCallback(element, remote) { - console.debug('ACTS_ConnectAbility_0100 _onConnectCallback ====> element=' - + JSON.stringify(element) + " , " + element); - console.debug('ACTS_ConnectAbility_0100 _onConnectCallback ====> remote=' - + JSON.stringify(remote) + " , " + remote); - } - - function onDisconnectCallback(element) { - console.debug('ACTS_ConnectAbility_0100 _onDisconnectCallback ====> element=' - + JSON.stringify(element) + " , " + element); - } - - function onFailedCallback(code) { - console.debug('ACTS_ConnectAbility_0100 _onFailedCallback ====> code=' - + JSON.stringify(code) + " , " + code) - } - - id = setTimeout(timeout, START_ABILITY_TIMEOUT); - console.debug("====>ACTS_ConnectAbility_0100 3 "); - connId = await globalThis.abilityContext.connectServiceExtensionAbility( - { - bundleName: "com.example.actsconnectabilitysystemabilitytest", - abilityName: "com.example.actsconnectabilitysystemabilitytest.ServiceAbility", - action: "one", - }, - { - onConnect: onConnectCallback, - onDisconnect: onDisconnectCallback, - onFailed: onFailedCallback, - } - ); - console.debug("====>ACTS_ConnectAbility_0100 4 "); - }) - - /* - * @tc.number: ACTS_ConnectAbility_0200 - * @tc.name: Connects a service ability - * @tc.desc: Connects a service ability - */ - it('ACTS_ConnectAbility_0200', 0, async function (done) { - console.log('ACTS_ConnectAbility_0200====Subscribe CallBack data:====>" + JSON.stringify(data)); - clearTimeout(id); - expect(data.event).assertEqual("AMS_ConnectAbility_0200_commonEvent"); - commonEvent.unsubscribe(subscriber, unSubscribeCallback) - } - commonEvent.createSubscriber(subscriberInfoStartAbility_0200).then(async (data) => { - console.debug("====>Create Subscriber====>"); - subscriber = data; - await commonEvent.subscribe(subscriber, subscribeCallBack); - }) - function unSubscribeCallback() { - console.debug("====>UnSubscribe CallBack====>"); - done(); - } - function timeout() { - console.debug('AMS_ConnectAbility_0200 timeout'); - commonEvent.unsubscribe(subscriber, unSubscribeCallback) - } - id = setTimeout(timeout, START_ABILITY_TIMEOUT); - connId = await globalThis.abilityContext.connectAbility( - { - bundleName: "com.example.actsconnectabilitysystemabilitytest", - abilityName: "com.example.actsconnectabilitysystemabilitytest.ServiceAbilityone", - action: "two", - }, - { - onFailed: onFailedCallback, - }, - ); - }) - - /* - * @tc.number: ACTS_DisconnectAbility_0100 - * @tc.name: DisConnects a service ability - * @tc.desc: DisConnects a service ability - */ - it('ACTS_DisconnectAbility_0100', 0, async function (done) { - console.log('ACTS_DisconnectAbility_0100====ACTS_DisconnectAbility_0100 5 CallBack data:====>" + JSON.stringify(data)); - clearTimeout(id); - console.debug("====>ACTS_DisconnectAbility_0100 6====>"); - globalThis.abilityContext.disconnectAbility( - connId, - (error, data) => { - console.log('featureAbilityTest DisconnectAbility result errCode : ' + error.code + " data: " + data) - } - ); - console.debug("====>ACTS_DisconnectAbility_0100 6====>"); - commonEvent.unsubscribe(subscriber, unSubscribeCallback) - } - commonEvent.createSubscriber(subscriberInfoStartAbility_0300).then(async (data) => { - console.debug("====>ACTS_DisconnectAbility_0100 2 Subscriber====>"); - subscriber = data; - await commonEvent.subscribe(subscriber, subscribeCallBack); - }) - function unSubscribeCallback() { - console.debug("====>UnSubscribe CallBack====>"); - setTimeout(() => { - done() - }, 1000) - }; - function timeout() { - expect().assertFail(); - console.debug('AMS_DonnectAbility_0300 timeout'); - commonEvent.unsubscribe(subscriber, unSubscribeCallback) - globalThis.abilityContext.disconnectAbility( - connId, - (error, data) => { - console.log('featureAbilityTest DisconnectAbility result errCode : ' + error.code + " data: " + data) - }); - } - id = setTimeout(timeout, START_ABILITY_TIMEOUT); - console.debug("====>ACTS_DisconnectAbility_0100 3====>"); - connId = await globalThis.abilityContext.connectAbility( - { - bundleName: "com.example.actsconnectabilitysystemabilitytest", - abilityName: "com.example.actsconnectabilitysystemabilitytest.ServiceAbility", - action: "Three", - }, - ); - console.debug("====>ACTS_DisconnectAbility_0100 4====>"); - }) - - /* - * @tc.number: ACTS_DisconnectAbility_0200 - * @tc.name: DisConnects a service ability - * @tc.desc: DisConnects a service ability - */ - it('ACTS_DisconnectAbility_0200', 0, async function (done) { - console.log('ACTS_DisconnectAbility_0200 1====ACTS_DisconnectAbility_0200 3 CallBack1 data:====>" + JSON.stringify(data)); - commonEvent.createSubscriber(unsubscriberInfoStartAbility_0100).then(async (data) => { - console.debug("====>ACTS_DisconnectAbility_0200 6 Subscriber====>"); - subscriberdisconnect = data; - await commonEvent.subscribe(subscriberdisconnect, subscribedisconnectback); - console.debug("====>ACTS_DisconnectAbility_0200 1111 connectAbility1====>"); - - console.debug("====>ACTS_DisconnectAbility_0200 1111 connectAbility2====>"); - console.debug("====>ACTS_DisconnectAbility_0200 66 Subscriber====>"); - globalThis.abilityContext.disconnectAbility( - 999, - (error, data) => { - console.log('ACTS_DisconnectAbility_0200 5 DisconnectAbility result errCode : ' - + error.code + " data: " + data) - }); - }) - } - function subscribedisconnectback(err, data) { - console.debug("====>ACTS_DisconnectAbility_0200 7 CallBack2 data:====>" + JSON.stringify(data)); - commonEvent.unsubscribe(subscriberdisconnect, () => { - console.debug('unsubscribe subscriberdisconnect'); - commonEvent.unsubscribe(subscriber, () => { - console.debug('unsubscribe subscriber') - clearTimeout(id); - expect().assertFail(); - done(); - }) - }) - } - function timeout() { - console.debug('ACTS_DisconnectAbility_0200 8 timeout'); - commonEvent.unsubscribe(subscriberdisconnect, () => { - console.debug('unsubscribe subscriberdisconnect'); - commonEvent.unsubscribe(subscriber, () => { - console.debug('unsubscribe subscriber') - globalThis.abilityContext.disconnectAbility( - connId, - (error, data) => { - console.log('ACTS_DisconnectAbility_0200 9 DisconnectAbility result errCode : ' - + error.code + " data: " + data) - console.debug("====>ACTS_DisconnectAbility_0200 99 Subscriber====>"); - setTimeout(() => { - done(); - }, 1000) - }); - }) - }) - } - commonEvent.createSubscriber(subscriberInfoStartAbility_0400).then(async (data) => { - console.debug("====>ACTS_DisconnectAbility_0200 10 Subscriber====>"); - subscriber = data; - await commonEvent.subscribe(subscriber, subscribeCallBack) - connId = await globalThis.abilityContext.connectAbility( - { - bundleName: "com.example.actsconnectabilitysystemabilitytest", - abilityName: "com.example.actsconnectabilitysystemabilitytest.ServiceAbility", - action: "Four", - }, - ); - console.debug("====>connId is:====>" + JSON.stringify(connId)); - console.debug("====>ACTS_DisconnectAbility_0200 1010 Subscriber====>"); - }) - function unSubscribeCallback() { - console.debug("====>ACTS_DisconnectAbility_0200 1111 UnSubscribe CallBack====>"); - done(); - } - }) - - /* - * @tc.number: ACTS_DisconnectAbility_0300 - * @tc.name: DisConnects a service ability - * @tc.desc: DisConnects a service ability - */ - it('ACTS_DisconnectAbility_0300', 0, async function (done) { - console.log('ACTS_DisconnectAbility_0300====ACTS_DisconnectAbility_0300 4 CallBack data:====>" + JSON.stringify(data)); - clearTimeout(id); - expect(data.event).assertEqual("AMS_ConnectAbility_0500_commonEvent"); - globalThis.abilityContext.disconnectAbility( - connId, - (error, data) => { - console.log('ACTS_DisconnectAbility_0300 5 DisconnectAbility result errCode : ' - + error.code + " data: " + data) - } - ); - commonEvent.unsubscribe(subscriber, unSubscribeCallback) - } - commonEvent.createSubscriber(subscriberInfoStartAbility_0500).then(async (data) => { - console.debug("====>ACTS_DisconnectAbility_0300 1 Subscriber====>"); - subscriber = data; - await commonEvent.subscribe(subscriber, subscribeCallBack); - }) - function unSubscribeCallback() { - console.debug("====>ACTS_DisconnectAbility_0300 6 CallBack====>"); - setTimeout(() => { - done(); - }, 1000) - } - function timeout() { - expect().assertFail(); - console.debug('AMS_ConnectAbility_0500 timeout'); - commonEvent.unsubscribe(subscriber, unSubscribeCallback) - globalThis.abilityContext.disconnectAbility( - connId, - (error, data) => { - console.log('ACTS_DisconnectAbility_0300 7 DisconnectAbility result errCode : ' - + error.code + " data: " + data) - }); - } - id = setTimeout(timeout, START_ABILITY_TIMEOUT); - console.debug("====>ACTS_DisconnectAbility_0300 3 "); - connId = await globalThis.abilityContext.connectAbility( - { - bundleName: "com.example.actsconnectabilitysystemabilitytest", - abilityName: "com.example.actsconnectabilitysystemabilitytest.ServiceAbility", - action: "Five", - }, - ); - console.debug("====>ACTS_DisconnectAbility_0300 4 "); - }) - - /* - * @tc.number: ACTS_DisconnectAbility_0400 - * @tc.name: DisConnects a service ability - * @tc.desc: DisConnects a service ability - */ - it('ACTS_DisconnectAbility_0400', 0, async function (done) { - console.log('ACTS_DisconnectAbility_0400 1====ACTS_DisconnectAbility_0400 3 CallBack1 data:====>" + JSON.stringify(data)); - commonEvent.createSubscriber(unsubscriberInfoStartAbility_0200).then(async (data) => { - console.debug("====>ACTS_DisconnectAbility_0400 6 Subscriber====>"); - subscriberdisconnect = data; - await commonEvent.subscribe(subscriberdisconnect, subscribedisconnectback); - console.debug("====>ACTS_DisconnectAbility_0400 1111 connectAbility1====>"); - - console.debug("====>ACTS_DisconnectAbility_0400 1111 connectAbility2====>"); - console.debug("====>ACTS_DisconnectAbility_0400 66 Subscriber====>"); - globalThis.abilityContext.disconnectAbility( - 999, - (error, data) => { - console.log('ACTS_DisconnectAbility_0400 5 DisconnectAbility result errCode : ' - + error.code + " data: " + data) - }); - }) - } - function subscribedisconnectback(err, data) { - console.debug("====>ACTS_DisconnectAbility_0400 7 CallBack2 data:====>" + JSON.stringify(data)); - commonEvent.unsubscribe(subscriberdisconnect, () => { - console.debug('unsubscribe subscriberdisconnect'); - commonEvent.unsubscribe(subscriber, () => { - console.debug('unsubscribe subscriber') - clearTimeout(id); - expect().assertFail(); - done(); - }) - }) - } - function timeout() { - console.debug('ACTS_DisconnectAbility_0400 8 timeout'); - commonEvent.unsubscribe(subscriberdisconnect, () => { - console.debug('unsubscribe subscriberdisconnect'); - commonEvent.unsubscribe(subscriber, () => { - console.debug('unsubscribe subscriber') - globalThis.abilityContext.disconnectAbility( - connId, - (error, data) => { - console.log('ACTS_DisconnectAbility_0400 9 DisconnectAbility result errCode : ' - + error.code + " data: " + data) - console.debug("====>ACTS_DisconnectAbility_0400 99 Subscriber====>"); - setTimeout(() => { - done(); - }, 1000) - }); - }) - }) - } - commonEvent.createSubscriber(subscriberInfoStartAbility_0600).then(async (data) => { - console.debug("====>ACTS_DisconnectAbility_0400 10 Subscriber====>"); - subscriber = data; - await commonEvent.subscribe(subscriber, subscribeCallBack) - connId = await globalThis.abilityContext.connectAbility( - { - bundleName: "com.example.actsconnectabilitysystemabilitytest", - abilityName: "com.example.actsconnectabilitysystemabilitytest.ServiceAbility", - action: "Six", - }, - ); - console.debug("====>connId is:====>" + JSON.stringify(connId)); - console.debug("====>ACTS_DisconnectAbility_0400 1010 Subscriber====>"); - }) - function unSubscribeCallback() { - console.debug("====>ACTS_DisconnectAbility_0400 1111 UnSubscribe CallBack====>"); - done(); - } - }) - - /* - * @tc.number: ACTS_ExtensionConnectAbility_0100 - * @tc.name: Service connect a service ability - * @tc.desc: Service connect a service ability - */ - it('ACTS_ExtensionConnectAbility_0100', 0, async function (done) { - console.log('ACTS_ExtensionConnectAbility_0100====ACTS_ExtensionConnectAbility_0100 7 CallBack data:====>" + JSON.stringify(data)); - clearTimeout(id); - expect(data.event).assertEqual("AMS_ConnectAbility_0700_commonEvent"); - console.debug("====>ACTS_ExtensionConnectAbility_0100 5 "); - globalThis.abilityContext.disconnectAbility( - connId, - (error, data) => { - console.log('featureAbilityTest DisconnectAbility result errCode : ' + error.code + " data: " + data) - } - ); - console.debug("====>ACTS_ExtensionConnectAbility_0100 6 "); - commonEvent.unsubscribe(subscriber, unSubscribeCallback) - } - commonEvent.createSubscriber(subscriberInfoStartAbility_0700).then(async (data) => { - console.debug("====>ACTS_ExtensionConnectAbility_0100 2 Subscriber1====>"); - subscriber = data; - await commonEvent.subscribe(subscriber, subscribeCallBack); - }) - function unSubscribeCallback() { - console.debug("====>UnSubscribe CallBack1====>"); - setTimeout(() => { - done(); - }, 1000) - } - function timeout() { - expect().assertFail(); - console.debug('ACTS_ExtensionConnectAbility_0100 timeout'); - commonEvent.unsubscribe(subscriber, unSubscribeCallback) - globalThis.abilityContext.disconnectAbility( - connId, - (error, data) => { - console.log('featureAbilityTest DisconnectAbility result errCode : ' + error.code + " data: " + data) - }); - } - id = setTimeout(timeout, START_ABILITY_TIMEOUT); - console.debug("====>ACTS_ExtensionConnectAbility_0100 3 "); - connId = await globalThis.abilityContext.connectAbility( - { - bundleName: "com.example.actsconnectabilitysystemabilitytest", - abilityName: "com.example.actsconnectabilitysystemabilitytest.ServiceAbility", - action: "Seven", - }, - ); - console.debug("====>ACTS_ExtensionConnectAbility_0100 4 "); - }) - - /* - * @tc.number: ACTS_ExtensionConnectAbility_0200 - * @tc.name: Service connect a service ability - * @tc.desc: Service connect a service ability - */ - it('ACTS_ExtensionConnectAbility_0200', 0, async function (done) { - console.log('ACTS_ExtensionConnectAbility_0200====ACTS_ExtensionConnectAbility_0200 7 CallBack data:====>" + JSON.stringify(data)); - clearTimeout(id); - expect(data.event).assertEqual("AMS_ConnectAbility_0800_commonEvent"); - console.debug("====>ACTS_ExtensionConnectAbility_0200 5 "); - globalThis.abilityContext.disconnectAbility( - connId, - (error, data) => { - console.log('featureAbilityTest DisconnectAbility result errCode : ' + error.code + " data: " + data) - } - ); - console.debug("====>ACTS_ExtensionConnectAbility_0200 6 "); - commonEvent.unsubscribe(subscriber, unSubscribeCallback) - } - commonEvent.createSubscriber(subscriberInfoStartAbility_0800).then(async (data) => { - console.debug("====>ACTS_ExtensionConnectAbility_0200 2 Subscriber1====>"); - subscriber = data; - await commonEvent.subscribe(subscriber, subscribeCallBack); - }) - function unSubscribeCallback() { - console.debug("====>UnSubscribe CallBack1====>"); - setTimeout(() => { - done(); - }, 1000) - } - function timeout() { - console.debug('ACTS_ExtensionConnectAbility_0200 timeout'); - commonEvent.unsubscribe(subscriber, unSubscribeCallback) - globalThis.abilityContext.disconnectAbility( - connId, - (error, data) => { - console.log('featureAbilityTest DisconnectAbility result errCode : ' + error.code + " data: " + data) - }); - } - id = setTimeout(timeout, START_ABILITY_TIMEOUT); - console.debug("====>ACTS_ExtensionConnectAbility_0200 3 "); - connId = await globalThis.abilityContext.connectAbility( - { - bundleName: "com.example.actsconnectabilitysystemabilitytest", - abilityName: "com.example.actsconnectabilitysystemabilitytest.ServiceAbility", - action: "Eight", - }, - ); - console.debug("====>ACTS_ExtensionConnectAbility_0200 4 "); - }) - - /* - * @tc.number: ACTS_ExtensionDisconnectAbility_0100 - * @tc.name: Service disConnects a service ability - * @tc.desc: Service disConnects a service ability - */ - it('ACTS_ExtensionDisconnectAbility_0100', 0, async function (done) { - console.log('ACTS_ExtensionDisconnectAbility_0100====ACTS_ExtensionDisconnectAbility_0100 7 CallBack data:====>" + JSON.stringify(data)); - clearTimeout(id); - expect(data.event).assertEqual("AMS_ConnectAbility_0900_commonEvent"); - console.debug("====>ACTS_ExtensionDisconnectAbility_0100 5 "); - globalThis.abilityContext.disconnectAbility( - connId, - (error, data) => { - console.log('featureAbilityTest DisconnectAbility result errCode : ' + error.code + " data: " + data) - } - ); - console.debug("====>ACTS_ExtensionDisconnectAbility_0100 6 "); - commonEvent.unsubscribe(subscriber, unSubscribeCallback) - } - commonEvent.createSubscriber(subscriberInfoStartAbility_0900).then(async (data) => { - console.debug("====>ACTS_ExtensionDisconnectAbility_0100 2 Subscriber1====>"); - subscriber = data; - await commonEvent.subscribe(subscriber, subscribeCallBack); - }) - function unSubscribeCallback() { - console.debug("====>UnSubscribe CallBack1====>"); - setTimeout(() => { - done(); - }, 1000) - } - function timeout() { - expect().assertFail(); - console.debug('ACTS_ExtensionDisconnectAbility_0100 timeout'); - commonEvent.unsubscribe(subscriber, unSubscribeCallback) - globalThis.abilityContext.disconnectAbility( - connId, - (error, data) => { - console.log('featureAbilityTest DisconnectAbility result errCode : ' + error.code + " data: " + data) - }); - } - id = setTimeout(timeout, START_ABILITY_TIMEOUT); - console.debug("====>ACTS_ExtensionDisconnectAbility_0100 3 "); - connId = await globalThis.abilityContext.connectAbility( - { - bundleName: "com.example.actsconnectabilitysystemabilitytest", - abilityName: "com.example.actsconnectabilitysystemabilitytest.ServiceAbility", - action: "Nine", - }, - ); - console.debug("====>ACTS_ExtensionDisconnectAbility_0100 4 "); - }) - - /* - * @tc.number: ACTS_ExtensionDisconnectAbility_0200 - * @tc.name: Service disConnects a service ability - * @tc.desc: Service disConnects a service ability - */ - it('ACTS_ExtensionDisconnectAbility_0200', 0, async function (done) { - console.log('ACTS_ExtensionDisconnectAbility_0200====ACTS_ExtensionDisconnectAbility_0200 7 CallBack data:====>" + JSON.stringify(data)); - clearTimeout(id); - expect(data.event).assertEqual("AMS_ConnectAbility_1000_commonEvent"); - console.debug("====>ACTS_ExtensionDisconnectAbility_0200 5 "); - globalThis.abilityContext.disconnectAbility( - connId, - (error, data) => { - console.log('featureAbilityTest DisconnectAbility result errCode : ' + error.code + " data: " + data) - } - ); - console.debug("====>ACTS_ExtensionDisconnectAbility_0200 6 "); - commonEvent.unsubscribe(subscriber, unSubscribeCallback) - } - commonEvent.createSubscriber(subscriberInfoStartAbility_1000).then(async (data) => { - console.debug("====>ACTS_ExtensionDisconnectAbility_0200 2 Subscriber1====>"); - subscriber = data; - await commonEvent.subscribe(subscriber, subscribeCallBack); - }) - function unSubscribeCallback() { - console.debug("====>UnSubscribe CallBack1====>"); - setTimeout(() => { - done(); - }, 1000) - } - function timeout() { - expect().assertFail(); - console.debug('ACTS_ExtensionDisconnectAbility_0200 timeout'); - commonEvent.unsubscribe(subscriber, unSubscribeCallback) - globalThis.abilityContext.disconnectAbility( - connId, - (error, data) => { - console.log('featureAbilityTest DisconnectAbility result errCode : ' + error.code + " data: " + data) - }); - } - id = setTimeout(timeout, START_ABILITY_TIMEOUT); - console.debug("====>ACTS_ExtensionDisconnectAbility_0200 3 "); - connId = await globalThis.abilityContext.connectAbility( - { - bundleName: "com.example.actsconnectabilitysystemabilitytest", - abilityName: "com.example.actsconnectabilitysystemabilitytest.ServiceAbility", - action: "Ten", - }, - ); - console.debug("====>ACTS_ExtensionDisconnectAbility_0200 4 "); - }) - - /* - * @tc.number: ACTS_ExtensionDisconnectAbility_0300 - * @tc.name: Service disConnects a service ability - * @tc.desc: Service disConnects a service ability - */ - it('ACTS_ExtensionDisconnectAbility_0300', 0, async function (done) { - console.log('ACTS_ExtensionDisconnectAbility_0300====ACTS_ExtensionDisconnectAbility_0300 7 CallBack data:====>" + JSON.stringify(data)); - clearTimeout(id); - expect(data.event).assertEqual("AMS_ConnectAbility_1100_commonEvent"); - console.debug("====>ACTS_ExtensionDisconnectAbility_0300 5 "); - globalThis.abilityContext.disconnectAbility( - connId, - (error, data) => { - console.log('featureAbilityTest DisconnectAbility result errCode : ' + error.code + " data: " + data) - } - ); - console.debug("====>ACTS_ExtensionDisconnectAbility_0300 6 "); - commonEvent.unsubscribe(subscriber, unSubscribeCallback) - } - commonEvent.createSubscriber(subscriberInfoStartAbility_1100).then(async (data) => { - console.debug("====>ACTS_ExtensionDisconnectAbility_0300 2 Subscriber1====>"); - subscriber = data; - await commonEvent.subscribe(subscriber, subscribeCallBack); - }) - function unSubscribeCallback() { - console.debug("====>UnSubscribe CallBack1====>"); - setTimeout(() => { - done(); - }, 1000) - } - function timeout() { - console.debug('ACTS_ExtensionDisconnectAbility_0300 timeout'); - commonEvent.unsubscribe(subscriber, unSubscribeCallback) - globalThis.abilityContext.disconnectAbility( - connId, - (error, data) => { - console.log('featureAbilityTest DisconnectAbility result errCode : ' + error.code + " data: " + data) - }); - } - id = setTimeout(timeout, START_ABILITY_TIMEOUT); - console.debug("====>ACTS_ExtensionDisconnectAbility_0300 3 "); - connId = await globalThis.abilityContext.connectAbility( - { - bundleName: "com.example.actsconnectabilitysystemabilitytest", - abilityName: "com.example.actsconnectabilitysystemabilitytest.ServiceAbility", - action: "Ten one", - }, - ); - console.debug("====>ACTS_ExtensionDisconnectAbility_0300 4 "); - }) - - /* - * @tc.number: ACTS_ExtensionDisconnectAbility_0400 - * @tc.name: Service disConnects a service ability - * @tc.desc: Service disConnects a service ability - */ - it('ACTS_ExtensionDisconnectAbility_0400', 0, async function (done) { - console.log('ACTS_ExtensionDisconnectAbility_0400====ACTS_ThirdPartyExtensionDisconnectAbility_0400 7 CallBack data:====>" - + JSON.stringify(data)); - clearTimeout(id); - expect(data.event).assertEqual("AMS_ConnectAbility_1200_commonEvent"); - console.debug("====>ACTS_ExtensionDisconnectAbility_0400 5 "); - globalThis.abilityContext.disconnectAbility( - connId, - (error, data) => { - console.log('featureAbilityTest DisconnectAbility result errCode : ' + error.code + " data: " + data) - } - ); - console.debug("====>ACTS_ExtensionDisconnectAbility_0400 6 "); - commonEvent.unsubscribe(subscriber, unSubscribeCallback) - } - commonEvent.createSubscriber(subscriberInfoStartAbility_1200).then(async (data) => { - console.debug("====>ACTS_ExtensionDisconnectAbility_0400 2 Subscriber1====>"); - subscriber = data; - await commonEvent.subscribe(subscriber, subscribeCallBack); - }) - function unSubscribeCallback() { - console.debug("====>UnSubscribe CallBack1====>"); - setTimeout(() => { - done(); - }, 1000) - } - function timeout() { - console.debug('ACTS_ExtensionDisconnectAbility_0400 timeout'); - commonEvent.unsubscribe(subscriber, unSubscribeCallback) - globalThis.abilityContext.disconnectAbility( - connId, - (error, data) => { - console.log('featureAbilityTest DisconnectAbility result errCode : ' + error.code + " data: " + data) - }); - } - id = setTimeout(timeout, START_ABILITY_TIMEOUT); - console.debug("====>ACTS_ExtensionDisconnectAbility_0400 3 "); - connId = await globalThis.abilityContext.connectAbility( - { - bundleName: "com.example.actsconnectabilitysystemabilitytest", - abilityName: "com.example.actsconnectabilitysystemabilitytest.ServiceAbility", - action: "Ten two", - }, - ); - console.debug("====>ACTS_ExtensionDisconnectAbility_0400 4 "); - }) - }) -} - - diff --git a/ability/ability_runtime/actsusers/actsconnectabilitysystemabilitytest/entry/src/main/module.json b/ability/ability_runtime/actsusers/actsconnectabilitysystemabilitytest/entry/src/main/module.json deleted file mode 100644 index 302b69fb49ef340a0cb9f46e1828f4a7ad3e860a..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsusers/actsconnectabilitysystemabilitytest/entry/src/main/module.json +++ /dev/null @@ -1,109 +0,0 @@ -{ - "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.actsconnectabilitysystemabilitytest.MainAbility", - "srcEntrance": "./ets/MainAbility/MainAbility.ts", - "description": "$string:phone_entry_main", - "icon": "$media:icon", - "label": "$string:entry_label", - "visible": true, - "orientation": "portrait", - "skills": [ - { - "actions": [ - "action.system.home" - ], - "entities": [ - "entity.system.home" - ] - } - ] - } - ], - "extensionAbilities": [ - { - "srcEntrance": "./ets/ServiceAbility/ServiceAbility.ts", - "name": "com.example.actsconnectabilitysystemabilitytest.ServiceAbility", - "icon": "$media:icon", - "srcLanguage": "ets", - "description": "$string:phone_entry_main", - "type": "service", - "visible": true - }, - { - "srcEntrance": "./ets/ServiceAbility2/ServiceAbility2.ts", - "name": "com.example.actsconnectabilitysystemabilitytest.ServiceAbility2", - "icon": "$media:icon", - "srcLanguage": "ets", - "description": "$string:phone_entry_main", - "type": "service", - "visible": true - } - ], - - "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.MANAGE_LOCAL_ACCOUNTS", - "reason": "ceshi" - }, - { - "name": "ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS_EXTENSION", - "reason": "ceshi" - }, - { - "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" - } - ] - } -} diff --git a/ability/ability_runtime/actsusers/actsconnectabilitysystemabilitytest/entry/src/main/resources/base/element/string.json b/ability/ability_runtime/actsusers/actsconnectabilitysystemabilitytest/entry/src/main/resources/base/element/string.json deleted file mode 100644 index 376647878b379044fa3300dfa4662c98a4c3efbc..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsusers/actsconnectabilitysystemabilitytest/entry/src/main/resources/base/element/string.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "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" - } - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/actsusers/actsconnectabilitysystemabilitytest/entry/src/main/resources/base/media/icon.png b/ability/ability_runtime/actsusers/actsconnectabilitysystemabilitytest/entry/src/main/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actsusers/actsconnectabilitysystemabilitytest/entry/src/main/resources/base/media/icon.png and /dev/null differ diff --git a/ability/ability_runtime/actsusers/actsconnectabilitysystemabilitytest/entry/src/main/resources/base/profile/main_pages.json b/ability/ability_runtime/actsusers/actsconnectabilitysystemabilitytest/entry/src/main/resources/base/profile/main_pages.json deleted file mode 100644 index 010134e5cdcb46ef62097816f127dac0bb93a398..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsusers/actsconnectabilitysystemabilitytest/entry/src/main/resources/base/profile/main_pages.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "src": [ - "MainAbility/pages/index/index", - "MainAbility/pages/second/second" - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/actsusers/actsconnectabilitysystemabilitytest/signature/openharmony_sx.p7b b/ability/ability_runtime/actsusers/actsconnectabilitysystemabilitytest/signature/openharmony_sx.p7b deleted file mode 100644 index dcec6c9615032c1b48bf185e839d9720dd68aab0..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actsusers/actsconnectabilitysystemabilitytest/signature/openharmony_sx.p7b and /dev/null differ diff --git a/ability/ability_runtime/actsusers/actsmanyuserthirdabilitytest/AppScope/app.json b/ability/ability_runtime/actsusers/actsmanyuserthirdabilitytest/AppScope/app.json deleted file mode 100644 index b1b238029879b38f307ef03222eaf46089585039..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsusers/actsmanyuserthirdabilitytest/AppScope/app.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "app": { - "bundleName": "com.example.actsmanyusersabilitytest", - "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 - } - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsusers/actsmanyuserthirdabilitytest/AppScope/resources/base/element/string.json b/ability/ability_runtime/actsusers/actsmanyuserthirdabilitytest/AppScope/resources/base/element/string.json deleted file mode 100644 index be09cccde1bc7369ef47a5cd45d2b06884c88602..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsusers/actsmanyuserthirdabilitytest/AppScope/resources/base/element/string.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "string": [ - { - "name": "app_name", - "value": "ohosProject" - } - ] -} diff --git a/ability/ability_runtime/actsusers/actsmanyuserthirdabilitytest/AppScope/resources/base/media/app_icon.png b/ability/ability_runtime/actsusers/actsmanyuserthirdabilitytest/AppScope/resources/base/media/app_icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actsusers/actsmanyuserthirdabilitytest/AppScope/resources/base/media/app_icon.png and /dev/null differ diff --git a/ability/ability_runtime/actsusers/actsmanyuserthirdabilitytest/BUILD.gn b/ability/ability_runtime/actsusers/actsmanyuserthirdabilitytest/BUILD.gn deleted file mode 100644 index ee2bf8f463485e77193941b45263f474a201b746..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsusers/actsmanyuserthirdabilitytest/BUILD.gn +++ /dev/null @@ -1,43 +0,0 @@ -# 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_js_hap_suite("ActsManyUsersAbilityTest") { - hap_profile = "entry/src/main/module.json" - js_build_mode = "debug" - deps = [ - ":actsmanyusersabilitytest_js_assets", - ":actsmanyusersabilitytest_resources", - ] - ets2abc = true - certificate_profile = "signature/openharmony_sx.p7b" - hap_name = "ActsManyUsersAbilityTest" - subsystem_name = "ability" - part_name = "ability_runtime" -} - -ohos_app_scope("actsmanyusersabilitytest_app_profile") { - app_profile = "AppScope/app.json" - sources = [ "AppScope/resources" ] -} - -ohos_js_assets("actsmanyusersabilitytest_js_assets") { - source_dir = "entry/src/main/ets" -} - -ohos_resources("actsmanyusersabilitytest_resources") { - sources = [ "entry/src/main/resources" ] - deps = [ ":actsmanyusersabilitytest_app_profile" ] - hap_profile = "entry/src/main/module.json" -} diff --git a/ability/ability_runtime/actsusers/actsmanyuserthirdabilitytest/Test.json b/ability/ability_runtime/actsusers/actsmanyuserthirdabilitytest/Test.json deleted file mode 100644 index 28dd95c05d8b8bd240859deee2e66df52e5f8169..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsusers/actsmanyuserthirdabilitytest/Test.json +++ /dev/null @@ -1,33 +0,0 @@ - -{ - "description": "Configuration for hjunit demo Tests", - "driver": { - "type": "OHJSUnitTest", - "test-timeout": "300000", - "bundle-name": "com.example.actsmanyusersabilitytest", - "module-name":"phone", - "shell-timeout": "300000", - "testcase-timeout": "30000" - }, - "kits": [ - { - "type": "ShellKit", - "run-command": [ - "acm create -n 101 -t normal", - "acm switch -i 101" - ], - "teardown-command":[ - "acm delete -i 101" - ] - }, - { - "test-file-name": [ - "ActsManyUsersAbilityTest.hap" - ], - "type": "AppInstallKit", - "cleanup-apps": true - } - - ] -} - diff --git a/ability/ability_runtime/actsusers/actsmanyuserthirdabilitytest/entry/src/main/ets/Application/AbilityStage.ts b/ability/ability_runtime/actsusers/actsmanyuserthirdabilitytest/entry/src/main/ets/Application/AbilityStage.ts deleted file mode 100644 index 98eb012db14b28a1f92522e305b9d4538e496dd3..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsusers/actsmanyuserthirdabilitytest/entry/src/main/ets/Application/AbilityStage.ts +++ /dev/null @@ -1,23 +0,0 @@ -/* -* 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" - -export default class MyAbilityStage extends AbilityStage { - onCreate() { - console.log("MyAbilityStage onCreate") - globalThis.stageOnCreateRun = 1; - globalThis.stageContext = this.context; - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsusers/actsmanyuserthirdabilitytest/entry/src/main/ets/MainAbility/MainAbility.ts b/ability/ability_runtime/actsusers/actsmanyuserthirdabilitytest/entry/src/main/ets/MainAbility/MainAbility.ts deleted file mode 100644 index 91d5813ab77fa200dde9e17845093fc4760d7245..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsusers/actsmanyuserthirdabilitytest/entry/src/main/ets/MainAbility/MainAbility.ts +++ /dev/null @@ -1,51 +0,0 @@ -/* -* 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' - -export default class MainAbility extends Ability { - - onCreate(want, launchParam) { - // Ability is creating, initialize resources for this ability - console.log("MainAbility onCreate") - globalThis.abilityWant = want; - } - - onDestroy() { - // Ability is destroying, release resources for this ability - console.log("MainAbility onDestroy") - } - - onWindowStageCreate(windowStage) { - // Main window is created, set main page for this ability - console.log("MainAbility onWindowStageCreate") - globalThis.abilityContext = this.context - windowStage.setUIContent(this.context, "MainAbility/pages/index/index", null) - } - - onWindowStageDestroy() { - // Main window is destroyed, release UI related resources - console.log("MainAbility onWindowStageDestroy") - } - - onForeground() { - // Ability has brought to foreground - console.log("MainAbility onForeground") - } - - onBackground() { - // Ability has back to background - console.log("MainAbility onBackground") - } -}; diff --git a/ability/ability_runtime/actsusers/actsmanyuserthirdabilitytest/entry/src/main/ets/MainAbility/pages/index/index.ets b/ability/ability_runtime/actsusers/actsmanyuserthirdabilitytest/entry/src/main/ets/MainAbility/pages/index/index.ets deleted file mode 100644 index 5a7b56cd65dee907f5d21f00139c9c4158d58d4f..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsusers/actsmanyuserthirdabilitytest/entry/src/main/ets/MainAbility/pages/index/index.ets +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) 2021 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 AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry' -import { Hypium } from '@ohos/hypium' -import testsuite from '../../../test/List.test' -import router from '@ohos.router' - -@Entry -@Component -struct Index { - aboutToAppear() { - console.info("start run testcase!!!!") - var abilityDelegator: any - abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() - var abilityDelegatorArguments: any - abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments() - console.info('start run testcase!!!') - Hypium.hypiumTest(abilityDelegator, abilityDelegatorArguments, testsuite) - - } - build() { - Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { - Text('MainAbility') - .fontSize(50) - .fontWeight(FontWeight.Bold) - } - .width('100%') - .height('100%') - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsusers/actsmanyuserthirdabilitytest/entry/src/main/ets/MainAbility/pages/second/second.ets b/ability/ability_runtime/actsusers/actsmanyuserthirdabilitytest/entry/src/main/ets/MainAbility/pages/second/second.ets deleted file mode 100644 index 2c768edb999b1b54fef3268922817734b1f1c954..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsusers/actsmanyuserthirdabilitytest/entry/src/main/ets/MainAbility/pages/second/second.ets +++ /dev/null @@ -1,43 +0,0 @@ -/* -* 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 diff --git a/ability/ability_runtime/actsusers/actsmanyuserthirdabilitytest/entry/src/main/ets/ServiceAbility/ServiceAbility.ts b/ability/ability_runtime/actsusers/actsmanyuserthirdabilitytest/entry/src/main/ets/ServiceAbility/ServiceAbility.ts deleted file mode 100644 index 360b453d4ec06923b7f90be95b4ac500cc8385e6..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsusers/actsmanyuserthirdabilitytest/entry/src/main/ets/ServiceAbility/ServiceAbility.ts +++ /dev/null @@ -1,206 +0,0 @@ -/* -* 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 ServiceExtension from '@ohos.application.ServiceExtensionAbility' -import commonEvent from '@ohos.commonEvent' -import Want from '@ohos.application.Want'; -import rpc from "@ohos.rpc"; - -var conn = -1; -function publishCallBackOne () { - console.log("========Publish CallBack AMS_ConnectAbility_0100_commonEvent========"); -} -function publishCallBackTwo () { - console.log("========Publish CallBack AMS_ConnectAbility_0200_commonEvent========"); -} -function publishCallBackThree () { - console.log("========Publish CallBack AMS_ConnectAbility_0300_commonEvent========"); -} -function publishCallBackFour () { - console.log("========Publish CallBack AMS_ConnectAbility_0400_commonEvent========"); -} -function publishCallBackFive () { - console.log("========Publish CallBack AMS_ConnectAbility_0500_commonEvent========"); -} -function publishCallBackSix () { - console.log("========Publish CallBack AMS_ConnectAbility_0600_commonEvent========"); -} -function publishCallBackzero () { - console.log("========Publish CallBack AMSc_disonnectAbility_0100_commonEvent========"); -} -function publishCallBackttwo () { - console.log("========Publish CallBack AMSc_disonnectAbility_0200_commonEvent========"); -} - -function onConnectCallback(element, remote) { - console.log('onConnectCallback====> element=' + JSON.stringify(element)); - console.log('onConnectCallback====> remote=' + JSON.stringify(remote)); - } - - function onDisconnectCallback(element) { - console.log('onDisconnectCallback====> element=' + JSON.stringify(element)); - } - - function onFailedCallback(code) { - console.log('onFailedCallback====> code=' + JSON.stringify(code)) - } -export default class ServiceAbility extends ServiceExtension { - onCreate(want:Want) { - console.log('ServiceAbility onCreate, want: ' + want.abilityName); - } - - onRequest(want, startId) { - console.log('ServiceAbility onRequest, want: ' + want.abilityName + ', startId: ' + startId); - - console.log('ServiceAbility registerApplicationStateObserver begin'); - console.log('ServiceAbility registerApplicationStateObserver end, conn: ' + conn); - } - - onConnect(want) { - console.log('ServiceAbility onConnect, want:' + want.abilityName); - let extensionContext = this.context - if (want.action == "one") { - commonEvent.publish("AMS_ConnectAbility_0100_commonEvent", publishCallBackOne); - } - ; - if (want.action == "two") { - commonEvent.publish("AMS_ConnectAbility_0200_commonEvent", publishCallBackTwo); - } - ; - if (want.action == "Three") { - commonEvent.publish("AMS_ConnectAbility_0300_commonEvent", publishCallBackThree); - } - ; - if (want.action == "Four") { - commonEvent.publish("AMS_ConnectAbility_0400_commonEvent", publishCallBackFour); - } - ; - if (want.action == "Five") { - commonEvent.publish("AMS_ConnectAbility_0500_commonEvent", publishCallBackFive); - } - ; - if (want.action == "Six") { - commonEvent.publish("AMS_ConnectAbility_0600_commonEvent", publishCallBackSix); - } - ; - if (want.action == "Seven") { - extensionContext.connectAbility( - { - bundleName: "com.example.actsmanyusersabilitytest", - abilityName: "com.example.actsmanyusersabilitytest.ServiceAbility2", - }, { - onConnect: onConnectCallback, - onDisconnect: onDisconnectCallback, - onFailed: onFailedCallback - } - ); - }; - if (want.action == "Eight") { - extensionContext.connectAbility( - { - bundleName: "com.example.actsmanyusersabilitytesta", - abilityName: "com.example.actsmanyusersabilitytest.ServiceAbility3", - }, { - onConnect: onConnectCallback, - onDisconnect: onDisconnectCallback, - onFailed: onFailedCallback - } - ); - }; - if (want.action == "Nine") { - console.log('connectAbility 111'); - let num = this.context.connectAbility( - { - bundleName: 'com.example.actsmanyusersabilitytest', - abilityName: 'com.example.actsmanyusersabilitytest.ServiceAbility2' - }, { - onConnect: onConnectCallback, - onDisconnect: onDisconnectCallback, - onFailed: onFailedCallback - }) - setTimeout(()=>{ - this.context.disconnectAbility(num).then(()=>{ - console.log('in disconnectAbility'); - }) - },1000) - - }; - if (want.action == "Ten") { - console.log('connectAbility 222'); - let num = this.context.connectAbility( - { - bundleName: 'com.example.actsmanyusersabilitytest', - abilityName: 'com.example.actsmanyusersabilitytest.ServiceAbility2' - }, { - onConnect: onConnectCallback, - onDisconnect: onDisconnectCallback, - onFailed: onFailedCallback - }) - setTimeout(()=>{ - this.context.disconnectAbility(num).then(()=>{ - console.log('in disconnectAbility2'); - }) - },1000) - - }; - if (want.action == "Ten one") { - console.log('connectAbility 333'); - let num = this.context.connectAbility( - { - bundleName: 'com.example.actsmanyusersabilitytest', - abilityName: 'com.example.actsmanyusersabilitytest.ServiceAbility2' - }, { - onConnect: onConnectCallback, - onDisconnect: onDisconnectCallback, - onFailed: onFailedCallback - }) - setTimeout(()=>{ - this.context.disconnectAbility(2222).then(()=>{ - console.log('in disconnectAbility3'); - }) - },1000) - - }; - if (want.action == "Ten two") { - console.log('connectAbility 444'); - let num = this.context.connectAbility( - { - bundleName: 'com.example.actsmanyusersabilitytest', - abilityName: 'com.example.actsmanyusersabilitytest.ServiceAbility2' - }, { - onConnect: onConnectCallback, - onDisconnect: onDisconnectCallback, - onFailed: onFailedCallback - }) - setTimeout(()=>{ - this.context.disconnectAbility(2222).then(()=>{ - console.log('in disconnectAbility4'); - }) - },1000) - - }; - return new rpc.RemoteObject('connect'); - } - - onDisconnect(want) { - console.log('ServiceAbility onDisconnect, want:' + want.abilityName); - commonEvent.publish("AMSc_disonnectAbility_0100_commonEvent",publishCallBackzero); - commonEvent.publish("AMSc_disonnectAbility_0200_commonEvent",publishCallBackttwo); - } - - onDestroy() { - console.log('ServiceAbility onDestroy'); - } -} - diff --git a/ability/ability_runtime/actsusers/actsmanyuserthirdabilitytest/entry/src/main/ets/ServiceAbility/service.ts b/ability/ability_runtime/actsusers/actsmanyuserthirdabilitytest/entry/src/main/ets/ServiceAbility/service.ts deleted file mode 100644 index b49731a414958a281c2f0c4eab0e7fb408eb2c2f..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsusers/actsmanyuserthirdabilitytest/entry/src/main/ets/ServiceAbility/service.ts +++ /dev/null @@ -1,25 +0,0 @@ -/* -* 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. -*/ -export default { - onStart() { - console.info('ServiceAbility onStart'); - }, - onStop() { - console.info('ServiceAbility onStop'); - }, - onCommand(want, startId) { - console.info('ServiceAbility onCommand'); - } -}; \ No newline at end of file diff --git a/ability/ability_runtime/actsusers/actsmanyuserthirdabilitytest/entry/src/main/ets/ServiceAbility2/ServiceAbility2.ts b/ability/ability_runtime/actsusers/actsmanyuserthirdabilitytest/entry/src/main/ets/ServiceAbility2/ServiceAbility2.ts deleted file mode 100644 index 737e704681561e9e1ad7406b1ab388c1b0dd2670..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsusers/actsmanyuserthirdabilitytest/entry/src/main/ets/ServiceAbility2/ServiceAbility2.ts +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (c) 2021 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 ServiceExtension from '@ohos.application.ServiceExtensionAbility' -import commonEvent from "@ohos.commonEvent" -import Want from '@ohos.application.Want'; -import rpc from "@ohos.rpc"; - -export default class ServiceAbility2 extends ServiceExtension { - onCreate(want:Want) { - console.log('ServiceAbility2 onCreate'); - globalThis.abilityWant = want; - } - - onDestory(){ - console.log('ServiceAbility2 onDestory'); - } - - onRequest(want,startId) { - console.log('ServiceAbility2 onRequest'); - } - - onConnect(want) { - console.log('ServiceAbility2 onConnect'); - commonEvent.publish("AMS_ConnectAbility_0700_commonEvent", () => { - console.log("publish Publish AMS_ConnectAbility_0700_commonEvent callback"); - }) - commonEvent.publish("AMS_ConnectAbility_0900_commonEvent", () => { - console.log("publish Publish AMS_ConnectAbility_0900_commonEvent callback"); - }) - commonEvent.publish("AMS_ConnectAbility_1000_commonEvent", () => { - console.log("publish Publish AMS_ConnectAbility_1000_commonEvent callback"); - }) - commonEvent.publish("AMS_ConnectAbility_1100_commonEvent", () => { - console.log("publish Publish AMS_ConnectAbility_1100_commonEvent callback"); - }) - commonEvent.publish("AMS_ConnectAbility_1200_commonEvent", () => { - console.log("publish Publish AMS_ConnectAbility_1200_commonEvent callback"); - }) - return new rpc.RemoteObject('connect'); - } - - - onDisconnect(want) { - console.log('ServiceAbility2 onDisconnect, want:' + want.abilityName); - } - - onDestroy() { - console.log('ServiceAbility2 onDestroy'); - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsusers/actsmanyuserthirdabilitytest/entry/src/main/ets/ServiceAbility2/service.ts b/ability/ability_runtime/actsusers/actsmanyuserthirdabilitytest/entry/src/main/ets/ServiceAbility2/service.ts deleted file mode 100644 index 340a610cb718c70c98add0b5d052bb4589185174..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsusers/actsmanyuserthirdabilitytest/entry/src/main/ets/ServiceAbility2/service.ts +++ /dev/null @@ -1,25 +0,0 @@ -/* - * 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. - */ -export default { - onStart() { - console.info('ServiceAbility2 onStart'); - }, - onStop() { - console.info('ServiceAbility2 onStop'); - }, - onCommand(want, startId) { - console.info('ServiceAbility2 onCommand'); - } -}; \ No newline at end of file diff --git a/ability/ability_runtime/actsusers/actsmanyuserthirdabilitytest/entry/src/main/ets/TestAbility/TestAbility.ts b/ability/ability_runtime/actsusers/actsmanyuserthirdabilitytest/entry/src/main/ets/TestAbility/TestAbility.ts deleted file mode 100644 index e9f9aadff45f162df116bfe3a90661ea6ab331dc..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsusers/actsmanyuserthirdabilitytest/entry/src/main/ets/TestAbility/TestAbility.ts +++ /dev/null @@ -1,51 +0,0 @@ -/* - * 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' - -export default class TestAbility extends Ability { - onCreate(want, launchParam) { - console.log('TestAbility onCreate') - } - - onDestroy() { - console.log('TestAbility onDestroy') - } - - onWindowStageCreate(windowStage) { - console.log('TestAbility onWindowStageCreate') - windowStage.loadContent("TestAbility/pages/index", (err, data) => { - if (err.code) { - console.error('Failed to load the content. Cause:' + JSON.stringify(err)); - return; - } - console.info('Succeeded in loading the content. Data: ' + JSON.stringify(data)) - }); - - globalThis.abilityContext = this.context; - } - - onWindowStageDestroy() { - console.log('TestAbility onWindowStageDestroy') - } - - onForeground() { - console.log('TestAbility onForeground') - } - - onBackground() { - console.log('TestAbility onBackground') - } -}; \ No newline at end of file diff --git a/ability/ability_runtime/actsusers/actsmanyuserthirdabilitytest/entry/src/main/ets/TestAbility/pages/index.ets b/ability/ability_runtime/actsusers/actsmanyuserthirdabilitytest/entry/src/main/ets/TestAbility/pages/index.ets deleted file mode 100644 index fae969f985ff5bf7432de71e36c792364ebac1f6..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsusers/actsmanyuserthirdabilitytest/entry/src/main/ets/TestAbility/pages/index.ets +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2021 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 '@ohos.router'; - -@Entry -@Component -struct Index { - aboutToAppear() { - console.info('TestAbility index aboutToAppear') - } - @State message: string = 'Hello World' - build() { - Row() { - Column() { - Text(this.message) - .fontSize(50) - .fontWeight(FontWeight.Bold) - Button() { - Text('next page') - .fontSize(20) - .fontWeight(FontWeight.Bold) - }.type(ButtonType.Capsule) - .margin({ - top: 20 - }) - .backgroundColor('#0D9FFB') - .width('35%') - .height('5%') - .onClick(()=>{ - }) - } - .width('100%') - } - .height('100%') - } - } \ No newline at end of file diff --git a/ability/ability_runtime/actsusers/actsmanyuserthirdabilitytest/entry/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts b/ability/ability_runtime/actsusers/actsmanyuserthirdabilitytest/entry/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts deleted file mode 100644 index 4eaf1e8878ddb3863695b2a6267cba3a53d2606e..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsusers/actsmanyuserthirdabilitytest/entry/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts +++ /dev/null @@ -1,78 +0,0 @@ -/* - * 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 TestRunner from '@ohos.application.testRunner' -import AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry' - -var abilityDelegator = undefined -var abilityDelegatorArguments = undefined - -function translateParamsToString(parameters) { - const keySet = new Set([ - '-s class', '-s notClass', '-s suite', '-s it', - '-s level', '-s testType', '-s size', '-s timeout', - '-s dryRun' - ]) - let targetParams = ''; - for (const key in parameters) { - if (keySet.has(key)) { - targetParams = `${targetParams} ${key} ${parameters[key]}` - } - } - return targetParams.trim() -} - -async function onAbilityCreateCallback() { - console.log("onAbilityCreateCallback"); -} - -async function addAbilityMonitorCallback(err: any) { - console.info("addAbilityMonitorCallback : " + JSON.stringify(err)) -} - -export default class OpenHarmonyTestRunner implements TestRunner { - constructor() { - } - - onPrepare() { - console.info("OpenHarmonyTestRunner OnPrepare ") - } - - async onRun() { - console.log('OpenHarmonyTestRunner onRun run') - abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments() - abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() - var testAbilityName = abilityDelegatorArguments.bundleName + '.MainAbility' - let lMonitor = { - abilityName: testAbilityName, - onAbilityCreate: onAbilityCreateCallback, - }; - abilityDelegator.addAbilityMonitor(lMonitor, addAbilityMonitorCallback) - var cmd = 'aa start -d 0 -a com.example.actsmanyusersabilitytest.MainAbility' + ' -b ' + abilityDelegatorArguments.bundleName - cmd += ' '+translateParamsToString(abilityDelegatorArguments.parameters) - var debug = abilityDelegatorArguments.parameters["-D"] - if (debug == 'true') - { - cmd += ' -D' - } - console.info('cmd : '+cmd) - abilityDelegator.executeShellCommand(cmd, - (err: any, d: any) => { - console.info('executeShellCommand : err : ' + JSON.stringify(err)); - console.info('executeShellCommand : data : ' + d.stdResult); - console.info('executeShellCommand : data : ' + d.exitCode); - }) - console.info('OpenHarmonyTestRunner onRun end') - } -}; \ No newline at end of file diff --git a/ability/ability_runtime/actsusers/actsmanyuserthirdabilitytest/entry/src/main/ets/test/List.test.ets b/ability/ability_runtime/actsusers/actsmanyuserthirdabilitytest/entry/src/main/ets/test/List.test.ets deleted file mode 100644 index 71eb7f381dc583f4b34d9bdaeb23a8f68dc2d0a9..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsusers/actsmanyuserthirdabilitytest/entry/src/main/ets/test/List.test.ets +++ /dev/null @@ -1,19 +0,0 @@ -/* - * 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 abilityTest from './manyusersabilitytest.test.ets' -export default function testsuite() { - - abilityTest() -} \ No newline at end of file diff --git a/ability/ability_runtime/actsusers/actsmanyuserthirdabilitytest/entry/src/main/ets/test/manyusersabilitytest.test.ets b/ability/ability_runtime/actsusers/actsmanyuserthirdabilitytest/entry/src/main/ets/test/manyusersabilitytest.test.ets deleted file mode 100644 index e1ebf0fc34c97ac81c040eb4c8617802c0e84ce6..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsusers/actsmanyuserthirdabilitytest/entry/src/main/ets/test/manyusersabilitytest.test.ets +++ /dev/null @@ -1,912 +0,0 @@ -/* - * 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 { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from "@ohos/hypium" -import commonEvent from '@ohos.commonEvent' - - -var subscriberInfoStartAbility_0100 = { - events: ["AMS_ConnectAbility_0100_commonEvent"], -}; -var subscriberInfoStartAbility_0200 = { - events: ["AMS_ConnectAbility_0200_commonEvent"], -}; -var subscriberInfoStartAbility_0300 = { - events: ["AMS_ConnectAbility_0300_commonEvent"], -}; -var subscriberInfoStartAbility_0400 = { - events: ["AMS_ConnectAbility_0400_commonEvent"], -}; -var subscriberInfoStartAbility_0500 = { - events: ["AMS_ConnectAbility_0500_commonEvent"], -}; -var subscriberInfoStartAbility_0600 = { - events: ["AMS_ConnectAbility_0600_commonEvent"], -}; -var subscriberInfoStartAbility_0700 = { - events: ["AMS_ConnectAbility_0700_commonEvent"], -}; -var subscriberInfoStartAbility_0800 = { - events: ["AMS_ConnectAbility_0800_commonEvent"], -}; -var subscriberInfoStartAbility_0900 = { - events: ["AMS_ConnectAbility_0900_commonEvent"], -}; - -var subscriberInfoStartAbility_1000 = { - events: ["AMS_ConnectAbility_1000_commonEvent"], -}; - -var subscriberInfoStartAbility_1100 = { - events: ["AMS_ConnectAbility_1100_commonEvent"], -}; - -var subscriberInfoStartAbility_1200 = { - events: ["AMS_ConnectAbility_1200_commonEvent"], -}; -var unsubscriberInfoStartAbility_0100 = { - events: ["AMSc_disonnectAbility_0100_commonEvent"], -}; -var unsubscriberInfoStartAbility_0200 = { - events: ["AMSc_disonnectAbility_0200_commonEvent"], -}; - - -const START_ABILITY_TIMEOUT = 1000; -globalThis.number = 0; - -function onConnectCallback(element, remote) { - console.log(' ACTS_ConnectAbility onConnectCallback====> element=' + JSON.stringify(element)); - console.log(' ACTS_ConnectAbility onConnectCallback====> remote=' + JSON.stringify(remote)); - // setTimeout(()=> { - // console.log('====>in timeout'); - // console.debug("====>flag is====>" + JSON.stringify(flag)); - // if(flag == true) { - // console.debug('ACTS_ThirdPartyExtensionStartAbility_0600 - timeout'); - // commonEvent.unsubscribe(Subscriber, UnSubscribeCallback); - // } - // }, 1000); -} -function onDisconnectCallback(element) { - console.log('ACTS_ConnectAbility onDisconnectCallback====> element=' + JSON.stringify(element)); -} - -function onFailedCallback(code) { - console.log('ACTS_ConnectAbility onFailedCallback====> code=' + JSON.stringify(code)) -} - -export default function abilityTest() { - describe('manyuserability', function () { - - function onFailedCallBack(code) { - console.log('ACTS_ConnectAbility_0200 Connectability errcode:' + code); - } - - /* - * @tc.number : ACTS_ThirdPartyConnectAbility_0100 - * @tc.name : connect ability - * @tc.desc : Start an ability with the parameter startability with options failed.(callback) - */ - it('ACTS_ThirdPartyConnectAbility_0100', 0, async function (done) { - console.log('ACTS_ThirdPartyConnectAbility_0100====ACTS_ThirdPartyConnectAbility_0100 7 CallBack data:====>" + JSON.stringify(data)); - clearTimeout(id); - expect(data.event).assertEqual("AMS_ConnectAbility_0100_commonEvent"); - console.debug("====>ACTS_ThirdPartyConnectAbility_0100 5 "); - globalThis.abilityContext.disconnectAbility( - connId, - (error, data) => { - console.log('featureAbilityTest DisconnectAbility result errCode : ' + error.code + " data: " + data) - } - ); - console.debug("====>ACTS_ThirdPartyConnectAbility_0100 6 "); - commonEvent.unsubscribe(subscriber, unSubscribeCallback) - } - - commonEvent.createSubscriber(subscriberInfoStartAbility_0100).then(async (data) => { - console.debug("====>ACTS_ThirdPartyConnectAbility_0100 2 Subscriber1====>"); - subscriber = data; - await commonEvent.subscribe(subscriber, subscribeCallBack); - }) - - function unSubscribeCallback() { - console.debug("====>UnSubscribe CallBack1====>"); - done(); - } - - function timeout() { - expect().assertFail(); - console.debug('ACTS_ThirdPartyConnectAbility_0100 timeout'); - commonEvent.unsubscribe(subscriber, unSubscribeCallback) - globalThis.abilityContext.disconnectAbility( - connId, - (error, data) => { - console.log('featureAbilityTest DisconnectAbility result errCode : ' + error.code + " data: " + data) - }); - } - - id = setTimeout(timeout, START_ABILITY_TIMEOUT); - console.debug("====>ACTS_ThirdPartyConnectAbility_0100 3 "); - connId = await globalThis.abilityContext.connectAbility( - { - bundleName: "com.example.actsmanyusersabilitytest", - abilityName: "com.example.actsmanyusersabilitytest.ServiceAbility", - action: "one", - },{ - onConnect:onConnectCallback, - onDisconnect:onDisconnectCallback, - onFailed: onFailedCallback - } - ); - - console.debug("====>ACTS_ThirdPartyConnectAbility_0100 4 "); - - }) - - - - it('ACTS_ThirdPartyConnectAbility_0200', 0, async function (done) { - console.log('ACTS_ThirdPartyConnectAbility_0200====ACTS_ThirdPartyConnectAbility_0200 Subscribe CallBack data:====>" + JSON.stringify(data)); - clearTimeout(id); - expect(data.event).assertEqual("AMS_ConnectAbility_0200_commonEvent"); - - commonEvent.unsubscribe(subscriber, unSubscribeCallback) - } - - commonEvent.createSubscriber(subscriberInfoStartAbility_0200).then(async (data) => { - console.debug("====>ACTS_ThirdPartyConnectAbility_0200 Create Subscriber====>"); - subscriber = data; - await commonEvent.subscribe(subscriber, subscribeCallBack); - }) - - function unSubscribeCallback() { - console.debug("====>ACTS_ThirdPartyConnectAbility_0200 UnSubscribe CallBack====>"); - done(); - } - - function timeout() { - console.debug('ACTS_ThirdPartyConnectAbility_0200 timeout'); - commonEvent.unsubscribe(subscriber, unSubscribeCallback) - done(); - } - - id = setTimeout(timeout, START_ABILITY_TIMEOUT); - connId = await globalThis.abilityContext.connectAbility( - { - bundleName: "com.example.actsmanyusersabilitytest", - abilityName: "com.example.actsmanyusersabilitytest.ServiceAbilityone", - action: "two", - }, - { - onFailed: onFailedCallBack, - }, - ); - }) - - it('ACTS_ThirdPartyDisconnectAbility_0100', 0, async function (done) { - console.log('ACTS_ThirdPartyDisconnectAbility_0100====ACTS_ThirdPartyDisconnectAbility_0100 5 CallBack data:====>" + JSON.stringify(data)); - clearTimeout(id); - console.debug("====>ACTS_ThirdPartyDisconnectAbility_0100 6====>"); - globalThis.abilityContext.disconnectAbility( - connId, - (error, data) => { - console.log('featureAbilityTest DisconnectAbility result errCode : ' + error.code + " data: " + data) - } - ); - console.debug("====>ACTS_ThirdPartyDisconnectAbility_0100 6====>"); - commonEvent.unsubscribe(subscriber, unSubscribeCallback) - - } - - - commonEvent.createSubscriber(subscriberInfoStartAbility_0300).then(async (data) => { - console.debug("====>ACTS_ThirdPartyDisconnectAbility_0100 2 Subscriber====>"); - subscriber = data; - await commonEvent.subscribe(subscriber, subscribeCallBack); - }) - - function unSubscribeCallback() { - console.debug("====>UnSubscribe CallBack====>"); - setTimeout(() => { - done() - }, 1000) - }; - - function timeout() { - expect().assertFail(); - console.debug('AMS_DonnectAbility_0300 timeout'); - commonEvent.unsubscribe(subscriber, unSubscribeCallback) - globalThis.abilityContext.disconnectAbility( - connId, - (error, data) => { - console.log('featureAbilityTest DisconnectAbility result errCode : ' + error.code + " data: " + data) - }); - } - - id = setTimeout(timeout, START_ABILITY_TIMEOUT); - console.debug("====>ACTS_ThirdPartyDisconnectAbility_0100 3====>"); - connId = await globalThis.abilityContext.connectAbility( - { - bundleName: "com.example.actsmanyusersabilitytest", - abilityName: "com.example.actsmanyusersabilitytest.ServiceAbility", - action: "Three", - }, { - onConnect: onConnectCallback, - onDisconnect: onDisconnectCallback, - onFailed: onFailedCallback - } - ); - console.debug("====>ACTS_ThirdPartyDisconnectAbility_0100 4====>"); - }) - - it('ACTS_ThirdPartyDisconnectAbility_0200', 0, async function (done) { - console.log('ACTS_ThirdPartyDisconnectAbility_0200 1====ACTS_ThirdPartyDisconnectAbility_0200 3 CallBack1 data:====>" + JSON.stringify(data)); - commonEvent.createSubscriber(unsubscriberInfoStartAbility_0100).then(async (data) => { - console.debug("====>ACTS_ThirdPartyDisconnectAbility_0200 6 Subscriber====>"); - subscriberdisconnect = data; - await commonEvent.subscribe(subscriberdisconnect, subscribedisconnectback); - console.debug("====>ACTS_ThirdPartyDisconnectAbility_0200 1111 connectAbility1====>"); - - console.debug("====>ACTS_ThirdPartyDisconnectAbility_0200 1111 connectAbility2====>"); - console.debug("====>ACTS_ThirdPartyDisconnectAbility_0200 66 Subscriber====>"); - globalThis.abilityContext.disconnectAbility( - 999, - (error, data) => { - console.log('ACTS_ThirdPartyDisconnectAbility_0200 5 DisconnectAbility result errCode : ' + error.code + " data: " + data) - }); - }) - } - - function subscribedisconnectback(err, data) { - console.debug("====>ACTS_ThirdPartyDisconnectAbility_0200 7 CallBack2 data:====>" + JSON.stringify(data)); - commonEvent.unsubscribe(subscriberdisconnect, () => { - console.debug('unsubscribe subscriberdisconnect'); - - commonEvent.unsubscribe(subscriber, () => { - console.debug('unsubscribe subscriber') - clearTimeout(id); - expect().assertFail(); - done(); - }) - }) - } - - function timeout() { - console.debug('ACTS_ThirdPartyDisconnectAbility_0200 8 timeout'); - commonEvent.unsubscribe(subscriberdisconnect, () => { - console.debug('unsubscribe subscriberdisconnect'); - commonEvent.unsubscribe(subscriber, () => { - console.debug('unsubscribe subscriber') - globalThis.abilityContext.disconnectAbility( - connId, - (error, data) => { - console.log('ACTS_ThirdPartyDisconnectAbility_0200 9 DisconnectAbility result errCode : ' + error.code + " data: " + data) - console.debug("====>ACTS_ThirdPartyDisconnectAbility_0200 99 Subscriber====>"); - setTimeout(() => { - done(); - }, 1000) - }); - }) - }) - - - } - - commonEvent.createSubscriber(subscriberInfoStartAbility_0400).then(async (data) => { - console.debug("====>ACTS_ThirdPartyDisconnectAbility_0200 10 Subscriber====>"); - subscriber = data; - await commonEvent.subscribe(subscriber, subscribeCallBack) - connId = await globalThis.abilityContext.connectAbility( - { - bundleName: "com.example.actsmanyusersabilitytest", - abilityName: "com.example.actsmanyusersabilitytest.ServiceAbility", - action: "Four", - }, { - onConnect: onConnectCallback, - onDisconnect: onDisconnectCallback, - onFailed: onFailedCallback - } - ); - console.debug("====>connId is:====>" + JSON.stringify(connId)); - console.debug("====>ACTS_ThirdPartyDisconnectAbility_0200 1010 Subscriber====>"); - }) - - - function unSubscribeCallback() { - console.debug("====>ACTS_DisconnectAbility_0200 1111 UnSubscribe CallBack====>"); - done(); - } - - }) - - it('ACTS_ThirdPartyDisconnectAbility_0300', 0, async function (done) { - console.log('ACTS_ThirdPartyDisconnectAbility_0300====ACTS_ThirdPartyDisconnectAbility_0300 4 CallBack data:====>" + JSON.stringify(data)); - clearTimeout(id); - expect(data.event).assertEqual("AMS_ConnectAbility_0500_commonEvent"); - globalThis.abilityContext.disconnectAbility( - connId, - (error, data) => { - console.log('ACTS_ThirdPartyDisconnectAbility_0300 5 DisconnectAbility result errCode : ' + error.code + " data: " + data) - } - ); - commonEvent.unsubscribe(subscriber, unSubscribeCallback) - - } - - - commonEvent.createSubscriber(subscriberInfoStartAbility_0500).then(async (data) => { - console.debug("====>ACTS_ThirdPartyDisconnectAbility_0300 1 Subscriber====>"); - subscriber = data; - await commonEvent.subscribe(subscriber, subscribeCallBack); - }) - - function unSubscribeCallback() { - console.debug("====>ACTS_ThirdPartyDisconnectAbility_0300 6 CallBack====>"); - setTimeout(() => { - done(); - }, 1000) - } - - function timeout() { - expect().assertFail(); - console.debug('ACTS_ThirdPartyDisconnectAbility_0300 timeout'); - commonEvent.unsubscribe(subscriber, unSubscribeCallback) - globalThis.abilityContext.disconnectAbility( - connId, - (error, data) => { - console.log('ACTS_ThirdPartyDisconnectAbility_0300 7 DisconnectAbility result errCode : ' + error.code + " data: " + data) - }); - } - - id = setTimeout(timeout, START_ABILITY_TIMEOUT); - console.debug("====>ACTS_ThirdPartyDisconnectAbility_0300 3 "); - connId = await globalThis.abilityContext.connectAbility( - { - bundleName: "com.example.actsmanyusersabilitytest", - abilityName: "com.example.actsmanyusersabilitytest.ServiceAbility", - action: "Five", - }, { - onConnect: onConnectCallback, - onDisconnect: onDisconnectCallback, - onFailed: onFailedCallback - } - ); - console.debug("====>ACTS_ThirdPartyDisconnectAbility_0300 4 "); - }) - it('ACTS_ThirdPartyDisconnectAbility_0400', 0, async function (done) { - console.log('ACTS_ThirdPartyDisconnectAbility_0400 1====ACTS_ThirdPartyDisconnectAbility_0400 3 CallBack1 data:====>" + JSON.stringify(data)); - commonEvent.createSubscriber(unsubscriberInfoStartAbility_0200).then(async (data) => { - console.debug("====>ACTS_ThirdPartyDisconnectAbility_0400 6 Subscriber====>"); - subscriberdisconnect = data; - await commonEvent.subscribe(subscriberdisconnect, subscribedisconnectback); - console.debug("====>ACTS_ThirdPartyDisconnectAbility_0400 1111 connectAbility1====>"); - - console.debug("====>ACTS_ThirdPartyDisconnectAbility_0400 1111 connectAbility2====>"); - console.debug("====>ACTS_ThirdPartyDisconnectAbility_0400 66 Subscriber====>"); - globalThis.abilityContext.disconnectAbility( - 999, - (error, data) => { - console.log('ACTS_ThirdPartyDisconnectAbility_0400 5 DisconnectAbility result errCode : ' + error.code + " data: " + data) - }); - }) - } - - function subscribedisconnectback(err, data) { - console.debug("====>ACTS_ThirdPartyDisconnectAbility_0400 7 CallBack2 data:====>" + JSON.stringify(data)); - commonEvent.unsubscribe(subscriberdisconnect, () => { - console.debug('unsubscribe subscriberdisconnect'); - - commonEvent.unsubscribe(subscriber, () => { - console.debug('unsubscribe subscriber') - clearTimeout(id); - expect().assertFail(); - done(); - }) - }) - } - - function timeout() { - console.debug('ACTS_ThirdPartyDisconnectAbility_0400 8 timeout'); - commonEvent.unsubscribe(subscriberdisconnect, () => { - console.debug('unsubscribe subscriberdisconnect'); - commonEvent.unsubscribe(subscriber, () => { - console.debug('unsubscribe subscriber') - globalThis.abilityContext.disconnectAbility( - connId, - (error, data) => { - console.log('ACTS_ThirdPartyDisconnectAbility_0400 9 DisconnectAbility result errCode : ' + error.code + " data: " + data) - console.debug("====>ACTS_DisconnectAbility_0200 99 Subscriber====>"); - setTimeout(() => { - done(); - }, 1000) - }); - }) - }) - - - } - - commonEvent.createSubscriber(subscriberInfoStartAbility_0600).then(async (data) => { - console.debug("====>ACTS_ThirdPartyDisconnectAbility_0400 10 Subscriber====>"); - subscriber = data; - await commonEvent.subscribe(subscriber, subscribeCallBack) - connId = await globalThis.abilityContext.connectAbility( - { - bundleName: "com.example.actsmanyusersabilitytest", - abilityName: "com.example.actsmanyusersabilitytest.ServiceAbility", - action: "Six", - }, { - onConnect: onConnectCallback, - onDisconnect: onDisconnectCallback, - onFailed: onFailedCallback - } - ); - console.debug("====>connId is:====>" + JSON.stringify(connId)); - console.debug("====>ACTS_ThirdPartyDisconnectAbility_0400 1010 Subscriber====>"); - }) - - - function unSubscribeCallback() { - console.debug("====>ACTS_ThirdPartyDisconnectAbility_0400 1111 UnSubscribe CallBack====>"); - done(); - } - - }) - it('ACTS_ThirdPartyExtensionConnectAbility_0100', 0, async function (done) { - console.log('ACTS_ThirdPartyExtensionConnectAbility_0100====ACTS_ThirdPartyExtensionConnectAbility_0100 7 CallBack data:====>" + JSON.stringify(data)); - clearTimeout(id); - expect(data.event).assertEqual("AMS_ConnectAbility_0700_commonEvent"); - console.debug("====>ACTS_ThirdPartyExtensionConnectAbility_0100 5 "); - globalThis.abilityContext.disconnectAbility( - connId, - (error, data) => { - console.log('featureAbilityTest DisconnectAbility result errCode : ' + error.code + " data: " + data) - } - ); - console.debug("====>ACTS_ThirdPartyExtensionConnectAbility_0100 6 "); - commonEvent.unsubscribe(subscriber, unSubscribeCallback) - - } - - - commonEvent.createSubscriber(subscriberInfoStartAbility_0700).then(async (data) => { - console.debug("====>ACTS_ThirdPartyExtensionConnectAbility_0100 2 Subscriber1====>"); - subscriber = data; - await commonEvent.subscribe(subscriber, subscribeCallBack); - }) - - function unSubscribeCallback() { - console.debug("====>UnSubscribe CallBack1====>"); - setTimeout(() => { - done(); - }, 1000) - } - - function timeout() { - expect().assertFail(); - console.debug('ACTS_ExtensionConnectAbility_0100 timeout'); - commonEvent.unsubscribe(subscriber, unSubscribeCallback) - globalThis.abilityContext.disconnectAbility( - connId, - (error, data) => { - console.log('featureAbilityTest DisconnectAbility result errCode : ' + error.code + " data: " + data) - }); - } - - id = setTimeout(timeout, START_ABILITY_TIMEOUT); - console.debug("====>ACTS_ThirdPartyExtensionConnectAbility_0100 3 "); - connId = await globalThis.abilityContext.connectAbility( - { - bundleName: "com.example.actsmanyusersabilitytest", - abilityName: "com.example.actsmanyusersabilitytest.ServiceAbility", - action: "Seven", - }, { - onConnect: onConnectCallback, - onDisconnect: onDisconnectCallback, - onFailed: onFailedCallback - } - ); - console.debug("====>ACTS_ThirdPartyExtensionConnectAbility_0100 4 "); - - }) - - it('ACTS_ThirdPartyExtensionConnectAbility_0200', 0, async function (done) { - console.log('ACTS_ThirdPartyExtensionConnectAbility_0200====ACTS_ThirdPartyExtensionConnectAbility_0200 7 CallBack data:====>" + JSON.stringify(data)); - clearTimeout(id); - expect(data.event).assertEqual("AMS_ConnectAbility_0800_commonEvent"); - console.debug("====>ACTS_ThirdPartyExtensionConnectAbility_0200 5 "); - globalThis.abilityContext.disconnectAbility( - connId, - (error, data) => { - console.log('featureAbilityTest DisconnectAbility result errCode : ' + error.code + " data: " + data) - } - ); - console.debug("====>ACTS_ThirdPartyExtensionConnectAbility_0200 6 "); - commonEvent.unsubscribe(subscriber, unSubscribeCallback) - - } - - - commonEvent.createSubscriber(subscriberInfoStartAbility_0800).then(async (data) => { - console.debug("====>ACTS_ThirdPartyExtensionConnectAbility_0200 2 Subscriber1====>"); - subscriber = data; - await commonEvent.subscribe(subscriber, subscribeCallBack); - }) - - function unSubscribeCallback() { - console.debug("====>UnSubscribe CallBack1====>"); - setTimeout(() => { - done(); - }, 1000) - } - - function timeout() { - console.debug('ACTS_ThirdPartyExtensionConnectAbility_0200 timeout'); - commonEvent.unsubscribe(subscriber, unSubscribeCallback) - globalThis.abilityContext.disconnectAbility( - connId, - (error, data) => { - console.log('featureAbilityTest DisconnectAbility result errCode : ' + error.code + " data: " + data) - }); - } - - id = setTimeout(timeout, START_ABILITY_TIMEOUT); - console.debug("====>ACTS_ThirdPartyExtensionConnectAbility_0200 3 "); - connId = await globalThis.abilityContext.connectAbility( - { - bundleName: "com.example.actsmanyusersabilitytest", - abilityName: "com.example.actsmanyusersabilitytest.ServiceAbility", - action: "Eight", - }, { - onConnect: onConnectCallback, - onDisconnect: onDisconnectCallback, - onFailed: onFailedCallback - } - ); - console.debug("====>ACTS_ThirdPartyExtensionConnectAbility_0200 4 "); - - }) - it('ACTS_ThirdPartyExtensionDisconnectAbility_0100', 0, async function (done) { - console.log('ACTS_ThirdPartyExtensionDisconnectAbility_0100====ACTS_ThirdPartyExtensionDisconnectAbility_0100 7 CallBack data:====>" + JSON.stringify(data)); - clearTimeout(id); - expect(data.event).assertEqual("AMS_ConnectAbility_0900_commonEvent"); - console.debug("====>ACTS_ThirdPartyExtensionDisconnectAbility_0100 5 "); - globalThis.abilityContext.disconnectAbility( - connId, - (error, data) => { - console.log('featureAbilityTest DisconnectAbility result errCode : ' + error.code + " data: " + data) - } - ); - console.debug("====>ACTS_ThirdPartyExtensionDisconnectAbility_0100 6 "); - commonEvent.unsubscribe(subscriber, unSubscribeCallback) - - } - - - commonEvent.createSubscriber(subscriberInfoStartAbility_0900).then(async (data) => { - console.debug("====>ACTS_ThirdPartyExtensionDisconnectAbility_0100 2 Subscriber1====>"); - subscriber = data; - await commonEvent.subscribe(subscriber, subscribeCallBack); - }) - - function unSubscribeCallback() { - console.debug("====>UnSubscribe CallBack1====>"); - setTimeout(() => { - done(); - }, 1000) - } - - function timeout() { - expect().assertFail(); - console.debug('ACTS_ThirdPartyExtensionDisconnectAbility_0100 timeout'); - commonEvent.unsubscribe(subscriber, unSubscribeCallback) - globalThis.abilityContext.disconnectAbility( - connId, - (error, data) => { - console.log('featureAbilityTest DisconnectAbility result errCode : ' + error.code + " data: " + data) - }); - } - - id = setTimeout(timeout, START_ABILITY_TIMEOUT); - console.debug("====>ACTS_ThirdPartyExtensionDisconnectAbility_0100 3 "); - connId = await globalThis.abilityContext.connectAbility( - { - bundleName: "com.example.actsmanyusersabilitytest", - abilityName: "com.example.actsmanyusersabilitytest.ServiceAbility", - action: "Nine", - }, { - onConnect: onConnectCallback, - onDisconnect: onDisconnectCallback, - onFailed: onFailedCallback - } - ); - console.debug("====>ACTS_ThirdPartyExtensionDisconnectAbility_0100 4 "); - - }) - - it('ACTS_ThirdPartyExtensionDisconnectAbility_0200', 0, async function (done) { - console.log('ACTS_ThirdPartyExtensionDisconnectAbility_0200====ACTS_ThirdPartyExtensionDisconnectAbility_0200 7 CallBack data:====>" + JSON.stringify(data)); - clearTimeout(id); - expect(data.event).assertEqual("AMS_ConnectAbility_1000_commonEvent"); - console.debug("====>ACTS_ThirdPartyExtensionDisconnectAbility_0200 5 "); - globalThis.abilityContext.disconnectAbility( - connId, - (error, data) => { - console.log('featureAbilityTest DisconnectAbility result errCode : ' + error.code + " data: " + data) - } - ); - console.debug("====>ACTS_ThirdPartyExtensionDisconnectAbility_0200 6 "); - commonEvent.unsubscribe(subscriber, unSubscribeCallback) - - } - - - commonEvent.createSubscriber(subscriberInfoStartAbility_1000).then(async (data) => { - console.debug("====>ACTS_ThirdPartyExtensionDisconnectAbility_0200 2 Subscriber1====>"); - subscriber = data; - await commonEvent.subscribe(subscriber, subscribeCallBack); - }) - - function unSubscribeCallback() { - console.debug("====>UnSubscribe CallBack1====>"); - setTimeout(() => { - done(); - }, 1000) - } - - function timeout() { - expect().assertFail(); - console.debug('ACTS_ThirdPartyExtensionDisconnectAbility_0200 timeout'); - commonEvent.unsubscribe(subscriber, unSubscribeCallback) - globalThis.abilityContext.disconnectAbility( - connId, - (error, data) => { - console.log('featureAbilityTest DisconnectAbility result errCode : ' + error.code + " data: " + data) - }); - } - - id = setTimeout(timeout, START_ABILITY_TIMEOUT); - console.debug("====>ACTS_ThirdPartyExtensionDisconnectAbility_0200 3 "); - connId = await globalThis.abilityContext.connectAbility( - { - bundleName: "com.example.actsmanyusersabilitytest", - abilityName: "com.example.actsmanyusersabilitytest.ServiceAbility", - action: "Ten", - }, { - onConnect: onConnectCallback, - onDisconnect: onDisconnectCallback, - onFailed: onFailedCallback - } - ); - console.debug("====>ACTS_ThirdPartyExtensionDisconnectAbility_0200 4 "); - - }) - - it('ACTS_ThirdPartyExtensionDisconnectAbility_0300', 0, async function (done) { - console.log('ACTS_ThirdPartyExtensionDisconnectAbility_0300====ACTS_ThirdPartyExtensionDisconnectAbility_0300 7 CallBack data:====>" + JSON.stringify(data)); - clearTimeout(id); - expect(data.event).assertEqual("AMS_ConnectAbility_1100_commonEvent"); - console.debug("====>ACTS_ThirdPartyExtensionDisconnectAbility_0200 5 "); - globalThis.abilityContext.disconnectAbility( - connId, - (error, data) => { - console.log('featureAbilityTest DisconnectAbility result errCode : ' + error.code + " data: " + data) - } - ); - console.debug("====>ACTS_ThirdPartyExtensionDisconnectAbility_0300 6 "); - commonEvent.unsubscribe(subscriber, unSubscribeCallback) - - } - - - commonEvent.createSubscriber(subscriberInfoStartAbility_1100).then(async (data) => { - console.debug("====>ACTS_ThirdPartyExtensionDisconnectAbility_0300 2 Subscriber1====>"); - subscriber = data; - await commonEvent.subscribe(subscriber, subscribeCallBack); - }) - - function unSubscribeCallback() { - console.debug("====>UnSubscribe CallBack1====>"); - setTimeout(() => { - done(); - }, 1000) - } - - function timeout() { - console.debug('ACTS_ThirdPartyExtensionDisconnectAbility_0300 timeout'); - commonEvent.unsubscribe(subscriber, unSubscribeCallback) - globalThis.abilityContext.disconnectAbility( - connId, - (error, data) => { - console.log('featureAbilityTest DisconnectAbility result errCode : ' + error.code + " data: " + data) - }); - } - - id = setTimeout(timeout, START_ABILITY_TIMEOUT); - console.debug("====>ACTS_ThirdPartyExtensionDisconnectAbility_0300 3 "); - connId = await globalThis.abilityContext.connectAbility( - { - bundleName: "com.example.actsmanyusersabilitytest", - abilityName: "com.example.actsmanyusersabilitytest.ServiceAbility", - action: "Ten one", - }, { - onConnect: onConnectCallback, - onDisconnect: onDisconnectCallback, - onFailed: onFailedCallback - } - ); - console.debug("====>ACTS_ThirdPartyExtensionDisconnectAbility_0300 4 "); - - }) - - it('ACTS_ThirdPartyExtensionDisconnectAbility_0400', 0, async function (done) { - console.log('ACTS_ThirdPartyExtensionDisconnectAbility_0400====ACTS_ThirdPartyExtensionDisconnectAbility_0400 7 CallBack data:====>" + JSON.stringify(data)); - clearTimeout(id); - expect(data.event).assertEqual("AMS_ConnectAbility_1200_commonEvent"); - console.debug("====>ACTS_ThirdPartyExtensionDisconnectAbility_0400 5 "); - globalThis.abilityContext.disconnectAbility( - connId, - (error, data) => { - console.log('featureAbilityTest DisconnectAbility result errCode : ' + error.code + " data: " + data) - } - ); - console.debug("====>ACTS_ThirdPartyExtensionDisconnectAbility_0400 6 "); - commonEvent.unsubscribe(subscriber, unSubscribeCallback) - - } - - - commonEvent.createSubscriber(subscriberInfoStartAbility_1200).then(async (data) => { - console.debug("====>ACTS_ThirdPartyExtensionDisconnectAbility_0400 2 Subscriber1====>"); - subscriber = data; - await commonEvent.subscribe(subscriber, subscribeCallBack); - }) - - function unSubscribeCallback() { - console.debug("====>UnSubscribe CallBack1====>"); - setTimeout(() => { - done(); - }, 1000) - } - - function timeout() { - console.debug('ACTS_ThirdPartyExtensionDisconnectAbility_0400 timeout'); - commonEvent.unsubscribe(subscriber, unSubscribeCallback) - globalThis.abilityContext.disconnectAbility( - connId, - (error, data) => { - console.log('featureAbilityTest DisconnectAbility result errCode : ' + error.code + " data: " + data) - }); - } - - id = setTimeout(timeout, START_ABILITY_TIMEOUT); - console.debug("====>ACTS_ThirdPartyExtensionDisconnectAbility_0400 3 "); - connId = await globalThis.abilityContext.connectAbility( - { - bundleName: "com.example.actsmanyusersabilitytest", - abilityName: "com.example.actsmanyusersabilitytest.ServiceAbility", - action: "Ten two", - }, { - onConnect: onConnectCallback, - onDisconnect: onDisconnectCallback, - onFailed: onFailedCallback - } - ); - console.debug("====>ACTS_ThirdPartyExtensionDisconnectAbility_0400 4 "); - - }) - - - - }) -} - - diff --git a/ability/ability_runtime/actsusers/actsmanyuserthirdabilitytest/entry/src/main/module.json b/ability/ability_runtime/actsusers/actsmanyuserthirdabilitytest/entry/src/main/module.json deleted file mode 100644 index 37b8de66ea4b0aeec13a8cd2dceb4929fe7a1adc..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsusers/actsmanyuserthirdabilitytest/entry/src/main/module.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "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.actsmanyusersabilitytest.MainAbility", - "srcEntrance": "./ets/MainAbility/MainAbility.ts", - "description": "$string:phone_entry_main", - "icon": "$media:icon", - "label": "$string:entry_label", - "visible": true, - "orientation": "portrait", - "skills": [ - { - "actions": [ - "action.system.home" - ], - "entities": [ - "entity.system.home" - ] - } - ] - } - ], - "extensionAbilities": [ - { - "srcEntrance": "./ets/ServiceAbility/ServiceAbility.ts", - "name": "com.example.actsmanyusersabilitytest.ServiceAbility", - "icon": "$media:icon", - "srcLanguage": "ets", - "description": "$string:phone_entry_main", - "type": "service", - "visible": true - }, - { - "srcEntrance": "./ets/ServiceAbility2/ServiceAbility2.ts", - "name": "com.example.actsmanyusersabilitytest.ServiceAbility2", - "icon": "$media:icon", - "srcLanguage": "ets", - "description": "$string:phone_entry_main", - "type": "service", - "visible": true - } - ] - } -} diff --git a/ability/ability_runtime/actsusers/actsmanyuserthirdabilitytest/entry/src/main/resources/base/element/string.json b/ability/ability_runtime/actsusers/actsmanyuserthirdabilitytest/entry/src/main/resources/base/element/string.json deleted file mode 100644 index d75325f3cf0a50c1dfe4dbc5162c8737276c3dd9..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsusers/actsmanyuserthirdabilitytest/entry/src/main/resources/base/element/string.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "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" - } - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/actsusers/actsmanyuserthirdabilitytest/entry/src/main/resources/base/media/icon.png b/ability/ability_runtime/actsusers/actsmanyuserthirdabilitytest/entry/src/main/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actsusers/actsmanyuserthirdabilitytest/entry/src/main/resources/base/media/icon.png and /dev/null differ diff --git a/ability/ability_runtime/actsusers/actsmanyuserthirdabilitytest/entry/src/main/resources/base/profile/main_pages.json b/ability/ability_runtime/actsusers/actsmanyuserthirdabilitytest/entry/src/main/resources/base/profile/main_pages.json deleted file mode 100644 index 02221db61d317863114ff0ca4dd2b33586abff12..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsusers/actsmanyuserthirdabilitytest/entry/src/main/resources/base/profile/main_pages.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "src": [ - "MainAbility/pages/index/index", - "MainAbility/pages/second/second" - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/actsusers/actsmanyuserthirdabilitytest/signature/openharmony_sx.p7b b/ability/ability_runtime/actsusers/actsmanyuserthirdabilitytest/signature/openharmony_sx.p7b deleted file mode 100644 index dcec6c9615032c1b48bf185e839d9720dd68aab0..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actsusers/actsmanyuserthirdabilitytest/signature/openharmony_sx.p7b and /dev/null differ diff --git a/ability/ability_runtime/amscontextualinforquery/BUILD.gn b/ability/ability_runtime/amscontextualinforquery/BUILD.gn index 86a937f43e44cf990e3e51b24bf7b43e99df166b..0958cffeb74d6047a9bfbab40a69bef757d79c5e 100644 --- a/ability/ability_runtime/amscontextualinforquery/BUILD.gn +++ b/ability/ability_runtime/amscontextualinforquery/BUILD.gn @@ -17,10 +17,7 @@ group("amscontextualinforquery") { testonly = true if (is_standard_system) { deps = [ - "actsamsextensionmodulehap:ActsAmsExtensionModuleRelyHap", "actsamsstaticabilitystagecontexttest:ActsAmsStaticAbilityStageContextTest", - "actsamsstaticextensioninfohap:ActsAmsStaticExtensionInfoRelyHap", - "actsamsstaticextensioninfotest:ActsAmsStaticExtensionInfoTest", "actsamsstatichapa:ActsAmsStaticARelyHap", "actsamsstatichapb:ActsAmsStaticBRelyHap", "actsamsstaticinfomationquerytest:ActsAmsStaticInfoMationQueryTest", diff --git a/ability/ability_runtime/amscontextualinforquery/actsamsextensionmodulehap/AppScope/app.json b/ability/ability_runtime/amscontextualinforquery/actsamsextensionmodulehap/AppScope/app.json deleted file mode 100644 index c3e2fb7737f55fa80f3fd5727de64af966042833..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/amscontextualinforquery/actsamsextensionmodulehap/AppScope/app.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "app": { - "bundleName": "com.example.extensionmodule", - "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 - } - } -} \ No newline at end of file diff --git a/ability/ability_runtime/amscontextualinforquery/actsamsextensionmodulehap/AppScope/resources/base/element/string.json b/ability/ability_runtime/amscontextualinforquery/actsamsextensionmodulehap/AppScope/resources/base/element/string.json deleted file mode 100644 index be09cccde1bc7369ef47a5cd45d2b06884c88602..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/amscontextualinforquery/actsamsextensionmodulehap/AppScope/resources/base/element/string.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "string": [ - { - "name": "app_name", - "value": "ohosProject" - } - ] -} diff --git a/ability/ability_runtime/amscontextualinforquery/actsamsextensionmodulehap/AppScope/resources/base/media/app_icon.png b/ability/ability_runtime/amscontextualinforquery/actsamsextensionmodulehap/AppScope/resources/base/media/app_icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/amscontextualinforquery/actsamsextensionmodulehap/AppScope/resources/base/media/app_icon.png and /dev/null differ diff --git a/ability/ability_runtime/amscontextualinforquery/actsamsextensionmodulehap/BUILD.gn b/ability/ability_runtime/amscontextualinforquery/actsamsextensionmodulehap/BUILD.gn deleted file mode 100644 index fde4293818f8e1f75361de7cf80807578d67e1af..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/amscontextualinforquery/actsamsextensionmodulehap/BUILD.gn +++ /dev/null @@ -1,45 +0,0 @@ -# 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("ActsAmsExtensionModuleRelyHap") { - hap_profile = "entry/src/main/module.json" - js_build_mode = "debug" - hap_name = "ActsAmsExtensionModuleRelyHap" - - testonly = true - deps = [ - ":actsamsextensionmodulerelyhap_js_assets", - ":actsamsextensionmodulerelyhap_resources", - ] - ets2abc = true - certificate_profile = "signature/openharmony_sx.p7b" - subsystem_name = "ability" - part_name = "ability_runtime" -} - -ohos_app_scope("actsamsextensionmodulerelyhap_app_profile") { - app_profile = "AppScope/app.json" - sources = [ "AppScope/resources" ] -} - -ohos_js_assets("actsamsextensionmodulerelyhap_js_assets") { - source_dir = "entry/src/main/ets" -} - -ohos_resources("actsamsextensionmodulerelyhap_resources") { - sources = [ "entry/src/main/resources" ] - deps = [ ":actsamsextensionmodulerelyhap_app_profile" ] - hap_profile = "entry/src/main/module.json" -} diff --git a/ability/ability_runtime/amscontextualinforquery/actsamsextensionmodulehap/entry/src/main/ets/Application/AbilityStage.ts b/ability/ability_runtime/amscontextualinforquery/actsamsextensionmodulehap/entry/src/main/ets/Application/AbilityStage.ts deleted file mode 100644 index 98eb012db14b28a1f92522e305b9d4538e496dd3..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/amscontextualinforquery/actsamsextensionmodulehap/entry/src/main/ets/Application/AbilityStage.ts +++ /dev/null @@ -1,23 +0,0 @@ -/* -* 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" - -export default class MyAbilityStage extends AbilityStage { - onCreate() { - console.log("MyAbilityStage onCreate") - globalThis.stageOnCreateRun = 1; - globalThis.stageContext = this.context; - } -} \ No newline at end of file diff --git a/ability/ability_runtime/amscontextualinforquery/actsamsextensionmodulehap/entry/src/main/ets/MainAbility/MainAbility.ts b/ability/ability_runtime/amscontextualinforquery/actsamsextensionmodulehap/entry/src/main/ets/MainAbility/MainAbility.ts deleted file mode 100644 index 24066f46ce7b42fa80023a5fd651914a8493465b..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/amscontextualinforquery/actsamsextensionmodulehap/entry/src/main/ets/MainAbility/MainAbility.ts +++ /dev/null @@ -1,99 +0,0 @@ -/* - * 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 rpc from '@ohos.rpc' - -var connection = -1; -let options = { - onConnect: function(elementName, proxy) { - console.log("mxh onConnect success"); - if (proxy == null) { - console.log("mxh proxy == null"); - return; - } - let option = new rpc.MessageOption(); - let data = new rpc.MessageParcel(); - let reply = new rpc.MessageParcel(); - data.writeInt(1); - data.writeInt(99); - proxy.sendRequest(1, data, reply, option); - let msg = reply.readInt(); - console.log("mxh onConnect msg:" + msg); - }, - - onDisconnect: function() {console.log("mxh onDisconnect success");}, - onFailed: function() {console.log("mxh onFailed");} -} -export default class MainAbility extends Ability { - onCreate(want, launchParam) { - console.log('mxh MainAbility onCreate is called' + want + launchParam); - } - - onDestroy() { - console.log('mxh MainAbility onDestroy is called'); - } - - onWindowStageCreate(windowStage) { - console.log('mxh MainAbility onWindowStageCreate is called'); - let context = this.context; - globalThis.startServiceExtAbility = (() => { - console.log("mxh startServiceExtAbility begin"); - var want = { - "bundleName": "com.example.ohosproject.hmservice", - "abilityName": "ServiceExtAbility", - } - context.startAbility(want).then((data) => { - console.info("mxh startAbility success:" + JSON.stringify(data)); - }).catch((error) => { - console.error("mxh startAbility failed:" + JSON.stringify(error)); - }) - console.log("mxh startServiceExtAbility end"); - }) - - globalThis.connectServiceExtAbility = (() => { - console.log("mxh connectServiceExtAbility begin"); - var want = { - "bundleName": "com.example.ohosproject.hmservice", - "abilityName": "ServiceExtAbility", - } - connection = context.connectAbility(want, options); - console.log("mxh connectServiceExtAbility end, connection:" + connection); - }) - - globalThis.disconnectServiceExtAbility = (() => { - console.log("mxh disconnectServiceExtAbility begin"); - context.disconnectAbility(connection).then((data) => { - console.info("mxh startAbility success:" + JSON.stringify(data)); - }).catch((error) => { - console.error("mxh startAbility failed:" + JSON.stringify(error)); - }); - console.log("mxh disconnectServiceExtAbility end, connection:" + connection); - }) - - windowStage.setUIContent(this.context, 'pages/index/index', null); - } - - onWindowStageDestroy() { - console.log('mxh MainAbility onWindowStageDestroy is called'); - } - - onForeground() { - console.log('mxh MainAbility onForeground is called'); - } - - onBackground() { - console.log('mxh MainAbility onBackground is called'); - } -} \ No newline at end of file diff --git a/ability/ability_runtime/amscontextualinforquery/actsamsextensionmodulehap/entry/src/main/ets/ServiceAbility/ServiceAbility.ts b/ability/ability_runtime/amscontextualinforquery/actsamsextensionmodulehap/entry/src/main/ets/ServiceAbility/ServiceAbility.ts deleted file mode 100644 index f766470d826a698e436ad1db2789105190177165..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/amscontextualinforquery/actsamsextensionmodulehap/entry/src/main/ets/ServiceAbility/ServiceAbility.ts +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 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 Extension from '@ohos.application.ServiceExtensionAbility' -import commonEvent from '@ohos.commonEvent' -import Want from '@ohos.application.Want'; -import rpc from '@ohos.rpc'; - -export default class ServiceExtAbility extends Extension { - onCreate(want) { - console.info('mxh ServiceAbility onCreate**'); - - } - - onRequest(want, startId) { - console.info('mxh ServiceAbility onRequest**'); - } - - onConnect(want:Want) { - console.info('mxh ServiceAbility onConnect**'); - commonEvent.publish("ACTS_ConnectAbility_0100_CommonEvent", { - parameters: { - extensionAbilityInfo : JSON.stringify(this.context.extensionAbilityInfo), - } - } ,(err) => { - console.log("Demo Publish CallBack MainAbility_Start_CommonEvent") - }); - console.log('Demo SerivceAbilityServer OnConnect start 1'); - return new rpc.RemoteObject('connect'); - } - - onDisconnect(want) { - console.info('mxh ServiceAbility onDisConnect**'); - } - - onDestroy() { - console.info('mxh ServiceAbility onDestroy**'); - } -}; \ No newline at end of file diff --git a/ability/ability_runtime/amscontextualinforquery/actsamsextensionmodulehap/entry/src/main/ets/ServiceAbility/service.ts b/ability/ability_runtime/amscontextualinforquery/actsamsextensionmodulehap/entry/src/main/ets/ServiceAbility/service.ts deleted file mode 100644 index b49731a414958a281c2f0c4eab0e7fb408eb2c2f..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/amscontextualinforquery/actsamsextensionmodulehap/entry/src/main/ets/ServiceAbility/service.ts +++ /dev/null @@ -1,25 +0,0 @@ -/* -* 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. -*/ -export default { - onStart() { - console.info('ServiceAbility onStart'); - }, - onStop() { - console.info('ServiceAbility onStop'); - }, - onCommand(want, startId) { - console.info('ServiceAbility onCommand'); - } -}; \ No newline at end of file diff --git a/ability/ability_runtime/amscontextualinforquery/actsamsextensionmodulehap/entry/src/main/ets/pages/index/index.ets b/ability/ability_runtime/amscontextualinforquery/actsamsextensionmodulehap/entry/src/main/ets/pages/index/index.ets deleted file mode 100644 index 64c878fd512c758ba0b6d0fc2fcdb70bd127b4c7..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/amscontextualinforquery/actsamsextensionmodulehap/entry/src/main/ets/pages/index/index.ets +++ /dev/null @@ -1,37 +0,0 @@ -/* - * 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 file from '@system.file'; - -@Entry -@Component -struct Index { - - aboutToAppear() { - console.info("start run testcase!!!!") - } - - build() { - Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { - Text('pmsystemappa') - .fontSize(50) - .fontWeight(FontWeight.Bold) - .margin({ - top: 20 - }) - } - .width('100%') - .height('100%') - } -} \ No newline at end of file diff --git a/ability/ability_runtime/amscontextualinforquery/actsamsextensionmodulehap/entry/src/main/ets/pages/second/second.ets b/ability/ability_runtime/amscontextualinforquery/actsamsextensionmodulehap/entry/src/main/ets/pages/second/second.ets deleted file mode 100644 index 33d9ae45245db03fd252ef7c1a85c9e284028e0d..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/amscontextualinforquery/actsamsextensionmodulehap/entry/src/main/ets/pages/second/second.ets +++ /dev/null @@ -1,43 +0,0 @@ -/* - * 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 diff --git a/ability/ability_runtime/amscontextualinforquery/actsamsextensionmodulehap/entry/src/main/module.json b/ability/ability_runtime/amscontextualinforquery/actsamsextensionmodulehap/entry/src/main/module.json deleted file mode 100644 index 65c096086b6f3bcd9ee0f45b10e28a3069adee6c..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/amscontextualinforquery/actsamsextensionmodulehap/entry/src/main/module.json +++ /dev/null @@ -1,101 +0,0 @@ -{ - "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.acts.pmvendorappservice.MainAbility", - "srcEntrance": "./ets/MainAbility/MainAbility.ts", - "description": "$string:phone_entry_main", - "icon": "$media:icon", - "label": "$string:entry_label", - "visible": true, - "orientation": "portrait", - "skills": [ - { - "actions": [ - "action.system.home" - ], - "entities": [ - "entity.system.home" - ] - } - ] - } - ], - "extensionAbilities": [ - { - "name": "ServiceExtAbility", - "srcEntrance": "./ets/ServiceAbility/ServiceAbility.ts", - "description": "$string:phone_entry_main", - "icon": "$media:icon", - "label": "$string:entry_label", - "permissions": [ - "ohos.permission.USE_BLUETOOTH" - ], - "metadata": [ - { - "name": "ohos.extension.form", - "value": "MainAbility", - "resource": "@profile:form_config" - } - ], - "visible": true, - "type": "service" - } - ], - "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" - } - ] - } -} diff --git a/ability/ability_runtime/amscontextualinforquery/actsamsextensionmodulehap/entry/src/main/resources/base/element/string.json b/ability/ability_runtime/amscontextualinforquery/actsamsextensionmodulehap/entry/src/main/resources/base/element/string.json deleted file mode 100644 index d75325f3cf0a50c1dfe4dbc5162c8737276c3dd9..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/amscontextualinforquery/actsamsextensionmodulehap/entry/src/main/resources/base/element/string.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "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" - } - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/amscontextualinforquery/actsamsextensionmodulehap/entry/src/main/resources/base/media/icon.png b/ability/ability_runtime/amscontextualinforquery/actsamsextensionmodulehap/entry/src/main/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/amscontextualinforquery/actsamsextensionmodulehap/entry/src/main/resources/base/media/icon.png and /dev/null differ diff --git a/ability/ability_runtime/amscontextualinforquery/actsamsextensionmodulehap/entry/src/main/resources/base/profile/main_pages.json b/ability/ability_runtime/amscontextualinforquery/actsamsextensionmodulehap/entry/src/main/resources/base/profile/main_pages.json deleted file mode 100644 index 6898b31d2085f478ee1ed9d933a5910cbf901d92..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/amscontextualinforquery/actsamsextensionmodulehap/entry/src/main/resources/base/profile/main_pages.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "src": [ - "pages/index/index", - "pages/second/second" - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/amscontextualinforquery/actsamsextensionmodulehap/signature/openharmony_sx.p7b b/ability/ability_runtime/amscontextualinforquery/actsamsextensionmodulehap/signature/openharmony_sx.p7b deleted file mode 100755 index dcec6c9615032c1b48bf185e839d9720dd68aab0..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/amscontextualinforquery/actsamsextensionmodulehap/signature/openharmony_sx.p7b and /dev/null differ diff --git a/ability/ability_runtime/amscontextualinforquery/actsamsstaticabilitystagecontexttest/entry/src/main/module.json b/ability/ability_runtime/amscontextualinforquery/actsamsstaticabilitystagecontexttest/entry/src/main/module.json index 0277e8e94ce706d3863c62d2db407251ee2f1570..d07906ec98f383d5371708cf07860f67ec237167 100644 --- a/ability/ability_runtime/amscontextualinforquery/actsamsstaticabilitystagecontexttest/entry/src/main/module.json +++ b/ability/ability_runtime/amscontextualinforquery/actsamsstaticabilitystagecontexttest/entry/src/main/module.json @@ -35,46 +35,18 @@ } ], "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.CLEAN_BACKGROUND_PROCESSES", + "reason":"need use ohos.permission.CLEAN_BACKGROUND_PROCESSES" + }, + { + "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" + } ] } } diff --git a/ability/ability_runtime/amscontextualinforquery/actsamsstaticabilitystagecontexttest/signature/openharmony_sx.p7b b/ability/ability_runtime/amscontextualinforquery/actsamsstaticabilitystagecontexttest/signature/openharmony_sx.p7b index cc53179a48f88f20acc379c138a001e9a15838f6..199daf6d8c66860888d1b77a96a73f918b4beb6a 100644 Binary files a/ability/ability_runtime/amscontextualinforquery/actsamsstaticabilitystagecontexttest/signature/openharmony_sx.p7b and b/ability/ability_runtime/amscontextualinforquery/actsamsstaticabilitystagecontexttest/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfohap/AppScope/app.json b/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfohap/AppScope/app.json deleted file mode 100644 index 8ee1b11aa5ce62aaf99ab3786306fa3c8c5aa692..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfohap/AppScope/app.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "app": { - "bundleName": "com.example.staticextensioninfotest", - "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 - } - } -} \ No newline at end of file diff --git a/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfohap/AppScope/resources/base/element/string.json b/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfohap/AppScope/resources/base/element/string.json deleted file mode 100644 index be09cccde1bc7369ef47a5cd45d2b06884c88602..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfohap/AppScope/resources/base/element/string.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "string": [ - { - "name": "app_name", - "value": "ohosProject" - } - ] -} diff --git a/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfohap/AppScope/resources/base/media/app_icon.png b/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfohap/AppScope/resources/base/media/app_icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfohap/AppScope/resources/base/media/app_icon.png and /dev/null differ diff --git a/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfohap/BUILD.gn b/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfohap/BUILD.gn deleted file mode 100644 index 8a694b4d42482ae94e1df50066782c037d7007f1..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfohap/BUILD.gn +++ /dev/null @@ -1,45 +0,0 @@ -# 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("ActsAmsStaticExtensionInfoRelyHap") { - hap_profile = "entry/src/main/module.json" - js_build_mode = "debug" - hap_name = "ActsAmsStaticExtensionInfoRelyHap" - - testonly = true - deps = [ - ":actsamsstaticextensioninforelyhap_js_assets", - ":actsamsstaticextensioninforelyhap_resources", - ] - ets2abc = true - certificate_profile = "signature/openharmony_sx.p7b" - subsystem_name = "ability" - part_name = "ability_runtime" -} - -ohos_app_scope("actsamsstaticextensioninforelyhap_app_profile") { - app_profile = "AppScope/app.json" - sources = [ "AppScope/resources" ] -} - -ohos_js_assets("actsamsstaticextensioninforelyhap_js_assets") { - source_dir = "entry/src/main/ets" -} - -ohos_resources("actsamsstaticextensioninforelyhap_resources") { - sources = [ "entry/src/main/resources" ] - deps = [ ":actsamsstaticextensioninforelyhap_app_profile" ] - hap_profile = "entry/src/main/module.json" -} diff --git a/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfohap/entry/src/main/ets/Application/AbilityStage.ts b/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfohap/entry/src/main/ets/Application/AbilityStage.ts deleted file mode 100644 index 98eb012db14b28a1f92522e305b9d4538e496dd3..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfohap/entry/src/main/ets/Application/AbilityStage.ts +++ /dev/null @@ -1,23 +0,0 @@ -/* -* 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" - -export default class MyAbilityStage extends AbilityStage { - onCreate() { - console.log("MyAbilityStage onCreate") - globalThis.stageOnCreateRun = 1; - globalThis.stageContext = this.context; - } -} \ No newline at end of file diff --git a/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfohap/entry/src/main/ets/MainAbility/MainAbility.ts b/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfohap/entry/src/main/ets/MainAbility/MainAbility.ts deleted file mode 100644 index f0f8dec8b9d550b91d666f453c623f929a1992cb..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfohap/entry/src/main/ets/MainAbility/MainAbility.ts +++ /dev/null @@ -1,51 +0,0 @@ -/* -* 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' - -export default class MainAbility extends Ability { - - onCreate(want, launchParam) { - // Ability is creating, initialize resources for this ability - console.log("ACTS_ProcessManage VendorAppService MainAbility onCreate") - globalThis.abilityWant = want; - } - - onDestroy() { - // Ability is destroying, release resources for this ability - console.log("ACTS_ProcessManage VendorAppService MainAbility onDestroy") - } - - onWindowStageCreate(windowStage) { - // Main window is created, set main page for this ability - console.log("ACTS_ProcessManage VendorAppService MainAbility onWindowStageCreate") - globalThis.abilityContext = this.context - windowStage.setUIContent(this.context, "pages/index/index", null) - } - - onWindowStageDestroy() { - // Main window is destroyed, release UI related resources - console.log("ACTS_ProcessManage VendorAppService MainAbility onWindowStageDestroy") - } - - async onForeground() { - // Ability has brought to foreground - console.log("ACTS_ProcessManage VendorAppService MainAbility onForeground") - } - - onBackground() { - // Ability has back to background - console.log("ACTS_ProcessManage VendorAppService MainAbility onBackground") - } -}; diff --git a/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfohap/entry/src/main/ets/ServiceAbility/ServiceAbility.ts b/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfohap/entry/src/main/ets/ServiceAbility/ServiceAbility.ts deleted file mode 100644 index e6876adc087186b2b0eb256f586eadbb2227df7d..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfohap/entry/src/main/ets/ServiceAbility/ServiceAbility.ts +++ /dev/null @@ -1,57 +0,0 @@ -/* - * 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 ServiceExtension from '@ohos.application.ServiceExtensionAbility' -import commonEvent from "@ohos.commonEvent"; -import Want from '@ohos.application.Want'; -import rpc from '@ohos.rpc'; - -export default class ServiceAbility extends ServiceExtension { - onCreate(want:Want) { - globalThis.abilityWant = want; - console.log('ServiceAbility onCreate, want: ' + want.abilityName); - } - - onRequest(want, startId) { - console.log('ServiceAbility onRequest, want: ' + want.abilityName + ', startId: ' + startId); - } - - onConnect(want) { - console.log('ServiceAbility2 onConnect, abilityName:' + want.abilityName); - console.log('ServiceAbility2 onConnect, action:' + want.action); - globalThis.extensionContext = this.context - if (want.action == 'getExtensionInfoTest') { - commonEvent.publish("ACTS_ConnectAbility_0200_CommonEvent", { - parameters: { - hapModuleInfo2: JSON.stringify(this.context.currentHapModuleInfo), - applicationInfo2: JSON.stringify(this.context.applicationInfo) - } - } ,(err) => { - console.log("MainAbility Publish CallBack MainAbility_Start_CommonEvent") - }); - console.log('stub SerivceAbilityServer OnConnect start 2'); - - } - return new rpc.RemoteObject('connect'); - } - - onDisconnect(want) { - console.log('ServiceAbility onDisconnect, want:' + want.abilityName); - } - - onDestroy() { - console.log('ServiceAbility onDestroy'); - } -} \ No newline at end of file diff --git a/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfohap/entry/src/main/ets/ServiceAbility/service.ts b/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfohap/entry/src/main/ets/ServiceAbility/service.ts deleted file mode 100644 index b49731a414958a281c2f0c4eab0e7fb408eb2c2f..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfohap/entry/src/main/ets/ServiceAbility/service.ts +++ /dev/null @@ -1,25 +0,0 @@ -/* -* 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. -*/ -export default { - onStart() { - console.info('ServiceAbility onStart'); - }, - onStop() { - console.info('ServiceAbility onStop'); - }, - onCommand(want, startId) { - console.info('ServiceAbility onCommand'); - } -}; \ No newline at end of file diff --git a/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfohap/entry/src/main/ets/pages/index/index.ets b/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfohap/entry/src/main/ets/pages/index/index.ets deleted file mode 100644 index 64c878fd512c758ba0b6d0fc2fcdb70bd127b4c7..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfohap/entry/src/main/ets/pages/index/index.ets +++ /dev/null @@ -1,37 +0,0 @@ -/* - * 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 file from '@system.file'; - -@Entry -@Component -struct Index { - - aboutToAppear() { - console.info("start run testcase!!!!") - } - - build() { - Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { - Text('pmsystemappa') - .fontSize(50) - .fontWeight(FontWeight.Bold) - .margin({ - top: 20 - }) - } - .width('100%') - .height('100%') - } -} \ No newline at end of file diff --git a/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfohap/entry/src/main/ets/pages/second/second.ets b/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfohap/entry/src/main/ets/pages/second/second.ets deleted file mode 100644 index 33d9ae45245db03fd252ef7c1a85c9e284028e0d..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfohap/entry/src/main/ets/pages/second/second.ets +++ /dev/null @@ -1,43 +0,0 @@ -/* - * 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 diff --git a/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfohap/entry/src/main/module.json b/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfohap/entry/src/main/module.json deleted file mode 100644 index 5cd9d7a37dba35a9f22230dfc5909db545a2f39e..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfohap/entry/src/main/module.json +++ /dev/null @@ -1,91 +0,0 @@ -{ - "module": { - "name": "phone", - "type": "entry", - "srcEntrance": "./ets/Application/AbilityStage.ts", - "description": "$string:phone_entry_dsc", - "mainElement": "com.example.staticextensioninfotest.MainAbility", - "deviceTypes": [ - "default", - "tablet" - ], - "deliveryWithInstall": true, - "installationFree": false, - "uiSyntax": "ets", - "pages": "$profile:main_pages", - "abilities": [ - { - "name": "com.example.staticextensioninfotest.MainAbility", - "srcEntrance": "./ets/MainAbility/MainAbility.ts", - "description": "$string:phone_entry_main", - "icon": "$media:icon", - "label": "$string:entry_label", - "visible": true, - "orientation": "portrait", - "skills": [ - { - "actions": [ - "action.system.home" - ], - "entities": [ - "entity.system.home" - ] - } - ] - } - ], - "extensionAbilities": [ - { - "srcEntrance": "./ets/ServiceAbility/ServiceAbility.ts", - "name": "com.example.staticextensioninfotest.ServiceAbility", - "icon": "$media:icon", - "srcLanguage": "ets", - "description": "$string:phone_entry_main", - "type": "service", - "visible": true - } - ], - "requestPermissions": [ - { - "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.INSTALL_BUNDLE", - "reason":"need use ohos.permission.INSTALL_BUNDLE" - }, - { - "name":"ohos.permission.MANAGE_MISSIONS", - "reason":"need use ohos.permission.MANAGE_MISSIONS" - }, - { - "name":"ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS", - "reason":"need use ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS" - }, - { - "name":"ohos.permission.CLEAN_BACKGROUND_PROCESSES", - "reason":"need use ohos.permission.CLEAN_BACKGROUND_PROCESSES" - }, - { - "name":"ohos.permission.GET_RUNNING_INFO", - "reason":"need use ohos.permission.GET_RUNNING_INFO" - } - ] - } -} diff --git a/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfohap/entry/src/main/resources/base/element/string.json b/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfohap/entry/src/main/resources/base/element/string.json deleted file mode 100644 index d75325f3cf0a50c1dfe4dbc5162c8737276c3dd9..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfohap/entry/src/main/resources/base/element/string.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "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" - } - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfohap/entry/src/main/resources/base/media/icon.png b/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfohap/entry/src/main/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfohap/entry/src/main/resources/base/media/icon.png and /dev/null differ diff --git a/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfohap/entry/src/main/resources/base/profile/main_pages.json b/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfohap/entry/src/main/resources/base/profile/main_pages.json deleted file mode 100644 index 6898b31d2085f478ee1ed9d933a5910cbf901d92..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfohap/entry/src/main/resources/base/profile/main_pages.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "src": [ - "pages/index/index", - "pages/second/second" - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfohap/signature/openharmony_sx.p7b b/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfohap/signature/openharmony_sx.p7b deleted file mode 100755 index dcec6c9615032c1b48bf185e839d9720dd68aab0..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfohap/signature/openharmony_sx.p7b and /dev/null differ diff --git a/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfotest/AppScope/app.json b/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfotest/AppScope/app.json deleted file mode 100644 index 60257b2cb7989a7a152312f31af75027d517ccac..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfotest/AppScope/app.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "app":{ - "bundleName":"com.example.staticextensioninfo", - "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 - } - } -} diff --git a/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfotest/AppScope/resources/base/element/string.json b/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfotest/AppScope/resources/base/element/string.json deleted file mode 100644 index ee69f9a861d9dc269ed6638735d52674583498e1..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfotest/AppScope/resources/base/element/string.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "string":[ - { - "name":"app_name", - "value":"ohosProject" - } - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfotest/AppScope/resources/base/media/app_icon.png b/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfotest/AppScope/resources/base/media/app_icon.png deleted file mode 100644 index 474a55588fd7216113dd42073aadf254d4dba023..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfotest/AppScope/resources/base/media/app_icon.png and /dev/null differ diff --git a/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfotest/BUILD.gn b/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfotest/BUILD.gn deleted file mode 100644 index b395e853b7be3a32b9e251924d58be96cf6f9cc3..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfotest/BUILD.gn +++ /dev/null @@ -1,43 +0,0 @@ -# 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_js_hap_suite("ActsAmsStaticExtensionInfoTest") { - hap_profile = "entry/src/main/module.json" - js_build_mode = "debug" - deps = [ - ":actsamsstaticextensiontnfotest_js_assets", - ":actsamsstaticextensiontnfotest_resources", - ] - ets2abc = true - certificate_profile = "signature/openharmony_sx.p7b" - hap_name = "ActsAmsStaticExtensionInfoTest" - subsystem_name = "ability" - part_name = "ability_runtime" -} - -ohos_app_scope("actsamsstaticextensiontnfotest_app_profile") { - app_profile = "AppScope/app.json" - sources = [ "AppScope/resources" ] -} - -ohos_js_assets("actsamsstaticextensiontnfotest_js_assets") { - source_dir = "entry/src/main/ets" -} - -ohos_resources("actsamsstaticextensiontnfotest_resources") { - sources = [ "entry/src/main/resources" ] - deps = [ ":actsamsstaticextensiontnfotest_app_profile" ] - hap_profile = "entry/src/main/module.json" -} diff --git a/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfotest/Test.json b/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfotest/Test.json deleted file mode 100644 index 24a9b376c20248ba6f717bd8dafab803f596c903..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfotest/Test.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "description": "Configuration for hjunit demo Tests", - "driver": { - "type": "OHJSUnitTest", - "test-timeout": "180000", - "bundle-name": "com.example.staticextensioninfo", - "module-name": "phone", - "shell-timeout": "600000", - "testcase-timeout": 70000 - }, - "kits": [ - { - "test-file-name": [ - "ActsAmsStaticExtensionInfoTest.hap", - "ActsAmsStaticExtensionInfoRelyHap.hap", - "ActsAmsExtensionModuleRelyHap.hap" - ], - "type": "AppInstallKit", - "cleanup-apps": true - }, - { - "type": "ShellKit", - "run-command": [ - "remount", - "mkdir /data/test" - ] - }, - { - "type": "PushKit", - "push": [ - "ActsAmsStaticExtensionInfoTest.hap->/data/ActsAmsStaticExtensionInfoTest.hap", - "ActsAmsStaticExtensionInfoRelyHap.hap->/data/ActsAmsStaticExtensionInfoRelyHap.hap", - "ActsAmsExtensionModuleRelyHap.hap->/data/ActsAmsExtensionModuleRelyHap.hap" - ] - }, - { - "type": "ShellKit", - "run-command": [ - "chmod 644 /data/test/*.hap" - ] - } - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfotest/entry/src/main/ets/Application/AbilityStage.ts b/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfotest/entry/src/main/ets/Application/AbilityStage.ts deleted file mode 100644 index b3c7ec92d3b6040b67f3e0634f09c004da1fe867..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfotest/entry/src/main/ets/Application/AbilityStage.ts +++ /dev/null @@ -1,22 +0,0 @@ -/* - * 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" - -export default class MyAbilityStage extends AbilityStage { - onCreate() { - console.log("MyAbilityStage onCreate") - globalThis.stageContext = this.context; - } -} \ No newline at end of file diff --git a/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfotest/entry/src/main/ets/MainAbility/MainAbility.ts b/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfotest/entry/src/main/ets/MainAbility/MainAbility.ts deleted file mode 100644 index 5d9cb94eb1b16f32da7f1ba0b9896c87323bca11..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfotest/entry/src/main/ets/MainAbility/MainAbility.ts +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 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' - -export default class MainAbility extends Ability { - onCreate(want,launchParam){ - // Ability is creating, initialize resources for this ability - console.log("MainAbility onCreate") - globalThis.abilityWant = want; - } - - onDestroy() { - // Ability is destroying, release resources for this ability - console.log("MainAbility onDestroy") - } - - onWindowStageCreate(windowStage) { - // Main window is created, set main page for this ability - console.log("MainAbility onWindowStageCreate") - globalThis.abilityContext = this.context - windowStage.setUIContent(this.context, "MainAbility/pages/index/index", null) - } - - onWindowStageDestroy() { - //Main window is destroyed, release UI related resources - console.log("MainAbility onWindowStageDestroy") - } - - onForeground() { - // Ability has brought to foreground - console.log("MainAbility onForeground") - } - - onBackground() { - // Ability has back to background - console.log("MainAbility onBackground") - } -}; \ No newline at end of file diff --git a/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfotest/entry/src/main/ets/MainAbility/pages/index/index.ets b/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfotest/entry/src/main/ets/MainAbility/pages/index/index.ets deleted file mode 100644 index bebda07c2cf21dccd43f7cc4b980205ca56a6168..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfotest/entry/src/main/ets/MainAbility/pages/index/index.ets +++ /dev/null @@ -1,56 +0,0 @@ -/* - * 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 '@ohos.router'; -import AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry' -import { Hypium } from '@ohos/hypium' -import testsuite from '../../../test/List.test' - - -@Entry -@Component -struct Index { - - aboutToAppear(){ - console.info("start run testcase!!!!") - var abilityDelegator: any - abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() - var abilityDelegatorArguments: any - abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments() - console.info('start run testcase!!!') - Hypium.hypiumTest(abilityDelegator, abilityDelegatorArguments, testsuite) - } - - 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(() => { - - }) - } - .width('100%') - .height('100%') - } -} \ No newline at end of file diff --git a/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfotest/entry/src/main/ets/MainAbility/pages/second/second.ets b/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfotest/entry/src/main/ets/MainAbility/pages/second/second.ets deleted file mode 100644 index f9009a3e8567d1f4557ebc11dded54c7e27c0b0d..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfotest/entry/src/main/ets/MainAbility/pages/second/second.ets +++ /dev/null @@ -1,43 +0,0 @@ -/* - * 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 diff --git a/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfotest/entry/src/main/ets/ServiceAbility/ServiceAbility.ts b/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfotest/entry/src/main/ets/ServiceAbility/ServiceAbility.ts deleted file mode 100644 index 8f19229ef18a8c1cb828c40cd6fbe126f597475c..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfotest/entry/src/main/ets/ServiceAbility/ServiceAbility.ts +++ /dev/null @@ -1,56 +0,0 @@ -/* - * 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 ServiceExtension from '@ohos.application.ServiceExtensionAbility' -import commonEvent from "@ohos.commonEvent"; -import Want from '@ohos.application.Want'; -import rpc from '@ohos.rpc'; - -export default class ServiceAbility extends ServiceExtension { - onCreate(want:Want) { - globalThis.abilityWant = want; - console.log('ServiceAbility onCreate, want: ' + want.abilityName); - } - - onRequest(want, startId) { - console.log('ServiceAbility onRequest, want: ' + want.abilityName + ', startId: ' + startId); - console.log('ServiceAbility registerApplicationStateObserver begin'); - } - - onConnect(want) { - console.log('ServiceAbility onConnect, want:' + want.abilityName); - globalThis.extensionContext = this.context - if (want.action == 'getExtensionInfo') { - commonEvent.publish("ACTS_ConnectAbility_0100_CommonEvent", { - parameters: { - hapModuleInfo: JSON.stringify(this.context.currentHapModuleInfo), - applicationInfo: JSON.stringify(this.context.applicationInfo), - } - } ,(err) => { - console.log("MainAbility Publish CallBack MainAbility_Start_CommonEvent") - }); - console.log('stub SerivceAbilityServer OnConnect start 1'); - } - return new rpc.RemoteObject('connect'); - } - - onDisconnect(want) { - console.log('ServiceAbility onDisconnect, want:' + want.abilityName); - } - - onDestroy() { - console.log('ServiceAbility onDestroy'); - } -} \ No newline at end of file diff --git a/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfotest/entry/src/main/ets/ServiceAbility/service.ts b/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfotest/entry/src/main/ets/ServiceAbility/service.ts deleted file mode 100644 index b49731a414958a281c2f0c4eab0e7fb408eb2c2f..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfotest/entry/src/main/ets/ServiceAbility/service.ts +++ /dev/null @@ -1,25 +0,0 @@ -/* -* 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. -*/ -export default { - onStart() { - console.info('ServiceAbility onStart'); - }, - onStop() { - console.info('ServiceAbility onStop'); - }, - onCommand(want, startId) { - console.info('ServiceAbility onCommand'); - } -}; \ No newline at end of file diff --git a/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfotest/entry/src/main/ets/TestAbility/TestAbility.ts b/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfotest/entry/src/main/ets/TestAbility/TestAbility.ts deleted file mode 100644 index 89a84730505783ba229175ab4b55d37f91a16266..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfotest/entry/src/main/ets/TestAbility/TestAbility.ts +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 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' - -export default class TestAbility extends Ability { - onCreate(want, launchParam) { - console.log('TestAbility onCreate') - } - - onDestroy() { - console.log('TestAbility onDestroy') - } - - onWindowStageCreate(windowStage) { - console.log('TestAbility onWindowStageCreate') - windowStage.loadContent("TestAbility/pages/index", (err, data) => { - if (err.code) { - console.error('Failed to load the content. Cause:' + JSON.stringify(err)); - return; - } - console.info('Succeeded in loading the content. Data: ' + JSON.stringify(data)) - }); - - globalThis.abilityContext = this.context; - } - - onWindowStageDestroy() { - console.log('TestAbility onWindowStageDestroy') - } - - onForeground() { - console.log('TestAbility onForeground') - } - - onBackground() { - console.log('TestAbility onBackground') - } -}; \ No newline at end of file diff --git a/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfotest/entry/src/main/ets/TestAbility/pages/index.ets b/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfotest/entry/src/main/ets/TestAbility/pages/index.ets deleted file mode 100644 index b93567f962921124b282f78c8ef123965d1460c9..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfotest/entry/src/main/ets/TestAbility/pages/index.ets +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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 '@ohos.router'; - -@Entry -@Component -struct Index { - aboutToAppear() { - console.info('TestAbility index aboutToAppear') - } - @State message: string = 'Hello World' - build() { - Row() { - Column() { - Text(this.message) - .fontSize(50) - .fontWeight(FontWeight.Bold) - Button() { - Text('next page') - .fontSize(20) - .fontWeight(FontWeight.Bold) - }.type(ButtonType.Capsule) - .margin({ - top: 20 - }) - .backgroundColor('#0D9FFB') - .width('35%') - .height('5%') - .onClick(()=>{ - }) - } - .width('100%') - } - .height('100%') - } - } \ No newline at end of file diff --git a/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfotest/entry/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts b/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfotest/entry/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts deleted file mode 100644 index f98a3a5cfc7835261a2d9846c6a874a335e18ec0..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfotest/entry/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts +++ /dev/null @@ -1,78 +0,0 @@ -/* - * 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 TestRunner from '@ohos.application.testRunner' -import AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry' - -var abilityDelegator = undefined -var abilityDelegatorArguments = undefined - -function translateParamsToString(parameters) { - const keySet = new Set([ - '-s class', '-s notClass', '-s suite', '-s it', - '-s level', '-s testType', '-s size', '-s timeout', - '-s dryRun' - ]) - let targetParams = ''; - for (const key in parameters) { - if (keySet.has(key)) { - targetParams = `${targetParams} ${key} ${parameters[key]}` - } - } - return targetParams.trim() -} - -async function onAbilityCreateCallback() { - console.log("onAbilityCreateCallback"); -} - -async function addAbilityMonitorCallback(err: any) { - console.info("addAbilityMonitorCallback : " + JSON.stringify(err)) -} - -export default class OpenHarmonyTestRunner implements TestRunner { - constructor() { - } - - onPrepare() { - console.info("OpenHarmonyTestRunner OnPrepare ") - } - - async onRun() { - console.log('OpenHarmonyTestRunner onRun run') - abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments() - abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() - var testAbilityName = abilityDelegatorArguments.bundleName + '.MainAbility' - let lMonitor = { - abilityName: testAbilityName, - onAbilityCreate: onAbilityCreateCallback, - }; - abilityDelegator.addAbilityMonitor(lMonitor, addAbilityMonitorCallback) - var cmd = 'aa start -d 0 -a com.example.staticextensioninfo.MainAbility' + ' -b ' + abilityDelegatorArguments.bundleName - cmd += ' '+translateParamsToString(abilityDelegatorArguments.parameters) - var debug = abilityDelegatorArguments.parameters["-D"] - if (debug == 'true') - { - cmd += ' -D' - } - console.info('cmd : '+cmd) - abilityDelegator.executeShellCommand(cmd, - (err: any, d: any) => { - console.info('executeShellCommand : err : ' + JSON.stringify(err)); - console.info('executeShellCommand : data : ' + d.stdResult); - console.info('executeShellCommand : data : ' + d.exitCode); - }) - console.info('OpenHarmonyTestRunner onRun end') - } -}; \ No newline at end of file diff --git a/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfotest/entry/src/main/ets/test/Ability.test.ets b/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfotest/entry/src/main/ets/test/Ability.test.ets deleted file mode 100644 index 7317facec34ce9476f70e9f8407ab6b0669f6704..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfotest/entry/src/main/ets/test/Ability.test.ets +++ /dev/null @@ -1,473 +0,0 @@ -/* - * 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 commonEvent from "@ohos.commonEvent" -import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from "@ohos/hypium" - -const START_ABILITY_TIMEOUT = 5000; -var subscriberInfoStartAbility_0100 = { - events: ["ACTS_ConnectAbility_0100_CommonEvent"], -}; -var subscriberInfoStartAbility_0200 = { - events: ["ACTS_ConnectAbility_0200_CommonEvent"], -}; - -export default function abilityTest() { - - describe('ActsExtensionAbilityTest', function () { - - /* - * @tc.number: ACTS_getExtensionInfo_0100 - * @tc.name: Start the system permission application to query static information about Extension - * @tc.desc: Enable application ras to query the Extension static information. Verify the query information. - Enable application ras to connect to serviceAbility - */ - it('ACTS_getExtensionInfo_0100', 0, async function (done) { - console.log('ACTS_getExtensionInfo_0100 gyq ====ACTS_getExtensionInfo_0100_Subscribe CallBack data:====>" + JSON.stringify(data)); - if (data.event == "ACTS_ConnectAbility_0100_CommonEvent") { - clearTimeout(id); - checkHapModuleInfo(JSON.parse(data.parameters['hapModuleInfo'])) - checkApplicationInfo(JSON.parse(data.parameters['applicationInfo'])) - expect(data.event).assertEqual("ACTS_ConnectAbility_0100_CommonEvent"); - commonEvent.unsubscribe(subscriber, unSubscribeCallback) - done(); - } - } - commonEvent.createSubscriber(subscriberInfoStartAbility_0100).then(async (data) => { - console.debug("====>ACTS_getExtensionInfo_0100_Create Subscriber====>"); - subscriber = data; - await commonEvent.subscribe(subscriber, subscribeCallBack); - connId = await globalThis.abilityContext.connectAbility( - { - bundleName: "com.example.staticextensioninfo", - abilityName: "com.example.staticextensioninfo.ServiceAbility", - action: "getExtensionInfo" - } - ); - console.log('ACTS_getExtensionInfo_0100 ConnectAbility connId : ' + connId); - }) - - function unSubscribeCallback() { - console.debug("====>ACTS_getExtensionInfo_0100_UnSubscribe CallBack====>"); - done(); - } - - function timeout() { - expect().assertFail(); - console.debug('ACTS_ConnectAbility_0100 timeout'); - done(); - } - - id = setTimeout(timeout, START_ABILITY_TIMEOUT); - - - function checkHapModuleInfo(data) { - console.log("checkHapModuleInfo start " + data); - console.log("checkHapModuleInfo name : " + data.name); - console.log("checkHapModuleInfo description : " + data.description); - console.log("checkHapModuleInfo descriptionId : " + data.descriptionId); - console.log("checkHapModuleInfo icon : " + data.icon); - console.log("checkHapModuleInfo label : " + data.label); - console.log("checkHapModuleInfo labelId : " + data.labelId); - console.log("checkHapModuleInfo iconId : " + data.iconId); - console.log("checkHapModuleInfo backgroundImg : " + data.backgroundImg); - console.log("checkHapModuleInfo supportedModes : " + data.supportedModes); - console.log("checkHapModuleInfo reqCapabilities length : " + data.reqCapabilities.length); - for (var j = 0; j < data.reqCapabilities.length; j++) { - console.log("checkHapModuleInfo data.reqCapabilities[" + j + "] : " + data.reqCapabilities[j]); - } - console.log("checkHapModuleInfo deviceTypes length : " + data.deviceTypes.length); - for (var j = 0; j < data.deviceTypes.length; j++) { - console.log("checkHapModuleInfo data.deviceTypes[" + j + "] : " + data.deviceTypes[j]); - } - console.log("checkHapModuleInfo moduleName : " + data.moduleName); - console.log("checkHapModuleInfo mainAbilityName : " + data.mainAbilityName); - console.log("checkHapModuleInfo installationFree : " + data.installationFree); - - expect(typeof (data)).assertEqual("object"); - expect(typeof (data.name)).assertEqual("string"); - expect(typeof (data.description)).assertEqual("string"); - expect(typeof (data.icon)).assertEqual("string"); - expect(typeof (data.label)).assertEqual("string"); - expect(typeof (data.backgroundImg)).assertEqual("string"); - expect(typeof (data.supportedModes)).assertEqual("number"); - expect(Array.isArray(data.reqCapabilities)).assertEqual(true); - expect(Array.isArray(data.deviceTypes)).assertEqual(true); - expect(Array.isArray(data.abilityInfo)).assertEqual(true); - expect(typeof (data.moduleName)).assertEqual("string"); - expect(typeof (data.mainAbilityName)).assertEqual("string"); - console.log("checkHapModuleInfo_expect_typeof_end") - expect(data.name).assertEqual("phone"); - expect(data.description).assertEqual("$string:phone_entry_dsc"); - expect(data.descriptionId).assertEqual(16777221); - expect(data.icon).assertEqual("$media:icon"); - expect(data.label).assertEqual("$string:entry_label"); - expect(data.labelId).assertEqual(16777219); - expect(data.iconId).assertEqual(16777224); - expect(data.backgroundImg).assertEqual(""); - expect(data.supportedModes).assertEqual(0); - expect(data.reqCapabilities.length).assertEqual(0); - expect(data.deviceTypes.length).assertEqual(2); - expect(data.deviceTypes[0]).assertEqual("default"); - expect(data.moduleName).assertEqual("phone") - expect(data.mainAbilityName).assertEqual("com.example.staticextensioninfo.MainAbility"); - expect(data.installationFree).assertEqual(false); - expect(data.mainElementName).assertEqual('com.example.staticextensioninfo.MainAbility'); - expect(data.hashValue).assertEqual(''); - console.log("checkHapModuleInfo end " + data); - } - function checkApplicationInfo(data) { - console.log("checkApplicationInfo start " + data); - console.log("checkApplicationInfo name : " + data.name); - console.log("checkApplicationInfo description : " + data.description); - console.log("checkApplicationInfo descriptionId : " + data.descriptionId); - console.log("checkApplicationInfo systemApp : " + data.systemApp); - console.log("checkApplicationInfo enabled : " + data.enabled); - console.log("checkApplicationInfo label : " + data.label) - console.log("checkApplicationInfo labelId : " + data.labelId); - console.log("checkApplicationInfo icon : " + data.icon); - console.log("checkApplicationInfo iconId : " + data.iconId); - console.log("checkApplicationInfo process : " + data.process); - console.log("checkApplicationInfo supportedModes : " + data.supportedModes); - console.log("checkApplicationInfo moduleSourceDirs length : " + data.moduleSourceDirs.length); - for (var j = 0; j < data.moduleSourceDirs.length; j++) { - console.log("checkApplicationInfo data.moduleSourceDirs[" + j + "] : " + data.moduleSourceDirs[j]); - } - console.log("checkApplicationInfo permissions length : " + data.permissions.length); - for (var j = 0; j < data.permissions.length; j++) { - console.log("checkApplicationInfo data.permissions[" + j + "] : " + data.permissions[j]); - } - console.log("checkApplicationInfo moduleInfos length : " + data.moduleInfos.length); - for (var j = 0; j < data.moduleInfos.length; j++) { - console.log("checkApplicationInfo data.moduleInfos[" + j + "].moduleName : " + data.moduleInfos[j].moduleName); - console.log("checkApplicationInfo data.moduleInfos[" + j + "].moduleSourceDir:" + - data.moduleInfos[j].moduleSourceDir); - } - console.log("checkApplicationInfo entryDir : " + data.entryDir); - console.log("checkApplicationInfo codePath : " + data.codePath); - console.log("checkApplicationInfo removable: " + data.removable); - - expect(typeof (data)).assertEqual("object"); - expect(typeof (data.name)).assertEqual("string"); - expect(typeof (data.description)).assertEqual("string"); - expect(typeof (data.descriptionId)).assertEqual("number"); - expect(typeof (data.systemApp)).assertEqual("boolean"); - expect(typeof (data.enabled)).assertEqual("boolean"); - expect(typeof (data.label)).assertEqual("string"); - expect(typeof (data.labelId)).assertEqual("string"); - expect(typeof (data.icon)).assertEqual("string"); - expect(typeof (data.iconId)).assertEqual("string"); - expect(typeof (data.process)).assertEqual("string"); - expect(typeof (data.supportedModes)).assertEqual("number"); - expect(Array.isArray(data.moduleSourceDirs)).assertEqual(true); - expect(Array.isArray(data.permissions)).assertEqual(true); - expect(Array.isArray(data.moduleInfos)).assertEqual(true); - expect(typeof (data.entryDir)).assertEqual("string"); - expect(typeof (data.codePath)).assertEqual("string"); - expect(typeof (data.removable)).assertEqual("boolean"); - console.log("checkApplicationInfo_expect_typeof_end") - expect(data.name).assertEqual("com.example.staticextensioninfo"); - expect(data.description).assertEqual("$string:description_application"); - expect(data.descriptionId).assertLarger(0); - expect(data.systemApp).assertEqual(true); - expect(data.enabled).assertEqual(true); - expect(data.label).assertEqual("$string:app_name"); - expect(data.labelId).assertEqual("16777216"); - expect(data.icon).assertEqual("$media:icon"); - expect(data.iconId).assertEqual("16777224"); - expect(data.process).assertEqual("com.example.staticextensioninfo"); - expect(data.supportedModes).assertEqual(0); - expect(data.moduleSourceDirs.length).assertEqual(1); - expect(data.moduleSourceDirs[0]).assertEqual("/data/app/el1/bundle/public/" + - "com.example.staticextensioninfo/phone"); - expect(data.moduleInfos.length).assertEqual(1); - expect(data.moduleInfos[0].moduleName).assertEqual("phone"); - expect(data.moduleInfos[0].moduleSourceDir).assertEqual("/data/app/el1/bundle/public/" + - "com.example.staticextensioninfo/phone"); - expect(data.entryDir).assertEqual("/data/app/el1/bundle/public/com.example.staticextensioninfo" + - "/phone"); - expect(data.codePath).assertEqual("/data/app/el1/bundle/public/com.example.staticextensioninfo"); - expect(data.removable).assertEqual(true); - console.log("checkApplicationInfo end " + data); - } - }) - - /* - * @tc.number: ACTS_getExtensionInfo_0200 - * @tc.name: Apply StaticExtensionInfo. Connect to StaticExtensionInfoTest to query static information - about an Extension - * @tc.desc: Enabling an application to connect to StaticExtensionInfo. Connecting to StaticExtensionInfoTest - To query static information about an Extension. Verifying the query information - */ - it('ACTS_getExtensionInfo_0200', 0, async function (done) { - console.log('ACTS_getExtensionInfo_0200====ACTS_getExtensionInfo_0200_Subscribe CallBack data:====>" + JSON.stringify(data)); - if (data.event == "ACTS_ConnectAbility_0200_CommonEvent") { - clearTimeout(id); - checkHapModuleInfo_0200(JSON.parse(data.parameters['hapModuleInfo2'])) - checkApplicationInfo_0200(JSON.parse(data.parameters['applicationInfo2'])) - expect(data.event).assertEqual("ACTS_ConnectAbility_0200_CommonEvent"); - commonEvent.unsubscribe(subscriber, unSubscribeCallback) - } - } - commonEvent.createSubscriber(subscriberInfoStartAbility_0200).then(async (data) => { - console.debug("====>ACTS_getExtensionInfo_0200_Create Subscriber====>"); - subscriber = data; - await commonEvent.subscribe(subscriber, subscribeCallBack); - connId = await globalThis.abilityContext.connectAbility( - { - bundleName: "com.example.staticextensioninfotest", - abilityName: "com.example.staticextensioninfotest.ServiceAbility", - action: "getExtensionInfoTest" - } - ); - console.log('ACTS_getExtensionInfo_0200 ConnectAbility connId : ' + connId); - }) - - function unSubscribeCallback() { - console.debug("====>ACTS_getExtensionInfo_0200_UnSubscribe CallBack====>"); - done(); - } - - function timeout() { - expect().assertFail(); - console.debug('ACTS_ConnectAbility_0200 timeout'); - } - - id = setTimeout(timeout, START_ABILITY_TIMEOUT); - - - function checkHapModuleInfo_0200(data) { - console.log("checkHapModuleInfo2 start " + data); - console.log("checkHapModuleInfo2 name : " + data.name); - console.log("checkHapModuleInfo2 description : " + data.description); - console.log("checkHapModuleInfo2 descriptionId : " + data.descriptionId); - console.log("checkHapModuleInfo2 icon : " + data.icon); - console.log("checkHapModuleInfo2 label : " + data.label); - console.log("checkHapModuleInfo2 labelId : " + data.labelId); - console.log("checkHapModuleInfo2 iconId : " + data.iconId); - console.log("checkHapModuleInfo2 backgroundImg : " + data.backgroundImg); - console.log("checkHapModuleInfo2 supportedModes : " + data.supportedModes); - console.log("checkHapModuleInfo2 reqCapabilities length : " + data.reqCapabilities.length); - for (var j = 0; j < data.reqCapabilities.length; j++) { - console.log("checkHapModuleInfo2 data.reqCapabilities[" + j + "] : " + data.reqCapabilities[j]); - } - console.log("checkHapModuleInfo2 deviceTypes length : " + data.deviceTypes.length); - for (var j = 0; j < data.deviceTypes.length; j++) { - console.log("checkHapModuleInfo2 data.deviceTypes[" + j + "] : " + data.deviceTypes[j]); - } - console.log("checkHapModuleInfo2 moduleName : " + data.moduleName); - console.log("checkHapModuleInfo2 mainAbilityName : " + data.mainAbilityName); - console.log("checkHapModuleInfo2 installationFree : " + data.installationFree); - - expect(typeof (data)).assertEqual("object"); - expect(typeof (data.name)).assertEqual("string"); - expect(typeof (data.description)).assertEqual("string"); - expect(typeof (data.icon)).assertEqual("string"); - expect(typeof (data.label)).assertEqual("string"); - expect(typeof (data.backgroundImg)).assertEqual("string"); - expect(typeof (data.supportedModes)).assertEqual("number"); - expect(Array.isArray(data.reqCapabilities)).assertEqual(true); - expect(Array.isArray(data.deviceTypes)).assertEqual(true); - expect(Array.isArray(data.abilityInfo)).assertEqual(true); - expect(typeof (data.moduleName)).assertEqual("string"); - expect(typeof (data.mainAbilityName)).assertEqual("string"); - console.log("checkHapModuleInfo_expect_typeof_end") - expect(data.name).assertEqual("phone"); - expect(data.description).assertEqual("$string:phone_entry_dsc"); - expect(data.descriptionId).assertEqual(16777221); - expect(data.icon).assertEqual("$media:icon"); - expect(data.label).assertEqual("$string:entry_label"); - expect(data.labelId).assertEqual(16777219); - expect(data.iconId).assertEqual(16777224); - expect(data.backgroundImg).assertEqual(""); - expect(data.supportedModes).assertEqual(0); - expect(data.reqCapabilities.length).assertEqual(0); - expect(data.deviceTypes.length).assertEqual(2); - expect(data.deviceTypes[0]).assertEqual("default"); - expect(data.moduleName).assertEqual("phone") - expect(data.mainAbilityName).assertEqual("com.example.staticextensioninfotest.MainAbility"); - expect(data.installationFree).assertEqual(false); - expect(data.mainElementName).assertEqual('com.example.staticextensioninfotest.MainAbility'); - expect(data.hashValue).assertEqual(''); - console.log("checkHapModuleInfo end " + data); - } - function checkApplicationInfo_0200(data) { - console.log("checkApplicationInfo2 start " + data); - console.log("checkApplicationInfo2 name : " + data.name); - console.log("checkApplicationInfo2 description : " + data.description); - console.log("checkApplicationInfo2 descriptionId : " + data.descriptionId); - console.log("checkApplicationInfo2 systemApp : " + data.systemApp); - console.log("checkApplicationInfo2 enabled : " + data.enabled); - console.log("checkApplicationInfo2 label : " + data.label) - console.log("checkApplicationInfo2 labelId : " + data.labelId); - console.log("checkApplicationInfo2 icon : " + data.icon); - console.log("checkApplicationInfo2 iconId : " + data.iconId); - console.log("checkApplicationInfo2 process : " + data.process); - console.log("checkApplicationInfo2 supportedModes : " + data.supportedModes); - console.log("checkApplicationInfo2 moduleSourceDirs length : " + data.moduleSourceDirs.length); - for (var j = 0; j < data.moduleSourceDirs.length; j++) { - console.log("checkApplicationInfo2 data.moduleSourceDirs[" + j + "] : " + data.moduleSourceDirs[j]); - } - console.log("checkApplicationInfo2 permissions length : " + data.permissions.length); - for (var j = 0; j < data.permissions.length; j++) { - console.log("checkApplicationInfo2 data.permissions[" + j + "] : " + data.permissions[j]); - } - console.log("checkApplicationInfo2 moduleInfos length : " + data.moduleInfos.length); - for (var j = 0; j < data.moduleInfos.length; j++) { - console.log("checkApplicationInfo2 data.moduleInfos[" + j + "].moduleName : " + data.moduleInfos[j].moduleName); - console.log("checkApplicationInfo2 data.moduleInfos[" + j + "].moduleSourceDir:" + - data.moduleInfos[j].moduleSourceDir); - } - console.log("checkApplicationInfo2 entryDir : " + data.entryDir); - console.log("checkApplicationInfo2 codePath : " + data.codePath); - console.log("checkApplicationInfo2 removable: " + data.removable); - - expect(typeof (data)).assertEqual("object"); - expect(typeof (data.name)).assertEqual("string"); - expect(typeof (data.description)).assertEqual("string"); - expect(typeof (data.descriptionId)).assertEqual("number"); - expect(typeof (data.systemApp)).assertEqual("boolean"); - expect(typeof (data.enabled)).assertEqual("boolean"); - expect(typeof (data.label)).assertEqual("string"); - expect(typeof (data.labelId)).assertEqual("string"); - expect(typeof (data.icon)).assertEqual("string"); - expect(typeof (data.iconId)).assertEqual("string"); - expect(typeof (data.process)).assertEqual("string"); - expect(typeof (data.supportedModes)).assertEqual("number"); - expect(Array.isArray(data.moduleSourceDirs)).assertEqual(true); - expect(Array.isArray(data.permissions)).assertEqual(true); - expect(Array.isArray(data.moduleInfos)).assertEqual(true); - expect(typeof (data.entryDir)).assertEqual("string"); - expect(typeof (data.codePath)).assertEqual("string"); - expect(typeof (data.removable)).assertEqual("boolean"); - console.log("checkApplicationInfo_expect_typeof_end") - expect(data.name).assertEqual("com.example.staticextensioninfotest"); - expect(data.description).assertEqual("$string:description_application"); - expect(data.descriptionId).assertLarger(0); - expect(data.systemApp).assertEqual(true); - expect(data.enabled).assertEqual(true); - expect(data.label).assertEqual("$string:app_name"); - expect(data.labelId.length).assertLarger(0); - expect(data.icon).assertEqual("$media:icon"); - expect(data.iconId.length).assertLarger(0); - expect(data.process).assertEqual("com.example.staticextensioninfotest"); - expect(data.supportedModes).assertEqual(0); - expect(data.moduleSourceDirs.length).assertEqual(1); - expect(data.moduleSourceDirs[0]).assertEqual("/data/app/el1/bundle/public/" + - "com.example.staticextensioninfotest/phone"); - expect(data.moduleInfos.length).assertEqual(1); - expect(data.moduleInfos[0].moduleName).assertEqual("phone"); - expect(data.moduleInfos[0].moduleSourceDir).assertEqual("/data/app/el1/bundle/public/" + - "com.example.staticextensioninfotest/phone"); - expect(data.entryDir).assertEqual("/data/app/el1/bundle/public/com.example.staticextensioninfotest" + - "/phone"); - expect(data.codePath).assertEqual("/data/app/el1/bundle/public/com.example.staticextensioninfotest"); - expect(data.removable).assertEqual(true); - console.log("checkApplicationInfo end " + data); - } - }) - - /* - * @tc.number: ACTS_getExtensionInfo_0300 - * @tc.name: Apply StaticExtensionInfo. Connect to StaticExtensionInfoTest to query static information - about an Extension - * @tc.desc: Verify configuration module.json connect service application query property information - */ - it('ACTS_getExtensionInfo_0300', 0, async function (done) { - console.log('ACTS_getExtensionInfo_0300====ACTS_getExtensionInfo_0300_Subscribe CallBack data:====>" + JSON.stringify(data)); - if (data.event == "ACTS_ConnectAbility_0100_CommonEvent") { - clearTimeout(id); - checkExtensionAbilityInfo(JSON.parse(data.parameters['extensionAbilityInfo'])) - expect(data.event).assertEqual("ACTS_ConnectAbility_0100_CommonEvent"); - commonEvent.unsubscribe(subscriber, unSubscribeCallback) - done(); - } - } - commonEvent.createSubscriber(subscriberInfoStartAbility_0100).then(async (data) => { - console.debug("====>ACTS_getExtensionInfo_0300_Create Subscriber====>"); - subscriber = data; - await commonEvent.subscribe(subscriber, subscribeCallBack); - connId = await globalThis.abilityContext.connectAbility( - { - bundleName: "com.example.extensionmodule", - abilityName: "ServiceExtAbility", - } - ); - console.log('ACTS_getExtensionInfo_0300 ConnectAbility connId : ' + connId); - }) - - function unSubscribeCallback() { - console.debug("====>ACTS_getExtensionInfo_0300_UnSubscribe CallBack====>"); - } - - function timeout() { - expect().assertFail(); - globalThis.abilityContext.disconnectAbility( - connId, - (error, data) => { - console.log('DisconnectAbility_0300 result errCode : ' + error.code + " data: " + data) - done(); - }, - ); - console.debug('ACTS_ConnectAbility_0300 timeout'); - done(); - } - - id = setTimeout(timeout, START_ABILITY_TIMEOUT); - - - function checkExtensionAbilityInfo(data) { - console.log("checkHapModuleInfo_expect_typeof_end3") - console.log("checkAbilityInfo metadata length : " + data.metadata.length); - console.log("checkAbilityInfo metadata length : " + data.metadata[0].name); - expect(data.metadata[0].name).assertEqual("ohos.extension.form"); - expect(data.metadata[0].value).assertEqual("MainAbility"); - expect(data.metadata[0].resource).assertEqual("@profile:form_config"); - expect(data.bundleName).assertEqual("com.example.extensionmodule"); - expect(data.moduleName).assertEqual("phone"); - expect(data.name).assertEqual("ServiceExtAbility"); - expect(data.permissions.length).assertEqual(1); - expect(data.permissions[0]).assertEqual("ohos.permission.USE_BLUETOOTH"); - expect(data.isVisible).assertEqual(true); - expect(data.extensionAbilityType).assertLarger(0); - expect(data.readPermission).assertEqual(""); - expect(data.writePermission).assertEqual(""); - expect(data.enabled).assertEqual(true) - console.log("checkExtensionAbilityInfo3 end " + data); - } - }) - }) -} \ No newline at end of file diff --git a/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfotest/entry/src/main/ets/test/List.test.ets b/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfotest/entry/src/main/ets/test/List.test.ets deleted file mode 100644 index f6a5bd8d95cac42bcdc862e9976dfc58d4cef99b..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfotest/entry/src/main/ets/test/List.test.ets +++ /dev/null @@ -1,22 +0,0 @@ -/* - * 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 abilityTest from './Ability.test.ets' - - -export default function testsuite() { - - abilityTest() - -} \ No newline at end of file diff --git a/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfotest/entry/src/main/module.json b/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfotest/entry/src/main/module.json deleted file mode 100644 index de288605b3fafa6329f5406a1c526fe292ef6e53..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfotest/entry/src/main/module.json +++ /dev/null @@ -1,95 +0,0 @@ -{ - "module": { - "name": "phone", - "type": "entry", - "srcEntrance": "./ets/Application/AbilityStage.ts", - "description": "$string:phone_entry_dsc", - "mainElement": "com.example.staticextensioninfo.MainAbility", - "deviceTypes": [ - "default", - "tablet" - ], - "deliveryWithInstall": true, - "installationFree": false, - "uiSyntax": "ets", - "pages": "$profile:main_pages", - "abilities": [ - { - "name": "com.example.staticextensioninfo.MainAbility", - "srcEntrance": "./ets/MainAbility/MainAbility.ts", - "description": "$string:phone_entry_main", - "icon": "$media:icon", - "label": "$string:entry_label", - "visible": true, - "orientation": "portrait", - "skills": [ - { - "actions": [ - "action.system.home" - ], - "entities":[ - "entity.system.home" - ] - } - ] - } - ], - "extensionAbilities": [ - { - "srcEntrance": "./ets/ServiceAbility/ServiceAbility.ts", - "name": "com.example.staticextensioninfo.ServiceAbility", - "icon": "$media:icon", - "srcLanguage": "ets", - "description": "$string:phone_entry_main", - "type": "service", - "visible": true - } - ], - "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.INTERACT_ACROSS_LOCAL_ACCOUNTS", - "reason":"need use ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS" - }, - { - "name":"ohos.permission.CLEAN_BACKGROUND_PROCESSES", - "reason":"need use ohos.permission.CLEAN_BACKGROUND_PROCESSES" - }, - { - "name":"ohos.permission.GET_RUNNING_INFO", - "reason":"need use ohos.permission.GET_RUNNING_INFO" - }, - { - "name":"ohos.permission.USE_BLUETOOTH", - "reason":"need use ohos.permission.USE_BLUETOOTH" - } - ] - } -} diff --git a/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfotest/entry/src/main/resources/base/element/string.json b/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfotest/entry/src/main/resources/base/element/string.json deleted file mode 100644 index 2977b612ec4595b13eaaffe3e8fc578e83c42d48..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfotest/entry/src/main/resources/base/element/string.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "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" - } - ] -} diff --git a/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfotest/entry/src/main/resources/base/media/icon.png b/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfotest/entry/src/main/resources/base/media/icon.png deleted file mode 100644 index 474a55588fd7216113dd42073aadf254d4dba023..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfotest/entry/src/main/resources/base/media/icon.png and /dev/null differ diff --git a/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfotest/entry/src/main/resources/base/profile/main_pages.json b/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfotest/entry/src/main/resources/base/profile/main_pages.json deleted file mode 100644 index 02221db61d317863114ff0ca4dd2b33586abff12..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfotest/entry/src/main/resources/base/profile/main_pages.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "src": [ - "MainAbility/pages/index/index", - "MainAbility/pages/second/second" - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfotest/signature/openharmony_sx.p7b b/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfotest/signature/openharmony_sx.p7b deleted file mode 100755 index dcec6c9615032c1b48bf185e839d9720dd68aab0..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfotest/signature/openharmony_sx.p7b and /dev/null differ diff --git a/ability/ability_runtime/amscontextualinforquery/actsamsstatichapa/entry/src/main/module.json b/ability/ability_runtime/amscontextualinforquery/actsamsstatichapa/entry/src/main/module.json index 5e4ec8d9c5f1a5436bc6e14c6114145638ca1ec8..abb7c71e70896b375f829b1ce2da38b8ae818b06 100644 --- a/ability/ability_runtime/amscontextualinforquery/actsamsstatichapa/entry/src/main/module.json +++ b/ability/ability_runtime/amscontextualinforquery/actsamsstatichapa/entry/src/main/module.json @@ -36,48 +36,16 @@ ], "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.INTERACT_ACROSS_LOCAL_ACCOUNTS", - "reason":"need use ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS" + "name":"ohos.permission.USE_BLUETOOTH", + "reason":"need use ohos.permission.USE_BLUETOOTH" }, { "name":"ohos.permission.CLEAN_BACKGROUND_PROCESSES", "reason":"need use ohos.permission.CLEAN_BACKGROUND_PROCESSES" }, { - "name":"ohos.permission.GET_RUNNING_INFO", - "reason":"need use ohos.permission.GET_RUNNING_INFO" - }, - { - "name":"ohos.permission.USE_BLUETOOTH", - "reason":"need use ohos.permission.USE_BLUETOOTH" + "name":"ohos.permission.GET_BUNDLE_INFO", + "reason":"need use ohos.permission.GET_BUNDLE_INFO" } ] } diff --git a/ability/ability_runtime/amscontextualinforquery/actsamsstatichapa/signature/openharmony_sx.p7b b/ability/ability_runtime/amscontextualinforquery/actsamsstatichapa/signature/openharmony_sx.p7b index cc53179a48f88f20acc379c138a001e9a15838f6..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/amscontextualinforquery/actsamsstatichapa/signature/openharmony_sx.p7b and b/ability/ability_runtime/amscontextualinforquery/actsamsstatichapa/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/amscontextualinforquery/actsamsstatichapb/entry/src/main/module.json b/ability/ability_runtime/amscontextualinforquery/actsamsstatichapb/entry/src/main/module.json index c980ad7a8a2552098b4c4497f88457882c637f01..17e5e428d35f3ec2c1f797888bb87b40ea799371 100644 --- a/ability/ability_runtime/amscontextualinforquery/actsamsstatichapb/entry/src/main/module.json +++ b/ability/ability_runtime/amscontextualinforquery/actsamsstatichapb/entry/src/main/module.json @@ -36,48 +36,16 @@ ], "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.INTERACT_ACROSS_LOCAL_ACCOUNTS", - "reason":"need use ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS" + "name":"ohos.permission.USE_BLUETOOTH", + "reason":"need use ohos.permission.USE_BLUETOOTH" }, { "name":"ohos.permission.CLEAN_BACKGROUND_PROCESSES", "reason":"need use ohos.permission.CLEAN_BACKGROUND_PROCESSES" }, { - "name":"ohos.permission.GET_RUNNING_INFO", - "reason":"need use ohos.permission.GET_RUNNING_INFO" - }, - { - "name":"ohos.permission.USE_BLUETOOTH", - "reason":"need use ohos.permission.USE_BLUETOOTH" + "name":"ohos.permission.GET_BUNDLE_INFO", + "reason":"need use ohos.permission.GET_BUNDLE_INFO" } ] } diff --git a/ability/ability_runtime/amscontextualinforquery/actsamsstatichapb/signature/openharmony_sx.p7b b/ability/ability_runtime/amscontextualinforquery/actsamsstatichapb/signature/openharmony_sx.p7b index cc53179a48f88f20acc379c138a001e9a15838f6..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/amscontextualinforquery/actsamsstatichapb/signature/openharmony_sx.p7b and b/ability/ability_runtime/amscontextualinforquery/actsamsstatichapb/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/amscontextualinforquery/actsamsstaticinfomationquerytest/entry/src/main/module.json b/ability/ability_runtime/amscontextualinforquery/actsamsstaticinfomationquerytest/entry/src/main/module.json index ae44b834b96ea16e2ad7c21e80af49d2ccd4736f..9f169ffcfa46a6ae4d82de7771a984a3f0688ef4 100644 --- a/ability/ability_runtime/amscontextualinforquery/actsamsstaticinfomationquerytest/entry/src/main/module.json +++ b/ability/ability_runtime/amscontextualinforquery/actsamsstaticinfomationquerytest/entry/src/main/module.json @@ -35,46 +35,18 @@ } ], "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.CLEAN_BACKGROUND_PROCESSES", + "reason":"need use ohos.permission.CLEAN_BACKGROUND_PROCESSES" + }, + { + "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" + } ] } } diff --git a/ability/ability_runtime/amscontextualinforquery/actsamsstaticinfomationquerytest/signature/openharmony_sx.p7b b/ability/ability_runtime/amscontextualinforquery/actsamsstaticinfomationquerytest/signature/openharmony_sx.p7b index cc53179a48f88f20acc379c138a001e9a15838f6..199daf6d8c66860888d1b77a96a73f918b4beb6a 100644 Binary files a/ability/ability_runtime/amscontextualinforquery/actsamsstaticinfomationquerytest/signature/openharmony_sx.p7b and b/ability/ability_runtime/amscontextualinforquery/actsamsstaticinfomationquerytest/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/amscontextualinforquery/actsamsstaticinformationmultipletest/entry/src/main/module.json b/ability/ability_runtime/amscontextualinforquery/actsamsstaticinformationmultipletest/entry/src/main/module.json index ff687e09e7e0383f6949ecf692c40e509e0b52c8..e03d892786f2efb92a808af8626f88d03d689fb0 100644 --- a/ability/ability_runtime/amscontextualinforquery/actsamsstaticinformationmultipletest/entry/src/main/module.json +++ b/ability/ability_runtime/amscontextualinforquery/actsamsstaticinformationmultipletest/entry/src/main/module.json @@ -36,48 +36,16 @@ ], "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.INTERACT_ACROSS_LOCAL_ACCOUNTS", - "reason": "need use ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS" + "name": "ohos.permission.USE_BLUETOOTH", + "reason": "need use ohos.permission.USE_BLUETOOTH" }, { "name": "ohos.permission.CLEAN_BACKGROUND_PROCESSES", "reason": "need use ohos.permission.CLEAN_BACKGROUND_PROCESSES" }, { - "name": "ohos.permission.GET_RUNNING_INFO", - "reason": "need use ohos.permission.GET_RUNNING_INFO" - }, - { - "name": "ohos.permission.USE_BLUETOOTH", - "reason": "need use ohos.permission.USE_BLUETOOTH" + "name": "ohos.permission.GET_BUNDLE_INFO", + "reason": "need use ohos.permission.GET_BUNDLE_INFO" } ] } diff --git a/ability/ability_runtime/amscontextualinforquery/actsamsstaticinformationmultipletest/signature/openharmony_sx.p7b b/ability/ability_runtime/amscontextualinforquery/actsamsstaticinformationmultipletest/signature/openharmony_sx.p7b index cc53179a48f88f20acc379c138a001e9a15838f6..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/amscontextualinforquery/actsamsstaticinformationmultipletest/signature/openharmony_sx.p7b and b/ability/ability_runtime/amscontextualinforquery/actsamsstaticinformationmultipletest/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/amscontextualinforquery/actsamsstaticinformationmultitest/entry/src/main/module.json b/ability/ability_runtime/amscontextualinforquery/actsamsstaticinformationmultitest/entry/src/main/module.json index a59fe7164ac91ee7bc4e9f706d9fc4d0f307ca19..840408536e6f7fcdf998599ad221a27a35fe358b 100644 --- a/ability/ability_runtime/amscontextualinforquery/actsamsstaticinformationmultitest/entry/src/main/module.json +++ b/ability/ability_runtime/amscontextualinforquery/actsamsstaticinformationmultitest/entry/src/main/module.json @@ -36,48 +36,16 @@ ], "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.INTERACT_ACROSS_LOCAL_ACCOUNTS", - "reason":"need use ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS" + "name":"ohos.permission.USE_BLUETOOTH", + "reason":"need use ohos.permission.USE_BLUETOOTH" }, { "name":"ohos.permission.CLEAN_BACKGROUND_PROCESSES", "reason":"need use ohos.permission.CLEAN_BACKGROUND_PROCESSES" }, { - "name":"ohos.permission.GET_RUNNING_INFO", - "reason":"need use ohos.permission.GET_RUNNING_INFO" - }, - { - "name":"ohos.permission.USE_BLUETOOTH", - "reason":"need use ohos.permission.USE_BLUETOOTH" + "name":"ohos.permission.GET_BUNDLE_INFO", + "reason":"need use ohos.permission.GET_BUNDLE_INFO" } ] } diff --git a/ability/ability_runtime/amscontextualinforquery/actsamsstaticinformationmultitest/signature/openharmony_sx.p7b b/ability/ability_runtime/amscontextualinforquery/actsamsstaticinformationmultitest/signature/openharmony_sx.p7b index cc53179a48f88f20acc379c138a001e9a15838f6..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/amscontextualinforquery/actsamsstaticinformationmultitest/signature/openharmony_sx.p7b and b/ability/ability_runtime/amscontextualinforquery/actsamsstaticinformationmultitest/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/amscontextualinforquery/actsamsstaticquerytesttwohap/signature/openharmony_sx.p7b b/ability/ability_runtime/amscontextualinforquery/actsamsstaticquerytesttwohap/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/amscontextualinforquery/actsamsstaticquerytesttwohap/signature/openharmony_sx.p7b and b/ability/ability_runtime/amscontextualinforquery/actsamsstaticquerytesttwohap/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/amsdatauriutils/signature/openharmony_sx.p7b b/ability/ability_runtime/amsdatauriutils/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/amsdatauriutils/signature/openharmony_sx.p7b and b/ability/ability_runtime/amsdatauriutils/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/amsdatauriutils/src/main/config.json b/ability/ability_runtime/amsdatauriutils/src/main/config.json index fc916f37bafba6816e036c81260aeed44cae58c9..ac19d90c8c26a09f6abfdba176ca63262bded046 100644 --- a/ability/ability_runtime/amsdatauriutils/src/main/config.json +++ b/ability/ability_runtime/amsdatauriutils/src/main/config.json @@ -63,28 +63,6 @@ "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": [ { "pages": [ diff --git a/ability/ability_runtime/amsdisplayIdtest/actsamsspecifytesthap/entry/src/main/module.json b/ability/ability_runtime/amsdisplayIdtest/actsamsspecifytesthap/entry/src/main/module.json index 35f2ddf88a209b316f6d23a02c32d693b527bdcb..feeaab8992c8405f7a1917b62b2c206f4d91b773 100644 --- a/ability/ability_runtime/amsdisplayIdtest/actsamsspecifytesthap/entry/src/main/module.json +++ b/ability/ability_runtime/amsdisplayIdtest/actsamsspecifytesthap/entry/src/main/module.json @@ -33,48 +33,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.INTERACT_ACROSS_LOCAL_ACCOUNTS", - "reason": "need use ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS" - }, - { - "name": "ohos.permission.CLEAN_BACKGROUND_PROCESSES", - "reason": "need use ohos.permission.CLEAN_BACKGROUND_PROCESSES" - }, - { - "name": "ohos.permission.GET_RUNNING_INFO", - "reason": "need use ohos.permission.GET_RUNNING_INFO" - } ] } } diff --git a/ability/ability_runtime/amsdisplayIdtest/actsamsspecifytesthap/signature/openharmony_sx.p7b b/ability/ability_runtime/amsdisplayIdtest/actsamsspecifytesthap/signature/openharmony_sx.p7b index cc53179a48f88f20acc379c138a001e9a15838f6..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/amsdisplayIdtest/actsamsspecifytesthap/signature/openharmony_sx.p7b and b/ability/ability_runtime/amsdisplayIdtest/actsamsspecifytesthap/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/amsdisplayIdtest/actsamsstartabilityforresulttest/entry/src/main/ets/ServiceAbility/ServiceAbility.ts b/ability/ability_runtime/amsdisplayIdtest/actsamsstartabilityforresulttest/entry/src/main/ets/ServiceAbility/ServiceAbility.ts deleted file mode 100644 index 8b29a6c2db891cca32cee4c3d736d081586950af..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/amsdisplayIdtest/actsamsstartabilityforresulttest/entry/src/main/ets/ServiceAbility/ServiceAbility.ts +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (c) 2021 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 ServiceExtension from '@ohos.application.ServiceExtensionAbility'; -import Want from '@ohos.application.Want'; -import rpc from '@ohos.rpc'; - -export default class ServiceAbility extends ServiceExtension { - onCreate(want:Want) { - globalThis.abilityWant = want; - console.log('ServiceAbility onCreate, want: ' + want.abilityName); - } - - onRequest(want, startId) { - console.log('ServiceAbility onRequest, want: ' + want.abilityName + ', startId: ' + startId); - console.log('ServiceAbility registerApplicationStateObserver begin'); - } - - onConnect(want) { - console.log('ServiceAbility onConnect, want:' + want.abilityName); - globalThis.extensionContext = this.context - if (want.action == 'getExtensionInfotwo') { - this.context.startAbility( - { - bundleName: 'com.example.startabilityforresult', - abilityName: 'com.example.startabilityforresult.MainAbility2' - }, - { - windowMode: 0, - displayId: 10, - }).then(() => { - console.log("====>end startAbility====>success!") - }) - console.log('stub SerivceAbilityServer OnConnect start 2'); - } - return new rpc.RemoteObject('connect'); - } - - onDisconnect(want) { - console.log('ServiceAbility onDisconnect, want:' + want.abilityName); - } - - onDestroy() { - console.log('ServiceAbility onDestroy'); - } -} \ No newline at end of file diff --git a/ability/ability_runtime/amsdisplayIdtest/actsamsstartabilityforresulttest/entry/src/main/ets/ServiceAbility/service.ts b/ability/ability_runtime/amsdisplayIdtest/actsamsstartabilityforresulttest/entry/src/main/ets/ServiceAbility/service.ts deleted file mode 100644 index b49731a414958a281c2f0c4eab0e7fb408eb2c2f..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/amsdisplayIdtest/actsamsstartabilityforresulttest/entry/src/main/ets/ServiceAbility/service.ts +++ /dev/null @@ -1,25 +0,0 @@ -/* -* 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. -*/ -export default { - onStart() { - console.info('ServiceAbility onStart'); - }, - onStop() { - console.info('ServiceAbility onStop'); - }, - onCommand(want, startId) { - console.info('ServiceAbility onCommand'); - } -}; \ No newline at end of file diff --git a/ability/ability_runtime/amsdisplayIdtest/actsamsstartabilityforresulttest/entry/src/main/ets/test/Ability.test.ets b/ability/ability_runtime/amsdisplayIdtest/actsamsstartabilityforresulttest/entry/src/main/ets/test/Ability.test.ets index 845c0ddc1fbc182ffd10fae92f72bec1dfc0226e..8344b6440fabdd79fe8de16c3add6a9a7da2ce45 100644 --- a/ability/ability_runtime/amsdisplayIdtest/actsamsstartabilityforresulttest/entry/src/main/ets/test/Ability.test.ets +++ b/ability/ability_runtime/amsdisplayIdtest/actsamsstartabilityforresulttest/entry/src/main/ets/test/Ability.test.ets @@ -80,7 +80,6 @@ export default function abilityTest() { id = setTimeout(timeout, START_ABILITY_TIMEOUT); console.log('Start ACTS_startAbilityForResult_0800 timer id : ' + id); - }) /* @@ -141,7 +140,6 @@ export default function abilityTest() { id = setTimeout(timeout, START_ABILITY_TIMEOUT); console.log('Start ACTS_startAbilityForResult_0900 timer id : ' + id); - }) /* @@ -205,74 +203,6 @@ export default function abilityTest() { id = setTimeout(timeout, START_ABILITY_TIMEOUT); console.log('Start ACTS_startAbilityForResult_1000 timer id : ' + id); - }) - - /* - * @tc.number: ACTS_startAbilityForResult_1100 - * @tc.name: Get the specified displayId to start Ability - * @tc.desc: Verify the connection to the service application startup page to obtain the specified displayId - */ - it('ACTS_startAbilityForResult_1100', 0, async function (done) { - console.log('ACTS_startAbilityForResult_1100====ACTS_startAbilityForResult_1100_Subscribe CallBack data:====>" + JSON.stringify(data)); - if (data.event == "ACTS_TerminateSelf_CommonEvent") { - clearTimeout(id); - expect(data.parameters['displayId']).assertEqual(10); - expect(data.parameters['windowMode']).assertEqual(0); - commonEvent.unsubscribe(subscriber, unSubscribeCallback) - expect(data.event).assertEqual("ACTS_TerminateSelf_CommonEvent"); - - } - } - commonEvent.createSubscriber(subscriberInfo_MainAbility).then(async (data) => { - console.debug("====>ACTS_startAbilityForResult_1100_Create Subscriber====>"); - subscriber = data; - await commonEvent.subscribe(subscriber, subscribeCallBack); - connId = await globalThis.abilityContext.connectAbility( - { - bundleName: "com.example.startabilityforresult", - abilityName: "com.example.startabilityforresult.ServiceAbility", - action: "getExtensionInfotwo" - } - ); - console.log('ACTS_startAbilityForResult_1100 ConnectAbility connId : ' + connId); - }) - - function unSubscribeCallback() { - globalThis.abilityContext.disconnectAbility( - connId, - (error, data) => { - console.log('startAbilityForResult_0400 Disconnect result errCode : ' + error.code + " data: " + data) - done(); - }, - ); - console.debug("====>ACTS_startAbilityForResult_1100_UnSubscribe CallBack====>"); - } - - function timeout() { - expect().assertFail(); - globalThis.abilityContext.disconnectAbility( - connId, - (error, data) => { - console.log('DisconnectAbility_0400 result errCode : ' + error.code + " data: " + data) - done(); - }, - ); - console.debug('ACTS_startAbilityForResult_1100 timeout'); - done(); - } - - id = setTimeout(timeout, START_ABILITY_TIMEOUT); - - - }) - }) } \ No newline at end of file diff --git a/ability/ability_runtime/amsdisplayIdtest/actsamsstartabilityforresulttest/entry/src/main/module.json b/ability/ability_runtime/amsdisplayIdtest/actsamsstartabilityforresulttest/entry/src/main/module.json index 12b9d7199053aac8a4b357978f1af1b01a08aa07..c3af060c81cfdf41f5344cf7909d20c4ef77dc5d 100644 --- a/ability/ability_runtime/amsdisplayIdtest/actsamsstartabilityforresulttest/entry/src/main/module.json +++ b/ability/ability_runtime/amsdisplayIdtest/actsamsstartabilityforresulttest/entry/src/main/module.json @@ -42,67 +42,6 @@ "visible": true, "orientation": "portrait" } - ], - "extensionAbilities": [ - { - "srcEntrance": "./ets/ServiceAbility/ServiceAbility.ts", - "name": "com.example.startabilityforresult.ServiceAbility", - "icon": "$media:icon", - "srcLanguage": "ets", - "description": "$string:phone_entry_main", - "type": "service", - "visible": true - } - ], - "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.INTERACT_ACROSS_LOCAL_ACCOUNTS", - "reason": "need use ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS" - }, - { - "name": "ohos.permission.CLEAN_BACKGROUND_PROCESSES", - "reason": "need use ohos.permission.CLEAN_BACKGROUND_PROCESSES" - }, - { - "name": "ohos.permission.GET_RUNNING_INFO", - "reason": "need use ohos.permission.GET_RUNNING_INFO" - }, - { - "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 diff --git a/ability/ability_runtime/amsdisplayIdtest/actsamsstartabilityforresulttest/signature/openharmony_sx.p7b b/ability/ability_runtime/amsdisplayIdtest/actsamsstartabilityforresulttest/signature/openharmony_sx.p7b index dcec6c9615032c1b48bf185e839d9720dd68aab0..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100755 Binary files a/ability/ability_runtime/amsdisplayIdtest/actsamsstartabilityforresulttest/signature/openharmony_sx.p7b and b/ability/ability_runtime/amsdisplayIdtest/actsamsstartabilityforresulttest/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/amsdisplayIdtest/actsamsstartabilitytest/entry/src/main/module.json b/ability/ability_runtime/amsdisplayIdtest/actsamsstartabilitytest/entry/src/main/module.json index e9cec0d3ce4167df8f25b677adddeab3b2f34746..91e0f295d51d45919647fde79fc7fec97e7a6fbe 100644 --- a/ability/ability_runtime/amsdisplayIdtest/actsamsstartabilitytest/entry/src/main/module.json +++ b/ability/ability_runtime/amsdisplayIdtest/actsamsstartabilitytest/entry/src/main/module.json @@ -36,52 +36,20 @@ ], "requestPermissions": [ { - "name": "ohos.permission.GET_BUNDLE_INFO_PRIVILEGED", - "reason": "need use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED" + "name": "ohos.permission.CLEAN_BACKGROUND_PROCESSES", + "reason": "need use ohos.permission.GET_RUNNING_INFO" }, { "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.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_RUNNING_INFO", - "reason": "need use ohos.permission.GET_RUNNING_INFO" - }, - { - "name": "ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS", - "reason": "need use ohos.permission.GET_RUNNING_INFO" - }, - { - "name": "ohos.permission.CLEAN_BACKGROUND_PROCESSES", - "reason": "need use ohos.permission.GET_RUNNING_INFO" - }, - { - "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" } ] } diff --git a/ability/ability_runtime/amsdisplayIdtest/actsamsstartabilitytest/signature/openharmony_sx.p7b b/ability/ability_runtime/amsdisplayIdtest/actsamsstartabilitytest/signature/openharmony_sx.p7b index cc53179a48f88f20acc379c138a001e9a15838f6..a23cf3061c5fc7224e78cf63dac3ea0c5dbcb89a 100644 Binary files a/ability/ability_runtime/amsdisplayIdtest/actsamsstartabilitytest/signature/openharmony_sx.p7b and b/ability/ability_runtime/amsdisplayIdtest/actsamsstartabilitytest/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/amsgetabilityprocessinfo/actsgetabilityprocessinfotest/signature/openharmony_sx.p7b b/ability/ability_runtime/amsgetabilityprocessinfo/actsgetabilityprocessinfotest/signature/openharmony_sx.p7b index cc53179a48f88f20acc379c138a001e9a15838f6..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/amsgetabilityprocessinfo/actsgetabilityprocessinfotest/signature/openharmony_sx.p7b and b/ability/ability_runtime/amsgetabilityprocessinfo/actsgetabilityprocessinfotest/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/amsgetabilityprocessinfo/actsgetabilityprocessinfotest/src/main/config.json b/ability/ability_runtime/amsgetabilityprocessinfo/actsgetabilityprocessinfotest/src/main/config.json index 00e27273362039001770f95928fcbbfe3a0ac549..42e1d89efc2151191554cccc0f58b1df6e847f4a 100644 --- a/ability/ability_runtime/amsgetabilityprocessinfo/actsgetabilityprocessinfotest/src/main/config.json +++ b/ability/ability_runtime/amsgetabilityprocessinfo/actsgetabilityprocessinfotest/src/main/config.json @@ -64,49 +64,13 @@ } ], "reqPermissions": [ - { - "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.INTERACT_ACROSS_LOCAL_ACCOUNTS", - "reason": "need use ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS" + "name": "ohos.permission.GET_BUNDLE_INFO", + "reason": "need use ohos.permission.GET_BUNDLE_INFO" } ], "js": [ diff --git a/ability/ability_runtime/apicover/apicoverhaptest/entry/src/main/module.json b/ability/ability_runtime/apicover/apicoverhaptest/entry/src/main/module.json index 46ab4cde837a2e0651b70470330ecdb249f4baaa..19b8687bec1df25b4d70ada0186ee8df4034b5d0 100644 --- a/ability/ability_runtime/apicover/apicoverhaptest/entry/src/main/module.json +++ b/ability/ability_runtime/apicover/apicoverhaptest/entry/src/main/module.json @@ -93,23 +93,17 @@ } ], "requestPermissions":[ - { - "name":"ohos.permission.GET_RUNNING_INFO" - }, - { - "name":"ohos.permission.REQUIRE_FORM" - }, { "name":"ohos.permission.GET_BUNDLE_INFO_PRIVILEGED" }, { - "name":"ohos.permission.START_ABILITIES_FROM_BACKGROUND" + "name":"ohos.permission.REQUIRE_FORM" }, { - "name":"ohos.permission.START_INVISIBLE_ABILITY" + "name":"ohos.permission.UPDATE_CONFIGURATION" }, { - "name":"ohos.permission.UPDATE_CONFIGURATION" + "name":"ohos.permission.GET_RUNNING_INFO" } ] } diff --git a/ability/ability_runtime/apicover/apicoverhaptest/signature/openharmony_sx.p7b b/ability/ability_runtime/apicover/apicoverhaptest/signature/openharmony_sx.p7b index b9dd315b3ef5351f8bedf932f5800996a12e62f8..93681b820cc6a04124efd37f52d059c52813ede0 100644 Binary files a/ability/ability_runtime/apicover/apicoverhaptest/signature/openharmony_sx.p7b and b/ability/ability_runtime/apicover/apicoverhaptest/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/apicover/fasupplement/signature/openharmony_sx.p7b b/ability/ability_runtime/apicover/fasupplement/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/apicover/fasupplement/signature/openharmony_sx.p7b and b/ability/ability_runtime/apicover/fasupplement/signature/openharmony_sx.p7b differ diff --git "a/ability/ability_runtime/apicover/fasupplement/signature/openharmony_sx.p7b\357\200\272Zone.Identifier" "b/ability/ability_runtime/apicover/fasupplement/signature/openharmony_sx.p7b\357\200\272Zone.Identifier" deleted file mode 100644 index 8cc3e0336dc3005cc602d48b11fcbb742332e501..0000000000000000000000000000000000000000 --- "a/ability/ability_runtime/apicover/fasupplement/signature/openharmony_sx.p7b\357\200\272Zone.Identifier" +++ /dev/null @@ -1,4 +0,0 @@ -[ZoneTransfer] -ZoneId=0 -ReferrerUrl=vscode-file://vscode-app/d:/Software/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-browser/workbench/workbench.html -HostUrl=file:///d%3A/OpenHarmony/Xts/xts_acts-master/aafwk/aafwk_standard/newwant/actsnewwantbrelyhap/signature/openharmony_sx.p7b diff --git a/ability/ability_runtime/apicover/formmodule/signature/openharmony_sx.p7b b/ability/ability_runtime/apicover/formmodule/signature/openharmony_sx.p7b index cc53179a48f88f20acc379c138a001e9a15838f6..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/apicover/formmodule/signature/openharmony_sx.p7b and b/ability/ability_runtime/apicover/formmodule/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/apicover/stagesupplement/entry/src/main/module.json b/ability/ability_runtime/apicover/stagesupplement/entry/src/main/module.json index 8d334d9ad6bf7675c1f889de888bdc9449931b25..eb253a61403f14868bcdc9b0907a56e1dc9979f2 100644 --- a/ability/ability_runtime/apicover/stagesupplement/entry/src/main/module.json +++ b/ability/ability_runtime/apicover/stagesupplement/entry/src/main/module.json @@ -95,23 +95,8 @@ { "name": "ohos.permission.DISTRIBUTED_DATASYNC" }, - { - "name":"ohos.permission.GET_BUNDLE_INFO_PRIVILEGED" - }, { "name":"ohos.permission.GET_BUNDLE_INFO" - }, - { - "name":"ohos.permission.CHANGE_ABILITY_ENABLED_STATE" - }, - { - "name":"ohos.permission.REMOVE_CACHE_FILES" - }, - { - "name":"ohos.permission.LISTEN_BUNDLE_CHANGE" - }, - { - "name":"ohos.permission.INSTALL_BUNDLE" } ] } diff --git a/ability/ability_runtime/apicover/stagesupplement/signature/openharmony_sx.p7b b/ability/ability_runtime/apicover/stagesupplement/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/apicover/stagesupplement/signature/openharmony_sx.p7b and b/ability/ability_runtime/apicover/stagesupplement/signature/openharmony_sx.p7b differ diff --git "a/ability/ability_runtime/apicover/stagesupplement/signature/openharmony_sx.p7b\357\200\272Zone.Identifier" "b/ability/ability_runtime/apicover/stagesupplement/signature/openharmony_sx.p7b\357\200\272Zone.Identifier" deleted file mode 100644 index 8cc3e0336dc3005cc602d48b11fcbb742332e501..0000000000000000000000000000000000000000 --- "a/ability/ability_runtime/apicover/stagesupplement/signature/openharmony_sx.p7b\357\200\272Zone.Identifier" +++ /dev/null @@ -1,4 +0,0 @@ -[ZoneTransfer] -ZoneId=0 -ReferrerUrl=vscode-file://vscode-app/d:/Software/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-browser/workbench/workbench.html -HostUrl=file:///d%3A/OpenHarmony/Xts/xts_acts-master/aafwk/aafwk_standard/newwant/actsnewwantbrelyhap/signature/openharmony_sx.p7b diff --git a/ability/ability_runtime/apitest/entry/src/main/module.json b/ability/ability_runtime/apitest/entry/src/main/module.json index 9b742a8c4877be6645641d12e11a909d37fa7a3e..f8424d2ab518bdc9d411de3d3e354a1bcbd0bd9d 100644 --- a/ability/ability_runtime/apitest/entry/src/main/module.json +++ b/ability/ability_runtime/apitest/entry/src/main/module.json @@ -62,12 +62,6 @@ "icon": "$media:icon", "label": "$string:MainAbility5_label" } - ], - "requestPermissions": [ - { - "name":"ohos.permission.START_ABILITIES_FROM_BACKGROUND", - "reason":"need use ohos.permission.START_ABILITIES_FROM_BACKGROUND" - } ] } } \ No newline at end of file diff --git a/ability/ability_runtime/apitest/signature/openharmony_sx.p7b b/ability/ability_runtime/apitest/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/apitest/signature/openharmony_sx.p7b and b/ability/ability_runtime/apitest/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/context/actscontexttest/signature/openharmony_sx.p7b b/ability/ability_runtime/context/actscontexttest/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..f734753d7f60e545f4bd319b06ff920c8007a2ed 100644 Binary files a/ability/ability_runtime/context/actscontexttest/signature/openharmony_sx.p7b and b/ability/ability_runtime/context/actscontexttest/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/context/actscontexttest/src/main/config.json b/ability/ability_runtime/context/actscontexttest/src/main/config.json index 741cea60e7fe18bbc393170c350adb7413916cf0..e2dce214776e565e5ba66ed8e0c0101b50b2606b 100644 --- a/ability/ability_runtime/context/actscontexttest/src/main/config.json +++ b/ability/ability_runtime/context/actscontexttest/src/main/config.json @@ -20,50 +20,6 @@ "default", "tablet" ], - "reqPermissions": [ - { - "name": "com.example.permission", - "reason": "$string:permreason_example", - "usedScene": { - "ability": [ - "com.example.Ability", - "com.example.AbilityBackground" - ], - "when": "always" - } - }, - { - "name": "com.example.permission.user", - "reason": "$string:permreason_example", - "usedScene": { - "ability": [ - "com.example.Ability", - "com.example.AbilityBackground" - ], - "when": "always" - } - }, - { - "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" - } - ], "distro": { "deliveryWithInstall": true, "moduleName": "entry", @@ -129,6 +85,34 @@ } } ], + "reqPermissions": [ + { + "name": "com.example.permission", + "reason": "$string:permreason_example", + "usedScene": { + "ability": [ + "com.example.Ability", + "com.example.AbilityBackground" + ], + "when": "always" + } + }, + { + "name": "com.example.permission.user", + "reason": "$string:permreason_example", + "usedScene": { + "ability": [ + "com.example.Ability", + "com.example.AbilityBackground" + ], + "when": "always" + } + }, + { + "name": "ohos.permission.INSTALL_BUNDLE", + "reason": "need use ohos.permission.INSTALL_BUNDLE" + } + ], "testRunner": { "name": "OpenHarmonyTestRunner", "srcPath": "TestRunner" diff --git a/ability/ability_runtime/context/actscreatemodulecontextassist/signature/openharmony_sx.p7b b/ability/ability_runtime/context/actscreatemodulecontextassist/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/context/actscreatemodulecontextassist/signature/openharmony_sx.p7b and b/ability/ability_runtime/context/actscreatemodulecontextassist/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/context/actscreatemodulecontextassistone/signature/openharmony_sx.p7b b/ability/ability_runtime/context/actscreatemodulecontextassistone/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/context/actscreatemodulecontextassistone/signature/openharmony_sx.p7b and b/ability/ability_runtime/context/actscreatemodulecontextassistone/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/context/actscreatemodulecontexttest/signature/openharmony_sx.p7b b/ability/ability_runtime/context/actscreatemodulecontexttest/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/context/actscreatemodulecontexttest/signature/openharmony_sx.p7b and b/ability/ability_runtime/context/actscreatemodulecontexttest/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/context/scene/defpermission/signature/openharmony_sx.p7b b/ability/ability_runtime/context/scene/defpermission/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/context/scene/defpermission/signature/openharmony_sx.p7b and b/ability/ability_runtime/context/scene/defpermission/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/context/scene/defpermission/src/main/config.json b/ability/ability_runtime/context/scene/defpermission/src/main/config.json index 95936f7e246534cf178985282b7ff35b5c70cdf3..94be11c7cff8fa62b5a3207731c5254ae7f304e9 100644 --- a/ability/ability_runtime/context/scene/defpermission/src/main/config.json +++ b/ability/ability_runtime/context/scene/defpermission/src/main/config.json @@ -57,28 +57,6 @@ "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": [ { "pages": [ diff --git a/ability/ability_runtime/fa/faapplicationinfo/signature/openharmony_sx.p7b b/ability/ability_runtime/fa/faapplicationinfo/signature/openharmony_sx.p7b index bf893c5fa3f7c335b731c76c5ad1b45620889f25..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/fa/faapplicationinfo/signature/openharmony_sx.p7b and b/ability/ability_runtime/fa/faapplicationinfo/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/fa/faapplicationinfo/src/main/config.json b/ability/ability_runtime/fa/faapplicationinfo/src/main/config.json index a3363f956dbfddee7f0223413e36ad2bcaa5168a..2b7aad982e8aae3cad3ab2208ade10ff0d03ce59 100644 --- a/ability/ability_runtime/fa/faapplicationinfo/src/main/config.json +++ b/ability/ability_runtime/fa/faapplicationinfo/src/main/config.json @@ -113,12 +113,6 @@ "testRunner": { "name": "OpenHarmonyTestRunner", "srcPath": "TestRunner" - }, - "reqPermissions": [ - { - "name":"ohos.permission.START_ABILITIES_FROM_BACKGROUND", - "reason":"need use ohos.permission.START_ABILITIES_FROM_BACKGROUND" - } - ] + } } } \ No newline at end of file diff --git a/ability/ability_runtime/fa/faconfigurationconstant/signature/openharmony_sx.p7b b/ability/ability_runtime/fa/faconfigurationconstant/signature/openharmony_sx.p7b index bf893c5fa3f7c335b731c76c5ad1b45620889f25..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/fa/faconfigurationconstant/signature/openharmony_sx.p7b and b/ability/ability_runtime/fa/faconfigurationconstant/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/fa/faconfigurationconstant/src/main/config.json b/ability/ability_runtime/fa/faconfigurationconstant/src/main/config.json index d38b4b3b17b5576ca0b5386daab813e28901a05b..8048a7380cebe3ba6badbee9a003d5fd3274446c 100644 --- a/ability/ability_runtime/fa/faconfigurationconstant/src/main/config.json +++ b/ability/ability_runtime/fa/faconfigurationconstant/src/main/config.json @@ -70,10 +70,6 @@ { "name": "ohos.permission.GET_BUNDLE_INFO", "reason": "need use ohos.permission.INSTALL_BUNDLE" - }, - { - "name": "ohos.permission.UPDATE_CONFIGURATION", - "reason": "need use ohos.permission.INSTALL_BUNDLE" } ], "js": [ diff --git a/ability/ability_runtime/fa/facoverapi/signature/openharmony_sx.p7b b/ability/ability_runtime/fa/facoverapi/signature/openharmony_sx.p7b index bf893c5fa3f7c335b731c76c5ad1b45620889f25..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/fa/facoverapi/signature/openharmony_sx.p7b and b/ability/ability_runtime/fa/facoverapi/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/fa/faequeryabilitybywant/signature/openharmony_sx.p7b b/ability/ability_runtime/fa/faequeryabilitybywant/signature/openharmony_sx.p7b index bf893c5fa3f7c335b731c76c5ad1b45620889f25..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/fa/faequeryabilitybywant/signature/openharmony_sx.p7b and b/ability/ability_runtime/fa/faequeryabilitybywant/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/faapicover/faapicoverhaptest/signature/openharmony_sx.p7b b/ability/ability_runtime/faapicover/faapicoverhaptest/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/faapicover/faapicoverhaptest/signature/openharmony_sx.p7b and b/ability/ability_runtime/faapicover/faapicoverhaptest/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/faapicover/faauxiliary/signature/openharmony_sx.p7b b/ability/ability_runtime/faapicover/faauxiliary/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/faapicover/faauxiliary/signature/openharmony_sx.p7b and b/ability/ability_runtime/faapicover/faauxiliary/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/featureability/actsfeatureabilitytest/entry/src/main/config.json b/ability/ability_runtime/featureability/actsfeatureabilitytest/entry/src/main/config.json index 80b98c8353b6dd78a841fd9a65fde563035d4d02..5ad32798f57bfeb5b5742f29ef2d587f309bf926 100644 --- a/ability/ability_runtime/featureability/actsfeatureabilitytest/entry/src/main/config.json +++ b/ability/ability_runtime/featureability/actsfeatureabilitytest/entry/src/main/config.json @@ -96,36 +96,12 @@ "when": "always" } }, - { - "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.KEEP_BACKGROUND_RUNNING" - }, { "name": "ohos.permission.ACCELEROMETER", "reason":"need use ohos.permission.ACCELEROMETER" }, { - "name":"ohos.permission.START_ABILITIES_FROM_BACKGROUND", - "reason":"need use ohos.permission.START_ABILITIES_FROM_BACKGROUND" + "name": "ohos.permission.KEEP_BACKGROUND_RUNNING" } ], "js": [ diff --git a/ability/ability_runtime/featureability/actsfeatureabilitytest/signature/openharmony_sx.p7b b/ability/ability_runtime/featureability/actsfeatureabilitytest/signature/openharmony_sx.p7b index dcec6c9615032c1b48bf185e839d9720dd68aab0..78f51b405a07bc13f7afb19c68973821231c5110 100755 Binary files a/ability/ability_runtime/featureability/actsfeatureabilitytest/signature/openharmony_sx.p7b and b/ability/ability_runtime/featureability/actsfeatureabilitytest/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/featureability/sceneproject/finishwithresultemptytest/signature/openharmony_sx.p7b b/ability/ability_runtime/featureability/sceneproject/finishwithresultemptytest/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/featureability/sceneproject/finishwithresultemptytest/signature/openharmony_sx.p7b and b/ability/ability_runtime/featureability/sceneproject/finishwithresultemptytest/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/featureability/sceneproject/finishwithresultemptytest/src/main/config.json b/ability/ability_runtime/featureability/sceneproject/finishwithresultemptytest/src/main/config.json index 88794349a8c0da05f46e5664b3a673689b022cbf..f879d085087eab718aab7abf4489cf7f7e55b217 100644 --- a/ability/ability_runtime/featureability/sceneproject/finishwithresultemptytest/src/main/config.json +++ b/ability/ability_runtime/featureability/sceneproject/finishwithresultemptytest/src/main/config.json @@ -46,28 +46,6 @@ "visible": true } ], - "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": [ { "pages": [ diff --git a/ability/ability_runtime/featureability/sceneproject/finishwithresultpromiseparameterstest/signature/openharmony_sx.p7b b/ability/ability_runtime/featureability/sceneproject/finishwithresultpromiseparameterstest/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/featureability/sceneproject/finishwithresultpromiseparameterstest/signature/openharmony_sx.p7b and b/ability/ability_runtime/featureability/sceneproject/finishwithresultpromiseparameterstest/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/featureability/sceneproject/finishwithresultpromiseparameterstest/src/main/config.json b/ability/ability_runtime/featureability/sceneproject/finishwithresultpromiseparameterstest/src/main/config.json index 7c637d2f5e5c812e2ab4635eedf51e44b33bf5bf..a12f94fd27e4bbdfb20f8b4d21a9e259fe74343a 100644 --- a/ability/ability_runtime/featureability/sceneproject/finishwithresultpromiseparameterstest/src/main/config.json +++ b/ability/ability_runtime/featureability/sceneproject/finishwithresultpromiseparameterstest/src/main/config.json @@ -46,28 +46,6 @@ "visible": true } ], - "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": [ { "pages": [ diff --git a/ability/ability_runtime/featureability/sceneproject/finishwithresulttest/signature/openharmony_sx.p7b b/ability/ability_runtime/featureability/sceneproject/finishwithresulttest/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/featureability/sceneproject/finishwithresulttest/signature/openharmony_sx.p7b and b/ability/ability_runtime/featureability/sceneproject/finishwithresulttest/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/featureability/sceneproject/finishwithresulttest/src/main/config.json b/ability/ability_runtime/featureability/sceneproject/finishwithresulttest/src/main/config.json index ef2a012797f47a8567a3ebaedd9a6e340b9c10ec..403b292ad2c976c5d9bf150c600d19b5eb774f55 100644 --- a/ability/ability_runtime/featureability/sceneproject/finishwithresulttest/src/main/config.json +++ b/ability/ability_runtime/featureability/sceneproject/finishwithresulttest/src/main/config.json @@ -46,28 +46,6 @@ "visible": true } ], - "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": [ { "pages": [ diff --git a/ability/ability_runtime/featureability/sceneproject/getcallingbundletest/signature/openharmony_sx.p7b b/ability/ability_runtime/featureability/sceneproject/getcallingbundletest/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/featureability/sceneproject/getcallingbundletest/signature/openharmony_sx.p7b and b/ability/ability_runtime/featureability/sceneproject/getcallingbundletest/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/featureability/sceneproject/getcallingbundletest/src/main/config.json b/ability/ability_runtime/featureability/sceneproject/getcallingbundletest/src/main/config.json index 21aef3ece6b04d99cbb92e4f971672bcecfd321f..0ad4c8a31367c6acb77a4ed4a2dc9e95880d7c74 100644 --- a/ability/ability_runtime/featureability/sceneproject/getcallingbundletest/src/main/config.json +++ b/ability/ability_runtime/featureability/sceneproject/getcallingbundletest/src/main/config.json @@ -46,28 +46,6 @@ "visible": true } ], - "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": [ { "pages": [ diff --git a/ability/ability_runtime/featureability/sceneproject/startability/signature/openharmony_sx.p7b b/ability/ability_runtime/featureability/sceneproject/startability/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/featureability/sceneproject/startability/signature/openharmony_sx.p7b and b/ability/ability_runtime/featureability/sceneproject/startability/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/featureability/sceneproject/startability/src/main/config.json b/ability/ability_runtime/featureability/sceneproject/startability/src/main/config.json index 62e84e0504be4b9ca0e0946f8de4cac830b7e5b5..cfde86d61d1a283c7e1770b5b16f925e26fd6737 100644 --- a/ability/ability_runtime/featureability/sceneproject/startability/src/main/config.json +++ b/ability/ability_runtime/featureability/sceneproject/startability/src/main/config.json @@ -46,28 +46,6 @@ "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": [ { "pages": [ diff --git a/ability/ability_runtime/featureability/sceneproject/startabilityforresult/signature/openharmony_sx.p7b b/ability/ability_runtime/featureability/sceneproject/startabilityforresult/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/featureability/sceneproject/startabilityforresult/signature/openharmony_sx.p7b and b/ability/ability_runtime/featureability/sceneproject/startabilityforresult/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/featureability/sceneproject/startabilityforresult/src/main/config.json b/ability/ability_runtime/featureability/sceneproject/startabilityforresult/src/main/config.json index 8376433b3c621a86ede6046c650635f1b0be493e..7d34eed5abf4e571e66fcd6d58d1fd345c23f9d2 100644 --- a/ability/ability_runtime/featureability/sceneproject/startabilityforresult/src/main/config.json +++ b/ability/ability_runtime/featureability/sceneproject/startabilityforresult/src/main/config.json @@ -46,28 +46,6 @@ "visible": true } ], - "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": [ { "pages": [ diff --git a/ability/ability_runtime/featureability/sceneproject/terminateabilitytest/signature/openharmony_sx.p7b b/ability/ability_runtime/featureability/sceneproject/terminateabilitytest/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/featureability/sceneproject/terminateabilitytest/signature/openharmony_sx.p7b and b/ability/ability_runtime/featureability/sceneproject/terminateabilitytest/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/featureability/sceneproject/terminateabilitytest/src/main/config.json b/ability/ability_runtime/featureability/sceneproject/terminateabilitytest/src/main/config.json index b4dddcc5b326d2d52409a77d46f48841a661f0bc..1a8bc36d18f62465c55396ad923375cf3951a206 100644 --- a/ability/ability_runtime/featureability/sceneproject/terminateabilitytest/src/main/config.json +++ b/ability/ability_runtime/featureability/sceneproject/terminateabilitytest/src/main/config.json @@ -46,28 +46,6 @@ "visible": true } ], - "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": [ { "pages": [ diff --git a/ability/ability_runtime/formmanager/fa/BUILD.gn b/ability/ability_runtime/formmanager/fa/BUILD.gn index 0699c1a18b2b6509656d5ee15a39f990b7a1710d..6c2a65e371a61e8f807f55baffbca1f07d93415c 100644 --- a/ability/ability_runtime/formmanager/fa/BUILD.gn +++ b/ability/ability_runtime/formmanager/fa/BUILD.gn @@ -56,8 +56,6 @@ group("formmanager") { "formsystemtest_ets/formgetformsinfotest/formswithoutpermtest:ActsFormsWithoutPermTest", "formsystemtest_ets/formgetformsinfotest/formszerotest:ActsFormsZeroTest", "formsystemtest_ets/formhostdeathrecipienttest:ActsFormHostDeathRecipientTest", - - #"formsystemtest_ets/formperformancetest:ActsFormPerformanceTest", "formsystemtest_ets/formreleasetest:ActsFormReleaseTest", "formsystemtest_ets/formstatetest_disable:ActsFormStateDisableTest", "formsystemtest_ets/formstatetest_enable:ActsFormStateEnableTest", diff --git a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhost/entry/src/main/config.json b/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhost/entry/src/main/config.json index 76e21298adea828d50f6e4e8879b8d46e607c004..228e20391e05bd48b9b5ea7d2d8d2769e775096f 100644 --- a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhost/entry/src/main/config.json +++ b/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhost/entry/src/main/config.json @@ -109,16 +109,10 @@ "name": "FMS_FormOnUninstall_commonEvent" }, { - "name": "ohos.permission.GET_BUNDLE_INFO_PRIVILEGED" + "name": "ohos.permission.GET_BUNDLE_INFO_PRIVILEGED" }, { - "name": "ohos.permission.INSTALL_BUNDLE" - }, - { - "name": "ohos.permission.LISTEN_BUNDLE_CHANGE" - }, - { - "name": "ohos.permission.REQUIRE_FORM" + "name": "ohos.permission.REQUIRE_FORM" } ] } diff --git a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhost/signature/openharmony_sx.p7b b/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhost/signature/openharmony_sx.p7b index 6084de2e92d6f254a93a654b02701870bef66d31..c2121a99a6ba56a263236887865086a07f0b433e 100644 Binary files a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhost/signature/openharmony_sx.p7b and b/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhost/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostb/entry/src/main/config.json b/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostb/entry/src/main/config.json index 81f73d20cc4e7dfe0dffe7620af246be92ab671a..7ed65dc299a70d93dbfc36e1b7583d908f72d361 100644 --- a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostb/entry/src/main/config.json +++ b/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostb/entry/src/main/config.json @@ -95,16 +95,10 @@ "reason": "need use delete commonEvent" }, { - "name": "ohos.permission.GET_BUNDLE_INFO_PRIVILEGED" + "name": "ohos.permission.GET_BUNDLE_INFO_PRIVILEGED" }, { - "name": "ohos.permission.INSTALL_BUNDLE" - }, - { - "name": "ohos.permission.LISTEN_BUNDLE_CHANGE" - }, - { - "name": "ohos.permission.REQUIRE_FORM" + "name": "ohos.permission.REQUIRE_FORM" } ] } diff --git a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostb/signature/openharmony_sx.p7b b/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostb/signature/openharmony_sx.p7b index 6084de2e92d6f254a93a654b02701870bef66d31..c2121a99a6ba56a263236887865086a07f0b433e 100644 Binary files a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostb/signature/openharmony_sx.p7b and b/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostb/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostc/entry/src/main/config.json b/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostc/entry/src/main/config.json index 926bb488a0bedaaeec46739a95112267c23f28b4..255395e21918d5f498088e1c2fae6018ed4eb29a 100644 --- a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostc/entry/src/main/config.json +++ b/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostc/entry/src/main/config.json @@ -125,16 +125,10 @@ "name": "FMS_TimeChange_commonEvent" }, { - "name": "ohos.permission.GET_BUNDLE_INFO_PRIVILEGED" + "name": "ohos.permission.GET_BUNDLE_INFO_PRIVILEGED" }, { - "name": "ohos.permission.INSTALL_BUNDLE" - }, - { - "name": "ohos.permission.LISTEN_BUNDLE_CHANGE" - }, - { - "name": "ohos.permission.REQUIRE_FORM" + "name": "ohos.permission.REQUIRE_FORM" } ] } diff --git a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostc/signature/openharmony_sx.p7b b/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostc/signature/openharmony_sx.p7b index 6084de2e92d6f254a93a654b02701870bef66d31..c2121a99a6ba56a263236887865086a07f0b433e 100644 Binary files a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostc/signature/openharmony_sx.p7b and b/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostc/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostd/entry/src/main/config.json b/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostd/entry/src/main/config.json index 15183c4f4d492ce6bd5983db482bf7b37e59dcd9..c7b4447852bc8c4e79ef4b5f6559b70f784d0778 100644 --- a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostd/entry/src/main/config.json +++ b/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostd/entry/src/main/config.json @@ -109,16 +109,10 @@ "name": "FMS_FormOnReleased_commonEvent" }, { - "name": "ohos.permission.GET_BUNDLE_INFO_PRIVILEGED" + "name": "ohos.permission.GET_BUNDLE_INFO_PRIVILEGED" }, { - "name": "ohos.permission.INSTALL_BUNDLE" - }, - { - "name": "ohos.permission.LISTEN_BUNDLE_CHANGE" - }, - { - "name": "ohos.permission.REQUIRE_FORM" + "name": "ohos.permission.REQUIRE_FORM" } ] } diff --git a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostd/signature/openharmony_sx.p7b b/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostd/signature/openharmony_sx.p7b index 6084de2e92d6f254a93a654b02701870bef66d31..c2121a99a6ba56a263236887865086a07f0b433e 100644 Binary files a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostd/signature/openharmony_sx.p7b and b/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostd/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhoste/entry/src/main/config.json b/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhoste/entry/src/main/config.json index 49efde4af4354574070bf6dba59457ccc27e0291..eb28d6b0c9bfdf3e1888bae1f1bbfc47ef0b52ea 100644 --- a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhoste/entry/src/main/config.json +++ b/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhoste/entry/src/main/config.json @@ -125,16 +125,10 @@ "name": "FMS_FormOnRequest_commonEvent" }, { - "name": "ohos.permission.GET_BUNDLE_INFO_PRIVILEGED" + "name": "ohos.permission.GET_BUNDLE_INFO_PRIVILEGED" }, { - "name": "ohos.permission.INSTALL_BUNDLE" - }, - { - "name": "ohos.permission.LISTEN_BUNDLE_CHANGE" - }, - { - "name": "ohos.permission.REQUIRE_FORM" + "name": "ohos.permission.REQUIRE_FORM" } ] } diff --git a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhoste/signature/openharmony_sx.p7b b/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhoste/signature/openharmony_sx.p7b index 6084de2e92d6f254a93a654b02701870bef66d31..c2121a99a6ba56a263236887865086a07f0b433e 100644 Binary files a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhoste/signature/openharmony_sx.p7b and b/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhoste/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostf/entry/src/main/config.json b/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostf/entry/src/main/config.json index 544ee563b20861fbde1fc3dd44ca6d5eb5bd8c4b..42efd181314adcdcdd238ee606903b8f6ab5088c 100644 --- a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostf/entry/src/main/config.json +++ b/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostf/entry/src/main/config.json @@ -117,16 +117,10 @@ "name": "FMS_FormUpdateRefresh_commonEvent" }, { - "name": "ohos.permission.GET_BUNDLE_INFO_PRIVILEGED" + "name": "ohos.permission.GET_BUNDLE_INFO_PRIVILEGED" }, { - "name": "ohos.permission.INSTALL_BUNDLE" - }, - { - "name": "ohos.permission.LISTEN_BUNDLE_CHANGE" - }, - { - "name": "ohos.permission.REQUIRE_FORM" + "name": "ohos.permission.REQUIRE_FORM" } ] } diff --git a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostf/signature/openharmony_sx.p7b b/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostf/signature/openharmony_sx.p7b index 6084de2e92d6f254a93a654b02701870bef66d31..c2121a99a6ba56a263236887865086a07f0b433e 100644 Binary files a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostf/signature/openharmony_sx.p7b and b/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostf/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostg/entry/src/main/config.json b/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostg/entry/src/main/config.json index 086230718c0e8cc777141e1df7923cd83e61f103..c75a3ab41560f8b91feaec4d4243300cddfe0635 100644 --- a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostg/entry/src/main/config.json +++ b/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostg/entry/src/main/config.json @@ -109,16 +109,10 @@ "name": "FMS_FormOnState_commonEvent" }, { - "name": "ohos.permission.GET_BUNDLE_INFO_PRIVILEGED" + "name": "ohos.permission.GET_BUNDLE_INFO_PRIVILEGED" }, { - "name": "ohos.permission.INSTALL_BUNDLE" - }, - { - "name": "ohos.permission.LISTEN_BUNDLE_CHANGE" - }, - { - "name": "ohos.permission.REQUIRE_FORM" + "name": "ohos.permission.REQUIRE_FORM" } ] } diff --git a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostg/signature/openharmony_sx.p7b b/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostg/signature/openharmony_sx.p7b index 6084de2e92d6f254a93a654b02701870bef66d31..c2121a99a6ba56a263236887865086a07f0b433e 100644 Binary files a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostg/signature/openharmony_sx.p7b and b/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostg/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhosti/entry/src/main/config.json b/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhosti/entry/src/main/config.json index 4a55333f4e0d1ca8b8cb2f4739d6997f54e655a5..d1d020553ebd306ada12ad82c91d7ad2a747f42b 100644 --- a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhosti/entry/src/main/config.json +++ b/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhosti/entry/src/main/config.json @@ -109,16 +109,10 @@ "name": "FMS_FormOnState_commonEvent" }, { - "name": "ohos.permission.GET_BUNDLE_INFO_PRIVILEGED" + "name": "ohos.permission.GET_BUNDLE_INFO_PRIVILEGED" }, { - "name": "ohos.permission.INSTALL_BUNDLE" - }, - { - "name": "ohos.permission.LISTEN_BUNDLE_CHANGE" - }, - { - "name": "ohos.permission.REQUIRE_FORM" + "name": "ohos.permission.REQUIRE_FORM" } ] } diff --git a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhosti/signature/openharmony_sx.p7b b/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhosti/signature/openharmony_sx.p7b index 6084de2e92d6f254a93a654b02701870bef66d31..c2121a99a6ba56a263236887865086a07f0b433e 100644 Binary files a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhosti/signature/openharmony_sx.p7b and b/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhosti/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostj/entry/src/main/config.json b/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostj/entry/src/main/config.json index 3e4ff9ae6d8663d0f497015c63135654859198e3..859e203a42f00da21e1a83ba87f2cd1b103d9798 100644 --- a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostj/entry/src/main/config.json +++ b/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostj/entry/src/main/config.json @@ -101,16 +101,10 @@ "name": "FMS_FormCast_commonEvent" }, { - "name": "ohos.permission.GET_BUNDLE_INFO_PRIVILEGED" + "name": "ohos.permission.GET_BUNDLE_INFO_PRIVILEGED" }, { - "name": "ohos.permission.INSTALL_BUNDLE" - }, - { - "name": "ohos.permission.LISTEN_BUNDLE_CHANGE" - }, - { - "name": "ohos.permission.REQUIRE_FORM" + "name": "ohos.permission.REQUIRE_FORM" } ] } diff --git a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostj/signature/openharmony_sx.p7b b/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostj/signature/openharmony_sx.p7b index 6084de2e92d6f254a93a654b02701870bef66d31..c2121a99a6ba56a263236887865086a07f0b433e 100644 Binary files a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostj/signature/openharmony_sx.p7b and b/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostj/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostk/entry/src/main/config.json b/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostk/entry/src/main/config.json index 6337e4308963f2cc5568f6ccb87378a20dd889bc..17716d842f2d47d8dc54aa71a47835758f8d9118 100644 --- a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostk/entry/src/main/config.json +++ b/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostk/entry/src/main/config.json @@ -127,17 +127,8 @@ { "name": "ohos.permission.GET_BUNDLE_INFO_PRIVILEGED" }, - { - "name": "ohos.permission.INSTALL_BUNDLE" - }, - { - "name": "ohos.permission.LISTEN_BUNDLE_CHANGE" - }, { "name": "ohos.permission.REQUIRE_FORM" - }, - { - "name": "fms.time_speed" } ] } diff --git a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostk/signature/openharmony_sx.p7b b/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostk/signature/openharmony_sx.p7b index 6084de2e92d6f254a93a654b02701870bef66d31..c2121a99a6ba56a263236887865086a07f0b433e 100644 Binary files a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostk/signature/openharmony_sx.p7b and b/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostk/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostl/entry/src/main/config.json b/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostl/entry/src/main/config.json index b635b0650e0ccbbdc500c751f34cb4dabe16278e..4af2e4711b129fa1f68dd9bf79e571e1451b968f 100644 --- a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostl/entry/src/main/config.json +++ b/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostl/entry/src/main/config.json @@ -105,12 +105,6 @@ { "name": "ohos.permission.GET_BUNDLE_INFO_PRIVILEGED" }, - { - "name": "ohos.permission.INSTALL_BUNDLE" - }, - { - "name": "ohos.permission.LISTEN_BUNDLE_CHANGE" - }, { "name": "ohos.permission.REQUIRE_FORM" } diff --git a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostl/signature/openharmony_sx.p7b b/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostl/signature/openharmony_sx.p7b index 6084de2e92d6f254a93a654b02701870bef66d31..c2121a99a6ba56a263236887865086a07f0b433e 100644 Binary files a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostl/signature/openharmony_sx.p7b and b/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostl/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostn/entry/src/main/config.json b/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostn/entry/src/main/config.json index 55ed9cba192576fb5631019acaedb9f63903cb73..4ce73d53d100bd0b73bd5f6bce396bd43781d53f 100644 --- a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostn/entry/src/main/config.json +++ b/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostn/entry/src/main/config.json @@ -111,12 +111,6 @@ { "name": "ohos.permission.GET_BUNDLE_INFO_PRIVILEGED" }, - { - "name": "ohos.permission.INSTALL_BUNDLE" - }, - { - "name": "ohos.permission.LISTEN_BUNDLE_CHANGE" - }, { "name": "ohos.permission.REQUIRE_FORM" } diff --git a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostn/signature/openharmony_sx.p7b b/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostn/signature/openharmony_sx.p7b index 6084de2e92d6f254a93a654b02701870bef66d31..c2121a99a6ba56a263236887865086a07f0b433e 100644 Binary files a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostn/signature/openharmony_sx.p7b and b/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostn/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostnoperm/entry/src/main/config.json b/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostnoperm/entry/src/main/config.json index e67adf8cb54e61f61c5b6a4db6eddd0721bbfed1..a89edf015e41fcb310f725b76e73f949fc2dfe03 100644 --- a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostnoperm/entry/src/main/config.json +++ b/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostnoperm/entry/src/main/config.json @@ -125,13 +125,7 @@ "name": "FMS_FormOnState_commonEvent" }, { - "name": "ohos.permission.GET_BUNDLE_INFO_PRIVILEGED" - }, - { - "name": "ohos.permission.INSTALL_BUNDLE" - }, - { - "name": "ohos.permission.LISTEN_BUNDLE_CHANGE" + "name": "ohos.permission.GET_BUNDLE_INFO_PRIVILEGED" } ] } diff --git a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostnoperm/signature/openharmony_sx.p7b b/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostnoperm/signature/openharmony_sx.p7b index 6084de2e92d6f254a93a654b02701870bef66d31..c2121a99a6ba56a263236887865086a07f0b433e 100644 Binary files a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostnoperm/signature/openharmony_sx.p7b and b/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostnoperm/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhosto/entry/src/main/config.json b/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhosto/entry/src/main/config.json index 67504cc82dbe8baf775ef15d63aa7a034a1593e6..4ffdb1a3efe9d268b7d8dcc8c456d6a9b659dd0e 100644 --- a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhosto/entry/src/main/config.json +++ b/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhosto/entry/src/main/config.json @@ -111,12 +111,6 @@ { "name": "ohos.permission.GET_BUNDLE_INFO_PRIVILEGED" }, - { - "name": "ohos.permission.INSTALL_BUNDLE" - }, - { - "name": "ohos.permission.LISTEN_BUNDLE_CHANGE" - }, { "name": "ohos.permission.REQUIRE_FORM" } diff --git a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhosto/signature/openharmony_sx.p7b b/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhosto/signature/openharmony_sx.p7b index 6084de2e92d6f254a93a654b02701870bef66d31..c2121a99a6ba56a263236887865086a07f0b433e 100644 Binary files a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhosto/signature/openharmony_sx.p7b and b/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhosto/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostp/entry/src/main/config.json b/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostp/entry/src/main/config.json index 38a43d76fff819c6ca7a0eb95f0fe8583a4e705d..d1da5206f432c544d7f409e16c3fac90139af4a1 100644 --- a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostp/entry/src/main/config.json +++ b/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostp/entry/src/main/config.json @@ -111,12 +111,6 @@ { "name": "ohos.permission.GET_BUNDLE_INFO_PRIVILEGED" }, - { - "name": "ohos.permission.INSTALL_BUNDLE" - }, - { - "name": "ohos.permission.LISTEN_BUNDLE_CHANGE" - }, { "name": "ohos.permission.REQUIRE_FORM" } diff --git a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostp/signature/openharmony_sx.p7b b/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostp/signature/openharmony_sx.p7b index 6084de2e92d6f254a93a654b02701870bef66d31..c2121a99a6ba56a263236887865086a07f0b433e 100644 Binary files a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostp/signature/openharmony_sx.p7b and b/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostp/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsupplyapplicationA/signature/openharmony_sx.p7b b/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsupplyapplicationA/signature/openharmony_sx.p7b index 6084de2e92d6f254a93a654b02701870bef66d31..c2121a99a6ba56a263236887865086a07f0b433e 100644 Binary files a/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsupplyapplicationA/signature/openharmony_sx.p7b and b/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsupplyapplicationA/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsupplyapplicationB/signature/openharmony_sx.p7b b/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsupplyapplicationB/signature/openharmony_sx.p7b index 6084de2e92d6f254a93a654b02701870bef66d31..c2121a99a6ba56a263236887865086a07f0b433e 100644 Binary files a/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsupplyapplicationB/signature/openharmony_sx.p7b and b/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsupplyapplicationB/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsupplyapplicationC/signature/openharmony_sx.p7b b/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsupplyapplicationC/signature/openharmony_sx.p7b index 6084de2e92d6f254a93a654b02701870bef66d31..c2121a99a6ba56a263236887865086a07f0b433e 100644 Binary files a/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsupplyapplicationC/signature/openharmony_sx.p7b and b/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsupplyapplicationC/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsupplyapplicationD/signature/openharmony_sx.p7b b/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsupplyapplicationD/signature/openharmony_sx.p7b index 6084de2e92d6f254a93a654b02701870bef66d31..c2121a99a6ba56a263236887865086a07f0b433e 100644 Binary files a/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsupplyapplicationD/signature/openharmony_sx.p7b and b/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsupplyapplicationD/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsupplyapplicationE/signature/openharmony_sx.p7b b/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsupplyapplicationE/signature/openharmony_sx.p7b index 6084de2e92d6f254a93a654b02701870bef66d31..c2121a99a6ba56a263236887865086a07f0b433e 100644 Binary files a/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsupplyapplicationE/signature/openharmony_sx.p7b and b/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsupplyapplicationE/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsupplyapplicationF/signature/openharmony_sx.p7b b/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsupplyapplicationF/signature/openharmony_sx.p7b index 6084de2e92d6f254a93a654b02701870bef66d31..c2121a99a6ba56a263236887865086a07f0b433e 100644 Binary files a/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsupplyapplicationF/signature/openharmony_sx.p7b and b/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsupplyapplicationF/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsupplyapplicationG/signature/openharmony_sx.p7b b/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsupplyapplicationG/signature/openharmony_sx.p7b index 6084de2e92d6f254a93a654b02701870bef66d31..c2121a99a6ba56a263236887865086a07f0b433e 100644 Binary files a/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsupplyapplicationG/signature/openharmony_sx.p7b and b/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsupplyapplicationG/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsupplyapplicationH/signature/openharmony_sx.p7b b/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsupplyapplicationH/signature/openharmony_sx.p7b index 6084de2e92d6f254a93a654b02701870bef66d31..c2121a99a6ba56a263236887865086a07f0b433e 100644 Binary files a/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsupplyapplicationH/signature/openharmony_sx.p7b and b/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsupplyapplicationH/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsupplyapplicationNotSysApp/signature/openharmony_sx.p7b b/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsupplyapplicationNotSysApp/signature/openharmony_sx.p7b index f06e218defa7f707e22a3890903c574e1c498217..f4763b8f0c7a307a26276bf7b8d180c90664a08c 100644 Binary files a/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsupplyapplicationNotSysApp/signature/openharmony_sx.p7b and b/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsupplyapplicationNotSysApp/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsystemprovidera/entry/src/main/config.json b/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsystemprovidera/entry/src/main/config.json index d653ef457330819b0c387fea7f561f4af5426f61..852b66569928964a7c454360e5c390ca3fc42ee0 100644 --- a/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsystemprovidera/entry/src/main/config.json +++ b/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsystemprovidera/entry/src/main/config.json @@ -129,26 +129,10 @@ "name": "FMS_FormDelete_commonEvent", "reason": "need use delete commonEvent" }, - { - "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" diff --git a/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsystemprovidera/signature/openharmony_sx.p7b b/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsystemprovidera/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..c2121a99a6ba56a263236887865086a07f0b433e 100644 Binary files a/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsystemprovidera/signature/openharmony_sx.p7b and b/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsystemprovidera/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsystemproviderb/entry/src/main/config.json b/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsystemproviderb/entry/src/main/config.json index 3f93a6356eac910466c14d271337c17f4ddfde40..d0a94ba4767141c6df057f0e176a467daf4c3884 100644 --- a/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsystemproviderb/entry/src/main/config.json +++ b/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsystemproviderb/entry/src/main/config.json @@ -100,26 +100,10 @@ "name": "FMS_FormDelete_commonEvent", "reason": "need use delete commonEvent" }, - { - "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" diff --git a/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsystemproviderb/signature/openharmony_sx.p7b b/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsystemproviderb/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..c2121a99a6ba56a263236887865086a07f0b433e 100644 Binary files a/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsystemproviderb/signature/openharmony_sx.p7b and b/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsystemproviderb/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsystemproviderc/entry/src/main/config.json b/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsystemproviderc/entry/src/main/config.json index 5d74bc64177f230331632635e0e45b13e9389678..5ffb727e2d90fb97ec35c1e84cb3c29336f4fee8 100644 --- a/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsystemproviderc/entry/src/main/config.json +++ b/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsystemproviderc/entry/src/main/config.json @@ -100,26 +100,10 @@ "name": "FMS_FormDelete_commonEvent", "reason": "need use delete commonEvent" }, - { - "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" diff --git a/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsystemproviderc/signature/openharmony_sx.p7b b/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsystemproviderc/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..c2121a99a6ba56a263236887865086a07f0b433e 100644 Binary files a/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsystemproviderc/signature/openharmony_sx.p7b and b/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsystemproviderc/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsystemproviderd/entry/src/main/config.json b/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsystemproviderd/entry/src/main/config.json index ea5165225b5d96cb65087a61c6722fac650a7be5..bca81aa5aaf7395879b25b3b2327259d5ddd56f2 100644 --- a/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsystemproviderd/entry/src/main/config.json +++ b/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsystemproviderd/entry/src/main/config.json @@ -72,26 +72,10 @@ "name": "FMS_FormDelete_commonEvent", "reason": "need use delete commonEvent" }, - { - "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" diff --git a/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsystemproviderd/signature/openharmony_sx.p7b b/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsystemproviderd/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..c2121a99a6ba56a263236887865086a07f0b433e 100644 Binary files a/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsystemproviderd/signature/openharmony_sx.p7b and b/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsystemproviderd/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formacquiretest/entry/src/main/config.json b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formacquiretest/entry/src/main/config.json index 08d7580d2f98335dc9e1bc2f5090b051ca8c8ce9..7867a7fafa5080db314f160d7b4a3d30d5961f23 100644 --- a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formacquiretest/entry/src/main/config.json +++ b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formacquiretest/entry/src/main/config.json @@ -111,33 +111,13 @@ "name": "FMS_FormSupply_commonEvent", "reason": "need use FormSupply commonEvent" }, - { - "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.START_ABILITIES_FROM_BACKGROUND", - "reason":"need use ohos.permission.START_ABILITIES_FROM_BACKGROUND" } ], "js": [ diff --git a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formacquiretest/signature/openharmony_sx.p7b b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formacquiretest/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..c2121a99a6ba56a263236887865086a07f0b433e 100644 Binary files a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formacquiretest/signature/openharmony_sx.p7b and b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formacquiretest/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formacquiretest2/entry/src/main/config.json b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formacquiretest2/entry/src/main/config.json index 808d9b25254e2f369a90d24f47162d8e92d1a42d..ceb6a59ad5d5da72515fc9a22a165f6b5f4f3d3d 100644 --- a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formacquiretest2/entry/src/main/config.json +++ b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formacquiretest2/entry/src/main/config.json @@ -110,33 +110,13 @@ "name": "FMS_FormSupply_commonEvent", "reason": "need use FormSupply commonEvent" }, - { - "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.START_ABILITIES_FROM_BACKGROUND", - "reason":"need use ohos.permission.START_ABILITIES_FROM_BACKGROUND" } ], "js": [ diff --git a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formacquiretest2/signature/openharmony_sx.p7b b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formacquiretest2/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..c2121a99a6ba56a263236887865086a07f0b433e 100644 Binary files a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formacquiretest2/signature/openharmony_sx.p7b and b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formacquiretest2/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formdeletetest/entry/src/main/config.json b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formdeletetest/entry/src/main/config.json index b36d8d175530495fef4c850823f5775a82f34935..6f1f258faa20284f857ad5dbf3567532e3ac040a 100644 --- a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formdeletetest/entry/src/main/config.json +++ b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formdeletetest/entry/src/main/config.json @@ -128,37 +128,13 @@ "name": "FMS_FormSupply_commonEvent", "reason": "need use FormSupply commonEvent" }, - { - "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.SET_TIME", - "reason": "need use ohos.permission.SET_TIME" - }, - { - "name":"ohos.permission.START_ABILITIES_FROM_BACKGROUND", - "reason":"need use ohos.permission.START_ABILITIES_FROM_BACKGROUND" } ], "js": [ diff --git a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formdeletetest/entry/src/main/ets/test/FmsDeleteForm.test.ets b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formdeletetest/entry/src/main/ets/test/FmsDeleteForm.test.ets index 571dae6c823b69f26ede9459bf498d55dbcc6957..81e94e1611ecbfa0e93de65a1061d3162116c644 100644 --- a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formdeletetest/entry/src/main/ets/test/FmsDeleteForm.test.ets +++ b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formdeletetest/entry/src/main/ets/test/FmsDeleteForm.test.ets @@ -601,155 +601,6 @@ export default function test() { console.info(`${tcNumber} featureAbility.startAbility end`); }); - /** - * @tc.number: FMS_deleteForm_0700_1 - * @tc.name: After deleting a normal form, the form reference is 0. - * After deleting a form, there are still created normal forms in FMS. - * @tc.desc: 1.host A an host B create one normal card respectively - * 2.host A delete the form and verify the result is true - */ - it(`FMS_deleteForm_0700_1`, 0, async (done) => { - const tcNumber = `FMS_deleteForm_0700_1`; - let currentTime = new Date().getTime() - let formId; - let formIdB; - let supplyFlag = false; - let supplyFlagUpdate = false; - - // timer speed up - commonEvent.publish(`fms.time_speed`, { code: 900 }, () => { - console.info(`${tcNumber} time speed up`); - }); - await changeTime(10, 29, 55); - - async function delPublishCallback() { - console.info(`${tcNumber} delPublishCallback`); - await sleep(5000); - commonEvent.unsubscribe(subscriberSupply, () => unsubscribeSupplyCallback(tcNumber)); - if (supplyFlag && supplyFlagUpdate) { - deleteFormB(); - } else { - deleteFormB(); - expect().assertFail(); - } - console.info(`${tcNumber} delPublishCallback end`); - } - - async function delPublishCallbackB() { - console.info(`${tcNumber} delPublishCallbackB`); - console.info(`${tcNumber} delPublishCallbackB end`); - console.info(`${tcNumber} end`); - await systemTime.setTime(currentTime).then((data)=>{ - console.info(`${tcNumber} setTime ${JSON.stringify(data)}`); - done(); - }).catch((error)=>{ - console.info(`${tcNumber} setTime ${JSON.stringify(error)}`); - done(); - }) - } - - async function deleteFormB() { - console.info(`${tcNumber} deleteFormB start`); - // timer speed reset - commonEvent.publish(`fms.time_speed`, { code: 1 }, () => { - console.info(`${tcNumber} time speed up`); - }); - await sleep(1000); - const commonEventPublishData = { - bundleName: "com.ohos.st.formsystemhostc", - data: formIdB - }; - commonEvent.publish(deleteForm_Event, commonEventPublishData, delPublishCallbackB); - console.info(`${tcNumber} deleteFormB end`); - } - - const onAcquiredCallbackB = async (_, data) => { - console.info(`${tcNumber} onAcquiredCallbackB data: ${JSON.stringify(data)}`); - expect(data.event).assertEqual(`FMS_FormOnAcquired_commonEvent`); - formIdB = data.data; - commonEvent.unsubscribe(subscriberOnAcquired, () => unsubscribeOnAcquiredCallback(tcNumber)); - const commonEventPublishData = { - bundleName: "com.ohos.st.formsystemhostd", - data: formId - }; - commonEvent.publish(deleteForm_Event, commonEventPublishData, delPublishCallback); - }; - - const onAcquiredCallback = async (_, data) => { - console.info(`${tcNumber} onAcquiredCallback data: ${JSON.stringify(data)}`); - expect(data.event).assertEqual(`FMS_FormOnAcquired_commonEvent`); - commonEvent.unsubscribe(subscriberOnAcquired, () => unsubscribeOnAcquiredCallback(tcNumber)); - formId = data.data; - subscriberOnAcquired = await commonEvent.createSubscriber(onAcquiredForm_Event); - await sleep(1000); - commonEvent.subscribe(subscriberOnAcquired, onAcquiredCallbackB); - - console.info(`${tcNumber} featureAbility.startAbility again start`); - await featureAbility.startAbility({ - want: { - bundleName: "com.ohos.st.formsystemhostc", - abilityName: "com.ohos.st.formsystemhostc.MainAbility", - parameters: { - formId: "0", - name: "Form_Js001", - bundle: "com.form.formsystemtestservicea.hmservice", - ability: "com.form.formsystemtestservicea.hmservice.FormAbility", - moduleName: "entry", - temporary: false, - isCreate: true - } - } - }).then((res: any) => { - console.info(`${tcNumber} featureAbility.startAbilityhost res: ${JSON.stringify(res)}`); - }).catch((err: any) => { - console.info(`${tcNumber} featureAbility.startAbilityhost error: ${JSON.stringify(err)}`); - expect().assertFail(); - done(); - }); - console.info(`${tcNumber} featureAbility.startAbility again end`); - }; - commonEvent.subscribe(subscriberOnAcquired, onAcquiredCallback); - - const onSupplyCallback = async (_, data) => { - if (data.parameters.kind == "onDestroy") { - console.info(`${tcNumber} onSupplyCallback ${JSON.stringify(data)}`); - expect(data.parameters.parameters).assertEqual(formId); - supplyFlag = true; - } - if (data.parameters.kind == "onUpdate") { - if (data.parameters.parameters == formId) { - expect().assertFail(); - } else if (data.parameters.parameters == formIdB) { - supplyFlagUpdate = true; - } - } - }; - commonEvent.subscribe(subscriberSupply, onSupplyCallback); - - console.info(`${tcNumber} featureAbility.startAbility start`); - await featureAbility.startAbility({ - want: { - bundleName: "com.ohos.st.formsystemhostd", - abilityName: "com.ohos.st.formsystemhostd.MainAbility", - parameters: { - formId: "0", - name: "Form_Js002", - bundle: "com.form.formsystemtestserviceb.hmservice", - ability: "com.form.formsystemtestserviceb.hmservice.FormAbility", - moduleName: "entry", - temporary: false, - isCreate: true - } - } - }).then((res: any) => { - console.info(`${tcNumber} featureAbility.startAbilityhost res: ${JSON.stringify(res)}`); - }).catch((err: any) => { - console.info(`${tcNumber} featureAbility.startAbilityhost error: ${JSON.stringify(err)}`); - expect().assertFail(); - done(); - }); - console.info(`${tcNumber} featureAbility.startAbility end`); - }); /** * @tc.number: FMS_deleteForm_0900 @@ -1093,13 +944,6 @@ const sleep = async delay => { }); }; -const delPublishCallback = async (tcNumber, done) => { - await sleep(1000); - console.info(`${tcNumber} delPublishCallback end`); - console.info(`${tcNumber} end`); - done(); -}; - const unsubscribeOnAcquiredCallback = (tcNumber) => { console.info(`${tcNumber} Unsubscribe OnAcquired Callback`); }; diff --git a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formdeletetest/signature/openharmony_sx.p7b b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formdeletetest/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..c2121a99a6ba56a263236887865086a07f0b433e 100644 Binary files a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formdeletetest/signature/openharmony_sx.p7b and b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formdeletetest/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formdynamicrefreshtest/entry/src/main/config.json b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formdynamicrefreshtest/entry/src/main/config.json index 156fc228960e3237c7f6fd5d88066b8dc86114ca..ffe3ce4b4dbb6ef6e78a009cbd5c6d3fead89873 100644 --- a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formdynamicrefreshtest/entry/src/main/config.json +++ b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formdynamicrefreshtest/entry/src/main/config.json @@ -109,33 +109,13 @@ { "name": "FMS_FormOnDeleted_commonEvent" }, - { - "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.START_ABILITIES_FROM_BACKGROUND", - "reason":"need use ohos.permission.START_ABILITIES_FROM_BACKGROUND" } ], "js": [ diff --git a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formdynamicrefreshtest/signature/openharmony_sx.p7b b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formdynamicrefreshtest/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..c2121a99a6ba56a263236887865086a07f0b433e 100644 Binary files a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formdynamicrefreshtest/signature/openharmony_sx.p7b and b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formdynamicrefreshtest/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formfuzztest/entry/src/main/config.json b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formfuzztest/entry/src/main/config.json index 225796f9fa29cea034d7b409e86da2f5e4f81125..f9801e38d7430d44eb2678f8018e1756e6133336 100644 --- a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formfuzztest/entry/src/main/config.json +++ b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formfuzztest/entry/src/main/config.json @@ -110,26 +110,10 @@ "name": "FMS_FormSupply_commonEvent", "reason": "need use FormSupply commonEvent" }, - { - "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" diff --git a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formfuzztest/signature/openharmony_sx.p7b b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formfuzztest/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..c2121a99a6ba56a263236887865086a07f0b433e 100644 Binary files a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formfuzztest/signature/openharmony_sx.p7b and b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formfuzztest/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formgetformsinfotest/formsoneandonetest/entry/src/main/config.json b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formgetformsinfotest/formsoneandonetest/entry/src/main/config.json index be62bc8d776bdca45a4b147460bf381057445b19..a0d90620411a6667001266e0e2c3638dc9a9323b 100644 --- a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formgetformsinfotest/formsoneandonetest/entry/src/main/config.json +++ b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formgetformsinfotest/formsoneandonetest/entry/src/main/config.json @@ -83,26 +83,10 @@ "name": "FMS_FormDelete_commonEvent", "reason": "need use delete commonEvent" }, - { - "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" diff --git a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formgetformsinfotest/formsoneandonetest/signature/openharmony_sx.p7b b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formgetformsinfotest/formsoneandonetest/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..c2121a99a6ba56a263236887865086a07f0b433e 100644 Binary files a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formgetformsinfotest/formsoneandonetest/signature/openharmony_sx.p7b and b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formgetformsinfotest/formsoneandonetest/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formgetformsinfotest/formsoneandtwotest/entry/src/main/config.json b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formgetformsinfotest/formsoneandtwotest/entry/src/main/config.json index b12af2e0eec78fbce13b56e0ddfe86bef372253e..3259bee7967c165d3244af72836d026da3a01d15 100644 --- a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formgetformsinfotest/formsoneandtwotest/entry/src/main/config.json +++ b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formgetformsinfotest/formsoneandtwotest/entry/src/main/config.json @@ -83,26 +83,10 @@ "name": "FMS_FormDelete_commonEvent", "reason": "need use delete commonEvent" }, - { - "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" diff --git a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formgetformsinfotest/formsoneandtwotest/signature/openharmony_sx.p7b b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formgetformsinfotest/formsoneandtwotest/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..c2121a99a6ba56a263236887865086a07f0b433e 100644 Binary files a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formgetformsinfotest/formsoneandtwotest/signature/openharmony_sx.p7b and b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formgetformsinfotest/formsoneandtwotest/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formgetformsinfotest/formsoneandzerotest/entry/src/main/config.json b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formgetformsinfotest/formsoneandzerotest/entry/src/main/config.json index f8b432c1207bbb9c8e5ea720f3b7e2ca24006d88..fb3ad873f19ca0293cfc1d2965cd80d14b2f4a0b 100644 --- a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formgetformsinfotest/formsoneandzerotest/entry/src/main/config.json +++ b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formgetformsinfotest/formsoneandzerotest/entry/src/main/config.json @@ -83,26 +83,10 @@ "name": "FMS_FormDelete_commonEvent", "reason": "need use delete commonEvent" }, - { - "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" diff --git a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formgetformsinfotest/formsoneandzerotest/signature/openharmony_sx.p7b b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formgetformsinfotest/formsoneandzerotest/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..c2121a99a6ba56a263236887865086a07f0b433e 100644 Binary files a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formgetformsinfotest/formsoneandzerotest/signature/openharmony_sx.p7b and b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formgetformsinfotest/formsoneandzerotest/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formgetformsinfotest/formswithoutpermtest/entry/src/main/config.json b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formgetformsinfotest/formswithoutpermtest/entry/src/main/config.json index d6dbfb1a0726ae2caa3db6d765dbe0983e570d4d..4fdeb2e138411fe236532bbf971c12b33150ddd3 100644 --- a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formgetformsinfotest/formswithoutpermtest/entry/src/main/config.json +++ b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formgetformsinfotest/formswithoutpermtest/entry/src/main/config.json @@ -83,22 +83,6 @@ "name": "FMS_FormDelete_commonEvent", "reason": "need use delete commonEvent" }, - { - "name": "ohos.permission.INSTALL_BUNDLE", - "reason": "need use ohos.permission.INSTALL_BUNDLE" - }, - { - "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" diff --git a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formgetformsinfotest/formswithoutpermtest/signature/openharmony_sx.p7b b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formgetformsinfotest/formswithoutpermtest/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formgetformsinfotest/formswithoutpermtest/signature/openharmony_sx.p7b and b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formgetformsinfotest/formswithoutpermtest/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formgetformsinfotest/formszerotest/entry/src/main/config.json b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formgetformsinfotest/formszerotest/entry/src/main/config.json index cd6688efb8939a2bcd41a7ce0b4ed20ec140187a..ca77fe7d5e42140655129df8a8eb7b1484102a4d 100644 --- a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formgetformsinfotest/formszerotest/entry/src/main/config.json +++ b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formgetformsinfotest/formszerotest/entry/src/main/config.json @@ -83,26 +83,10 @@ "name": "FMS_FormDelete_commonEvent", "reason": "need use delete commonEvent" }, - { - "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" diff --git a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formgetformsinfotest/formszerotest/signature/openharmony_sx.p7b b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formgetformsinfotest/formszerotest/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..c2121a99a6ba56a263236887865086a07f0b433e 100644 Binary files a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formgetformsinfotest/formszerotest/signature/openharmony_sx.p7b and b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formgetformsinfotest/formszerotest/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formhostdeathrecipienttest/entry/src/main/config.json b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formhostdeathrecipienttest/entry/src/main/config.json index 752c607b6ef21bdf3ae242177cff4a7443737673..e1bb994375409474a75fe22c66487a4243bdbced 100644 --- a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formhostdeathrecipienttest/entry/src/main/config.json +++ b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formhostdeathrecipienttest/entry/src/main/config.json @@ -99,32 +99,13 @@ { "name": "FMS_FormOnRequest_commonEvent" }, - { - "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.CLEAN_APPLICATION_DATA" } ], "js": [ diff --git a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formhostdeathrecipienttest/signature/openharmony_sx.p7b b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formhostdeathrecipienttest/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..c2121a99a6ba56a263236887865086a07f0b433e 100644 Binary files a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formhostdeathrecipienttest/signature/openharmony_sx.p7b and b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formhostdeathrecipienttest/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formperformancetest/BUILD.gn b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formperformancetest/BUILD.gn deleted file mode 100644 index d41ee332586123fe2a4b1aef28f6bf5fbdfe15e4..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formperformancetest/BUILD.gn +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright (c) 2021 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_js_hap_suite("ActsFormPerformanceTest") { - hap_profile = "./entry/src/main/config.json" - deps = [ - ":hjs_demo_js_assets", - ":hjs_demo_js_test_assets", - ":hjs_demo_resources", - ] - ets2abc = true - certificate_profile = "./signature/openharmony_sx.p7b" - hap_name = "ActsFormPerformanceTest" - subsystem_name = "ability" - part_name = "form_fwk" -} -ohos_js_assets("hjs_demo_js_assets") { - source_dir = "./entry/src/main/ets/MainAbility" -} -ohos_js_assets("hjs_demo_js_test_assets") { - source_dir = "./entry/src/main/ets/TestAbility" -} -ohos_resources("hjs_demo_resources") { - sources = [ "./entry/src/main/resources" ] - hap_profile = "./entry/src/main/config.json" -} diff --git a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formperformancetest/Test.json b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formperformancetest/Test.json deleted file mode 100644 index 79951d919992ac4b167a7453ce4c2544130f4fc6..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formperformancetest/Test.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "description": "Configuration for hjunit demo Tests", - "driver": { - "type": "OHJSUnitTest", - "test-timeout": "300000", - "bundle-name": "com.ohos.st.formperformancetest", - "package-name": "com.ohos.st.formperformancetest", - "shell-timeout": "600000", - "testcase-timeout":"30000" - }, - "kits": [ - { - "test-file-name": [ - "ActsFormPerformanceTest.hap", - "FormSystemHostK.hap", - "FormSupplyAppG.hap" - ], - "type": "AppInstallKit", - "cleanup-apps": true - }, - { - "type": "ShellKit", - "run-command": [ - "power-shell wakeup", - "power-shell setmode 602" - ] - } - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formperformancetest/entry/src/main/config.json b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formperformancetest/entry/src/main/config.json deleted file mode 100644 index e4c6ef005e9d066e0ff306fc095134eb3b2de500..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formperformancetest/entry/src/main/config.json +++ /dev/null @@ -1,154 +0,0 @@ -{ - "app": { - "bundleName": "com.ohos.st.formperformancetest", - "vendor": "ohos", - "version": { - "code": 1000000, - "name": "1.0.0" - }, - "apiVersion": { - "compatible": 7, - "releaseType": "Release", - "target": 7 - } - }, - "deviceConfig": {}, - "module": { - "package": "com.ohos.st.formperformancetest", - "name": ".FormPerformanceSTApp", - "mainAbility": ".MainAbility", - "deviceType": [ - "default", - "tablet" - ], - "distro": { - "deliveryWithInstall": true, - "moduleName": "entry", - "moduleType": "entry", - "installationFree": false - }, - "abilities": [ - { - "skills": [ - { - "entities": [ - "entity.system.home" - ], - "actions": [ - "action.system.home" - ] - } - ], - "visible": true, - "name": ".MainAbility", - "srcLanguage": "ets", - "icon": "$media:icon", - "description": "$string:description_mainability", - "label": "$string:entry_MainAbility", - "type": "page", - "launchType": "standard" - }, - { - "orientation": "unspecified", - "formsEnabled": false, - "name": ".TestAbility", - "srcLanguage": "ets", - "srcPath": "TestAbility", - "icon": "$media:icon", - "description": "$string:TestAbility_desc", - "label": "$string:TestAbility_label", - "type": "page", - "visible": true, - "launchType": "singleton" - } - ], - "defPermissions": [ - { - "availableScope": [], - "grantMode": "system_grant", - "name": "FMS_FormOnAcquired_commonEvent" - }, - { - "availableScope": [], - "grantMode": "system_grant", - "name": "FMS_FormSupply_commonEvent" - }, - { - "availableScope": [], - "grantMode": "system_grant", - "name": "FMS_FormDelete_commonEvent" - } - ], - "reqPermissions": [ - { - "name": "FMS_FormOnAcquired_commonEvent", - "reason": "need use onAcquired commonEvent" - }, - { - "name": "FMS_FormSupply_commonEvent", - "reason": "need use FormSupply commonEvent" - }, - { - "name": "FMS_FormDelete_commonEvent", - "reason": "need use delete commonEvent" - }, - { - "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.CLEAN_APPLICATION_DATA" - } - ], - "js": [ - { - "mode": { - "syntax": "ets", - "type": "pageAbility" - }, - "pages": [ - "pages/index" - ], - "name": ".MainAbility", - "window": { - "designWidth": 720, - "autoDesignWidth": false - } - }, - { - "mode": { - "syntax": "ets", - "type": "pageAbility" - }, - "pages": [ - "pages/index" - ], - "name": ".TestAbility", - "window": { - "designWidth": 720, - "autoDesignWidth": false - } - } - ] - } -} \ No newline at end of file diff --git a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formperformancetest/entry/src/main/ets/MainAbility/app.ets b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formperformancetest/entry/src/main/ets/MainAbility/app.ets deleted file mode 100644 index cb7e7d915b15ace2949b7e52af0a1a560843ee72..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formperformancetest/entry/src/main/ets/MainAbility/app.ets +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (c) 2021 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. - */ - -export default { - onCreate() { - console.info('[FormComponent] Application onCreate') - }, - onDestroy() { - console.info('[FormComponent] Application onDestroy') - }, -} \ No newline at end of file diff --git a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formperformancetest/entry/src/main/ets/MainAbility/pages/index.ets b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formperformancetest/entry/src/main/ets/MainAbility/pages/index.ets deleted file mode 100644 index ec5d2d8efb8fecba0166babda748d6ac4f1fa21d..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formperformancetest/entry/src/main/ets/MainAbility/pages/index.ets +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) 2021 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. - */ - -@Entry -@Component -struct Index { - - build() { - Flex({ - direction: FlexDirection.Column, - alignItems: ItemAlign.Center, - justifyContent: FlexAlign.Center - }) { - Text('Fms Performance Test') - .fontSize(50) - .fontWeight(FontWeight.Bold) - } - .width('100%') - .height('100%') - } -} - diff --git a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formperformancetest/entry/src/main/ets/TestAbility/app.ets b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formperformancetest/entry/src/main/ets/TestAbility/app.ets deleted file mode 100644 index 870e5798acfde4ef19d493a53a5ce12506d880bb..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formperformancetest/entry/src/main/ets/TestAbility/app.ets +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 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 AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry' -import { Hypium } from '@ohos/hypium' -import testsuite from '../test/List.test' - -export default { - onCreate() { - console.info('Application onCreate') - var abilityDelegator: any - abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() - var abilityDelegatorArguments: any - abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments() - console.info('start run testcase!!!') - Hypium.hypiumTest(abilityDelegator, abilityDelegatorArguments, testsuite) - }, - onDestroy() { - console.info('Application onDestroy') - }, -} \ No newline at end of file diff --git a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formperformancetest/entry/src/main/ets/TestAbility/pages/index.ets b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formperformancetest/entry/src/main/ets/TestAbility/pages/index.ets deleted file mode 100644 index 52663437cb619d4598126cf403d3689cb31ba131..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formperformancetest/entry/src/main/ets/TestAbility/pages/index.ets +++ /dev/null @@ -1,49 +0,0 @@ -/* - * 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 Index { - aboutToAppear() { - console.info('TestAbility index aboutToAppear') - } - - @State message: string = 'Hello World' - build() { - Row() { - Column() { - Text(this.message) - .fontSize(50) - .fontWeight(FontWeight.Bold) - Button() { - Text('next page') - .fontSize(20) - .fontWeight(FontWeight.Bold) - }.type(ButtonType.Capsule) - .margin({ - top: 20 - }) - .backgroundColor('#0D9FFB') - .width('35%') - .height('5%') - .onClick(()=>{ - }) - } - .width('100%') - } - .height('100%') - } - } \ No newline at end of file diff --git a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formperformancetest/entry/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formperformancetest/entry/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts deleted file mode 100644 index 14e78a653e030645860bcc3e7eb6c600b098127b..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formperformancetest/entry/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts +++ /dev/null @@ -1,77 +0,0 @@ -/* - * 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 TestRunner from '@ohos.application.testRunner' -import AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry' - -var abilityDelegator = undefined -var abilityDelegatorArguments = undefined - -function translateParamsToString(parameters) { - const keySet = new Set([ - '-s class', '-s notClass', '-s suite', '-s itName', - '-s level', '-s testType', '-s size', '-s timeout', - '-s package' - ]) - let targetParams = ''; - for (const key in parameters) { - if (keySet.has(key)) { - targetParams += ' ' + key + ' ' + parameters[key] - } - } - return targetParams.trim() -} - -async function onAbilityCreateCallback() { - console.log('onAbilityCreateCallback'); -} - -async function addAbilityMonitorCallback(err: any) { - console.info('addAbilityMonitorCallback : ' + JSON.stringify(err)) -} - -export default class OpenHarmonyTestRunner implements TestRunner { - constructor() { - } - - onPrepare() { - console.info('OpenHarmonyTestRunner OnPrepare') - } - - onRun() { - console.log('OpenHarmonyTestRunner onRun run') - abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments() - abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() - - let lMonitor = { - abilityName: testAbilityName, - onAbilityCreate: onAbilityCreateCallback, - }; - var testAbilityName = abilityDelegatorArguments.parameters['-p'] + '.TestAbility' - abilityDelegator.addAbilityMonitor(lMonitor, addAbilityMonitorCallback) - var cmd = 'aa start -d 0 -a ' + testAbilityName + ' -b ' + abilityDelegatorArguments.bundleName - cmd += ' '+translateParamsToString(abilityDelegatorArguments.parameters) - console.info('cmd : '+cmd) - abilityDelegator.executeShellCommand(cmd, - (err: any, d: any) => { - console.info('executeShellCommand : err : ' + JSON.stringify(err)); - console.info('executeShellCommand : data : ' + d.stdResult); - console.info('executeShellCommand : data : ' + d.exitCode); - }) - console.info('OpenHarmonyTestRunner onRun call abilityDelegator.getAppContext') - var context = abilityDelegator.getAppContext() - console.info('getAppContext : ' + JSON.stringify(context)) - console.info('OpenHarmonyTestRunner onRun end') - } -}; \ No newline at end of file diff --git a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formperformancetest/entry/src/main/ets/test/FmsPerformanceTest.test.ets b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formperformancetest/entry/src/main/ets/test/FmsPerformanceTest.test.ets deleted file mode 100644 index 08248f9bb31b7810d5a14e5f4b25452c3832b2b8..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formperformancetest/entry/src/main/ets/test/FmsPerformanceTest.test.ets +++ /dev/null @@ -1,954 +0,0 @@ -/* - * Copyright (c) 2021 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 featureAbility from '@ohos.ability.featureAbility'; -import formHost from '@ohos.application.formHost'; -import commonEvent from '@ohos.commonEvent'; -import systemTime from '@ohos.systemTime'; -import { beforeEach, afterEach, describe, expect, it } from '@ohos/hypium' - -const onAcquiredEvent = { - events: [`FMS_FormOnAcquired_commonEvent`], -}; -const onSupplyEvent = { - events: [`FMS_FormSupply_commonEvent`], -}; -const formOnDeleteEvent = `FMS_FormDelete_commonEvent`; - -const unsubscribeOnAcquiredCallback = (tcNumber) => { - console.info(`${tcNumber} unsubscribeOnAcquired callback`); -} -const unsubscribeOnSupplyCallback = (tcNumber) => { - console.info(`${tcNumber} unsubscribeOnSupply callback`); -} -const publishOnDeleteCallback = (tcNumber, done) => { - console.info(`${tcNumber} publishOnDelete callback`); - done(); -} - -const unsubscribeCallback = (tcNumber) => { - console.info(`====>${tcNumber} unsubscribeCallback====>`); -} - -let onAcquiredEventSubscriber; -let onSupplyEventSubscriber; - -function sleep(time) { - return new Promise((resolve)=>setTimeout(resolve,time)); - } - -export default function test() { - describe(`FmsPerformanceTest`, () => { - - beforeEach(async () => { - onAcquiredEventSubscriber = await commonEvent.createSubscriber(onAcquiredEvent); - onSupplyEventSubscriber = await commonEvent.createSubscriber(onSupplyEvent); - }); - - afterEach(async() => { - commonEvent.unsubscribe(onAcquiredEventSubscriber, () => unsubscribeCallback("afterEach unsubscribe onAcquiredEventSubscriber")); - commonEvent.unsubscribe(onSupplyEventSubscriber, () => unsubscribeCallback("afterEach unsubscribe onSupplyEventSubscriber")); - await sleep(1000); - }) - - /** - * @tc.number: FMS_performanceTest_0100 - * @tc.name: Performance test. - * @tc.desc: Create form. - */ - it(`FMS_performanceTest_0100`, 0, async (done) => { - const tcNumber = `FMS_performanceTest_0100`; - const timeout = 1000; - let endflag = 0; - - commonEvent.subscribe(onAcquiredEventSubscriber, async (err, data) => { - console.info(`${tcNumber} onAcquiredCallback data: ${JSON.stringify(data)}, error: ${JSON.stringify(err)}`); - console.info(`${tcNumber} onAcquiredCallback formId: ${data.data}`); - - const hostEndTime = data.parameters.time; - const hostTime = hostEndTime - startTime - console.info(`${tcNumber} hostTime: ${JSON.stringify(hostTime)}`); - expect(hostTime < timeout).assertEqual(true); - commonEvent.unsubscribe(onAcquiredEventSubscriber, () => unsubscribeOnAcquiredCallback(tcNumber)); - console.info(`${tcNumber} onAcquiredCallback end`); - - if (++endflag == 2) { - setTimeout(() => { - commonEvent.publish(formOnDeleteEvent, { - parameters: { - formIds: [data.data] - } - }, () => publishOnDeleteCallback(tcNumber, done)); - }, 500); - } - }); - - commonEvent.subscribe(onSupplyEventSubscriber, async (err, data) => { - console.info(`${tcNumber} onSupplyCallback data: ${JSON.stringify(data)}, error: ${JSON.stringify(err)}`); - const kind = data.parameters.kind; - const supplyFormId = `onCreate` == kind - ? JSON.parse(data.parameters.parameters).parameters[`ohos.extra.param.key.form_identity`] - : data.parameters.parameters; - console.info(`${tcNumber} onSupplyCallback formId: ${supplyFormId} kind: ${kind}`); - - if (`onCreate` == kind) { - const providerEndTime = data.parameters.time; - const providerTime = providerEndTime - startTime; - console.info(`${tcNumber} providerTime: ${JSON.stringify(providerTime)}`); - expect(providerTime < timeout).assertEqual(true); - commonEvent.unsubscribe(onSupplyEventSubscriber, () => unsubscribeOnSupplyCallback(tcNumber)); - console.info(`${tcNumber} onSupplyCallback_onCreate end`); - - if (++endflag == 2) { - setTimeout(() => { - commonEvent.publish(formOnDeleteEvent, { - parameters: { - formIds: [supplyFormId] - } - }, () => publishOnDeleteCallback(tcNumber, done)); - }, 500); - } - } - }); - - const startTime = await systemTime.getCurrentTime(); - try { - const res = await featureAbility.startAbility({ - want: { - bundleName: `com.ohos.st.formsystemhostk`, - abilityName: `com.ohos.st.formsystemhostk.MainAbility`, - parameters: { - formId: `0`, - name: `Form_Js001`, - bundle: `com.form.formsystemtestserviceg.hmservice`, - ability: `com.form.formsystemtestserviceg.hmservice.FormAbility`, - moduleName: `entry`, - isCreate: true, - } - } - }); - console.info(`${tcNumber} featureAbility.startAbility res: ${JSON.stringify(res)}`); - } catch (error) { - console.info(`${tcNumber} error: ${JSON.stringify(error)}`); - console.info(`${tcNumber} should not reach here`); - expect().assertFail(); - } - }); - - /** - * @tc.number: FMS_performanceTest_0200 - * @tc.name: Performance test. - * @tc.desc: Delete form. - */ - it(`FMS_performanceTest_0200`, 0, async (done) => { - const tcNumber = `FMS_performanceTest_0200`; - const timeout = 1000; - let startTime = -1; - let endflag = 0; - - commonEvent.subscribe(onAcquiredEventSubscriber, async (err, data) => { - console.info(`${tcNumber} onAcquiredCallback data: ${JSON.stringify(data)}, error: ${JSON.stringify(err)}`); - console.info(`${tcNumber} onAcquiredCallback formId: ${data.data}`); - - if (`deleteForm` == data.parameters.kind) { - startTime = data.parameters.startTime; - const hostTime = data.parameters.hostTime; - console.info(`${tcNumber} hostTime: ${JSON.stringify(hostTime)}`); - expect(hostTime < timeout).assertEqual(true); - commonEvent.unsubscribe(onAcquiredEventSubscriber, () => unsubscribeOnAcquiredCallback(tcNumber)); - console.info(`${tcNumber} onAcquiredCallback_deleteForm end`); - - if (++endflag == 2) { - setTimeout(() => { - commonEvent.publish(formOnDeleteEvent, { - parameters: { - formIds: [data.data] - } - }, () => publishOnDeleteCallback(tcNumber, done)); - }, 500); - } - } - }); - - commonEvent.subscribe(onSupplyEventSubscriber, async (err, data) => { - console.info(`${tcNumber} onSupplyCallback data: ${JSON.stringify(data)}, error: ${JSON.stringify(err)}`); - const kind = data.parameters.kind; - const supplyFormId = `onCreate` == kind - ? JSON.parse(data.parameters.parameters).parameters[`ohos.extra.param.key.form_identity`] - : data.parameters.parameters; - console.info(`${tcNumber} onSupplyCallback formId: ${supplyFormId} kind: ${kind}`); - - if (`onDestroy` == kind) { - setTimeout(() => { - const providerEndTime = data.parameters.time; - const providerTime = providerEndTime - startTime; - console.info(`${tcNumber} providerTime: ${JSON.stringify(providerTime)}`); - expect(providerTime < timeout).assertEqual(true); - commonEvent.unsubscribe(onSupplyEventSubscriber, () => unsubscribeOnSupplyCallback(tcNumber)); - console.info(`${tcNumber} onSupplyCallback_onDestroy end`); - - if (++endflag == 2) { - setTimeout(() => { - commonEvent.publish(formOnDeleteEvent, { - parameters: { - formIds: [supplyFormId] - } - }, () => publishOnDeleteCallback(tcNumber, done)); - }, 500); - } - }, 2000); - } - }); - - try { - const res = await featureAbility.startAbility({ - want: { - bundleName: `com.ohos.st.formsystemhostk`, - abilityName: `com.ohos.st.formsystemhostk.MainAbility`, - parameters: { - formId: `0`, - name: `Form_Js001`, - bundle: `com.form.formsystemtestserviceg.hmservice`, - ability: `com.form.formsystemtestserviceg.hmservice.FormAbility`, - moduleName: `entry`, - isCreate: true, - deleteForm: true, - } - } - }); - console.info(`${tcNumber} featureAbility.startAbility res: ${JSON.stringify(res)}`); - } catch (error) { - console.info(`${tcNumber} error: ${JSON.stringify(error)}`); - console.info(`${tcNumber} should not reach here`); - expect().assertFail(); - } - }); - - /** - * @tc.number: FMS_performanceTest_0300 - * @tc.name: Performance test. - * @tc.desc: Release form. - */ - it(`FMS_performanceTest_0300`, 0, async (done) => { - const tcNumber = `FMS_performanceTest_0300`; - const timeout = 1000; - - commonEvent.subscribe(onAcquiredEventSubscriber, async (err, data) => { - console.info(`${tcNumber} onAcquiredCallback data: ${JSON.stringify(data)}, error: ${JSON.stringify(err)}`); - console.info(`${tcNumber} onAcquiredCallback formId: ${data.data}`); - - if (`release` == data.parameters.kind) { - const hostTime = data.parameters.hostTime; - console.info(`${tcNumber} hostTime: ${hostTime}`); - expect(hostTime < timeout).assertEqual(true); - commonEvent.unsubscribe(onAcquiredEventSubscriber, () => unsubscribeOnAcquiredCallback(tcNumber)); - console.info(`${tcNumber} onAcquiredCallback_release end`); - setTimeout(() => { - commonEvent.publish(formOnDeleteEvent, { - parameters: { - formIds: [data.data] - } - }, () => publishOnDeleteCallback(tcNumber, done)); - }, 500); - } - }); - - try { - const res = await featureAbility.startAbility({ - want: { - bundleName: `com.ohos.st.formsystemhostk`, - abilityName: `com.ohos.st.formsystemhostk.MainAbility`, - parameters: { - formId: `0`, - name: `Form_Js001`, - bundle: `com.form.formsystemtestserviceg.hmservice`, - ability: `com.form.formsystemtestserviceg.hmservice.FormAbility`, - moduleName: `entry`, - isCreate: true, - releaseForm: true, - } - } - }); - console.info(`${tcNumber} featureAbility.startAbility res: ${JSON.stringify(res)}`); - } catch (error) { - console.info(`${tcNumber} error: ${JSON.stringify(error)}`); - console.info(`${tcNumber} should not reach here`); - expect().assertFail(); - } - }); - - /** - * @tc.number: FMS_performanceTest_0400 - * @tc.name: Performance test. - * @tc.desc: Cast temp form. - */ - it(`FMS_performanceTest_0400`, 0, async (done) => { - const tcNumber = `FMS_performanceTest_0400`; - const timeout = 500; - let startTime = -1; - let endflag = 0; - - commonEvent.subscribe(onAcquiredEventSubscriber, async (err, data) => { - console.info(`${tcNumber} onAcquiredCallback data: ${JSON.stringify(data)}, error: ${JSON.stringify(err)}`); - console.info(`${tcNumber} onAcquiredCallback formId: ${data.data}`); - - if (`castTempForm` == data.parameters.kind) { - startTime = data.parameters.startTime; - const hostTime = data.parameters.hostTime; - console.info(`${tcNumber} hostTime: ${JSON.stringify(hostTime)}`); - console.info(`${tcNumber} onAcquiredCallback_castTempForm end`); - expect(hostTime < timeout).assertEqual(true); - commonEvent.unsubscribe(onAcquiredEventSubscriber, () => unsubscribeOnAcquiredCallback(tcNumber)); - - if (++endflag == 2) { - setTimeout(() => { - commonEvent.publish(formOnDeleteEvent, { - parameters: { - formIds: [data.data] - } - }, () => publishOnDeleteCallback(tcNumber, done)); - }, 500); - } - } - }); - - commonEvent.subscribe(onSupplyEventSubscriber, async (err, data) => { - console.info(`${tcNumber} onSupplyCallback data: ${JSON.stringify(data)}, error: ${JSON.stringify(err)}`); - const kind = data.parameters.kind; - const supplyFormId = `onCreate` == kind - ? JSON.parse(data.parameters.parameters).parameters[`ohos.extra.param.key.form_identity`] - : data.parameters.parameters; - console.info(`${tcNumber} onSupplyCallback formId: ${supplyFormId} kind: ${kind}`); - - if (`onCastToNormal` == kind) { - setTimeout(() => { - const providerEndTime = data.parameters.time; - const providerTime = providerEndTime - startTime; - console.info(`${tcNumber} providerTime: ${JSON.stringify(providerTime)}`); - expect(providerTime < timeout).assertEqual(true); - commonEvent.unsubscribe(onSupplyEventSubscriber, () => unsubscribeOnSupplyCallback(tcNumber)); - console.info(`${tcNumber} onSupplyCallback_onCastToNormal end`); - - if (++endflag == 2) { - setTimeout(() => { - commonEvent.publish(formOnDeleteEvent, { - parameters: { - formIds: [supplyFormId] - } - }, () => publishOnDeleteCallback(tcNumber, done)); - }, 500); - } - }, 2000); - } - }); - - try { - const res = await featureAbility.startAbility({ - want: { - bundleName: `com.ohos.st.formsystemhostk`, - abilityName: `com.ohos.st.formsystemhostk.MainAbility`, - parameters: { - formId: `0`, - name: `Form_Js001`, - bundle: `com.form.formsystemtestserviceg.hmservice`, - ability: `com.form.formsystemtestserviceg.hmservice.FormAbility`, - moduleName: `entry`, - isCreate: true, - castTempForm: true, - temporary: true, - } - } - }); - console.info(`${tcNumber} featureAbility.startAbility res: ${JSON.stringify(res)}`); - } catch (error) { - console.info(`${tcNumber} error: ${JSON.stringify(error)}`); - console.info(`${tcNumber} should not reach here`); - expect().assertFail(); - } - }); - - /** - * @tc.number: FMS_performanceTest_0500 - * @tc.name: Performance test. - * @tc.desc: Notify visible forms. - */ - it(`FMS_performanceTest_0500`, 0, async (done) => { - const tcNumber = `FMS_performanceTest_0500`; - const timeout = 500; - let startTime = -1; - let endflag = 0; - - commonEvent.subscribe(onAcquiredEventSubscriber, async (err, data) => { - console.info(`${tcNumber} onAcquiredCallback data: ${JSON.stringify(data)}, error: ${JSON.stringify(err)}`); - console.info(`${tcNumber} onAcquiredCallback formId: ${data.data}`); - - if (`notifyVisibleForms` == data.parameters.kind) { - startTime = data.parameters.startTime; - const hostTime = data.parameters.hostTime; - console.info(`${tcNumber} hostTime: ${JSON.stringify(hostTime)}`); - expect(hostTime < timeout).assertEqual(true); - commonEvent.unsubscribe(onAcquiredEventSubscriber, () => unsubscribeOnAcquiredCallback(tcNumber)); - console.info(`${tcNumber} onAcquiredCallback_notifyVisibleForms end`); - - if (++endflag == 2) { - setTimeout(() => { - commonEvent.publish(formOnDeleteEvent, { - parameters: { - formIds: [data.data] - } - }, () => publishOnDeleteCallback(tcNumber, done)); - }, 500); - } - } - }); - - commonEvent.subscribe(onSupplyEventSubscriber, async (err, data) => { - console.info(`${tcNumber} onSupplyCallback data: ${JSON.stringify(data)}, error: ${JSON.stringify(err)}`); - const kind = data.parameters.kind; - const supplyFormId = `onCreate` == kind - ? JSON.parse(data.parameters.parameters).parameters[`ohos.extra.param.key.form_identity`] - : `onVisibilityChange` == kind - ? Object.keys(JSON.parse(data.parameters.parameters))[0] - : data.parameters.parameters; - console.info(`${tcNumber} onSupplyCallback formId: ${supplyFormId} kind: ${kind}`); - - if (`onVisibilityChange` == kind) { - setTimeout(() => { - const providerEndTime = data.parameters.time; - const providerTime = providerEndTime - startTime; - console.info(`${tcNumber} providerTime: ${JSON.stringify(providerTime)}`); - expect(providerTime < timeout).assertEqual(true); - commonEvent.unsubscribe(onSupplyEventSubscriber, () => unsubscribeOnSupplyCallback(tcNumber)); - console.info(`${tcNumber} onSupplyCallback_onVisibilityChange end`); - - if (++endflag == 2) { - setTimeout(() => { - commonEvent.publish(formOnDeleteEvent, { - parameters: { - formIds: [supplyFormId] - } - }, () => publishOnDeleteCallback(tcNumber, done)); - }, 500); - } - }, 2000); - } - }); - - try { - const res = await featureAbility.startAbility({ - want: { - bundleName: `com.ohos.st.formsystemhostk`, - abilityName: `com.ohos.st.formsystemhostk.MainAbility`, - parameters: { - formId: `0`, - name: `Form_Js001`, - bundle: `com.form.formsystemtestserviceg.hmservice`, - ability: `com.form.formsystemtestserviceg.hmservice.FormAbility`, - moduleName: `entry`, - isCreate: true, - notifyVisibleForms: true, - } - } - }); - console.info(`${tcNumber} featureAbility.startAbility res: ${JSON.stringify(res)}`); - } catch (error) { - console.info(`${tcNumber} error: ${JSON.stringify(error)}`); - console.info(`${tcNumber} should not reach here`); - expect().assertFail(); - } - }); - - /** - * @tc.number: FMS_performanceTest_0600 - * @tc.name: Performance test. - * @tc.desc: Notify invisible forms. - */ - it(`FMS_performanceTest_0600`, 0, async (done) => { - const tcNumber = `FMS_performanceTest_0600`; - const timeout = 500; - let startTime = -1; - let endflag = 0; - - commonEvent.subscribe(onAcquiredEventSubscriber, async (err, data) => { - console.info(`${tcNumber} onAcquiredCallback data: ${JSON.stringify(data)}, error: ${JSON.stringify(err)}`); - console.info(`${tcNumber} onAcquiredCallback formId: ${data.data}`); - - if (`notifyInvisibleForms` == data.parameters.kind) { - startTime = data.parameters.startTime; - const hostTime = data.parameters.hostTime; - console.info(`${tcNumber} hostTime: ${JSON.stringify(hostTime)}`); - expect(hostTime < timeout).assertEqual(true); - commonEvent.unsubscribe(onAcquiredEventSubscriber, () => unsubscribeOnAcquiredCallback(tcNumber)); - console.info(`${tcNumber} onAcquiredCallback_notifyInvisibleForms end`); - - if (++endflag == 2) { - setTimeout(() => { - commonEvent.publish(formOnDeleteEvent, { - parameters: { - formIds: [data.data] - } - }, () => publishOnDeleteCallback(tcNumber, done)); - }, 500); - } - } - }); - - commonEvent.subscribe(onSupplyEventSubscriber, async (err, data) => { - console.info(`${tcNumber} onSupplyCallback data: ${JSON.stringify(data)}, error: ${JSON.stringify(err)}`); - const kind = data.parameters.kind; - const supplyFormId = `onCreate` == kind - ? JSON.parse(data.parameters.parameters).parameters[`ohos.extra.param.key.form_identity`] - : `onVisibilityChange` == kind - ? Object.keys(JSON.parse(data.parameters.parameters))[0] - : data.parameters.parameters; - console.info(`${tcNumber} onSupplyCallback formId: ${supplyFormId} kind: ${kind}`); - - if (`onVisibilityChange` == kind) { - setTimeout(() => { - const providerEndTime = data.parameters.time; - const providerTime = providerEndTime - startTime; - console.info(`${tcNumber} providerTime: ${JSON.stringify(providerTime)}`); - expect(providerTime < timeout).assertEqual(true); - commonEvent.unsubscribe(onSupplyEventSubscriber, () => unsubscribeOnSupplyCallback(tcNumber)); - console.info(`${tcNumber} onSupplyCallback_onVisibilityChange end`); - - if (++endflag == 2) { - setTimeout(() => { - commonEvent.publish(formOnDeleteEvent, { - parameters: { - formIds: [supplyFormId] - } - }, () => publishOnDeleteCallback(tcNumber, done)); - }, 500); - } - }, 2000); - } - }); - - try { - const res = await featureAbility.startAbility({ - want: { - bundleName: `com.ohos.st.formsystemhostk`, - abilityName: `com.ohos.st.formsystemhostk.MainAbility`, - parameters: { - formId: `0`, - name: `Form_Js001`, - bundle: `com.form.formsystemtestserviceg.hmservice`, - ability: `com.form.formsystemtestserviceg.hmservice.FormAbility`, - moduleName: `entry`, - isCreate: true, - notifyInvisibleForms: true, - } - } - }); - console.info(`${tcNumber} featureAbility.startAbility res: ${JSON.stringify(res)}`); - } catch (error) { - console.info(`${tcNumber} error: ${JSON.stringify(error)}`); - console.info(`${tcNumber} should not reach here`); - expect().assertFail(); - } - }); - - /** - * @tc.number: FMS_performanceTest_0700 - * @tc.name: Performance test. - * @tc.desc: Request forms. - */ - it(`FMS_performanceTest_0700`, 0, async (done) => { - const tcNumber = `FMS_performanceTest_0700`; - const timeout = 100; - let startTime = -1; - let endflag = 0; - - commonEvent.subscribe(onAcquiredEventSubscriber, async (err, data) => { - console.info(`${tcNumber} onAcquiredCallback data: ${JSON.stringify(data)}, error: ${JSON.stringify(err)}`); - console.info(`${tcNumber} onAcquiredCallback formId: ${data.data}`); - - if (`request` == data.parameters.kind) { - startTime = data.parameters.startTime; - const hostTime = data.parameters.hostTime; - console.info(`${tcNumber} hostTime: ${JSON.stringify(hostTime)}`); - expect(hostTime < timeout).assertEqual(true); - commonEvent.unsubscribe(onAcquiredEventSubscriber, () => unsubscribeOnAcquiredCallback(tcNumber)); - console.info(`${tcNumber} onAcquiredCallback end`); - - if (++endflag == 2) { - setTimeout(() => { - commonEvent.publish(formOnDeleteEvent, { - parameters: { - formIds: [data.data] - } - }, () => publishOnDeleteCallback(tcNumber, done)); - }, 500); - } - } - }); - - commonEvent.subscribe(onSupplyEventSubscriber, async (err, data) => { - console.info(`${tcNumber} onSupplyCallback data: ${JSON.stringify(data)}, error: ${JSON.stringify(err)}`); - const kind = data.parameters.kind; - const supplyFormId = `onCreate` == kind - ? JSON.parse(data.parameters.parameters).parameters[`ohos.extra.param.key.form_identity`] - : data.parameters.parameters; - console.info(`${tcNumber} onSupplyCallback formId: ${supplyFormId} kind: ${kind}`); - - if (`onUpdate` == kind) { - setTimeout(() => { - const providerEndTime = data.parameters.time; - console.info(`${tcNumber} providerTime: ${JSON.stringify(providerEndTime - startTime)}`); - expect(providerEndTime - startTime < timeout).assertEqual(true); - commonEvent.unsubscribe(onSupplyEventSubscriber, () => unsubscribeOnSupplyCallback(tcNumber)); - console.info(`${tcNumber} onSupplyCallback_onUpdate end`); - - if (++endflag == 2) { - setTimeout(() => { - commonEvent.publish(formOnDeleteEvent, { - parameters: { - formIds: [supplyFormId] - } - }, () => publishOnDeleteCallback(tcNumber, done)); - }, 500); - } - }, 2000); - } - }); - - try { - const res = await featureAbility.startAbility({ - want: { - bundleName: `com.ohos.st.formsystemhostk`, - abilityName: `com.ohos.st.formsystemhostk.MainAbility`, - parameters: { - formId: `0`, - name: `Form_Js001`, - bundle: `com.form.formsystemtestserviceg.hmservice`, - ability: `com.form.formsystemtestserviceg.hmservice.FormAbility`, - moduleName: `entry`, - isCreate: true, - requestForm: true, - } - } - }); - console.info(`${tcNumber} featureAbility.startAbility res: ${JSON.stringify(res)}`); - } catch (error) { - console.info(`${tcNumber} error: ${JSON.stringify(error)}`); - console.info(`${tcNumber} should not reach here`); - expect().assertFail(); - } - }); - - /** - * @tc.number: FMS_performanceTest_0800 - * @tc.name: Performance test. - * @tc.desc: Update form. - */ - it(`FMS_performanceTest_0800`, 0, async (done) => { - const tcNumber = `FMS_performanceTest_0800`; - const timeout = 100; - - commonEvent.subscribe(onSupplyEventSubscriber, async (err, data) => { - console.info(`${tcNumber} onSupplyCallback data: ${JSON.stringify(data)}, error: ${JSON.stringify(err)}`); - const kind = data.parameters.kind; - const supplyFormId = `onCreate` == kind - ? JSON.parse(data.parameters.parameters).parameters[`ohos.extra.param.key.form_identity`] - : `onVisibilityChange` == kind - ? Object.keys(JSON.parse(data.parameters.parameters))[0] - : data.parameters.parameters; - console.info(`${tcNumber} onSupplyCallback formId: ${supplyFormId} kind: ${kind}`); - - if (`onUpdateForm` == kind) { - const providerTime = data.parameters.time; - console.info(`${tcNumber} providerTime: ${JSON.stringify(providerTime)}`); - expect(providerTime < timeout).assertEqual(true); - commonEvent.unsubscribe(onSupplyEventSubscriber, () => unsubscribeOnSupplyCallback(tcNumber)); - console.info(`${tcNumber} onSupplyCallback_onUpdateForm end`); - setTimeout(() => { - commonEvent.publish(formOnDeleteEvent, { - parameters: { - formIds: [supplyFormId] - } - }, () => publishOnDeleteCallback(tcNumber, done)); - }, 500); - } - }); - - try { - const res = await featureAbility.startAbility({ - want: { - bundleName: `com.ohos.st.formsystemhostk`, - abilityName: `com.ohos.st.formsystemhostk.MainAbility`, - parameters: { - formId: `0`, - name: `Form_Js001`, - bundle: `com.form.formsystemtestserviceg.hmservice`, - ability: `com.form.formsystemtestserviceg.hmservice.FormAbility`, - moduleName: `entry`, - isCreate: true, - notifyVisibleForms: true, - } - } - }); - console.info(`${tcNumber} featureAbility.startAbility res: ${JSON.stringify(res)}`); - } catch (error) { - console.info(`${tcNumber} error: ${JSON.stringify(error)}`); - console.info(`${tcNumber} should not reach here`); - expect().assertFail(); - } - }); - - /** - * @tc.number: FMS_performanceTest_0900 - * @tc.name: Performance test. - * @tc.desc: Set next refresh time. - */ - it(`FMS_performanceTest_0900`, 0, async (done) => { - const tcNumber = `FMS_performanceTest_0900`; - const timeout = 100; - - commonEvent.subscribe(onSupplyEventSubscriber, async (err, data) => { - console.info(`${tcNumber} onSupplyCallback data: ${JSON.stringify(data)}, error: ${JSON.stringify(err)}`); - const kind = data.parameters.kind; - const supplyFormId = `onCreate` == kind - ? JSON.parse(data.parameters.parameters).parameters[`ohos.extra.param.key.form_identity`] - : `onVisibilityChange` == kind - ? Object.keys(JSON.parse(data.parameters.parameters))[0] - : data.parameters.parameters; - console.info(`${tcNumber} onSupplyCallback formId: ${supplyFormId} kind: ${kind}`); - - if (`onSetFormNextRefreshTime` == kind) { - const providerTime = data.parameters.time; - console.info(`${tcNumber} providerTime: ${JSON.stringify(providerTime)}`); - expect(providerTime < timeout).assertEqual(true); - commonEvent.unsubscribe(onSupplyEventSubscriber, () => unsubscribeOnSupplyCallback(tcNumber)); - console.info(`${tcNumber} onSupplyCallback_onSetFormNextRefreshTime end`); - setTimeout(() => { - commonEvent.publish(formOnDeleteEvent, { - parameters: { - formIds: [supplyFormId] - } - }, () => publishOnDeleteCallback(tcNumber, done)); - }, 500); - } - }); - - setTimeout(async () => { - try { - const res = await featureAbility.startAbility({ - want: { - bundleName: `com.ohos.st.formsystemhostk`, - abilityName: `com.ohos.st.formsystemhostk.MainAbility`, - parameters: { - formId: `0`, - name: `Form_Js001`, - bundle: `com.form.formsystemtestserviceg.hmservice`, - ability: `com.form.formsystemtestserviceg.hmservice.FormAbility`, - moduleName: `entry`, - isCreate: true, - notifyVisibleForms: true, - } - } - }); - console.info(`${tcNumber} featureAbility.startAbility res: ${JSON.stringify(res)}`); - } catch (error) { - console.info(`${tcNumber} error: ${JSON.stringify(error)}`); - console.info(`${tcNumber} should not reach here`); - expect().assertFail(); - } - }, 2000); - }); - - /** - * @tc.number: FMS_performanceTest_1000 - * @tc.name: Performance test. - * @tc.desc: Enable update forms. - */ - it(`FMS_performanceTest_1000`, 0, async (done) => { - const tcNumber = `FMS_performanceTest_1000`; - const timeout = 100; - - commonEvent.subscribe(onAcquiredEventSubscriber, async (err, data) => { - console.info(`${tcNumber} onAcquiredCallback data: ${JSON.stringify(data)}, error: ${JSON.stringify(err)}`); - console.info(`${tcNumber} onAcquiredCallback formId: ${data.data}`); - - if (`enableUpdate` == data.parameters.kind) { - const hostTime = data.parameters.hostTime; - console.info(`${tcNumber} hostTime: ${hostTime}`); - expect(hostTime < timeout).assertEqual(true); - commonEvent.unsubscribe(onAcquiredEventSubscriber, () => unsubscribeOnAcquiredCallback(tcNumber)); - console.info(`${tcNumber} onAcquiredCallback_enableUpdate end`); - setTimeout(() => { - commonEvent.publish(formOnDeleteEvent, { - parameters: { - formIds: [data.data] - } - }, () => publishOnDeleteCallback(tcNumber, done)); - }, 500); - } - }); - - try { - const res = await featureAbility.startAbility({ - want: { - bundleName: `com.ohos.st.formsystemhostk`, - abilityName: `com.ohos.st.formsystemhostk.MainAbility`, - parameters: { - formId: `0`, - name: `Form_Js001`, - bundle: `com.form.formsystemtestserviceg.hmservice`, - ability: `com.form.formsystemtestserviceg.hmservice.FormAbility`, - moduleName: `entry`, - isCreate: true, - enableUpdate: true, - } - } - }); - console.info(`${tcNumber} featureAbility.startAbility res: ${JSON.stringify(res)}`); - } catch (error) { - console.info(`${tcNumber} error: ${JSON.stringify(error)}`); - console.info(`${tcNumber} should not reach here`); - expect().assertFail(); - } - }); - - /** - * @tc.number: FMS_performanceTest_1100 - * @tc.name: Performance test. - * @tc.desc: Disable update forms. - */ - it(`FMS_performanceTest_1100`, 0, async (done) => { - const tcNumber = `FMS_performanceTest_1100`; - const timeout = 100; - - commonEvent.subscribe(onAcquiredEventSubscriber, async (err, data) => { - console.info(`${tcNumber} onAcquiredCallback data: ${JSON.stringify(data)}, error: ${JSON.stringify(err)}`); - console.info(`${tcNumber} onAcquiredCallback formId: ${data.data}`); - - if (`disableUpdate` == data.parameters.kind) { - const hostTime = data.parameters.hostTime; - console.info(`${tcNumber} hostTime: ${hostTime}`); - expect(hostTime < timeout).assertEqual(true); - commonEvent.unsubscribe(onAcquiredEventSubscriber, () => unsubscribeOnAcquiredCallback(tcNumber)); - console.info(`${tcNumber} onAcquiredCallback_disableUpdate end`); - setTimeout(() => { - commonEvent.publish(formOnDeleteEvent, { - parameters: { - formIds: [data.data] - } - }, () => publishOnDeleteCallback(tcNumber, done)); - }, 500); - } - }); - - try { - const res = await featureAbility.startAbility({ - want: { - bundleName: `com.ohos.st.formsystemhostk`, - abilityName: `com.ohos.st.formsystemhostk.MainAbility`, - parameters: { - formId: `0`, - name: `Form_Js001`, - bundle: `com.form.formsystemtestserviceg.hmservice`, - ability: `com.form.formsystemtestserviceg.hmservice.FormAbility`, - moduleName: `entry`, - isCreate: true, - disableUpdate: true - } - } - }); - console.info(`${tcNumber} featureAbility.startAbility res: ${JSON.stringify(res)}`); - } catch (error) { - console.info(`${tcNumber} error: ${JSON.stringify(error)}`); - console.info(`${tcNumber} should not reach here`); - expect().assertFail(); - } - }); - - /** - * @tc.number: FMS_performanceTest_1300 - * @tc.name: Performance test. - * @tc.desc: Get forms info. - */ - it(`FMS_performanceTest_1300`, 0, async (done) => { - const tcNumber = `FMS_performanceTest_1300`; - const timeout = 10; - - const startTime = await systemTime.getCurrentTime(); - const data = await formHost.getAllFormsInfo(); - console.info(`${tcNumber} getAllFormsInfo result: ${JSON.stringify(data)}`); - const endTime = await systemTime.getCurrentTime(); - - console.info(`${tcNumber} hostTime: ${JSON.stringify(endTime - startTime)}`); - expect(endTime - startTime < timeout); - done(); - }); - - /** - * @tc.number: FMS_performanceTest_1400 - * @tc.name: Performance test. - * @tc.desc: Get forms info by bundle. - */ - it(`FMS_performanceTest_1400`, 0, async (done) => { - const tcNumber = `FMS_performanceTest_1400`; - const timeout = 10; - - const startTime = await systemTime.getCurrentTime(); - const data = await formHost.getFormsInfo(`com.form.formsystemtestserviceg.hmservice`); - console.info(`${tcNumber} getFormsInfoByBundle result: ${JSON.stringify(data)}`); - const endTime = await systemTime.getCurrentTime(); - - console.info(`${tcNumber} hostTime: ${JSON.stringify(endTime - startTime)}`); - expect(endTime - startTime < timeout); - done(); - }); - - /** - * @tc.number: FMS_performanceTest_1500 - * @tc.name: Performance test. - * @tc.desc: Get forms info by module. - */ - it(`FMS_performanceTest_1500`, 0, async (done) => { - const tcNumber = `FMS_performanceTest_1500`; - const timeout = 10; - - const startTime = await systemTime.getCurrentTime(); - const data = await formHost.getFormsInfo(`com.form.formsystemtestserviceg.hmservice`, `entry`); - console.info(`${tcNumber} getFormsInfoByModule result: ${JSON.stringify(data)}`); - const endTime = await systemTime.getCurrentTime(); - - console.info(`${tcNumber} hostTime: ${JSON.stringify(endTime - startTime)}`); - expect(endTime - startTime < timeout); - done(); - }); - - /** - * @tc.number: FMS_performanceTest_1600 - * @tc.name: Performance test. - * @tc.desc: Form System Ready. - */ - it(`FMS_performanceTest_1600`, 0, async (done) => { - const tcNumber = `FMS_performanceTest_1600`; - const timeout = 10; - - const startTime = await systemTime.getCurrentTime(); - const data = await formHost.isSystemReady(); - console.info(`${tcNumber} isSystemReady result: ${JSON.stringify(data)}`); - const endTime = await systemTime.getCurrentTime(); - - console.info(`${tcNumber} hostTime: ${JSON.stringify(endTime - startTime)}`); - expect(endTime - startTime < timeout); - done(); - }); - }); -} diff --git a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formperformancetest/entry/src/main/ets/test/List.test.ets b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formperformancetest/entry/src/main/ets/test/List.test.ets deleted file mode 100644 index 4110aef6b0a1082d39128229a4ec0a3747dba56e..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formperformancetest/entry/src/main/ets/test/List.test.ets +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (c) 2021 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 from './FmsPerformanceTest.test.ets'; - -export default function testsuite() { - test(); -} \ No newline at end of file diff --git a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formperformancetest/entry/src/main/resources/base/element/string.json b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formperformancetest/entry/src/main/resources/base/element/string.json deleted file mode 100644 index 6e6480757ae1feec92a93442e6c3194cd6718a7d..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formperformancetest/entry/src/main/resources/base/element/string.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "string": [ - { - "name": "entry_MainAbility", - "value": "formsttest" - }, - { - "name": "description_mainability", - "value": "ETS_Empty Ability" - }, - { - "name": "TestAbility_desc", - "value": "description" - }, - { - "name": "TestAbility_label", - "value": "label" - } - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formperformancetest/entry/src/main/resources/base/media/icon.png b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formperformancetest/entry/src/main/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formperformancetest/entry/src/main/resources/base/media/icon.png and /dev/null differ diff --git a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formperformancetest/signature/openharmony_sx.p7b b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formperformancetest/signature/openharmony_sx.p7b deleted file mode 100644 index 66b4457a8a81fb8d3356cf46d67226c850944858..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formperformancetest/signature/openharmony_sx.p7b and /dev/null differ diff --git a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formreleasetest/entry/src/main/config.json b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formreleasetest/entry/src/main/config.json index 1b94c6d5e5676cbc42de7a7131fde3a14c150f2d..93372a5fbd1db3556b9ce7f462004e4aea5d83e5 100644 --- a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formreleasetest/entry/src/main/config.json +++ b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formreleasetest/entry/src/main/config.json @@ -117,33 +117,13 @@ { "name": "FMS_FormOnReleased_commonEvent" }, - { - "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.START_ABILITIES_FROM_BACKGROUND", - "reason":"need use ohos.permission.START_ABILITIES_FROM_BACKGROUND" } ], "js": [ diff --git a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formreleasetest/signature/openharmony_sx.p7b b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formreleasetest/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..c2121a99a6ba56a263236887865086a07f0b433e 100644 Binary files a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formreleasetest/signature/openharmony_sx.p7b and b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formreleasetest/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formstatetest_disable/entry/src/main/config.json b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formstatetest_disable/entry/src/main/config.json index f70ba9b480fb3f6e96537b442e442eaf477e1bc1..d9a37bdb2ddc24e213a73b5823b0ab89aa4bb7b9 100644 --- a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formstatetest_disable/entry/src/main/config.json +++ b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formstatetest_disable/entry/src/main/config.json @@ -119,33 +119,13 @@ "name": "FMS_FormSupply_commonEvent", "reason": "need use FormSupply commonEvent" }, - { - "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.START_ABILITIES_FROM_BACKGROUND", - "reason":"need use ohos.permission.START_ABILITIES_FROM_BACKGROUND" } ], "js": [ diff --git a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formstatetest_disable/entry/src/main/ets/test/FmsFormStateDisable.test.ets b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formstatetest_disable/entry/src/main/ets/test/FmsFormStateDisable.test.ets index 33e7f385c0384bcc8444ff956ede02bfb535753e..0bad027ee6d728efdcee3acdb9b3e705f227a539 100644 --- a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formstatetest_disable/entry/src/main/ets/test/FmsFormStateDisable.test.ets +++ b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formstatetest_disable/entry/src/main/ets/test/FmsFormStateDisable.test.ets @@ -577,243 +577,6 @@ export default function test() { }); console.log(`FMS_disableFormsUpdate_0900 featureAbility.startAbility end`); }); - /** - * @tc.number: FMS_disableFormsUpdate_1000 - * @tc.name: Set next refresh time is invalid when disable form. (cache data < 1k) - * @tc.desc: 1.The form user calls the visible notification interface. - * 2.Call the disableFormsUpdate interface. - * 3.Call the setFormNextRefreshTime interface and verify the form can not refresh. - */ - it(`FMS_disableFormsUpdate_1000`, 0, async (done) => { - console.log(`FMS_disableFormsUpdate_1000 start`); - let formId; - - // timer speed up - commonEvent.publish(`fms.time_speed`, { code: 100 }, () => { - console.log(`FMS_disableFormsUpdate_1000 time speed up`); - }); - - function onSupplyEventCallBack(_, data) { - console.debug("====>FMS_disableFormsUpdate_1000 onSupplyEventCallBack====>" + JSON.stringify(data)); - if ("onUpdate" == data.parameters.kind) { - console.debug("FMS_disableFormsUpdate_1000 error, onUpdate called."); - commonEvent.unsubscribe(subscriberSupply, () => unsubscribeSupplyCallback("FMS_disableFormsUpdate_1000")); - expect().assertFail(); - } - } - - function onFormDisableCallBack(_, data) { - expect(data.event).assertEqual("FMS_FormOnState_commonEvent"); - console.debug("====>FMS_disableFormsUpdate_1000 onFormDisableCallBack====>" + JSON.stringify(data)); - commonEvent.unsubscribe(subscriberOnState, () => unsubscribeSupplyCallback("FMS_disableFormsUpdate_1000")); - expect(data.parameters.kind).assertEqual("disable"); - expect(data.data).assertEqual("0"); - - commonEvent.subscribe(subscriberSupply, onSupplyEventCallBack); - - setTimeout(() => { - // timer reset - commonEvent.publish(`fms.time_speed`, { code: 1 }, () => { - console.log(`FMS_disableFormsUpdate_1000 time reset`); - }); - commonEvent.unsubscribe(subscriberSupply, () => unsubscribeSupplyCallback("FMS_disableFormsUpdate_1000")); - }, 9000); - - setTimeout(() => { - console.log(`FMS_disableFormsUpdate_1000 onFormDisableCallBack end`); - let commonEventPublishData = { - data: formId - }; - commonEvent.publish(deleteForm_Event, commonEventPublishData, (err) => { - console.info('FMS_disableFormsUpdate_1000 publish' + JSON.stringify(err)); - done() - }); - }, 10000); - } - - async function onAcquiredCallBack(_, data) { - expect(data.event).assertEqual("FMS_FormOnState_commonEvent"); - commonEvent.unsubscribe(subscriberOnState, () => unsubscribeSupplyCallback("FMS_disableFormsUpdate_1000")); - console.debug("====>FMS_disableFormsUpdate_1000 onAcquiredCallBack====>" + JSON.stringify(data)); - expect(data.parameters.kind).assertEqual("visible"); - expect(data.data).assertEqual("0"); - formId = data.parameters.formId; - - subscriberOnState = await commonEvent.createSubscriber(onStateFormEvent); - commonEvent.subscribe(subscriberOnState, onFormDisableCallBack); - console.log(`FMS_disableFormsUpdate_1000 featureAbility.startAbility notify disable start`); - await featureAbility.startAbility({ - want: { - bundleName: "com.ohos.st.formsystemhostg", - abilityName: "com.ohos.st.formsystemhostg.MainAbility", - parameters: { - "formId" : "0", - "name" : "name", - "bundle" : "bundle", - "ability" : "ability", - "moduleName" : "entry", - "temporary" : false, - "stateForm" : "disable", - "stateIds" : [formId], - "isCreate" : false - } - } - }).then((res: any) => { - console.log(`FMS_disableFormsUpdate_1000 featureAbility.startAbilityhost res: ${JSON.stringify(res)}`); - }).catch((err: any) => { - console.log(`FMS_disableFormsUpdate_1000 featureAbility.startAbilityhost error: ${JSON.stringify(err)}`); - expect().assertFail() - done() - }); - console.log(`FMS_disableFormsUpdate_1000 featureAbility.startAbility notify disable end`); - } - - commonEvent.subscribe(subscriberOnState, onAcquiredCallBack); - console.log(`FMS_disableFormsUpdate_1000 featureAbility.startAbility servicea start`); - await featureAbility.startAbility({ - want: { - bundleName: "com.ohos.st.formsystemhostg", - abilityName: "com.ohos.st.formsystemhostg.MainAbility", - parameters: { - "formId" : "0", - "name" : "Form_Js001", - "bundle" : "com.form.formsystemtestservicef.hmservice", - "ability" : "com.form.formsystemtestservicef.hmservice.FormAbility", - "moduleName" : "entry", - "temporary" : false, - "isCreate" : true, - "stateIds" : ["self"], - "stateForm" : "visible" - } - } - }).then((res: any) => { - console.log(`FMS_disableFormsUpdate_1000 featureAbility.startAbilityhost res: ${JSON.stringify(res)}`); - }).catch((err: any) => { - console.log(`FMS_disableFormsUpdate_1000 featureAbility.startAbilityhost error: ${JSON.stringify(err)}`); - expect().assertFail() - done() - }); - console.log(`FMS_disableFormsUpdate_1000 featureAbility.startAbility servicea end`); - }); - - /** - * @tc.number: FMS_disableFormsUpdate_1100 - * @tc.name: Set next refresh time is invalid when disable form. (cache data > 1k) - * @tc.desc: 1.The form user calls the visible notification interface. - * 2.Call the disableFormsUpdate interface. - * 3.Call the setFormNextRefreshTime interface and verify the form can not refresh. - */ - it(`FMS_disableFormsUpdate_1100`, 0, async (done) => { - console.log(`FMS_disableFormsUpdate_1100 start`); - let formId; - - // timer speed up - commonEvent.publish(`fms.time_speed`, { code: 100 }, () => { - console.log(`FMS_disableFormsUpdate_1100 time speed up`); - }); - - function onSupplyEventCallBack(_, data) { - console.debug("====>FMS_disableFormsUpdate_1100 onSupplyEventCallBack====>" + JSON.stringify(data)); - if ("onUpdate" == data.parameters.kind) { - console.debug("FMS_disableFormsUpdate_1100 error, onUpdate called."); - commonEvent.unsubscribe(subscriberSupply, () => unsubscribeSupplyCallback("FMS_disableFormsUpdate_1100")); - expect().assertFail(); - } - } - - function onFormDisableCallBack(_, data) { - expect(data.event).assertEqual("FMS_FormOnState_commonEvent"); - console.debug("====>FMS_disableFormsUpdate_1100 onFormDisableCallBack====>" + JSON.stringify(data)); - commonEvent.unsubscribe(subscriberOnState, () => unsubscribeSupplyCallback("FMS_disableFormsUpdate_1100")); - expect(data.parameters.kind).assertEqual("disable"); - expect(data.data).assertEqual("0"); - - commonEvent.subscribe(subscriberSupply, onSupplyEventCallBack); - - setTimeout(() => { - // timer reset - commonEvent.publish(`fms.time_speed`, { code: 1 }, () => { - console.log(`FMS_disableFormsUpdate_1100 time reset`); - }); - commonEvent.unsubscribe(subscriberSupply, () => unsubscribeSupplyCallback("FMS_disableFormsUpdate_1100")); - }, 9000); - - setTimeout(() => { - console.log(`FMS_disableFormsUpdate_1100 onFormDisableCallBack end`); - let commonEventPublishData = { - data: formId - }; - commonEvent.publish(deleteForm_Event, commonEventPublishData, (err) => { - console.info('FMS_disableFormsUpdate_1100 publish' + JSON.stringify(err)); - done() - }); - }, 10000); - } - - async function onAcquiredCallBack(_, data) { - expect(data.event).assertEqual("FMS_FormOnState_commonEvent"); - commonEvent.unsubscribe(subscriberOnState, () => unsubscribeSupplyCallback("FMS_disableFormsUpdate_1100")); - console.debug("====>FMS_disableFormsUpdate_1100 onAcquiredCallBack====>" + JSON.stringify(data)); - expect(data.parameters.kind).assertEqual("visible"); - expect(data.data).assertEqual("0"); - formId = data.parameters.formId; - - subscriberOnState = await commonEvent.createSubscriber(onStateFormEvent); - commonEvent.subscribe(subscriberOnState, onFormDisableCallBack); - console.log(`FMS_disableFormsUpdate_1100 featureAbility.startAbility notify disable start`); - await featureAbility.startAbility({ - want: { - bundleName: "com.ohos.st.formsystemhostg", - abilityName: "com.ohos.st.formsystemhostg.MainAbility", - parameters: { - "formId" : "0", - "name" : "name", - "bundle" : "bundle", - "ability" : "ability", - "moduleName" : "entry", - "temporary" : false, - "stateForm" : "disable", - "stateIds" : [formId], - "isCreate" : false - } - } - }).then((res: any) => { - console.log(`FMS_disableFormsUpdate_1100 featureAbility.startAbilityhost res: ${JSON.stringify(res)}`); - }).catch((err: any) => { - console.log(`FMS_disableFormsUpdate_1100 featureAbility.startAbilityhost error: ${JSON.stringify(err)}`); - expect().assertFail() - done() - }); - console.log(`FMS_disableFormsUpdate_1100 featureAbility.startAbility notify disable end`); - } - - commonEvent.subscribe(subscriberOnState, onAcquiredCallBack); - console.log(`FMS_disableFormsUpdate_1100 featureAbility.startAbility servicea start`); - await featureAbility.startAbility({ - want: { - bundleName: "com.ohos.st.formsystemhostg", - abilityName: "com.ohos.st.formsystemhostg.MainAbility", - parameters: { - "formId" : "0", - "name" : "Form_Js001", - "bundle" : "com.form.formsystemtestserviceg.hmservice", - "ability" : "com.form.formsystemtestserviceg.hmservice.FormAbility", - "moduleName" : "entry", - "temporary" : false, - "isCreate" : true, - "stateIds" : ["self"], - "stateForm" : "visible" - } - } - }).then((res: any) => { - console.log(`FMS_disableFormsUpdate_1100 featureAbility.startAbilityhost res: ${JSON.stringify(res)}`); - }).catch((err: any) => { - console.log(`FMS_disableFormsUpdate_1100 featureAbility.startAbilityhost error: ${JSON.stringify(err)}`); - expect().assertFail() - done() - }); - console.log(`FMS_disableFormsUpdate_1100 featureAbility.startAbility servicea end`); - }); }); } @@ -825,14 +588,6 @@ const sleep = async delay => { }); }; -const delPublishCallback = async (tcNumber, done) => { - console.info(`${tcNumber} delPublishCallBack start`); - setTimeout(function () { - console.info(`${tcNumber} delPublishCallBack end`); - done(); - }, 1000); -} - const unsubscribeOnStateCallback = (tcNumber) => { console.debug(`====>${tcNumber} unsubscribeOnStateCallback====>`); } @@ -847,8 +602,4 @@ const unsubscribeOnDisableCallback = (tcNumber) => { const unsubscribeOnEnableCallback = (tcNumber) => { console.info(`====>${tcNumber} unsubscribeOnEnableCallback====>`); -} - -const unsubscribeSupplyCallback = (tcNumber) => { - console.debug(`====>${tcNumber} unSubscribeSupplyCallback====>`); -} +} \ No newline at end of file diff --git a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formstatetest_disable/signature/openharmony_sx.p7b b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formstatetest_disable/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..c2121a99a6ba56a263236887865086a07f0b433e 100644 Binary files a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formstatetest_disable/signature/openharmony_sx.p7b and b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formstatetest_disable/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formstatetest_enable/entry/src/main/config.json b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formstatetest_enable/entry/src/main/config.json index 68bf8176bf7d327e368fe79484936a11e5af0a62..5cb8bf8792ace0c9f3059e9b0e1dd311bd4bba8b 100644 --- a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formstatetest_enable/entry/src/main/config.json +++ b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formstatetest_enable/entry/src/main/config.json @@ -119,33 +119,13 @@ "name": "FMS_FormSupply_commonEvent", "reason": "need use FormSupply commonEvent" }, - { - "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.START_ABILITIES_FROM_BACKGROUND", - "reason":"need use ohos.permission.START_ABILITIES_FROM_BACKGROUND" } ], "js": [ diff --git a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formstatetest_enable/entry/src/main/ets/test/FmsFormStateEnable.test.ets b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formstatetest_enable/entry/src/main/ets/test/FmsFormStateEnable.test.ets index 205120afe381f18eedac2f3cee9482e2b3c1c92f..e4fb88e4f45fae062f320e42ccc469d726f7bea0 100644 --- a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formstatetest_enable/entry/src/main/ets/test/FmsFormStateEnable.test.ets +++ b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formstatetest_enable/entry/src/main/ets/test/FmsFormStateEnable.test.ets @@ -438,502 +438,6 @@ export default function test() { done(); }); }); - - /** - * @tc.number: FMS_enableFormsUpdate_0900 - * @tc.name: Use -1 form Id and created 2 form card Id notify the form to be invisible. - * @tc.desc: 1.The form user calls the visible notification interface. - * 2.Verify the result of the visible notification interface. - */ - it(`FMS_enableFormsUpdate_0900`, 0, async (done) => { - console.log(`FMS_enableFormsUpdate_0900 start`); - let formIds = []; - - // timer speed up - commonEvent.publish(`fms.time_speed`, { code: 300 }, () => { - console.log(`FMS_enableFormsUpdate_0900 time speed up`); - }); - - function onUpdateCallBack(_, data) { - if (data.parameters.kind == "onUpdate") { - expect(data.event).assertEqual("FMS_FormSupply_commonEvent"); - console.debug("====>FMS_enableFormsUpdate_0900 onUpdateCallBack====>" + JSON.stringify(data)); - expect(data.parameters.parameters).assertEqual(formIds[0]); - - commonEvent.unsubscribe(subscriberSupply, () => unsubscribeSupplyCallback("FMS_enableFormsUpdate_0900")); - - commonEvent.publish(`fms.time_speed`, { code: 1 }, () => { - console.log(`FMS_enableFormsUpdate_0900 time reset`); - }); - - setTimeout(() => { - let commonEventPublishData = { - data: formIds[0] - }; - commonEvent.publish(deleteForm_Event, commonEventPublishData, (err) => { - console.info('FMS_enableFormsUpdate_0900 publish' + JSON.stringify(err)); - done() - }); - }, 2000); - } - } - - function onFormEnableCallBack(_, data) { - expect(data.event).assertEqual("FMS_FormOnState_commonEvent"); - console.debug("====>FMS_enableFormsUpdate_0900 onFormEnableCallBack====>" + JSON.stringify(data)); - expect(data.parameters.formId).assertEqual(formIds[0]); - expect(data.parameters.kind).assertEqual("enable"); - commonEvent.unsubscribe(subscriberOnState, () => unsubscribeSupplyCallback("FMS_enableFormsUpdate_0900")); - } - - async function onFormDisableCallBack(_, data) { - expect(data.event).assertEqual("FMS_FormOnState_commonEvent"); - console.debug("====>FMS_enableFormsUpdate_0900 onFormDisableCallBack====>" + JSON.stringify(data)); - expect(data.parameters.formId).assertEqual(formIds[0]); - expect(data.parameters.kind).assertEqual("disable"); - commonEvent.unsubscribe(subscriberOnState, () => unsubscribeSupplyCallback("FMS_enableFormsUpdate_0900")); - - subscriberOnState = await commonEvent.createSubscriber(onStateFormEvent); - commonEvent.subscribe(subscriberOnState, onFormEnableCallBack); - commonEvent.subscribe(subscriberSupply, onUpdateCallBack); - - setTimeout(async () => { - console.log(`FMS_enableFormsUpdate_0900 featureAbility.startAbility notifyVisible start`); - await featureAbility.startAbility({ - want: { - bundleName: "com.ohos.st.formsystemhostg", - abilityName: "com.ohos.st.formsystemhostg.MainAbility", - parameters: { - "formId" : "0", - "name" : "name", - "bundle" : "bundle", - "ability" : "ability", - "moduleName" : "entry", - "temporary" : false, - "stateForm" : "enable", - "stateIds" : formIds, - "isCreate" : false - } - } - }).then((res: any) => { - console.log(`FMS_enableFormsUpdate_0900 featureAbility.startAbilityhost res: ${JSON.stringify(res)}`); - }).catch((err: any) => { - console.log(`FMS_enableFormsUpdate_0900 featureAbility.startAbilityhost error: ${JSON.stringify(err)}`); - expect().assertFail(); - done(); - }); - console.log(`FMS_enableFormsUpdate_0900 featureAbility.startAbility notifyVisible end`); - }, 10000); - } - - async function onAcquiredCallBack(_, data) { - expect(data.event).assertEqual("FMS_FormOnAcquired_commonEvent"); - commonEvent.unsubscribe(subscriberOnAcquired, () => unsubscribeSupplyCallback("FMS_enableFormsUpdate_0900")); - console.debug("====>FMS_enableFormsUpdate_0900 onAcquiredCallBack====>" + JSON.stringify(data)); - formIds.push(data.data); - - commonEvent.subscribe(subscriberOnState, onFormDisableCallBack); - console.log(`FMS_enableFormsUpdate_0900 featureAbility.startAbility notify disable start`); - await featureAbility.startAbility({ - want: { - bundleName: "com.ohos.st.formsystemhostg", - abilityName: "com.ohos.st.formsystemhostg.MainAbility", - parameters: { - "formId" : "0", - "name" : "name", - "bundle" : "bundle", - "ability" : "ability", - "moduleName" : "entry", - "temporary" : false, - "stateForm" : "disable", - "stateIds" : formIds, - "isCreate" : false - } - } - }).then((res: any) => { - console.log(`FMS_enableFormsUpdate_0900 featureAbility.startAbilityhost res: ${JSON.stringify(res)}`); - }).catch((err: any) => { - console.log(`FMS_enableFormsUpdate_0900 featureAbility.startAbilityhost error: ${JSON.stringify(err)}`); - expect().assertFail(); - done(); - }); - console.log(`FMS_enableFormsUpdate_0900 featureAbility.startAbility notify disable end`); - } - - commonEvent.subscribe(subscriberOnAcquired, onAcquiredCallBack); - console.log(`FMS_enableFormsUpdate_0900 featureAbility.startAbility servicea start`); - await featureAbility.startAbility({ - want: { - bundleName: "com.ohos.st.formsystemhostg", - abilityName: "com.ohos.st.formsystemhostg.MainAbility", - parameters: { - "formId" : "0", - "name" : "Form_Js001", - "bundle" : "com.form.formsystemtestservicee.hmservice", - "ability" : "com.form.formsystemtestservicee.hmservice.FormAbility", - "moduleName" : "entry", - "temporary" : false, - "isCreate" : true - } - } - }).then((res: any) => { - console.log(`FMS_enableFormsUpdate_0900 featureAbility.startAbilityhost res: ${JSON.stringify(res)}`); - }).catch((err: any) => { - console.log(`FMS_enableFormsUpdate_0900 featureAbility.startAbilityhost error: ${JSON.stringify(err)}`); - expect().assertFail(); - done(); - }); - console.log(`FMS_enableFormsUpdate_0900 featureAbility.startAbility servicea end`); - }); - - /** - * @tc.number: FMS_enableFormsUpdate_1000 - * @tc.name: Use -1 form Id and created 2 form card Id notify the form to be invisible. - * @tc.desc: 1.The form user calls the visible notification interface. - * 2.Verify the result of the visible notification interface. - */ - it(`FMS_enableFormsUpdate_1000`, 0, async (done) => { - console.log(`FMS_enableFormsUpdate_1000 start`); - let formIds = []; - - // timer speed up - commonEvent.publish(`fms.time_speed`, { code: 300 }, () => { - console.log(`FMS_enableFormsUpdate_1000 time speed up`); - }); - - function onUpdateCallBack(_, data) { - if (data.parameters.kind == "onUpdate") { - expect(data.event).assertEqual("FMS_FormSupply_commonEvent"); - console.debug("====>FMS_enableFormsUpdate_1000 onUpdateCallBack====>" + JSON.stringify(data)); - expect(data.parameters.parameters).assertEqual(formIds[0]); - - commonEvent.unsubscribe(subscriberSupply, () => unsubscribeSupplyCallback("FMS_enableFormsUpdate_1000")); - - commonEvent.publish(`fms.time_speed`, { code: 1 }, () => { - console.log(`FMS_enableFormsUpdate_1000 time reset`); - }); - - setTimeout(() => { - let commonEventPublishData = { - data: formIds[0] - }; - commonEvent.publish(deleteForm_Event, commonEventPublishData, (err) => { - console.info('FMS_enableFormsUpdate_1000 publish' + JSON.stringify(err)); - done() - }); - }, 2000); - } - } - - function onFormEnableCallBack(_, data) { - expect(data.event).assertEqual("FMS_FormOnState_commonEvent"); - console.debug("====>FMS_enableFormsUpdate_1000 onFormEnableCallBack====>" + JSON.stringify(data)); - expect(data.parameters.formId).assertEqual(formIds[0]); - expect(data.parameters.kind).assertEqual("enable"); - commonEvent.unsubscribe(subscriberOnState, () => unsubscribeSupplyCallback("FMS_enableFormsUpdate_1000")); - } - - async function onFormDisableCallBack(_, data) { - expect(data.event).assertEqual("FMS_FormOnState_commonEvent"); - console.debug("====>FMS_enableFormsUpdate_1000 onFormDisableCallBack====>" + JSON.stringify(data)); - expect(data.parameters.formId).assertEqual(formIds[0]); - expect(data.parameters.kind).assertEqual("disable"); - commonEvent.unsubscribe(subscriberOnState, () => unsubscribeSupplyCallback("FMS_enableFormsUpdate_1000")); - - subscriberOnState = await commonEvent.createSubscriber(onStateFormEvent); - commonEvent.subscribe(subscriberOnState, onFormEnableCallBack); - commonEvent.subscribe(subscriberSupply, onUpdateCallBack); - - setTimeout(async () => { - console.log(`FMS_enableFormsUpdate_1000 featureAbility.startAbility notifyVisible start`); - formIds.push("0"); - await featureAbility.startAbility({ - want: { - bundleName: "com.ohos.st.formsystemhostg", - abilityName: "com.ohos.st.formsystemhostg.MainAbility", - parameters: { - "formId" : "0", - "name" : "name", - "bundle" : "bundle", - "ability" : "ability", - "moduleName" : "entry", - "temporary" : false, - "stateForm" : "enable", - "stateIds" : formIds, - "isCreate" : false - } - } - }).then((res: any) => { - console.log(`FMS_enableFormsUpdate_1000 featureAbility.startAbilityhost res: ${JSON.stringify(res)}`); - }).catch((err: any) => { - console.log(`FMS_enableFormsUpdate_1000 featureAbility.startAbilityhost error: ${JSON.stringify(err)}`); - expect().assertFail(); - done(); - }); - console.log(`FMS_enableFormsUpdate_1000 featureAbility.startAbility notifyVisible end`); - }, 10000); - } - - function onAcquiredCallBack(_, data) { - expect(data.event).assertEqual("FMS_FormOnAcquired_commonEvent"); - commonEvent.unsubscribe(subscriberOnAcquired, () => unsubscribeSupplyCallback("FMS_enableFormsUpdate_1000")); - console.debug("====>FMS_enableFormsUpdate_1000 onAcquiredCallBack====>" + JSON.stringify(data)); - formIds.push(data.data); - commonEvent.subscribe(subscriberOnState, onFormDisableCallBack); - console.log(`FMS_enableFormsUpdate_1000 featureAbility.startAbility notify disable start`); - featureAbility.startAbility({ - want: { - bundleName: "com.ohos.st.formsystemhostg", - abilityName: "com.ohos.st.formsystemhostg.MainAbility", - parameters: { - "formId" : "0", - "name" : "name", - "bundle" : "bundle", - "ability" : "ability", - "moduleName" : "entry", - "temporary" : false, - "stateForm" : "disable", - "stateIds" : formIds, - "isCreate" : false - } - } - }).then((res: any) => { - console.log(`FMS_enableFormsUpdate_1000 featureAbility.startAbilityhost res: ${JSON.stringify(res)}`); - }).catch((err: any) => { - console.log(`FMS_enableFormsUpdate_1000 featureAbility.startAbilityhost error: ${JSON.stringify(err)}`); - expect().assertFail(); - done(); - }); - console.log(`FMS_enableFormsUpdate_1000 featureAbility.startAbility notify disable end`); - } - - commonEvent.subscribe(subscriberOnAcquired, onAcquiredCallBack); - console.log(`FMS_enableFormsUpdate_1000 featureAbility.startAbility servicea start`); - await featureAbility.startAbility({ - want: { - bundleName: "com.ohos.st.formsystemhostg", - abilityName: "com.ohos.st.formsystemhostg.MainAbility", - parameters: { - "formId" : "0", - "name" : "Form_Js001", - "bundle" : "com.form.formsystemtestservicee.hmservice", - "ability" : "com.form.formsystemtestservicee.hmservice.FormAbility", - "moduleName" : "entry", - "temporary" : false, - "isCreate" : true - } - } - }).then((res: any) => { - console.log(`FMS_enableFormsUpdate_1000 featureAbility.startAbilityhost res: ${JSON.stringify(res)}`); - }).catch((err: any) => { - console.log(`FMS_enableFormsUpdate_1000 featureAbility.startAbilityhost error: ${JSON.stringify(err)}`); - expect().assertFail(); - done(); - }); - console.log(`FMS_enableFormsUpdate_1000 featureAbility.startAbility servicea end`); - }); - - /** - * @tc.number: FMS_enableFormsUpdate_1200 - * @tc.name: Use -1 form Id and created 2 form card Id notify the form to be visible. - * @tc.desc: 1.The form user calls the visible notification interface. - * 2.Verify the result of the visible notification interface. - */ - it(`FMS_enableFormsUpdate_1200`, 0, async (done) => { - console.log(`FMS_enableFormsUpdate_1200 start`); - let formIds = new Array(); - let count = 0; - - // timer speed up - commonEvent.publish(`fms.time_speed`, { code: 300 }, () => { - console.log(`FMS_enableFormsUpdate_1200 time speed up`); - }); - - function delPublishCallBack1(_, data) { - console.info("!!!====>FMS_enableFormsUpdate_1200 delPublishCallBack1====>" + JSON.stringify(data)); - setTimeout(function () { - console.info('FMS_enableFormsUpdate_1200 delPublishCallBack1 end'); - console.log(`FMS_enableFormsUpdate_1200 end`); - }, 1000); - } - function delPublishCallBack2(_, data) { - console.info("!!!====>FMS_enableFormsUpdate_1200 delPublishCallBack2====>" + JSON.stringify(data)); - setTimeout(function () { - console.info('FMS_enableFormsUpdate_1200 delPublishCallBack2 end'); - console.log(`FMS_enableFormsUpdate_1200 end`); - done() - }, 1000); - } - - function onUpdateCallBack(_, data) { - if (data.parameters.kind == "onUpdate") { - expect(data.event).assertEqual("FMS_FormSupply_commonEvent"); - console.debug("====>FMS_enableFormsUpdate_1200 onUpdateCallBack====>" + JSON.stringify(data)); - expect(formIds.includes(data.parameters.parameters)).assertEqual(true); - - ++count; - if (count == 2) { - console.debug("====>FMS_enableFormsUpdate_1200 OK====>"); - commonEvent.unsubscribe(subscriberSupply, () => unsubscribeSupplyCallback("FMS_enableFormsUpdate_1200")); - - commonEvent.publish(`fms.time_speed`, { code: 1 }, () => { - console.log(`FMS_enableFormsUpdate_1200 time reset`); - }); - - setTimeout(() => { - let commonEventPublishData1 = { - data: formIds[0] - }; - commonEvent.publish(deleteForm_Event, commonEventPublishData1, delPublishCallBack1); - let commonEventPublishData2 = { - data: formIds[1] - }; - commonEvent.publish(deleteForm_Event, commonEventPublishData2, delPublishCallBack2); - }, 2000); - } - } - } - - function onFormEnableCallBack(_, data) { - expect(data.event).assertEqual("FMS_FormOnState_commonEvent"); - console.debug("====>FMS_enableFormsUpdate_1200 onFormEnableCallBack====>" + JSON.stringify(data)); - expect(data.parameters.kind).assertEqual("enable"); - commonEvent.unsubscribe(subscriberOnState, () => unsubscribeSupplyCallback("FMS_enableFormsUpdate_1200")); - } - - async function onFormDisableCallBack(_, data) { - expect(data.event).assertEqual("FMS_FormOnState_commonEvent"); - console.debug("====>FMS_enableFormsUpdate_1200 onFormDisableCallBack====>" + JSON.stringify(data)); - commonEvent.unsubscribe(subscriberOnState, () => unsubscribeSupplyCallback("FMS_enableFormsUpdate_1200")); - - subscriberOnState = await commonEvent.createSubscriber(onStateFormEvent); - commonEvent.subscribe(subscriberOnState, onFormEnableCallBack); - commonEvent.subscribe(subscriberSupply, onUpdateCallBack); - setTimeout(async () => { - console.log(`FMS_enableFormsUpdate_1200 featureAbility.startAbility notifyVisible start`); - formIds.push("0"); - await featureAbility.startAbility({ - want: { - bundleName: "com.ohos.st.formsystemhostg", - abilityName: "com.ohos.st.formsystemhostg.MainAbility", - parameters: { - "formId" : "0", - "name" : "name", - "bundle" : "bundle", - "ability" : "ability", - "moduleName" : "entry", - "temporary" : false, - "stateForm" : "enable", - "stateIds" : formIds, - "isCreate" : false - } - } - }).then((res: any) => { - console.log(`FMS_enableFormsUpdate_1200 featureAbility.startAbilityhost res: ${JSON.stringify(res)}`); - }).catch((err: any) => { - console.log(`FMS_enableFormsUpdate_1200 featureAbility.startAbilityhost error: ${JSON.stringify(err)}`); - expect().assertFail(); - done(); - }); - console.log(`FMS_enableFormsUpdate_1200 featureAbility.startAbility notifyVisible end`); - }, 10000); - } - - async function onSecondAcquiredCallBack(_, data) { - expect(data.event).assertEqual("FMS_FormOnAcquired_commonEvent"); - commonEvent.unsubscribe(subscriberOnAcquired, () => unsubscribeSupplyCallback("FMS_enableFormsUpdate_1200")); - console.debug("====>FMS_enableFormsUpdate_1200 onSecondAcquiredCallBack====>" + JSON.stringify(data)); - formIds.push(data.data); - console.debug("====>FMS_enableFormsUpdate_1200 formIds====>" + formIds); - - commonEvent.subscribe(subscriberOnState, onFormDisableCallBack); - - console.log(`FMS_enableFormsUpdate_1200 featureAbility.startAbility notify disable start`); - await featureAbility.startAbility({ - want: { - bundleName: "com.ohos.st.formsystemhostg", - abilityName: "com.ohos.st.formsystemhostg.MainAbility", - parameters: { - "formId" : "0", - "name" : "name", - "bundle" : "bundle", - "ability" : "ability", - "moduleName" : "entry", - "temporary" : false, - "stateForm" : "disable", - "stateIds" : formIds, - "isCreate" : false - } - } - }).then((res: any) => { - console.log(`FMS_enableFormsUpdate_1200 featureAbility.startAbilityhost res: ${JSON.stringify(res)}`); - }).catch((err: any) => { - console.log(`FMS_enableFormsUpdate_1200 featureAbility.startAbilityhost error: ${JSON.stringify(err)}`); - expect().assertFail(); - done(); - }); - console.log(`FMS_enableFormsUpdate_1200 featureAbility.startAbility notify disable end`); - } - - async function onFirstAcquiredCallBack(_, data) { - expect(data.event).assertEqual("FMS_FormOnAcquired_commonEvent"); - commonEvent.unsubscribe(subscriberOnAcquired, () => unsubscribeSupplyCallback("FMS_enableFormsUpdate_1200")); - console.debug("====>FMS_enableFormsUpdate_1200 onFirstAcquiredCallBack====>" + JSON.stringify(data)); - formIds.push(data.data); - - subscriberOnAcquired = await commonEvent.createSubscriber(onAcquiredForm_Event); - commonEvent.subscribe(subscriberOnAcquired, onSecondAcquiredCallBack); - - console.log(`FMS_enableFormsUpdate_1200 featureAbility.startAbility serviceb start`); - await featureAbility.startAbility({ - want: { - bundleName: "com.ohos.st.formsystemhostg", - abilityName: "com.ohos.st.formsystemhostg.MainAbility", - parameters: { - "formId" : "0", - "name" : "Form_Js001", - "bundle" : "com.form.formsystemtestserviceh.hmservice", - "ability" : "com.form.formsystemtestserviceh.hmservice.FormAbility", - "moduleName" : "entry", - "temporary" : false, - "isCreate" : true - } - } - }).then((res: any) => { - console.log(`FMS_enableFormsUpdate_1200 featureAbility.startAbilityhost res: ${JSON.stringify(res)}`); - }).catch((err: any) => { - console.log(`FMS_enableFormsUpdate_1200 featureAbility.startAbilityhost error: ${JSON.stringify(err)}`); - expect().assertFail(); - done(); - }); - console.log(`FMS_enableFormsUpdate_1200 featureAbility.startAbility serviceb end`); - } - - commonEvent.subscribe(subscriberOnAcquired, onFirstAcquiredCallBack); - console.log(`FMS_enableFormsUpdate_1200 featureAbility.startAbility servicea start`); - await featureAbility.startAbility({ - want: { - bundleName: "com.ohos.st.formsystemhostg", - abilityName: "com.ohos.st.formsystemhostg.MainAbility", - parameters: { - "formId" : "0", - "name" : "Form_Js001", - "bundle" : "com.form.formsystemtestservicee.hmservice", - "ability" : "com.form.formsystemtestservicee.hmservice.FormAbility", - "moduleName" : "entry", - "temporary" : false, - "isCreate" : true - } - } - }).then((res: any) => { - console.log(`FMS_enableFormsUpdate_1200 featureAbility.startAbilityhost res: ${JSON.stringify(res)}`); - }).catch((err: any) => { - console.log(`FMS_enableFormsUpdate_1200 featureAbility.startAbilityhost error: ${JSON.stringify(err)}`); - expect().assertFail(); - done(); - }); - console.log(`FMS_enableFormsUpdate_1200 featureAbility.startAbility servicea end`); - }); }); } @@ -945,22 +449,10 @@ const sleep = async delay => { }); }; -const delPublishCallback = async (tcNumber, done) => { - console.info(`${tcNumber} delPublishCallBack start`); - setTimeout(function () { - console.info(`${tcNumber} delPublishCallBack end`); - done(); - }, 1000); -} - const unsubscribeOnStateCallback = (tcNumber) => { console.debug(`====>${tcNumber} unsubscribeOnStateCallback====>`); } const unsubscribeOnAcquiredCallback = (tcNumber) => { console.info(`====>${tcNumber} unsubscribeOnAcquiredCallback====>`); -} - -const unsubscribeSupplyCallback = (tcNumber) => { - console.debug(`====>${tcNumber} unSubscribeSupplyCallback====>`); -} +} \ No newline at end of file diff --git a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formstatetest_enable/signature/openharmony_sx.p7b b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formstatetest_enable/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..c2121a99a6ba56a263236887865086a07f0b433e 100644 Binary files a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formstatetest_enable/signature/openharmony_sx.p7b and b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formstatetest_enable/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formstatetest_notifyinvisible/entry/src/main/config.json b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formstatetest_notifyinvisible/entry/src/main/config.json index d3eb4ef58705ec46cdeaee2c3ceb638db8aa7eb8..50ce1a5110d80c0153734ce2e2e5613c464612bd 100644 --- a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formstatetest_notifyinvisible/entry/src/main/config.json +++ b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formstatetest_notifyinvisible/entry/src/main/config.json @@ -119,33 +119,13 @@ "name": "FMS_FormSupply_commonEvent", "reason": "need use FormSupply commonEvent" }, - { - "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.START_ABILITIES_FROM_BACKGROUND", - "reason":"need use ohos.permission.START_ABILITIES_FROM_BACKGROUND" } ], "js": [ diff --git a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formstatetest_notifyinvisible/signature/openharmony_sx.p7b b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formstatetest_notifyinvisible/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..c2121a99a6ba56a263236887865086a07f0b433e 100644 Binary files a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formstatetest_notifyinvisible/signature/openharmony_sx.p7b and b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formstatetest_notifyinvisible/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formstatetest_notifyinvisible2/entry/src/main/config.json b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formstatetest_notifyinvisible2/entry/src/main/config.json index 4a2fefa76b99c73d0d7943d1dc9bee5e85b4c9e8..8ba128ff95bdb0ba780c97478a62053a9958833d 100644 --- a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formstatetest_notifyinvisible2/entry/src/main/config.json +++ b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formstatetest_notifyinvisible2/entry/src/main/config.json @@ -119,37 +119,13 @@ "name": "FMS_FormSupply_commonEvent", "reason": "need use FormSupply commonEvent" }, - { - "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.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" } ], "js": [ diff --git a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formstatetest_notifyinvisible2/signature/openharmony_sx.p7b b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formstatetest_notifyinvisible2/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..c2121a99a6ba56a263236887865086a07f0b433e 100644 Binary files a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formstatetest_notifyinvisible2/signature/openharmony_sx.p7b and b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formstatetest_notifyinvisible2/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formstatetest_notifyvisible/entry/src/main/config.json b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formstatetest_notifyvisible/entry/src/main/config.json index 34fa4da9aff10e2eb6ee97a656458e1efddd26ac..fc2d2782635eaea0f666d9f236cc585821a36761 100644 --- a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formstatetest_notifyvisible/entry/src/main/config.json +++ b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formstatetest_notifyvisible/entry/src/main/config.json @@ -119,33 +119,13 @@ "name": "FMS_FormSupply_commonEvent", "reason": "need use FormSupply commonEvent" }, - { - "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.START_ABILITIES_FROM_BACKGROUND", - "reason":"need use ohos.permission.START_ABILITIES_FROM_BACKGROUND" } ], "js": [ diff --git a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formstatetest_notifyvisible/signature/openharmony_sx.p7b b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formstatetest_notifyvisible/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..c2121a99a6ba56a263236887865086a07f0b433e 100644 Binary files a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formstatetest_notifyvisible/signature/openharmony_sx.p7b and b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formstatetest_notifyvisible/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formstresstest/entry/src/main/config.json b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formstresstest/entry/src/main/config.json index a45df5c9f5529ceeaf4a25c82c91455c51449339..a14242f1c6e51ec58e8071f78262c85ab266309e 100644 --- a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formstresstest/entry/src/main/config.json +++ b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formstresstest/entry/src/main/config.json @@ -135,36 +135,13 @@ "name": "FMS_FormDelete_commonEvent", "reason": "need use delete commonEvent" }, - { - "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.CLEAN_APPLICATION_DATA" - }, - { - "name":"ohos.permission.START_ABILITIES_FROM_BACKGROUND", - "reason":"need use ohos.permission.START_ABILITIES_FROM_BACKGROUND" } ], "js": [ diff --git a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formstresstest/signature/openharmony_sx.p7b b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formstresstest/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..c2121a99a6ba56a263236887865086a07f0b433e 100644 Binary files a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formstresstest/signature/openharmony_sx.p7b and b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formstresstest/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formupdatefreshtest/entry/src/main/config.json b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formupdatefreshtest/entry/src/main/config.json index abdf3ca366a9ae5de8a93be4c44fac5854e24e5c..28050fc256464e61a2151899a3869ad6d506feaf 100644 --- a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formupdatefreshtest/entry/src/main/config.json +++ b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formupdatefreshtest/entry/src/main/config.json @@ -128,33 +128,13 @@ "name": "FMS_FormOnRequest_commonEvent", "reason": "need use OnRequest commonEvent" }, - { - "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.START_ABILITIES_FROM_BACKGROUND", - "reason":"need use ohos.permission.START_ABILITIES_FROM_BACKGROUND" } ], "js": [ diff --git a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formupdatefreshtest/signature/openharmony_sx.p7b b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formupdatefreshtest/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..c2121a99a6ba56a263236887865086a07f0b433e 100644 Binary files a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formupdatefreshtest/signature/openharmony_sx.p7b and b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formupdatefreshtest/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/formmanager/stage/actsformprovidergetformsinfo/signature/openharmony_sx.p7b b/ability/ability_runtime/formmanager/stage/actsformprovidergetformsinfo/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/formmanager/stage/actsformprovidergetformsinfo/signature/openharmony_sx.p7b and b/ability/ability_runtime/formmanager/stage/actsformprovidergetformsinfo/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/freeinstalltest/connectabilityfatest/actsfreeinstallconnectabilityfatest/signature/openharmony_sx.p7b b/ability/ability_runtime/freeinstalltest/connectabilityfatest/actsfreeinstallconnectabilityfatest/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/freeinstalltest/connectabilityfatest/actsfreeinstallconnectabilityfatest/signature/openharmony_sx.p7b and b/ability/ability_runtime/freeinstalltest/connectabilityfatest/actsfreeinstallconnectabilityfatest/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/freeinstalltest/connectabilityfatest/connectdifferentapplication/signature/openharmony_sx.p7b b/ability/ability_runtime/freeinstalltest/connectabilityfatest/connectdifferentapplication/signature/openharmony_sx.p7b index dcec6c9615032c1b48bf185e839d9720dd68aab0..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100755 Binary files a/ability/ability_runtime/freeinstalltest/connectabilityfatest/connectdifferentapplication/signature/openharmony_sx.p7b and b/ability/ability_runtime/freeinstalltest/connectabilityfatest/connectdifferentapplication/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/freeinstalltest/connectabilityfatest/connectfamyapplication1/signature/openharmony_sx.p7b b/ability/ability_runtime/freeinstalltest/connectabilityfatest/connectfamyapplication1/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/freeinstalltest/connectabilityfatest/connectfamyapplication1/signature/openharmony_sx.p7b and b/ability/ability_runtime/freeinstalltest/connectabilityfatest/connectfamyapplication1/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/freeinstalltest/connectabilityfatest/connectfamyapplication10/signature/openharmony_sx.p7b b/ability/ability_runtime/freeinstalltest/connectabilityfatest/connectfamyapplication10/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/freeinstalltest/connectabilityfatest/connectfamyapplication10/signature/openharmony_sx.p7b and b/ability/ability_runtime/freeinstalltest/connectabilityfatest/connectfamyapplication10/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/freeinstalltest/connectabilityfatest/connectfamyapplication11/signature/openharmony_sx.p7b b/ability/ability_runtime/freeinstalltest/connectabilityfatest/connectfamyapplication11/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/freeinstalltest/connectabilityfatest/connectfamyapplication11/signature/openharmony_sx.p7b and b/ability/ability_runtime/freeinstalltest/connectabilityfatest/connectfamyapplication11/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/freeinstalltest/connectabilityfatest/connectfamyapplication2/signature/openharmony_sx.p7b b/ability/ability_runtime/freeinstalltest/connectabilityfatest/connectfamyapplication2/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/freeinstalltest/connectabilityfatest/connectfamyapplication2/signature/openharmony_sx.p7b and b/ability/ability_runtime/freeinstalltest/connectabilityfatest/connectfamyapplication2/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/freeinstalltest/connectabilityfatest/connectfamyapplication4/signature/openharmony_sx.p7b b/ability/ability_runtime/freeinstalltest/connectabilityfatest/connectfamyapplication4/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/freeinstalltest/connectabilityfatest/connectfamyapplication4/signature/openharmony_sx.p7b and b/ability/ability_runtime/freeinstalltest/connectabilityfatest/connectfamyapplication4/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/freeinstalltest/connectabilityfatest/connectfamyapplication5/signature/openharmony_sx.p7b b/ability/ability_runtime/freeinstalltest/connectabilityfatest/connectfamyapplication5/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/freeinstalltest/connectabilityfatest/connectfamyapplication5/signature/openharmony_sx.p7b and b/ability/ability_runtime/freeinstalltest/connectabilityfatest/connectfamyapplication5/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/freeinstalltest/connectabilityfatest/connectfamyapplication6/signature/openharmony_sx.p7b b/ability/ability_runtime/freeinstalltest/connectabilityfatest/connectfamyapplication6/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/freeinstalltest/connectabilityfatest/connectfamyapplication6/signature/openharmony_sx.p7b and b/ability/ability_runtime/freeinstalltest/connectabilityfatest/connectfamyapplication6/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/freeinstalltest/connectabilityfatest/connectfamyapplication7/signature/openharmony_sx.p7b b/ability/ability_runtime/freeinstalltest/connectabilityfatest/connectfamyapplication7/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/freeinstalltest/connectabilityfatest/connectfamyapplication7/signature/openharmony_sx.p7b and b/ability/ability_runtime/freeinstalltest/connectabilityfatest/connectfamyapplication7/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/freeinstalltest/connectabilityfatest/connectfamyapplication8/signature/openharmony_sx.p7b b/ability/ability_runtime/freeinstalltest/connectabilityfatest/connectfamyapplication8/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/freeinstalltest/connectabilityfatest/connectfamyapplication8/signature/openharmony_sx.p7b and b/ability/ability_runtime/freeinstalltest/connectabilityfatest/connectfamyapplication8/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/freeinstalltest/connectabilityfatest/connectfamyapplication9/signature/openharmony_sx.p7b b/ability/ability_runtime/freeinstalltest/connectabilityfatest/connectfamyapplication9/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/freeinstalltest/connectabilityfatest/connectfamyapplication9/signature/openharmony_sx.p7b and b/ability/ability_runtime/freeinstalltest/connectabilityfatest/connectfamyapplication9/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/freeinstalltest/connectabilitystagetest/actsfreeinstallconnectabilitystagetest/entry/src/main/module.json b/ability/ability_runtime/freeinstalltest/connectabilitystagetest/actsfreeinstallconnectabilitystagetest/entry/src/main/module.json index d853356e6f046303eadac4e0362674b733d7f42c..0eca63cc2c3b3e28814b4c309c556866cb332e16 100644 --- a/ability/ability_runtime/freeinstalltest/connectabilitystagetest/actsfreeinstallconnectabilitystagetest/entry/src/main/module.json +++ b/ability/ability_runtime/freeinstalltest/connectabilitystagetest/actsfreeinstallconnectabilitystagetest/entry/src/main/module.json @@ -109,30 +109,6 @@ "requestPermissions": [ { "name": "ohos.permission.GET_BUNDLE_INFO" - }, - { - "name": "ohos.permission.MANAGE_MISSIONS" - }, - { - "name": "ohos.permission.INSTALL_BUNDLE" - }, - { - "name": "ohos.permission.GET_BUNDLE_INFO_PRIVILEGED" - }, - { - "name": "ohos.permission.CHANGE_ABILITY_ENABLED_STATE" - }, - { - "name": "ohos.permission.REMOVE_CACHE_FILES" - }, - { - "name": "ohos.permission.LISTEN_BUNDLE_CHANGE" - }, - { - "name":"ohos.permission.START_ABILITIES_FROM_BACKGROUND" - }, - { - "name":"ohos.permission.START_INVISIBLE_ABILITY" } ] } diff --git a/ability/ability_runtime/freeinstalltest/connectabilitystagetest/actsfreeinstallconnectabilitystagetest/signature/openharmony_sx.p7b b/ability/ability_runtime/freeinstalltest/connectabilitystagetest/actsfreeinstallconnectabilitystagetest/signature/openharmony_sx.p7b index dcec6c9615032c1b48bf185e839d9720dd68aab0..1521b7baabf7a1327bb2e87ffc268c1c20995ffb 100755 Binary files a/ability/ability_runtime/freeinstalltest/connectabilitystagetest/actsfreeinstallconnectabilitystagetest/signature/openharmony_sx.p7b and b/ability/ability_runtime/freeinstalltest/connectabilitystagetest/actsfreeinstallconnectabilitystagetest/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/freeinstalltest/connectabilitystagetest/connectstagemyapplication0/signature/openharmony_sx.p7b b/ability/ability_runtime/freeinstalltest/connectabilitystagetest/connectstagemyapplication0/signature/openharmony_sx.p7b index dcec6c9615032c1b48bf185e839d9720dd68aab0..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100755 Binary files a/ability/ability_runtime/freeinstalltest/connectabilitystagetest/connectstagemyapplication0/signature/openharmony_sx.p7b and b/ability/ability_runtime/freeinstalltest/connectabilitystagetest/connectstagemyapplication0/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/freeinstalltest/connectabilitystagetest/connectstagemyapplication1/signature/openharmony_sx.p7b b/ability/ability_runtime/freeinstalltest/connectabilitystagetest/connectstagemyapplication1/signature/openharmony_sx.p7b index dcec6c9615032c1b48bf185e839d9720dd68aab0..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100755 Binary files a/ability/ability_runtime/freeinstalltest/connectabilitystagetest/connectstagemyapplication1/signature/openharmony_sx.p7b and b/ability/ability_runtime/freeinstalltest/connectabilitystagetest/connectstagemyapplication1/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/freeinstalltest/connectabilitystagetest/connectstagemyapplication2/signature/openharmony_sx.p7b b/ability/ability_runtime/freeinstalltest/connectabilitystagetest/connectstagemyapplication2/signature/openharmony_sx.p7b index dcec6c9615032c1b48bf185e839d9720dd68aab0..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100755 Binary files a/ability/ability_runtime/freeinstalltest/connectabilitystagetest/connectstagemyapplication2/signature/openharmony_sx.p7b and b/ability/ability_runtime/freeinstalltest/connectabilitystagetest/connectstagemyapplication2/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/freeinstalltest/connectabilitystagetest/connectstagemyapplication3/signature/openharmony_sx.p7b b/ability/ability_runtime/freeinstalltest/connectabilitystagetest/connectstagemyapplication3/signature/openharmony_sx.p7b index dcec6c9615032c1b48bf185e839d9720dd68aab0..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100755 Binary files a/ability/ability_runtime/freeinstalltest/connectabilitystagetest/connectstagemyapplication3/signature/openharmony_sx.p7b and b/ability/ability_runtime/freeinstalltest/connectabilitystagetest/connectstagemyapplication3/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/freeinstalltest/connectabilitystagetest/connectstagemyapplication4/signature/openharmony_sx.p7b b/ability/ability_runtime/freeinstalltest/connectabilitystagetest/connectstagemyapplication4/signature/openharmony_sx.p7b index dcec6c9615032c1b48bf185e839d9720dd68aab0..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100755 Binary files a/ability/ability_runtime/freeinstalltest/connectabilitystagetest/connectstagemyapplication4/signature/openharmony_sx.p7b and b/ability/ability_runtime/freeinstalltest/connectabilitystagetest/connectstagemyapplication4/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/freeinstalltest/connectabilitystagetest/connectstagemyapplication5/signature/openharmony_sx.p7b b/ability/ability_runtime/freeinstalltest/connectabilitystagetest/connectstagemyapplication5/signature/openharmony_sx.p7b index dcec6c9615032c1b48bf185e839d9720dd68aab0..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100755 Binary files a/ability/ability_runtime/freeinstalltest/connectabilitystagetest/connectstagemyapplication5/signature/openharmony_sx.p7b and b/ability/ability_runtime/freeinstalltest/connectabilitystagetest/connectstagemyapplication5/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/freeinstalltest/connectabilitystagetest/connectstagemyapplication6/signature/openharmony_sx.p7b b/ability/ability_runtime/freeinstalltest/connectabilitystagetest/connectstagemyapplication6/signature/openharmony_sx.p7b index dcec6c9615032c1b48bf185e839d9720dd68aab0..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100755 Binary files a/ability/ability_runtime/freeinstalltest/connectabilitystagetest/connectstagemyapplication6/signature/openharmony_sx.p7b and b/ability/ability_runtime/freeinstalltest/connectabilitystagetest/connectstagemyapplication6/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/freeinstalltest/connectabilitystagetest/connectstagemyapplication7/signature/openharmony_sx.p7b b/ability/ability_runtime/freeinstalltest/connectabilitystagetest/connectstagemyapplication7/signature/openharmony_sx.p7b index dcec6c9615032c1b48bf185e839d9720dd68aab0..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100755 Binary files a/ability/ability_runtime/freeinstalltest/connectabilitystagetest/connectstagemyapplication7/signature/openharmony_sx.p7b and b/ability/ability_runtime/freeinstalltest/connectabilitystagetest/connectstagemyapplication7/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/freeinstalltest/connectabilitystagetest/connectstagemyapplication8/signature/openharmony_sx.p7b b/ability/ability_runtime/freeinstalltest/connectabilitystagetest/connectstagemyapplication8/signature/openharmony_sx.p7b index dcec6c9615032c1b48bf185e839d9720dd68aab0..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100755 Binary files a/ability/ability_runtime/freeinstalltest/connectabilitystagetest/connectstagemyapplication8/signature/openharmony_sx.p7b and b/ability/ability_runtime/freeinstalltest/connectabilitystagetest/connectstagemyapplication8/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/freeinstalltest/mockservice/signature/openharmony_sx.p7b b/ability/ability_runtime/freeinstalltest/mockservice/signature/openharmony_sx.p7b index dcec6c9615032c1b48bf185e839d9720dd68aab0..9e5bb619d86d435317c421082602a751a0189732 100755 Binary files a/ability/ability_runtime/freeinstalltest/mockservice/signature/openharmony_sx.p7b and b/ability/ability_runtime/freeinstalltest/mockservice/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/freeinstalltest/mockservicetimeout/signature/openharmony_sx.p7b b/ability/ability_runtime/freeinstalltest/mockservicetimeout/signature/openharmony_sx.p7b index dcec6c9615032c1b48bf185e839d9720dd68aab0..9e5bb619d86d435317c421082602a751a0189732 100755 Binary files a/ability/ability_runtime/freeinstalltest/mockservicetimeout/signature/openharmony_sx.p7b and b/ability/ability_runtime/freeinstalltest/mockservicetimeout/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/freeinstalltest/startabilityfatest/actsfreeinstallstartabilityfatest/entry/src/main/config.json b/ability/ability_runtime/freeinstalltest/startabilityfatest/actsfreeinstallstartabilityfatest/entry/src/main/config.json index 2a76818c4585245f7983dfa180ee831990387e88..73562175cb6511ab7301b4380493e213c7df57ac 100644 --- a/ability/ability_runtime/freeinstalltest/startabilityfatest/actsfreeinstallstartabilityfatest/entry/src/main/config.json +++ b/ability/ability_runtime/freeinstalltest/startabilityfatest/actsfreeinstallstartabilityfatest/entry/src/main/config.json @@ -111,36 +111,9 @@ "reason": "need use ohos.permission.INSTALL_BUNDLE", "name": "ohos.permission.GET_BUNDLE_INFO" }, - { - "name": "ohos.permission.MANAGE_MISSIONS" - }, - { - "reason": "need use ohos.permission.INSTALL_BUNDLE", - "name": "ohos.permission.INSTALL_BUNDLE" - }, { "reason": "need use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED", "name": "ohos.permission.GET_BUNDLE_INFO_PRIVILEGED" - }, - { - "reason": "need use ohos.permission.CHANGE_ABILITY_ENABLED_STATE", - "name": "ohos.permission.CHANGE_ABILITY_ENABLED_STATE" - }, - { - "reason": "need use ohos.permission.REMOVE_CACHE_FILES", - "name": "ohos.permission.REMOVE_CACHE_FILES" - }, - { - "reason": "need use ohos.permission.LISTEN_BUNDLE_CHANGE", - "name": "ohos.permission.LISTEN_BUNDLE_CHANGE" - }, - { - "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" } ] } diff --git a/ability/ability_runtime/freeinstalltest/startabilityfatest/actsfreeinstallstartabilityfatest/signature/openharmony_sx.p7b b/ability/ability_runtime/freeinstalltest/startabilityfatest/actsfreeinstallstartabilityfatest/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..cb61ed127f47b406b30f9ccf54b2d5b2b5c374a0 100644 Binary files a/ability/ability_runtime/freeinstalltest/startabilityfatest/actsfreeinstallstartabilityfatest/signature/openharmony_sx.p7b and b/ability/ability_runtime/freeinstalltest/startabilityfatest/actsfreeinstallstartabilityfatest/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/freeinstalltest/startabilityfatest/actsstartabilitynotargetbundlelistfatest/entry/src/main/config.json b/ability/ability_runtime/freeinstalltest/startabilityfatest/actsstartabilitynotargetbundlelistfatest/entry/src/main/config.json index b616bf8f9eb3f8bdfdf6bac8b40e69b77a699e6e..0f4264fa51a78d5bf3b967ed023e9916b5f3e0b2 100644 --- a/ability/ability_runtime/freeinstalltest/startabilityfatest/actsstartabilitynotargetbundlelistfatest/entry/src/main/config.json +++ b/ability/ability_runtime/freeinstalltest/startabilityfatest/actsstartabilitynotargetbundlelistfatest/entry/src/main/config.json @@ -82,35 +82,6 @@ "autoDesignWidth": false } } - ], - "reqPermissions": [ - { - "reason": "need use ohos.permission.INSTALL_BUNDLE", - "name": "ohos.permission.GET_BUNDLE_INFO" - }, - { - "name": "ohos.permission.MANAGE_MISSIONS" - }, - { - "reason": "need use ohos.permission.INSTALL_BUNDLE", - "name": "ohos.permission.INSTALL_BUNDLE" - }, - { - "reason": "need use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED", - "name": "ohos.permission.GET_BUNDLE_INFO_PRIVILEGED" - }, - { - "reason": "need use ohos.permission.CHANGE_ABILITY_ENABLED_STATE", - "name": "ohos.permission.CHANGE_ABILITY_ENABLED_STATE" - }, - { - "reason": "need use ohos.permission.REMOVE_CACHE_FILES", - "name": "ohos.permission.REMOVE_CACHE_FILES" - }, - { - "reason": "need use ohos.permission.LISTEN_BUNDLE_CHANGE", - "name": "ohos.permission.LISTEN_BUNDLE_CHANGE" - } ] } } \ No newline at end of file diff --git a/ability/ability_runtime/freeinstalltest/startabilityfatest/actsstartabilitynotargetbundlelistfatest/signature/openharmony_sx.p7b b/ability/ability_runtime/freeinstalltest/startabilityfatest/actsstartabilitynotargetbundlelistfatest/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/freeinstalltest/startabilityfatest/actsstartabilitynotargetbundlelistfatest/signature/openharmony_sx.p7b and b/ability/ability_runtime/freeinstalltest/startabilityfatest/actsstartabilitynotargetbundlelistfatest/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/freeinstalltest/startabilityfatest/atomizationfaentry/entry/src/main/config.json b/ability/ability_runtime/freeinstalltest/startabilityfatest/atomizationfaentry/entry/src/main/config.json index 498f8eef5cdd03191ef694f9b0e12e7ea313cc89..6b1bcd4ea78b1e60fafe5e92089c339728c25a60 100644 --- a/ability/ability_runtime/freeinstalltest/startabilityfatest/atomizationfaentry/entry/src/main/config.json +++ b/ability/ability_runtime/freeinstalltest/startabilityfatest/atomizationfaentry/entry/src/main/config.json @@ -80,17 +80,9 @@ } ], "reqPermissions": [ - { - "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" } ] } diff --git a/ability/ability_runtime/freeinstalltest/startabilityfatest/atomizationfaentry/signature/openharmony_sx.p7b b/ability/ability_runtime/freeinstalltest/startabilityfatest/atomizationfaentry/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/freeinstalltest/startabilityfatest/atomizationfaentry/signature/openharmony_sx.p7b and b/ability/ability_runtime/freeinstalltest/startabilityfatest/atomizationfaentry/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/freeinstalltest/startabilityfatest/atomizationfahm2/signature/openharmony_sx.p7b b/ability/ability_runtime/freeinstalltest/startabilityfatest/atomizationfahm2/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/freeinstalltest/startabilityfatest/atomizationfahm2/signature/openharmony_sx.p7b and b/ability/ability_runtime/freeinstalltest/startabilityfatest/atomizationfahm2/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/freeinstalltest/startabilityfatest/atomizationfahm4/signature/openharmony_sx.p7b b/ability/ability_runtime/freeinstalltest/startabilityfatest/atomizationfahm4/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/freeinstalltest/startabilityfatest/atomizationfahm4/signature/openharmony_sx.p7b and b/ability/ability_runtime/freeinstalltest/startabilityfatest/atomizationfahm4/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/freeinstalltest/startabilityfatest/famyapplication1/signature/openharmony_sx.p7b b/ability/ability_runtime/freeinstalltest/startabilityfatest/famyapplication1/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/freeinstalltest/startabilityfatest/famyapplication1/signature/openharmony_sx.p7b and b/ability/ability_runtime/freeinstalltest/startabilityfatest/famyapplication1/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/freeinstalltest/startabilityforresultfatest/actsfreeinstallstartabilityforresultfatest/entry/src/main/config.json b/ability/ability_runtime/freeinstalltest/startabilityforresultfatest/actsfreeinstallstartabilityforresultfatest/entry/src/main/config.json index ea117659f53d6cb472ffe333f6328132fdc9df89..26f8914297342299d9550371dc9eea03e8c056d5 100644 --- a/ability/ability_runtime/freeinstalltest/startabilityforresultfatest/actsfreeinstallstartabilityforresultfatest/entry/src/main/config.json +++ b/ability/ability_runtime/freeinstalltest/startabilityforresultfatest/actsfreeinstallstartabilityforresultfatest/entry/src/main/config.json @@ -103,28 +103,9 @@ "reason": "need use ohos.permission.INSTALL_BUNDLE", "name": "ohos.permission.GET_BUNDLE_INFO" }, - { - "name": "ohos.permission.MANAGE_MISSIONS" - }, - { - "reason": "need use ohos.permission.INSTALL_BUNDLE", - "name": "ohos.permission.INSTALL_BUNDLE" - }, { "reason": "need use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED", "name": "ohos.permission.GET_BUNDLE_INFO_PRIVILEGED" - }, - { - "reason": "need use ohos.permission.CHANGE_ABILITY_ENABLED_STATE", - "name": "ohos.permission.CHANGE_ABILITY_ENABLED_STATE" - }, - { - "reason": "need use ohos.permission.REMOVE_CACHE_FILES", - "name": "ohos.permission.REMOVE_CACHE_FILES" - }, - { - "reason": "need use ohos.permission.LISTEN_BUNDLE_CHANGE", - "name": "ohos.permission.LISTEN_BUNDLE_CHANGE" } ] } diff --git a/ability/ability_runtime/freeinstalltest/startabilityforresultfatest/actsfreeinstallstartabilityforresultfatest/signature/openharmony_sx.p7b b/ability/ability_runtime/freeinstalltest/startabilityforresultfatest/actsfreeinstallstartabilityforresultfatest/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..cb61ed127f47b406b30f9ccf54b2d5b2b5c374a0 100644 Binary files a/ability/ability_runtime/freeinstalltest/startabilityforresultfatest/actsfreeinstallstartabilityforresultfatest/signature/openharmony_sx.p7b and b/ability/ability_runtime/freeinstalltest/startabilityforresultfatest/actsfreeinstallstartabilityforresultfatest/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/freeinstalltest/startabilityforresultfatest/actsstartabilityforresultnotargetfatest/entry/src/main/config.json b/ability/ability_runtime/freeinstalltest/startabilityforresultfatest/actsstartabilityforresultnotargetfatest/entry/src/main/config.json index 477a331589c3213a11f02cb7d96005ea7048af03..7ced28fa427d25f785a3fadc4222cf9dc1b13157 100644 --- a/ability/ability_runtime/freeinstalltest/startabilityforresultfatest/actsstartabilityforresultnotargetfatest/entry/src/main/config.json +++ b/ability/ability_runtime/freeinstalltest/startabilityforresultfatest/actsstartabilityforresultnotargetfatest/entry/src/main/config.json @@ -82,35 +82,6 @@ "autoDesignWidth": false } } - ], - "reqPermissions": [ - { - "reason": "need use ohos.permission.INSTALL_BUNDLE", - "name": "ohos.permission.GET_BUNDLE_INFO" - }, - { - "name": "ohos.permission.MANAGE_MISSIONS" - }, - { - "reason": "need use ohos.permission.INSTALL_BUNDLE", - "name": "ohos.permission.INSTALL_BUNDLE" - }, - { - "reason": "need use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED", - "name": "ohos.permission.GET_BUNDLE_INFO_PRIVILEGED" - }, - { - "reason": "need use ohos.permission.CHANGE_ABILITY_ENABLED_STATE", - "name": "ohos.permission.CHANGE_ABILITY_ENABLED_STATE" - }, - { - "reason": "need use ohos.permission.REMOVE_CACHE_FILES", - "name": "ohos.permission.REMOVE_CACHE_FILES" - }, - { - "reason": "need use ohos.permission.LISTEN_BUNDLE_CHANGE", - "name": "ohos.permission.LISTEN_BUNDLE_CHANGE" - } ] } } \ No newline at end of file diff --git a/ability/ability_runtime/freeinstalltest/startabilityforresultfatest/actsstartabilityforresultnotargetfatest/signature/openharmony_sx.p7b b/ability/ability_runtime/freeinstalltest/startabilityforresultfatest/actsstartabilityforresultnotargetfatest/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/freeinstalltest/startabilityforresultfatest/actsstartabilityforresultnotargetfatest/signature/openharmony_sx.p7b and b/ability/ability_runtime/freeinstalltest/startabilityforresultfatest/actsstartabilityforresultnotargetfatest/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/freeinstalltest/startabilityforresultfatest/atomizationresulta/signature/openharmony_sx.p7b b/ability/ability_runtime/freeinstalltest/startabilityforresultfatest/atomizationresulta/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/freeinstalltest/startabilityforresultfatest/atomizationresulta/signature/openharmony_sx.p7b and b/ability/ability_runtime/freeinstalltest/startabilityforresultfatest/atomizationresulta/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/freeinstalltest/startabilityforresultfatest/atomizationresultfaentry/signature/openharmony_sx.p7b b/ability/ability_runtime/freeinstalltest/startabilityforresultfatest/atomizationresultfaentry/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/freeinstalltest/startabilityforresultfatest/atomizationresultfaentry/signature/openharmony_sx.p7b and b/ability/ability_runtime/freeinstalltest/startabilityforresultfatest/atomizationresultfaentry/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/freeinstalltest/startabilityforresultfatest/atomizationresultfahm1/signature/openharmony_sx.p7b b/ability/ability_runtime/freeinstalltest/startabilityforresultfatest/atomizationresultfahm1/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/freeinstalltest/startabilityforresultfatest/atomizationresultfahm1/signature/openharmony_sx.p7b and b/ability/ability_runtime/freeinstalltest/startabilityforresultfatest/atomizationresultfahm1/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/freeinstalltest/startabilityforresultfatest/atomizationresultfahm2/signature/openharmony_sx.p7b b/ability/ability_runtime/freeinstalltest/startabilityforresultfatest/atomizationresultfahm2/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/freeinstalltest/startabilityforresultfatest/atomizationresultfahm2/signature/openharmony_sx.p7b and b/ability/ability_runtime/freeinstalltest/startabilityforresultfatest/atomizationresultfahm2/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/freeinstalltest/startabilityforresultfatest/faresultmyapplication1/signature/openharmony_sx.p7b b/ability/ability_runtime/freeinstalltest/startabilityforresultfatest/faresultmyapplication1/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/freeinstalltest/startabilityforresultfatest/faresultmyapplication1/signature/openharmony_sx.p7b and b/ability/ability_runtime/freeinstalltest/startabilityforresultfatest/faresultmyapplication1/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/freeinstalltest/startabilityforresultstagetest/actsfreeinstallstartabilityforresultstagetest/entry/src/main/module.json b/ability/ability_runtime/freeinstalltest/startabilityforresultstagetest/actsfreeinstallstartabilityforresultstagetest/entry/src/main/module.json index 5772ab67c68ab5c6b0942eb4f8f8165e550546d0..6180dbba72246deffaafb5d2586edf9f0f3024ca 100644 --- a/ability/ability_runtime/freeinstalltest/startabilityforresultstagetest/actsfreeinstallstartabilityforresultstagetest/entry/src/main/module.json +++ b/ability/ability_runtime/freeinstalltest/startabilityforresultstagetest/actsfreeinstallstartabilityforresultstagetest/entry/src/main/module.json @@ -35,17 +35,11 @@ ], "requestPermissions": [ { - "name": "ohos.permission.GET_BUNDLE_INFO_PRIVILEGED" + "name": "ohos.permission.DISTRIBUTED_DATASYNC" }, { "name": "ohos.permission.GET_BUNDLE_INFO" - }, - { - "name": "ohos.permission.CHANGE_ABILITY_ENABLED_STATE" - }, - { - "name": "ohos.permission.DISTRIBUTED_DATASYNC" - } + } ] } } \ No newline at end of file diff --git a/ability/ability_runtime/freeinstalltest/startabilityforresultstagetest/actsfreeinstallstartabilityforresultstagetest/signature/openharmony_sx.p7b b/ability/ability_runtime/freeinstalltest/startabilityforresultstagetest/actsfreeinstallstartabilityforresultstagetest/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/freeinstalltest/startabilityforresultstagetest/actsfreeinstallstartabilityforresultstagetest/signature/openharmony_sx.p7b and b/ability/ability_runtime/freeinstalltest/startabilityforresultstagetest/actsfreeinstallstartabilityforresultstagetest/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/freeinstalltest/startabilityforresultstagetest/actsstartabilityforresultnotargetbundleliststagetest/entry/src/main/module.json b/ability/ability_runtime/freeinstalltest/startabilityforresultstagetest/actsstartabilityforresultnotargetbundleliststagetest/entry/src/main/module.json index 5772ab67c68ab5c6b0942eb4f8f8165e550546d0..4f0eb835069cfdbc7cdb65d39417086876bc9cfd 100644 --- a/ability/ability_runtime/freeinstalltest/startabilityforresultstagetest/actsstartabilityforresultnotargetbundleliststagetest/entry/src/main/module.json +++ b/ability/ability_runtime/freeinstalltest/startabilityforresultstagetest/actsstartabilityforresultnotargetbundleliststagetest/entry/src/main/module.json @@ -35,16 +35,10 @@ ], "requestPermissions": [ { - "name": "ohos.permission.GET_BUNDLE_INFO_PRIVILEGED" + "name": "ohos.permission.DISTRIBUTED_DATASYNC" }, { "name": "ohos.permission.GET_BUNDLE_INFO" - }, - { - "name": "ohos.permission.CHANGE_ABILITY_ENABLED_STATE" - }, - { - "name": "ohos.permission.DISTRIBUTED_DATASYNC" } ] } diff --git a/ability/ability_runtime/freeinstalltest/startabilityforresultstagetest/actsstartabilityforresultnotargetbundleliststagetest/signature/openharmony_sx.p7b b/ability/ability_runtime/freeinstalltest/startabilityforresultstagetest/actsstartabilityforresultnotargetbundleliststagetest/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..1521b7baabf7a1327bb2e87ffc268c1c20995ffb 100644 Binary files a/ability/ability_runtime/freeinstalltest/startabilityforresultstagetest/actsstartabilityforresultnotargetbundleliststagetest/signature/openharmony_sx.p7b and b/ability/ability_runtime/freeinstalltest/startabilityforresultstagetest/actsstartabilityforresultnotargetbundleliststagetest/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/freeinstalltest/startabilityforresultstagetest/atomizationresultstageentry/signature/openharmony_sx.p7b b/ability/ability_runtime/freeinstalltest/startabilityforresultstagetest/atomizationresultstageentry/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/freeinstalltest/startabilityforresultstagetest/atomizationresultstageentry/signature/openharmony_sx.p7b and b/ability/ability_runtime/freeinstalltest/startabilityforresultstagetest/atomizationresultstageentry/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/freeinstalltest/startabilityforresultstagetest/atomizationresultstagehm2/signature/openharmony_sx.p7b b/ability/ability_runtime/freeinstalltest/startabilityforresultstagetest/atomizationresultstagehm2/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/freeinstalltest/startabilityforresultstagetest/atomizationresultstagehm2/signature/openharmony_sx.p7b and b/ability/ability_runtime/freeinstalltest/startabilityforresultstagetest/atomizationresultstagehm2/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/freeinstalltest/startabilityforresultstagetest/atomizationresultstagehnm2/signature/openharmony_sx.p7b b/ability/ability_runtime/freeinstalltest/startabilityforresultstagetest/atomizationresultstagehnm2/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/freeinstalltest/startabilityforresultstagetest/atomizationresultstagehnm2/signature/openharmony_sx.p7b and b/ability/ability_runtime/freeinstalltest/startabilityforresultstagetest/atomizationresultstagehnm2/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/freeinstalltest/startabilityforresultstagetest/stageresultmyapplication1/signature/openharmony_sx.p7b b/ability/ability_runtime/freeinstalltest/startabilityforresultstagetest/stageresultmyapplication1/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/freeinstalltest/startabilityforresultstagetest/stageresultmyapplication1/signature/openharmony_sx.p7b and b/ability/ability_runtime/freeinstalltest/startabilityforresultstagetest/stageresultmyapplication1/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/freeinstalltest/startabilitystagetest/actsfreeinstallstartabilitystagetest/entry/src/main/ets/test/StartAbilityTest.ets b/ability/ability_runtime/freeinstalltest/startabilitystagetest/actsfreeinstallstartabilitystagetest/entry/src/main/ets/test/StartAbilityTest.ets index 22757545e331a254a6438da620ed39dc23800766..111135394070ae743fd5c76156f24e95cff97454 100644 --- a/ability/ability_runtime/freeinstalltest/startabilitystagetest/actsfreeinstallstartabilitystagetest/entry/src/main/ets/test/StartAbilityTest.ets +++ b/ability/ability_runtime/freeinstalltest/startabilitystagetest/actsfreeinstallstartabilitystagetest/entry/src/main/ets/test/StartAbilityTest.ets @@ -1121,33 +1121,6 @@ export default function startAbilityTest(abilityContext) { done(); }); - /* - * @tc.number FreeInstall_Stage_Local_StartAbility_3500 - * @tc.name Service to pull up the service of the atomized service to realize the installation free process - * @tc.desc Function test - * @tc.level 0 - */ - it("FreeInstall_Stage_Local_StartAbility_3500", 0, async function (done) { - console.info("------------start FreeInstall_Stage_Local_StartAbility_3500-------------"); - TAG = "FreeInstall_Stage_Local_StartAbility_3500"; - commonEvent.createSubscriber(subscribeInfo, CreateSubscriberCallBack); - abilityForeground(TAG); - await sleep(1000); - var str = { - "bundleName": "com.open.harmony.packagemag", - "abilityName": "com.open.harmony.packagemag.ServiceAbility", - } - globalThis.abilityContext.startAbility(str).then((data) => { - console.log(TAG + ": startAbility success. data: " + JSON.stringify(data)); - }).catch((error) => { - console.log(TAG + ": startAbility fail. err: " + JSON.stringify(error)); - }); - await sleep(2000); - expect(result).assertEqual("onSuccess"); - console.info("------------end FreeInstall_Stage_Local_StartAbility_3500-------------"); - done(); - }); - /* * @tc.number FreeInstall_Stage_Local_StartAbility_1900 * @tc.name The current service is not in the foreground. Page a jumps to page B first. diff --git a/ability/ability_runtime/freeinstalltest/startabilitystagetest/actsfreeinstallstartabilitystagetest/entry/src/main/module.json b/ability/ability_runtime/freeinstalltest/startabilitystagetest/actsfreeinstallstartabilitystagetest/entry/src/main/module.json index a4f6dcd2acac0b72ffda7398dd17fb5d38164a4c..155324336b101cde09180315a374de3e2973ca06 100644 --- a/ability/ability_runtime/freeinstalltest/startabilitystagetest/actsfreeinstallstartabilitystagetest/entry/src/main/module.json +++ b/ability/ability_runtime/freeinstalltest/startabilitystagetest/actsfreeinstallstartabilitystagetest/entry/src/main/module.json @@ -41,23 +41,14 @@ } ], "requestPermissions": [ - { - "name": "ohos.permission.GET_BUNDLE_INFO_PRIVILEGED" - }, - { - "name": "ohos.permission.GET_BUNDLE_INFO" - }, - { - "name": "ohos.permission.CHANGE_ABILITY_ENABLED_STATE" - }, { "name": "ohos.permission.DISTRIBUTED_DATASYNC" }, { - "name": "ohos.permission.START_ABILITIES_FROM_BACKGROUND" + "name": "ohos.permission.GET_BUNDLE_INFO" }, { - "name": "ohos.permission.START_INVISIBLE_ABILITY" + "name": "ohos.permission.GET_BUNDLE_INFO_PRIVILEGED" } ], "extensionAbilities": [ diff --git a/ability/ability_runtime/freeinstalltest/startabilitystagetest/actsfreeinstallstartabilitystagetest/signature/openharmony_sx.p7b b/ability/ability_runtime/freeinstalltest/startabilitystagetest/actsfreeinstallstartabilitystagetest/signature/openharmony_sx.p7b index dcec6c9615032c1b48bf185e839d9720dd68aab0..10578d2713e1ae31c77641e06ee62879e451ab2f 100755 Binary files a/ability/ability_runtime/freeinstalltest/startabilitystagetest/actsfreeinstallstartabilitystagetest/signature/openharmony_sx.p7b and b/ability/ability_runtime/freeinstalltest/startabilitystagetest/actsfreeinstallstartabilitystagetest/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/freeinstalltest/startabilitystagetest/actsstartabilitynotargetbundleliststagetest/signature/openharmony_sx.p7b b/ability/ability_runtime/freeinstalltest/startabilitystagetest/actsstartabilitynotargetbundleliststagetest/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/freeinstalltest/startabilitystagetest/actsstartabilitynotargetbundleliststagetest/signature/openharmony_sx.p7b and b/ability/ability_runtime/freeinstalltest/startabilitystagetest/actsstartabilitynotargetbundleliststagetest/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/freeinstalltest/startabilitystagetest/atomizationstageentry/entry/src/main/module.json b/ability/ability_runtime/freeinstalltest/startabilitystagetest/atomizationstageentry/entry/src/main/module.json index 3e1063d9dd551afe5581570b310221b0d65f0b12..dd22b61cbeab684cbaa9278e837cdade5d3292c9 100644 --- a/ability/ability_runtime/freeinstalltest/startabilitystagetest/atomizationstageentry/entry/src/main/module.json +++ b/ability/ability_runtime/freeinstalltest/startabilitystagetest/atomizationstageentry/entry/src/main/module.json @@ -35,16 +35,10 @@ ], "requestPermissions": [ { - "name": "ohos.permission.GET_BUNDLE_INFO_PRIVILEGED" + "name": "ohos.permission.DISTRIBUTED_DATASYNC" }, { "name": "ohos.permission.GET_BUNDLE_INFO" - }, - { - "name": "ohos.permission.CHANGE_ABILITY_ENABLED_STATE" - }, - { - "name": "ohos.permission.DISTRIBUTED_DATASYNC" } ], "extensionAbilities": [ diff --git a/ability/ability_runtime/freeinstalltest/startabilitystagetest/atomizationstageentry/signature/openharmony_sx.p7b b/ability/ability_runtime/freeinstalltest/startabilitystagetest/atomizationstageentry/signature/openharmony_sx.p7b index dcec6c9615032c1b48bf185e839d9720dd68aab0..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100755 Binary files a/ability/ability_runtime/freeinstalltest/startabilitystagetest/atomizationstageentry/signature/openharmony_sx.p7b and b/ability/ability_runtime/freeinstalltest/startabilitystagetest/atomizationstageentry/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/freeinstalltest/startabilitystagetest/atomizationstagehm2/entry/src/main/module.json b/ability/ability_runtime/freeinstalltest/startabilitystagetest/atomizationstagehm2/entry/src/main/module.json index 71879587c36fd42db5a5c7bfac23c3e302ce56b6..76b8db711fc8ffc00d409b4eb9f21502f7aa81a5 100644 --- a/ability/ability_runtime/freeinstalltest/startabilitystagetest/atomizationstagehm2/entry/src/main/module.json +++ b/ability/ability_runtime/freeinstalltest/startabilitystagetest/atomizationstagehm2/entry/src/main/module.json @@ -35,16 +35,10 @@ ], "requestPermissions": [ { - "name": "ohos.permission.GET_BUNDLE_INFO_PRIVILEGED" + "name": "ohos.permission.DISTRIBUTED_DATASYNC" }, { "name": "ohos.permission.GET_BUNDLE_INFO" - }, - { - "name": "ohos.permission.CHANGE_ABILITY_ENABLED_STATE" - }, - { - "name": "ohos.permission.DISTRIBUTED_DATASYNC" } ] } diff --git a/ability/ability_runtime/freeinstalltest/startabilitystagetest/atomizationstagehm2/signature/openharmony_sx.p7b b/ability/ability_runtime/freeinstalltest/startabilitystagetest/atomizationstagehm2/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/freeinstalltest/startabilitystagetest/atomizationstagehm2/signature/openharmony_sx.p7b and b/ability/ability_runtime/freeinstalltest/startabilitystagetest/atomizationstagehm2/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/freeinstalltest/startabilitystagetest/atomizationstagehm4/signature/openharmony_sx.p7b b/ability/ability_runtime/freeinstalltest/startabilitystagetest/atomizationstagehm4/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/freeinstalltest/startabilitystagetest/atomizationstagehm4/signature/openharmony_sx.p7b and b/ability/ability_runtime/freeinstalltest/startabilitystagetest/atomizationstagehm4/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/freeinstalltest/startabilitystagetest/stagemyapplication1/signature/openharmony_sx.p7b b/ability/ability_runtime/freeinstalltest/startabilitystagetest/stagemyapplication1/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/freeinstalltest/startabilitystagetest/stagemyapplication1/signature/openharmony_sx.p7b and b/ability/ability_runtime/freeinstalltest/startabilitystagetest/stagemyapplication1/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/killprocesswithaccountstage/ActsKillProcessWithAccountRelyHap/signature/openharmony_sx.p7b b/ability/ability_runtime/killprocesswithaccountstage/ActsKillProcessWithAccountRelyHap/signature/openharmony_sx.p7b index cc53179a48f88f20acc379c138a001e9a15838f6..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/killprocesswithaccountstage/ActsKillProcessWithAccountRelyHap/signature/openharmony_sx.p7b and b/ability/ability_runtime/killprocesswithaccountstage/ActsKillProcessWithAccountRelyHap/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/killprocesswithaccountstage/ActsKillProcessWithAccountTest/entry/src/main/module.json b/ability/ability_runtime/killprocesswithaccountstage/ActsKillProcessWithAccountTest/entry/src/main/module.json index 9d1b0a8d10674bf9b63159d28084cacb12e0eee1..6208eac6aeb076d32c38d5d581afb486389b06bd 100644 --- a/ability/ability_runtime/killprocesswithaccountstage/ActsKillProcessWithAccountTest/entry/src/main/module.json +++ b/ability/ability_runtime/killprocesswithaccountstage/ActsKillProcessWithAccountTest/entry/src/main/module.json @@ -37,28 +37,16 @@ ], "requestPermissions": [ { - "name": "ohos.permission.GET_BUNDLE_INFO_PRIVILEGED", - "reason": "need use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED" + "name": "ohos.permission.CLEAN_BACKGROUND_PROCESSES", + "reason": "need use ohos.permission.GET_RUNNING_INFO" }, { "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" + "name": "ohos.permission.GET_BUNDLE_INFO_PRIVILEGED", + "reason": "need use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED" }, { "name": "ohos.permission.GET_RUNNING_INFO", @@ -67,18 +55,6 @@ { "name": "ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS", "reason": "need use ohos.permission.GET_RUNNING_INFO" - }, - { - "name": "ohos.permission.CLEAN_BACKGROUND_PROCESSES", - "reason": "need use ohos.permission.GET_RUNNING_INFO" - }, - { - "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" } ] } diff --git a/ability/ability_runtime/killprocesswithaccountstage/ActsKillProcessWithAccountTest/signature/openharmony_sx.p7b b/ability/ability_runtime/killprocesswithaccountstage/ActsKillProcessWithAccountTest/signature/openharmony_sx.p7b index cc53179a48f88f20acc379c138a001e9a15838f6..31ab61037ce3a8e20a419abb93647a99571c38e5 100644 Binary files a/ability/ability_runtime/killprocesswithaccountstage/ActsKillProcessWithAccountTest/signature/openharmony_sx.p7b and b/ability/ability_runtime/killprocesswithaccountstage/ActsKillProcessWithAccountTest/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/newwant/actsnewwantapi7relyhap/entry/src/main/config.json b/ability/ability_runtime/newwant/actsnewwantapi7relyhap/entry/src/main/config.json index aba783286db7e5f179b10d27b6135157fd1268b2..a6d0dcf4ce736a376e07bc79a4db1035b051edea 100644 --- a/ability/ability_runtime/newwant/actsnewwantapi7relyhap/entry/src/main/config.json +++ b/ability/ability_runtime/newwant/actsnewwantapi7relyhap/entry/src/main/config.json @@ -47,33 +47,9 @@ } ], "reqPermissions": [ - { - "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.START_ABILITIES_FROM_BACKGROUND", - "reason":"need use ohos.permission.START_ABILITIES_FROM_BACKGROUND" } ], "js": [ diff --git a/ability/ability_runtime/newwant/actsnewwantapi7relyhap/signature/openharmony_sx.p7b b/ability/ability_runtime/newwant/actsnewwantapi7relyhap/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/newwant/actsnewwantapi7relyhap/signature/openharmony_sx.p7b and b/ability/ability_runtime/newwant/actsnewwantapi7relyhap/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/newwant/actsnewwantarelyhap/entry/src/main/module.json b/ability/ability_runtime/newwant/actsnewwantarelyhap/entry/src/main/module.json index 0adc912adb2bbe4ba176c37156240f16b4dc34c0..849da36abd721b4c83ec3376ff7f41423a61547f 100644 --- a/ability/ability_runtime/newwant/actsnewwantarelyhap/entry/src/main/module.json +++ b/ability/ability_runtime/newwant/actsnewwantarelyhap/entry/src/main/module.json @@ -36,33 +36,9 @@ } ], "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.START_ABILITIES_FROM_BACKGROUND", - "reason": "need use ohos.permission.START_ABILITIES_FROM_BACKGROUND" } ] } diff --git a/ability/ability_runtime/newwant/actsnewwantarelyhap/signature/openharmony_sx.p7b b/ability/ability_runtime/newwant/actsnewwantarelyhap/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/newwant/actsnewwantarelyhap/signature/openharmony_sx.p7b and b/ability/ability_runtime/newwant/actsnewwantarelyhap/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/newwant/actsnewwantbrelyhap/entry/src/main/module.json b/ability/ability_runtime/newwant/actsnewwantbrelyhap/entry/src/main/module.json index 78eba1bff37c9b18915419e14eaab30a80878a4a..ff46a35ecd219644022ae4c31dbfe09468066f1e 100644 --- a/ability/ability_runtime/newwant/actsnewwantbrelyhap/entry/src/main/module.json +++ b/ability/ability_runtime/newwant/actsnewwantbrelyhap/entry/src/main/module.json @@ -36,33 +36,9 @@ } ], "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.START_ABILITIES_FROM_BACKGROUND", - "reason": "need use ohos.permission.START_ABILITIES_FROM_BACKGROUND" } ] } diff --git a/ability/ability_runtime/newwant/actsnewwantbrelyhap/signature/openharmony_sx.p7b b/ability/ability_runtime/newwant/actsnewwantbrelyhap/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/newwant/actsnewwantbrelyhap/signature/openharmony_sx.p7b and b/ability/ability_runtime/newwant/actsnewwantbrelyhap/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/newwant/actsnewwantrelyhap/entry/src/main/ets/MainAbility/MainAbility.ts b/ability/ability_runtime/newwant/actsnewwantrelyhap/entry/src/main/ets/MainAbility/MainAbility.ts index 153190f2bd79b7052d7119b2c30b8786211f088e..fa1d74c0f0161c19d89a72516300266ab0eaa6ae 100644 --- a/ability/ability_runtime/newwant/actsnewwantrelyhap/entry/src/main/ets/MainAbility/MainAbility.ts +++ b/ability/ability_runtime/newwant/actsnewwantrelyhap/entry/src/main/ets/MainAbility/MainAbility.ts @@ -81,10 +81,10 @@ export default class MainAbility extends Ability { }) } if (globalThis.abilityWant.action == 'startMainAbility0700') { - globalThis.abilityContext.connectAbility({ + globalThis.abilityContext.startAbility({ bundleName: "com.example.newwanthap", - abilityName: "com.example.newwanthapa.ServiceAbility", - action: "connectServiceAbility0700" + abilityName: "com.example.newwanthapa.SecondAbility", + action: "restartSecondAbility0700" }, (error, data) => { console.log('ACTS_NewWant MainAbility onForeground - startAbility startServiceAbility: ' + JSON.stringify(error) + ", " + JSON.stringify(data)) diff --git a/ability/ability_runtime/newwant/actsnewwantrelyhap/entry/src/main/ets/ServiceAbility/ServiceAbility.ts b/ability/ability_runtime/newwant/actsnewwantrelyhap/entry/src/main/ets/ServiceAbility/ServiceAbility.ts deleted file mode 100644 index 213d8a9b8b8c9edbf692aa94ab21dbc540496f9e..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/newwant/actsnewwantrelyhap/entry/src/main/ets/ServiceAbility/ServiceAbility.ts +++ /dev/null @@ -1,64 +0,0 @@ -/* - * 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 ServiceExtension from '@ohos.application.ServiceExtensionAbility'; -import Want from '@ohos.application.Want'; -import rpc from "@ohos.rpc"; - -function sleep(delay) { - let start = new Date().getTime(); - while (true) { - if (new Date().getTime() - start > delay) { - break; - } - } -} - -export default class ServiceAbility extends ServiceExtension { - onCreate(want: Want) { - globalThis.abilityWant = want; - console.log('ACTS_NewWant ServiceAbility onCreate, want: ' + want.abilityName); - } - - onRequest(want, startId) { - console.log('ACTS_NewWant ServiceAbility onRequest, want: ' + want.abilityName + ', startId: ' + startId); - } - - onConnect(want) { - sleep(1000) - var connId; - console.log('ACTS_NewWant ServiceAbility onConnect, want:' + want.abilityName); - globalThis.extensionContext = this.context - if (globalThis.abilityWant.action == 'connectServiceAbility0700') { - console.log('ACTS_NewWant ServiceAbility onConnect, action:' + globalThis.abilityWant.action); - this.context.startAbility( - { - bundleName: "com.example.newwanthap", - abilityName: "com.example.newwanthapa.SecondAbility", - action: "restartSecondAbility0700" - }, - ) - } - return new rpc.RemoteObject('connect'); - } - - onDisconnect(want) { - console.log('ACTS_NewWant ServiceAbility onDisconnect, want:' + want.abilityName); - } - - onDestroy() { - console.log('ACTS_NewWant ServiceAbility onDestroy'); - } -}; diff --git a/ability/ability_runtime/newwant/actsnewwantrelyhap/entry/src/main/ets/ServiceAbility/service.ts b/ability/ability_runtime/newwant/actsnewwantrelyhap/entry/src/main/ets/ServiceAbility/service.ts deleted file mode 100644 index 8f18a61d57fe4cc71cd70bae4d9378d284df0e2c..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/newwant/actsnewwantrelyhap/entry/src/main/ets/ServiceAbility/service.ts +++ /dev/null @@ -1,26 +0,0 @@ -/* - * 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. - */ - -export default { - onStart() { - console.info('ServiceAbility onStart'); - }, - onStop() { - console.info('ServiceAbility onStop'); - }, - onCommand(want, startId) { - console.info('ServiceAbility onCommand'); - } -}; \ No newline at end of file diff --git a/ability/ability_runtime/newwant/actsnewwantrelyhap/entry/src/main/module.json b/ability/ability_runtime/newwant/actsnewwantrelyhap/entry/src/main/module.json index d397aaecb44c002e0b01d245ca3262b8fce74d35..2b356a796093007e7a684fbb22a2e82aa0dcbcb7 100644 --- a/ability/ability_runtime/newwant/actsnewwantrelyhap/entry/src/main/module.json +++ b/ability/ability_runtime/newwant/actsnewwantrelyhap/entry/src/main/module.json @@ -45,45 +45,10 @@ "launchType": "singleton" } ], - "extensionAbilities": [ - { - "srcEntrance": "./ets/ServiceAbility/ServiceAbility.ts", - "name": "com.example.newwanthapa.ServiceAbility", - "icon": "$media:icon", - "srcLanguage": "ets", - "description": "$string:phone_entry_main", - "type": "service", - "visible": true - } - ], "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.START_ABILITIES_FROM_BACKGROUND", - "reason": "need use ohos.permission.START_ABILITIES_FROM_BACKGROUND" } ] } diff --git a/ability/ability_runtime/newwant/actsnewwantrelyhap/signature/openharmony_sx.p7b b/ability/ability_runtime/newwant/actsnewwantrelyhap/signature/openharmony_sx.p7b index dcec6c9615032c1b48bf185e839d9720dd68aab0..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100755 Binary files a/ability/ability_runtime/newwant/actsnewwantrelyhap/signature/openharmony_sx.p7b and b/ability/ability_runtime/newwant/actsnewwantrelyhap/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/newwant/actsnewwanttest/entry/src/main/module.json b/ability/ability_runtime/newwant/actsnewwanttest/entry/src/main/module.json index 59794b636629f81509a2ffa8b0931bee69eeacd8..f8213cbeb779cdfa36b4c9fb06217a20f27f0e71 100644 --- a/ability/ability_runtime/newwant/actsnewwanttest/entry/src/main/module.json +++ b/ability/ability_runtime/newwant/actsnewwanttest/entry/src/main/module.json @@ -36,49 +36,13 @@ } ], "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" + "name": "ohos.permission.GET_BUNDLE_INFO", + "reason": "need use ohos.permission.GET_BUNDLE_INFO" } ] } diff --git a/ability/ability_runtime/newwant/actsnewwanttest/signature/openharmony_sx.p7b b/ability/ability_runtime/newwant/actsnewwanttest/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/newwant/actsnewwanttest/signature/openharmony_sx.p7b and b/ability/ability_runtime/newwant/actsnewwanttest/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/non_concurrent/acts_systemappa_test/entry/src/main/ets/ServiceAbility/ServiceAbility.ts b/ability/ability_runtime/non_concurrent/acts_systemappa_test/entry/src/main/ets/ServiceAbility/ServiceAbility.ts deleted file mode 100644 index 77bc1694c1374b3055ad904f2a64acd3a6f6464c..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/non_concurrent/acts_systemappa_test/entry/src/main/ets/ServiceAbility/ServiceAbility.ts +++ /dev/null @@ -1,61 +0,0 @@ -/* - * 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 ServiceExtension from '@ohos.application.ServiceExtensionAbility' -import commonEvent from '@ohos.commonEvent' -import rpc from '@ohos.rpc'; -class Stub extends rpc.RemoteObject { - constructor(des) { - super(des); - } - // process client's request - onRemoteRequest(code, data, reply, option) { - reply.writeNoException(); - reply.writeString("success"); - return true; - } -} -function PublishCallBackOne8() { - console.debug("====>Publish CallBack ACTS_AbilityPermission_0400====>"); - console.debug("====>close this context====>0400====>") -} -export default class ServiceAbility extends ServiceExtension { - onCreate(want) { - console.log('ServiceAbility onCreate, want: ' + want.abilityName); - } - - onRequest(want, startId) { - console.log('ServiceAbility onRequest, want: ' + want.abilityName + ', startId: ' + startId); - } - - onConnect(want) { - console.log('ServiceAbility onConnect, want:' + want.abilityName); - console.log('ServiceAbility onConnect, action:' + want.action); - if (want.action == 'StartAbilityPromise') { - commonEvent.publish("ACTS_AbilityPermission_0400_Start_CommonEvent", PublishCallBackOne8); - var myStub = new Stub("com.example.actsabilitypermissiontest.ServiceAbility"); - console.log('ThirdAbility onConnect before returnU100:') - return myStub; - console.log('after return') - } - } - - onDisconnect(want) { - console.log('ServiceAbility onDisconnect, want:' + want.abilityName); - } - - onDestroy() { - console.log('ServiceAbility onDestroy'); - } -} \ No newline at end of file diff --git a/ability/ability_runtime/non_concurrent/acts_systemappa_test/entry/src/main/ets/ServiceAbility/service.ts b/ability/ability_runtime/non_concurrent/acts_systemappa_test/entry/src/main/ets/ServiceAbility/service.ts deleted file mode 100644 index af219b5e18c7a8228170921c67c330c9e0f9df36..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/non_concurrent/acts_systemappa_test/entry/src/main/ets/ServiceAbility/service.ts +++ /dev/null @@ -1,11 +0,0 @@ -export default { - onStart() { - console.info('ServiceAbility onStart'); - }, - onStop() { - console.info('ServiceAbility onStop'); - }, - onCommand(want, startId) { - console.info('ServiceAbility onCommand'); - } -}; \ No newline at end of file diff --git a/ability/ability_runtime/non_concurrent/acts_systemappa_test/entry/src/main/ets/test/AbilityPermission.test.ets b/ability/ability_runtime/non_concurrent/acts_systemappa_test/entry/src/main/ets/test/AbilityPermission.test.ets index 552a99bcb589f266e17f11dfb4b684c9d4b12de9..69f48355c9fcf7d53665c4ac8fb7333dc06741b2 100644 --- a/ability/ability_runtime/non_concurrent/acts_systemappa_test/entry/src/main/ets/test/AbilityPermission.test.ets +++ b/ability/ability_runtime/non_concurrent/acts_systemappa_test/entry/src/main/ets/test/AbilityPermission.test.ets @@ -22,9 +22,6 @@ var AbilityPermission1 = { var AbilityPermission3 = { events: ["ACTS_AbilityPermission_0300_Start_CommonEvent"] } -var AbilityPermission4 = { - events: ["ACTS_AbilityPermission_0400_Start_CommonEvent"] -} var AbilityPermission6 = { events: ["ACTS_AbilityPermission_0600_Start_CommonEvent"] } @@ -145,82 +142,6 @@ export default function abilityPermissionTest() { setTimeout(timeout, START_ABILITY_TIMEOUT); }) - /* - * @tc.number: ACTS_AbilityPermission_0400 - * @tc.name: In non-concurrent mode, if the target application is not the current user, it is forbidden to start - * @tc.desc: Bind an Ability to which you belong with the current user - */ - it('ACTS_AbilityPermission_0400', 0, async function (done) { - console.log("ACTS_AbilityPermission_0400====>callback start====>") - let Subscriber - var flag = true - - function SubscribeCallBack(err, data) { - expect(data.event == "ACTS_AbilityPermission_0400_Start_CommonEvent").assertTrue(); - console.debug("====>0400 Subscribe CallBack data:====>" + JSON.stringify(data)); - globalThis.abilityContext.disconnectAbility(globalThis.number).then((data) => { - console.debug("====>data is====>" + JSON.stringify(data)); - }) - console.log('====>disconnectAbility finish'); - } - - function onConnectCallback(element, remote) { - console.log('ACTS_AbilityPermission_0400_Start_CommonEvent onConnectCallback====> element=' + JSON.stringify(element)); - console.log('ACTS_AbilityPermission_0400_Start_CommonEvent onConnectCallback====> remote=' + JSON.stringify(remote)); - setTimeout(() => { - console.log('====>in timeout'); - console.debug("====>flag is====>" + JSON.stringify(flag)); - if (flag == true) { - console.debug('ACTS_AbilityPermission_0400_Start_CommonEvent - timeout'); - commonEvent.unsubscribe(Subscriber, UnSubscribeCallback); - } - }, 1000); - } - - function onDisconnectCallback(element) { - console.log('onDisconnectCallback====> element=' + JSON.stringify(element)); - } - - function onFailedCallback(code) { - console.log('onFailedCallback====> code=' + JSON.stringify(code)) - commonEvent.unsubscribe(Subscriber, UnSubscribeCallback) - } - - commonEvent.createSubscriber(AbilityPermission4).then(async (data) => { - console.debug("====>Create Subscriber====>"); - Subscriber = data; - commonEvent.subscribe(Subscriber, SubscribeCallBack); - console.debug("====>0400start connectAbility====>"); - globalThis.number = await globalThis.abilityContext.connectAbilityWithAccount( - { - bundleName: 'com.example.actsabilitypermissiontest', - abilityName: 'com.example.actsabilitypermissiontest.ServiceAbility', - action: "StartAbilityPromise" - }, userA, { - onConnect: onConnectCallback, - onDisconnect: onDisconnectCallback, - onFailed: onFailedCallback - }) - console.debug("====>number is====>" + JSON.stringify(globalThis.number)); - }) - - function UnSubscribeCallback() { - console.debug("====>UnSubscribeCallback====>"); - flag = false - done() - } - - function timeout() { - console.debug('in ACTS_AbilityPermission_0400_Start_CommonEvent timeout'); - if (flag == true) { - expect().assertFail(); - console.debug('ACTS_AbilityPermission_0400_Start_CommonEvent - timeout'); - commonEvent.unsubscribe(Subscriber, UnSubscribeCallback) - } - } - setTimeout(timeout, START_ABILITY_TIMEOUT); - }) - /* * @tc.number: ACTS_AbilityPermission_0600 * @tc.name: In non-concurrent mode, if the target application is not the current user, it is forbidden to start diff --git a/ability/ability_runtime/non_concurrent/acts_systemappa_test/entry/src/main/module.json b/ability/ability_runtime/non_concurrent/acts_systemappa_test/entry/src/main/module.json index 7ec9d22fbd80bb6052a6c589cdd3342385938d19..82a0380edc07096c6e467fe6d9877bd414b1a2c7 100644 --- a/ability/ability_runtime/non_concurrent/acts_systemappa_test/entry/src/main/module.json +++ b/ability/ability_runtime/non_concurrent/acts_systemappa_test/entry/src/main/module.json @@ -53,77 +53,14 @@ ] } ], - "extensionAbilities": [ - { - "srcEntrance": "./ets/ServiceAbility/ServiceAbility.ts", - "name": "com.example.actsabilitypermissiontest.ServiceAbility", - "icon": "$media:icon", - "srcLanguage": "ets", - "description": "$string:phone_entry_main", - "type": "service", - "visible": true - } - ], "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.MANAGE_LOCAL_ACCOUNTS", - "reason":"need use ohos.permission.MANAGE_LOCAL_ACCOUNTS" - }, - { - "name":"ohos.permission.INTERACT_ACROSS)LOCAL_ACCOUNTS_EXTENSION", - "reason":"need use ohos.permission.INTERACT_ACROSS)LOCAL_ACCOUNTS_EXTENSION" - }, - { - "name":"ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS", - "reason":"need use ohos.permission.GET_RUNNING_INFO" - }, - { - "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" + "name":"ohos.permission.GET_BUNDLE_INFO", + "reason":"need use ohos.permission.GET_BUNDLE_INFO" } ] } diff --git a/ability/ability_runtime/non_concurrent/acts_systemappa_test/signature/openharmony_sx.p7b b/ability/ability_runtime/non_concurrent/acts_systemappa_test/signature/openharmony_sx.p7b index dcec6c9615032c1b48bf185e839d9720dd68aab0..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100755 Binary files a/ability/ability_runtime/non_concurrent/acts_systemappa_test/signature/openharmony_sx.p7b and b/ability/ability_runtime/non_concurrent/acts_systemappa_test/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/non_concurrent/acts_systemappone_rely_test/entry/src/main/ets/ServiceAbility/ServiceAbility.ts b/ability/ability_runtime/non_concurrent/acts_systemappone_rely_test/entry/src/main/ets/ServiceAbility/ServiceAbility.ts deleted file mode 100644 index b0945501c0667c0feb6f22bb9868d639221349b0..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/non_concurrent/acts_systemappone_rely_test/entry/src/main/ets/ServiceAbility/ServiceAbility.ts +++ /dev/null @@ -1,60 +0,0 @@ -/* - * 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 ServiceExtension from '@ohos.application.ServiceExtensionAbility' -import commonEvent from '@ohos.commonEvent' -import rpc from '@ohos.rpc'; -class Stub extends rpc.RemoteObject { - constructor(des) { - super(des); - } - // process client's request - onRemoteRequest(code, data, reply, option) { - reply.writeNoException(); - reply.writeString("success"); - return true; - } -} -function PublishCallBackOne8() { - console.debug("====>Publish CallBack ACTS_AbilityPermission_0600====>"); - console.debug("====>close this context====>0600====>") -} -export default class ServiceAbility extends ServiceExtension { - onCreate(want) { - console.log('====>user101====>') - } - - onRequest(want, startId) { - console.log('ServiceAbility onRequest, want: ' + want.abilityName + ', startId: ' + startId); - } - - onConnect(want) { - console.log('ServiceAbility onConnect, want:' + want.abilityName); - if (want.action == 'StartAbilityPromise') { - commonEvent.publish("ACTS_AbilityPermission_0600_Start_CommonEvent", PublishCallBackOne8); - var myStub = new Stub("com.example.actssystemappuonehundredonerelytest.ServiceAbility"); - console.log('ThirdAbility onConnect before return:') - return myStub; - console.log('ServiceAbility onCreate, want: ' + want.abilityName); - } - } - - onDisconnect(want) { - console.log('ServiceAbility onDisconnect, want:' + want.abilityName); - } - - onDestroy() { - console.log('ServiceAbility onDestroy'); - } -} \ No newline at end of file diff --git a/ability/ability_runtime/non_concurrent/acts_systemappone_rely_test/entry/src/main/ets/ServiceAbility/service.ts b/ability/ability_runtime/non_concurrent/acts_systemappone_rely_test/entry/src/main/ets/ServiceAbility/service.ts deleted file mode 100644 index af219b5e18c7a8228170921c67c330c9e0f9df36..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/non_concurrent/acts_systemappone_rely_test/entry/src/main/ets/ServiceAbility/service.ts +++ /dev/null @@ -1,11 +0,0 @@ -export default { - onStart() { - console.info('ServiceAbility onStart'); - }, - onStop() { - console.info('ServiceAbility onStop'); - }, - onCommand(want, startId) { - console.info('ServiceAbility onCommand'); - } -}; \ No newline at end of file diff --git a/ability/ability_runtime/non_concurrent/acts_systemappone_rely_test/entry/src/main/module.json b/ability/ability_runtime/non_concurrent/acts_systemappone_rely_test/entry/src/main/module.json index 11b7bada79901f5ac61f4e7c70b074948d9b4b8b..7d216453ecbb068459e156ae39950f39ec663f54 100644 --- a/ability/ability_runtime/non_concurrent/acts_systemappone_rely_test/entry/src/main/module.json +++ b/ability/ability_runtime/non_concurrent/acts_systemappone_rely_test/entry/src/main/module.json @@ -33,17 +33,6 @@ } ] } - ], - "extensionAbilities": [ - { - "srcEntrance": "./ets/ServiceAbility/ServiceAbility.ts", - "name": "com.example.actssystemappuonehundredonerelytest.ServiceAbility", - "icon": "$media:icon", - "srcLanguage": "ets", - "description": "$string:phone_entry_main", - "type": "service", - "visible": true - } ] } } diff --git a/ability/ability_runtime/non_concurrent/acts_systemappone_rely_test/signature/openharmony_sx.p7b b/ability/ability_runtime/non_concurrent/acts_systemappone_rely_test/signature/openharmony_sx.p7b index dcec6c9615032c1b48bf185e839d9720dd68aab0..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100755 Binary files a/ability/ability_runtime/non_concurrent/acts_systemappone_rely_test/signature/openharmony_sx.p7b and b/ability/ability_runtime/non_concurrent/acts_systemappone_rely_test/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/non_concurrent/actsthirdappatest/Test.json b/ability/ability_runtime/non_concurrent/actsthirdappatest/Test.json index 2a55bbcf5e642a24d7e1ac081e999df645070d21..e8f26a5ec2c0e6f99be45520754c02eb0a64c109 100755 --- a/ability/ability_runtime/non_concurrent/actsthirdappatest/Test.json +++ b/ability/ability_runtime/non_concurrent/actsthirdappatest/Test.json @@ -11,11 +11,7 @@ { "type": "ShellKit", "run-command": [ - "setenforce 0", - "power-shell setmode 602", - "hilog -Q pidoff", - "hilog -Q domainoff", - "hilog -b D" + "power-shell setmode 602" ] }, { diff --git a/ability/ability_runtime/non_concurrent/actsthirdappatest/entry/src/main/ets/ServiceAbility/ServiceAbility.ts b/ability/ability_runtime/non_concurrent/actsthirdappatest/entry/src/main/ets/ServiceAbility/ServiceAbility.ts deleted file mode 100755 index 00537164520f1e7f4713bd890c9a9e2e3a5b338c..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/non_concurrent/actsthirdappatest/entry/src/main/ets/ServiceAbility/ServiceAbility.ts +++ /dev/null @@ -1,61 +0,0 @@ -/* - * 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 ServiceExtension from '@ohos.application.ServiceExtensionAbility' -import commonEvent from '@ohos.commonEvent' -import rpc from '@ohos.rpc'; -class Stub extends rpc.RemoteObject { - constructor(des) { - super(des); - } - // process client's request - onRemoteRequest(code, data, reply, option) { - reply.writeNoException(); - reply.writeString("success"); - return true; - } -} -function PublishCallBackOne8() { - console.debug("====>Publish CallBack ACTS_ThirdPartyAbilityPermission_0400====>"); - console.debug("====>close this context====>0400====>") -} -export default class ServiceAbility extends ServiceExtension{ - onCreate(want) { - console.log('ServiceAbility onCreate, want: ' + want.abilityName); - } - - onRequest(want, startId) { - console.log('ServiceAbility onRequest, want: ' + want.abilityName + ', startId: ' + startId); - } - - onConnect(want) { - console.log('ServiceAbility onConnect, want:' + want.abilityName); - console.log('ServiceAbility onConnect, action:' + want.action); - if (want.action == 'StartAbilityPromise') { - commonEvent.publish("ACTS_ThirdPartyAbilityPermission_0400_Start_CommonEvent", PublishCallBackOne8); - var myStub = new Stub("com.example.actsabilitypermissionthirdtest.ServiceAbility"); - console.log('ThirdAbility onConnect before returnU100:') - console.log('after return') - return myStub; - } - } - - onDisconnect(want) { - console.log('ServiceAbility onDisconnect, want:' + want.abilityName); - } - - onDestroy() { - console.log('ServiceAbility onDestroy'); - } -} \ No newline at end of file diff --git a/ability/ability_runtime/non_concurrent/actsthirdappatest/entry/src/main/ets/ServiceAbility/service.ts b/ability/ability_runtime/non_concurrent/actsthirdappatest/entry/src/main/ets/ServiceAbility/service.ts deleted file mode 100755 index eeded288941dc3898e44cab2082e800f6b6f8a14..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/non_concurrent/actsthirdappatest/entry/src/main/ets/ServiceAbility/service.ts +++ /dev/null @@ -1,25 +0,0 @@ -/* - * 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. - */ -export default { - onStart() { - console.info('ServiceAbility onStart'); - }, - onStop() { - console.info('ServiceAbility onStop'); - }, - onCommand(want, startId) { - console.info('ServiceAbility onCommand'); - } -}; \ No newline at end of file diff --git a/ability/ability_runtime/non_concurrent/actsthirdappatest/entry/src/main/ets/test/AbilityPermission.test.ets b/ability/ability_runtime/non_concurrent/actsthirdappatest/entry/src/main/ets/test/AbilityPermission.test.ets index 5532d6eda151b158e2e10ab5b525a729b8bc326d..b76f99e9319e13eb863f324b3f4dd1819aa59c18 100755 --- a/ability/ability_runtime/non_concurrent/actsthirdappatest/entry/src/main/ets/test/AbilityPermission.test.ets +++ b/ability/ability_runtime/non_concurrent/actsthirdappatest/entry/src/main/ets/test/AbilityPermission.test.ets @@ -21,9 +21,6 @@ var AbilityPermission1 = { var AbilityPermission3 = { events: ["ACTS_ThirdPartyAbilityPermission_0300_Start_CommonEvent"] } -var AbilityPermission4 = { - events: ["ACTS_ThirdPartyAbilityPermission_0400_Start_CommonEvent"] -} var AbilityPermission6 = { events: ["ACTS_ThirdPartyAbilityPermission_0600_Start_CommonEvent"] } @@ -125,85 +122,6 @@ export default function abilityPermissionTest() { setTimeout(timeout, START_ABILITY_TIMEOUT); }) - /* - * @tc.number: ACTS_ThirdPartyAbilityPermission_0400 - * @tc.name: In non-concurrent mode, if the target application is not the current user, it is forbidden to start - * @tc.desc: Bind an Ability to which you belong with the current user - */ - it('ACTS_ThirdPartyAbilityPermission_0400', 0, async function (done) { - console.log("ACTS_ThirdPartyAbilityPermission_0400====>callback start====>") - let Subscriber - var flag = true - - function SubscribeCallBack(err, data) { - expect(data.event == "ACTS_ThirdPartyAbilityPermission_0400_Start_CommonEvent").assertTrue(); - console.debug("====>0400 Subscribe CallBack data:====>" + JSON.stringify(data)); - globalThis.abilityContext.disconnectAbility(globalThis.number).then((data) => { - console.debug("====>data is====>" + JSON.stringify(data)); - }) - console.log('====>disconnectAbility finish'); - } - - function onConnectCallback(element, remote) { - console.log('ACTS_ThirdPartyAbilityPermission_0400_Start_CommonEvent onConnectCallback====>'+ - ' element=' + JSON.stringify(element)); - console.log('ACTS_ThirdPartyAbilityPermission_0400_Start_CommonEvent onConnectCallback====>'+ - ' remote=' + JSON.stringify(remote)); - setTimeout(() => { - console.log('====>in timeout'); - console.debug("====>flag is====>" + JSON.stringify(flag)); - if (flag == true) { - console.debug('ACTS_ThirdPartyAbilityPermission_0400_Start_CommonEvent - timeout'); - commonEvent.unsubscribe(Subscriber, UnSubscribeCallback); - } - }, 1000); - } - - function onDisconnectCallback(element) { - console.log('onDisconnectCallback====> element=' + JSON.stringify(element)); - } - - function onFailedCallback(code) { - console.log('onFailedCallback====> code=' + JSON.stringify(code)) - commonEvent.unsubscribe(Subscriber, UnSubscribeCallback) - } - - commonEvent.createSubscriber(AbilityPermission4).then(async (data) => { - console.debug("====>Create Subscriber====>"); - Subscriber = data; - commonEvent.subscribe(Subscriber, SubscribeCallBack); - console.debug("====>0400start connectAbility====>"); - globalThis.number = await globalThis.abilityContext.connectAbilityWithAccount( - { - bundleName: 'com.example.actsabilitypermissionthirdtest', - abilityName: 'ServiceAbility', - action: "StartAbilityPromise" - }, userA, { - onConnect: onConnectCallback, - onDisconnect: onDisconnectCallback, - onFailed: onFailedCallback - }) - console.debug("====>number is====>" + JSON.stringify(globalThis.number)); - }) - - function UnSubscribeCallback() { - console.debug("====>UnSubscribeCallback====>"); - flag = false - done() - } - - function timeout() { - console.debug('in ACTS_ThirdPartyAbilityPermission_0400_Start_CommonEvent timeout'); - if (flag == true) { - expect().assertFail(); - console.debug('ACTS_ThirdPartyAbilityPermission_0400_Start_CommonEvent - timeout'); - commonEvent.unsubscribe(Subscriber, UnSubscribeCallback) - } - } - - setTimeout(timeout, START_ABILITY_TIMEOUT); - }) - /* * @tc.number: ACTS_ThirdPartyAbilityPermission_0600 * @tc.name: In non-concurrent mode, if the target application is not the current user, it is forbidden to start diff --git a/ability/ability_runtime/non_concurrent/actsthirdappatest/entry/src/main/module.json b/ability/ability_runtime/non_concurrent/actsthirdappatest/entry/src/main/module.json index 22cbe512b90f2d351b5727a411d0f282e3b6b246..88cdbb44ad85e1104fce4301a0c805b2b97b6be1 100755 --- a/ability/ability_runtime/non_concurrent/actsthirdappatest/entry/src/main/module.json +++ b/ability/ability_runtime/non_concurrent/actsthirdappatest/entry/src/main/module.json @@ -41,17 +41,6 @@ "label": "$string:MainAbility2_label", "launchType": "standard" } - ], - "extensionAbilities": [ - { - "srcEntrance": "./ets/ServiceAbility/ServiceAbility.ts", - "name": "ServiceAbility", - "icon": "$media:icon", - "srcLanguage": "ets", - "description": "$string:Service_desc", - "label": "$string:Service_label", - "type": "service|dataShare" - } ] } } diff --git a/ability/ability_runtime/non_concurrent/actsthirdappatest/signature/openharmony_sx.p7b b/ability/ability_runtime/non_concurrent/actsthirdappatest/signature/openharmony_sx.p7b index f06e218defa7f707e22a3890903c574e1c498217..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100755 Binary files a/ability/ability_runtime/non_concurrent/actsthirdappatest/signature/openharmony_sx.p7b and b/ability/ability_runtime/non_concurrent/actsthirdappatest/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/non_concurrent/actsthirdapponerelytest/entry/src/main/ets/ServiceAbility/ServiceAbility.ts b/ability/ability_runtime/non_concurrent/actsthirdapponerelytest/entry/src/main/ets/ServiceAbility/ServiceAbility.ts deleted file mode 100755 index c128900cec9d80c41c2818de1d712c5485b921cb..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/non_concurrent/actsthirdapponerelytest/entry/src/main/ets/ServiceAbility/ServiceAbility.ts +++ /dev/null @@ -1,60 +0,0 @@ -/* - * 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 ServiceExtension from '@ohos.application.ServiceExtensionAbility' -import commonEvent from '@ohos.commonEvent' -import rpc from '@ohos.rpc'; -class Stub extends rpc.RemoteObject { - constructor(des) { - super(des); - } - // process client's request - onRemoteRequest(code, data, reply, option) { - reply.writeNoException(); - reply.writeString("success"); - return true; - } -} -function PublishCallBackOne8() { - console.debug("====>Publish CallBack ACTS_ThirdPartyAbilityPermission_0600====>"); - console.debug("====>close this context====>0600====>") -} -export default class ServiceAbility extends ServiceExtension { - onCreate(want) { - console.log('====>user101====>') - } - - onRequest(want, startId) { - console.log('ServiceAbility onRequest, want: ' + want.abilityName + ', startId: ' + startId); - } - - onConnect(want) { - console.log('ServiceAbility onConnect, want:' + want.abilityName); - if (want.action == 'StartAbilityPromise') { - commonEvent.publish("ACTS_ThirdPartyAbilityPermission_0600_Start_CommonEvent", PublishCallBackOne8); - var myStub = new Stub("com.example.actsthirdappuonehundredone.ServiceAbility"); - console.log('ThirdAbility onConnect before return:') - console.log('ServiceAbility onCreate, want: ' + want.abilityName); - return myStub; - } - } - - onDisconnect(want) { - console.log('ServiceAbility onDisconnect, want:' + want.abilityName); - } - - onDestroy() { - console.log('ServiceAbility onDestroy'); - } -} \ No newline at end of file diff --git a/ability/ability_runtime/non_concurrent/actsthirdapponerelytest/entry/src/main/ets/ServiceAbility/service.ts b/ability/ability_runtime/non_concurrent/actsthirdapponerelytest/entry/src/main/ets/ServiceAbility/service.ts deleted file mode 100755 index eeded288941dc3898e44cab2082e800f6b6f8a14..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/non_concurrent/actsthirdapponerelytest/entry/src/main/ets/ServiceAbility/service.ts +++ /dev/null @@ -1,25 +0,0 @@ -/* - * 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. - */ -export default { - onStart() { - console.info('ServiceAbility onStart'); - }, - onStop() { - console.info('ServiceAbility onStop'); - }, - onCommand(want, startId) { - console.info('ServiceAbility onCommand'); - } -}; \ No newline at end of file diff --git a/ability/ability_runtime/non_concurrent/actsthirdapponerelytest/entry/src/main/module.json b/ability/ability_runtime/non_concurrent/actsthirdapponerelytest/entry/src/main/module.json index 6e02fafea0ee46c770e689a64bd8544cfdb4623a..d60d0b2098bc014f53359a2f39c6273547b4db98 100755 --- a/ability/ability_runtime/non_concurrent/actsthirdapponerelytest/entry/src/main/module.json +++ b/ability/ability_runtime/non_concurrent/actsthirdapponerelytest/entry/src/main/module.json @@ -33,17 +33,6 @@ } ] } - ], - "extensionAbilities": [ - { - "srcEntrance": "./ets/ServiceAbility/ServiceAbility.ts", - "name": "ServiceAbility", - "icon": "$media:icon", - "srcLanguage": "ets", - "description": "$string:phone_entry_main", - "type": "service|dataShare", - "visible": true - } ] } } diff --git a/ability/ability_runtime/non_concurrent/actsthirdapponerelytest/signature/openharmony_sx.p7b b/ability/ability_runtime/non_concurrent/actsthirdapponerelytest/signature/openharmony_sx.p7b index f06e218defa7f707e22a3890903c574e1c498217..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100755 Binary files a/ability/ability_runtime/non_concurrent/actsthirdapponerelytest/signature/openharmony_sx.p7b and b/ability/ability_runtime/non_concurrent/actsthirdapponerelytest/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/processmultiinstance/actsamsprocessmultiinstancehapaarelyhap/signature/openharmony_sx.p7b b/ability/ability_runtime/processmultiinstance/actsamsprocessmultiinstancehapaarelyhap/signature/openharmony_sx.p7b index cc53179a48f88f20acc379c138a001e9a15838f6..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/processmultiinstance/actsamsprocessmultiinstancehapaarelyhap/signature/openharmony_sx.p7b and b/ability/ability_runtime/processmultiinstance/actsamsprocessmultiinstancehapaarelyhap/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/processmultiinstance/actsamsprocessmultiinstancehapabrelyhap/signature/openharmony_sx.p7b b/ability/ability_runtime/processmultiinstance/actsamsprocessmultiinstancehapabrelyhap/signature/openharmony_sx.p7b index dcec6c9615032c1b48bf185e839d9720dd68aab0..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100755 Binary files a/ability/ability_runtime/processmultiinstance/actsamsprocessmultiinstancehapabrelyhap/signature/openharmony_sx.p7b and b/ability/ability_runtime/processmultiinstance/actsamsprocessmultiinstancehapabrelyhap/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/processmultiinstance/actsamsprocessmultiinstancehapbarelyhap/signature/openharmony_sx.p7b b/ability/ability_runtime/processmultiinstance/actsamsprocessmultiinstancehapbarelyhap/signature/openharmony_sx.p7b index cc53179a48f88f20acc379c138a001e9a15838f6..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/processmultiinstance/actsamsprocessmultiinstancehapbarelyhap/signature/openharmony_sx.p7b and b/ability/ability_runtime/processmultiinstance/actsamsprocessmultiinstancehapbarelyhap/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/processmultiinstance/actsamsprocessmultiinstancehapbbrelyhap/signature/openharmony_sx.p7b b/ability/ability_runtime/processmultiinstance/actsamsprocessmultiinstancehapbbrelyhap/signature/openharmony_sx.p7b index cc53179a48f88f20acc379c138a001e9a15838f6..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/processmultiinstance/actsamsprocessmultiinstancehapbbrelyhap/signature/openharmony_sx.p7b and b/ability/ability_runtime/processmultiinstance/actsamsprocessmultiinstancehapbbrelyhap/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/processmultiinstance/actsamsprocessmultiinstancehapbcrelyhap/signature/openharmony_sx.p7b b/ability/ability_runtime/processmultiinstance/actsamsprocessmultiinstancehapbcrelyhap/signature/openharmony_sx.p7b index dcec6c9615032c1b48bf185e839d9720dd68aab0..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100755 Binary files a/ability/ability_runtime/processmultiinstance/actsamsprocessmultiinstancehapbcrelyhap/signature/openharmony_sx.p7b and b/ability/ability_runtime/processmultiinstance/actsamsprocessmultiinstancehapbcrelyhap/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/processmultiinstance/actsamsprocessmultiinstancehapbdrelyhap/signature/openharmony_sx.p7b b/ability/ability_runtime/processmultiinstance/actsamsprocessmultiinstancehapbdrelyhap/signature/openharmony_sx.p7b index dcec6c9615032c1b48bf185e839d9720dd68aab0..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100755 Binary files a/ability/ability_runtime/processmultiinstance/actsamsprocessmultiinstancehapbdrelyhap/signature/openharmony_sx.p7b and b/ability/ability_runtime/processmultiinstance/actsamsprocessmultiinstancehapbdrelyhap/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/processmultiinstance/actsamsprocessmultiinstancehapberelyhap/signature/openharmony_sx.p7b b/ability/ability_runtime/processmultiinstance/actsamsprocessmultiinstancehapberelyhap/signature/openharmony_sx.p7b index dcec6c9615032c1b48bf185e839d9720dd68aab0..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100755 Binary files a/ability/ability_runtime/processmultiinstance/actsamsprocessmultiinstancehapberelyhap/signature/openharmony_sx.p7b and b/ability/ability_runtime/processmultiinstance/actsamsprocessmultiinstancehapberelyhap/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/processmultiinstance/actsamsprocessmultiinstancehapbfrelyhap/signature/openharmony_sx.p7b b/ability/ability_runtime/processmultiinstance/actsamsprocessmultiinstancehapbfrelyhap/signature/openharmony_sx.p7b index dcec6c9615032c1b48bf185e839d9720dd68aab0..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100755 Binary files a/ability/ability_runtime/processmultiinstance/actsamsprocessmultiinstancehapbfrelyhap/signature/openharmony_sx.p7b and b/ability/ability_runtime/processmultiinstance/actsamsprocessmultiinstancehapbfrelyhap/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/processmultiinstance/actsamsprocessmultiinstancetest/entry/src/main/module.json b/ability/ability_runtime/processmultiinstance/actsamsprocessmultiinstancetest/entry/src/main/module.json index 1aef692ca4b5cfb4cd3bca4140487689d506d922..31a5c72d1b15ec8e96635e2353610ca8b01fc3a1 100644 --- a/ability/ability_runtime/processmultiinstance/actsamsprocessmultiinstancetest/entry/src/main/module.json +++ b/ability/ability_runtime/processmultiinstance/actsamsprocessmultiinstancetest/entry/src/main/module.json @@ -37,48 +37,20 @@ ], "requestPermissions": [ { - "name": "ohos.permission.GET_BUNDLE_INFO_PRIVILEGED", - "reason": "need use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED" + "name": "ohos.permission.CLEAN_BACKGROUND_PROCESSES", + "reason": "need use ohos.permission.CLEAN_BACKGROUND_PROCESSES" }, { "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_BUNDLE_INFO_PRIVILEGED", + "reason": "need use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED" }, { "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" } ] } diff --git a/ability/ability_runtime/processmultiinstance/actsamsprocessmultiinstancetest/signature/openharmony_sx.p7b b/ability/ability_runtime/processmultiinstance/actsamsprocessmultiinstancetest/signature/openharmony_sx.p7b index cc53179a48f88f20acc379c138a001e9a15838f6..788c4c1502063dd2fd2c5771fcc85fe69b670f5e 100644 Binary files a/ability/ability_runtime/processmultiinstance/actsamsprocessmultiinstancetest/signature/openharmony_sx.p7b and b/ability/ability_runtime/processmultiinstance/actsamsprocessmultiinstancetest/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/stage/actslifecyclemultihap2/entry/src/main/module.json b/ability/ability_runtime/stage/actslifecyclemultihap2/entry/src/main/module.json index fd62b7df5f73dad5d7f315c39a583728cf93ad1c..fae3abaf1f96409402fc94b1007ed5e873378a50 100644 --- a/ability/ability_runtime/stage/actslifecyclemultihap2/entry/src/main/module.json +++ b/ability/ability_runtime/stage/actslifecyclemultihap2/entry/src/main/module.json @@ -102,24 +102,6 @@ "requestPermissions": [ { "name": "ohos.permission.GET_BUNDLE_INFO" - }, - { - "name": "ohos.permission.MANAGE_MISSIONS" - }, - { - "name": "ohos.permission.INSTALL_BUNDLE" - }, - { - "name": "ohos.permission.GET_BUNDLE_INFO_PRIVILEGED" - }, - { - "name": "ohos.permission.CHANGE_ABILITY_ENABLED_STATE" - }, - { - "name": "ohos.permission.REMOVE_CACHE_FILES" - }, - { - "name": "ohos.permission.LISTEN_BUNDLE_CHANGE" } ] } diff --git a/ability/ability_runtime/stage/actslifecyclemultihap2/signature/openharmony_sx.p7b b/ability/ability_runtime/stage/actslifecyclemultihap2/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/stage/actslifecyclemultihap2/signature/openharmony_sx.p7b and b/ability/ability_runtime/stage/actslifecyclemultihap2/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/stage/actslifecyclemultihap3/entry/src/main/module.json b/ability/ability_runtime/stage/actslifecyclemultihap3/entry/src/main/module.json index 4db6a75093d67d9cca7ed5645006a58ae497b390..9e3445cb704b21fd04fa89fe4c1b5c1c83644460 100644 --- a/ability/ability_runtime/stage/actslifecyclemultihap3/entry/src/main/module.json +++ b/ability/ability_runtime/stage/actslifecyclemultihap3/entry/src/main/module.json @@ -51,24 +51,6 @@ "requestPermissions": [ { "name": "ohos.permission.GET_BUNDLE_INFO" - }, - { - "name": "ohos.permission.MANAGE_MISSIONS" - }, - { - "name": "ohos.permission.INSTALL_BUNDLE" - }, - { - "name": "ohos.permission.GET_BUNDLE_INFO_PRIVILEGED" - }, - { - "name": "ohos.permission.CHANGE_ABILITY_ENABLED_STATE" - }, - { - "name": "ohos.permission.REMOVE_CACHE_FILES" - }, - { - "name": "ohos.permission.LISTEN_BUNDLE_CHANGE" } ] } diff --git a/ability/ability_runtime/stage/actslifecyclemultihap3/signature/openharmony_sx.p7b b/ability/ability_runtime/stage/actslifecyclemultihap3/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/stage/actslifecyclemultihap3/signature/openharmony_sx.p7b and b/ability/ability_runtime/stage/actslifecyclemultihap3/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/stage/actslifecyclemultihaptest/entry/src/main/module.json b/ability/ability_runtime/stage/actslifecyclemultihaptest/entry/src/main/module.json index 937925c3f4a823243fe81f4e050388d252c63b8c..59e84ae256420ac45dddcd3c56da2ae05edfd19b 100644 --- a/ability/ability_runtime/stage/actslifecyclemultihaptest/entry/src/main/module.json +++ b/ability/ability_runtime/stage/actslifecyclemultihaptest/entry/src/main/module.json @@ -87,30 +87,6 @@ "requestPermissions": [ { "name": "ohos.permission.GET_BUNDLE_INFO" - }, - { - "name": "ohos.permission.MANAGE_MISSIONS" - }, - { - "name": "ohos.permission.INSTALL_BUNDLE" - }, - { - "name": "ohos.permission.GET_BUNDLE_INFO_PRIVILEGED" - }, - { - "name": "ohos.permission.CHANGE_ABILITY_ENABLED_STATE" - }, - { - "name": "ohos.permission.REMOVE_CACHE_FILES" - }, - { - "name": "ohos.permission.LISTEN_BUNDLE_CHANGE" - }, - { - "name": "ohos.permission.START_ABILITIES_FROM_BACKGROUND" - }, - { - "name": "ohos.permission.START_INVISIBLE_ABILITY" } ] } diff --git a/ability/ability_runtime/stage/actslifecyclemultihaptest/hap4/src/main/module.json b/ability/ability_runtime/stage/actslifecyclemultihaptest/hap4/src/main/module.json index 764e9f312660fed76c752bc076d930351021e81c..596d713cd69ec4c5f39820b551ddd186ff085bd2 100644 --- a/ability/ability_runtime/stage/actslifecyclemultihaptest/hap4/src/main/module.json +++ b/ability/ability_runtime/stage/actslifecyclemultihaptest/hap4/src/main/module.json @@ -38,24 +38,6 @@ "requestPermissions": [ { "name": "ohos.permission.GET_BUNDLE_INFO" - }, - { - "name": "ohos.permission.MANAGE_MISSIONS" - }, - { - "name": "ohos.permission.INSTALL_BUNDLE" - }, - { - "name": "ohos.permission.GET_BUNDLE_INFO_PRIVILEGED" - }, - { - "name": "ohos.permission.CHANGE_ABILITY_ENABLED_STATE" - }, - { - "name": "ohos.permission.REMOVE_CACHE_FILES" - }, - { - "name": "ohos.permission.LISTEN_BUNDLE_CHANGE" } ] } diff --git a/ability/ability_runtime/stage/actslifecyclemultihaptest/signature/openharmony_sx.p7b b/ability/ability_runtime/stage/actslifecyclemultihaptest/signature/openharmony_sx.p7b index dcec6c9615032c1b48bf185e839d9720dd68aab0..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100755 Binary files a/ability/ability_runtime/stage/actslifecyclemultihaptest/signature/openharmony_sx.p7b and b/ability/ability_runtime/stage/actslifecyclemultihaptest/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/stage/actslifecyclesinglehaptest/entry/src/main/module.json b/ability/ability_runtime/stage/actslifecyclesinglehaptest/entry/src/main/module.json index 7e935fc6f69aef1d40f733f1abd1763435f89a06..00594cbbfbaf0f5d4a5021514f15816e3f523e17 100644 --- a/ability/ability_runtime/stage/actslifecyclesinglehaptest/entry/src/main/module.json +++ b/ability/ability_runtime/stage/actslifecyclesinglehaptest/entry/src/main/module.json @@ -136,16 +136,6 @@ "icon": "$media:icon", "label": "$string:MainAbility12_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 diff --git a/ability/ability_runtime/stage/actslifecyclesinglehaptest/signature/openharmony_sx.p7b b/ability/ability_runtime/stage/actslifecyclesinglehaptest/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/stage/actslifecyclesinglehaptest/signature/openharmony_sx.p7b and b/ability/ability_runtime/stage/actslifecyclesinglehaptest/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/stage/actswindowstagelifecyclemultihaptest/entry/src/main/module.json b/ability/ability_runtime/stage/actswindowstagelifecyclemultihaptest/entry/src/main/module.json index 937925c3f4a823243fe81f4e050388d252c63b8c..59e84ae256420ac45dddcd3c56da2ae05edfd19b 100755 --- a/ability/ability_runtime/stage/actswindowstagelifecyclemultihaptest/entry/src/main/module.json +++ b/ability/ability_runtime/stage/actswindowstagelifecyclemultihaptest/entry/src/main/module.json @@ -87,30 +87,6 @@ "requestPermissions": [ { "name": "ohos.permission.GET_BUNDLE_INFO" - }, - { - "name": "ohos.permission.MANAGE_MISSIONS" - }, - { - "name": "ohos.permission.INSTALL_BUNDLE" - }, - { - "name": "ohos.permission.GET_BUNDLE_INFO_PRIVILEGED" - }, - { - "name": "ohos.permission.CHANGE_ABILITY_ENABLED_STATE" - }, - { - "name": "ohos.permission.REMOVE_CACHE_FILES" - }, - { - "name": "ohos.permission.LISTEN_BUNDLE_CHANGE" - }, - { - "name": "ohos.permission.START_ABILITIES_FROM_BACKGROUND" - }, - { - "name": "ohos.permission.START_INVISIBLE_ABILITY" } ] } diff --git a/ability/ability_runtime/stage/actswindowstagelifecyclemultihaptest/hap4/src/main/module.json b/ability/ability_runtime/stage/actswindowstagelifecyclemultihaptest/hap4/src/main/module.json index 764e9f312660fed76c752bc076d930351021e81c..596d713cd69ec4c5f39820b551ddd186ff085bd2 100755 --- a/ability/ability_runtime/stage/actswindowstagelifecyclemultihaptest/hap4/src/main/module.json +++ b/ability/ability_runtime/stage/actswindowstagelifecyclemultihaptest/hap4/src/main/module.json @@ -38,24 +38,6 @@ "requestPermissions": [ { "name": "ohos.permission.GET_BUNDLE_INFO" - }, - { - "name": "ohos.permission.MANAGE_MISSIONS" - }, - { - "name": "ohos.permission.INSTALL_BUNDLE" - }, - { - "name": "ohos.permission.GET_BUNDLE_INFO_PRIVILEGED" - }, - { - "name": "ohos.permission.CHANGE_ABILITY_ENABLED_STATE" - }, - { - "name": "ohos.permission.REMOVE_CACHE_FILES" - }, - { - "name": "ohos.permission.LISTEN_BUNDLE_CHANGE" } ] } diff --git a/ability/ability_runtime/stage/actswindowstagelifecyclemultihaptest/signature/openharmony_sx.p7b b/ability/ability_runtime/stage/actswindowstagelifecyclemultihaptest/signature/openharmony_sx.p7b index dcec6c9615032c1b48bf185e839d9720dd68aab0..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100755 Binary files a/ability/ability_runtime/stage/actswindowstagelifecyclemultihaptest/signature/openharmony_sx.p7b and b/ability/ability_runtime/stage/actswindowstagelifecyclemultihaptest/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/stage/actswindowstagelifecyclesinglehaptest/entry/src/main/module.json b/ability/ability_runtime/stage/actswindowstagelifecyclesinglehaptest/entry/src/main/module.json index 4463d1bf8ff747baa35845cb434c834f3ac5dee3..33173a72c91660664b05a17afbe70c09b95997b5 100755 --- a/ability/ability_runtime/stage/actswindowstagelifecyclesinglehaptest/entry/src/main/module.json +++ b/ability/ability_runtime/stage/actswindowstagelifecyclesinglehaptest/entry/src/main/module.json @@ -136,16 +136,6 @@ "icon": "$media:icon", "label": "$string:MainAbility12_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 diff --git a/ability/ability_runtime/stage/actswindowstagelifecyclesinglehaptest/signature/openharmony_sx.p7b b/ability/ability_runtime/stage/actswindowstagelifecyclesinglehaptest/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100755 Binary files a/ability/ability_runtime/stage/actswindowstagelifecyclesinglehaptest/signature/openharmony_sx.p7b and b/ability/ability_runtime/stage/actswindowstagelifecyclesinglehaptest/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/want/actsgetwantalltest/signature/openharmony_sx.p7b b/ability/ability_runtime/want/actsgetwantalltest/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/want/actsgetwantalltest/signature/openharmony_sx.p7b and b/ability/ability_runtime/want/actsgetwantalltest/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/want/actsgetwantalltest/src/main/config.json b/ability/ability_runtime/want/actsgetwantalltest/src/main/config.json index 1268e2c0fa834c2419b64b62654fabbeb1ba190e..1a4f436f15270e5bc1e97446165df6b5d904ced6 100644 --- a/ability/ability_runtime/want/actsgetwantalltest/src/main/config.json +++ b/ability/ability_runtime/want/actsgetwantalltest/src/main/config.json @@ -63,28 +63,6 @@ "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": [ { "pages": [ diff --git a/ability/ability_runtime/want/sceneProject/actsgetwantalltesthap/signature/openharmony_sx.p7b b/ability/ability_runtime/want/sceneProject/actsgetwantalltesthap/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/want/sceneProject/actsgetwantalltesthap/signature/openharmony_sx.p7b and b/ability/ability_runtime/want/sceneProject/actsgetwantalltesthap/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/want/sceneProject/actsgetwantalltesthap/src/main/config.json b/ability/ability_runtime/want/sceneProject/actsgetwantalltesthap/src/main/config.json index 809f2727215192afbfa6a5001be9ec31d50203f0..ce95279796d56fe8bd90bf51d554a9520b4cffed 100644 --- a/ability/ability_runtime/want/sceneProject/actsgetwantalltesthap/src/main/config.json +++ b/ability/ability_runtime/want/sceneProject/actsgetwantalltesthap/src/main/config.json @@ -46,28 +46,6 @@ "visible": true } ], - "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": [ { "pages": [ diff --git a/ability/ability_runtime/workercontextcover/workercontexttest/signature/openharmony_sx.p7b b/ability/ability_runtime/workercontextcover/workercontexttest/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..522ee12106c397c3b17abc81ea000a3dd2f0bb78 100644 Binary files a/ability/ability_runtime/workercontextcover/workercontexttest/signature/openharmony_sx.p7b and b/ability/ability_runtime/workercontextcover/workercontexttest/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/zidltest/BUILD.gn b/ability/ability_runtime/zidltest/BUILD.gn deleted file mode 100644 index c69bcff75081286174e6dcd57cb965057c7c23c4..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/zidltest/BUILD.gn +++ /dev/null @@ -1,24 +0,0 @@ -# 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") - -group("zidltest") { - testonly = true - if (is_standard_system) { - deps = [ - "actsamszidlclienttest:ActsAmsZidlClientTest", - "actsamszidlservice:ActsAmsZidlServiceRelyHap", - ] - } -} diff --git a/ability/ability_runtime/zidltest/actsamszidlclienttest/AppScope/app.json b/ability/ability_runtime/zidltest/actsamszidlclienttest/AppScope/app.json deleted file mode 100644 index 3567b671b330d5000c31f698382abd15a10fcab7..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/zidltest/actsamszidlclienttest/AppScope/app.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "app":{ - "bundleName":"com.example.zidlclienttest", - "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 - } - } -} diff --git a/ability/ability_runtime/zidltest/actsamszidlclienttest/AppScope/resources/base/element/string.json b/ability/ability_runtime/zidltest/actsamszidlclienttest/AppScope/resources/base/element/string.json deleted file mode 100644 index ee69f9a861d9dc269ed6638735d52674583498e1..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/zidltest/actsamszidlclienttest/AppScope/resources/base/element/string.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "string":[ - { - "name":"app_name", - "value":"ohosProject" - } - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/zidltest/actsamszidlclienttest/AppScope/resources/base/media/app_icon.png b/ability/ability_runtime/zidltest/actsamszidlclienttest/AppScope/resources/base/media/app_icon.png deleted file mode 100644 index 474a55588fd7216113dd42073aadf254d4dba023..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/zidltest/actsamszidlclienttest/AppScope/resources/base/media/app_icon.png and /dev/null differ diff --git a/ability/ability_runtime/zidltest/actsamszidlclienttest/BUILD.gn b/ability/ability_runtime/zidltest/actsamszidlclienttest/BUILD.gn deleted file mode 100644 index e846967bd3906d57aaaca238236d339f8864a8c0..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/zidltest/actsamszidlclienttest/BUILD.gn +++ /dev/null @@ -1,43 +0,0 @@ -# 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_js_hap_suite("ActsAmsZidlClientTest") { - hap_profile = "entry/src/main/module.json" - js_build_mode = "debug" - deps = [ - ":actsamszidlclienttest_js_assets", - ":actsamszidlclienttest_resources", - ] - ets2abc = true - certificate_profile = "signature/openharmony_sx.p7b" - hap_name = "ActsAmsZidlClientTest" - subsystem_name = "ability" - part_name = "ability_runtime" -} - -ohos_app_scope("actsamszidlclienttest_app_profile") { - app_profile = "AppScope/app.json" - sources = [ "AppScope/resources" ] -} - -ohos_js_assets("actsamszidlclienttest_js_assets") { - source_dir = "entry/src/main/ets" -} - -ohos_resources("actsamszidlclienttest_resources") { - sources = [ "entry/src/main/resources" ] - deps = [ ":actsamszidlclienttest_app_profile" ] - hap_profile = "entry/src/main/module.json" -} diff --git a/ability/ability_runtime/zidltest/actsamszidlclienttest/Test.json b/ability/ability_runtime/zidltest/actsamszidlclienttest/Test.json deleted file mode 100644 index dd53882afeddf9397989f323c34a867f69d4fd7a..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/zidltest/actsamszidlclienttest/Test.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "description": "Configuration for hjunit demo Tests", - "driver": { - "type": "JSUnitTest", - "test-timeout": "300000", - "package": "com.example.zidlclienttest", - "shell-timeout": "300000" - }, - "kits": [ - { - "test-file-name": [ - "ActsAmsZidlClientTest.hap", - "ActsAmsZidlServiceRelyHap.hap" - ], - "type": "AppInstallKit", - "cleanup-apps": true - }, - { - "type": "ShellKit", - "run-command": [ - "remount" - ] - }, - { - "type": "ShellKit", - "run-command": [ - "chmod 644 /data/*.hap" - ] - } - ] -} diff --git a/ability/ability_runtime/zidltest/actsamszidlclienttest/entry/src/main/ets/Application/AbilityStage.ts b/ability/ability_runtime/zidltest/actsamszidlclienttest/entry/src/main/ets/Application/AbilityStage.ts deleted file mode 100644 index 5e2915fe4fc033cd5c9bd579dc08fe7369e51016..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/zidltest/actsamszidlclienttest/entry/src/main/ets/Application/AbilityStage.ts +++ /dev/null @@ -1,23 +0,0 @@ -/* - * 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" - -export default class MyAbilityStage extends AbilityStage { - onCreate() { - console.log("MyAbilityStage onCreate") - globalThis.stageOnCreateRun = 1; - globalThis.stageContext = this.context; - } -} diff --git a/ability/ability_runtime/zidltest/actsamszidlclienttest/entry/src/main/ets/MainAbility/MainAbility.ts b/ability/ability_runtime/zidltest/actsamszidlclienttest/entry/src/main/ets/MainAbility/MainAbility.ts deleted file mode 100644 index 809b6249166af9f894e0713c2c85221af8c0972c..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/zidltest/actsamszidlclienttest/entry/src/main/ets/MainAbility/MainAbility.ts +++ /dev/null @@ -1,51 +0,0 @@ -/* - * 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' - -export default class MainAbility extends Ability { - onCreate(want,launchParam){ - // Ability is creating, initialize resources for this ability - console.log("ZidlClientTest onCreate") - globalThis.abilityWant = want; - } - - onDestroy() { - // Ability is destroying, release resources for this ability - console.log("ZidlClientTest onDestroy") - } - - onWindowStageCreate(windowStage) { - // Main window is created, set main page for this ability - console.log("ZidlClientTest onWindowStageCreate") - globalThis.abilityContext = this.context - windowStage.setUIContent(this.context, "pages/index/index", null) - console.log("ZidlClientTest onWindowStageCreate finish") - } - - onWindowStageDestroy() { - // Main window is destroyed, release UI related resources - console.log("ZidlClientTest onWindowStageDestroy") - } - - onForeground() { - // Ability has brought to foreground - console.log("ZidlClientTest onForeground") - } - - onBackground() { - // Ability has back to background - console.log("ZidlClientTest onBackground") - } -}; \ No newline at end of file diff --git a/ability/ability_runtime/zidltest/actsamszidlclienttest/entry/src/main/ets/ServiceAbility/ServiceAbility.ts b/ability/ability_runtime/zidltest/actsamszidlclienttest/entry/src/main/ets/ServiceAbility/ServiceAbility.ts deleted file mode 100644 index 7b18b7c147cd0cc232b5779698c1c264bc7f717e..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/zidltest/actsamszidlclienttest/entry/src/main/ets/ServiceAbility/ServiceAbility.ts +++ /dev/null @@ -1,434 +0,0 @@ -/* -* 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 ServiceExtension from '@ohos.application.ServiceExtensionAbility'; -import Want from '@ohos.application.Want'; -import {voidOutStringCallback} from "./zidlTool/i_zidl_tool_test"; -import {voidOutIntCallback} from "./zidlTool/i_zidl_tool_test"; -import {voidOutMapStringIntCallback} from "./zidlTool/i_zidl_tool_test"; -import {voidOutStringArrayCallback} from "./zidlTool/i_zidl_tool_test"; -import {voidInOutMapStringIntCallback} from "./zidlTool/i_zidl_tool_test"; -import {voidInOutStringArrayCallback} from "./zidlTool/i_zidl_tool_test"; -import {voidInOutIntCallback} from "./zidlTool/i_zidl_tool_test"; -import {voidInOutStringCallback} from "./zidlTool/i_zidl_tool_test"; -import {booleanVoidCallback} from "./zidlTool/i_zidl_tool_test"; -import {byteVoidCallback} from "./zidlTool/i_zidl_tool_test"; -import {shortVoidCallback} from "./zidlTool/i_zidl_tool_test"; -import {intVoidCallback} from "./zidlTool/i_zidl_tool_test"; -import {longVoidCallback} from "./zidlTool/i_zidl_tool_test"; -import {floatVoidCallback} from "./zidlTool/i_zidl_tool_test"; -import {doubleVoidCallback} from "./zidlTool/i_zidl_tool_test"; -import {stringVoidCallback} from "./zidlTool/i_zidl_tool_test"; -import {sequenceableVoidCallback} from "./zidlTool/i_zidl_tool_test"; -import {interfaceVoidCallback} from "./zidlTool/i_zidl_tool_test"; -import {mapStringStringVoidCallback} from "./zidlTool/i_zidl_tool_test"; -import {doubleArrayVoidCallback} from "./zidlTool/i_zidl_tool_test"; -import {voidOrderOutInCallback} from "./zidlTool/i_zidl_tool_test" -import {voidOrderInOutInCallback} from "./zidlTool/i_zidl_tool_test" -import {voidOrderOutInOutCallback} from "./zidlTool/i_zidl_tool_test" -import {voidOrderInInOutOutCallback} from "./zidlTool/i_zidl_tool_test" -import {onewayVoidVoidCallback} from "./zidlTool/i_zidl_tool_test" -import {voidInMapStringIntCallback} from "./zidlTool/i_zidl_tool_test" -import {voidVoidCallback} from "./zidlTool/i_zidl_tool_test" -import {voidInStringArrayCallback} from "./zidlTool/i_zidl_tool_test" -import ZidlTestServiceStub from './zidlTool/zidl_tool_test_stub'; -import MySequenceable from "./zidlTool/my_sequenceable"; -import InterfaceDeclareProxy from './interfaceDeclare/interface_declare_proxy' -import InterfaceDeclareStub from './interfaceDeclare/interface_declare_stub' -import {voidInIntCallback} from "./zidlTool/i_zidl_tool_test" -import {voidInStringCallback} from "./zidlTool/i_zidl_tool_test" -import {voidParameterTypeBooleanCallback} from "./zidlTool/i_zidl_tool_test" -import {voidParameterTypeByteCallback} from "./zidlTool/i_zidl_tool_test" -import {voidParameterTypeShortCallback} from "./zidlTool/i_zidl_tool_test" -import {voidParameterTypeIntCallback} from "./zidlTool/i_zidl_tool_test" -import {voidParameterTypeLongCallback} from "./zidlTool/i_zidl_tool_test" -import {voidParameterTypeFloatCallback} from "./zidlTool/i_zidl_tool_test" -import {voidParameterTypeDoubleCallback} from "./zidlTool/i_zidl_tool_test" -import {voidParameterTypeStringCallback} from "./zidlTool/i_zidl_tool_test" -import {voidParameterTypeSequenceableCallback} from "./zidlTool/i_zidl_tool_test" -import {voidParameterTypeInterfaceCallback} from "./zidlTool/i_zidl_tool_test" -import {voidParameterTypeMapStringStringCallback} from "./zidlTool/i_zidl_tool_test" -import {voidParameterTypeDoubleArrayCallback} from "./zidlTool/i_zidl_tool_test" -import {testInterfaceCallback} from './interfaceDeclare/i_interface_declare' - -var SUCCESS = 0; -var FAIL = 1; - -class ZidlTestImp extends ZidlTestServiceStub { - - onewayVoidVoid(callback: onewayVoidVoidCallback) { - console.log("ZidlTest Server ACTS_Zidl_Js2JsSingle_0200 called"); - callback(SUCCESS); - } - - voidVoid(callback: voidVoidCallback) { - console.log("ZidlTest Server ACTS_Zidl_Js2JsSingle_0300 called"); - callback(SUCCESS); - } - - booleanVoid(callback: booleanVoidCallback){ - console.log("ZidlTest Server ACTS_Zidl_Js2JsSingle_0400 called"); - var boolean = true; - callback(SUCCESS, boolean); - } - - byteVoid(callback: byteVoidCallback){ - console.log("ZidlTest Server ACTS_Zidl_Js2JsSingle_0500 called"); - var mybyte = 1; - callback(SUCCESS, mybyte); - } - - shortVoid(callback: shortVoidCallback){ - console.log("ZidlTest Server ACTS_Zidl_Js2JsSingle_0600 called"); - var myshort = 222; - callback(SUCCESS, myshort); - } - - intVoid(callback: intVoidCallback){ - console.log("ZidlTest Server ACTS_Zidl_Js2JsSingle_0700 called"); - var myint = 333; - callback(SUCCESS, myint); - } - - longVoid(callback: longVoidCallback){ - console.log("ZidlTest Server ACTS_Zidl_Js2JsSingle_0800 called"); - var mylong = 4444; - callback(SUCCESS, mylong); - } - - floatVoid(callback: floatVoidCallback){ - console.log("ZidlTest Server ACTS_Zidl_Js2JsSingle_0900 called"); - var myfloat = 10.1; - callback(SUCCESS, myfloat); - } - - doubleVoid(callback: doubleVoidCallback){ - console.log("ZidlTest Server ACTS_Zidl_Js2JsSingle_1000 called"); - var mydouble = 22.1; - callback(SUCCESS, mydouble); - } - - stringVoid(callback: stringVoidCallback){ - console.log("ZidlTest Server ACTS_Zidl_Js2JsSingle_1100 called"); - var mystring = "stringVoid"; - callback(SUCCESS, mystring); - } - - sequenceableVoid(callback: sequenceableVoidCallback){ - console.log("ZidlTest Server ACTS_Zidl_Js2JsSingle_1200 called"); - let mySequence = new MySequenceable(); - callback(SUCCESS, mySequence); - } - - interfaceVoid(callback: interfaceVoidCallback) { - class InterfaceDeclare extends InterfaceDeclareStub { - testInterface(data: number, callback: testInterfaceCallback): void{ - console.log("ZidlTest Server ACTS_Zidl_Js2JsSingle_1300 interfaceStub called"); - let result = FAIL; - - if (data == 1500) { - result = SUCCESS; - } - callback(result); - } - } - console.log("ZidlTest Server ACTS_Zidl_Js2JsSingle_1300 toolStub called"); - let serverInterface = new InterfaceDeclare('serverInterface'); - callback(SUCCESS, serverInterface); - } - - mapStringStringVoid(callback: mapStringStringVoidCallback){ - console.log("ZidlTest Server ACTS_Zidl_Js2JsSingle_1400 called"); - let myMap = new Map(); - myMap.set("string1","string2"); - callback(SUCCESS, myMap); - } - - doubleArrayVoid(callback: doubleArrayVoidCallback){ - console.log("ZidlTest Server ACTS_Zidl_Js2JsSingle_1500 called"); - var array = [1.1, 2.1, 3.1]; - callback(SUCCESS, array); - } - - voidInMapStringInt(myMap, callback: voidInMapStringIntCallback){ - console.log('ZidlTest Server ACTS_Zidl_Js2JsSingle_1600_1 called:'+ myMap.get("string1")); - if(myMap.get("string1") == 1){ - callback(SUCCESS); - }else{ - callback(FAIL); - } - } - - voidInStringArray(strarray, callback: voidInStringArrayCallback){ - console.log("ZidlTest Server ACTS_Zidl_Js2JsSingle_1600_2 called:"+ JSON.stringify(strarray)); - if(strarray[0] == "aaa"&&strarray[1] == "bbb"&&strarray[2] == "ccc"){ - callback(SUCCESS); - }else { - callback(FAIL); - } - } - - voidOutMapStringInt(callback : voidOutMapStringIntCallback){ - console.log('ZidlTest Server ACTS_Zidl_Js2JsSingle_1700 called'); - var map=new Map(); - map.set("voidOutMapStringInt", 1); - callback(SUCCESS, map); - } - - voidOutStringArray(callback :voidOutStringArrayCallback){ - console.log('ZidlTest Server ACTS_Zidl_Js2JsSingle_1700 called'); - var strarray = ["aa", "dd"]; - callback(SUCCESS, strarray); - } - - voidInOutMapStringInt(mapIn, callback: voidInOutMapStringIntCallback) { - console.log('ZidlTest Server ACTS_Zidl_Js2JsSingle_1800 called'); - var errCode = FAIL; - if ((mapIn.get("voidInOutMapStringInt1") == 1801) && - (mapIn.get("voidInOutMapStringInt2") == 1802)) { - mapIn.set("voidInOutMapStringInt1", 1802); - mapIn.set("voidInOutMapStringInt2", 1801); - errCode = SUCCESS; - } - callback(errCode, mapIn); - } - - voidInOutStringArray(strArrayIn, callback: voidInOutStringArrayCallback) { - console.log('ZidlTest Server ACTS_Zidl_Js2JsSingle_1800 called'); - var errCode = FAIL; - if ((strArrayIn[0] == "ddd") && - (strArrayIn[1] == "ccc")) { - strArrayIn[0] = "aaa"; - strArrayIn[1] = "bbb"; - errCode = SUCCESS; - } - callback(errCode, strArrayIn); - } - - voidInInt(number, callback : voidInIntCallback) { - console.log('ZidlTest Server ACTS_Zidl_Js2JsSingle_1900 called:'+ JSON.stringify(number)); - if(number == 8888){ - callback(SUCCESS); - }else{ - callback(FAIL); - } - } - - voidInString(string, callback : voidInStringCallback) { - console.log('ZidlTest Server ACTS_Zidl_Js2JsSingle_1900 called:'+ JSON.stringify(string)); - if(string == "voidInString"){ - callback(SUCCESS); - }else{ - callback(FAIL); - } - } - - voidOutInt(callback : voidOutIntCallback){ - console.log('ZidlTest Server ACTS_Zidl_Js2JsSingle_2000 called'); - var number = 123; - callback(SUCCESS, number); - } - - voidOutString(callback : voidOutStringCallback){ - console.log('ZidlTest Server ACTS_Zidl_Js2JsSingle_2000 called'); - var string = "voidOutString"; - callback(SUCCESS, string); - } - - voidInOutInt(number, callback: voidInOutIntCallback) { - console.log('ZidlTest Server ACTS_Zidl_Js2JsSingle_2100_1 called:'+ JSON.stringify(number)); - var num = 456789; - if(number == 123456){ - callback(SUCCESS, num); - }else{ - callback(FAIL, number); - console.log('ZidlTest Server ACTS_Zidl_Js2JsSingle_2100_1 Call_Fail') - } - } - voidInOutString(strinput, callback: voidInOutStringCallback) { - console.log('ZidlTest Server ACTS_Zidl_Js2JsSingle_2100_2 called:'+ JSON.stringify(strinput)); - var str = "456789"; - if(strinput == "voidInOutString"){ - callback(SUCCESS, str); - }else{ - console.log('ZidlTest Server ACTS_Zidl_Js2JsSingle_2100_2 Call_Fail'); - callback(FAIL, strinput); - } - } - - voidParameterTypeBoolean(oBooleanTrue, callback : voidParameterTypeBooleanCallback) { - console.log('ZidlTest Server ACTS_Zidl_Js2JsSingle_2200 called:'+ JSON.stringify(oBooleanTrue)); - if(oBooleanTrue == true){ - callback(SUCCESS); - }else{ - callback(FAIL); - } - } - - voidParameterTypeByte(number, callback : voidParameterTypeByteCallback) { - console.log('ZidlTest Server ACTS_Zidl_Js2JsSingle_2300 called:'+ JSON.stringify(number)); - if(number == 1111){ - callback(SUCCESS); - }else{ - callback(FAIL); - } - } - - voidParameterTypeShort(number, callback : voidParameterTypeShortCallback) { - console.log('ZidlTest Server ACTS_Zidl_Js2JsSingle_2400 called:'+ JSON.stringify(number)); - if(number == 2222){ - callback(SUCCESS); - }else{ - callback(FAIL); - } - } - - voidParameterTypeInt(number, callback : voidParameterTypeIntCallback) { - console.log('ZidlTest Server ACTS_Zidl_Js2JsSingle_2500 called:'+ JSON.stringify(number)); - if(number == 3333){ - callback(SUCCESS); - }else{ - callback(FAIL); - } - } - - voidParameterTypeLong(number, callback : voidParameterTypeLongCallback) { - console.log('ZidlTest Server ACTS_Zidl_Js2JsSingle_2600 called:'+ JSON.stringify(number)); - if(number == 4444){ - callback(SUCCESS); - }else{ - callback(FAIL); - } - } - - voidParameterTypeFloat(number, callback : voidParameterTypeFloatCallback) { - console.log('ZidlTest Server ACTS_Zidl_Js2JsSingle_2700 called:'+ JSON.stringify(number)); - if(number == 5555.1){ - callback(SUCCESS); - }else{ - callback(FAIL); - } - } - - voidParameterTypeDouble(number, callback : voidParameterTypeDoubleCallback) { - console.log('ZidlTest Server ACTS_Zidl_Js2JsSingle_2800 called:'+ JSON.stringify(number)); - if(number == 6666.1){ - callback(SUCCESS); - }else{ - callback(FAIL); - } - } - - voidParameterTypeString(string, callback : voidParameterTypeStringCallback) { - console.log('ZidlTest Server ACTS_Zidl_Js2JsSingle_2900 called:'+ JSON.stringify(string)); - if(string == "voidParameterTypeString"){ - callback(SUCCESS); - }else{ - callback(FAIL); - } - } - - voidParameterTypeSequenceable(MySequenceable, callback : voidParameterTypeSequenceableCallback) { - console.log('ZidlTest Process Server ACTS_Zidl_Js2JsSingle_3000 called:'+ JSON.stringify(MySequenceable)); - if((MySequenceable != null) && (MySequenceable.getNum() == 32) && (MySequenceable.getString() == "nihao")){ - callback(SUCCESS); - }else{ - callback(FAIL); - } - } - - voidParameterTypeInterface(param: InterfaceDeclareProxy, callback : voidParameterTypeInterfaceCallback) { - console.log("ZidlTest Server ACTS_Zidl_Js2JsSingle_3100 called"); - let proxy = new InterfaceDeclareProxy(param); - proxy.testInterface(3300, (errCode)=>{ - if (errCode == SUCCESS) { - console.log("ZidlTest Server ACTS_Zidl_Js2JsSingle_3100 callback SUCCESS"); - callback(SUCCESS); - } else { - console.log("ZidlTest Server ACTS_Zidl_Js2JsSingle_3100 callback FAIL"); - callback(FAIL); - } - }); - - } - - voidParameterTypeMapStringString(map, callback : voidParameterTypeMapStringStringCallback) { - console.log('ZidlTest Server ACTS_Zidl_Js2JsSingle_3200 called:'+ map.get("voidParameterTypeMapStringString")); - if(map.get("voidParameterTypeMapStringString") == "fdhatdh"){ - callback(SUCCESS); - }else{ - callback(FAIL); - } - } - - voidParameterTypeDoubleArray(array, callback : voidParameterTypeDoubleArrayCallback){ - console.log('ZidlTest Server ACTS_Zidl_Js2JsSingle_3300 called:'+ JSON.stringify(array)); - if(array.length == 2 && array[0] == 1.1 && array[1] == 2.1){ - callback(SUCCESS); - }else{ - callback(FAIL); - } - } - - voidOrderOutIn(paramI, callback: voidOrderOutInCallback){ - console.log("ZidlTest Server ACTS_Zidl_Js2JsSingle_3400 called" + paramI); - var mystring = "hello world"; - callback(SUCCESS, mystring); - } - - voidOrderInOutIn(paramI, paramS, callback: voidOrderInOutInCallback){ - console.log("ZidlTest Server ACTS_Zidl_Js2JsSingle_3500 called" + paramI + " " + paramS); - var mynumber = 6; - callback(SUCCESS, mynumber); - } - - voidOrderOutInOut(paramS, callback: voidOrderOutInOutCallback){ - console.log("ZidlTest Server ACTS_Zidl_Js2JsSingle_3600 called" + paramS); - var mynumber = 3; - var mystring = "paramcallback"; - callback(SUCCESS, mynumber, mystring); - } - - voidOrderInInOutOut(paramS, paramI, callback: voidOrderInInOutOutCallback){ - console.log("ZidlTest Server ACTS_Zidl_Js2JsSingle_3700 called" + paramS + " " + paramI); - var mystring = "callback"; - var mynumber = 4; - callback(SUCCESS, mynumber, mystring); - } -} - -export default class ServiceAbility extends ServiceExtension { - onCreate(want: Want) { - globalThis.abilityWant = want; - console.log('ZidlClientTest ServiceAbility onCreate, want: ' + want.abilityName); - } - - onRequest(want, startId) { - console.log('ZidlClientTest ServiceAbility onRequest, want: ' + want.abilityName - + ', startId: ' + startId); - } - - onConnect(want) { - console.log('ZidlClientTest ServiceAbility onConnect, want:' + want.abilityName); - return new ZidlTestImp('connect'); - } - - onDisconnect(want) { - console.log('ZidlClientTest ServiceAbility onDisconnect, want:' + want.abilityName); - } - - onDestroy() { - console.log('ZidlClientTest ServiceAbility onDestroy'); - } -}; diff --git a/ability/ability_runtime/zidltest/actsamszidlclienttest/entry/src/main/ets/ServiceAbility/interfaceDeclare/i_interface_declare.ts b/ability/ability_runtime/zidltest/actsamszidlclienttest/entry/src/main/ets/ServiceAbility/interfaceDeclare/i_interface_declare.ts deleted file mode 100644 index a9469ce4d7e1d4fbd3ec452076ab8121b8b8adf7..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/zidltest/actsamszidlclienttest/entry/src/main/ets/ServiceAbility/interfaceDeclare/i_interface_declare.ts +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (C) 2021 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. - */ - - -export default interface IInterfaceDeclare { - testInterface(data: number, callback: testInterfaceCallback): void; -} -export type testInterfaceCallback = (errCode: number) => void; - diff --git a/ability/ability_runtime/zidltest/actsamszidlclienttest/entry/src/main/ets/ServiceAbility/interfaceDeclare/interface_declare_proxy.ts b/ability/ability_runtime/zidltest/actsamszidlclienttest/entry/src/main/ets/ServiceAbility/interfaceDeclare/interface_declare_proxy.ts deleted file mode 100644 index 9f9cc9c43d3b15599f88aa223e7308c43b997e60..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/zidltest/actsamszidlclienttest/entry/src/main/ets/ServiceAbility/interfaceDeclare/interface_declare_proxy.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (C) 2021 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 {testInterfaceCallback} from "./i_interface_declare"; -import IInterfaceDeclare from "./i_interface_declare"; -import rpc from "@ohos.rpc"; - -export default class InterfaceDeclareProxy implements IInterfaceDeclare { - constructor(proxy) { - this.proxy = proxy; - } - - testInterface(data: number, callback: testInterfaceCallback): void - { - let _option = new rpc.MessageOption(rpc.MessageOption.TF_SYNC); - let _data = new rpc.MessageParcel(); - let _reply = new rpc.MessageParcel(); - _data.writeInt(data); - this.proxy.sendRequest(InterfaceDeclareProxy.COMMAND_TEST_INTERFACE, _data, _reply, _option).then(function(result) { - if (result.errCode === 0) { - let _errCode = result.reply.readInt(); - callback(_errCode); - } else { - console.log("sendRequest failed, errCode: " + result.errCode); - } - }) - } - - static readonly COMMAND_TEST_INTERFACE = 1; - private proxy -} - diff --git a/ability/ability_runtime/zidltest/actsamszidlclienttest/entry/src/main/ets/ServiceAbility/interfaceDeclare/interface_declare_stub.ts b/ability/ability_runtime/zidltest/actsamszidlclienttest/entry/src/main/ets/ServiceAbility/interfaceDeclare/interface_declare_stub.ts deleted file mode 100644 index 1606f77b4c0390be639f06cb093ee672cf05d478..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/zidltest/actsamszidlclienttest/entry/src/main/ets/ServiceAbility/interfaceDeclare/interface_declare_stub.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (C) 2021 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 {testInterfaceCallback} from "./i_interface_declare"; -import IInterfaceDeclare from "./i_interface_declare"; -import rpc from "@ohos.rpc"; - -export default class InterfaceDeclareStub extends rpc.RemoteObject implements IInterfaceDeclare { - constructor(des: string) { - super(des); - } - - onRemoteRequest(code: number, data, reply, option): boolean { - console.log("onRemoteRequest called, code = " + code); - switch(code) { - case InterfaceDeclareStub.COMMAND_TEST_INTERFACE: { - let _data = data.readInt(); - this.testInterface(_data, (errCode) => { - reply.writeInt(errCode); - }); - return true; - } - default: { - console.log("invalid request code" + code); - break; - } - } - return false; - } - - testInterface(data: number, callback: testInterfaceCallback): void{} - - static readonly COMMAND_TEST_INTERFACE = 1; -} - diff --git a/ability/ability_runtime/zidltest/actsamszidlclienttest/entry/src/main/ets/ServiceAbility/service.ts b/ability/ability_runtime/zidltest/actsamszidlclienttest/entry/src/main/ets/ServiceAbility/service.ts deleted file mode 100644 index b49731a414958a281c2f0c4eab0e7fb408eb2c2f..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/zidltest/actsamszidlclienttest/entry/src/main/ets/ServiceAbility/service.ts +++ /dev/null @@ -1,25 +0,0 @@ -/* -* 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. -*/ -export default { - onStart() { - console.info('ServiceAbility onStart'); - }, - onStop() { - console.info('ServiceAbility onStop'); - }, - onCommand(want, startId) { - console.info('ServiceAbility onCommand'); - } -}; \ No newline at end of file diff --git a/ability/ability_runtime/zidltest/actsamszidlclienttest/entry/src/main/ets/ServiceAbility/zidlTool/i_zidl_tool_test.ts b/ability/ability_runtime/zidltest/actsamszidlclienttest/entry/src/main/ets/ServiceAbility/zidlTool/i_zidl_tool_test.ts deleted file mode 100644 index ac9da635209b8b8a170f587485ab01a1e9844fcb..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/zidltest/actsamszidlclienttest/entry/src/main/ets/ServiceAbility/zidlTool/i_zidl_tool_test.ts +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright (C) 2021 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 MySequenceable from "./my_sequenceable"; -import IInterfaceDeclare from "../interfaceDeclare/i_interface_declare"; - -export default interface IZidlToolTest { - onewayVoidVoid(callback: onewayVoidVoidCallback): void; - voidVoid(callback: voidVoidCallback): void; - booleanVoid(callback: booleanVoidCallback): void; - byteVoid(callback: byteVoidCallback): void; - shortVoid(callback: shortVoidCallback): void; - intVoid(callback: intVoidCallback): void; - longVoid(callback: longVoidCallback): void; - floatVoid(callback: floatVoidCallback): void; - doubleVoid(callback: doubleVoidCallback): void; - stringVoid(callback: stringVoidCallback): void; - sequenceableVoid(callback: sequenceableVoidCallback): void; - interfaceVoid(callback: interfaceVoidCallback): void; - mapStringStringVoid(callback: mapStringStringVoidCallback): void; - doubleArrayVoid(callback: doubleArrayVoidCallback): void; - voidInMapStringInt(param: Map, callback: voidInMapStringIntCallback): void; - voidInStringArray(param: string[], callback: voidInStringArrayCallback): void; - voidOutMapStringInt(callback: voidOutMapStringIntCallback): void; - voidOutStringArray(callback: voidOutStringArrayCallback): void; - voidInOutMapStringInt(param: Map, callback: voidInOutMapStringIntCallback): void; - voidInOutStringArray(param: string[], callback: voidInOutStringArrayCallback): void; - voidInInt(param: number, callback: voidInIntCallback): void; - voidInString(param: string, callback: voidInStringCallback): void; - voidOutInt(callback: voidOutIntCallback): void; - voidOutString(callback: voidOutStringCallback): void; - voidInOutInt(param: number, callback: voidInOutIntCallback): void; - voidInOutString(param: string, callback: voidInOutStringCallback): void; - voidParameterTypeBoolean(param: boolean, callback: voidParameterTypeBooleanCallback): void; - voidParameterTypeByte(param: number, callback: voidParameterTypeByteCallback): void; - voidParameterTypeShort(param: number, callback: voidParameterTypeShortCallback): void; - voidParameterTypeInt(param: number, callback: voidParameterTypeIntCallback): void; - voidParameterTypeLong(param: number, callback: voidParameterTypeLongCallback): void; - voidParameterTypeFloat(param: number, callback: voidParameterTypeFloatCallback): void; - voidParameterTypeDouble(param: number, callback: voidParameterTypeDoubleCallback): void; - voidParameterTypeString(param: string, callback: voidParameterTypeStringCallback): void; - voidParameterTypeSequenceable(param: MySequenceable, callback: voidParameterTypeSequenceableCallback): void; - voidParameterTypeInterface(param: IInterfaceDeclare, callback: voidParameterTypeInterfaceCallback): void; - voidParameterTypeMapStringString(param: Map, callback: voidParameterTypeMapStringStringCallback): void; - voidParameterTypeDoubleArray(param: number[], callback: voidParameterTypeDoubleArrayCallback): void; - voidOrderOutIn(paramI: number, callback: voidOrderOutInCallback): void; - voidOrderInOutIn(paramI: number, paramS: string, callback: voidOrderInOutInCallback): void; - voidOrderOutInOut(paramS: string, callback: voidOrderOutInOutCallback): void; - voidOrderInInOutOut(paramS: string, paramI: number, callback: voidOrderInInOutOutCallback): void; -} -export type onewayVoidVoidCallback = (errCode: number) => void; -export type voidVoidCallback = (errCode: number) => void; -export type booleanVoidCallback = (errCode: number, returnValue: boolean) => void; -export type byteVoidCallback = (errCode: number, returnValue: number) => void; -export type shortVoidCallback = (errCode: number, returnValue: number) => void; -export type intVoidCallback = (errCode: number, returnValue: number) => void; -export type longVoidCallback = (errCode: number, returnValue: number) => void; -export type floatVoidCallback = (errCode: number, returnValue: number) => void; -export type doubleVoidCallback = (errCode: number, returnValue: number) => void; -export type stringVoidCallback = (errCode: number, returnValue: string) => void; -export type sequenceableVoidCallback = (errCode: number, returnValue: MySequenceable) => void; -export type interfaceVoidCallback = (errCode: number, returnValue: IInterfaceDeclare) => void; -export type mapStringStringVoidCallback = (errCode: number, returnValue: Map) => void; -export type doubleArrayVoidCallback = (errCode: number, returnValue: number[]) => void; -export type voidInMapStringIntCallback = (errCode: number) => void; -export type voidInStringArrayCallback = (errCode: number) => void; -export type voidOutMapStringIntCallback = (errCode: number, param: Map) => void; -export type voidOutStringArrayCallback = (errCode: number, param: string[]) => void; -export type voidInOutMapStringIntCallback = (errCode: number, param: Map) => void; -export type voidInOutStringArrayCallback = (errCode: number, param: string[]) => void; -export type voidInIntCallback = (errCode: number) => void; -export type voidInStringCallback = (errCode: number) => void; -export type voidOutIntCallback = (errCode: number, param: number) => void; -export type voidOutStringCallback = (errCode: number, param: string) => void; -export type voidInOutIntCallback = (errCode: number, param: number) => void; -export type voidInOutStringCallback = (errCode: number, param: string) => void; -export type voidParameterTypeBooleanCallback = (errCode: number) => void; -export type voidParameterTypeByteCallback = (errCode: number) => void; -export type voidParameterTypeShortCallback = (errCode: number) => void; -export type voidParameterTypeIntCallback = (errCode: number) => void; -export type voidParameterTypeLongCallback = (errCode: number) => void; -export type voidParameterTypeFloatCallback = (errCode: number) => void; -export type voidParameterTypeDoubleCallback = (errCode: number) => void; -export type voidParameterTypeStringCallback = (errCode: number) => void; -export type voidParameterTypeSequenceableCallback = (errCode: number) => void; -export type voidParameterTypeInterfaceCallback = (errCode: number) => void; -export type voidParameterTypeMapStringStringCallback = (errCode: number) => void; -export type voidParameterTypeDoubleArrayCallback = (errCode: number) => void; -export type voidOrderOutInCallback = (errCode: number, paramS: string) => void; -export type voidOrderInOutInCallback = (errCode: number, paramI: number) => void; -export type voidOrderOutInOutCallback = (errCode: number, paramI: number, paramS: string) => void; -export type voidOrderInInOutOutCallback = (errCode: number, paramI: number, paramS2: string) => void; - diff --git a/ability/ability_runtime/zidltest/actsamszidlclienttest/entry/src/main/ets/ServiceAbility/zidlTool/my_sequenceable.ts b/ability/ability_runtime/zidltest/actsamszidlclienttest/entry/src/main/ets/ServiceAbility/zidlTool/my_sequenceable.ts deleted file mode 100644 index bef9dcbe25c82b2c96e8ac8cc6493ce3d080baf6..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/zidltest/actsamszidlclienttest/entry/src/main/ets/ServiceAbility/zidlTool/my_sequenceable.ts +++ /dev/null @@ -1,28 +0,0 @@ -export default class MySequenceable { - constructor() { - this.num = 14; - this.str = "hello"; - } - getNum() : number { - return this.num; - } - - getString() : string { - return this.str; - } - - marshalling(messageParcel) { - console.info('marshalling++++'); - messageParcel.writeInt(this.num); - messageParcel.writeString(this.str); - return true; - } - unmarshalling(messageParcel) { - console.info('unmarshalling++++'); - this.num = messageParcel.readInt(); - this.str = messageParcel.readString(); - return true; - } - private num; - private str; -} \ No newline at end of file diff --git a/ability/ability_runtime/zidltest/actsamszidlclienttest/entry/src/main/ets/ServiceAbility/zidlTool/zidl_tool_test_stub.ts b/ability/ability_runtime/zidltest/actsamszidlclienttest/entry/src/main/ets/ServiceAbility/zidlTool/zidl_tool_test_stub.ts deleted file mode 100644 index 466bc3d6040a0b3c01ca401b05d96dc1a55cacb9..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/zidltest/actsamszidlclienttest/entry/src/main/ets/ServiceAbility/zidlTool/zidl_tool_test_stub.ts +++ /dev/null @@ -1,549 +0,0 @@ -/* - * Copyright (C) 2021 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 {onewayVoidVoidCallback} from "./i_zidl_tool_test"; -import {voidVoidCallback} from "./i_zidl_tool_test"; -import {booleanVoidCallback} from "./i_zidl_tool_test"; -import {byteVoidCallback} from "./i_zidl_tool_test"; -import {shortVoidCallback} from "./i_zidl_tool_test"; -import {intVoidCallback} from "./i_zidl_tool_test"; -import {longVoidCallback} from "./i_zidl_tool_test"; -import {floatVoidCallback} from "./i_zidl_tool_test"; -import {doubleVoidCallback} from "./i_zidl_tool_test"; -import {stringVoidCallback} from "./i_zidl_tool_test"; -import {sequenceableVoidCallback} from "./i_zidl_tool_test"; -import {interfaceVoidCallback} from "./i_zidl_tool_test"; -import {mapStringStringVoidCallback} from "./i_zidl_tool_test"; -import {doubleArrayVoidCallback} from "./i_zidl_tool_test"; -import {voidInMapStringIntCallback} from "./i_zidl_tool_test"; -import {voidInStringArrayCallback} from "./i_zidl_tool_test"; -import {voidOutMapStringIntCallback} from "./i_zidl_tool_test"; -import {voidOutStringArrayCallback} from "./i_zidl_tool_test"; -import {voidInOutMapStringIntCallback} from "./i_zidl_tool_test"; -import {voidInOutStringArrayCallback} from "./i_zidl_tool_test"; -import {voidInIntCallback} from "./i_zidl_tool_test"; -import {voidInStringCallback} from "./i_zidl_tool_test"; -import {voidOutIntCallback} from "./i_zidl_tool_test"; -import {voidOutStringCallback} from "./i_zidl_tool_test"; -import {voidInOutIntCallback} from "./i_zidl_tool_test"; -import {voidInOutStringCallback} from "./i_zidl_tool_test"; -import {voidParameterTypeBooleanCallback} from "./i_zidl_tool_test"; -import {voidParameterTypeByteCallback} from "./i_zidl_tool_test"; -import {voidParameterTypeShortCallback} from "./i_zidl_tool_test"; -import {voidParameterTypeIntCallback} from "./i_zidl_tool_test"; -import {voidParameterTypeLongCallback} from "./i_zidl_tool_test"; -import {voidParameterTypeFloatCallback} from "./i_zidl_tool_test"; -import {voidParameterTypeDoubleCallback} from "./i_zidl_tool_test"; -import {voidParameterTypeStringCallback} from "./i_zidl_tool_test"; -import {voidParameterTypeSequenceableCallback} from "./i_zidl_tool_test"; -import {voidParameterTypeInterfaceCallback} from "./i_zidl_tool_test"; -import {voidParameterTypeMapStringStringCallback} from "./i_zidl_tool_test"; -import {voidParameterTypeDoubleArrayCallback} from "./i_zidl_tool_test"; -import {voidOrderOutInCallback} from "./i_zidl_tool_test"; -import {voidOrderInOutInCallback} from "./i_zidl_tool_test"; -import {voidOrderOutInOutCallback} from "./i_zidl_tool_test"; -import {voidOrderInInOutOutCallback} from "./i_zidl_tool_test"; -import IZidlToolTest from "./i_zidl_tool_test"; -import rpc from "@ohos.rpc"; -import MySequenceable from "./my_sequenceable"; -import IInterfaceDeclare from "../interfaceDeclare/i_interface_declare"; -import InterfaceDeclareStub from "../interfaceDeclare/interface_declare_stub"; - -export default class ZidlToolTestStub extends rpc.RemoteObject implements IZidlToolTest { - constructor(des: string) { - super(des); - } - - onRemoteRequest(code: number, data, reply, option): boolean { - console.log("onRemoteRequest called, code = " + code); - switch(code) { - case ZidlToolTestStub.COMMAND_ONEWAY_VOID_VOID: { - this.onewayVoidVoid((errCode) => { - reply.writeInt(errCode); - }); - return true; - } - case ZidlToolTestStub.COMMAND_VOID_VOID: { - this.voidVoid((errCode) => { - reply.writeInt(errCode); - }); - return true; - } - case ZidlToolTestStub.COMMAND_BOOLEAN_VOID: { - this.booleanVoid((errCode, returnValue) => { - reply.writeInt(errCode); - if (errCode == 0) { - reply.writeInt(returnValue ? 1 : 0); - } - }); - return true; - } - case ZidlToolTestStub.COMMAND_BYTE_VOID: { - this.byteVoid((errCode, returnValue) => { - reply.writeInt(errCode); - if (errCode == 0) { - reply.writeInt(returnValue); - } - }); - return true; - } - case ZidlToolTestStub.COMMAND_SHORT_VOID: { - this.shortVoid((errCode, returnValue) => { - reply.writeInt(errCode); - if (errCode == 0) { - reply.writeInt(returnValue); - } - }); - return true; - } - case ZidlToolTestStub.COMMAND_INT_VOID: { - this.intVoid((errCode, returnValue) => { - reply.writeInt(errCode); - if (errCode == 0) { - reply.writeInt(returnValue); - } - }); - return true; - } - case ZidlToolTestStub.COMMAND_LONG_VOID: { - this.longVoid((errCode, returnValue) => { - reply.writeInt(errCode); - if (errCode == 0) { - reply.writeLong(returnValue); - } - }); - return true; - } - case ZidlToolTestStub.COMMAND_FLOAT_VOID: { - this.floatVoid((errCode, returnValue) => { - reply.writeInt(errCode); - if (errCode == 0) { - reply.writeFloat(returnValue); - } - }); - return true; - } - case ZidlToolTestStub.COMMAND_DOUBLE_VOID: { - this.doubleVoid((errCode, returnValue) => { - reply.writeInt(errCode); - if (errCode == 0) { - reply.writeDouble(returnValue); - } - }); - return true; - } - case ZidlToolTestStub.COMMAND_STRING_VOID: { - this.stringVoid((errCode, returnValue) => { - reply.writeInt(errCode); - if (errCode == 0) { - reply.writeString(returnValue); - } - }); - return true; - } - case ZidlToolTestStub.COMMAND_SEQUENCEABLE_VOID: { - this.sequenceableVoid((errCode, returnValue) => { - reply.writeInt(errCode); - if (errCode == 0) { - reply.writeSequenceable(returnValue); - } - }); - return true; - } - case ZidlToolTestStub.COMMAND_INTERFACE_VOID: { - this.interfaceVoid((errCode, returnValue) => { - reply.writeInt(errCode); - if (errCode == 0) { - reply.writeRemoteObject(returnValue as InterfaceDeclareStub); - } - }); - return true; - } - case ZidlToolTestStub.COMMAND_MAP_STRING_STRING_VOID: { - this.mapStringStringVoid((errCode, returnValue) => { - reply.writeInt(errCode); - if (errCode == 0) { - reply.writeInt(returnValue.size); - for (let [key, value] of returnValue) { - reply.writeString(key); - reply.writeString(value); - } - } - }); - return true; - } - case ZidlToolTestStub.COMMAND_DOUBLE_ARRAY_VOID: { - this.doubleArrayVoid((errCode, returnValue) => { - reply.writeInt(errCode); - if (errCode == 0) { - reply.writeDoubleArray(returnValue); - } - }); - return true; - } - case ZidlToolTestStub.COMMAND_VOID_IN_MAP_STRING_INT: { - let _param = new Map(); - let _paramSize = data.readInt(); - for (let i = 0; i < _paramSize; ++i) { - let key = data.readString(); - let value = data.readInt(); - _param.set(key, value); - } - this.voidInMapStringInt(_param, (errCode) => { - reply.writeInt(errCode); - }); - return true; - } - case ZidlToolTestStub.COMMAND_VOID_IN_STRING_ARRAY: { - let _param = data.readStringArray(); - this.voidInStringArray(_param, (errCode) => { - reply.writeInt(errCode); - }); - return true; - } - case ZidlToolTestStub.COMMAND_VOID_OUT_MAP_STRING_INT: { - this.voidOutMapStringInt((errCode, param) => { - reply.writeInt(errCode); - if (errCode == 0) { - reply.writeInt(param.size); - for (let [key, value] of param) { - reply.writeString(key); - reply.writeInt(value); - } - } - }); - return true; - } - case ZidlToolTestStub.COMMAND_VOID_OUT_STRING_ARRAY: { - this.voidOutStringArray((errCode, param) => { - reply.writeInt(errCode); - if (errCode == 0) { - reply.writeStringArray(param); - } - }); - return true; - } - case ZidlToolTestStub.COMMAND_VOID_IN_OUT_MAP_STRING_INT: { - let _param = new Map(); - let _paramSize = data.readInt(); - for (let i = 0; i < _paramSize; ++i) { - let key = data.readString(); - let value = data.readInt(); - _param.set(key, value); - } - this.voidInOutMapStringInt(_param, (errCode, param) => { - reply.writeInt(errCode); - if (errCode == 0) { - reply.writeInt(param.size); - for (let [key, value] of param) { - reply.writeString(key); - reply.writeInt(value); - } - } - }); - return true; - } - case ZidlToolTestStub.COMMAND_VOID_IN_OUT_STRING_ARRAY: { - let _param = data.readStringArray(); - this.voidInOutStringArray(_param, (errCode, param) => { - reply.writeInt(errCode); - if (errCode == 0) { - reply.writeStringArray(param); - } - }); - return true; - } - case ZidlToolTestStub.COMMAND_VOID_IN_INT: { - let _param = data.readInt(); - this.voidInInt(_param, (errCode) => { - reply.writeInt(errCode); - }); - return true; - } - case ZidlToolTestStub.COMMAND_VOID_IN_STRING: { - let _param = data.readString(); - this.voidInString(_param, (errCode) => { - reply.writeInt(errCode); - }); - return true; - } - case ZidlToolTestStub.COMMAND_VOID_OUT_INT: { - this.voidOutInt((errCode, param) => { - reply.writeInt(errCode); - if (errCode == 0) { - reply.writeInt(param); - } - }); - return true; - } - case ZidlToolTestStub.COMMAND_VOID_OUT_STRING: { - this.voidOutString((errCode, param) => { - reply.writeInt(errCode); - if (errCode == 0) { - reply.writeString(param); - } - }); - return true; - } - case ZidlToolTestStub.COMMAND_VOID_IN_OUT_INT: { - let _param = data.readInt(); - this.voidInOutInt(_param, (errCode, param) => { - reply.writeInt(errCode); - if (errCode == 0) { - reply.writeInt(param); - } - }); - return true; - } - case ZidlToolTestStub.COMMAND_VOID_IN_OUT_STRING: { - let _param = data.readString(); - this.voidInOutString(_param, (errCode, param) => { - reply.writeInt(errCode); - if (errCode == 0) { - reply.writeString(param); - } - }); - return true; - } - case ZidlToolTestStub.COMMAND_VOID_PARAMETER_TYPE_BOOLEAN: { - let _param = data.readInt() == 1 ? true : false; - this.voidParameterTypeBoolean(_param, (errCode) => { - reply.writeInt(errCode); - }); - return true; - } - case ZidlToolTestStub.COMMAND_VOID_PARAMETER_TYPE_BYTE: { - let _param = data.readInt(); - this.voidParameterTypeByte(_param, (errCode) => { - reply.writeInt(errCode); - }); - return true; - } - case ZidlToolTestStub.COMMAND_VOID_PARAMETER_TYPE_SHORT: { - let _param = data.readInt(); - this.voidParameterTypeShort(_param, (errCode) => { - reply.writeInt(errCode); - }); - return true; - } - case ZidlToolTestStub.COMMAND_VOID_PARAMETER_TYPE_INT: { - let _param = data.readInt(); - this.voidParameterTypeInt(_param, (errCode) => { - reply.writeInt(errCode); - }); - return true; - } - case ZidlToolTestStub.COMMAND_VOID_PARAMETER_TYPE_LONG: { - let _param = data.readLong(); - this.voidParameterTypeLong(_param, (errCode) => { - reply.writeInt(errCode); - }); - return true; - } - case ZidlToolTestStub.COMMAND_VOID_PARAMETER_TYPE_FLOAT: { - let _param = data.readFloat(); - this.voidParameterTypeFloat(_param, (errCode) => { - reply.writeInt(errCode); - }); - return true; - } - case ZidlToolTestStub.COMMAND_VOID_PARAMETER_TYPE_DOUBLE: { - let _param = data.readDouble(); - this.voidParameterTypeDouble(_param, (errCode) => { - reply.writeInt(errCode); - }); - return true; - } - case ZidlToolTestStub.COMMAND_VOID_PARAMETER_TYPE_STRING: { - let _param = data.readString(); - this.voidParameterTypeString(_param, (errCode) => { - reply.writeInt(errCode); - }); - return true; - } - case ZidlToolTestStub.COMMAND_VOID_PARAMETER_TYPE_SEQUENCEABLE: { - let _param = new MySequenceable(); - data.readSequenceable(_param); - this.voidParameterTypeSequenceable(_param, (errCode) => { - reply.writeInt(errCode); - }); - return true; - } - case ZidlToolTestStub.COMMAND_VOID_PARAMETER_TYPE_INTERFACE: { - let _param = data.readRemoteObject(); - this.voidParameterTypeInterface(_param, (errCode) => { - reply.writeInt(errCode); - }); - return true; - } - case ZidlToolTestStub.COMMAND_VOID_PARAMETER_TYPE_MAP_STRING_STRING: { - let _param = new Map(); - let _paramSize = data.readInt(); - for (let i = 0; i < _paramSize; ++i) { - let key = data.readString(); - let value = data.readString(); - _param.set(key, value); - } - this.voidParameterTypeMapStringString(_param, (errCode) => { - reply.writeInt(errCode); - }); - return true; - } - case ZidlToolTestStub.COMMAND_VOID_PARAMETER_TYPE_DOUBLE_ARRAY: { - let _param = data.readDoubleArray(); - this.voidParameterTypeDoubleArray(_param, (errCode) => { - reply.writeInt(errCode); - }); - return true; - } - case ZidlToolTestStub.COMMAND_VOID_ORDER_OUT_IN: { - let _paramI = data.readInt(); - this.voidOrderOutIn(_paramI, (errCode, paramS) => { - reply.writeInt(errCode); - if (errCode == 0) { - reply.writeString(paramS); - } - }); - return true; - } - case ZidlToolTestStub.COMMAND_VOID_ORDER_IN_OUT_IN: { - let _paramI = data.readInt(); - let _paramS = data.readString(); - this.voidOrderInOutIn(_paramI, _paramS, (errCode, paramI) => { - reply.writeInt(errCode); - if (errCode == 0) { - reply.writeInt(paramI); - } - }); - return true; - } - case ZidlToolTestStub.COMMAND_VOID_ORDER_OUT_IN_OUT: { - let _paramS = data.readString(); - this.voidOrderOutInOut(_paramS, (errCode, paramI, paramS) => { - reply.writeInt(errCode); - if (errCode == 0) { - reply.writeInt(paramI); - reply.writeString(paramS); - } - }); - return true; - } - case ZidlToolTestStub.COMMAND_VOID_ORDER_IN_IN_OUT_OUT: { - let _paramS = data.readString(); - let _paramI = data.readInt(); - this.voidOrderInInOutOut(_paramS, _paramI, (errCode, paramI, paramS2) => { - reply.writeInt(errCode); - if (errCode == 0) { - reply.writeInt(paramI); - reply.writeString(paramS2); - } - }); - return true; - } - default: { - console.log("invalid request code" + code); - break; - } - } - return false; - } - - onewayVoidVoid(callback: onewayVoidVoidCallback): void{} - voidVoid(callback: voidVoidCallback): void{} - booleanVoid(callback: booleanVoidCallback): void{} - byteVoid(callback: byteVoidCallback): void{} - shortVoid(callback: shortVoidCallback): void{} - intVoid(callback: intVoidCallback): void{} - longVoid(callback: longVoidCallback): void{} - floatVoid(callback: floatVoidCallback): void{} - doubleVoid(callback: doubleVoidCallback): void{} - stringVoid(callback: stringVoidCallback): void{} - sequenceableVoid(callback: sequenceableVoidCallback): void{} - interfaceVoid(callback: interfaceVoidCallback): void{} - mapStringStringVoid(callback: mapStringStringVoidCallback): void{} - doubleArrayVoid(callback: doubleArrayVoidCallback): void{} - voidInMapStringInt(param: Map, callback: voidInMapStringIntCallback): void{} - voidInStringArray(param: string[], callback: voidInStringArrayCallback): void{} - voidOutMapStringInt(callback: voidOutMapStringIntCallback): void{} - voidOutStringArray(callback: voidOutStringArrayCallback): void{} - voidInOutMapStringInt(param: Map, callback: voidInOutMapStringIntCallback): void{} - voidInOutStringArray(param: string[], callback: voidInOutStringArrayCallback): void{} - voidInInt(param: number, callback: voidInIntCallback): void{} - voidInString(param: string, callback: voidInStringCallback): void{} - voidOutInt(callback: voidOutIntCallback): void{} - voidOutString(callback: voidOutStringCallback): void{} - voidInOutInt(param: number, callback: voidInOutIntCallback): void{} - voidInOutString(param: string, callback: voidInOutStringCallback): void{} - voidParameterTypeBoolean(param: boolean, callback: voidParameterTypeBooleanCallback): void{} - voidParameterTypeByte(param: number, callback: voidParameterTypeByteCallback): void{} - voidParameterTypeShort(param: number, callback: voidParameterTypeShortCallback): void{} - voidParameterTypeInt(param: number, callback: voidParameterTypeIntCallback): void{} - voidParameterTypeLong(param: number, callback: voidParameterTypeLongCallback): void{} - voidParameterTypeFloat(param: number, callback: voidParameterTypeFloatCallback): void{} - voidParameterTypeDouble(param: number, callback: voidParameterTypeDoubleCallback): void{} - voidParameterTypeString(param: string, callback: voidParameterTypeStringCallback): void{} - voidParameterTypeSequenceable(param: MySequenceable, callback: voidParameterTypeSequenceableCallback): void{} - voidParameterTypeInterface(param: IInterfaceDeclare, callback: voidParameterTypeInterfaceCallback): void{} - voidParameterTypeMapStringString(param: Map, callback: voidParameterTypeMapStringStringCallback): void{} - voidParameterTypeDoubleArray(param: number[], callback: voidParameterTypeDoubleArrayCallback): void{} - voidOrderOutIn(paramI: number, callback: voidOrderOutInCallback): void{} - voidOrderInOutIn(paramI: number, paramS: string, callback: voidOrderInOutInCallback): void{} - voidOrderOutInOut(paramS: string, callback: voidOrderOutInOutCallback): void{} - voidOrderInInOutOut(paramS: string, paramI: number, callback: voidOrderInInOutOutCallback): void{} - - static readonly COMMAND_ONEWAY_VOID_VOID = 1; - static readonly COMMAND_VOID_VOID = 2; - static readonly COMMAND_BOOLEAN_VOID = 3; - static readonly COMMAND_BYTE_VOID = 4; - static readonly COMMAND_SHORT_VOID = 5; - static readonly COMMAND_INT_VOID = 6; - static readonly COMMAND_LONG_VOID = 7; - static readonly COMMAND_FLOAT_VOID = 8; - static readonly COMMAND_DOUBLE_VOID = 9; - static readonly COMMAND_STRING_VOID = 10; - static readonly COMMAND_SEQUENCEABLE_VOID = 11; - static readonly COMMAND_INTERFACE_VOID = 12; - static readonly COMMAND_MAP_STRING_STRING_VOID = 13; - static readonly COMMAND_DOUBLE_ARRAY_VOID = 14; - static readonly COMMAND_VOID_IN_MAP_STRING_INT = 15; - static readonly COMMAND_VOID_IN_STRING_ARRAY = 16; - static readonly COMMAND_VOID_OUT_MAP_STRING_INT = 17; - static readonly COMMAND_VOID_OUT_STRING_ARRAY = 18; - static readonly COMMAND_VOID_IN_OUT_MAP_STRING_INT = 19; - static readonly COMMAND_VOID_IN_OUT_STRING_ARRAY = 20; - static readonly COMMAND_VOID_IN_INT = 21; - static readonly COMMAND_VOID_IN_STRING = 22; - static readonly COMMAND_VOID_OUT_INT = 23; - static readonly COMMAND_VOID_OUT_STRING = 24; - static readonly COMMAND_VOID_IN_OUT_INT = 25; - static readonly COMMAND_VOID_IN_OUT_STRING = 26; - static readonly COMMAND_VOID_PARAMETER_TYPE_BOOLEAN = 27; - static readonly COMMAND_VOID_PARAMETER_TYPE_BYTE = 28; - static readonly COMMAND_VOID_PARAMETER_TYPE_SHORT = 29; - static readonly COMMAND_VOID_PARAMETER_TYPE_INT = 30; - static readonly COMMAND_VOID_PARAMETER_TYPE_LONG = 31; - static readonly COMMAND_VOID_PARAMETER_TYPE_FLOAT = 32; - static readonly COMMAND_VOID_PARAMETER_TYPE_DOUBLE = 33; - static readonly COMMAND_VOID_PARAMETER_TYPE_STRING = 34; - static readonly COMMAND_VOID_PARAMETER_TYPE_SEQUENCEABLE = 35; - static readonly COMMAND_VOID_PARAMETER_TYPE_INTERFACE = 36; - static readonly COMMAND_VOID_PARAMETER_TYPE_MAP_STRING_STRING = 37; - static readonly COMMAND_VOID_PARAMETER_TYPE_DOUBLE_ARRAY = 38; - static readonly COMMAND_VOID_ORDER_OUT_IN = 39; - static readonly COMMAND_VOID_ORDER_IN_OUT_IN = 40; - static readonly COMMAND_VOID_ORDER_OUT_IN_OUT = 41; - static readonly COMMAND_VOID_ORDER_IN_IN_OUT_OUT = 42; -} - diff --git a/ability/ability_runtime/zidltest/actsamszidlclienttest/entry/src/main/ets/ServiceAbility2/ServiceAbility2.ts b/ability/ability_runtime/zidltest/actsamszidlclienttest/entry/src/main/ets/ServiceAbility2/ServiceAbility2.ts deleted file mode 100644 index 4b236a48835edbe2729e8ce7ea7b5f06b769d236..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/zidltest/actsamszidlclienttest/entry/src/main/ets/ServiceAbility2/ServiceAbility2.ts +++ /dev/null @@ -1,65 +0,0 @@ -/* -* 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 ServiceExtension from '@ohos.application.ServiceExtensionAbility'; -import Want from '@ohos.application.Want'; -import ZidlTestServiceStubOneway from './zidlToolOneWay/interface_attribute_declaratoin_oneway_stub'; -import {voidVoidFirstCallback} from './zidlToolOneWay/i_interface_attribute_declaratoin_oneway' -import {voidVoidSecondCallback} from './zidlToolOneWay/i_interface_attribute_declaratoin_oneway' -import {voidVoidThirdCallback} from './zidlToolOneWay/i_interface_attribute_declaratoin_oneway' - -const SUCCESS = 0; -const FAIL = 1; - -class ZidlTestImpOneway extends ZidlTestServiceStubOneway { - voidVoidFirst(callback: voidVoidFirstCallback) { - console.log("ZidlTest Server ACTS_Zidl_Js2JsSingle_0100_1 called"); - callback(SUCCESS); - } - - voidVoidSecond(callback: voidVoidSecondCallback) { - console.log("ZidlTest Server ACTS_Zidl_Js2JsSingle_0100_2 called"); - callback(SUCCESS); - } - - voidVoidThird(callback: voidVoidThirdCallback) { - console.log("ZidlTest Server ACTS_Zidl_Js2JsSingle_0100_3 called"); - callback(SUCCESS); - } -} - -export default class ServiceAbility2 extends ServiceExtension { - onCreate(want: Want) { - globalThis.abilityWant = want; - console.log('ZidlClientTest ServiceAbility2 onCreate, want: ' + want.abilityName); - } - - onRequest(want, startId) { - console.log('ZidlClientTest ServiceAbility2 onRequest, want: ' + want.abilityName - + ', startId: ' + startId); - } - - onConnect(want) { - console.log('ZidlClientTest ServiceAbility2 onConnect, want:' + want.abilityName); - return new ZidlTestImpOneway('connect'); - } - - onDisconnect(want) { - console.log('ZidlClientTest ServiceAbility2 onDisconnect, want:' + want.abilityName); - } - - onDestroy() { - console.log('ZidlClientTest ServiceAbility2 onDestroy'); - } -}; diff --git a/ability/ability_runtime/zidltest/actsamszidlclienttest/entry/src/main/ets/ServiceAbility2/service.ts b/ability/ability_runtime/zidltest/actsamszidlclienttest/entry/src/main/ets/ServiceAbility2/service.ts deleted file mode 100644 index b49731a414958a281c2f0c4eab0e7fb408eb2c2f..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/zidltest/actsamszidlclienttest/entry/src/main/ets/ServiceAbility2/service.ts +++ /dev/null @@ -1,25 +0,0 @@ -/* -* 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. -*/ -export default { - onStart() { - console.info('ServiceAbility onStart'); - }, - onStop() { - console.info('ServiceAbility onStop'); - }, - onCommand(want, startId) { - console.info('ServiceAbility onCommand'); - } -}; \ No newline at end of file diff --git a/ability/ability_runtime/zidltest/actsamszidlclienttest/entry/src/main/ets/ServiceAbility2/zidlToolOneWay/i_interface_attribute_declaratoin_oneway.ts b/ability/ability_runtime/zidltest/actsamszidlclienttest/entry/src/main/ets/ServiceAbility2/zidlToolOneWay/i_interface_attribute_declaratoin_oneway.ts deleted file mode 100644 index a17db0f5d20ac1d674258b1e094355c2276fc2b4..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/zidltest/actsamszidlclienttest/entry/src/main/ets/ServiceAbility2/zidlToolOneWay/i_interface_attribute_declaratoin_oneway.ts +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright (C) 2021 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. - */ - - -export default interface IInterfaceAttributeDeclaratoinOneway { - voidVoidFirst(callback: voidVoidFirstCallback): void; - voidVoidSecond(callback: voidVoidSecondCallback): void; - voidVoidThird(callback: voidVoidThirdCallback): void; -} -export type voidVoidFirstCallback = (errCode: number) => void; -export type voidVoidSecondCallback = (errCode: number) => void; -export type voidVoidThirdCallback = (errCode: number) => void; - diff --git a/ability/ability_runtime/zidltest/actsamszidlclienttest/entry/src/main/ets/ServiceAbility2/zidlToolOneWay/interface_attribute_declaratoin_oneway_stub.ts b/ability/ability_runtime/zidltest/actsamszidlclienttest/entry/src/main/ets/ServiceAbility2/zidlToolOneWay/interface_attribute_declaratoin_oneway_stub.ts deleted file mode 100644 index 016f352bd6d609916ad6e3b12e63e075a6fbe490..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/zidltest/actsamszidlclienttest/entry/src/main/ets/ServiceAbility2/zidlToolOneWay/interface_attribute_declaratoin_oneway_stub.ts +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (C) 2021 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 {voidVoidFirstCallback} from "./i_interface_attribute_declaratoin_oneway"; -import {voidVoidSecondCallback} from "./i_interface_attribute_declaratoin_oneway"; -import {voidVoidThirdCallback} from "./i_interface_attribute_declaratoin_oneway"; -import IInterfaceAttributeDeclaratoinOneway from "./i_interface_attribute_declaratoin_oneway"; -import rpc from "@ohos.rpc"; - -export default class InterfaceAttributeDeclaratoinOnewayStub extends rpc.RemoteObject implements IInterfaceAttributeDeclaratoinOneway { - constructor(des: string) { - super(des); - } - - onRemoteRequest(code: number, data, reply, option): boolean { - console.log("onRemoteRequest called, code = " + code); - switch(code) { - case InterfaceAttributeDeclaratoinOnewayStub.COMMAND_VOID_VOID_FIRST: { - this.voidVoidFirst((errCode) => { - reply.writeInt(errCode); - }); - return true; - } - case InterfaceAttributeDeclaratoinOnewayStub.COMMAND_VOID_VOID_SECOND: { - this.voidVoidSecond((errCode) => { - reply.writeInt(errCode); - }); - return true; - } - case InterfaceAttributeDeclaratoinOnewayStub.COMMAND_VOID_VOID_THIRD: { - this.voidVoidThird((errCode) => { - reply.writeInt(errCode); - }); - return true; - } - default: { - console.log("invalid request code" + code); - break; - } - } - return false; - } - - voidVoidFirst(callback: voidVoidFirstCallback): void{} - voidVoidSecond(callback: voidVoidSecondCallback): void{} - voidVoidThird(callback: voidVoidThirdCallback): void{} - - static readonly COMMAND_VOID_VOID_FIRST = 1; - static readonly COMMAND_VOID_VOID_SECOND = 2; - static readonly COMMAND_VOID_VOID_THIRD = 3; -} - diff --git a/ability/ability_runtime/zidltest/actsamszidlclienttest/entry/src/main/ets/interfaceDeclare/i_interface_declare.ts b/ability/ability_runtime/zidltest/actsamszidlclienttest/entry/src/main/ets/interfaceDeclare/i_interface_declare.ts deleted file mode 100644 index a9469ce4d7e1d4fbd3ec452076ab8121b8b8adf7..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/zidltest/actsamszidlclienttest/entry/src/main/ets/interfaceDeclare/i_interface_declare.ts +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (C) 2021 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. - */ - - -export default interface IInterfaceDeclare { - testInterface(data: number, callback: testInterfaceCallback): void; -} -export type testInterfaceCallback = (errCode: number) => void; - diff --git a/ability/ability_runtime/zidltest/actsamszidlclienttest/entry/src/main/ets/interfaceDeclare/interface_declare_proxy.ts b/ability/ability_runtime/zidltest/actsamszidlclienttest/entry/src/main/ets/interfaceDeclare/interface_declare_proxy.ts deleted file mode 100644 index 9f9cc9c43d3b15599f88aa223e7308c43b997e60..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/zidltest/actsamszidlclienttest/entry/src/main/ets/interfaceDeclare/interface_declare_proxy.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (C) 2021 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 {testInterfaceCallback} from "./i_interface_declare"; -import IInterfaceDeclare from "./i_interface_declare"; -import rpc from "@ohos.rpc"; - -export default class InterfaceDeclareProxy implements IInterfaceDeclare { - constructor(proxy) { - this.proxy = proxy; - } - - testInterface(data: number, callback: testInterfaceCallback): void - { - let _option = new rpc.MessageOption(rpc.MessageOption.TF_SYNC); - let _data = new rpc.MessageParcel(); - let _reply = new rpc.MessageParcel(); - _data.writeInt(data); - this.proxy.sendRequest(InterfaceDeclareProxy.COMMAND_TEST_INTERFACE, _data, _reply, _option).then(function(result) { - if (result.errCode === 0) { - let _errCode = result.reply.readInt(); - callback(_errCode); - } else { - console.log("sendRequest failed, errCode: " + result.errCode); - } - }) - } - - static readonly COMMAND_TEST_INTERFACE = 1; - private proxy -} - diff --git a/ability/ability_runtime/zidltest/actsamszidlclienttest/entry/src/main/ets/interfaceDeclare/interface_declare_stub.ts b/ability/ability_runtime/zidltest/actsamszidlclienttest/entry/src/main/ets/interfaceDeclare/interface_declare_stub.ts deleted file mode 100644 index 1606f77b4c0390be639f06cb093ee672cf05d478..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/zidltest/actsamszidlclienttest/entry/src/main/ets/interfaceDeclare/interface_declare_stub.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (C) 2021 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 {testInterfaceCallback} from "./i_interface_declare"; -import IInterfaceDeclare from "./i_interface_declare"; -import rpc from "@ohos.rpc"; - -export default class InterfaceDeclareStub extends rpc.RemoteObject implements IInterfaceDeclare { - constructor(des: string) { - super(des); - } - - onRemoteRequest(code: number, data, reply, option): boolean { - console.log("onRemoteRequest called, code = " + code); - switch(code) { - case InterfaceDeclareStub.COMMAND_TEST_INTERFACE: { - let _data = data.readInt(); - this.testInterface(_data, (errCode) => { - reply.writeInt(errCode); - }); - return true; - } - default: { - console.log("invalid request code" + code); - break; - } - } - return false; - } - - testInterface(data: number, callback: testInterfaceCallback): void{} - - static readonly COMMAND_TEST_INTERFACE = 1; -} - diff --git a/ability/ability_runtime/zidltest/actsamszidlclienttest/entry/src/main/ets/pages/index.ets b/ability/ability_runtime/zidltest/actsamszidlclienttest/entry/src/main/ets/pages/index.ets deleted file mode 100644 index 4b3495d6f447ce798ad40e21676e40434f78ee68..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/zidltest/actsamszidlclienttest/entry/src/main/ets/pages/index.ets +++ /dev/null @@ -1,64 +0,0 @@ -/* - * 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 file from '@system.file'; - -import {Core, ExpectExtend, InstrumentLog, ReportExtend} from "deccjsunit/index" -import testsuite from "../../test/List.test.ets" - -@Entry -@Component -struct Index { - - aboutToAppear() { - console.info("start run testcase!!!!") - const core = Core.getInstance() - const expectExtend = new ExpectExtend({ - 'id': 'extend' - }) - core.addService('expect', expectExtend) - const reportExtend = new ReportExtend(file) - - core.addService('report', reportExtend) - core.init() - core.subscribeEvent('task', reportExtend) - const configService = core.getDefaultService('config') - console.info('parameters---->' + JSON.stringify(globalThis.abilityWant.parameters)) - globalThis.abilityWant.parameters['timeout'] = 10000; - configService.setConfig(globalThis.abilityWant.parameters) - testsuite(globalThis.abilityContext) - core.execute() - } - - build() { - Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { - Text('Test App') - .fontSize(50) - .fontWeight(FontWeight.Bold) - Button() { - Text('next page') - .fontSize(25) - .fontWeight(FontWeight.Bold) - }.type(ButtonType.Capsule) - .margin({ - top: 20 - }) - .backgroundColor('#0D9FFB') - .onClick(() => { - }) - } - .width('100%') - .height('100%') - } -} \ No newline at end of file diff --git a/ability/ability_runtime/zidltest/actsamszidlclienttest/entry/src/main/ets/pages/index/index.ets b/ability/ability_runtime/zidltest/actsamszidlclienttest/entry/src/main/ets/pages/index/index.ets deleted file mode 100644 index 37b86f5096f1273b71299ee08e085211c5add410..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/zidltest/actsamszidlclienttest/entry/src/main/ets/pages/index/index.ets +++ /dev/null @@ -1,66 +0,0 @@ -/* - * 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 file from '@system.file'; - -import {Core, ExpectExtend, InstrumentLog, ReportExtend} from "deccjsunit/index" -import testsuite from "../../test/List.test.ets" - - -@Entry -@Component -struct Index { - - aboutToAppear(){ - console.info("start run testcase!!!!") - const core = Core.getInstance() - const expectExtend = new ExpectExtend({ - 'id': 'extend' - }) - core.addService('expect', expectExtend) - const reportExtend = new ReportExtend(file) - - core.addService('report', reportExtend) - core.init() - core.subscribeEvent('task', reportExtend) - const configService = core.getDefaultService('config') - console.info('parameters---->' + JSON.stringify(globalThis.abilityWant.parameters)) - globalThis.abilityWant.parameters.timeout = 70000; - configService.setConfig(globalThis.abilityWant.parameters) - testsuite(globalThis.abilityContext) - core.execute() - } - - 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(() => { - - }) - } - .width('100%') - .height('100%') - } -} \ No newline at end of file diff --git a/ability/ability_runtime/zidltest/actsamszidlclienttest/entry/src/main/ets/pages/second.ets b/ability/ability_runtime/zidltest/actsamszidlclienttest/entry/src/main/ets/pages/second.ets deleted file mode 100644 index 33d9ae45245db03fd252ef7c1a85c9e284028e0d..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/zidltest/actsamszidlclienttest/entry/src/main/ets/pages/second.ets +++ /dev/null @@ -1,43 +0,0 @@ -/* - * 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 diff --git a/ability/ability_runtime/zidltest/actsamszidlclienttest/entry/src/main/ets/pages/second/second.ets b/ability/ability_runtime/zidltest/actsamszidlclienttest/entry/src/main/ets/pages/second/second.ets deleted file mode 100644 index f9009a3e8567d1f4557ebc11dded54c7e27c0b0d..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/zidltest/actsamszidlclienttest/entry/src/main/ets/pages/second/second.ets +++ /dev/null @@ -1,43 +0,0 @@ -/* - * 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 diff --git a/ability/ability_runtime/zidltest/actsamszidlclienttest/entry/src/main/ets/test/Ability.test.ets b/ability/ability_runtime/zidltest/actsamszidlclienttest/entry/src/main/ets/test/Ability.test.ets deleted file mode 100644 index 7c31cb69818fe99a9442ea3aab183216260f6d74..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/zidltest/actsamszidlclienttest/entry/src/main/ets/test/Ability.test.ets +++ /dev/null @@ -1,1586 +0,0 @@ -/* - * 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 { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from "deccjsunit/index" -import MySequenceable from '../zidlTool/my_sequenceable' -import ZidlTestServiceProxy from '../zidlTool/zidl_tool_test_proxy' -import ZidlTestServiceProxyOneway from '../zidlToolOneWay/interface_attribute_declaratoin_oneway_proxy' -import InterfaceDeclareStub from '../interfaceDeclare/interface_declare_stub' -import InterfaceDeclareProxy from '../interfaceDeclare/interface_declare_proxy' -import { testInterfaceCallback } from '../interfaceDeclare/i_interface_declare' - -var connectionId = -1; -var connectionOnewayId = -1; -var connectionIdSingle = -1; -var connectionOnewayIdSingle = -1; -var testProxyMulti; -var testProxyMultiOneway; -var testProxySingle; -var testProxySingleOneway; -const SUCCESS = 0; -const FAIL = 1; - -export default function abilityTest(abilityContext) { - describe('ActsAbilityTest', function () { - - beforeAll(async (done) => { - var count = 0; - - function checkDone() { - if (count >= 4) { - done(); - } - } - - var paMultiConnect = { - onConnect: function (elementName, proxy) { - console.log("ZidlTest Client Faconnection onConnect called."); - console.log("ZidlTest Client Faconnection onConnect elementName = " + elementName); - console.log("ZidlTest Client Faconnection onConnect proxy = " + proxy); - testProxyMulti = new ZidlTestServiceProxy(proxy); - count++; - checkDone(); - }, - onDisconnect: function (elementName) { - console.log("ZidlTest Client onDisconnectService onDisconnect"); - }, - onFailed: function (code) { - console.log("ZidlTest Client onDisconnectService onFailed"); - count++; - checkDone(); - } - }; - - var paMultiOnewayConnect = { - onConnect: function (elementName, proxy) { - console.log("ZidlTest Client Faconnection onConnect called."); - console.log("ZidlTest Client Faconnection onConnect elementName = " + elementName); - console.log("ZidlTest Client Faconnection onConnect proxy = " + proxy); - testProxyMultiOneway = new ZidlTestServiceProxyOneway(proxy); - count++; - checkDone(); - }, - onDisconnect: function (elementName) { - console.log("ZidlTest Client onDisconnectService onDisconnect"); - }, - onFailed: function (code) { - console.log("ZidlTest Client onDisconnectService onFailed"); - count++; - checkDone(); - } - }; - - var paSingleConnect = { - onConnect: function (elementName, proxy) { - console.log("ZidlTest Client Faconnection onConnect called."); - console.log("ZidlTest Client Faconnection onConnect elementName = " + elementName); - console.log("ZidlTest Client Faconnection onConnect proxy = " + proxy); - testProxySingle = new ZidlTestServiceProxy(proxy); - count++; - checkDone(); - }, - onDisconnect: function (elementName) { - console.log("ZidlTest Client onDisconnectService onDisconnect"); - }, - onFailed: function (code) { - console.log("ZidlTest Client onDisconnectService onFailed"); - count++; - checkDone(); - } - }; - - var paSingleOnewayConnect = { - onConnect: function (elementName, proxy) { - console.log("ZidlTest Client Faconnection onConnect called."); - console.log("ZidlTest Client Faconnection onConnect elementName = " + elementName); - console.log("ZidlTest Client Faconnection onConnect proxy = " + proxy); - testProxySingleOneway = new ZidlTestServiceProxyOneway(proxy); - count++; - checkDone(); - }, - onDisconnect: function (elementName) { - console.log("ZidlTest Client onDisconnectService onDisconnect"); - }, - onFailed: function (code) { - console.log("ZidlTest Client onDisconnectService onFailed"); - count++; - checkDone(); - } - }; - - let wantMulti = { - "bundleName": "com.example.zidlservice", - "abilityName": "com.example.zidlservice.ServiceAbility" - }; - let wantMultiOneway = { - "bundleName": "com.example.zidlservice", - "abilityName": "com.example.zidlservice.ServiceAbility2" - }; - let wantSingle = { - "bundleName": "com.example.zidlclienttest", - "abilityName": "com.example.zidlclienttest.ServiceAbility" - }; - let wantSingleOneway = { - "bundleName": "com.example.zidlclienttest", - "abilityName": "com.example.zidlclienttest.ServiceAbility2" - }; - - console.info('ZidlTest Client connectAbility start'); - connectionId = globalThis.abilityContext.connectAbility(wantMulti, paMultiConnect); - console.info('ZidlTest Client connectAbility end connectionId = ' + connectionId); - connectionOnewayId = globalThis.abilityContext.connectAbility(wantMultiOneway, paMultiOnewayConnect); - console.info('ZidlTest Client connectAbility end connectionOnewayId = ' + connectionOnewayId); - - connectionIdSingle = globalThis.abilityContext.connectAbility(wantSingle, paSingleConnect); - console.info('ZidlTest Client connectAbility end connectionIdSingle = ' + connectionIdSingle); - connectionOnewayIdSingle = globalThis.abilityContext.connectAbility(wantSingleOneway, paSingleOnewayConnect); - console.info('ZidlTest Client connectAbility end connectionOnewayIdSingle = ' + connectionOnewayIdSingle); - }) - - afterEach(async (done) => { - setTimeout(() => { - done(); - }, 200) - }) - - afterAll(async (done) => { - var count = 0; - - function checkDone() { - if (count >= 4) { - done(); - } - } - - globalThis.abilityContext.disconnectAbility(connectionId, (err) => { - console.info('ZidlTest Client disconnectAbility result ' + JSON.stringify(err)); - connectionId = -1; - testProxyMulti = null; - count++; - checkDone(); - }) - - globalThis.abilityContext.disconnectAbility(connectionOnewayId, (err) => { - console.info('ZidlTest Client disconnectAbility2 result ' + JSON.stringify(err)); - connectionOnewayId = -1; - testProxyMultiOneway = null; - count++; - checkDone(); - }) - - globalThis.abilityContext.disconnectAbility(connectionIdSingle, (err) => { - console.info('ZidlTest Client disconnectAbility result ' + JSON.stringify(err)); - connectionIdSingle = -1; - testProxyMulti = null; - count++; - checkDone(); - }) - - globalThis.abilityContext.disconnectAbility(connectionOnewayIdSingle, (err) => { - console.info('ZidlTest Client disconnectAbility2 result ' + JSON.stringify(err)); - connectionOnewayIdSingle = -1; - testProxyMultiOneway = null; - count++; - checkDone(); - }) - }) - - /** - * @tc.number: ACTS_Zidl_Js2JsMulti_0100 - * @tc.name: support method attributes declaration [oneway] - * @tc.desc: [oneway] interface zidl.systemtest.IInterfaceAttributeDeclaratoinOneway {} - */ - it('ACTS_Zidl_Js2JsMulti_0100', 0, async function (done) { - console.log('ACTS_Zidl_Js2JsMulti_0100 begin'); - var flagFir = false; - var flagSec = false; - var flagThi = false; - - function checkFinish() { - if (flagFir && flagSec && flagThi) { - done(); - } - } - - setTimeout(function () { - testProxyMultiOneway.voidVoidFirst((errCode) => { - expect(errCode).assertEqual(SUCCESS); - flagFir = true; - checkFinish(); - }); - testProxyMultiOneway.voidVoidSecond((errCode) => { - expect(errCode).assertEqual(SUCCESS); - flagSec = true; - checkFinish(); - }); - testProxyMultiOneway.voidVoidThird((errCode) => { - expect(errCode).assertEqual(SUCCESS); - flagThi = true; - checkFinish(); - }); - }, 500); - }) - - /** - * @tc.number: ACTS_Zidl_Js2JsMulti_0200 - * @tc.name: support method attributes declaration [oneway] - * @tc.desc: [oneway] void onewayVoidVoid() - */ - it('ACTS_Zidl_Js2JsMulti_0200', 0, async function (done) { - testProxyMulti.onewayVoidVoid((errCode) => { - expect(errCode).assertEqual(SUCCESS); - done(); - }); - }) - - /** - * @tc.number: ACTS_Zidl_Js2JsMulti_0300 - * @tc.name: support method result type void - * @tc.desc: void voidVoid(); - */ - it('ACTS_Zidl_Js2JsMulti_0300', 0, async function (done) { - console.log('ACTS_Zidl_Js2JsMulti_0300 begin'); - testProxyMulti.voidVoid((errCode) => { - expect(errCode).assertEqual(SUCCESS); - done(); - }); - }) - - /** - * @tc.number: ACTS_Zidl_Js2JsMulti_0400 - * @tc.name: support method result type boolean - * @tc.desc: boolean booleanVoid(); - */ - it('ACTS_Zidl_Js2JsMulti_0400', 0, async function (done) { - testProxyMulti.booleanVoid((errCode, boolean) => { - console.log("ZidlTest Client ACTS_Zidl_Js2JsMulti_0400 call return:" + boolean); - expect(errCode).assertEqual(SUCCESS); - expect(boolean).assertEqual(true); - done(); - }); - }) - - /** - * @tc.number: ACTS_Zidl_Js2JsMulti_0500 - * @tc.name: support method result type byte - * @tc.desc: number byteVoid(); - */ - it('ACTS_Zidl_Js2JsMulti_0500', 0, async function (done) { - testProxyMulti.byteVoid((errCode, mybyte) => { - console.log("ZidlTest Client ACTS_Zidl_Js2JsMulti_0500 call return:" + mybyte); - expect(errCode).assertEqual(SUCCESS); - expect(mybyte).assertEqual(1); - done(); - }) - }) - - /** - * @tc.number: ACTS_Zidl_Js2JsMulti_0600 - * @tc.name: support method result type short - * @tc.desc: number shortVoid(); - */ - it('ACTS_Zidl_Js2JsMulti_0600', 0, async function (done) { - testProxyMulti.shortVoid((errCode, myshort) => { - console.log("ZidlTest Client ACTS_Zidl_Js2JsMulti_0600 call return:" + myshort); - expect(errCode).assertEqual(SUCCESS); - expect(myshort).assertEqual(222); - done(); - }) - }) - - /** - * @tc.number: ACTS_Zidl_Js2JsMulti_0700 - * @tc.name: support method result type int - * @tc.desc: number intVoid(); - */ - it('ACTS_Zidl_Js2JsMulti_0700', 0, async function (done) { - testProxyMulti.intVoid((errCode, myint) => { - console.log("ZidlTest Client ACTS_Zidl_Js2JsMulti_0700 call return:" + myint); - expect(errCode).assertEqual(SUCCESS); - expect(myint).assertEqual(333); - done(); - }) - }) - - /** - * @tc.number: ACTS_Zidl_Js2JsMulti_0800 - * @tc.name: support method result type long - * @tc.desc: number longVoid(); - */ - it('ACTS_Zidl_Js2JsMulti_0800', 0, async function (done) { - testProxyMulti.longVoid((errCode, mylong) => { - console.log("ZidlTest Client ACTS_Zidl_Js2JsMulti_0800 call return:" + mylong); - expect(errCode).assertEqual(SUCCESS); - expect(mylong).assertEqual(4444); - done(); - }) - }) - - /** - * @tc.number: ACTS_Zidl_Js2JsMulti_0900 - * @tc.name: support method result type float - * @tc.desc: number floatVoid(); - */ - it('ACTS_Zidl_Js2JsMulti_0900', 0, async function (done) { - testProxyMulti.floatVoid((errCode, myfloat) => { - console.log("ZidlTest Client ACTS_Zidl_Js2JsMulti_0900 call return:" + myfloat); - expect(errCode).assertEqual(SUCCESS); - expect(myfloat).assertEqual(10.1); - done(); - }) - }) - - /** - * @tc.number: ACTS_Zidl_Js2JsMulti_1000 - * @tc.name: support method result type double - * @tc.desc: number doubleVoid(); - */ - it('ACTS_Zidl_Js2JsMulti_1000', 0, async function (done) { - testProxyMulti.doubleVoid((errCode, mydouble) => { - console.log("ZidlTest Client ACTS_Zidl_Js2JsMulti_1000 call return:" + mydouble); - expect(errCode).assertEqual(SUCCESS); - expect(mydouble).assertEqual(22.1); - done(); - }) - }) - - /** - * @tc.number: ACTS_Zidl_Js2JsMulti_1100 - * @tc.name: support method result type String - * @tc.desc: String stringVoid(); - */ - it('ACTS_Zidl_Js2JsMulti_1100', 0, async function (done) { - testProxyMulti.stringVoid((errCode, mystring) => { - console.log("ZidlTest Client ACTS_Zidl_Js2JsMulti_1100 call return:" + mystring); - expect(errCode).assertEqual(SUCCESS); - expect(mystring).assertEqual("stringVoid"); - done(); - }) - }) - - /** - * @tc.number: ACTS_Zidl_Js2JsMulti_1200 - * @tc.name: support method result type sequenceable - * @tc.desc: TestInfo sequenceableVoid(); - */ - it('ACTS_Zidl_Js2JsMulti_1200', 0, async function (done) { - testProxyMulti.sequenceableVoid((errCode, mysequenceable) => { - console.log("ZidlTest Client ACTS_Zidl_Js2JsMulti_1200 call return:" + JSON.stringify(mysequenceable)); - expect(errCode).assertEqual(SUCCESS); - expect(mysequenceable.getNum()).assertEqual(14); - expect(mysequenceable.getString()).assertEqual("hello"); - done(); - }) - }) - - /** - * @tc.number: ACTS_Zidl_Js2JsMulti_1300 - * @tc.name: support method result type interface - * @tc.desc: ITest interfaceVoid(); - */ - it('ACTS_Zidl_Js2JsMulti_1300', 0, async function (done) { - console.log('ACTS_Zidl_Js2JsMulti_1300 begin'); - - testProxyMulti.interfaceVoid((errCode, data) => { - console.log("ZidlTest Server ACTS_Zidl_Js2JsMulti_1300 called"); - expect(errCode).assertEqual(SUCCESS); - let proxy = new InterfaceDeclareProxy(data); - proxy.testInterface(1500, (errCode) => { - expect(errCode).assertEqual(SUCCESS); - done(); - }); - }); - }) - /** - * @tc.number: ACTS_Zidl_Js2JsMulti_1400 - * @tc.name: support method result type Map container type - * @tc.desc: Map mapStringStringVoid(); - */ - it('ACTS_Zidl_Js2JsMulti_1400', 0, async function (done) { - testProxyMulti.mapStringStringVoid((errCode, mymapStringString) => { - console.log("ZidlTest Client ACTS_Zidl_Js2JsMulti_1400 call return:" + mymapStringString.get("string1")); - expect(errCode).assertEqual(SUCCESS); - expect(mymapStringString.get("string1")).assertEqual("string2"); - done(); - }) - }) - - /** - * @tc.number: ACTS_Zidl_Js2JsMulti_1500 - * @tc.name: support method result type array type - * @tc.desc: double[] doubleArrayVoid(); - */ - it('ACTS_Zidl_Js2JsMulti_1500', 0, async function (done) { - testProxyMulti.doubleArrayVoid((errCode, mydoubleArray) => { - console.log("ZidlTest Client ACTS_Zidl_Js2JsMulti_1500 call return:" + mydoubleArray); - expect(errCode).assertEqual(SUCCESS); - expect(mydoubleArray.length).assertEqual(3); - expect(mydoubleArray[0]).assertEqual(1.1); - expect(mydoubleArray[1]).assertEqual(2.1); - expect(mydoubleArray[2]).assertEqual(3.1); - done(); - }) - }) - - /** - * @tc.number: ACTS_Zidl_Js2JsMulti_1600 - * @tc.name: support object type formal parameter attribute in - * @tc.desc: sequenceable zidl.systemtest.TestInfo; void voidInObject([in] TestInfo param); - */ - it('ACTS_Zidl_Js2JsMulti_1600', 0, async function (done) { - console.log('ACTS_Zidl_Js2JsMulti_1600 begin'); - var flagFir = false; - var flagSec = false; - - function checkFinish() { - if (flagFir && flagSec) { - done(); - } - } - - let myMap = new Map(); - myMap.set("string1", 1); - var strarray = ["aaa", "bbb", "ccc"]; - testProxyMulti.voidInMapStringInt(myMap, (errCode) => { - expect(errCode).assertEqual(SUCCESS); - flagFir = true; - checkFinish(); - }); - testProxyMulti.voidInStringArray(strarray, (errCode) => { - expect(errCode).assertEqual(SUCCESS); - flagSec = true; - checkFinish(); - }); - }) - - /** - * @tc.number: ACTS_Zidl_Js2JsMulti_1700 - * @tc.name: support object type formal parameter attribute out - * @tc.desc: sequenceable zidl.systemtest.TestInfo;void voidOutObject([out] String param); - */ - it('ACTS_Zidl_Js2JsMulti_1700', 0, async function (done) { - var flagFir = false; - var flagSec = false; - - function checkFinish() { - if (flagFir && flagSec) { - done(); - } - } - - testProxyMulti.voidOutMapStringInt((errCode, map) => { - console.log("ZidlTest Client ACTS_Zidl_Js2JsMulti_1700 call return:" + map.get("voidOutMapStringInt")); - expect(errCode).assertEqual(SUCCESS); - expect(map.get("voidOutMapStringInt")).assertEqual(1); - flagFir = true; - checkFinish(); - }); - testProxyMulti.voidOutStringArray((errCode, strArray) => { - console.log("ZidlTest Client ACTS_Zidl_Js2JsMulti_1700 call return:" + JSON.stringify(strArray)); - expect(errCode).assertEqual(SUCCESS); - expect(strArray[0]).assertEqual("aa"); - expect(strArray[1]).assertEqual("dd"); - flagSec = true; - checkFinish(); - }); - }) - - /** - * @tc.number: ACTS_Zidl_Js2JsMulti_1800 - * @tc.name: support object type formal parameter attribute in, out - * @tc.desc: sequenceable zidl.systemtest.TestInfo;void voidInOutObject([in, out] TestInfo param); - */ - it('ACTS_Zidl_Js2JsMulti_1800', 0, async function (done) { - var flagFir = false; - var flagSec = false; - - function checkFinish() { - if (flagFir && flagSec) { - done(); - } - } - - var mapIn = new Map(); - mapIn.set("voidInOutMapStringInt1", 1801); - mapIn.set("voidInOutMapStringInt2", 1802); - testProxyMulti.voidInOutMapStringInt(mapIn, (errCode, map) => { - console.log("ZidlTest Client ACTS_Zidl_Js2JsMulti_1800 call return:" + map.get("voidInOutMapStringInt")); - expect(errCode).assertEqual(SUCCESS); - expect(map.get("voidInOutMapStringInt1")).assertEqual(1802); - expect(map.get("voidInOutMapStringInt2")).assertEqual(1801); - flagFir = true; - checkFinish(); - }); - - var strArrayIn = ["ddd", "ccc"]; - testProxyMulti.voidInOutStringArray(strArrayIn, (errCode, strArray) => { - console.log("ZidlTest Client ACTS_Zidl_Js2JsMulti_1800 call return:" + JSON.stringify(strArray)); - expect(errCode).assertEqual(SUCCESS); - expect(strArray[0]).assertEqual("aaa"); - expect(strArray[1]).assertEqual("bbb"); - flagSec = true; - checkFinish(); - }); - }) - - /** - * @tc.number: ACTS_Zidl_Js2JsMulti_1900 - * @tc.name: support basic type formal parameter attribute in - * @tc.desc: void voidInInt([in] number param);void voidInString([in] String param); - */ - it('ACTS_Zidl_Js2JsMulti_1900', 0, async function (done) { - console.log('ACTS_Zidl_Js2JsMulti_1900 begin'); - var number8 = 8888; - var str3 = "voidInString"; - var flagFir = false; - var flagSec = false; - - function checkFinish() { - if (flagFir && flagSec) { - done(); - } - } - - testProxyMulti.voidInInt(number8, (errCode) => { - expect(errCode).assertEqual(SUCCESS); - flagFir = true; - checkFinish(); - }); - testProxyMulti.voidInString(str3, (errCode) => { - expect(errCode).assertEqual(SUCCESS); - flagSec = true; - checkFinish(); - }); - }) - - /** - * @tc.number: ACTS_Zidl_Js2JsMulti_2000 - * @tc.name: support basic type formal parameter attribute out - * @tc.desc: void voidOutInt([out] number param);void voidOutString([out] String param); - */ - it('ACTS_Zidl_Js2JsMulti_2000', 0, async function (done) { - var flagFir = false; - var flagSec = false; - - function checkFinish() { - if (flagFir && flagSec) { - done(); - } - } - - testProxyMulti.voidOutInt((errCode, number) => { - console.log("ZidlTest Client ACTS_Zidl_Js2JsMulti_2000 call return:" + JSON.stringify(number)); - expect(errCode).assertEqual(SUCCESS); - expect(number).assertEqual(123); - flagFir = true; - checkFinish(); - }); - testProxyMulti.voidOutString((errCode, str) => { - console.log("ZidlTest Client ACTS_Zidl_Js2JsMulti_2000 call return:" + JSON.stringify(str)); - expect(str).assertEqual("voidOutString"); - expect(errCode).assertEqual(SUCCESS); - flagSec = true; - checkFinish(); - }); - }) - - /** - * @tc.number: ACTS_Zidl_Js2JsMulti_2100 - * @tc.name: support basic type formal parameter attribute in, out - * @tc.desc: void voidInOutInt([in, out] number param);void voidInOutString([in, out] String param); - */ - it('ACTS_Zidl_Js2JsMulti_2100', 0, async function (done) { - var flagFir = false; - var flagSec = false; - - function checkFinish() { - if (flagFir && flagSec) { - done(); - } - } - - console.log('ACTS_Zidl_Js2JsMulti_2100 begin'); - var number23 = 123456; - var str1 = "voidInOutString"; - testProxyMulti.voidInOutInt(number23, (errCode, number) => { - console.log("ZidlTest Client ACTS_Zidl_Js2JsMulti_2100 call return:" + JSON.stringify(number)); - expect(errCode).assertEqual(SUCCESS); - expect(number).assertEqual(456789); - flagFir = true; - checkFinish(); - }); - testProxyMulti.voidInOutString(str1, (errCode, str) => { - console.log("ZidlTest Client ACTS_Zidl_Js2JsMulti_2100 call return:" + JSON.stringify(str)); - expect(errCode).assertEqual(SUCCESS); - expect(str).assertEqual("456789"); - flagSec = true; - checkFinish(); - }); - }) - - /** - * @tc.number: ACTS_Zidl_Js2JsMulti_2200 - * @tc.name: support formal parameter type boolean - * @tc.desc: void voidBoolean([in] boolean param); - */ - it('ACTS_Zidl_Js2JsMulti_2200', 0, async function (done) { - console.log('ACTS_Zidl_Js2JsMulti_2200 begin'); - var oBooleanTrue = true; - - testProxyMulti.voidParameterTypeBoolean(oBooleanTrue, (errCode) => { - expect(errCode).assertEqual(SUCCESS); - done(); - }); - }) - - /** - * @tc.number: ACTS_Zidl_Js2JsMulti_2300 - * @tc.name: support formal parameter type byte - * @tc.desc: void voidByte([in] byte param); - */ - it('ACTS_Zidl_Js2JsMulti_2300', 0, async function (done) { - console.log('ACTS_Zidl_Js2JsMulti_2300 begin'); - var number1 = 1111; - - testProxyMulti.voidParameterTypeByte(number1, (errCode) => { - expect(errCode).assertEqual(SUCCESS); - done(); - }); - }) - - /** - * @tc.number: ACTS_Zidl_Js2JsMulti_2400 - * @tc.name: support formal parameter type short - * @tc.desc: void voidShort([in] short param); - */ - it('ACTS_Zidl_Js2JsMulti_2400', 0, async function (done) { - console.log('ACTS_Zidl_Js2JsMulti_2400 begin'); - var number2 = 2222; - - testProxyMulti.voidParameterTypeShort(number2, (errCode) => { - expect(errCode).assertEqual(SUCCESS); - done(); - }); - }) - - /** - * @tc.number: ACTS_Zidl_Js2JsMulti_2500 - * @tc.name: support formal parameter type int - * @tc.desc: void voidInt([in] int param); - */ - it('ACTS_Zidl_Js2JsMulti_2500', 0, async function (done) { - console.log('ACTS_Zidl_Js2JsMulti_2500 begin'); - var number3 = 3333; - - testProxyMulti.voidParameterTypeInt(number3, (errCode) => { - expect(errCode).assertEqual(SUCCESS); - done(); - }); - }) - - /** - * @tc.number: ACTS_Zidl_Js2JsMulti_2600 - * @tc.name: support formal parameter type long - * @tc.desc: void voidLong([in] long param); - */ - it('ACTS_Zidl_Js2JsMulti_2600', 0, async function (done) { - console.log('ACTS_Zidl_Js2JsMulti_2600 begin'); - var number4 = 4444; - - testProxyMulti.voidParameterTypeLong(number4, (errCode) => { - expect(errCode).assertEqual(SUCCESS); - done(); - }); - }) - - /** - * @tc.number: ACTS_Zidl_Js2JsMulti_2700 - * @tc.name: support formal parameter type float - * @tc.desc: void voidFloat([in] float param); - */ - it('ACTS_Zidl_Js2JsMulti_2700', 0, async function (done) { - console.log('ACTS_Zidl_Js2JsMulti_2700 begin'); - var number5 = 5555.1; - - testProxyMulti.voidParameterTypeFloat(number5, (errCode) => { - expect(errCode).assertEqual(SUCCESS); - done(); - }); - }) - - /** - * @tc.number: ACTS_Zidl_Js2JsMulti_2800 - * @tc.name: support formal parameter type double - * @tc.desc: void voidDouble([in] double param); - */ - it('ACTS_Zidl_Js2JsMulti_2800', 0, async function (done) { - console.log('ACTS_Zidl_Js2JsMulti_2800 begin'); - var number6 = 6666.1; - - setTimeout(function () { - testProxyMulti.voidParameterTypeDouble(number6, (errCode) => { - expect(errCode).assertEqual(SUCCESS); - done(); - }); - }, 500); - }) - - /** - * @tc.number: ACTS_Zidl_Js2JsMulti_2900 - * @tc.name: support formal parameter type String - * @tc.desc: void voidString([in] String param); - */ - it('ACTS_Zidl_Js2JsMulti_2900', 0, async function (done) { - console.log('ACTS_Zidl_Js2JsMulti_2900 begin'); - var str2 = "voidParameterTypeString"; - - testProxyMulti.voidParameterTypeString(str2, (errCode) => { - expect(errCode).assertEqual(SUCCESS); - done(); - }); - }) - - /** - * @tc.number: ACTS_Zidl_Js2JsMulti_3000 - * @tc.name: support formal parameter type sequenceable - * @tc.desc: void voidSequenceable([in] TestInfo param); - */ - it('ACTS_Zidl_Js2JsMulti_3000', 0, async function (done) { - console.log('ACTS_Zidl_Js2JsMulti_3000 begin'); - let mySequence = new MySequenceable(); - - testProxyMulti.voidParameterTypeSequenceable(mySequence, (errCode) => { - expect(errCode).assertEqual(SUCCESS); - done(); - }); - }) - - /** - * @tc.number: ACTS_Zidl_Js2JsMulti_3100 - * @tc.name: support formal parameter type interface - * @tc.desc: void voidInterface([in] ITest param); - */ - it('ACTS_Zidl_Js2JsMulti_3100', 0, async function (done) { - console.log('ACTS_Zidl_Js2JsMulti_3100 begin'); - - class InterfaceDeclare extends InterfaceDeclareStub { - testInterface(data: number, callback: testInterfaceCallback): void { - console.log("ZidlTest Client ACTS_Zidl_Js2JsMulti_3100 called"); - let result = FAIL; - - if (data == 3300) { - result = SUCCESS; - } - callback(result); - } - } - - let clientInterface = new InterfaceDeclare('clientInterface'); - - testProxyMulti.voidParameterTypeInterface(clientInterface, (errCode) => { - console.log("ZidlTest Client ACTS_Zidl_Js2JsMulti_3100 clientInterface callback"); - expect(errCode).assertEqual(SUCCESS); - done(); - }); - }) - - /** - * @tc.number: ACTS_Zidl_Js2JsMulti_3200 - * @tc.name: support formal parameter type Map - * @tc.desc: void voidMapStringString([in] Map param); - */ - it('ACTS_Zidl_Js2JsMulti_3200', 0, async function (done) { - console.log('ACTS_Zidl_Js2JsMulti_3200 begin'); - var map = new Map(); - map.set("voidParameterTypeMapStringString", "fdhatdh"); - - testProxyMulti.voidParameterTypeMapStringString(map, (errCode) => { - expect(errCode).assertEqual(SUCCESS); - done(); - }); - }) - - /** - * @tc.number: ACTS_Zidl_Js2JsMulti_3300 - * @tc.name: support formal parameter type array - * @tc.desc: void voidDoubleArray([in] double[] param); - */ - it('ACTS_Zidl_Js2JsMulti_3300', 0, async function (done) { - console.log('ACTS_Zidl_Js2JsMulti_3300 begin'); - var array = [1.1, 2.1]; - - testProxyMulti.voidParameterTypeDoubleArray(array, (errCode) => { - expect(errCode).assertEqual(SUCCESS); - done(); - }); - }) - - /** - * @tc.number: ACTS_Zidl_Js2JsMulti_3400 - * @tc.name: parameter order - * @tc.desc: order of parameter properties [out], [in] - */ - it('ACTS_Zidl_Js2JsMulti_3400', 0, async function (done) { - var num = 61; - testProxyMulti.voidOrderOutIn(num, (errCode, string) => { - console.log("ZidlTest Client ACTS_Zidl_Js2JsMulti_3400 call return:" + string); - expect(errCode).assertEqual(SUCCESS); - expect(string).assertEqual("hello world"); - done(); - }); - }) - - /** - * @tc.number: ACTS_Zidl_Js2JsMulti_3500 - * @tc.name: parameter order - * @tc.desc: order of parameter properties [in, out], [in] - */ - it('ACTS_Zidl_Js2JsMulti_3500', 0, async function (done) { - var num = 62; - var str = "inputparam"; - testProxyMulti.voidOrderInOutIn(num, str, (errCode, numparam) => { - console.log("ZidlTest Client ACTS_Zidl_Js2JsMulti_3500 call return:" + numparam); - expect(errCode).assertEqual(SUCCESS); - expect(numparam).assertEqual(6); - done(); - }); - }) - - /** - * @tc.number: ACTS_Zidl_Js2JsMulti_3600 - * @tc.name: parameter order - * @tc.desc: order of parameter properties [out], [in, out] - */ - it('ACTS_Zidl_Js2JsMulti_3600', 0, async function (done) { - var str = "param"; - testProxyMulti.voidOrderOutInOut(str, (errCode, paramI, paramS) => { - console.log("ZidlTest Client ACTS_Zidl_Js2JsMulti_3600 call return:" + paramI + " " + paramS); - expect(errCode).assertEqual(SUCCESS); - expect(paramI).assertEqual(3); - expect(paramS).assertEqual("paramcallback"); - done(); - }); - }) - - /** - * @tc.number: ACTS_Zidl_Js2JsMulti_3700 - * @tc.name: parameter order - * @tc.desc: order of parameter properties [in], [in, out], [out] - */ - it('ACTS_Zidl_Js2JsMulti_3700', 0, async function (done) { - var str = "paramInput"; - var num = 64; - testProxyMulti.voidOrderInInOutOut(str, num, (errCode, paramI, paramS) => { - console.log("ZidlTest Client ACTS_Zidl_Js2JsMulti_3700 call return:" + paramS + " " + paramI); - expect(errCode).assertEqual(SUCCESS); - expect(paramS).assertEqual("callback"); - expect(paramI).assertEqual(4); - done(); - }); - }) - - /** - * @tc.number: ACTS_Zidl_Js2JsSingle_0100 - * @tc.name: support method attributes declaration [oneway] - * @tc.desc: [oneway] interface zidl.systemtest.IInterfaceAttributeDeclaratoinOneway {} - */ - it('ACTS_Zidl_Js2JsSingle_0100', 0, async function (done) { - console.log('ACTS_Zidl_Js2JsSingle_0100 begin'); - var flagFir = false; - var flagSec = false; - var flagThi = false; - - function checkFinish() { - if (flagFir && flagSec && flagThi) { - done(); - } - } - - setTimeout(function () { - testProxySingleOneway.voidVoidFirst((errCode) => { - expect(errCode).assertEqual(SUCCESS); - flagFir = true; - checkFinish(); - }); - testProxySingleOneway.voidVoidSecond((errCode) => { - expect(errCode).assertEqual(SUCCESS); - flagSec = true; - checkFinish(); - }); - testProxySingleOneway.voidVoidThird((errCode) => { - expect(errCode).assertEqual(SUCCESS); - flagThi = true; - checkFinish(); - }); - }, 500); - }) - - /** - * @tc.number: ACTS_Zidl_Js2JsSingle_0200 - * @tc.name: support method attributes declaration [oneway] - * @tc.desc: [oneway] void onewayVoidVoid() - */ - it('ACTS_Zidl_Js2JsSingle_0200', 0, async function (done) { - testProxySingle.onewayVoidVoid((errCode) => { - expect(errCode).assertEqual(SUCCESS); - done(); - }); - }) - - /** - * @tc.number: ACTS_Zidl_Js2JsSingle_0300 - * @tc.name: support method result type void - * @tc.desc: void voidVoid(); - */ - it('ACTS_Zidl_Js2JsSingle_0300', 0, async function (done) { - console.log('ACTS_Zidl_Js2JsSingle_0300 begin'); - testProxySingle.voidVoid((errCode) => { - expect(errCode).assertEqual(SUCCESS); - done(); - }); - }) - - /** - * @tc.number: ACTS_Zidl_Js2JsSingle_0400 - * @tc.name: support method result type boolean - * @tc.desc: boolean booleanVoid(); - */ - it('ACTS_Zidl_Js2JsSingle_0400', 0, async function (done) { - testProxySingle.booleanVoid((errCode, boolean) => { - console.log("ZidlTest Client ACTS_Zidl_Js2JsSingle_0400 call return:" + boolean); - expect(errCode).assertEqual(SUCCESS); - expect(boolean).assertEqual(true); - done(); - }); - }) - - /** - * @tc.number: ACTS_Zidl_Js2JsSingle_0500 - * @tc.name: support method result type byte - * @tc.desc: number byteVoid(); - */ - it('ACTS_Zidl_Js2JsSingle_0500', 0, async function (done) { - testProxySingle.byteVoid((errCode, mybyte) => { - console.log("ZidlTest Client ACTS_Zidl_Js2JsSingle_0500 call return:" + mybyte); - expect(errCode).assertEqual(SUCCESS); - expect(mybyte).assertEqual(1); - done(); - }) - }) - - /** - * @tc.number: ACTS_Zidl_Js2JsSingle_0600 - * @tc.name: support method result type short - * @tc.desc: number shortVoid(); - */ - it('ACTS_Zidl_Js2JsSingle_0600', 0, async function (done) { - testProxySingle.shortVoid((errCode, myshort) => { - console.log("ZidlTest Client ACTS_Zidl_Js2JsSingle_0600 call return:" + myshort); - expect(errCode).assertEqual(SUCCESS); - expect(myshort).assertEqual(222); - done(); - }) - }) - - /** - * @tc.number: ACTS_Zidl_Js2JsSingle_0700 - * @tc.name: support method result type int - * @tc.desc: number intVoid(); - */ - it('ACTS_Zidl_Js2JsSingle_0700', 0, async function (done) { - testProxySingle.intVoid((errCode, myint) => { - console.log("ZidlTest Client ACTS_Zidl_Js2JsSingle_0700 call return:" + myint); - expect(errCode).assertEqual(SUCCESS); - expect(myint).assertEqual(333); - done(); - }) - }) - - /** - * @tc.number: ACTS_Zidl_Js2JsSingle_0800 - * @tc.name: support method result type long - * @tc.desc: number longVoid(); - */ - it('ACTS_Zidl_Js2JsSingle_0800', 0, async function (done) { - testProxySingle.longVoid((errCode, mylong) => { - console.log("ZidlTest Client ACTS_Zidl_Js2JsSingle_0800 call return:" + mylong); - expect(errCode).assertEqual(SUCCESS); - expect(mylong).assertEqual(4444); - done(); - }) - }) - - /** - * @tc.number: ACTS_Zidl_Js2JsSingle_0900 - * @tc.name: support method result type float - * @tc.desc: number floatVoid(); - */ - it('ACTS_Zidl_Js2JsSingle_0900', 0, async function (done) { - testProxySingle.floatVoid((errCode, myfloat) => { - console.log("ZidlTest Client ACTS_Zidl_Js2JsSingle_0900 call return:" + myfloat); - expect(errCode).assertEqual(SUCCESS); - expect(myfloat).assertEqual(10.1); - done(); - }) - }) - - /** - * @tc.number: ACTS_Zidl_Js2JsSingle_1000 - * @tc.name: support method result type double - * @tc.desc: number doubleVoid(); - */ - it('ACTS_Zidl_Js2JsSingle_1000', 0, async function (done) { - testProxySingle.doubleVoid((errCode, mydouble) => { - console.log("ZidlTest Client ACTS_Zidl_Js2JsSingle_1000 call return:" + mydouble); - expect(errCode).assertEqual(SUCCESS); - expect(mydouble).assertEqual(22.1); - done(); - }) - }) - - /** - * @tc.number: ACTS_Zidl_Js2JsSingle_1100 - * @tc.name: support method result type String - * @tc.desc: String stringVoid(); - */ - it('ACTS_Zidl_Js2JsSingle_1100', 0, async function (done) { - testProxySingle.stringVoid((errCode, mystring) => { - console.log("ZidlTest Client ACTS_Zidl_Js2JsSingle_1100 call return:" + mystring); - expect(errCode).assertEqual(SUCCESS); - expect(mystring).assertEqual("stringVoid"); - done(); - }) - }) - - /** - * @tc.number: ACTS_Zidl_Js2JsSingle_1200 - * @tc.name: support method result type sequenceable - * @tc.desc: TestInfo sequenceableVoid(); - */ - it('ACTS_Zidl_Js2JsSingle_1200', 0, async function (done) { - testProxySingle.sequenceableVoid((errCode, mysequenceable) => { - console.log("ZidlTest Client ACTS_Zidl_Js2JsSingle_1200 call return:" + JSON.stringify(mysequenceable)); - expect(errCode).assertEqual(SUCCESS); - expect(mysequenceable.getNum()).assertEqual(14); - expect(mysequenceable.getString()).assertEqual("hello"); - done(); - }) - }) - - /** - * @tc.number: ACTS_Zidl_Js2JsSingle_1300 - * @tc.name: support method result type interface - * @tc.desc: ITest interfaceVoid(); - */ - it('ACTS_Zidl_Js2JsSingle_1300', 0, async function (done) { - console.log('ACTS_Zidl_Js2JsSingle_1300 begin'); - - testProxySingle.interfaceVoid((errCode, data) => { - console.log("ZidlTest Server ACTS_Zidl_Js2JsSingle_1300 called"); - expect(errCode).assertEqual(SUCCESS); - let proxy = new InterfaceDeclareProxy(data); - proxy.testInterface(1500, (errCode)=>{ - expect(errCode).assertEqual(SUCCESS); - done(); - }); - }); - }) - /** - * @tc.number: ACTS_Zidl_Js2JsSingle_1400 - * @tc.name: support method result type Map container type - * @tc.desc: Map mapStringStringVoid(); - */ - it('ACTS_Zidl_Js2JsSingle_1400', 0, async function (done) { - testProxySingle.mapStringStringVoid((errCode, mymapStringString) => { - console.log("ZidlTest Client ACTS_Zidl_Js2JsSingle_1400 call return:" + mymapStringString.get("string1")); - expect(errCode).assertEqual(SUCCESS); - expect(mymapStringString.get("string1")).assertEqual("string2"); - done(); - }) - }) - - /** - * @tc.number: ACTS_Zidl_Js2JsSingle_1500 - * @tc.name: support method result type array type - * @tc.desc: double[] doubleArrayVoid(); - */ - it('ACTS_Zidl_Js2JsSingle_1500', 0, async function (done) { - testProxySingle.doubleArrayVoid((errCode, mydoubleArray) => { - console.log("ZidlTest Client ACTS_Zidl_Js2JsSingle_1500 call return:" + mydoubleArray); - expect(errCode).assertEqual(SUCCESS); - expect(mydoubleArray.length).assertEqual(3); - expect(mydoubleArray[0]).assertEqual(1.1); - expect(mydoubleArray[1]).assertEqual(2.1); - expect(mydoubleArray[2]).assertEqual(3.1); - done(); - }) - }) - - /** - * @tc.number: ACTS_Zidl_Js2JsSingle_1600 - * @tc.name: support object type formal parameter attribute in - * @tc.desc: sequenceable zidl.systemtest.TestInfo; void voidInObject([in] TestInfo param); - */ - it('ACTS_Zidl_Js2JsSingle_1600', 0, async function (done) { - console.log('ACTS_Zidl_Js2JsSingle_1600 begin'); - var flagFir = false; - var flagSec = false; - - function checkFinish() { - if (flagFir && flagSec) { - done(); - } - } - - let myMap = new Map(); - myMap.set("string1", 1); - var strarray = ["aaa", "bbb", "ccc"]; - testProxySingle.voidInMapStringInt(myMap, (errCode)=>{ - expect(errCode).assertEqual(SUCCESS); - flagFir = true; - checkFinish(); - }); - testProxySingle.voidInStringArray(strarray, (errCode)=>{ - expect(errCode).assertEqual(SUCCESS); - flagSec = true; - checkFinish(); - }); - }) - - /** - * @tc.number: ACTS_Zidl_Js2JsSingle_1700 - * @tc.name: support object type formal parameter attribute out - * @tc.desc: sequenceable zidl.systemtest.TestInfo;void voidOutObject([out] String param); - */ - it('ACTS_Zidl_Js2JsSingle_1700', 0, async function (done) { - var flagFir = false; - var flagSec = false; - - function checkFinish() { - if (flagFir && flagSec) { - done(); - } - } - - testProxySingle.voidOutMapStringInt((errCode, map) => { - console.log("ZidlTest Client ACTS_Zidl_Js2JsSingle_1700 call return:" + map.get("voidOutMapStringInt")); - expect(errCode).assertEqual(SUCCESS); - expect(map.get("voidOutMapStringInt")).assertEqual(1); - flagFir = true; - checkFinish(); - }); - testProxySingle.voidOutStringArray((errCode, strArray) => { - console.log("ZidlTest Client ACTS_Zidl_Js2JsSingle_1700 call return:" + JSON.stringify(strArray)); - expect(errCode).assertEqual(SUCCESS); - expect(strArray[0]).assertEqual("aa"); - expect(strArray[1]).assertEqual("dd"); - flagSec = true; - checkFinish(); - }); - }) - - /** - * @tc.number: ACTS_Zidl_Js2JsSingle_1800 - * @tc.name: support object type formal parameter attribute in, out - * @tc.desc: sequenceable zidl.systemtest.TestInfo;void voidInOutObject([in, out] TestInfo param); - */ - it('ACTS_Zidl_Js2JsSingle_1800', 0, async function (done) { - var flagFir = false; - var flagSec = false; - - function checkFinish() { - if (flagFir && flagSec) { - done(); - } - } - - var mapIn = new Map(); - mapIn.set("voidInOutMapStringInt1", 1801); - mapIn.set("voidInOutMapStringInt2", 1802); - testProxySingle.voidInOutMapStringInt(mapIn, (errCode, map) => { - console.log("ZidlTest Client ACTS_Zidl_Js2JsSingle_1800 call return:" + map.get("voidInOutMapStringInt")); - expect(errCode).assertEqual(SUCCESS); - expect(map.get("voidInOutMapStringInt1")).assertEqual(1802); - expect(map.get("voidInOutMapStringInt2")).assertEqual(1801); - flagFir = true; - checkFinish(); - }); - var strArrayIn = ["ddd", "ccc"]; - testProxySingle.voidInOutStringArray(strArrayIn, (errCode, strArray) => { - console.log("ZidlTest Client ACTS_Zidl_Js2JsSingle_1800 call return:" + JSON.stringify(strArray)); - expect(errCode).assertEqual(SUCCESS); - expect(strArray[0]).assertEqual("aaa"); - expect(strArray[1]).assertEqual("bbb"); - flagSec = true; - checkFinish(); - }); - }) - - /** - * @tc.number: ACTS_Zidl_Js2JsSingle_1900 - * @tc.name: support basic type formal parameter attribute in - * @tc.desc: void voidInInt([in] number param);void voidInString([in] String param); - */ - it('ACTS_Zidl_Js2JsSingle_1900', 0, async function (done) { - console.log('ACTS_Zidl_Js2JsSingle_1900 begin'); - var number8 = 8888; - var str3 = "voidInString"; - var flagFir = false; - var flagSec = false; - - function checkFinish() { - if (flagFir && flagSec) { - done(); - } - } - - testProxySingle.voidInInt(number8, (errCode)=>{ - expect(errCode).assertEqual(SUCCESS); - flagFir = true; - checkFinish(); - }); - testProxySingle.voidInString(str3, (errCode)=>{ - expect(errCode).assertEqual(SUCCESS); - flagSec = true; - checkFinish(); - }); - }) - - /** - * @tc.number: ACTS_Zidl_Js2JsSingle_2000 - * @tc.name: support basic type formal parameter attribute out - * @tc.desc: void voidOutInt([out] number param);void voidOutString([out] String param); - */ - it('ACTS_Zidl_Js2JsSingle_2000', 0, async function (done) { - var flagFir = false; - var flagSec = false; - - function checkFinish() { - if (flagFir && flagSec) { - done(); - } - } - - testProxySingle.voidOutInt((errCode, number) => { - console.log("ZidlTest Client ACTS_Zidl_Js2JsSingle_2000 call return:" + JSON.stringify(number)); - expect(errCode).assertEqual(SUCCESS); - expect(number).assertEqual(123); - flagFir = true; - checkFinish(); - }); - testProxySingle.voidOutString((errCode, str) => { - console.log("ZidlTest Client ACTS_Zidl_Js2JsSingle_2000 call return:" + JSON.stringify(str)); - expect(str).assertEqual("voidOutString"); - expect(errCode).assertEqual(SUCCESS); - flagSec = true; - checkFinish(); - }); - }) - - /** - * @tc.number: ACTS_Zidl_Js2JsSingle_2100 - * @tc.name: support basic type formal parameter attribute in, out - * @tc.desc: void voidInOutInt([in, out] number param);void voidInOutString([in, out] String param); - */ - it('ACTS_Zidl_Js2JsSingle_2100', 0, async function (done) { - var flagFir = false; - var flagSec = false; - - function checkFinish() { - if (flagFir && flagSec) { - done(); - } - } - - console.log('ACTS_Zidl_Js2JsSingle_2100 begin'); - var number23 = 123456; - var str1 = "voidInOutString"; - testProxySingle.voidInOutInt(number23, (errCode, number) => { - console.log("ZidlTest Client ACTS_Zidl_Js2JsSingle_2100 call return:" + JSON.stringify(number)); - expect(errCode).assertEqual(SUCCESS); - expect(number).assertEqual(456789); - flagFir = true; - checkFinish(); - }); - testProxySingle.voidInOutString(str1, (errCode, str) => { - console.log("ZidlTest Client ACTS_Zidl_Js2JsSingle_2100 call return:" + JSON.stringify(str)); - expect(errCode).assertEqual(SUCCESS); - expect(str).assertEqual("456789"); - flagSec = true; - checkFinish(); - }); - }) - - /** - * @tc.number: ACTS_Zidl_Js2JsSingle_2200 - * @tc.name: support formal parameter type boolean - * @tc.desc: void voidBoolean([in] boolean param); - */ - it('ACTS_Zidl_Js2JsSingle_2200', 0, async function (done) { - console.log('ACTS_Zidl_Js2JsSingle_2200 begin'); - var oBooleanTrue = true; - - testProxySingle.voidParameterTypeBoolean(oBooleanTrue, (errCode)=>{ - expect(errCode).assertEqual(SUCCESS); - done(); - }); - }) - - /** - * @tc.number: ACTS_Zidl_Js2JsSingle_2300 - * @tc.name: support formal parameter type byte - * @tc.desc: void voidByte([in] byte param); - */ - it('ACTS_Zidl_Js2JsSingle_2300', 0, async function (done) { - console.log('ACTS_Zidl_Js2JsSingle_2300 begin'); - var number1 = 1111; - - testProxySingle.voidParameterTypeByte(number1, (errCode)=>{ - expect(errCode).assertEqual(SUCCESS); - done(); - }); - }) - - /** - * @tc.number: ACTS_Zidl_Js2JsSingle_2400 - * @tc.name: support formal parameter type short - * @tc.desc: void voidShort([in] short param); - */ - it('ACTS_Zidl_Js2JsSingle_2400', 0, async function (done) { - console.log('ACTS_Zidl_Js2JsSingle_2400 begin'); - var number2 = 2222; - - testProxySingle.voidParameterTypeShort(number2, (errCode)=>{ - expect(errCode).assertEqual(SUCCESS); - done(); - }); - }) - - /** - * @tc.number: ACTS_Zidl_Js2JsSingle_2500 - * @tc.name: support formal parameter type int - * @tc.desc: void voidInt([in] int param); - */ - it('ACTS_Zidl_Js2JsSingle_2500', 0, async function (done) { - console.log('ACTS_Zidl_Js2JsSingle_2500 begin'); - var number3 = 3333; - - testProxySingle.voidParameterTypeInt(number3, (errCode)=>{ - expect(errCode).assertEqual(SUCCESS); - done(); - }); - }) - - /** - * @tc.number: ACTS_Zidl_Js2JsSingle_2600 - * @tc.name: support formal parameter type long - * @tc.desc: void voidLong([in] long param); - */ - it('ACTS_Zidl_Js2JsSingle_2600', 0, async function (done) { - console.log('ACTS_Zidl_Js2JsSingle_2600 begin'); - var number4 = 4444; - - testProxySingle.voidParameterTypeLong(number4, (errCode)=>{ - expect(errCode).assertEqual(SUCCESS); - done(); - }); - }) - - /** - * @tc.number: ACTS_Zidl_Js2JsSingle_2700 - * @tc.name: support formal parameter type float - * @tc.desc: void voidFloat([in] float param); - */ - it('ACTS_Zidl_Js2JsSingle_2700', 0, async function (done) { - console.log('ACTS_Zidl_Js2JsSingle_2700 begin'); - var number5 = 5555.1; - - testProxySingle.voidParameterTypeFloat(number5, (errCode)=>{ - expect(errCode).assertEqual(SUCCESS); - done(); - }); - }) - - /** - * @tc.number: ACTS_Zidl_Js2JsSingle_2800 - * @tc.name: support formal parameter type double - * @tc.desc: void voidDouble([in] double param); - */ - it('ACTS_Zidl_Js2JsSingle_2800', 0, async function (done) { - console.log('ACTS_Zidl_Js2JsSingle_2800 begin'); - var number6 = 6666.1; - - setTimeout(function () { - testProxySingle.voidParameterTypeDouble(number6, (errCode)=>{ - expect(errCode).assertEqual(SUCCESS); - done(); - }); - }, 500); - }) - - /** - * @tc.number: ACTS_Zidl_Js2JsSingle_2900 - * @tc.name: support formal parameter type String - * @tc.desc: void voidString([in] String param); - */ - it('ACTS_Zidl_Js2JsSingle_2900', 0, async function (done) { - console.log('ACTS_Zidl_Js2JsSingle_2900 begin'); - var str2 = "voidParameterTypeString"; - - testProxySingle.voidParameterTypeString(str2, (errCode)=>{ - expect(errCode).assertEqual(SUCCESS); - done(); - }); - }) - - /** - * @tc.number: ACTS_Zidl_Js2JsSingle_3000 - * @tc.name: support formal parameter type sequenceable - * @tc.desc: void voidSequenceable([in] TestInfo param); - */ - it('ACTS_Zidl_Js2JsSingle_3000', 0, async function (done) { - console.log('ACTS_Zidl_Js2JsSingle_3000 begin'); - let mySequence = new MySequenceable(); - - testProxySingle.voidParameterTypeSequenceable(mySequence, (errCode)=>{ - expect(errCode).assertEqual(SUCCESS); - done(); - }); - }) - - /** - * @tc.number: ACTS_Zidl_Js2JsSingle_3100 - * @tc.name: support formal parameter type interface - * @tc.desc: void voidInterface([in] ITest param); - */ - it('ACTS_Zidl_Js2JsSingle_3100', 0, async function (done) { - console.log('ACTS_Zidl_Js2JsSingle_3100 begin'); - - class InterfaceDeclare extends InterfaceDeclareStub { - testInterface(data: number, callback: testInterfaceCallback): void{ - console.log("ZidlTest Client ACTS_Zidl_Js2JsSingle_3100 called"); - let result = FAIL; - - if (data == 3300) { - result = SUCCESS; - } - callback(result); - } - } - - let clientInterface = new InterfaceDeclare('clientInterface'); - - testProxySingle.voidParameterTypeInterface(clientInterface, (errCode)=>{ - console.log("ZidlTest Client ACTS_Zidl_Js2JsSingle_3100 clientInterface callback"); - expect(errCode).assertEqual(SUCCESS); - done(); - }); - }) - - /** - * @tc.number: ACTS_Zidl_Js2JsSingle_3200 - * @tc.name: support formal parameter type Map - * @tc.desc: void voidMapStringString([in] Map param); - */ - it('ACTS_Zidl_Js2JsSingle_3200', 0, async function (done) { - console.log('ACTS_Zidl_Js2JsSingle_3200 begin'); - var map = new Map(); - map.set("voidParameterTypeMapStringString", "fdhatdh"); - - testProxySingle.voidParameterTypeMapStringString(map, (errCode)=>{ - expect(errCode).assertEqual(SUCCESS); - done(); - }); - }) - - /** - * @tc.number: ACTS_Zidl_Js2JsSingle_3300 - * @tc.name: support formal parameter type array - * @tc.desc: void voidDoubleArray([in] double[] param); - */ - it('ACTS_Zidl_Js2JsSingle_3300', 0, async function (done) { - console.log('ACTS_Zidl_Js2JsSingle_3300 begin'); - var array = [1.1, 2.1]; - - testProxySingle.voidParameterTypeDoubleArray(array, (errCode)=>{ - expect(errCode).assertEqual(SUCCESS); - done(); - }); - }) - - /** - * @tc.number: ACTS_Zidl_Js2JsSingle_3400 - * @tc.name: parameter order - * @tc.desc: order of parameter properties [out], [in] - */ - it('ACTS_Zidl_Js2JsSingle_3400', 0, async function (done) { - var num = 61; - testProxySingle.voidOrderOutIn(num, (errCode, string) => { - console.log("ZidlTest Client ACTS_Zidl_Js2JsSingle_3400 call return:" + string); - expect(errCode).assertEqual(SUCCESS); - expect(string).assertEqual("hello world"); - done(); - }); - }) - - /** - * @tc.number: ACTS_Zidl_Js2JsSingle_3500 - * @tc.name: parameter order - * @tc.desc: order of parameter properties [in, out], [in] - */ - it('ACTS_Zidl_Js2JsSingle_3500', 0, async function (done) { - var num = 62; - var str = "inputparam"; - testProxySingle.voidOrderInOutIn(num, str, (errCode, numparam) => { - console.log("ZidlTest Client ACTS_Zidl_Js2JsSingle_3500 call return:" + numparam); - expect(errCode).assertEqual(SUCCESS); - expect(numparam).assertEqual(6); - done(); - }); - }) - - /** - * @tc.number: ACTS_Zidl_Js2JsSingle_3600 - * @tc.name: parameter order - * @tc.desc: order of parameter properties [out], [in, out] - */ - it('ACTS_Zidl_Js2JsSingle_3600', 0, async function (done) { - var str = "param"; - testProxySingle.voidOrderOutInOut(str, (errCode, paramI, paramS) => { - console.log("ZidlTest Client ACTS_Zidl_Js2JsSingle_3600 call return:" + paramI + " " + paramS); - expect(errCode).assertEqual(SUCCESS); - expect(paramI).assertEqual(3); - expect(paramS).assertEqual("paramcallback"); - done(); - }); - }) - - /** - * @tc.number: ACTS_Zidl_Js2JsSingle_3700 - * @tc.name: parameter order - * @tc.desc: order of parameter properties [in], [in, out], [out] - */ - it('ACTS_Zidl_Js2JsSingle_3700', 0, async function (done) { - var str = "paramInput"; - var num = 64; - testProxySingle.voidOrderInInOutOut(str, num, (errCode, paramI, paramS) => { - console.log("ZidlTest Client ACTS_Zidl_Js2JsSingle_3700 call return:" + paramS + " " + paramI); - expect(errCode).assertEqual(SUCCESS); - expect(paramS).assertEqual("callback"); - expect(paramI).assertEqual(4); - done(); - }); - }) - }) -} \ No newline at end of file diff --git a/ability/ability_runtime/zidltest/actsamszidlclienttest/entry/src/main/ets/test/List.test.ets b/ability/ability_runtime/zidltest/actsamszidlclienttest/entry/src/main/ets/test/List.test.ets deleted file mode 100644 index 882f978e77b1a8fbbf843ccb4dd73c47ed460305..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/zidltest/actsamszidlclienttest/entry/src/main/ets/test/List.test.ets +++ /dev/null @@ -1,22 +0,0 @@ -/* - * 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 abilityTest from './Ability.test.ets' - - -export default function testsuite(context) { - - abilityTest(context) - -} \ No newline at end of file diff --git a/ability/ability_runtime/zidltest/actsamszidlclienttest/entry/src/main/ets/zidlTool/i_zidl_tool_test.ts b/ability/ability_runtime/zidltest/actsamszidlclienttest/entry/src/main/ets/zidlTool/i_zidl_tool_test.ts deleted file mode 100644 index ac9da635209b8b8a170f587485ab01a1e9844fcb..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/zidltest/actsamszidlclienttest/entry/src/main/ets/zidlTool/i_zidl_tool_test.ts +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright (C) 2021 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 MySequenceable from "./my_sequenceable"; -import IInterfaceDeclare from "../interfaceDeclare/i_interface_declare"; - -export default interface IZidlToolTest { - onewayVoidVoid(callback: onewayVoidVoidCallback): void; - voidVoid(callback: voidVoidCallback): void; - booleanVoid(callback: booleanVoidCallback): void; - byteVoid(callback: byteVoidCallback): void; - shortVoid(callback: shortVoidCallback): void; - intVoid(callback: intVoidCallback): void; - longVoid(callback: longVoidCallback): void; - floatVoid(callback: floatVoidCallback): void; - doubleVoid(callback: doubleVoidCallback): void; - stringVoid(callback: stringVoidCallback): void; - sequenceableVoid(callback: sequenceableVoidCallback): void; - interfaceVoid(callback: interfaceVoidCallback): void; - mapStringStringVoid(callback: mapStringStringVoidCallback): void; - doubleArrayVoid(callback: doubleArrayVoidCallback): void; - voidInMapStringInt(param: Map, callback: voidInMapStringIntCallback): void; - voidInStringArray(param: string[], callback: voidInStringArrayCallback): void; - voidOutMapStringInt(callback: voidOutMapStringIntCallback): void; - voidOutStringArray(callback: voidOutStringArrayCallback): void; - voidInOutMapStringInt(param: Map, callback: voidInOutMapStringIntCallback): void; - voidInOutStringArray(param: string[], callback: voidInOutStringArrayCallback): void; - voidInInt(param: number, callback: voidInIntCallback): void; - voidInString(param: string, callback: voidInStringCallback): void; - voidOutInt(callback: voidOutIntCallback): void; - voidOutString(callback: voidOutStringCallback): void; - voidInOutInt(param: number, callback: voidInOutIntCallback): void; - voidInOutString(param: string, callback: voidInOutStringCallback): void; - voidParameterTypeBoolean(param: boolean, callback: voidParameterTypeBooleanCallback): void; - voidParameterTypeByte(param: number, callback: voidParameterTypeByteCallback): void; - voidParameterTypeShort(param: number, callback: voidParameterTypeShortCallback): void; - voidParameterTypeInt(param: number, callback: voidParameterTypeIntCallback): void; - voidParameterTypeLong(param: number, callback: voidParameterTypeLongCallback): void; - voidParameterTypeFloat(param: number, callback: voidParameterTypeFloatCallback): void; - voidParameterTypeDouble(param: number, callback: voidParameterTypeDoubleCallback): void; - voidParameterTypeString(param: string, callback: voidParameterTypeStringCallback): void; - voidParameterTypeSequenceable(param: MySequenceable, callback: voidParameterTypeSequenceableCallback): void; - voidParameterTypeInterface(param: IInterfaceDeclare, callback: voidParameterTypeInterfaceCallback): void; - voidParameterTypeMapStringString(param: Map, callback: voidParameterTypeMapStringStringCallback): void; - voidParameterTypeDoubleArray(param: number[], callback: voidParameterTypeDoubleArrayCallback): void; - voidOrderOutIn(paramI: number, callback: voidOrderOutInCallback): void; - voidOrderInOutIn(paramI: number, paramS: string, callback: voidOrderInOutInCallback): void; - voidOrderOutInOut(paramS: string, callback: voidOrderOutInOutCallback): void; - voidOrderInInOutOut(paramS: string, paramI: number, callback: voidOrderInInOutOutCallback): void; -} -export type onewayVoidVoidCallback = (errCode: number) => void; -export type voidVoidCallback = (errCode: number) => void; -export type booleanVoidCallback = (errCode: number, returnValue: boolean) => void; -export type byteVoidCallback = (errCode: number, returnValue: number) => void; -export type shortVoidCallback = (errCode: number, returnValue: number) => void; -export type intVoidCallback = (errCode: number, returnValue: number) => void; -export type longVoidCallback = (errCode: number, returnValue: number) => void; -export type floatVoidCallback = (errCode: number, returnValue: number) => void; -export type doubleVoidCallback = (errCode: number, returnValue: number) => void; -export type stringVoidCallback = (errCode: number, returnValue: string) => void; -export type sequenceableVoidCallback = (errCode: number, returnValue: MySequenceable) => void; -export type interfaceVoidCallback = (errCode: number, returnValue: IInterfaceDeclare) => void; -export type mapStringStringVoidCallback = (errCode: number, returnValue: Map) => void; -export type doubleArrayVoidCallback = (errCode: number, returnValue: number[]) => void; -export type voidInMapStringIntCallback = (errCode: number) => void; -export type voidInStringArrayCallback = (errCode: number) => void; -export type voidOutMapStringIntCallback = (errCode: number, param: Map) => void; -export type voidOutStringArrayCallback = (errCode: number, param: string[]) => void; -export type voidInOutMapStringIntCallback = (errCode: number, param: Map) => void; -export type voidInOutStringArrayCallback = (errCode: number, param: string[]) => void; -export type voidInIntCallback = (errCode: number) => void; -export type voidInStringCallback = (errCode: number) => void; -export type voidOutIntCallback = (errCode: number, param: number) => void; -export type voidOutStringCallback = (errCode: number, param: string) => void; -export type voidInOutIntCallback = (errCode: number, param: number) => void; -export type voidInOutStringCallback = (errCode: number, param: string) => void; -export type voidParameterTypeBooleanCallback = (errCode: number) => void; -export type voidParameterTypeByteCallback = (errCode: number) => void; -export type voidParameterTypeShortCallback = (errCode: number) => void; -export type voidParameterTypeIntCallback = (errCode: number) => void; -export type voidParameterTypeLongCallback = (errCode: number) => void; -export type voidParameterTypeFloatCallback = (errCode: number) => void; -export type voidParameterTypeDoubleCallback = (errCode: number) => void; -export type voidParameterTypeStringCallback = (errCode: number) => void; -export type voidParameterTypeSequenceableCallback = (errCode: number) => void; -export type voidParameterTypeInterfaceCallback = (errCode: number) => void; -export type voidParameterTypeMapStringStringCallback = (errCode: number) => void; -export type voidParameterTypeDoubleArrayCallback = (errCode: number) => void; -export type voidOrderOutInCallback = (errCode: number, paramS: string) => void; -export type voidOrderInOutInCallback = (errCode: number, paramI: number) => void; -export type voidOrderOutInOutCallback = (errCode: number, paramI: number, paramS: string) => void; -export type voidOrderInInOutOutCallback = (errCode: number, paramI: number, paramS2: string) => void; - diff --git a/ability/ability_runtime/zidltest/actsamszidlclienttest/entry/src/main/ets/zidlTool/my_sequenceable.ts b/ability/ability_runtime/zidltest/actsamszidlclienttest/entry/src/main/ets/zidlTool/my_sequenceable.ts deleted file mode 100644 index 742b78e6a737b29de1a909d4ed6c03b1768064cd..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/zidltest/actsamszidlclienttest/entry/src/main/ets/zidlTool/my_sequenceable.ts +++ /dev/null @@ -1,28 +0,0 @@ -export default class MySequenceable { - constructor() { - this.num = 32; - this.str = "nihao"; - } - getNum() : number { - return this.num; - } - - getString() : string { - return this.str; - } - - marshalling(messageParcel) { - console.info('marshalling++++'); - messageParcel.writeInt(this.num); - messageParcel.writeString(this.str); - return true; - } - unmarshalling(messageParcel) { - console.info('unmarshalling++++'); - this.num = messageParcel.readInt(); - this.str = messageParcel.readString(); - return true; - } - private num; - private str; -} \ No newline at end of file diff --git a/ability/ability_runtime/zidltest/actsamszidlclienttest/entry/src/main/ets/zidlTool/zidl_tool_test_proxy.ts b/ability/ability_runtime/zidltest/actsamszidlclienttest/entry/src/main/ets/zidlTool/zidl_tool_test_proxy.ts deleted file mode 100644 index c1431ca78cc44f27500b399da5b0805a27bb4947..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/zidltest/actsamszidlclienttest/entry/src/main/ets/zidlTool/zidl_tool_test_proxy.ts +++ /dev/null @@ -1,948 +0,0 @@ -/* - * Copyright (C) 2021 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 {onewayVoidVoidCallback} from "./i_zidl_tool_test"; -import {voidVoidCallback} from "./i_zidl_tool_test"; -import {booleanVoidCallback} from "./i_zidl_tool_test"; -import {byteVoidCallback} from "./i_zidl_tool_test"; -import {shortVoidCallback} from "./i_zidl_tool_test"; -import {intVoidCallback} from "./i_zidl_tool_test"; -import {longVoidCallback} from "./i_zidl_tool_test"; -import {floatVoidCallback} from "./i_zidl_tool_test"; -import {doubleVoidCallback} from "./i_zidl_tool_test"; -import {stringVoidCallback} from "./i_zidl_tool_test"; -import {sequenceableVoidCallback} from "./i_zidl_tool_test"; -import {interfaceVoidCallback} from "./i_zidl_tool_test"; -import {mapStringStringVoidCallback} from "./i_zidl_tool_test"; -import {doubleArrayVoidCallback} from "./i_zidl_tool_test"; -import {voidInMapStringIntCallback} from "./i_zidl_tool_test"; -import {voidInStringArrayCallback} from "./i_zidl_tool_test"; -import {voidOutMapStringIntCallback} from "./i_zidl_tool_test"; -import {voidOutStringArrayCallback} from "./i_zidl_tool_test"; -import {voidInOutMapStringIntCallback} from "./i_zidl_tool_test"; -import {voidInOutStringArrayCallback} from "./i_zidl_tool_test"; -import {voidInIntCallback} from "./i_zidl_tool_test"; -import {voidInStringCallback} from "./i_zidl_tool_test"; -import {voidOutIntCallback} from "./i_zidl_tool_test"; -import {voidOutStringCallback} from "./i_zidl_tool_test"; -import {voidInOutIntCallback} from "./i_zidl_tool_test"; -import {voidInOutStringCallback} from "./i_zidl_tool_test"; -import {voidParameterTypeBooleanCallback} from "./i_zidl_tool_test"; -import {voidParameterTypeByteCallback} from "./i_zidl_tool_test"; -import {voidParameterTypeShortCallback} from "./i_zidl_tool_test"; -import {voidParameterTypeIntCallback} from "./i_zidl_tool_test"; -import {voidParameterTypeLongCallback} from "./i_zidl_tool_test"; -import {voidParameterTypeFloatCallback} from "./i_zidl_tool_test"; -import {voidParameterTypeDoubleCallback} from "./i_zidl_tool_test"; -import {voidParameterTypeStringCallback} from "./i_zidl_tool_test"; -import {voidParameterTypeSequenceableCallback} from "./i_zidl_tool_test"; -import {voidParameterTypeInterfaceCallback} from "./i_zidl_tool_test"; -import {voidParameterTypeMapStringStringCallback} from "./i_zidl_tool_test"; -import {voidParameterTypeDoubleArrayCallback} from "./i_zidl_tool_test"; -import {voidOrderOutInCallback} from "./i_zidl_tool_test"; -import {voidOrderInOutInCallback} from "./i_zidl_tool_test"; -import {voidOrderOutInOutCallback} from "./i_zidl_tool_test"; -import {voidOrderInInOutOutCallback} from "./i_zidl_tool_test"; -import IZidlToolTest from "./i_zidl_tool_test"; -import rpc from "@ohos.rpc"; -import MySequenceable from "./my_sequenceable"; -import IInterfaceDeclare from "../interfaceDeclare/i_interface_declare"; -import InterfaceDeclareStub from "../interfaceDeclare/interface_declare_stub"; - -export default class ZidlToolTestProxy implements IZidlToolTest { - constructor(proxy) { - this.proxy = proxy; - } - - onewayVoidVoid(callback: onewayVoidVoidCallback): void - { - let _option = new rpc.MessageOption(rpc.MessageOption.TF_ASYNC); - let _data = new rpc.MessageParcel(); - let _reply = new rpc.MessageParcel(); - this.proxy.sendRequest(ZidlToolTestProxy.COMMAND_ONEWAY_VOID_VOID, _data, _reply, _option).then(function(result) { - if (result.errCode === 0) { - let _errCode = result.reply.readInt(); - callback(_errCode); - } else { - console.log("sendRequest failed, errCode: " + result.errCode); - } - }) - } - - voidVoid(callback: voidVoidCallback): void - { - let _option = new rpc.MessageOption(rpc.MessageOption.TF_SYNC); - let _data = new rpc.MessageParcel(); - let _reply = new rpc.MessageParcel(); - this.proxy.sendRequest(ZidlToolTestProxy.COMMAND_VOID_VOID, _data, _reply, _option).then(function(result) { - if (result.errCode === 0) { - let _errCode = result.reply.readInt(); - callback(_errCode); - } else { - console.log("sendRequest failed, errCode: " + result.errCode); - } - }) - } - - booleanVoid(callback: booleanVoidCallback): void - { - let _option = new rpc.MessageOption(rpc.MessageOption.TF_SYNC); - let _data = new rpc.MessageParcel(); - let _reply = new rpc.MessageParcel(); - this.proxy.sendRequest(ZidlToolTestProxy.COMMAND_BOOLEAN_VOID, _data, _reply, _option).then(function(result) { - if (result.errCode === 0) { - let _errCode = result.reply.readInt(); - if (_errCode != 0) { - let _returnValue = undefined; - callback(_errCode, _returnValue); - return; - } - let _returnValue = result.reply.readInt() == 1 ? true : false; - callback(_errCode, _returnValue); - } else { - console.log("sendRequest failed, errCode: " + result.errCode); - } - }) - } - - byteVoid(callback: byteVoidCallback): void - { - let _option = new rpc.MessageOption(rpc.MessageOption.TF_SYNC); - let _data = new rpc.MessageParcel(); - let _reply = new rpc.MessageParcel(); - this.proxy.sendRequest(ZidlToolTestProxy.COMMAND_BYTE_VOID, _data, _reply, _option).then(function(result) { - if (result.errCode === 0) { - let _errCode = result.reply.readInt(); - if (_errCode != 0) { - let _returnValue = undefined; - callback(_errCode, _returnValue); - return; - } - let _returnValue = result.reply.readInt(); - callback(_errCode, _returnValue); - } else { - console.log("sendRequest failed, errCode: " + result.errCode); - } - }) - } - - shortVoid(callback: shortVoidCallback): void - { - let _option = new rpc.MessageOption(rpc.MessageOption.TF_SYNC); - let _data = new rpc.MessageParcel(); - let _reply = new rpc.MessageParcel(); - this.proxy.sendRequest(ZidlToolTestProxy.COMMAND_SHORT_VOID, _data, _reply, _option).then(function(result) { - if (result.errCode === 0) { - let _errCode = result.reply.readInt(); - if (_errCode != 0) { - let _returnValue = undefined; - callback(_errCode, _returnValue); - return; - } - let _returnValue = result.reply.readInt(); - callback(_errCode, _returnValue); - } else { - console.log("sendRequest failed, errCode: " + result.errCode); - } - }) - } - - intVoid(callback: intVoidCallback): void - { - let _option = new rpc.MessageOption(rpc.MessageOption.TF_SYNC); - let _data = new rpc.MessageParcel(); - let _reply = new rpc.MessageParcel(); - this.proxy.sendRequest(ZidlToolTestProxy.COMMAND_INT_VOID, _data, _reply, _option).then(function(result) { - if (result.errCode === 0) { - let _errCode = result.reply.readInt(); - if (_errCode != 0) { - let _returnValue = undefined; - callback(_errCode, _returnValue); - return; - } - let _returnValue = result.reply.readInt(); - callback(_errCode, _returnValue); - } else { - console.log("sendRequest failed, errCode: " + result.errCode); - } - }) - } - - longVoid(callback: longVoidCallback): void - { - let _option = new rpc.MessageOption(rpc.MessageOption.TF_SYNC); - let _data = new rpc.MessageParcel(); - let _reply = new rpc.MessageParcel(); - this.proxy.sendRequest(ZidlToolTestProxy.COMMAND_LONG_VOID, _data, _reply, _option).then(function(result) { - if (result.errCode === 0) { - let _errCode = result.reply.readInt(); - if (_errCode != 0) { - let _returnValue = undefined; - callback(_errCode, _returnValue); - return; - } - let _returnValue = result.reply.readLong(); - callback(_errCode, _returnValue); - } else { - console.log("sendRequest failed, errCode: " + result.errCode); - } - }) - } - - floatVoid(callback: floatVoidCallback): void - { - let _option = new rpc.MessageOption(rpc.MessageOption.TF_SYNC); - let _data = new rpc.MessageParcel(); - let _reply = new rpc.MessageParcel(); - this.proxy.sendRequest(ZidlToolTestProxy.COMMAND_FLOAT_VOID, _data, _reply, _option).then(function(result) { - if (result.errCode === 0) { - let _errCode = result.reply.readInt(); - if (_errCode != 0) { - let _returnValue = undefined; - callback(_errCode, _returnValue); - return; - } - let _returnValue = result.reply.readFloat(); - callback(_errCode, _returnValue); - } else { - console.log("sendRequest failed, errCode: " + result.errCode); - } - }) - } - - doubleVoid(callback: doubleVoidCallback): void - { - let _option = new rpc.MessageOption(rpc.MessageOption.TF_SYNC); - let _data = new rpc.MessageParcel(); - let _reply = new rpc.MessageParcel(); - this.proxy.sendRequest(ZidlToolTestProxy.COMMAND_DOUBLE_VOID, _data, _reply, _option).then(function(result) { - if (result.errCode === 0) { - let _errCode = result.reply.readInt(); - if (_errCode != 0) { - let _returnValue = undefined; - callback(_errCode, _returnValue); - return; - } - let _returnValue = result.reply.readDouble(); - callback(_errCode, _returnValue); - } else { - console.log("sendRequest failed, errCode: " + result.errCode); - } - }) - } - - stringVoid(callback: stringVoidCallback): void - { - let _option = new rpc.MessageOption(rpc.MessageOption.TF_SYNC); - let _data = new rpc.MessageParcel(); - let _reply = new rpc.MessageParcel(); - this.proxy.sendRequest(ZidlToolTestProxy.COMMAND_STRING_VOID, _data, _reply, _option).then(function(result) { - if (result.errCode === 0) { - let _errCode = result.reply.readInt(); - if (_errCode != 0) { - let _returnValue = undefined; - callback(_errCode, _returnValue); - return; - } - let _returnValue = result.reply.readString(); - callback(_errCode, _returnValue); - } else { - console.log("sendRequest failed, errCode: " + result.errCode); - } - }) - } - - sequenceableVoid(callback: sequenceableVoidCallback): void - { - let _option = new rpc.MessageOption(rpc.MessageOption.TF_SYNC); - let _data = new rpc.MessageParcel(); - let _reply = new rpc.MessageParcel(); - this.proxy.sendRequest(ZidlToolTestProxy.COMMAND_SEQUENCEABLE_VOID, _data, _reply, _option).then(function(result) { - if (result.errCode === 0) { - let _errCode = result.reply.readInt(); - if (_errCode != 0) { - let _returnValue = undefined; - callback(_errCode, _returnValue); - return; - } - let _returnValue = new MySequenceable(); - result.reply.readSequenceable(_returnValue); - callback(_errCode, _returnValue); - } else { - console.log("sendRequest failed, errCode: " + result.errCode); - } - }) - } - - interfaceVoid(callback: interfaceVoidCallback): void - { - let _option = new rpc.MessageOption(rpc.MessageOption.TF_SYNC); - let _data = new rpc.MessageParcel(); - let _reply = new rpc.MessageParcel(); - this.proxy.sendRequest(ZidlToolTestProxy.COMMAND_INTERFACE_VOID, _data, _reply, _option).then(function(result) { - if (result.errCode === 0) { - let _errCode = result.reply.readInt(); - if (_errCode != 0) { - let _returnValue = undefined; - callback(_errCode, _returnValue); - return; - } - let _returnValue = result.reply.readRemoteObject(); - callback(_errCode, _returnValue); - } else { - console.log("sendRequest failed, errCode: " + result.errCode); - } - }) - } - - mapStringStringVoid(callback: mapStringStringVoidCallback): void - { - let _option = new rpc.MessageOption(rpc.MessageOption.TF_SYNC); - let _data = new rpc.MessageParcel(); - let _reply = new rpc.MessageParcel(); - this.proxy.sendRequest(ZidlToolTestProxy.COMMAND_MAP_STRING_STRING_VOID, _data, _reply, _option).then(function(result) { - if (result.errCode === 0) { - let _errCode = result.reply.readInt(); - if (_errCode != 0) { - let _returnValue = undefined; - callback(_errCode, _returnValue); - return; - } - let _returnValue = new Map(); - let _returnValueSize = result.reply.readInt(); - for (let i = 0; i < _returnValueSize; ++i) { - let key = result.reply.readString(); - let value = result.reply.readString(); - _returnValue.set(key, value); - } - callback(_errCode, _returnValue); - } else { - console.log("sendRequest failed, errCode: " + result.errCode); - } - }) - } - - doubleArrayVoid(callback: doubleArrayVoidCallback): void - { - let _option = new rpc.MessageOption(rpc.MessageOption.TF_SYNC); - let _data = new rpc.MessageParcel(); - let _reply = new rpc.MessageParcel(); - this.proxy.sendRequest(ZidlToolTestProxy.COMMAND_DOUBLE_ARRAY_VOID, _data, _reply, _option).then(function(result) { - if (result.errCode === 0) { - let _errCode = result.reply.readInt(); - if (_errCode != 0) { - let _returnValue = undefined; - callback(_errCode, _returnValue); - return; - } - let _returnValue = result.reply.readDoubleArray(); - callback(_errCode, _returnValue); - } else { - console.log("sendRequest failed, errCode: " + result.errCode); - } - }) - } - - voidInMapStringInt(param: Map, callback: voidInMapStringIntCallback): void - { - let _option = new rpc.MessageOption(rpc.MessageOption.TF_SYNC); - let _data = new rpc.MessageParcel(); - let _reply = new rpc.MessageParcel(); - _data.writeInt(param.size); - for (let [key, value] of param) { - _data.writeString(key); - _data.writeInt(value); - } - this.proxy.sendRequest(ZidlToolTestProxy.COMMAND_VOID_IN_MAP_STRING_INT, _data, _reply, _option).then(function(result) { - if (result.errCode === 0) { - let _errCode = result.reply.readInt(); - callback(_errCode); - } else { - console.log("sendRequest failed, errCode: " + result.errCode); - } - }) - } - - voidInStringArray(param: string[], callback: voidInStringArrayCallback): void - { - let _option = new rpc.MessageOption(rpc.MessageOption.TF_SYNC); - let _data = new rpc.MessageParcel(); - let _reply = new rpc.MessageParcel(); - _data.writeStringArray(param); - this.proxy.sendRequest(ZidlToolTestProxy.COMMAND_VOID_IN_STRING_ARRAY, _data, _reply, _option).then(function(result) { - if (result.errCode === 0) { - let _errCode = result.reply.readInt(); - callback(_errCode); - } else { - console.log("sendRequest failed, errCode: " + result.errCode); - } - }) - } - - voidOutMapStringInt(callback: voidOutMapStringIntCallback): void - { - let _option = new rpc.MessageOption(rpc.MessageOption.TF_SYNC); - let _data = new rpc.MessageParcel(); - let _reply = new rpc.MessageParcel(); - this.proxy.sendRequest(ZidlToolTestProxy.COMMAND_VOID_OUT_MAP_STRING_INT, _data, _reply, _option).then(function(result) { - if (result.errCode === 0) { - let _errCode = result.reply.readInt(); - if (_errCode != 0) { - let _param = undefined; - callback(_errCode,_param); - return; - } - let _param = new Map(); - let _paramSize = result.reply.readInt(); - for (let i = 0; i < _paramSize; ++i) { - let key = result.reply.readString(); - let value = result.reply.readInt(); - _param.set(key, value); - } - callback(_errCode,_param); - } else { - console.log("sendRequest failed, errCode: " + result.errCode); - } - }) - } - - voidOutStringArray(callback: voidOutStringArrayCallback): void - { - let _option = new rpc.MessageOption(rpc.MessageOption.TF_SYNC); - let _data = new rpc.MessageParcel(); - let _reply = new rpc.MessageParcel(); - this.proxy.sendRequest(ZidlToolTestProxy.COMMAND_VOID_OUT_STRING_ARRAY, _data, _reply, _option).then(function(result) { - if (result.errCode === 0) { - let _errCode = result.reply.readInt(); - if (_errCode != 0) { - let _param = undefined; - callback(_errCode,_param); - return; - } - let _param = result.reply.readStringArray(); - callback(_errCode,_param); - } else { - console.log("sendRequest failed, errCode: " + result.errCode); - } - }) - } - - voidInOutMapStringInt(param: Map, callback: voidInOutMapStringIntCallback): void - { - let _option = new rpc.MessageOption(rpc.MessageOption.TF_SYNC); - let _data = new rpc.MessageParcel(); - let _reply = new rpc.MessageParcel(); - _data.writeInt(param.size); - for (let [key, value] of param) { - _data.writeString(key); - _data.writeInt(value); - } - this.proxy.sendRequest(ZidlToolTestProxy.COMMAND_VOID_IN_OUT_MAP_STRING_INT, _data, _reply, _option).then(function(result) { - if (result.errCode === 0) { - let _errCode = result.reply.readInt(); - if (_errCode != 0) { - let _param = undefined; - callback(_errCode,_param); - return; - } - let _param = new Map(); - let _paramSize = result.reply.readInt(); - for (let i = 0; i < _paramSize; ++i) { - let key = result.reply.readString(); - let value = result.reply.readInt(); - _param.set(key, value); - } - callback(_errCode,_param); - } else { - console.log("sendRequest failed, errCode: " + result.errCode); - } - }) - } - - voidInOutStringArray(param: string[], callback: voidInOutStringArrayCallback): void - { - let _option = new rpc.MessageOption(rpc.MessageOption.TF_SYNC); - let _data = new rpc.MessageParcel(); - let _reply = new rpc.MessageParcel(); - _data.writeStringArray(param); - this.proxy.sendRequest(ZidlToolTestProxy.COMMAND_VOID_IN_OUT_STRING_ARRAY, _data, _reply, _option).then(function(result) { - if (result.errCode === 0) { - let _errCode = result.reply.readInt(); - if (_errCode != 0) { - let _param = undefined; - callback(_errCode,_param); - return; - } - let _param = result.reply.readStringArray(); - callback(_errCode,_param); - } else { - console.log("sendRequest failed, errCode: " + result.errCode); - } - }) - } - - voidInInt(param: number, callback: voidInIntCallback): void - { - let _option = new rpc.MessageOption(rpc.MessageOption.TF_SYNC); - let _data = new rpc.MessageParcel(); - let _reply = new rpc.MessageParcel(); - _data.writeInt(param); - this.proxy.sendRequest(ZidlToolTestProxy.COMMAND_VOID_IN_INT, _data, _reply, _option).then(function(result) { - if (result.errCode === 0) { - let _errCode = result.reply.readInt(); - callback(_errCode); - } else { - console.log("sendRequest failed, errCode: " + result.errCode); - } - }) - } - - voidInString(param: string, callback: voidInStringCallback): void - { - let _option = new rpc.MessageOption(rpc.MessageOption.TF_SYNC); - let _data = new rpc.MessageParcel(); - let _reply = new rpc.MessageParcel(); - _data.writeString(param); - this.proxy.sendRequest(ZidlToolTestProxy.COMMAND_VOID_IN_STRING, _data, _reply, _option).then(function(result) { - if (result.errCode === 0) { - let _errCode = result.reply.readInt(); - callback(_errCode); - } else { - console.log("sendRequest failed, errCode: " + result.errCode); - } - }) - } - - voidOutInt(callback: voidOutIntCallback): void - { - let _option = new rpc.MessageOption(rpc.MessageOption.TF_SYNC); - let _data = new rpc.MessageParcel(); - let _reply = new rpc.MessageParcel(); - this.proxy.sendRequest(ZidlToolTestProxy.COMMAND_VOID_OUT_INT, _data, _reply, _option).then(function(result) { - if (result.errCode === 0) { - let _errCode = result.reply.readInt(); - if (_errCode != 0) { - let _param = undefined; - callback(_errCode,_param); - return; - } - let _param = result.reply.readInt(); - callback(_errCode,_param); - } else { - console.log("sendRequest failed, errCode: " + result.errCode); - } - }) - } - - voidOutString(callback: voidOutStringCallback): void - { - let _option = new rpc.MessageOption(rpc.MessageOption.TF_SYNC); - let _data = new rpc.MessageParcel(); - let _reply = new rpc.MessageParcel(); - this.proxy.sendRequest(ZidlToolTestProxy.COMMAND_VOID_OUT_STRING, _data, _reply, _option).then(function(result) { - if (result.errCode === 0) { - let _errCode = result.reply.readInt(); - if (_errCode != 0) { - let _param = undefined; - callback(_errCode,_param); - return; - } - let _param = result.reply.readString(); - callback(_errCode,_param); - } else { - console.log("sendRequest failed, errCode: " + result.errCode); - } - }) - } - - voidInOutInt(param: number, callback: voidInOutIntCallback): void - { - let _option = new rpc.MessageOption(rpc.MessageOption.TF_SYNC); - let _data = new rpc.MessageParcel(); - let _reply = new rpc.MessageParcel(); - _data.writeInt(param); - this.proxy.sendRequest(ZidlToolTestProxy.COMMAND_VOID_IN_OUT_INT, _data, _reply, _option).then(function(result) { - if (result.errCode === 0) { - let _errCode = result.reply.readInt(); - if (_errCode != 0) { - let _param = undefined; - callback(_errCode,_param); - return; - } - let _param = result.reply.readInt(); - callback(_errCode,_param); - } else { - console.log("sendRequest failed, errCode: " + result.errCode); - } - }) - } - - voidInOutString(param: string, callback: voidInOutStringCallback): void - { - let _option = new rpc.MessageOption(rpc.MessageOption.TF_SYNC); - let _data = new rpc.MessageParcel(); - let _reply = new rpc.MessageParcel(); - _data.writeString(param); - this.proxy.sendRequest(ZidlToolTestProxy.COMMAND_VOID_IN_OUT_STRING, _data, _reply, _option).then(function(result) { - if (result.errCode === 0) { - let _errCode = result.reply.readInt(); - if (_errCode != 0) { - let _param = undefined; - callback(_errCode,_param); - return; - } - let _param = result.reply.readString(); - callback(_errCode,_param); - } else { - console.log("sendRequest failed, errCode: " + result.errCode); - } - }) - } - - voidParameterTypeBoolean(param: boolean, callback: voidParameterTypeBooleanCallback): void - { - let _option = new rpc.MessageOption(rpc.MessageOption.TF_SYNC); - let _data = new rpc.MessageParcel(); - let _reply = new rpc.MessageParcel(); - _data.writeInt(param ? 1 : 0); - this.proxy.sendRequest(ZidlToolTestProxy.COMMAND_VOID_PARAMETER_TYPE_BOOLEAN, _data, _reply, _option).then(function(result) { - if (result.errCode === 0) { - let _errCode = result.reply.readInt(); - callback(_errCode); - } else { - console.log("sendRequest failed, errCode: " + result.errCode); - } - }) - } - - voidParameterTypeByte(param: number, callback: voidParameterTypeByteCallback): void - { - let _option = new rpc.MessageOption(rpc.MessageOption.TF_SYNC); - let _data = new rpc.MessageParcel(); - let _reply = new rpc.MessageParcel(); - _data.writeInt(param); - this.proxy.sendRequest(ZidlToolTestProxy.COMMAND_VOID_PARAMETER_TYPE_BYTE, _data, _reply, _option).then(function(result) { - if (result.errCode === 0) { - let _errCode = result.reply.readInt(); - callback(_errCode); - } else { - console.log("sendRequest failed, errCode: " + result.errCode); - } - }) - } - - voidParameterTypeShort(param: number, callback: voidParameterTypeShortCallback): void - { - let _option = new rpc.MessageOption(rpc.MessageOption.TF_SYNC); - let _data = new rpc.MessageParcel(); - let _reply = new rpc.MessageParcel(); - _data.writeInt(param); - this.proxy.sendRequest(ZidlToolTestProxy.COMMAND_VOID_PARAMETER_TYPE_SHORT, _data, _reply, _option).then(function(result) { - if (result.errCode === 0) { - let _errCode = result.reply.readInt(); - callback(_errCode); - } else { - console.log("sendRequest failed, errCode: " + result.errCode); - } - }) - } - - voidParameterTypeInt(param: number, callback: voidParameterTypeIntCallback): void - { - let _option = new rpc.MessageOption(rpc.MessageOption.TF_SYNC); - let _data = new rpc.MessageParcel(); - let _reply = new rpc.MessageParcel(); - _data.writeInt(param); - this.proxy.sendRequest(ZidlToolTestProxy.COMMAND_VOID_PARAMETER_TYPE_INT, _data, _reply, _option).then(function(result) { - if (result.errCode === 0) { - let _errCode = result.reply.readInt(); - callback(_errCode); - } else { - console.log("sendRequest failed, errCode: " + result.errCode); - } - }) - } - - voidParameterTypeLong(param: number, callback: voidParameterTypeLongCallback): void - { - let _option = new rpc.MessageOption(rpc.MessageOption.TF_SYNC); - let _data = new rpc.MessageParcel(); - let _reply = new rpc.MessageParcel(); - _data.writeLong(param); - this.proxy.sendRequest(ZidlToolTestProxy.COMMAND_VOID_PARAMETER_TYPE_LONG, _data, _reply, _option).then(function(result) { - if (result.errCode === 0) { - let _errCode = result.reply.readInt(); - callback(_errCode); - } else { - console.log("sendRequest failed, errCode: " + result.errCode); - } - }) - } - - voidParameterTypeFloat(param: number, callback: voidParameterTypeFloatCallback): void - { - let _option = new rpc.MessageOption(rpc.MessageOption.TF_SYNC); - let _data = new rpc.MessageParcel(); - let _reply = new rpc.MessageParcel(); - _data.writeFloat(param); - this.proxy.sendRequest(ZidlToolTestProxy.COMMAND_VOID_PARAMETER_TYPE_FLOAT, _data, _reply, _option).then(function(result) { - if (result.errCode === 0) { - let _errCode = result.reply.readInt(); - callback(_errCode); - } else { - console.log("sendRequest failed, errCode: " + result.errCode); - } - }) - } - - voidParameterTypeDouble(param: number, callback: voidParameterTypeDoubleCallback): void - { - let _option = new rpc.MessageOption(rpc.MessageOption.TF_SYNC); - let _data = new rpc.MessageParcel(); - let _reply = new rpc.MessageParcel(); - _data.writeDouble(param); - this.proxy.sendRequest(ZidlToolTestProxy.COMMAND_VOID_PARAMETER_TYPE_DOUBLE, _data, _reply, _option).then(function(result) { - if (result.errCode === 0) { - let _errCode = result.reply.readInt(); - callback(_errCode); - } else { - console.log("sendRequest failed, errCode: " + result.errCode); - } - }) - } - - voidParameterTypeString(param: string, callback: voidParameterTypeStringCallback): void - { - let _option = new rpc.MessageOption(rpc.MessageOption.TF_SYNC); - let _data = new rpc.MessageParcel(); - let _reply = new rpc.MessageParcel(); - _data.writeString(param); - this.proxy.sendRequest(ZidlToolTestProxy.COMMAND_VOID_PARAMETER_TYPE_STRING, _data, _reply, _option).then(function(result) { - if (result.errCode === 0) { - let _errCode = result.reply.readInt(); - callback(_errCode); - } else { - console.log("sendRequest failed, errCode: " + result.errCode); - } - }) - } - - voidParameterTypeSequenceable(param: MySequenceable, callback: voidParameterTypeSequenceableCallback): void - { - let _option = new rpc.MessageOption(rpc.MessageOption.TF_SYNC); - let _data = new rpc.MessageParcel(); - let _reply = new rpc.MessageParcel(); - _data.writeSequenceable(param); - this.proxy.sendRequest(ZidlToolTestProxy.COMMAND_VOID_PARAMETER_TYPE_SEQUENCEABLE, _data, _reply, _option).then(function(result) { - if (result.errCode === 0) { - let _errCode = result.reply.readInt(); - callback(_errCode); - } else { - console.log("sendRequest failed, errCode: " + result.errCode); - } - }) - } - - voidParameterTypeInterface(param: IInterfaceDeclare, callback: voidParameterTypeInterfaceCallback): void - { - let _option = new rpc.MessageOption(rpc.MessageOption.TF_SYNC); - let _data = new rpc.MessageParcel(); - let _reply = new rpc.MessageParcel(); - _data.writeRemoteObject(param as InterfaceDeclareStub); - this.proxy.sendRequest(ZidlToolTestProxy.COMMAND_VOID_PARAMETER_TYPE_INTERFACE, _data, _reply, _option).then(function(result) { - if (result.errCode === 0) { - let _errCode = result.reply.readInt(); - callback(_errCode); - } else { - console.log("sendRequest failed, errCode: " + result.errCode); - } - }) - } - - voidParameterTypeMapStringString(param: Map, callback: voidParameterTypeMapStringStringCallback): void - { - let _option = new rpc.MessageOption(rpc.MessageOption.TF_SYNC); - let _data = new rpc.MessageParcel(); - let _reply = new rpc.MessageParcel(); - _data.writeInt(param.size); - for (let [key, value] of param) { - _data.writeString(key); - _data.writeString(value); - } - this.proxy.sendRequest(ZidlToolTestProxy.COMMAND_VOID_PARAMETER_TYPE_MAP_STRING_STRING, _data, _reply, _option).then(function(result) { - if (result.errCode === 0) { - let _errCode = result.reply.readInt(); - callback(_errCode); - } else { - console.log("sendRequest failed, errCode: " + result.errCode); - } - }) - } - - voidParameterTypeDoubleArray(param: number[], callback: voidParameterTypeDoubleArrayCallback): void - { - let _option = new rpc.MessageOption(rpc.MessageOption.TF_SYNC); - let _data = new rpc.MessageParcel(); - let _reply = new rpc.MessageParcel(); - _data.writeDoubleArray(param); - this.proxy.sendRequest(ZidlToolTestProxy.COMMAND_VOID_PARAMETER_TYPE_DOUBLE_ARRAY, _data, _reply, _option).then(function(result) { - if (result.errCode === 0) { - let _errCode = result.reply.readInt(); - callback(_errCode); - } else { - console.log("sendRequest failed, errCode: " + result.errCode); - } - }) - } - - voidOrderOutIn(paramI: number, callback: voidOrderOutInCallback): void - { - let _option = new rpc.MessageOption(rpc.MessageOption.TF_SYNC); - let _data = new rpc.MessageParcel(); - let _reply = new rpc.MessageParcel(); - _data.writeInt(paramI); - this.proxy.sendRequest(ZidlToolTestProxy.COMMAND_VOID_ORDER_OUT_IN, _data, _reply, _option).then(function(result) { - if (result.errCode === 0) { - let _errCode = result.reply.readInt(); - if (_errCode != 0) { - let _paramS = undefined; - callback(_errCode,_paramS); - return; - } - let _paramS = result.reply.readString(); - callback(_errCode,_paramS); - } else { - console.log("sendRequest failed, errCode: " + result.errCode); - } - }) - } - - voidOrderInOutIn(paramI: number, paramS: string, callback: voidOrderInOutInCallback): void - { - let _option = new rpc.MessageOption(rpc.MessageOption.TF_SYNC); - let _data = new rpc.MessageParcel(); - let _reply = new rpc.MessageParcel(); - _data.writeInt(paramI); - _data.writeString(paramS); - this.proxy.sendRequest(ZidlToolTestProxy.COMMAND_VOID_ORDER_IN_OUT_IN, _data, _reply, _option).then(function(result) { - if (result.errCode === 0) { - let _errCode = result.reply.readInt(); - if (_errCode != 0) { - let _paramI = undefined; - callback(_errCode,_paramI); - return; - } - let _paramI = result.reply.readInt(); - callback(_errCode,_paramI); - } else { - console.log("sendRequest failed, errCode: " + result.errCode); - } - }) - } - - voidOrderOutInOut(paramS: string, callback: voidOrderOutInOutCallback): void - { - let _option = new rpc.MessageOption(rpc.MessageOption.TF_SYNC); - let _data = new rpc.MessageParcel(); - let _reply = new rpc.MessageParcel(); - _data.writeString(paramS); - this.proxy.sendRequest(ZidlToolTestProxy.COMMAND_VOID_ORDER_OUT_IN_OUT, _data, _reply, _option).then(function(result) { - if (result.errCode === 0) { - let _errCode = result.reply.readInt(); - if (_errCode != 0) { - let _paramI = undefined; - let _paramS = undefined; - callback(_errCode,_paramI, _paramS); - return; - } - let _paramI = result.reply.readInt(); - let _paramS = result.reply.readString(); - callback(_errCode,_paramI, _paramS); - } else { - console.log("sendRequest failed, errCode: " + result.errCode); - } - }) - } - - voidOrderInInOutOut(paramS: string, paramI: number, callback: voidOrderInInOutOutCallback): void - { - let _option = new rpc.MessageOption(rpc.MessageOption.TF_SYNC); - let _data = new rpc.MessageParcel(); - let _reply = new rpc.MessageParcel(); - _data.writeString(paramS); - _data.writeInt(paramI); - this.proxy.sendRequest(ZidlToolTestProxy.COMMAND_VOID_ORDER_IN_IN_OUT_OUT, _data, _reply, _option).then(function(result) { - if (result.errCode === 0) { - let _errCode = result.reply.readInt(); - if (_errCode != 0) { - let _paramI = undefined; - let _paramS2 = undefined; - callback(_errCode,_paramI, _paramS2); - return; - } - let _paramI = result.reply.readInt(); - let _paramS2 = result.reply.readString(); - callback(_errCode,_paramI, _paramS2); - } else { - console.log("sendRequest failed, errCode: " + result.errCode); - } - }) - } - - static readonly COMMAND_ONEWAY_VOID_VOID = 1; - static readonly COMMAND_VOID_VOID = 2; - static readonly COMMAND_BOOLEAN_VOID = 3; - static readonly COMMAND_BYTE_VOID = 4; - static readonly COMMAND_SHORT_VOID = 5; - static readonly COMMAND_INT_VOID = 6; - static readonly COMMAND_LONG_VOID = 7; - static readonly COMMAND_FLOAT_VOID = 8; - static readonly COMMAND_DOUBLE_VOID = 9; - static readonly COMMAND_STRING_VOID = 10; - static readonly COMMAND_SEQUENCEABLE_VOID = 11; - static readonly COMMAND_INTERFACE_VOID = 12; - static readonly COMMAND_MAP_STRING_STRING_VOID = 13; - static readonly COMMAND_DOUBLE_ARRAY_VOID = 14; - static readonly COMMAND_VOID_IN_MAP_STRING_INT = 15; - static readonly COMMAND_VOID_IN_STRING_ARRAY = 16; - static readonly COMMAND_VOID_OUT_MAP_STRING_INT = 17; - static readonly COMMAND_VOID_OUT_STRING_ARRAY = 18; - static readonly COMMAND_VOID_IN_OUT_MAP_STRING_INT = 19; - static readonly COMMAND_VOID_IN_OUT_STRING_ARRAY = 20; - static readonly COMMAND_VOID_IN_INT = 21; - static readonly COMMAND_VOID_IN_STRING = 22; - static readonly COMMAND_VOID_OUT_INT = 23; - static readonly COMMAND_VOID_OUT_STRING = 24; - static readonly COMMAND_VOID_IN_OUT_INT = 25; - static readonly COMMAND_VOID_IN_OUT_STRING = 26; - static readonly COMMAND_VOID_PARAMETER_TYPE_BOOLEAN = 27; - static readonly COMMAND_VOID_PARAMETER_TYPE_BYTE = 28; - static readonly COMMAND_VOID_PARAMETER_TYPE_SHORT = 29; - static readonly COMMAND_VOID_PARAMETER_TYPE_INT = 30; - static readonly COMMAND_VOID_PARAMETER_TYPE_LONG = 31; - static readonly COMMAND_VOID_PARAMETER_TYPE_FLOAT = 32; - static readonly COMMAND_VOID_PARAMETER_TYPE_DOUBLE = 33; - static readonly COMMAND_VOID_PARAMETER_TYPE_STRING = 34; - static readonly COMMAND_VOID_PARAMETER_TYPE_SEQUENCEABLE = 35; - static readonly COMMAND_VOID_PARAMETER_TYPE_INTERFACE = 36; - static readonly COMMAND_VOID_PARAMETER_TYPE_MAP_STRING_STRING = 37; - static readonly COMMAND_VOID_PARAMETER_TYPE_DOUBLE_ARRAY = 38; - static readonly COMMAND_VOID_ORDER_OUT_IN = 39; - static readonly COMMAND_VOID_ORDER_IN_OUT_IN = 40; - static readonly COMMAND_VOID_ORDER_OUT_IN_OUT = 41; - static readonly COMMAND_VOID_ORDER_IN_IN_OUT_OUT = 42; - private proxy -} - diff --git a/ability/ability_runtime/zidltest/actsamszidlclienttest/entry/src/main/ets/zidlToolOneWay/i_interface_attribute_declaratoin_oneway.ts b/ability/ability_runtime/zidltest/actsamszidlclienttest/entry/src/main/ets/zidlToolOneWay/i_interface_attribute_declaratoin_oneway.ts deleted file mode 100644 index a17db0f5d20ac1d674258b1e094355c2276fc2b4..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/zidltest/actsamszidlclienttest/entry/src/main/ets/zidlToolOneWay/i_interface_attribute_declaratoin_oneway.ts +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright (C) 2021 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. - */ - - -export default interface IInterfaceAttributeDeclaratoinOneway { - voidVoidFirst(callback: voidVoidFirstCallback): void; - voidVoidSecond(callback: voidVoidSecondCallback): void; - voidVoidThird(callback: voidVoidThirdCallback): void; -} -export type voidVoidFirstCallback = (errCode: number) => void; -export type voidVoidSecondCallback = (errCode: number) => void; -export type voidVoidThirdCallback = (errCode: number) => void; - diff --git a/ability/ability_runtime/zidltest/actsamszidlclienttest/entry/src/main/ets/zidlToolOneWay/interface_attribute_declaratoin_oneway_proxy.ts b/ability/ability_runtime/zidltest/actsamszidlclienttest/entry/src/main/ets/zidlToolOneWay/interface_attribute_declaratoin_oneway_proxy.ts deleted file mode 100644 index b3f7e054918f4b007c75210222f4e3330b594b30..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/zidltest/actsamszidlclienttest/entry/src/main/ets/zidlToolOneWay/interface_attribute_declaratoin_oneway_proxy.ts +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright (C) 2021 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 {voidVoidFirstCallback} from "./i_interface_attribute_declaratoin_oneway"; -import {voidVoidSecondCallback} from "./i_interface_attribute_declaratoin_oneway"; -import {voidVoidThirdCallback} from "./i_interface_attribute_declaratoin_oneway"; -import IInterfaceAttributeDeclaratoinOneway from "./i_interface_attribute_declaratoin_oneway"; -import rpc from "@ohos.rpc"; - -export default class InterfaceAttributeDeclaratoinOnewayProxy implements IInterfaceAttributeDeclaratoinOneway { - constructor(proxy) { - this.proxy = proxy; - } - - voidVoidFirst(callback: voidVoidFirstCallback): void - { - let _option = new rpc.MessageOption(1); - let _data = new rpc.MessageParcel(); - let _reply = new rpc.MessageParcel(); - this.proxy.sendRequest(InterfaceAttributeDeclaratoinOnewayProxy.COMMAND_VOID_VOID_FIRST, _data, _reply, _option).then(function(result) { - if (result.errCode === 0) { - let _errCode = result.reply.readInt(); - callback(_errCode); - } else { - console.log("sendRequest failed, errCode: " + result.errCode); - } - }) - } - - voidVoidSecond(callback: voidVoidSecondCallback): void - { - let _option = new rpc.MessageOption(1); - let _data = new rpc.MessageParcel(); - let _reply = new rpc.MessageParcel(); - this.proxy.sendRequest(InterfaceAttributeDeclaratoinOnewayProxy.COMMAND_VOID_VOID_SECOND, _data, _reply, _option).then(function(result) { - if (result.errCode === 0) { - let _errCode = result.reply.readInt(); - callback(_errCode); - } else { - console.log("sendRequest failed, errCode: " + result.errCode); - } - }) - } - - voidVoidThird(callback: voidVoidThirdCallback): void - { - let _option = new rpc.MessageOption(1); - let _data = new rpc.MessageParcel(); - let _reply = new rpc.MessageParcel(); - this.proxy.sendRequest(InterfaceAttributeDeclaratoinOnewayProxy.COMMAND_VOID_VOID_THIRD, _data, _reply, _option).then(function(result) { - if (result.errCode === 0) { - let _errCode = result.reply.readInt(); - callback(_errCode); - } else { - console.log("sendRequest failed, errCode: " + result.errCode); - } - }) - } - - static readonly COMMAND_VOID_VOID_FIRST = 1; - static readonly COMMAND_VOID_VOID_SECOND = 2; - static readonly COMMAND_VOID_VOID_THIRD = 3; - private proxy -} - diff --git a/ability/ability_runtime/zidltest/actsamszidlclienttest/entry/src/main/module.json b/ability/ability_runtime/zidltest/actsamszidlclienttest/entry/src/main/module.json deleted file mode 100644 index a2075b5bc6eff2c0138986585dbc47963a3d8113..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/zidltest/actsamszidlclienttest/entry/src/main/module.json +++ /dev/null @@ -1,101 +0,0 @@ -{ - "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.zidlclienttest.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" - ] - } - ] - } - ], - "extensionAbilities": [ - { - "srcEntrance": "./ets/ServiceAbility/ServiceAbility.ts", - "name": "com.example.zidlclienttest.ServiceAbility", - "icon": "$media:icon", - "srcLanguage": "ets", - "description": "$string:phone_entry_main", - "type": "service", - "visible": true - }, - { - "srcEntrance": "./ets/ServiceAbility2/ServiceAbility2.ts", - "name": "com.example.zidlclienttest.ServiceAbility2", - "icon": "$media:icon", - "srcLanguage": "ets", - "description": "$string:phone_entry_main", - "type": "service", - "visible": true - } - ], - "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" - } - ] - } -} \ No newline at end of file diff --git a/ability/ability_runtime/zidltest/actsamszidlclienttest/entry/src/main/resources/base/element/string.json b/ability/ability_runtime/zidltest/actsamszidlclienttest/entry/src/main/resources/base/element/string.json deleted file mode 100644 index 2977b612ec4595b13eaaffe3e8fc578e83c42d48..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/zidltest/actsamszidlclienttest/entry/src/main/resources/base/element/string.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "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" - } - ] -} diff --git a/ability/ability_runtime/zidltest/actsamszidlclienttest/entry/src/main/resources/base/media/icon.png b/ability/ability_runtime/zidltest/actsamszidlclienttest/entry/src/main/resources/base/media/icon.png deleted file mode 100644 index 474a55588fd7216113dd42073aadf254d4dba023..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/zidltest/actsamszidlclienttest/entry/src/main/resources/base/media/icon.png and /dev/null differ diff --git a/ability/ability_runtime/zidltest/actsamszidlclienttest/entry/src/main/resources/base/profile/main_pages.json b/ability/ability_runtime/zidltest/actsamszidlclienttest/entry/src/main/resources/base/profile/main_pages.json deleted file mode 100644 index 6898b31d2085f478ee1ed9d933a5910cbf901d92..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/zidltest/actsamszidlclienttest/entry/src/main/resources/base/profile/main_pages.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "src": [ - "pages/index/index", - "pages/second/second" - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/zidltest/actsamszidlclienttest/signature/openharmony_sx.p7b b/ability/ability_runtime/zidltest/actsamszidlclienttest/signature/openharmony_sx.p7b deleted file mode 100755 index dcec6c9615032c1b48bf185e839d9720dd68aab0..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/zidltest/actsamszidlclienttest/signature/openharmony_sx.p7b and /dev/null differ diff --git a/ability/ability_runtime/zidltest/actsamszidlservice/AppScope/app.json b/ability/ability_runtime/zidltest/actsamszidlservice/AppScope/app.json deleted file mode 100644 index 89dc01d02a14fa22dbd7b4abe8cf15517c6e9b02..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/zidltest/actsamszidlservice/AppScope/app.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "app": { - "bundleName": "com.example.zidlservice", - "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 - } - } -} \ No newline at end of file diff --git a/ability/ability_runtime/zidltest/actsamszidlservice/AppScope/resources/base/element/string.json b/ability/ability_runtime/zidltest/actsamszidlservice/AppScope/resources/base/element/string.json deleted file mode 100644 index be09cccde1bc7369ef47a5cd45d2b06884c88602..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/zidltest/actsamszidlservice/AppScope/resources/base/element/string.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "string": [ - { - "name": "app_name", - "value": "ohosProject" - } - ] -} diff --git a/ability/ability_runtime/zidltest/actsamszidlservice/AppScope/resources/base/media/app_icon.png b/ability/ability_runtime/zidltest/actsamszidlservice/AppScope/resources/base/media/app_icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/zidltest/actsamszidlservice/AppScope/resources/base/media/app_icon.png and /dev/null differ diff --git a/ability/ability_runtime/zidltest/actsamszidlservice/BUILD.gn b/ability/ability_runtime/zidltest/actsamszidlservice/BUILD.gn deleted file mode 100644 index c9ac8571e07429934720670a09cc87985a527d0d..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/zidltest/actsamszidlservice/BUILD.gn +++ /dev/null @@ -1,45 +0,0 @@ -# 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("ActsAmsZidlServiceRelyHap") { - hap_profile = "entry/src/main/module.json" - js_build_mode = "debug" - deps = [ - ":actsamszidlservicerelyhap_js_assets", - ":actsamszidlservicerelyhap_resources", - ] - ets2abc = true - certificate_profile = "signature/openharmony_sx.p7b" - hap_name = "ActsAmsZidlServiceRelyHap" - - testonly = true - subsystem_name = "ability" - part_name = "ability_runtime" -} - -ohos_app_scope("actsamszidlservicerelyhap_app_profile") { - app_profile = "AppScope/app.json" - sources = [ "AppScope/resources" ] -} - -ohos_js_assets("actsamszidlservicerelyhap_js_assets") { - source_dir = "entry/src/main/ets" -} - -ohos_resources("actsamszidlservicerelyhap_resources") { - sources = [ "entry/src/main/resources" ] - deps = [ ":actsamszidlservicerelyhap_app_profile" ] - hap_profile = "entry/src/main/module.json" -} diff --git a/ability/ability_runtime/zidltest/actsamszidlservice/entry/src/main/ets/Application/AbilityStage.ts b/ability/ability_runtime/zidltest/actsamszidlservice/entry/src/main/ets/Application/AbilityStage.ts deleted file mode 100644 index 98eb012db14b28a1f92522e305b9d4538e496dd3..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/zidltest/actsamszidlservice/entry/src/main/ets/Application/AbilityStage.ts +++ /dev/null @@ -1,23 +0,0 @@ -/* -* 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" - -export default class MyAbilityStage extends AbilityStage { - onCreate() { - console.log("MyAbilityStage onCreate") - globalThis.stageOnCreateRun = 1; - globalThis.stageContext = this.context; - } -} \ No newline at end of file diff --git a/ability/ability_runtime/zidltest/actsamszidlservice/entry/src/main/ets/MainAbility/MainAbility.ts b/ability/ability_runtime/zidltest/actsamszidlservice/entry/src/main/ets/MainAbility/MainAbility.ts deleted file mode 100644 index 3b14eab6176b2efafc47359b4875d61774d66c9c..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/zidltest/actsamszidlservice/entry/src/main/ets/MainAbility/MainAbility.ts +++ /dev/null @@ -1,51 +0,0 @@ -/* -* 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' - -export default class MainAbility extends Ability { - - onCreate(want, launchParam) { - // Ability is creating, initialize resources for this ability - console.log("ACTS_ProcessManage VendorAppService MainAbility onCreate") - globalThis.abilityWant = want; - } - - onDestroy() { - // Ability is destroying, release resources for this ability - console.log("ACTS_ProcessManage VendorAppService MainAbility onDestroy") - } - - onWindowStageCreate(windowStage) { - // Main window is created, set main page for this ability - console.log("ACTS_ProcessManage VendorAppService MainAbility onWindowStageCreate") - globalThis.abilityContext = this.context - windowStage.setUIContent(this.context, "pages/index", null) - } - - onWindowStageDestroy() { - // Main window is destroyed, release UI related resources - console.log("ACTS_ProcessManage VendorAppService MainAbility onWindowStageDestroy") - } - - async onForeground() { - // Ability has brought to foreground - console.log("ACTS_ProcessManage VendorAppService MainAbility onForeground") - } - - onBackground() { - // Ability has back to background - console.log("ACTS_ProcessManage VendorAppService MainAbility onBackground") - } -}; diff --git a/ability/ability_runtime/zidltest/actsamszidlservice/entry/src/main/ets/ServiceAbility/ServiceAbility.ts b/ability/ability_runtime/zidltest/actsamszidlservice/entry/src/main/ets/ServiceAbility/ServiceAbility.ts deleted file mode 100644 index 59a8864b1e2b7196abfc979fcd2cdbeb43b6c953..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/zidltest/actsamszidlservice/entry/src/main/ets/ServiceAbility/ServiceAbility.ts +++ /dev/null @@ -1,434 +0,0 @@ -/* -* 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 ServiceExtension from '@ohos.application.ServiceExtensionAbility' -import Want from '@ohos.application.Want'; -import {voidOutStringCallback} from "./zidlTool/i_zidl_tool_test"; -import {voidOutIntCallback} from "./zidlTool/i_zidl_tool_test"; -import {voidOutMapStringIntCallback} from "./zidlTool/i_zidl_tool_test"; -import {voidOutStringArrayCallback} from "./zidlTool/i_zidl_tool_test"; -import {voidInOutMapStringIntCallback} from "./zidlTool/i_zidl_tool_test"; -import {voidInOutStringArrayCallback} from "./zidlTool/i_zidl_tool_test"; -import {voidInOutIntCallback} from "./zidlTool/i_zidl_tool_test"; -import {voidInOutStringCallback} from "./zidlTool/i_zidl_tool_test"; -import {booleanVoidCallback} from "./zidlTool/i_zidl_tool_test"; -import {byteVoidCallback} from "./zidlTool/i_zidl_tool_test"; -import {shortVoidCallback} from "./zidlTool/i_zidl_tool_test"; -import {intVoidCallback} from "./zidlTool/i_zidl_tool_test"; -import {longVoidCallback} from "./zidlTool/i_zidl_tool_test"; -import {floatVoidCallback} from "./zidlTool/i_zidl_tool_test"; -import {doubleVoidCallback} from "./zidlTool/i_zidl_tool_test"; -import {stringVoidCallback} from "./zidlTool/i_zidl_tool_test"; -import {sequenceableVoidCallback} from "./zidlTool/i_zidl_tool_test"; -import {interfaceVoidCallback} from "./zidlTool/i_zidl_tool_test"; -import {mapStringStringVoidCallback} from "./zidlTool/i_zidl_tool_test"; -import {doubleArrayVoidCallback} from "./zidlTool/i_zidl_tool_test"; -import {voidOrderOutInCallback} from "./zidlTool/i_zidl_tool_test" -import {voidOrderInOutInCallback} from "./zidlTool/i_zidl_tool_test" -import {voidOrderOutInOutCallback} from "./zidlTool/i_zidl_tool_test" -import {voidOrderInInOutOutCallback} from "./zidlTool/i_zidl_tool_test" -import {onewayVoidVoidCallback} from "./zidlTool/i_zidl_tool_test" -import {voidInMapStringIntCallback} from "./zidlTool/i_zidl_tool_test" -import {voidVoidCallback} from "./zidlTool/i_zidl_tool_test" -import {voidInStringArrayCallback} from "./zidlTool/i_zidl_tool_test" -import ZidlTestServiceStub from './zidlTool/zidl_tool_test_stub'; -import MySequenceable from "./zidlTool/my_sequenceable"; -import InterfaceDeclareProxy from './interfaceDeclare/interface_declare_proxy' -import InterfaceDeclareStub from './interfaceDeclare/interface_declare_stub' -import {voidInIntCallback} from "./zidlTool/i_zidl_tool_test" -import {voidInStringCallback} from "./zidlTool/i_zidl_tool_test" -import {voidParameterTypeBooleanCallback} from "./zidlTool/i_zidl_tool_test" -import {voidParameterTypeByteCallback} from "./zidlTool/i_zidl_tool_test" -import {voidParameterTypeShortCallback} from "./zidlTool/i_zidl_tool_test" -import {voidParameterTypeIntCallback} from "./zidlTool/i_zidl_tool_test" -import {voidParameterTypeLongCallback} from "./zidlTool/i_zidl_tool_test" -import {voidParameterTypeFloatCallback} from "./zidlTool/i_zidl_tool_test" -import {voidParameterTypeDoubleCallback} from "./zidlTool/i_zidl_tool_test" -import {voidParameterTypeStringCallback} from "./zidlTool/i_zidl_tool_test" -import {voidParameterTypeSequenceableCallback} from "./zidlTool/i_zidl_tool_test" -import {voidParameterTypeInterfaceCallback} from "./zidlTool/i_zidl_tool_test" -import {voidParameterTypeMapStringStringCallback} from "./zidlTool/i_zidl_tool_test" -import {voidParameterTypeDoubleArrayCallback} from "./zidlTool/i_zidl_tool_test" -import {testInterfaceCallback} from './interfaceDeclare/i_interface_declare' - -var SUCCESS = 0; -var FAIL = 1; - -class ZidlTestImp extends ZidlTestServiceStub { - - onewayVoidVoid(callback: onewayVoidVoidCallback) { - console.log("ZidlTest Server ACTS_Zidl_Js2JsMulti_0200 called"); - callback(SUCCESS); - } - - voidVoid(callback: voidVoidCallback) { - console.log("ZidlTest Server ACTS_Zidl_Js2JsMulti_0300 called"); - callback(SUCCESS); - } - - booleanVoid(callback: booleanVoidCallback){ - console.log("ZidlTest Server ACTS_Zidl_Js2JsMulti_0400 called"); - var boolean = true; - callback(SUCCESS, boolean); - } - - byteVoid(callback: byteVoidCallback){ - console.log("ZidlTest Server ACTS_Zidl_Js2JsMulti_0500 called"); - var mybyte = 1; - callback(SUCCESS, mybyte); - } - - shortVoid(callback: shortVoidCallback){ - console.log("ZidlTest Server ACTS_Zidl_Js2JsMulti_0600 called"); - var myshort = 222; - callback(SUCCESS, myshort); - } - - intVoid(callback: intVoidCallback){ - console.log("ZidlTest Server ACTS_Zidl_Js2JsMulti_0700 called"); - var myint = 333; - callback(SUCCESS, myint); - } - - longVoid(callback: longVoidCallback){ - console.log("ZidlTest Server ACTS_Zidl_Js2JsMulti_0800 called"); - var mylong = 4444; - callback(SUCCESS, mylong); - } - - floatVoid(callback: floatVoidCallback){ - console.log("ZidlTest Server ACTS_Zidl_Js2JsMulti_0900 called"); - var myfloat = 10.1; - callback(SUCCESS, myfloat); - } - - doubleVoid(callback: doubleVoidCallback){ - console.log("ZidlTest Server ACTS_Zidl_Js2JsMulti_1000 called"); - var mydouble = 22.1; - callback(SUCCESS, mydouble); - } - - stringVoid(callback: stringVoidCallback){ - console.log("ZidlTest Server ACTS_Zidl_Js2JsMulti_1100 called"); - var mystring = "stringVoid"; - callback(SUCCESS, mystring); - } - - sequenceableVoid(callback: sequenceableVoidCallback){ - console.log("ZidlTest Server ACTS_Zidl_Js2JsMulti_1200 called"); - let mySequence = new MySequenceable(); - callback(SUCCESS, mySequence); - } - - interfaceVoid(callback: interfaceVoidCallback) { - class InterfaceDeclare extends InterfaceDeclareStub { - testInterface(data: number, callback: testInterfaceCallback): void{ - console.log("ZidlTest Server ACTS_Zidl_Js2JsMulti_1300 interfaceStub called"); - let result = FAIL; - - if (data == 1500) { - result = SUCCESS; - } - callback(result); - } - } - console.log("ZidlTest Server ACTS_Zidl_Js2JsMulti_1300 toolStub called"); - let serverInterface = new InterfaceDeclare('serverInterface'); - callback(SUCCESS, serverInterface); - } - - mapStringStringVoid(callback: mapStringStringVoidCallback){ - console.log("ZidlTest Server ACTS_Zidl_Js2JsMulti_1400 called"); - let myMap = new Map(); - myMap.set("string1","string2"); - callback(SUCCESS, myMap); - } - - doubleArrayVoid(callback: doubleArrayVoidCallback){ - console.log("ZidlTest Server ACTS_Zidl_Js2JsMulti_1500 called"); - var array = [1.1, 2.1, 3.1]; - callback(SUCCESS, array); - } - - voidInMapStringInt(myMap, callback: voidInMapStringIntCallback){ - console.log('ZidlTest Server ACTS_Zidl_Js2JsMulti_1600_1 called:'+ myMap.get("string1")); - if(myMap.get("string1") == 1){ - callback(SUCCESS); - }else{ - callback(FAIL); - } - } - - voidInStringArray(strarray, callback: voidInStringArrayCallback){ - console.log("ZidlTest Server ACTS_Zidl_Js2JsMulti_1600_2 called:"+ JSON.stringify(strarray)); - if(strarray[0] == "aaa"&&strarray[1] == "bbb"&&strarray[2] == "ccc"){ - callback(SUCCESS); - }else { - callback(FAIL); - } - } - - voidOutMapStringInt(callback : voidOutMapStringIntCallback){ - console.log('ZidlTest Server ACTS_Zidl_Js2JsMulti_1700 called'); - var map=new Map(); - map.set("voidOutMapStringInt", 1); - callback(SUCCESS, map); - } - - voidOutStringArray(callback :voidOutStringArrayCallback){ - console.log('ZidlTest Server ACTS_Zidl_Js2JsMulti_1700 called'); - var strarray = ["aa", "dd"]; - callback(SUCCESS, strarray); - } - - voidInOutMapStringInt(mapIn, callback: voidInOutMapStringIntCallback) { - console.log('ZidlTest Server ACTS_Zidl_Js2JsMulti_1800 called'); - var errCode = FAIL; - if ((mapIn.get("voidInOutMapStringInt1") == 1801) && - (mapIn.get("voidInOutMapStringInt2") == 1802)) { - mapIn.set("voidInOutMapStringInt1", 1802); - mapIn.set("voidInOutMapStringInt2", 1801); - errCode = SUCCESS; - } - callback(errCode, mapIn); - } - - voidInOutStringArray(strArrayIn, callback: voidInOutStringArrayCallback) { - console.log('ZidlTest Server ACTS_Zidl_Js2JsMulti_1800 called'); - var errCode = FAIL; - if ((strArrayIn[0] == "ddd") && - (strArrayIn[1] == "ccc")) { - strArrayIn[0] = "aaa"; - strArrayIn[1] = "bbb"; - errCode = SUCCESS; - } - callback(errCode, strArrayIn); - } - - voidInInt(number, callback : voidInIntCallback) { - console.log('ZidlTest Server ACTS_Zidl_Js2JsMulti_1900 called:'+ JSON.stringify(number)); - if(number == 8888){ - callback(SUCCESS); - }else{ - callback(FAIL); - } - } - - voidInString(string, callback : voidInStringCallback) { - console.log('ZidlTest Server ACTS_Zidl_Js2JsMulti_1900 called:'+ JSON.stringify(string)); - if(string == "voidInString"){ - callback(SUCCESS); - }else{ - callback(FAIL); - } - } - - voidOutInt(callback : voidOutIntCallback){ - console.log('ZidlTest Server ACTS_Zidl_Js2JsMulti_2000 called'); - var number = 123; - callback(SUCCESS, number); - } - - voidOutString(callback : voidOutStringCallback){ - console.log('ZidlTest Server ACTS_Zidl_Js2JsMulti_2000 called'); - var string = "voidOutString"; - callback(SUCCESS, string); - } - - voidInOutInt(number, callback: voidInOutIntCallback) { - console.log('ZidlTest Server ACTS_Zidl_Js2JsMulti_2100_1 called:'+ JSON.stringify(number)); - var num = 456789; - if(number == 123456){ - callback(SUCCESS, num); - }else{ - callback(FAIL, number); - console.log('ZidlTest Server ACTS_Zidl_Js2JsMulti_2100_1 Call_Fail') - } - } - voidInOutString(strinput, callback: voidInOutStringCallback) { - console.log('ZidlTest Server ACTS_Zidl_Js2JsMulti_2100_2 called:'+ JSON.stringify(strinput)); - var str = "456789"; - if(strinput == "voidInOutString"){ - callback(SUCCESS, str); - }else{ - console.log('ZidlTest Server ACTS_Zidl_Js2JsMulti_2100_2 Call_Fail'); - callback(FAIL, strinput); - } - } - - voidParameterTypeBoolean(oBooleanTrue, callback : voidParameterTypeBooleanCallback) { - console.log('ZidlTest Server ACTS_Zidl_Js2JsMulti_2200 called:'+ JSON.stringify(oBooleanTrue)); - if(oBooleanTrue == true){ - callback(SUCCESS); - }else{ - callback(FAIL); - } - } - - voidParameterTypeByte(number, callback : voidParameterTypeByteCallback) { - console.log('ZidlTest Server ACTS_Zidl_Js2JsMulti_2300 called:'+ JSON.stringify(number)); - if(number == 1111){ - callback(SUCCESS); - }else{ - callback(FAIL); - } - } - - voidParameterTypeShort(number, callback : voidParameterTypeShortCallback) { - console.log('ZidlTest Server ACTS_Zidl_Js2JsMulti_2400 called:'+ JSON.stringify(number)); - if(number == 2222){ - callback(SUCCESS); - }else{ - callback(FAIL); - } - } - - voidParameterTypeInt(number, callback : voidParameterTypeIntCallback) { - console.log('ZidlTest Server ACTS_Zidl_Js2JsMulti_2500 called:'+ JSON.stringify(number)); - if(number == 3333){ - callback(SUCCESS); - }else{ - callback(FAIL); - } - } - - voidParameterTypeLong(number, callback : voidParameterTypeLongCallback) { - console.log('ZidlTest Server ACTS_Zidl_Js2JsMulti_2600 called:'+ JSON.stringify(number)); - if(number == 4444){ - callback(SUCCESS); - }else{ - callback(FAIL); - } - } - - voidParameterTypeFloat(number, callback : voidParameterTypeFloatCallback) { - console.log('ZidlTest Server ACTS_Zidl_Js2JsMulti_2700 called:'+ JSON.stringify(number)); - if(number == 5555.1){ - callback(SUCCESS); - }else{ - callback(FAIL); - } - } - - voidParameterTypeDouble(number, callback : voidParameterTypeDoubleCallback) { - console.log('ZidlTest Server ACTS_Zidl_Js2JsMulti_2800 called:'+ JSON.stringify(number)); - if(number == 6666.1){ - callback(SUCCESS); - }else{ - callback(FAIL); - } - } - - voidParameterTypeString(string, callback : voidParameterTypeStringCallback) { - console.log('ZidlTest Server ACTS_Zidl_Js2JsMulti_2900 called:'+ JSON.stringify(string)); - if(string == "voidParameterTypeString"){ - callback(SUCCESS); - }else{ - callback(FAIL); - } - } - - voidParameterTypeSequenceable(MySequenceable, callback : voidParameterTypeSequenceableCallback) { - console.log('ZidlTest Process Server ACTS_Zidl_Js2JsMulti_3000 called:'+ JSON.stringify(MySequenceable)); - if((MySequenceable != null) && (MySequenceable.getNum() == 32) && (MySequenceable.getString() == "nihao")){ - callback(SUCCESS); - }else{ - callback(FAIL); - } - } - - voidParameterTypeInterface(param: InterfaceDeclareProxy, callback : voidParameterTypeInterfaceCallback) { - console.log("ZidlTest Server ACTS_Zidl_Js2JsMulti_3100 called"); - let proxy = new InterfaceDeclareProxy(param); - proxy.testInterface(3300, (errCode)=>{ - if (errCode == SUCCESS) { - console.log("ZidlTest Server ACTS_Zidl_Js2JsMulti_3100 callback SUCCESS"); - callback(SUCCESS); - } else { - console.log("ZidlTest Server ACTS_Zidl_Js2JsMulti_3100 callback FAIL"); - callback(FAIL); - } - }); - - } - - voidParameterTypeMapStringString(map, callback : voidParameterTypeMapStringStringCallback) { - console.log('ZidlTest Server ACTS_Zidl_Js2JsMulti_3200 called:'+ map.get("voidParameterTypeMapStringString")); - if(map.get("voidParameterTypeMapStringString") == "fdhatdh"){ - callback(SUCCESS); - }else{ - callback(FAIL); - } - } - - voidParameterTypeDoubleArray(array, callback : voidParameterTypeDoubleArrayCallback){ - console.log('ZidlTest Server ACTS_Zidl_Js2JsMulti_3300 called:'+ JSON.stringify(array)); - if(array.length == 2 && array[0] == 1.1 && array[1] == 2.1){ - callback(SUCCESS); - }else{ - callback(FAIL); - } - } - - voidOrderOutIn(paramI, callback: voidOrderOutInCallback){ - console.log("ZidlTest Server ACTS_Zidl_Js2JsMulti_3400 called" + paramI); - var mystring = "hello world"; - callback(SUCCESS, mystring); - } - - voidOrderInOutIn(paramI, paramS, callback: voidOrderInOutInCallback){ - console.log("ZidlTest Server ACTS_Zidl_Js2JsMulti_3500 called" + paramI + " " + paramS); - var mynumber = 6; - callback(SUCCESS, mynumber); - } - - voidOrderOutInOut(paramS, callback: voidOrderOutInOutCallback){ - console.log("ZidlTest Server ACTS_Zidl_Js2JsMulti_3600 called" + paramS); - var mynumber = 3; - var mystring = "paramcallback"; - callback(SUCCESS, mynumber, mystring); - } - - voidOrderInInOutOut(paramS, paramI, callback: voidOrderInInOutOutCallback){ - console.log("ZidlTest Server ACTS_Zidl_Js2JsMulti_3700 called" + paramS + " " + paramI); - var mystring = "callback"; - var mynumber = 4; - callback(SUCCESS, mynumber, mystring); - } -} - -export default class ServiceAbility extends ServiceExtension { - onCreate(want: Want) { - globalThis.abilityWant = want; - console.log('ZidlService ServiceAbility onCreate, want: ' + want.abilityName); - } - - onRequest(want, startId) { - console.log('ZidlService ServiceAbility onRequest, want: ' + want.abilityName - + ', startId: ' + startId); - } - - onConnect(want) { - console.log('ZidlService ServiceAbility onConnect, want:' + want.abilityName); - return new ZidlTestImp('connect'); - } - - onDisconnect(want) { - console.log('ZidlService ServiceAbility onDisconnect, want:' + want.abilityName); - } - - onDestroy() { - console.log('AZidlService ServiceAbility onDestroy'); - } -}; diff --git a/ability/ability_runtime/zidltest/actsamszidlservice/entry/src/main/ets/ServiceAbility/interfaceDeclare/i_interface_declare.ts b/ability/ability_runtime/zidltest/actsamszidlservice/entry/src/main/ets/ServiceAbility/interfaceDeclare/i_interface_declare.ts deleted file mode 100644 index a9469ce4d7e1d4fbd3ec452076ab8121b8b8adf7..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/zidltest/actsamszidlservice/entry/src/main/ets/ServiceAbility/interfaceDeclare/i_interface_declare.ts +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (C) 2021 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. - */ - - -export default interface IInterfaceDeclare { - testInterface(data: number, callback: testInterfaceCallback): void; -} -export type testInterfaceCallback = (errCode: number) => void; - diff --git a/ability/ability_runtime/zidltest/actsamszidlservice/entry/src/main/ets/ServiceAbility/interfaceDeclare/interface_declare_proxy.ts b/ability/ability_runtime/zidltest/actsamszidlservice/entry/src/main/ets/ServiceAbility/interfaceDeclare/interface_declare_proxy.ts deleted file mode 100644 index 9f9cc9c43d3b15599f88aa223e7308c43b997e60..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/zidltest/actsamszidlservice/entry/src/main/ets/ServiceAbility/interfaceDeclare/interface_declare_proxy.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (C) 2021 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 {testInterfaceCallback} from "./i_interface_declare"; -import IInterfaceDeclare from "./i_interface_declare"; -import rpc from "@ohos.rpc"; - -export default class InterfaceDeclareProxy implements IInterfaceDeclare { - constructor(proxy) { - this.proxy = proxy; - } - - testInterface(data: number, callback: testInterfaceCallback): void - { - let _option = new rpc.MessageOption(rpc.MessageOption.TF_SYNC); - let _data = new rpc.MessageParcel(); - let _reply = new rpc.MessageParcel(); - _data.writeInt(data); - this.proxy.sendRequest(InterfaceDeclareProxy.COMMAND_TEST_INTERFACE, _data, _reply, _option).then(function(result) { - if (result.errCode === 0) { - let _errCode = result.reply.readInt(); - callback(_errCode); - } else { - console.log("sendRequest failed, errCode: " + result.errCode); - } - }) - } - - static readonly COMMAND_TEST_INTERFACE = 1; - private proxy -} - diff --git a/ability/ability_runtime/zidltest/actsamszidlservice/entry/src/main/ets/ServiceAbility/interfaceDeclare/interface_declare_stub.ts b/ability/ability_runtime/zidltest/actsamszidlservice/entry/src/main/ets/ServiceAbility/interfaceDeclare/interface_declare_stub.ts deleted file mode 100644 index 1606f77b4c0390be639f06cb093ee672cf05d478..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/zidltest/actsamszidlservice/entry/src/main/ets/ServiceAbility/interfaceDeclare/interface_declare_stub.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (C) 2021 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 {testInterfaceCallback} from "./i_interface_declare"; -import IInterfaceDeclare from "./i_interface_declare"; -import rpc from "@ohos.rpc"; - -export default class InterfaceDeclareStub extends rpc.RemoteObject implements IInterfaceDeclare { - constructor(des: string) { - super(des); - } - - onRemoteRequest(code: number, data, reply, option): boolean { - console.log("onRemoteRequest called, code = " + code); - switch(code) { - case InterfaceDeclareStub.COMMAND_TEST_INTERFACE: { - let _data = data.readInt(); - this.testInterface(_data, (errCode) => { - reply.writeInt(errCode); - }); - return true; - } - default: { - console.log("invalid request code" + code); - break; - } - } - return false; - } - - testInterface(data: number, callback: testInterfaceCallback): void{} - - static readonly COMMAND_TEST_INTERFACE = 1; -} - diff --git a/ability/ability_runtime/zidltest/actsamszidlservice/entry/src/main/ets/ServiceAbility/service.ts b/ability/ability_runtime/zidltest/actsamszidlservice/entry/src/main/ets/ServiceAbility/service.ts deleted file mode 100644 index b49731a414958a281c2f0c4eab0e7fb408eb2c2f..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/zidltest/actsamszidlservice/entry/src/main/ets/ServiceAbility/service.ts +++ /dev/null @@ -1,25 +0,0 @@ -/* -* 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. -*/ -export default { - onStart() { - console.info('ServiceAbility onStart'); - }, - onStop() { - console.info('ServiceAbility onStop'); - }, - onCommand(want, startId) { - console.info('ServiceAbility onCommand'); - } -}; \ No newline at end of file diff --git a/ability/ability_runtime/zidltest/actsamszidlservice/entry/src/main/ets/ServiceAbility/zidlTool/i_zidl_tool_test.ts b/ability/ability_runtime/zidltest/actsamszidlservice/entry/src/main/ets/ServiceAbility/zidlTool/i_zidl_tool_test.ts deleted file mode 100644 index ac9da635209b8b8a170f587485ab01a1e9844fcb..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/zidltest/actsamszidlservice/entry/src/main/ets/ServiceAbility/zidlTool/i_zidl_tool_test.ts +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright (C) 2021 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 MySequenceable from "./my_sequenceable"; -import IInterfaceDeclare from "../interfaceDeclare/i_interface_declare"; - -export default interface IZidlToolTest { - onewayVoidVoid(callback: onewayVoidVoidCallback): void; - voidVoid(callback: voidVoidCallback): void; - booleanVoid(callback: booleanVoidCallback): void; - byteVoid(callback: byteVoidCallback): void; - shortVoid(callback: shortVoidCallback): void; - intVoid(callback: intVoidCallback): void; - longVoid(callback: longVoidCallback): void; - floatVoid(callback: floatVoidCallback): void; - doubleVoid(callback: doubleVoidCallback): void; - stringVoid(callback: stringVoidCallback): void; - sequenceableVoid(callback: sequenceableVoidCallback): void; - interfaceVoid(callback: interfaceVoidCallback): void; - mapStringStringVoid(callback: mapStringStringVoidCallback): void; - doubleArrayVoid(callback: doubleArrayVoidCallback): void; - voidInMapStringInt(param: Map, callback: voidInMapStringIntCallback): void; - voidInStringArray(param: string[], callback: voidInStringArrayCallback): void; - voidOutMapStringInt(callback: voidOutMapStringIntCallback): void; - voidOutStringArray(callback: voidOutStringArrayCallback): void; - voidInOutMapStringInt(param: Map, callback: voidInOutMapStringIntCallback): void; - voidInOutStringArray(param: string[], callback: voidInOutStringArrayCallback): void; - voidInInt(param: number, callback: voidInIntCallback): void; - voidInString(param: string, callback: voidInStringCallback): void; - voidOutInt(callback: voidOutIntCallback): void; - voidOutString(callback: voidOutStringCallback): void; - voidInOutInt(param: number, callback: voidInOutIntCallback): void; - voidInOutString(param: string, callback: voidInOutStringCallback): void; - voidParameterTypeBoolean(param: boolean, callback: voidParameterTypeBooleanCallback): void; - voidParameterTypeByte(param: number, callback: voidParameterTypeByteCallback): void; - voidParameterTypeShort(param: number, callback: voidParameterTypeShortCallback): void; - voidParameterTypeInt(param: number, callback: voidParameterTypeIntCallback): void; - voidParameterTypeLong(param: number, callback: voidParameterTypeLongCallback): void; - voidParameterTypeFloat(param: number, callback: voidParameterTypeFloatCallback): void; - voidParameterTypeDouble(param: number, callback: voidParameterTypeDoubleCallback): void; - voidParameterTypeString(param: string, callback: voidParameterTypeStringCallback): void; - voidParameterTypeSequenceable(param: MySequenceable, callback: voidParameterTypeSequenceableCallback): void; - voidParameterTypeInterface(param: IInterfaceDeclare, callback: voidParameterTypeInterfaceCallback): void; - voidParameterTypeMapStringString(param: Map, callback: voidParameterTypeMapStringStringCallback): void; - voidParameterTypeDoubleArray(param: number[], callback: voidParameterTypeDoubleArrayCallback): void; - voidOrderOutIn(paramI: number, callback: voidOrderOutInCallback): void; - voidOrderInOutIn(paramI: number, paramS: string, callback: voidOrderInOutInCallback): void; - voidOrderOutInOut(paramS: string, callback: voidOrderOutInOutCallback): void; - voidOrderInInOutOut(paramS: string, paramI: number, callback: voidOrderInInOutOutCallback): void; -} -export type onewayVoidVoidCallback = (errCode: number) => void; -export type voidVoidCallback = (errCode: number) => void; -export type booleanVoidCallback = (errCode: number, returnValue: boolean) => void; -export type byteVoidCallback = (errCode: number, returnValue: number) => void; -export type shortVoidCallback = (errCode: number, returnValue: number) => void; -export type intVoidCallback = (errCode: number, returnValue: number) => void; -export type longVoidCallback = (errCode: number, returnValue: number) => void; -export type floatVoidCallback = (errCode: number, returnValue: number) => void; -export type doubleVoidCallback = (errCode: number, returnValue: number) => void; -export type stringVoidCallback = (errCode: number, returnValue: string) => void; -export type sequenceableVoidCallback = (errCode: number, returnValue: MySequenceable) => void; -export type interfaceVoidCallback = (errCode: number, returnValue: IInterfaceDeclare) => void; -export type mapStringStringVoidCallback = (errCode: number, returnValue: Map) => void; -export type doubleArrayVoidCallback = (errCode: number, returnValue: number[]) => void; -export type voidInMapStringIntCallback = (errCode: number) => void; -export type voidInStringArrayCallback = (errCode: number) => void; -export type voidOutMapStringIntCallback = (errCode: number, param: Map) => void; -export type voidOutStringArrayCallback = (errCode: number, param: string[]) => void; -export type voidInOutMapStringIntCallback = (errCode: number, param: Map) => void; -export type voidInOutStringArrayCallback = (errCode: number, param: string[]) => void; -export type voidInIntCallback = (errCode: number) => void; -export type voidInStringCallback = (errCode: number) => void; -export type voidOutIntCallback = (errCode: number, param: number) => void; -export type voidOutStringCallback = (errCode: number, param: string) => void; -export type voidInOutIntCallback = (errCode: number, param: number) => void; -export type voidInOutStringCallback = (errCode: number, param: string) => void; -export type voidParameterTypeBooleanCallback = (errCode: number) => void; -export type voidParameterTypeByteCallback = (errCode: number) => void; -export type voidParameterTypeShortCallback = (errCode: number) => void; -export type voidParameterTypeIntCallback = (errCode: number) => void; -export type voidParameterTypeLongCallback = (errCode: number) => void; -export type voidParameterTypeFloatCallback = (errCode: number) => void; -export type voidParameterTypeDoubleCallback = (errCode: number) => void; -export type voidParameterTypeStringCallback = (errCode: number) => void; -export type voidParameterTypeSequenceableCallback = (errCode: number) => void; -export type voidParameterTypeInterfaceCallback = (errCode: number) => void; -export type voidParameterTypeMapStringStringCallback = (errCode: number) => void; -export type voidParameterTypeDoubleArrayCallback = (errCode: number) => void; -export type voidOrderOutInCallback = (errCode: number, paramS: string) => void; -export type voidOrderInOutInCallback = (errCode: number, paramI: number) => void; -export type voidOrderOutInOutCallback = (errCode: number, paramI: number, paramS: string) => void; -export type voidOrderInInOutOutCallback = (errCode: number, paramI: number, paramS2: string) => void; - diff --git a/ability/ability_runtime/zidltest/actsamszidlservice/entry/src/main/ets/ServiceAbility/zidlTool/my_sequenceable.ts b/ability/ability_runtime/zidltest/actsamszidlservice/entry/src/main/ets/ServiceAbility/zidlTool/my_sequenceable.ts deleted file mode 100644 index bef9dcbe25c82b2c96e8ac8cc6493ce3d080baf6..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/zidltest/actsamszidlservice/entry/src/main/ets/ServiceAbility/zidlTool/my_sequenceable.ts +++ /dev/null @@ -1,28 +0,0 @@ -export default class MySequenceable { - constructor() { - this.num = 14; - this.str = "hello"; - } - getNum() : number { - return this.num; - } - - getString() : string { - return this.str; - } - - marshalling(messageParcel) { - console.info('marshalling++++'); - messageParcel.writeInt(this.num); - messageParcel.writeString(this.str); - return true; - } - unmarshalling(messageParcel) { - console.info('unmarshalling++++'); - this.num = messageParcel.readInt(); - this.str = messageParcel.readString(); - return true; - } - private num; - private str; -} \ No newline at end of file diff --git a/ability/ability_runtime/zidltest/actsamszidlservice/entry/src/main/ets/ServiceAbility/zidlTool/zidl_tool_test_stub.ts b/ability/ability_runtime/zidltest/actsamszidlservice/entry/src/main/ets/ServiceAbility/zidlTool/zidl_tool_test_stub.ts deleted file mode 100644 index 466bc3d6040a0b3c01ca401b05d96dc1a55cacb9..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/zidltest/actsamszidlservice/entry/src/main/ets/ServiceAbility/zidlTool/zidl_tool_test_stub.ts +++ /dev/null @@ -1,549 +0,0 @@ -/* - * Copyright (C) 2021 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 {onewayVoidVoidCallback} from "./i_zidl_tool_test"; -import {voidVoidCallback} from "./i_zidl_tool_test"; -import {booleanVoidCallback} from "./i_zidl_tool_test"; -import {byteVoidCallback} from "./i_zidl_tool_test"; -import {shortVoidCallback} from "./i_zidl_tool_test"; -import {intVoidCallback} from "./i_zidl_tool_test"; -import {longVoidCallback} from "./i_zidl_tool_test"; -import {floatVoidCallback} from "./i_zidl_tool_test"; -import {doubleVoidCallback} from "./i_zidl_tool_test"; -import {stringVoidCallback} from "./i_zidl_tool_test"; -import {sequenceableVoidCallback} from "./i_zidl_tool_test"; -import {interfaceVoidCallback} from "./i_zidl_tool_test"; -import {mapStringStringVoidCallback} from "./i_zidl_tool_test"; -import {doubleArrayVoidCallback} from "./i_zidl_tool_test"; -import {voidInMapStringIntCallback} from "./i_zidl_tool_test"; -import {voidInStringArrayCallback} from "./i_zidl_tool_test"; -import {voidOutMapStringIntCallback} from "./i_zidl_tool_test"; -import {voidOutStringArrayCallback} from "./i_zidl_tool_test"; -import {voidInOutMapStringIntCallback} from "./i_zidl_tool_test"; -import {voidInOutStringArrayCallback} from "./i_zidl_tool_test"; -import {voidInIntCallback} from "./i_zidl_tool_test"; -import {voidInStringCallback} from "./i_zidl_tool_test"; -import {voidOutIntCallback} from "./i_zidl_tool_test"; -import {voidOutStringCallback} from "./i_zidl_tool_test"; -import {voidInOutIntCallback} from "./i_zidl_tool_test"; -import {voidInOutStringCallback} from "./i_zidl_tool_test"; -import {voidParameterTypeBooleanCallback} from "./i_zidl_tool_test"; -import {voidParameterTypeByteCallback} from "./i_zidl_tool_test"; -import {voidParameterTypeShortCallback} from "./i_zidl_tool_test"; -import {voidParameterTypeIntCallback} from "./i_zidl_tool_test"; -import {voidParameterTypeLongCallback} from "./i_zidl_tool_test"; -import {voidParameterTypeFloatCallback} from "./i_zidl_tool_test"; -import {voidParameterTypeDoubleCallback} from "./i_zidl_tool_test"; -import {voidParameterTypeStringCallback} from "./i_zidl_tool_test"; -import {voidParameterTypeSequenceableCallback} from "./i_zidl_tool_test"; -import {voidParameterTypeInterfaceCallback} from "./i_zidl_tool_test"; -import {voidParameterTypeMapStringStringCallback} from "./i_zidl_tool_test"; -import {voidParameterTypeDoubleArrayCallback} from "./i_zidl_tool_test"; -import {voidOrderOutInCallback} from "./i_zidl_tool_test"; -import {voidOrderInOutInCallback} from "./i_zidl_tool_test"; -import {voidOrderOutInOutCallback} from "./i_zidl_tool_test"; -import {voidOrderInInOutOutCallback} from "./i_zidl_tool_test"; -import IZidlToolTest from "./i_zidl_tool_test"; -import rpc from "@ohos.rpc"; -import MySequenceable from "./my_sequenceable"; -import IInterfaceDeclare from "../interfaceDeclare/i_interface_declare"; -import InterfaceDeclareStub from "../interfaceDeclare/interface_declare_stub"; - -export default class ZidlToolTestStub extends rpc.RemoteObject implements IZidlToolTest { - constructor(des: string) { - super(des); - } - - onRemoteRequest(code: number, data, reply, option): boolean { - console.log("onRemoteRequest called, code = " + code); - switch(code) { - case ZidlToolTestStub.COMMAND_ONEWAY_VOID_VOID: { - this.onewayVoidVoid((errCode) => { - reply.writeInt(errCode); - }); - return true; - } - case ZidlToolTestStub.COMMAND_VOID_VOID: { - this.voidVoid((errCode) => { - reply.writeInt(errCode); - }); - return true; - } - case ZidlToolTestStub.COMMAND_BOOLEAN_VOID: { - this.booleanVoid((errCode, returnValue) => { - reply.writeInt(errCode); - if (errCode == 0) { - reply.writeInt(returnValue ? 1 : 0); - } - }); - return true; - } - case ZidlToolTestStub.COMMAND_BYTE_VOID: { - this.byteVoid((errCode, returnValue) => { - reply.writeInt(errCode); - if (errCode == 0) { - reply.writeInt(returnValue); - } - }); - return true; - } - case ZidlToolTestStub.COMMAND_SHORT_VOID: { - this.shortVoid((errCode, returnValue) => { - reply.writeInt(errCode); - if (errCode == 0) { - reply.writeInt(returnValue); - } - }); - return true; - } - case ZidlToolTestStub.COMMAND_INT_VOID: { - this.intVoid((errCode, returnValue) => { - reply.writeInt(errCode); - if (errCode == 0) { - reply.writeInt(returnValue); - } - }); - return true; - } - case ZidlToolTestStub.COMMAND_LONG_VOID: { - this.longVoid((errCode, returnValue) => { - reply.writeInt(errCode); - if (errCode == 0) { - reply.writeLong(returnValue); - } - }); - return true; - } - case ZidlToolTestStub.COMMAND_FLOAT_VOID: { - this.floatVoid((errCode, returnValue) => { - reply.writeInt(errCode); - if (errCode == 0) { - reply.writeFloat(returnValue); - } - }); - return true; - } - case ZidlToolTestStub.COMMAND_DOUBLE_VOID: { - this.doubleVoid((errCode, returnValue) => { - reply.writeInt(errCode); - if (errCode == 0) { - reply.writeDouble(returnValue); - } - }); - return true; - } - case ZidlToolTestStub.COMMAND_STRING_VOID: { - this.stringVoid((errCode, returnValue) => { - reply.writeInt(errCode); - if (errCode == 0) { - reply.writeString(returnValue); - } - }); - return true; - } - case ZidlToolTestStub.COMMAND_SEQUENCEABLE_VOID: { - this.sequenceableVoid((errCode, returnValue) => { - reply.writeInt(errCode); - if (errCode == 0) { - reply.writeSequenceable(returnValue); - } - }); - return true; - } - case ZidlToolTestStub.COMMAND_INTERFACE_VOID: { - this.interfaceVoid((errCode, returnValue) => { - reply.writeInt(errCode); - if (errCode == 0) { - reply.writeRemoteObject(returnValue as InterfaceDeclareStub); - } - }); - return true; - } - case ZidlToolTestStub.COMMAND_MAP_STRING_STRING_VOID: { - this.mapStringStringVoid((errCode, returnValue) => { - reply.writeInt(errCode); - if (errCode == 0) { - reply.writeInt(returnValue.size); - for (let [key, value] of returnValue) { - reply.writeString(key); - reply.writeString(value); - } - } - }); - return true; - } - case ZidlToolTestStub.COMMAND_DOUBLE_ARRAY_VOID: { - this.doubleArrayVoid((errCode, returnValue) => { - reply.writeInt(errCode); - if (errCode == 0) { - reply.writeDoubleArray(returnValue); - } - }); - return true; - } - case ZidlToolTestStub.COMMAND_VOID_IN_MAP_STRING_INT: { - let _param = new Map(); - let _paramSize = data.readInt(); - for (let i = 0; i < _paramSize; ++i) { - let key = data.readString(); - let value = data.readInt(); - _param.set(key, value); - } - this.voidInMapStringInt(_param, (errCode) => { - reply.writeInt(errCode); - }); - return true; - } - case ZidlToolTestStub.COMMAND_VOID_IN_STRING_ARRAY: { - let _param = data.readStringArray(); - this.voidInStringArray(_param, (errCode) => { - reply.writeInt(errCode); - }); - return true; - } - case ZidlToolTestStub.COMMAND_VOID_OUT_MAP_STRING_INT: { - this.voidOutMapStringInt((errCode, param) => { - reply.writeInt(errCode); - if (errCode == 0) { - reply.writeInt(param.size); - for (let [key, value] of param) { - reply.writeString(key); - reply.writeInt(value); - } - } - }); - return true; - } - case ZidlToolTestStub.COMMAND_VOID_OUT_STRING_ARRAY: { - this.voidOutStringArray((errCode, param) => { - reply.writeInt(errCode); - if (errCode == 0) { - reply.writeStringArray(param); - } - }); - return true; - } - case ZidlToolTestStub.COMMAND_VOID_IN_OUT_MAP_STRING_INT: { - let _param = new Map(); - let _paramSize = data.readInt(); - for (let i = 0; i < _paramSize; ++i) { - let key = data.readString(); - let value = data.readInt(); - _param.set(key, value); - } - this.voidInOutMapStringInt(_param, (errCode, param) => { - reply.writeInt(errCode); - if (errCode == 0) { - reply.writeInt(param.size); - for (let [key, value] of param) { - reply.writeString(key); - reply.writeInt(value); - } - } - }); - return true; - } - case ZidlToolTestStub.COMMAND_VOID_IN_OUT_STRING_ARRAY: { - let _param = data.readStringArray(); - this.voidInOutStringArray(_param, (errCode, param) => { - reply.writeInt(errCode); - if (errCode == 0) { - reply.writeStringArray(param); - } - }); - return true; - } - case ZidlToolTestStub.COMMAND_VOID_IN_INT: { - let _param = data.readInt(); - this.voidInInt(_param, (errCode) => { - reply.writeInt(errCode); - }); - return true; - } - case ZidlToolTestStub.COMMAND_VOID_IN_STRING: { - let _param = data.readString(); - this.voidInString(_param, (errCode) => { - reply.writeInt(errCode); - }); - return true; - } - case ZidlToolTestStub.COMMAND_VOID_OUT_INT: { - this.voidOutInt((errCode, param) => { - reply.writeInt(errCode); - if (errCode == 0) { - reply.writeInt(param); - } - }); - return true; - } - case ZidlToolTestStub.COMMAND_VOID_OUT_STRING: { - this.voidOutString((errCode, param) => { - reply.writeInt(errCode); - if (errCode == 0) { - reply.writeString(param); - } - }); - return true; - } - case ZidlToolTestStub.COMMAND_VOID_IN_OUT_INT: { - let _param = data.readInt(); - this.voidInOutInt(_param, (errCode, param) => { - reply.writeInt(errCode); - if (errCode == 0) { - reply.writeInt(param); - } - }); - return true; - } - case ZidlToolTestStub.COMMAND_VOID_IN_OUT_STRING: { - let _param = data.readString(); - this.voidInOutString(_param, (errCode, param) => { - reply.writeInt(errCode); - if (errCode == 0) { - reply.writeString(param); - } - }); - return true; - } - case ZidlToolTestStub.COMMAND_VOID_PARAMETER_TYPE_BOOLEAN: { - let _param = data.readInt() == 1 ? true : false; - this.voidParameterTypeBoolean(_param, (errCode) => { - reply.writeInt(errCode); - }); - return true; - } - case ZidlToolTestStub.COMMAND_VOID_PARAMETER_TYPE_BYTE: { - let _param = data.readInt(); - this.voidParameterTypeByte(_param, (errCode) => { - reply.writeInt(errCode); - }); - return true; - } - case ZidlToolTestStub.COMMAND_VOID_PARAMETER_TYPE_SHORT: { - let _param = data.readInt(); - this.voidParameterTypeShort(_param, (errCode) => { - reply.writeInt(errCode); - }); - return true; - } - case ZidlToolTestStub.COMMAND_VOID_PARAMETER_TYPE_INT: { - let _param = data.readInt(); - this.voidParameterTypeInt(_param, (errCode) => { - reply.writeInt(errCode); - }); - return true; - } - case ZidlToolTestStub.COMMAND_VOID_PARAMETER_TYPE_LONG: { - let _param = data.readLong(); - this.voidParameterTypeLong(_param, (errCode) => { - reply.writeInt(errCode); - }); - return true; - } - case ZidlToolTestStub.COMMAND_VOID_PARAMETER_TYPE_FLOAT: { - let _param = data.readFloat(); - this.voidParameterTypeFloat(_param, (errCode) => { - reply.writeInt(errCode); - }); - return true; - } - case ZidlToolTestStub.COMMAND_VOID_PARAMETER_TYPE_DOUBLE: { - let _param = data.readDouble(); - this.voidParameterTypeDouble(_param, (errCode) => { - reply.writeInt(errCode); - }); - return true; - } - case ZidlToolTestStub.COMMAND_VOID_PARAMETER_TYPE_STRING: { - let _param = data.readString(); - this.voidParameterTypeString(_param, (errCode) => { - reply.writeInt(errCode); - }); - return true; - } - case ZidlToolTestStub.COMMAND_VOID_PARAMETER_TYPE_SEQUENCEABLE: { - let _param = new MySequenceable(); - data.readSequenceable(_param); - this.voidParameterTypeSequenceable(_param, (errCode) => { - reply.writeInt(errCode); - }); - return true; - } - case ZidlToolTestStub.COMMAND_VOID_PARAMETER_TYPE_INTERFACE: { - let _param = data.readRemoteObject(); - this.voidParameterTypeInterface(_param, (errCode) => { - reply.writeInt(errCode); - }); - return true; - } - case ZidlToolTestStub.COMMAND_VOID_PARAMETER_TYPE_MAP_STRING_STRING: { - let _param = new Map(); - let _paramSize = data.readInt(); - for (let i = 0; i < _paramSize; ++i) { - let key = data.readString(); - let value = data.readString(); - _param.set(key, value); - } - this.voidParameterTypeMapStringString(_param, (errCode) => { - reply.writeInt(errCode); - }); - return true; - } - case ZidlToolTestStub.COMMAND_VOID_PARAMETER_TYPE_DOUBLE_ARRAY: { - let _param = data.readDoubleArray(); - this.voidParameterTypeDoubleArray(_param, (errCode) => { - reply.writeInt(errCode); - }); - return true; - } - case ZidlToolTestStub.COMMAND_VOID_ORDER_OUT_IN: { - let _paramI = data.readInt(); - this.voidOrderOutIn(_paramI, (errCode, paramS) => { - reply.writeInt(errCode); - if (errCode == 0) { - reply.writeString(paramS); - } - }); - return true; - } - case ZidlToolTestStub.COMMAND_VOID_ORDER_IN_OUT_IN: { - let _paramI = data.readInt(); - let _paramS = data.readString(); - this.voidOrderInOutIn(_paramI, _paramS, (errCode, paramI) => { - reply.writeInt(errCode); - if (errCode == 0) { - reply.writeInt(paramI); - } - }); - return true; - } - case ZidlToolTestStub.COMMAND_VOID_ORDER_OUT_IN_OUT: { - let _paramS = data.readString(); - this.voidOrderOutInOut(_paramS, (errCode, paramI, paramS) => { - reply.writeInt(errCode); - if (errCode == 0) { - reply.writeInt(paramI); - reply.writeString(paramS); - } - }); - return true; - } - case ZidlToolTestStub.COMMAND_VOID_ORDER_IN_IN_OUT_OUT: { - let _paramS = data.readString(); - let _paramI = data.readInt(); - this.voidOrderInInOutOut(_paramS, _paramI, (errCode, paramI, paramS2) => { - reply.writeInt(errCode); - if (errCode == 0) { - reply.writeInt(paramI); - reply.writeString(paramS2); - } - }); - return true; - } - default: { - console.log("invalid request code" + code); - break; - } - } - return false; - } - - onewayVoidVoid(callback: onewayVoidVoidCallback): void{} - voidVoid(callback: voidVoidCallback): void{} - booleanVoid(callback: booleanVoidCallback): void{} - byteVoid(callback: byteVoidCallback): void{} - shortVoid(callback: shortVoidCallback): void{} - intVoid(callback: intVoidCallback): void{} - longVoid(callback: longVoidCallback): void{} - floatVoid(callback: floatVoidCallback): void{} - doubleVoid(callback: doubleVoidCallback): void{} - stringVoid(callback: stringVoidCallback): void{} - sequenceableVoid(callback: sequenceableVoidCallback): void{} - interfaceVoid(callback: interfaceVoidCallback): void{} - mapStringStringVoid(callback: mapStringStringVoidCallback): void{} - doubleArrayVoid(callback: doubleArrayVoidCallback): void{} - voidInMapStringInt(param: Map, callback: voidInMapStringIntCallback): void{} - voidInStringArray(param: string[], callback: voidInStringArrayCallback): void{} - voidOutMapStringInt(callback: voidOutMapStringIntCallback): void{} - voidOutStringArray(callback: voidOutStringArrayCallback): void{} - voidInOutMapStringInt(param: Map, callback: voidInOutMapStringIntCallback): void{} - voidInOutStringArray(param: string[], callback: voidInOutStringArrayCallback): void{} - voidInInt(param: number, callback: voidInIntCallback): void{} - voidInString(param: string, callback: voidInStringCallback): void{} - voidOutInt(callback: voidOutIntCallback): void{} - voidOutString(callback: voidOutStringCallback): void{} - voidInOutInt(param: number, callback: voidInOutIntCallback): void{} - voidInOutString(param: string, callback: voidInOutStringCallback): void{} - voidParameterTypeBoolean(param: boolean, callback: voidParameterTypeBooleanCallback): void{} - voidParameterTypeByte(param: number, callback: voidParameterTypeByteCallback): void{} - voidParameterTypeShort(param: number, callback: voidParameterTypeShortCallback): void{} - voidParameterTypeInt(param: number, callback: voidParameterTypeIntCallback): void{} - voidParameterTypeLong(param: number, callback: voidParameterTypeLongCallback): void{} - voidParameterTypeFloat(param: number, callback: voidParameterTypeFloatCallback): void{} - voidParameterTypeDouble(param: number, callback: voidParameterTypeDoubleCallback): void{} - voidParameterTypeString(param: string, callback: voidParameterTypeStringCallback): void{} - voidParameterTypeSequenceable(param: MySequenceable, callback: voidParameterTypeSequenceableCallback): void{} - voidParameterTypeInterface(param: IInterfaceDeclare, callback: voidParameterTypeInterfaceCallback): void{} - voidParameterTypeMapStringString(param: Map, callback: voidParameterTypeMapStringStringCallback): void{} - voidParameterTypeDoubleArray(param: number[], callback: voidParameterTypeDoubleArrayCallback): void{} - voidOrderOutIn(paramI: number, callback: voidOrderOutInCallback): void{} - voidOrderInOutIn(paramI: number, paramS: string, callback: voidOrderInOutInCallback): void{} - voidOrderOutInOut(paramS: string, callback: voidOrderOutInOutCallback): void{} - voidOrderInInOutOut(paramS: string, paramI: number, callback: voidOrderInInOutOutCallback): void{} - - static readonly COMMAND_ONEWAY_VOID_VOID = 1; - static readonly COMMAND_VOID_VOID = 2; - static readonly COMMAND_BOOLEAN_VOID = 3; - static readonly COMMAND_BYTE_VOID = 4; - static readonly COMMAND_SHORT_VOID = 5; - static readonly COMMAND_INT_VOID = 6; - static readonly COMMAND_LONG_VOID = 7; - static readonly COMMAND_FLOAT_VOID = 8; - static readonly COMMAND_DOUBLE_VOID = 9; - static readonly COMMAND_STRING_VOID = 10; - static readonly COMMAND_SEQUENCEABLE_VOID = 11; - static readonly COMMAND_INTERFACE_VOID = 12; - static readonly COMMAND_MAP_STRING_STRING_VOID = 13; - static readonly COMMAND_DOUBLE_ARRAY_VOID = 14; - static readonly COMMAND_VOID_IN_MAP_STRING_INT = 15; - static readonly COMMAND_VOID_IN_STRING_ARRAY = 16; - static readonly COMMAND_VOID_OUT_MAP_STRING_INT = 17; - static readonly COMMAND_VOID_OUT_STRING_ARRAY = 18; - static readonly COMMAND_VOID_IN_OUT_MAP_STRING_INT = 19; - static readonly COMMAND_VOID_IN_OUT_STRING_ARRAY = 20; - static readonly COMMAND_VOID_IN_INT = 21; - static readonly COMMAND_VOID_IN_STRING = 22; - static readonly COMMAND_VOID_OUT_INT = 23; - static readonly COMMAND_VOID_OUT_STRING = 24; - static readonly COMMAND_VOID_IN_OUT_INT = 25; - static readonly COMMAND_VOID_IN_OUT_STRING = 26; - static readonly COMMAND_VOID_PARAMETER_TYPE_BOOLEAN = 27; - static readonly COMMAND_VOID_PARAMETER_TYPE_BYTE = 28; - static readonly COMMAND_VOID_PARAMETER_TYPE_SHORT = 29; - static readonly COMMAND_VOID_PARAMETER_TYPE_INT = 30; - static readonly COMMAND_VOID_PARAMETER_TYPE_LONG = 31; - static readonly COMMAND_VOID_PARAMETER_TYPE_FLOAT = 32; - static readonly COMMAND_VOID_PARAMETER_TYPE_DOUBLE = 33; - static readonly COMMAND_VOID_PARAMETER_TYPE_STRING = 34; - static readonly COMMAND_VOID_PARAMETER_TYPE_SEQUENCEABLE = 35; - static readonly COMMAND_VOID_PARAMETER_TYPE_INTERFACE = 36; - static readonly COMMAND_VOID_PARAMETER_TYPE_MAP_STRING_STRING = 37; - static readonly COMMAND_VOID_PARAMETER_TYPE_DOUBLE_ARRAY = 38; - static readonly COMMAND_VOID_ORDER_OUT_IN = 39; - static readonly COMMAND_VOID_ORDER_IN_OUT_IN = 40; - static readonly COMMAND_VOID_ORDER_OUT_IN_OUT = 41; - static readonly COMMAND_VOID_ORDER_IN_IN_OUT_OUT = 42; -} - diff --git a/ability/ability_runtime/zidltest/actsamszidlservice/entry/src/main/ets/ServiceAbility2/ServiceAbility2.ts b/ability/ability_runtime/zidltest/actsamszidlservice/entry/src/main/ets/ServiceAbility2/ServiceAbility2.ts deleted file mode 100644 index 77d68a9d282f8f10b04cf8605f63c41f8165243e..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/zidltest/actsamszidlservice/entry/src/main/ets/ServiceAbility2/ServiceAbility2.ts +++ /dev/null @@ -1,65 +0,0 @@ -/* -* 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 ServiceExtension from '@ohos.application.ServiceExtensionAbility' -import Want from '@ohos.application.Want'; -import ZidlTestServiceStubOneway from './zidlToolOneWay/interface_attribute_declaratoin_oneway_stub'; -import {voidVoidFirstCallback} from './zidlToolOneWay/i_interface_attribute_declaratoin_oneway' -import {voidVoidSecondCallback} from './zidlToolOneWay/i_interface_attribute_declaratoin_oneway' -import {voidVoidThirdCallback} from './zidlToolOneWay/i_interface_attribute_declaratoin_oneway' - -const SUCCESS = 0; -const FAIL = 1; - -class ZidlTestImpOneway extends ZidlTestServiceStubOneway { - voidVoidFirst(callback: voidVoidFirstCallback) { - console.log("ZidlTest Server ACTS_Zidl_Js2JsMulti_0100_1 called"); - callback(SUCCESS); - } - - voidVoidSecond(callback: voidVoidSecondCallback) { - console.log("ZidlTest Server ACTS_Zidl_Js2JsMulti_0100_2 called"); - callback(SUCCESS); - } - - voidVoidThird(callback: voidVoidThirdCallback) { - console.log("ZidlTest Server ACTS_Zidl_Js2JsMulti_0100_3 called"); - callback(SUCCESS); - } -} - -export default class ServiceAbility2 extends ServiceExtension { - onCreate(want: Want) { - globalThis.abilityWant = want; - console.log('ZidlService ServiceAbility2 onCreate, want: ' + want.abilityName); - } - - onRequest(want, startId) { - console.log('ZidlService ServiceAbility2 onRequest, want: ' + want.abilityName - + ', startId: ' + startId); - } - - onConnect(want) { - console.log('ZidlService ServiceAbility2 onConnect, want:' + want.abilityName); - return new ZidlTestImpOneway('connect'); - } - - onDisconnect(want) { - console.log('ZidlService ServiceAbility2 onDisconnect, want:' + want.abilityName); - } - - onDestroy() { - console.log('AZidlService ServiceAbility2 onDestroy'); - } -}; diff --git a/ability/ability_runtime/zidltest/actsamszidlservice/entry/src/main/ets/ServiceAbility2/service.ts b/ability/ability_runtime/zidltest/actsamszidlservice/entry/src/main/ets/ServiceAbility2/service.ts deleted file mode 100644 index b49731a414958a281c2f0c4eab0e7fb408eb2c2f..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/zidltest/actsamszidlservice/entry/src/main/ets/ServiceAbility2/service.ts +++ /dev/null @@ -1,25 +0,0 @@ -/* -* 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. -*/ -export default { - onStart() { - console.info('ServiceAbility onStart'); - }, - onStop() { - console.info('ServiceAbility onStop'); - }, - onCommand(want, startId) { - console.info('ServiceAbility onCommand'); - } -}; \ No newline at end of file diff --git a/ability/ability_runtime/zidltest/actsamszidlservice/entry/src/main/ets/ServiceAbility2/zidlToolOneWay/i_interface_attribute_declaratoin_oneway.ts b/ability/ability_runtime/zidltest/actsamszidlservice/entry/src/main/ets/ServiceAbility2/zidlToolOneWay/i_interface_attribute_declaratoin_oneway.ts deleted file mode 100644 index a17db0f5d20ac1d674258b1e094355c2276fc2b4..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/zidltest/actsamszidlservice/entry/src/main/ets/ServiceAbility2/zidlToolOneWay/i_interface_attribute_declaratoin_oneway.ts +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright (C) 2021 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. - */ - - -export default interface IInterfaceAttributeDeclaratoinOneway { - voidVoidFirst(callback: voidVoidFirstCallback): void; - voidVoidSecond(callback: voidVoidSecondCallback): void; - voidVoidThird(callback: voidVoidThirdCallback): void; -} -export type voidVoidFirstCallback = (errCode: number) => void; -export type voidVoidSecondCallback = (errCode: number) => void; -export type voidVoidThirdCallback = (errCode: number) => void; - diff --git a/ability/ability_runtime/zidltest/actsamszidlservice/entry/src/main/ets/ServiceAbility2/zidlToolOneWay/interface_attribute_declaratoin_oneway_stub.ts b/ability/ability_runtime/zidltest/actsamszidlservice/entry/src/main/ets/ServiceAbility2/zidlToolOneWay/interface_attribute_declaratoin_oneway_stub.ts deleted file mode 100644 index 016f352bd6d609916ad6e3b12e63e075a6fbe490..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/zidltest/actsamszidlservice/entry/src/main/ets/ServiceAbility2/zidlToolOneWay/interface_attribute_declaratoin_oneway_stub.ts +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (C) 2021 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 {voidVoidFirstCallback} from "./i_interface_attribute_declaratoin_oneway"; -import {voidVoidSecondCallback} from "./i_interface_attribute_declaratoin_oneway"; -import {voidVoidThirdCallback} from "./i_interface_attribute_declaratoin_oneway"; -import IInterfaceAttributeDeclaratoinOneway from "./i_interface_attribute_declaratoin_oneway"; -import rpc from "@ohos.rpc"; - -export default class InterfaceAttributeDeclaratoinOnewayStub extends rpc.RemoteObject implements IInterfaceAttributeDeclaratoinOneway { - constructor(des: string) { - super(des); - } - - onRemoteRequest(code: number, data, reply, option): boolean { - console.log("onRemoteRequest called, code = " + code); - switch(code) { - case InterfaceAttributeDeclaratoinOnewayStub.COMMAND_VOID_VOID_FIRST: { - this.voidVoidFirst((errCode) => { - reply.writeInt(errCode); - }); - return true; - } - case InterfaceAttributeDeclaratoinOnewayStub.COMMAND_VOID_VOID_SECOND: { - this.voidVoidSecond((errCode) => { - reply.writeInt(errCode); - }); - return true; - } - case InterfaceAttributeDeclaratoinOnewayStub.COMMAND_VOID_VOID_THIRD: { - this.voidVoidThird((errCode) => { - reply.writeInt(errCode); - }); - return true; - } - default: { - console.log("invalid request code" + code); - break; - } - } - return false; - } - - voidVoidFirst(callback: voidVoidFirstCallback): void{} - voidVoidSecond(callback: voidVoidSecondCallback): void{} - voidVoidThird(callback: voidVoidThirdCallback): void{} - - static readonly COMMAND_VOID_VOID_FIRST = 1; - static readonly COMMAND_VOID_VOID_SECOND = 2; - static readonly COMMAND_VOID_VOID_THIRD = 3; -} - diff --git a/ability/ability_runtime/zidltest/actsamszidlservice/entry/src/main/ets/pages/index/index.ets b/ability/ability_runtime/zidltest/actsamszidlservice/entry/src/main/ets/pages/index/index.ets deleted file mode 100644 index 16e1531e48430510168d31c9f8d8c595c3b62ab9..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/zidltest/actsamszidlservice/entry/src/main/ets/pages/index/index.ets +++ /dev/null @@ -1,37 +0,0 @@ -/* -* 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 file from '@system.file'; - -@Entry -@Component -struct Index { - - aboutToAppear() { - console.info("start run testcase!!!!") - } - - build() { - Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { - Text('pmsystemappa') - .fontSize(50) - .fontWeight(FontWeight.Bold) - .margin({ - top: 20 - }) - } - .width('100%') - .height('100%') - } -} \ No newline at end of file diff --git a/ability/ability_runtime/zidltest/actsamszidlservice/entry/src/main/ets/pages/second/second.ets b/ability/ability_runtime/zidltest/actsamszidlservice/entry/src/main/ets/pages/second/second.ets deleted file mode 100644 index 2c768edb999b1b54fef3268922817734b1f1c954..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/zidltest/actsamszidlservice/entry/src/main/ets/pages/second/second.ets +++ /dev/null @@ -1,43 +0,0 @@ -/* -* 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 diff --git a/ability/ability_runtime/zidltest/actsamszidlservice/entry/src/main/module.json b/ability/ability_runtime/zidltest/actsamszidlservice/entry/src/main/module.json deleted file mode 100644 index 6506e8ea1c3b56793b20c8112b6276af7f6b4bc4..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/zidltest/actsamszidlservice/entry/src/main/module.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "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.zidlservice.MainAbility", - "srcEntrance": "./ets/MainAbility/MainAbility.ts", - "description": "$string:phone_entry_main", - "icon": "$media:icon", - "label": "$string:entry_label", - "visible": true, - "orientation": "portrait", - "skills": [ - { - "actions": [ - "action.system.home" - ], - "entities": [ - "entity.system.home" - ] - } - ] - } - ], - "extensionAbilities": [ - { - "srcEntrance": "./ets/ServiceAbility/ServiceAbility.ts", - "name": "com.example.zidlservice.ServiceAbility", - "icon": "$media:icon", - "srcLanguage": "ets", - "description": "$string:phone_entry_main", - "type": "service", - "visible": true - }, - { - "srcEntrance": "./ets/ServiceAbility2/ServiceAbility2.ts", - "name": "com.example.zidlservice.ServiceAbility2", - "icon": "$media:icon", - "srcLanguage": "ets", - "description": "$string:phone_entry_main", - "type": "service", - "visible": true - } - ], - "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" - } - ] - } -} diff --git a/ability/ability_runtime/zidltest/actsamszidlservice/entry/src/main/resources/base/element/string.json b/ability/ability_runtime/zidltest/actsamszidlservice/entry/src/main/resources/base/element/string.json deleted file mode 100644 index d75325f3cf0a50c1dfe4dbc5162c8737276c3dd9..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/zidltest/actsamszidlservice/entry/src/main/resources/base/element/string.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "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" - } - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/zidltest/actsamszidlservice/entry/src/main/resources/base/media/icon.png b/ability/ability_runtime/zidltest/actsamszidlservice/entry/src/main/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/zidltest/actsamszidlservice/entry/src/main/resources/base/media/icon.png and /dev/null differ diff --git a/ability/ability_runtime/zidltest/actsamszidlservice/entry/src/main/resources/base/profile/main_pages.json b/ability/ability_runtime/zidltest/actsamszidlservice/entry/src/main/resources/base/profile/main_pages.json deleted file mode 100644 index 6898b31d2085f478ee1ed9d933a5910cbf901d92..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/zidltest/actsamszidlservice/entry/src/main/resources/base/profile/main_pages.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "src": [ - "pages/index/index", - "pages/second/second" - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/zidltest/actsamszidlservice/signature/openharmony_sx.p7b b/ability/ability_runtime/zidltest/actsamszidlservice/signature/openharmony_sx.p7b deleted file mode 100755 index 1111250997325e43b38523c176b0870b62e584b0..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/zidltest/actsamszidlservice/signature/openharmony_sx.p7b and /dev/null differ