Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
ecd0c185
X
Xts Acts
项目概览
OpenHarmony
/
Xts Acts
1 年多 前同步成功
通知
9
Star
22
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
X
Xts Acts
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
ecd0c185
编写于
8月 29, 2023
作者:
K
kirl75
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
“xts_系统api下库”
Signed-off-by:
N
kirl75
<
kirl.liu@huawei.com
>
上级
ef99c709
变更
36
显示空白变更内容
内联
并排
Showing
36 changed file
with
0 addition
and
1215 deletion
+0
-1215
ability/ability_runtime/BUILD.gn
ability/ability_runtime/BUILD.gn
+0
-1
ability/ability_runtime/non_concurrent/BUILD.gn
ability/ability_runtime/non_concurrent/BUILD.gn
+0
-24
ability/ability_runtime/non_concurrent/acts_systemappa_test/AppScope/app.json
...ime/non_concurrent/acts_systemappa_test/AppScope/app.json
+0
-21
ability/ability_runtime/non_concurrent/acts_systemappa_test/AppScope/resources/base/element/string.json
...stemappa_test/AppScope/resources/base/element/string.json
+0
-8
ability/ability_runtime/non_concurrent/acts_systemappa_test/AppScope/resources/base/media/app_icon.png
...ystemappa_test/AppScope/resources/base/media/app_icon.png
+0
-0
ability/ability_runtime/non_concurrent/acts_systemappa_test/BUILD.gn
...lity_runtime/non_concurrent/acts_systemappa_test/BUILD.gn
+0
-43
ability/ability_runtime/non_concurrent/acts_systemappa_test/Test.json
...ity_runtime/non_concurrent/acts_systemappa_test/Test.json
+0
-64
ability/ability_runtime/non_concurrent/acts_systemappa_test/entry/src/main/ets/Application/AbilityStage.ts
...mappa_test/entry/src/main/ets/Application/AbilityStage.ts
+0
-23
ability/ability_runtime/non_concurrent/acts_systemappa_test/entry/src/main/ets/MainAbility/MainAbility.ts
...emappa_test/entry/src/main/ets/MainAbility/MainAbility.ts
+0
-51
ability/ability_runtime/non_concurrent/acts_systemappa_test/entry/src/main/ets/MainAbility/pages/index/index.ets
...test/entry/src/main/ets/MainAbility/pages/index/index.ets
+0
-43
ability/ability_runtime/non_concurrent/acts_systemappa_test/entry/src/main/ets/MainAbility/pages/index/index2.ets
...est/entry/src/main/ets/MainAbility/pages/index/index2.ets
+0
-27
ability/ability_runtime/non_concurrent/acts_systemappa_test/entry/src/main/ets/MainAbility/pages/second/second.ets
...st/entry/src/main/ets/MainAbility/pages/second/second.ets
+0
-43
ability/ability_runtime/non_concurrent/acts_systemappa_test/entry/src/main/ets/MainAbility2/MainAbility2.ts
...appa_test/entry/src/main/ets/MainAbility2/MainAbility2.ts
+0
-57
ability/ability_runtime/non_concurrent/acts_systemappa_test/entry/src/main/ets/TestAbility/TestAbility.ts
...emappa_test/entry/src/main/ets/TestAbility/TestAbility.ts
+0
-50
ability/ability_runtime/non_concurrent/acts_systemappa_test/entry/src/main/ets/TestAbility/pages/index.ets
...mappa_test/entry/src/main/ets/TestAbility/pages/index.ets
+0
-48
ability/ability_runtime/non_concurrent/acts_systemappa_test/entry/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts
...st/entry/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts
+0
-78
ability/ability_runtime/non_concurrent/acts_systemappa_test/entry/src/main/ets/test/AbilityPermission.test.ets
...a_test/entry/src/main/ets/test/AbilityPermission.test.ets
+0
-195
ability/ability_runtime/non_concurrent/acts_systemappa_test/entry/src/main/ets/test/List.test.ets
...cts_systemappa_test/entry/src/main/ets/test/List.test.ets
+0
-19
ability/ability_runtime/non_concurrent/acts_systemappa_test/entry/src/main/module.json
...oncurrent/acts_systemappa_test/entry/src/main/module.json
+0
-67
ability/ability_runtime/non_concurrent/acts_systemappa_test/entry/src/main/resources/base/element/string.json
...pa_test/entry/src/main/resources/base/element/string.json
+0
-32
ability/ability_runtime/non_concurrent/acts_systemappa_test/entry/src/main/resources/base/media/icon.png
...temappa_test/entry/src/main/resources/base/media/icon.png
+0
-0
ability/ability_runtime/non_concurrent/acts_systemappa_test/entry/src/main/resources/base/profile/main_pages.json
...est/entry/src/main/resources/base/profile/main_pages.json
+0
-6
ability/ability_runtime/non_concurrent/acts_systemappa_test/signature/openharmony_sx.p7b
...current/acts_systemappa_test/signature/openharmony_sx.p7b
+0
-0
ability/ability_runtime/non_concurrent/acts_systemappone_rely_test/AppScope/app.json
..._concurrent/acts_systemappone_rely_test/AppScope/app.json
+0
-21
ability/ability_runtime/non_concurrent/acts_systemappone_rely_test/AppScope/resources/base/element/string.json
...one_rely_test/AppScope/resources/base/element/string.json
+0
-8
ability/ability_runtime/non_concurrent/acts_systemappone_rely_test/AppScope/resources/base/media/app_icon.png
...pone_rely_test/AppScope/resources/base/media/app_icon.png
+0
-0
ability/ability_runtime/non_concurrent/acts_systemappone_rely_test/BUILD.gn
...ntime/non_concurrent/acts_systemappone_rely_test/BUILD.gn
+0
-45
ability/ability_runtime/non_concurrent/acts_systemappone_rely_test/entry/src/main/ets/Application/AbilityStage.ts
..._rely_test/entry/src/main/ets/Application/AbilityStage.ts
+0
-23
ability/ability_runtime/non_concurrent/acts_systemappone_rely_test/entry/src/main/ets/MainAbility/MainAbility.ts
...e_rely_test/entry/src/main/ets/MainAbility/MainAbility.ts
+0
-59
ability/ability_runtime/non_concurrent/acts_systemappone_rely_test/entry/src/main/ets/pages/index/index.ets
...appone_rely_test/entry/src/main/ets/pages/index/index.ets
+0
-40
ability/ability_runtime/non_concurrent/acts_systemappone_rely_test/entry/src/main/ets/pages/second/second.ets
...pone_rely_test/entry/src/main/ets/pages/second/second.ets
+0
-43
ability/ability_runtime/non_concurrent/acts_systemappone_rely_test/entry/src/main/module.json
...nt/acts_systemappone_rely_test/entry/src/main/module.json
+0
-38
ability/ability_runtime/non_concurrent/acts_systemappone_rely_test/entry/src/main/resources/base/element/string.json
...ly_test/entry/src/main/resources/base/element/string.json
+0
-32
ability/ability_runtime/non_concurrent/acts_systemappone_rely_test/entry/src/main/resources/base/media/icon.png
...ne_rely_test/entry/src/main/resources/base/media/icon.png
+0
-0
ability/ability_runtime/non_concurrent/acts_systemappone_rely_test/entry/src/main/resources/base/profile/main_pages.json
...est/entry/src/main/resources/base/profile/main_pages.json
+0
-6
ability/ability_runtime/non_concurrent/acts_systemappone_rely_test/signature/openharmony_sx.p7b
.../acts_systemappone_rely_test/signature/openharmony_sx.p7b
+0
-0
未找到文件。
ability/ability_runtime/BUILD.gn
浏览文件 @
ecd0c185
...
@@ -59,7 +59,6 @@ group("ability_runtime") {
...
@@ -59,7 +59,6 @@ group("ability_runtime") {
"freeinstalltest:freeinstalltest",
"freeinstalltest:freeinstalltest",
"getrunningprocessinformation:getrunningprocessinformation",
"getrunningprocessinformation:getrunningprocessinformation",
"newwant:newwant",
"newwant:newwant",
"non_concurrent:non_concurrent",
"registerjserror:registerjserror",
"registerjserror:registerjserror",
"shareextensionability:actsshareextensionability",
"shareextensionability:actsshareextensionability",
"stage:stage",
"stage:stage",
...
...
ability/ability_runtime/non_concurrent/BUILD.gn
已删除
100644 → 0
浏览文件 @
ef99c709
# 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("non_concurrent") {
testonly = true
if (is_standard_system) {
deps = [
"acts_systemappa_test:ActsSystemAppATest",
"acts_systemappone_rely_test:ActsSystemAppOneRelyHap",
]
}
}
ability/ability_runtime/non_concurrent/acts_systemappa_test/AppScope/app.json
已删除
100644 → 0
浏览文件 @
ef99c709
{
"app"
:
{
"bundleName"
:
"com.acts.abilitypermissiontest"
,
"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
ability/ability_runtime/non_concurrent/acts_systemappa_test/AppScope/resources/base/element/string.json
已删除
100644 → 0
浏览文件 @
ef99c709
{
"string"
:
[
{
"name"
:
"app_name"
,
"value"
:
"ohosProject"
}
]
}
ability/ability_runtime/non_concurrent/acts_systemappa_test/AppScope/resources/base/media/app_icon.png
已删除
100644 → 0
浏览文件 @
ef99c709
6.6 KB
ability/ability_runtime/non_concurrent/acts_systemappa_test/BUILD.gn
已删除
100644 → 0
浏览文件 @
ef99c709
# 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("ActsSystemAppATest") {
hap_profile = "entry/src/main/module.json"
js_build_mode = "debug"
deps = [
":actssystemappatest_js_assets",
":actssystemappatest_resources",
]
ets2abc = true
certificate_profile = "signature/openharmony_sx.p7b"
hap_name = "ActsSystemAppATest"
subsystem_name = "ability"
part_name = "ability_runtime"
}
ohos_app_scope("actssystemappatest_app_profile") {
app_profile = "AppScope/app.json"
sources = [ "AppScope/resources" ]
}
ohos_js_assets("actssystemappatest_js_assets") {
source_dir = "entry/src/main/ets"
}
ohos_resources("actssystemappatest_resources") {
sources = [ "entry/src/main/resources" ]
deps = [ ":actssystemappatest_app_profile" ]
hap_profile = "entry/src/main/module.json"
}
ability/ability_runtime/non_concurrent/acts_systemappa_test/Test.json
已删除
100644 → 0
浏览文件 @
ef99c709
{
"description"
:
"Configuration for hjunit demo Tests"
,
"driver"
:
{
"type"
:
"OHJSUnitTest"
,
"test-timeout"
:
"300000"
,
"bundle-name"
:
"com.acts.abilitypermissiontest"
,
"module-name"
:
"com.acts.abilitypermissiontest"
,
"shell-timeout"
:
"600000"
,
"testcase-timeout"
:
70000
},
"kits"
:
[
{
"test-file-name"
:
[
"ActsSystemAppATest.hap"
],
"type"
:
"AppInstallKit"
,
"cleanup-apps"
:
true
},
{
"type"
:
"ShellKit"
,
"run-command"
:
[
"remount"
]
},
{
"type"
:
"PushKit"
,
"push"
:
[
"ActsSystemAppATest.hap->/system/app/ActsSystemAppATest.hap"
]
},
{
"type"
:
"ShellKit"
,
"run-command"
:
[
"acm create -n 101 -t normal"
,
"acm switch -i 101"
]
},
{
"type"
:
"PushKit"
,
"push"
:
[
"ActsSystemAppOneRelyHap.hap->/system/app/ActsSystemAppOneRelyHap.hap"
]
},
{
"test-file-name"
:
[
"ActsSystemAppOneRelyHap.hap"
],
"type"
:
"AppInstallKit"
,
"cleanup-apps"
:
true
},
{
"type"
:
"ShellKit"
,
"run-command"
:
[
"acm switch -i 100"
]
},
{
"type"
:
"ShellKit"
,
"run-command"
:
[
"chmod 644 /data/*.hap"
]
}
]
}
\ No newline at end of file
ability/ability_runtime/non_concurrent/acts_systemappa_test/entry/src/main/ets/Application/AbilityStage.ts
已删除
100644 → 0
浏览文件 @
ef99c709
/*
* 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.app.ability.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
ability/ability_runtime/non_concurrent/acts_systemappa_test/entry/src/main/ets/MainAbility/MainAbility.ts
已删除
100644 → 0
浏览文件 @
ef99c709
/*
* 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.app.ability.UIAbility
'
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
"
)
}
};
ability/ability_runtime/non_concurrent/acts_systemappa_test/entry/src/main/ets/MainAbility/pages/index/index.ets
已删除
100644 → 0
浏览文件 @
ef99c709
/*
* 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)
}
.width('100%')
.height('100%')
}
}
\ No newline at end of file
ability/ability_runtime/non_concurrent/acts_systemappa_test/entry/src/main/ets/MainAbility/pages/index/index2.ets
已删除
100644 → 0
浏览文件 @
ef99c709
/*
* 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('页面2')
.fontSize(50)
.fontWeight(FontWeight.Bold)
}
.width('100%')
.height('100%')
}
}
\ No newline at end of file
ability/ability_runtime/non_concurrent/acts_systemappa_test/entry/src/main/ets/MainAbility/pages/second/second.ets
已删除
100644 → 0
浏览文件 @
ef99c709
/*
* 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
ability/ability_runtime/non_concurrent/acts_systemappa_test/entry/src/main/ets/MainAbility2/MainAbility2.ts
已删除
100644 → 0
浏览文件 @
ef99c709
/*
* 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.app.ability.UIAbility
'
import
commonEvent
from
'
@ohos.commonEvent
'
function
PublishCallBackOne1
()
{
console
.
debug
(
"
====>Publish CallBack ACTS_ThirdPartyAbilityPermission_0100_CommonEvent====>
"
);
globalThis
.
ability2Context
.
terminateSelf
();
console
.
debug
(
"
====>close this context====>
"
)
}
export
default
class
MainAbility2
extends
Ability
{
onCreate
(
want
,
launchParam
)
{
console
.
log
(
"
MainAbility2 onCreate
"
)
}
onDestroy
()
{
// Ability is destroying, release resources for this ability
console
.
log
(
"
MainAbility2 onDestroy
"
)
}
onWindowStageCreate
(
windowStage
)
{
// Main window is created, set main page for this ability
console
.
log
(
"
MainAbility2 onWindowStageCreate
"
)
windowStage
.
setUIContent
(
this
.
context
,
"
MainAbility/pages/index/index2
"
,
null
)
globalThis
.
ability2Context
=
this
.
context
;
commonEvent
.
publish
(
"
ACTS_AbilityPermission_0100_Start_CommonEvent
"
,
PublishCallBackOne1
);
}
onWindowStageDestroy
()
{
// Main window is destroyed, release UI related resources
console
.
log
(
"
MainAbility2 onWindowStageDestroy
"
)
}
onForeground
()
{
// Ability has brought to foreground
console
.
log
(
"
MainAbility2 onForeground
"
)
}
onBackground
()
{
// Ability has back to background
console
.
log
(
"
MainAbility2 onBackground
"
)
}
};
ability/ability_runtime/non_concurrent/acts_systemappa_test/entry/src/main/ets/TestAbility/TestAbility.ts
已删除
100644 → 0
浏览文件 @
ef99c709
/*
* 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.app.ability.UIAbility
'
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
ability/ability_runtime/non_concurrent/acts_systemappa_test/entry/src/main/ets/TestAbility/pages/index.ets
已删除
100644 → 0
浏览文件 @
ef99c709
/*
* 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
ability/ability_runtime/non_concurrent/acts_systemappa_test/entry/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts
已删除
100644 → 0
浏览文件 @
ef99c709
/*
* 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.abilitypermissiontest.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
ability/ability_runtime/non_concurrent/acts_systemappa_test/entry/src/main/ets/test/AbilityPermission.test.ets
已删除
100644 → 0
浏览文件 @
ef99c709
/*
* 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 osaccount from '@ohos.account.osAccount'
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from "@ohos/hypium"
import commonEvent from '@ohos.commonEvent'
var AbilityPermission1 = {
events: ["ACTS_AbilityPermission_0100_Start_CommonEvent"]
}
var AbilityPermission3 = {
events: ["ACTS_AbilityPermission_0300_Start_CommonEvent"]
}
var AbilityPermission6 = {
events: ["ACTS_AbilityPermission_0600_Start_CommonEvent"]
}
const START_ABILITY_TIMEOUT = 3000;
export default function abilityPermissionTest() {
describe('ActsAbilityPermissionTest', function () {
var osAccountManager = osaccount.getAccountManager();
var userA;
var userB;
beforeAll(async function(done){
osAccountManager.getOsAccountLocalIdFromProcess().then((data)=>{
userA = data
userB=userA+1
console.log("userA=====>"+userA)
done()
});
})
afterAll(async function(done){
await osAccountManager.removeOsAccount(userB, (err)=>{
console.debug("====>remove localId: " + userB + " err:" + JSON.stringify(err));
expect(err.code).assertEqual(0);
done();
})
})
/*
* @tc.number: ACTS_AbilityPermission_0100
* @tc.name: In non-concurrent mode, if the target application is not the current user, it is forbidden to start
* @tc.desc: Start an ability that belongs to the current user with the current user
*/
it('ACTS_AbilityPermission_0100', 0, async function (done) {
console.log("ACTS_AbilityPermission_0100====>callback start====>")
var Subscriber;
var flag = true;
function SubscribeCallBack(err, data) {
console.debug("ACTS_AbilityPermission_0100====>Subscribe CallBack data:====>" + JSON.stringify(data));
expect(data.event == 'ACTS_AbilityPermission_0100_Start_CommonEvent').assertTrue()
commonEvent.unsubscribe(Subscriber, UnSubscribeCallback);
}
commonEvent.createSubscriber(AbilityPermission1).then(async (data) => {
console.debug("ACTS_AbilityPermission_0100====>Create Subscriber====>");
Subscriber = data;
commonEvent.subscribe(Subscriber, SubscribeCallBack);
console.debug("====>start startAbility_100====>");
await globalThis.abilityContext.startAbilityWithAccount(
{
bundleName: 'com.acts.abilitypermissiontest',
abilityName: 'com.acts.abilitypermissiontest.MainAbility2'
}, userA, () => {
console.debug("====>startAbility end_100====>");
})
})
function UnSubscribeCallback() {
flag = false
console.debug("ACTS_AbilityPermission_0100====>UnSubscribe CallBack====>"+flag);
done();
}
setTimeout(()=>{
if (flag == true) {
expect().assertFail();
console.debug('in ACTS_AbilityPermission_0100====>timeout====>'+flag);
commonEvent.unsubscribe(Subscriber, UnSubscribeCallback)
}
console.debug('ACTS_AbilityPermission_0100====>timeout====>');
}, START_ABILITY_TIMEOUT);
})
/*
* @tc.number: ACTS_AbilityPermission_0300
* @tc.name: In non-concurrent mode, if the target application is not the current user, it is forbidden to start
* @tc.desc: Start an ability under user U101 with the current user
*/
it('ACTS_AbilityPermission_0300', 0, async function (done) {
console.log("ACTS_AbilityPermission_0300====>callback start====>")
var Subscriber
var flag = 0;
console.debug("====>get AccountManager finish====");
function SubscribeCallBack(err, data) {
console.debug("ACTS_AbilityPermission_0300====>Subscribe CallBack data:====>" + JSON.stringify(data));
expect(data.event == 'ACTS_AbilityPermission_0300_Start_CommonEvent').assertTrue()
commonEvent.unsubscribe(Subscriber, UnSubscribeCallback)
}
commonEvent.createSubscriber(AbilityPermission3).then(async (data) => {
console.debug("ACTS_AbilityPermission_0300====>Create Subscriber====>");
Subscriber = data;
commonEvent.subscribe(Subscriber, SubscribeCallBack);
console.debug("====>start startAbility_0300====>");
await globalThis.abilityContext.startAbilityWithAccount(
{
bundleName: 'com.acts.systemapponerely',
abilityName: 'com.acts.systemapponerely.MainAbility'
}, userA ).then().catch((err) => {
console.debug("ACTS_AbilityPermission_0300====>" + err)
console.debug("====>startAbility end_0300====>");
})
})
function UnSubscribeCallback() {
if(flag == 0) {
expect().assertFail();
}
console.debug("ACTS_AbilityPermission_0300====>UnSubscribe CallBack====>");
done();
}
function timeout() {
console.debug('ACTS_AbilityPermission_0300====>timeout====>');
if(flag == 0){
flag = 1;
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
* @tc.desc: Bind a U101 Ability with the current user
*/
it('ACTS_AbilityPermission_0600', 0, async function (done) {
console.log("ACTS_AbilityPermission_0600====>callback start====>")
let Subscriber
let connId
function onConnectCallbackC(element, remote) {
console.log('ACTS_AbilityPermission_0600_Start_CommonEvent onConnectCallback====> element=' + JSON.stringify(element));
console.log('ACTS_AbilityPermission_0600_Start_CommonEvent onConnectCallback====> remote=' + JSON.stringify(remote));
expect().assertFail();
}
function onDisconnectCallbackC(element) {
console.log('onDisconnectCallback====> element=' + JSON.stringify(element));
}
function onFailedCallbackC(code) {
console.log('onFailedCallback====> code=' + JSON.stringify(code))
}
function SubscribeCallBackF(err, data) {
console.debug("====>0600 Subscribe CallBack data:====>" + JSON.stringify(data));
}
function UnSubscribeCallbackF() {
console.debug("====>UnSubscribeCallback====>");
}
commonEvent.createSubscriber(AbilityPermission6).then(async (data) => {
console.debug("====>Create Subscriber====>");
Subscriber = data;
commonEvent.subscribe(Subscriber, SubscribeCallBackF);
})
console.debug("====>0600start connectAbility====>");
connId = await globalThis.abilityContext.connectAbilityWithAccount(
{
bundleName: 'com.acts.systemapponerely',
abilityName: 'com.acts.systemapponerely.ServiceAbility',
action: "StartAbilityPromise"
}, userA, {
onConnect: onConnectCallbackC,
onDisconnect: onDisconnectCallbackC,
onFailed: onFailedCallbackC
})
console.debug("====>number is====>" + JSON.stringify(connId));
setTimeout(() =>{
console.debug('in ACTS_AbilityPermission_0600_Start_CommonEvent timeout');
commonEvent.unsubscribe(Subscriber, UnSubscribeCallbackF)
done()
}, START_ABILITY_TIMEOUT);
})
})
}
\ No newline at end of file
ability/ability_runtime/non_concurrent/acts_systemappa_test/entry/src/main/ets/test/List.test.ets
已删除
100644 → 0
浏览文件 @
ef99c709
/*
* 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 abilityPermissionText from './AbilityPermission.test.ets'
export default function testsuite() {
abilityPermissionText()
}
\ No newline at end of file
ability/ability_runtime/non_concurrent/acts_systemappa_test/entry/src/main/module.json
已删除
100644 → 0
浏览文件 @
ef99c709
{
"module"
:
{
"name"
:
"com.acts.abilitypermissiontest"
,
"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.abilitypermissiontest.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.abilitypermissiontest.MainAbility2"
,
"srcEntrance"
:
"./ets/MainAbility2/MainAbility2.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"
]
}
]
}
],
"requestPermissions"
:
[
{
"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"
}
]
}
}
ability/ability_runtime/non_concurrent/acts_systemappa_test/entry/src/main/resources/base/element/string.json
已删除
100644 → 0
浏览文件 @
ef99c709
{
"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
ability/ability_runtime/non_concurrent/acts_systemappa_test/entry/src/main/resources/base/media/icon.png
已删除
100644 → 0
浏览文件 @
ef99c709
6.6 KB
ability/ability_runtime/non_concurrent/acts_systemappa_test/entry/src/main/resources/base/profile/main_pages.json
已删除
100644 → 0
浏览文件 @
ef99c709
{
"src"
:
[
"MainAbility/pages/index/index"
,
"MainAbility/pages/second/second"
]
}
\ No newline at end of file
ability/ability_runtime/non_concurrent/acts_systemappa_test/signature/openharmony_sx.p7b
已删除
100755 → 0
浏览文件 @
ef99c709
文件已删除
ability/ability_runtime/non_concurrent/acts_systemappone_rely_test/AppScope/app.json
已删除
100644 → 0
浏览文件 @
ef99c709
{
"app"
:
{
"bundleName"
:
"com.acts.pmvendorappa"
,
"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
ability/ability_runtime/non_concurrent/acts_systemappone_rely_test/AppScope/resources/base/element/string.json
已删除
100644 → 0
浏览文件 @
ef99c709
{
"string"
:
[
{
"name"
:
"app_name"
,
"value"
:
"ohosProject"
}
]
}
ability/ability_runtime/non_concurrent/acts_systemappone_rely_test/AppScope/resources/base/media/app_icon.png
已删除
100644 → 0
浏览文件 @
ef99c709
6.6 KB
ability/ability_runtime/non_concurrent/acts_systemappone_rely_test/BUILD.gn
已删除
100644 → 0
浏览文件 @
ef99c709
# 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("ActsSystemAppOneRelyHap") {
hap_profile = "entry/src/main/module.json"
js_build_mode = "debug"
hap_name = "ActsSystemAppOneRelyHap"
testonly = true
deps = [
":acts_systemappone_rely_test_js_assets",
":acts_systemappone_rely_test_resources",
]
ets2abc = true
certificate_profile = "signature/openharmony_sx.p7b"
subsystem_name = "ability"
part_name = "ability_runtime"
}
ohos_app_scope("acts_systemappone_rely_test_app_profile") {
app_profile = "AppScope/app.json"
sources = [ "AppScope/resources" ]
}
ohos_js_assets("acts_systemappone_rely_test_js_assets") {
source_dir = "entry/src/main/ets"
}
ohos_resources("acts_systemappone_rely_test_resources") {
sources = [ "entry/src/main/resources" ]
deps = [ ":acts_systemappone_rely_test_app_profile" ]
hap_profile = "entry/src/main/module.json"
}
ability/ability_runtime/non_concurrent/acts_systemappone_rely_test/entry/src/main/ets/Application/AbilityStage.ts
已删除
100644 → 0
浏览文件 @
ef99c709
/*
* 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.app.ability.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
ability/ability_runtime/non_concurrent/acts_systemappone_rely_test/entry/src/main/ets/MainAbility/MainAbility.ts
已删除
100644 → 0
浏览文件 @
ef99c709
/*
* 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.app.ability.UIAbility
'
import
commonEvent
from
'
@ohos.commonEvent
'
function
PublishCallBackOne3
()
{
console
.
debug
(
"
====>Publish CallBack ACTS_StartAbility_0300_CommonEvent====>
"
);
setTimeout
(
globalThis
.
abilityContext
.
terminateSelfWithResult
(()
=>
{
console
.
debug
(
"
====>terminateSelfWithResult succese====>
"
)
}),
1000
)
}
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
commonEvent
.
publish
(
"
ACTS_AbilityPermission_0300_Start_CommonEvent
"
,
PublishCallBackOne3
);
windowStage
.
setUIContent
(
this
.
context
,
"
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
"
)
}
};
ability/ability_runtime/non_concurrent/acts_systemappone_rely_test/entry/src/main/ets/pages/index/index.ets
已删除
100644 → 0
浏览文件 @
ef99c709
/*
* 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
)
}
.
width
(
'100%'
)
.
height
(
'100%'
)
}
}
\ No newline at end of file
ability/ability_runtime/non_concurrent/acts_systemappone_rely_test/entry/src/main/ets/pages/second/second.ets
已删除
100644 → 0
浏览文件 @
ef99c709
/*
* 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
ability/ability_runtime/non_concurrent/acts_systemappone_rely_test/entry/src/main/module.json
已删除
100644 → 0
浏览文件 @
ef99c709
{
"module"
:
{
"name"
:
"com.acts.systemapponerely"
,
"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.systemapponerely.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"
]
}
]
}
]
}
}
ability/ability_runtime/non_concurrent/acts_systemappone_rely_test/entry/src/main/resources/base/element/string.json
已删除
100644 → 0
浏览文件 @
ef99c709
{
"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
ability/ability_runtime/non_concurrent/acts_systemappone_rely_test/entry/src/main/resources/base/media/icon.png
已删除
100644 → 0
浏览文件 @
ef99c709
6.6 KB
ability/ability_runtime/non_concurrent/acts_systemappone_rely_test/entry/src/main/resources/base/profile/main_pages.json
已删除
100644 → 0
浏览文件 @
ef99c709
{
"src"
:
[
"pages/index/index"
,
"pages/second/second"
]
}
\ No newline at end of file
ability/ability_runtime/non_concurrent/acts_systemappone_rely_test/signature/openharmony_sx.p7b
已删除
100755 → 0
浏览文件 @
ef99c709
文件已删除
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录