diff --git a/ability/ability_runtime/actsforresult/forresulttest/entry/src/main/ets/UIExtensionAbility/UIExtAbility.ts b/ability/ability_runtime/actsforresult/forresulttest/entry/src/main/ets/UIExtensionAbility/UIExtAbility.ts index 3ec502beb584729d42df55b320910a813156a95f..855538a7213da845c0fc5b5e943584a9d71928bd 100644 --- a/ability/ability_runtime/actsforresult/forresulttest/entry/src/main/ets/UIExtensionAbility/UIExtAbility.ts +++ b/ability/ability_runtime/actsforresult/forresulttest/entry/src/main/ets/UIExtensionAbility/UIExtAbility.ts @@ -1,3 +1,17 @@ +/* + * Copyright (c) 2023 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 UIExtensionAbility from '@ohos.app.ability.UIExtensionAbility' import wantConstant from '@ohos.app.ability.wantConstant'; import commonEvent from '@ohos.commonEventManager' diff --git a/ability/ability_runtime/actsforresult/forresulttest/entry/src/main/ets/calledability/CalledAbility.ts b/ability/ability_runtime/actsforresult/forresulttest/entry/src/main/ets/calledability/CalledAbility.ts index 6adf06a85aff259ffa6e0dbbac83589424988d86..ad4dd92c15461b616c7536b5dd01662894dd07b2 100644 --- a/ability/ability_runtime/actsforresult/forresulttest/entry/src/main/ets/calledability/CalledAbility.ts +++ b/ability/ability_runtime/actsforresult/forresulttest/entry/src/main/ets/calledability/CalledAbility.ts @@ -1,3 +1,17 @@ +/* + * Copyright (c) 2023 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 UIAbility from '@ohos.app.ability.UIAbility'; import hilog from '@ohos.hilog'; import window from '@ohos.window'; diff --git a/ability/ability_runtime/actsforresult/forresulttest/entry/src/main/ets/entryability/EntryAbility.ts b/ability/ability_runtime/actsforresult/forresulttest/entry/src/main/ets/entryability/EntryAbility.ts index ba5c1a6f534d202dce8d68b02879c382ef71c178..18a716d85f8e93018274accb4a9c0f28fd956277 100644 --- a/ability/ability_runtime/actsforresult/forresulttest/entry/src/main/ets/entryability/EntryAbility.ts +++ b/ability/ability_runtime/actsforresult/forresulttest/entry/src/main/ets/entryability/EntryAbility.ts @@ -1,3 +1,17 @@ +/* + * Copyright (c) 2023 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 UIAbility from '@ohos.app.ability.UIAbility'; import hilog from '@ohos.hilog'; import window from '@ohos.window'; diff --git a/ability/ability_runtime/actsforresult/forresulttest/entry/src/main/ets/pages/Index.ets b/ability/ability_runtime/actsforresult/forresulttest/entry/src/main/ets/pages/Index.ets index efbf4c45795492b0ba9db66f4746343f21bdea40..eed30c96c79d54a098c2f0cc723788d41a448479 100644 --- a/ability/ability_runtime/actsforresult/forresulttest/entry/src/main/ets/pages/Index.ets +++ b/ability/ability_runtime/actsforresult/forresulttest/entry/src/main/ets/pages/Index.ets @@ -1,3 +1,17 @@ +/* + * Copyright (c) 2023 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 Want from '@ohos.app.ability.Want'; @Entry diff --git a/ability/ability_runtime/actsforresult/forresulttest/entry/src/main/ets/pages/Page.ets b/ability/ability_runtime/actsforresult/forresulttest/entry/src/main/ets/pages/Page.ets index 39d0ec2e2eae129c481d171f7847481d81d51d79..9cd7f775f66196089f21a0568bcd0780dafb3a60 100644 --- a/ability/ability_runtime/actsforresult/forresulttest/entry/src/main/ets/pages/Page.ets +++ b/ability/ability_runtime/actsforresult/forresulttest/entry/src/main/ets/pages/Page.ets @@ -1,3 +1,17 @@ +/* + * Copyright (c) 2023 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 Want from '@ohos.app.ability.Want'; import UIExtensionContentSession from '@ohos.app.ability.UIExtensionContentSession'; diff --git a/ability/ability_runtime/actsforresult/forresulttest/entry/src/main/ets/pages/PageTwo.ets b/ability/ability_runtime/actsforresult/forresulttest/entry/src/main/ets/pages/PageTwo.ets index ba01aa2f0692ea46615b4b71ccdbb156d27067f0..d45a7123faedd3ce8ea5093bd704864a9c09ff24 100644 --- a/ability/ability_runtime/actsforresult/forresulttest/entry/src/main/ets/pages/PageTwo.ets +++ b/ability/ability_runtime/actsforresult/forresulttest/entry/src/main/ets/pages/PageTwo.ets @@ -1,3 +1,17 @@ +/* + * Copyright (c) 2023 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 PageTwo { diff --git a/ability/ability_runtime/actsforresult/forresulttestnopermission/entry/src/main/ets/UIExtensionAbility/UIExtAbility.ts b/ability/ability_runtime/actsforresult/forresulttestnopermission/entry/src/main/ets/UIExtensionAbility/UIExtAbility.ts index b0b0ab83a4b4b933ba7df014c57a369a2dc37366..225bc0d4d171bc8d1e1da3ada65a0d7ff7b359eb 100644 --- a/ability/ability_runtime/actsforresult/forresulttestnopermission/entry/src/main/ets/UIExtensionAbility/UIExtAbility.ts +++ b/ability/ability_runtime/actsforresult/forresulttestnopermission/entry/src/main/ets/UIExtensionAbility/UIExtAbility.ts @@ -1,3 +1,17 @@ +/* + * Copyright (c) 2023 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 UIExtensionAbility from '@ohos.app.ability.UIExtensionAbility' import wantConstant from '@ohos.app.ability.wantConstant'; import commonEvent from '@ohos.commonEventManager' diff --git a/ability/ability_runtime/actsforresult/forresulttestnopermission/entry/src/main/ets/calledability/CalledAbility.ts b/ability/ability_runtime/actsforresult/forresulttestnopermission/entry/src/main/ets/calledability/CalledAbility.ts index 3c9f9c0494960f27ea511b0924b323ec9dd97683..1f39f8a3408667fc171e7d400be085a41d649a0f 100644 --- a/ability/ability_runtime/actsforresult/forresulttestnopermission/entry/src/main/ets/calledability/CalledAbility.ts +++ b/ability/ability_runtime/actsforresult/forresulttestnopermission/entry/src/main/ets/calledability/CalledAbility.ts @@ -1,3 +1,17 @@ +/* + * Copyright (c) 2023 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 UIAbility from '@ohos.app.ability.UIAbility'; import hilog from '@ohos.hilog'; import window from '@ohos.window'; diff --git a/ability/ability_runtime/actsforresult/forresulttestnopermission/entry/src/main/ets/entryability/EntryAbility.ts b/ability/ability_runtime/actsforresult/forresulttestnopermission/entry/src/main/ets/entryability/EntryAbility.ts index c0726f1588a17d761e02d6f9366011689c9dc879..d77cb10d0fb4c02ffdec4f769ea79d7f199a42ee 100644 --- a/ability/ability_runtime/actsforresult/forresulttestnopermission/entry/src/main/ets/entryability/EntryAbility.ts +++ b/ability/ability_runtime/actsforresult/forresulttestnopermission/entry/src/main/ets/entryability/EntryAbility.ts @@ -1,3 +1,17 @@ +/* + * Copyright (c) 2023 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 UIAbility from '@ohos.app.ability.UIAbility'; import hilog from '@ohos.hilog'; import window from '@ohos.window'; diff --git a/ability/ability_runtime/actsforresult/forresulttestnopermission/entry/src/main/ets/pages/Index.ets b/ability/ability_runtime/actsforresult/forresulttestnopermission/entry/src/main/ets/pages/Index.ets index 0b02722441fb25db86aa16fdafdebfa3a7a32433..9c939e7fc512da2a741e0159cf3100190af3132d 100644 --- a/ability/ability_runtime/actsforresult/forresulttestnopermission/entry/src/main/ets/pages/Index.ets +++ b/ability/ability_runtime/actsforresult/forresulttestnopermission/entry/src/main/ets/pages/Index.ets @@ -1,3 +1,17 @@ +/* + * Copyright (c) 2023 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 Want from '@ohos.app.ability.Want'; @Entry diff --git a/ability/ability_runtime/actsforresult/forresulttestnopermission/entry/src/main/ets/pages/Page.ets b/ability/ability_runtime/actsforresult/forresulttestnopermission/entry/src/main/ets/pages/Page.ets index 39d0ec2e2eae129c481d171f7847481d81d51d79..9cd7f775f66196089f21a0568bcd0780dafb3a60 100644 --- a/ability/ability_runtime/actsforresult/forresulttestnopermission/entry/src/main/ets/pages/Page.ets +++ b/ability/ability_runtime/actsforresult/forresulttestnopermission/entry/src/main/ets/pages/Page.ets @@ -1,3 +1,17 @@ +/* + * Copyright (c) 2023 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 Want from '@ohos.app.ability.Want'; import UIExtensionContentSession from '@ohos.app.ability.UIExtensionContentSession'; diff --git a/ability/ability_runtime/actsforresult/forresulttestnopermission/entry/src/main/ets/pages/PageTwo.ets b/ability/ability_runtime/actsforresult/forresulttestnopermission/entry/src/main/ets/pages/PageTwo.ets index ba01aa2f0692ea46615b4b71ccdbb156d27067f0..d45a7123faedd3ce8ea5093bd704864a9c09ff24 100644 --- a/ability/ability_runtime/actsforresult/forresulttestnopermission/entry/src/main/ets/pages/PageTwo.ets +++ b/ability/ability_runtime/actsforresult/forresulttestnopermission/entry/src/main/ets/pages/PageTwo.ets @@ -1,3 +1,17 @@ +/* + * Copyright (c) 2023 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 PageTwo { diff --git a/ability/ability_runtime/actsforresult/main/entry/src/main/ets/UIExtensionAbility/UIExtAbility.ts b/ability/ability_runtime/actsforresult/main/entry/src/main/ets/UIExtensionAbility/UIExtAbility.ts index 5077b2142fea071351412c8e73bbf16b21337510..eb7bcc3a7fd059465ba45417764d1377d447e9e1 100644 --- a/ability/ability_runtime/actsforresult/main/entry/src/main/ets/UIExtensionAbility/UIExtAbility.ts +++ b/ability/ability_runtime/actsforresult/main/entry/src/main/ets/UIExtensionAbility/UIExtAbility.ts @@ -1,3 +1,17 @@ +/* + * Copyright (c) 2023 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 UIExtensionAbility from '@ohos.app.ability.UIExtensionAbility' import wantConstant from '@ohos.app.ability.wantConstant'; import commonEvent from '@ohos.commonEventManager' diff --git a/ability/ability_runtime/actsforresult/main/entry/src/main/ets/calledability/CalledAbility.ts b/ability/ability_runtime/actsforresult/main/entry/src/main/ets/calledability/CalledAbility.ts index e3bfb57035e526cb574e9a5c53769519fb5134c1..9f97ec5448fcf591b73402a2ec635d2ee2e3dd02 100644 --- a/ability/ability_runtime/actsforresult/main/entry/src/main/ets/calledability/CalledAbility.ts +++ b/ability/ability_runtime/actsforresult/main/entry/src/main/ets/calledability/CalledAbility.ts @@ -1,3 +1,17 @@ +/* + * Copyright (c) 2023 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 UIAbility from '@ohos.app.ability.UIAbility'; import hilog from '@ohos.hilog'; import window from '@ohos.window'; diff --git a/ability/ability_runtime/actsforresult/main/entry/src/main/ets/entryability/EntryAbility.ts b/ability/ability_runtime/actsforresult/main/entry/src/main/ets/entryability/EntryAbility.ts index 0b26eecd350b5d3c36663c5c7a1ba1d8f6ae8b02..7b1d03ea7b6cabf027bf744a10249f6dd0367142 100644 --- a/ability/ability_runtime/actsforresult/main/entry/src/main/ets/entryability/EntryAbility.ts +++ b/ability/ability_runtime/actsforresult/main/entry/src/main/ets/entryability/EntryAbility.ts @@ -1,3 +1,17 @@ +/* + * Copyright (c) 2023 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 UIAbility from '@ohos.app.ability.UIAbility'; import hilog from '@ohos.hilog'; import window from '@ohos.window'; diff --git a/ability/ability_runtime/actsforresult/main/entry/src/main/ets/otherability/OtherAbility.ts b/ability/ability_runtime/actsforresult/main/entry/src/main/ets/otherability/OtherAbility.ts index c993acf1b6292c1448f79524102949790f8721ea..9fd141927ec5f2f6602a77089aaf4d5819bd960b 100644 --- a/ability/ability_runtime/actsforresult/main/entry/src/main/ets/otherability/OtherAbility.ts +++ b/ability/ability_runtime/actsforresult/main/entry/src/main/ets/otherability/OtherAbility.ts @@ -1,3 +1,17 @@ +/* + * Copyright (c) 2023 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 UIAbility from '@ohos.app.ability.UIAbility'; import hilog from '@ohos.hilog'; import window from '@ohos.window'; diff --git a/ability/ability_runtime/actsforresult/main/entry/src/main/ets/pages/Index.ets b/ability/ability_runtime/actsforresult/main/entry/src/main/ets/pages/Index.ets index c02d161f4ee653693541015d41b38f7ae23b1abb..11418454850e7b7b09c5bd8120e0eb4612fef44d 100644 --- a/ability/ability_runtime/actsforresult/main/entry/src/main/ets/pages/Index.ets +++ b/ability/ability_runtime/actsforresult/main/entry/src/main/ets/pages/Index.ets @@ -1,3 +1,17 @@ +/* + * Copyright (c) 2023 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 Want from '@ohos.app.ability.Want'; @Entry diff --git a/ability/ability_runtime/actsforresult/main/entry/src/main/ets/pages/IndexTwo.ets b/ability/ability_runtime/actsforresult/main/entry/src/main/ets/pages/IndexTwo.ets index 09365f2c018832552fc28fbbb9de02f478dec356..7efec842267037a9cbca70fb27f9e1861e8c033c 100644 --- a/ability/ability_runtime/actsforresult/main/entry/src/main/ets/pages/IndexTwo.ets +++ b/ability/ability_runtime/actsforresult/main/entry/src/main/ets/pages/IndexTwo.ets @@ -1,3 +1,17 @@ +/* + * Copyright (c) 2023 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 IndexTwo { diff --git a/ability/ability_runtime/actsforresult/main/entry/src/main/ets/pages/Page.ets b/ability/ability_runtime/actsforresult/main/entry/src/main/ets/pages/Page.ets index c4e2b58517cafd640f1026f7375735a59ef2370c..7627bf2f3070f641948fb592d123b2a4d8567091 100644 --- a/ability/ability_runtime/actsforresult/main/entry/src/main/ets/pages/Page.ets +++ b/ability/ability_runtime/actsforresult/main/entry/src/main/ets/pages/Page.ets @@ -1,3 +1,17 @@ +/* + * Copyright (c) 2023 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 Want from '@ohos.app.ability.Want'; import UIExtensionContentSession from '@ohos.app.ability.UIExtensionContentSession'; diff --git a/ability/ability_runtime/actsforresult/main/entry/src/main/ets/pages/PageTwo.ets b/ability/ability_runtime/actsforresult/main/entry/src/main/ets/pages/PageTwo.ets index fd9aed82f9682423744ffacacd75e00016a43e12..25043f944787f4eaef2628df7c444b2aa8238eb3 100644 --- a/ability/ability_runtime/actsforresult/main/entry/src/main/ets/pages/PageTwo.ets +++ b/ability/ability_runtime/actsforresult/main/entry/src/main/ets/pages/PageTwo.ets @@ -1,3 +1,17 @@ +/* + * Copyright (c) 2023 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 PageTwo { diff --git a/ability/ability_runtime/actsforresult/maintest/entry/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts b/ability/ability_runtime/actsforresult/maintest/entry/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts index 92a16d84e8870da219c51d9f1342c79203c1f42d..1abc4d63c5a2c02bff37b9d18c28395ce2ca44bb 100644 --- a/ability/ability_runtime/actsforresult/maintest/entry/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts +++ b/ability/ability_runtime/actsforresult/maintest/entry/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts @@ -1,3 +1,17 @@ +/* + * Copyright (c) 2023 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 hilog from '@ohos.hilog'; import TestRunner from '@ohos.application.testRunner'; import AbilityDelegatorRegistry from '@ohos.app.ability.abilityDelegatorRegistry'; diff --git a/ability/ability_runtime/actsforresult/maintest/entry/src/main/ets/test/Ability.test.ets b/ability/ability_runtime/actsforresult/maintest/entry/src/main/ets/test/Ability.test.ets index aa1908d419d92f0df64ee052fb12ca4b20c18800..5a2036c78c1379c4245c346fbc4adb3ea2544a92 100644 --- a/ability/ability_runtime/actsforresult/maintest/entry/src/main/ets/test/Ability.test.ets +++ b/ability/ability_runtime/actsforresult/maintest/entry/src/main/ets/test/Ability.test.ets @@ -1,12 +1,23 @@ +/* + * Copyright (c) 2023 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 hilog from '@ohos.hilog'; import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium' import commonEvent from '@ohos.commonEventManager' import abilityDelegatorRegistry from '@ohos.app.ability.abilityDelegatorRegistry'; import { Driver } from '@ohos.UiTest'; - - - let abilityDelegator = abilityDelegatorRegistry.getAbilityDelegator() var ACTS_CallFunction = { events: ['ACTS_CALL_EVENT', 'ACTS_CALL_EVENT_ANOTHER'] @@ -85,7 +96,6 @@ export default function abilityTest() { },(err) => { console.info('====>startAbility err:' + JSON.stringify(err)); }) - }) function subscribeCallBack(err, data) { @@ -108,7 +118,6 @@ export default function abilityTest() { done() }) }, 2000) - // done() } }) @@ -164,7 +173,6 @@ export default function abilityTest() { done() }) }, 1000) - // done() } }) @@ -400,17 +408,10 @@ export default function abilityTest() { function unSubscribeCallback() { console.info(`====>Promise_0200 unSubscribeCallback 'ACTS_CALL_EVENT'`) - // setTimeout(() => { abilityDelegator.executeShellCommand('aa force-stop com.example.forresulttestsecond').then(result =>{ console.info('====>Promise_0200 unSubscribeCallback pkill ok' + JSON.stringify(result)); done() }) - // .catch(err => { - // console.info('====>Promise_0200 unSubscribeCallback pkill ng' + JSON.stringify(err)); - // done() - // }) - // }, 2000) - // done() } }) @@ -450,7 +451,6 @@ export default function abilityTest() { console.info(`====>Promise_0300 subscribeCallBack 'ACTS_CALL_EVENT_ANOTHER' ${data}`) expect(data.parameters.str).assertEqual('ACTION'); expect(data.parameters.result).assertEqual(0); - } globalThis.terminate() abilityDelegator.executeShellCommand('aa force-stop com.example.forresulttestsecond').then(result =>{ @@ -498,7 +498,6 @@ export default function abilityTest() { console.info(`====>Promise_0400 subscribeCallBack all ${data.event}`) if(data.event == 'ACTS_CALL_EVENT') { console.info(`====>Promise_0400 subscribeCallBack 'ACTS_CALL_EVENT' ${data}`) - // expect(data.parameters.str).assertEqual('ACTION'); expect(data.parameters.result).assertEqual(-1); commonEvent.unsubscribe(subscriber, unSubscribeCallback) } @@ -535,7 +534,6 @@ export default function abilityTest() { console.info(`====>Promise_0500 subscribeCallBack all ${data.event}`) if(data.event == 'ACTS_CALL_EVENT') { console.info(`====>Promise_0500 subscribeCallBack 'ACTS_CALL_EVENT' ${data}`) - // expect(data.parameters.str).assertEqual('ACTION'); expect(data.parameters.result != 0).assertTrue(); commonEvent.unsubscribe(subscriber, unSubscribeCallback) } diff --git a/ability/ability_runtime/actsforresult/maintest/entry/src/main/ets/test/List.test.ets b/ability/ability_runtime/actsforresult/maintest/entry/src/main/ets/test/List.test.ets index d766fe249dfc3ada636f27e64d9b64451ce32c93..cb2e22661cde4c6c3e986a6718061d089e25fcd5 100644 --- a/ability/ability_runtime/actsforresult/maintest/entry/src/main/ets/test/List.test.ets +++ b/ability/ability_runtime/actsforresult/maintest/entry/src/main/ets/test/List.test.ets @@ -1,3 +1,17 @@ +/* + * Copyright (c) 2023 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' export default function testsuite() { diff --git a/ability/ability_runtime/actsforresult/maintest/entry/src/main/ets/testability/TestAbility.ets b/ability/ability_runtime/actsforresult/maintest/entry/src/main/ets/testability/TestAbility.ets index 8431ecde45be3b68d4f1e26721ea84519fb41089..023a7ed1014fc1a2b4b029b8d467b8a885405c25 100644 --- a/ability/ability_runtime/actsforresult/maintest/entry/src/main/ets/testability/TestAbility.ets +++ b/ability/ability_runtime/actsforresult/maintest/entry/src/main/ets/testability/TestAbility.ets @@ -1,3 +1,17 @@ +/* + * Copyright (c) 2023 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 UIAbility from '@ohos.app.ability.UIAbility'; import AbilityDelegatorRegistry from '@ohos.app.ability.abilityDelegatorRegistry'; import hilog from '@ohos.hilog'; diff --git a/ability/ability_runtime/actsforresult/maintest/entry/src/main/ets/testability/pages/Index.ets b/ability/ability_runtime/actsforresult/maintest/entry/src/main/ets/testability/pages/Index.ets index 247b183226fe9db721c0cab99c26c39cb9767f6d..0f2b6deeea936c3fb160ebb5d75b511554408287 100644 --- a/ability/ability_runtime/actsforresult/maintest/entry/src/main/ets/testability/pages/Index.ets +++ b/ability/ability_runtime/actsforresult/maintest/entry/src/main/ets/testability/pages/Index.ets @@ -1,3 +1,17 @@ +/* + * Copyright (c) 2023 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 hilog from '@ohos.hilog'; @Entry