Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
6b8be82e
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看板
提交
6b8be82e
编写于
12月 18, 2021
作者:
Z
zhaoyuan17
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Update bms xts code
Signed-off-by:
N
zhaoyuan17
<
zhaoyuan17@huawei.com
>
上级
6c74adb6
变更
47
隐藏空白更改
内联
并排
Showing
47 changed file
with
971 addition
and
106 deletion
+971
-106
appexecfwk/bundle_standard/bundlemanager/BUILD.gn
appexecfwk/bundle_standard/bundlemanager/BUILD.gn
+3
-0
appexecfwk/bundle_standard/bundlemanager/actsbmsgetinfostest/Test.json
...ndle_standard/bundlemanager/actsbmsgetinfostest/Test.json
+5
-2
appexecfwk/bundle_standard/bundlemanager/actsbmsgetinfostest/entry/src/main/js/test/ActsBmsGetBackGroundModes.test.js
.../entry/src/main/js/test/ActsBmsGetBackGroundModes.test.js
+186
-39
appexecfwk/bundle_standard/bundlemanager/actsbmsjstest/entry/src/main/js/test/ActsBmsJsTest.test.js
...ctsbmsjstest/entry/src/main/js/test/ActsBmsJsTest.test.js
+6
-4
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosfifthscene/src/main/config.json
...r/sceneProject/bmsgetinfosfifthscene/src/main/config.json
+55
-15
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosfirstscene/src/main/config.json
...r/sceneProject/bmsgetinfosfirstscene/src/main/config.json
+40
-11
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosfirstsceneupdate/src/main/config.json
...eProject/bmsgetinfosfirstsceneupdate/src/main/config.json
+28
-9
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystem/src/main/config.json
.../sceneProject/bmsgetinfosscenesystem/src/main/config.json
+1
-4
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemfeature/BUILD.gn
...nager/sceneProject/bmsgetinfosscenesystemfeature/BUILD.gn
+34
-0
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemfeature/Test.json
...ager/sceneProject/bmsgetinfosscenesystemfeature/Test.json
+3
-0
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemfeature/signature/openharmony_sx.p7b
...msgetinfosscenesystemfeature/signature/openharmony_sx.p7b
+0
-0
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemfeature/src/main/config.json
...roject/bmsgetinfosscenesystemfeature/src/main/config.json
+66
-0
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemfeature/src/main/js/default/app.js
.../bmsgetinfosscenesystemfeature/src/main/js/default/app.js
+22
-0
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemfeature/src/main/js/default/i18n/en-US.json
...fosscenesystemfeature/src/main/js/default/i18n/en-US.json
+6
-0
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemfeature/src/main/js/default/i18n/zh-CN.json
...fosscenesystemfeature/src/main/js/default/i18n/zh-CN.json
+6
-0
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemfeature/src/main/js/default/pages/index/index.css
...nesystemfeature/src/main/js/default/pages/index/index.css
+9
-0
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemfeature/src/main/js/default/pages/index/index.hml
...nesystemfeature/src/main/js/default/pages/index/index.hml
+5
-0
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemfeature/src/main/js/default/pages/index/index.js
...enesystemfeature/src/main/js/default/pages/index/index.js
+25
-0
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemfeature/src/main/js/resources/base/element/string.json
...temfeature/src/main/js/resources/base/element/string.json
+16
-0
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemfeature/src/main/js/resources/base/media/icon.png
...nesystemfeature/src/main/js/resources/base/media/icon.png
+0
-0
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemtwo/BUILD.gn
...lemanager/sceneProject/bmsgetinfosscenesystemtwo/BUILD.gn
+34
-0
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemtwo/Test.json
...emanager/sceneProject/bmsgetinfosscenesystemtwo/Test.json
+3
-0
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemtwo/signature/openharmony_sx.p7b
...ct/bmsgetinfosscenesystemtwo/signature/openharmony_sx.p7b
+0
-0
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemtwo/src/main/config.json
...eneProject/bmsgetinfosscenesystemtwo/src/main/config.json
+66
-0
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemtwo/src/main/js/default/app.js
...ject/bmsgetinfosscenesystemtwo/src/main/js/default/app.js
+22
-0
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemtwo/src/main/js/default/i18n/en-US.json
...etinfosscenesystemtwo/src/main/js/default/i18n/en-US.json
+6
-0
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemtwo/src/main/js/default/i18n/zh-CN.json
...etinfosscenesystemtwo/src/main/js/default/i18n/zh-CN.json
+6
-0
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemtwo/src/main/js/default/pages/index/index.css
...sscenesystemtwo/src/main/js/default/pages/index/index.css
+9
-0
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemtwo/src/main/js/default/pages/index/index.hml
...sscenesystemtwo/src/main/js/default/pages/index/index.hml
+5
-0
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemtwo/src/main/js/default/pages/index/index.js
...osscenesystemtwo/src/main/js/default/pages/index/index.js
+25
-0
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemtwo/src/main/js/resources/base/element/string.json
...esystemtwo/src/main/js/resources/base/element/string.json
+16
-0
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemtwo/src/main/js/resources/base/media/icon.png
...sscenesystemtwo/src/main/js/resources/base/media/icon.png
+0
-0
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemupdate/BUILD.gn
...anager/sceneProject/bmsgetinfosscenesystemupdate/BUILD.gn
+34
-0
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemupdate/Test.json
...nager/sceneProject/bmsgetinfosscenesystemupdate/Test.json
+3
-0
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemupdate/signature/openharmony_sx.p7b
...bmsgetinfosscenesystemupdate/signature/openharmony_sx.p7b
+0
-0
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemupdate/src/main/config.json
...Project/bmsgetinfosscenesystemupdate/src/main/config.json
+66
-0
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemupdate/src/main/js/default/app.js
...t/bmsgetinfosscenesystemupdate/src/main/js/default/app.js
+22
-0
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemupdate/src/main/js/default/i18n/en-US.json
...nfosscenesystemupdate/src/main/js/default/i18n/en-US.json
+6
-0
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemupdate/src/main/js/default/i18n/zh-CN.json
...nfosscenesystemupdate/src/main/js/default/i18n/zh-CN.json
+6
-0
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemupdate/src/main/js/default/pages/index/index.css
...enesystemupdate/src/main/js/default/pages/index/index.css
+9
-0
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemupdate/src/main/js/default/pages/index/index.hml
...enesystemupdate/src/main/js/default/pages/index/index.hml
+5
-0
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemupdate/src/main/js/default/pages/index/index.js
...cenesystemupdate/src/main/js/default/pages/index/index.js
+25
-0
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemupdate/src/main/js/resources/base/element/string.json
...stemupdate/src/main/js/resources/base/element/string.json
+16
-0
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemupdate/src/main/js/resources/base/media/icon.png
...enesystemupdate/src/main/js/resources/base/media/icon.png
+0
-0
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfossecondscene/src/main/config.json
.../sceneProject/bmsgetinfossecondscene/src/main/config.json
+22
-2
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfossixthscene/src/main/config.json
...r/sceneProject/bmsgetinfossixthscene/src/main/config.json
+9
-9
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosthirdscene/src/main/config.json
...r/sceneProject/bmsgetinfosthirdscene/src/main/config.json
+40
-11
未找到文件。
appexecfwk/bundle_standard/bundlemanager/BUILD.gn
浏览文件 @
6b8be82e
...
...
@@ -39,6 +39,9 @@ group("bundlemanager") {
"sceneProject/bmsgetinfoshapc:bmsThirdBundleC",
"sceneProject/bmsgetinfosjsscene:bmsThirdBundleJs",
"sceneProject/bmsgetinfosscenesystem:bmsSystemBundleTest1",
"sceneProject/bmsgetinfosscenesystemfeature:bmsSystemBundleTest2Feature",
"sceneProject/bmsgetinfosscenesystemtwo:bmsSystemBundleTest2",
"sceneProject/bmsgetinfosscenesystemupdate:bmsSystemBundleTest2Update",
"sceneProject/bmsgetinfosscenevendor:bmsVendorBundleTest1",
"sceneProject/bmsgetinfossecondscene:bmsThirdBundleTest2",
"sceneProject/bmsgetinfossixthscene:bmsThirdBundleTest6",
...
...
appexecfwk/bundle_standard/bundlemanager/actsbmsgetinfostest/Test.json
浏览文件 @
6b8be82e
...
...
@@ -32,7 +32,10 @@
"bmsThirdBundleTest4.hap->/data/test/bmsThirdBundleTest4.hap"
,
"bmsThirdBundleTest5.hap->/data/test/bmsThirdBundleTest5.hap"
,
"bmsThirdBundleTest6.hap->/data/test/bmsThirdBundleTest6.hap"
,
"bmsThirdBundleTestA1.hap->/data/test/bmsThirdBundleTestA1.hap"
"bmsThirdBundleTestA1.hap->/data/test/bmsThirdBundleTestA1.hap"
,
"bmsSystemBundleTest2.hap->/data/test/bmsSystemBundleTest2.hap"
,
"bmsSystemBundleTest2Feature.hap->/data/test/bmsSystemBundleTest2Feature.hap"
,
"bmsSystemBundleTest2Update.hap->/data/test/bmsSystemBundleTest2Update.hap"
]
},
{
...
...
@@ -42,4 +45,4 @@
]
}
]
}
}
\ No newline at end of file
appexecfwk/bundle_standard/bundlemanager/actsbmsgetinfostest/entry/src/main/js/test/ActsBmsGetBackGroundModes.test.js
浏览文件 @
6b8be82e
...
...
@@ -23,12 +23,18 @@ const BUNDLE_PATH4 = '/data/test/bmsThirdBundleTest4.hap';
const
BUNDLE_PATH5
=
'
/data/test/bmsThirdBundleTest5.hap
'
;
const
BUNDLE_PATH6
=
'
/data/test/bmsThirdBundleTest6.hap
'
;
const
BUNDLE_PATHUPDATE
=
'
/data/test/bmsThirdBundleTestA1.hap
'
;
const
SYSTEM_PATH
=
'
/data/test/bmsSystemBundleTest2.hap
'
;
const
SYSTEM_FEATURE_PATH
=
'
/data/test/bmsSystemBundleTest2Feature.hap
'
;
const
SYSTEM_UPDATE_PATH
=
'
/data/test/bmsSystemBundleTest2Update.hap
'
;
const
BUNDLE_NAME1
=
'
com.example.third1
'
;
const
BUNDLE_NAME2
=
'
com.example.third2
'
;
const
BUNDLE_NAME4
=
'
com.example.third4
'
;
const
BUNDLE_NAME5
=
'
com.example.third5
'
;
const
BUNDLE_NAME6
=
'
com.example.third6
'
;
const
SYSTEM_NAME
=
'
com.example.system2
'
;
const
NUM_TWO
=
2
;
const
NUM_THREE
=
3
;
const
NUM_FOUR
=
4
;
const
NUM_NINE
=
9
;
let
dataTransfer
=
1
;
let
audioPlayback
=
2
;
...
...
@@ -68,17 +74,17 @@ describe('ActsBmsGetBackGroundModes', function () {
elementName
:
{
deviceId
:
'
0
'
,
bundleName
:
BUNDLE_NAME5
,
abilityName
:
'
com.example.third5.
AMainAbility
'
,
abilityName
:
'
com.example.third5.
MainAbilityA
'
,
},
}
},
0
,
0
)
expect
(
dataInfos
.
length
).
assertEqual
(
NUM_
TWO
);
if
(
dataInfos
.
length
==
NUM_
TWO
)
{
expect
(
dataInfos
[
0
].
name
).
assertEqual
(
"
com.example.third5.AMainAbility
"
);
expect
(
dataInfos
[
0
].
backgroundModes
).
assertEqual
(
dataTransfer
+
audioPlayback
+
audioRecording
+
expect
(
dataInfos
.
length
).
assertEqual
(
NUM_
FOUR
);
if
(
dataInfos
.
length
==
NUM_
FOUR
)
{
expect
(
dataInfos
[
NUM_TWO
].
name
).
assertEqual
(
"
com.example.third5.MainAbilityA
"
);
expect
(
dataInfos
[
NUM_TWO
].
backgroundModes
).
assertEqual
(
dataTransfer
+
audioPlayback
+
audioRecording
+
location
+
bluetoothInteraction
+
multiDeviceConnection
+
wifiInteraction
+
voip
+
taskKeeping
);
expect
(
dataInfos
[
1
].
name
).
assertEqual
(
"
com.example.third5.BMainAbility
"
);
expect
(
dataInfos
[
1
].
backgroundModes
).
assertEqual
(
dataTransfer
+
voip
);
expect
(
dataInfos
[
NUM_THREE
].
name
).
assertEqual
(
"
com.example.third5.MainAbilityB
"
);
expect
(
dataInfos
[
NUM_THREE
].
backgroundModes
).
assertEqual
(
dataTransfer
+
voip
);
}
installer
.
uninstall
(
BUNDLE_NAME5
,
{
param
:
{
...
...
@@ -97,7 +103,7 @@ describe('ActsBmsGetBackGroundModes', function () {
/*
* @tc.number: bms_backGroundModes_0200
* @tc.name: Get the backgroundModes information of the application through queryAbilityByWant
* @tc.name: Get the backgroundModes information of the application through queryAbilityByWant
* @tc.desc: Get all background modes information, and each ability of the application
* contains one of the background mode
*/
...
...
@@ -149,8 +155,8 @@ describe('ActsBmsGetBackGroundModes', function () {
/*
* @tc.number: bms_backGroundModes_0300
* @tc.name: Get the backgroundModes information of the application through queryAbilityByWant
* @tc.desc: Read the backgroundModes information of the app's ability and replace invalid attributes
* @tc.name: Get the backgroundModes information of the application through queryAbilityByWant
* @tc.desc: Read the backgroundModes information of the app's ability and replace invalid attributes
*/
it
(
'
bms_backGroundModes_0300
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
=====================bms_backGroundModes_0300==================
'
);
...
...
@@ -173,14 +179,14 @@ describe('ActsBmsGetBackGroundModes', function () {
elementName
:
{
deviceId
:
'
0
'
,
bundleName
:
BUNDLE_NAME2
,
abilityName
:
'
com.example.third2.MainAbility
'
,
abilityName
:
'
com.example.third2.MainAbility
A
'
,
},
}
},
0
,
0
)
expect
(
dataInfos
.
length
).
assertEqual
(
1
);
if
(
dataInfos
.
length
==
1
)
{
expect
(
dataInfos
[
0
].
name
).
assertEqual
(
"
com.example.third2.MainAbility
"
)
expect
(
dataInfos
[
0
].
backgroundModes
).
assertEqual
(
audioPlayback
+
audioRecording
+
location
expect
(
dataInfos
.
length
).
assertEqual
(
NUM_TWO
);
if
(
dataInfos
.
length
==
NUM_TWO
)
{
expect
(
dataInfos
[
1
].
name
).
assertEqual
(
"
com.example.third2.MainAbilityA
"
)
expect
(
dataInfos
[
1
].
backgroundModes
).
assertEqual
(
audioPlayback
+
audioRecording
+
location
+
bluetoothInteraction
+
multiDeviceConnection
+
wifiInteraction
+
voip
+
taskKeeping
)
}
installer
.
uninstall
(
BUNDLE_NAME2
,
{
...
...
@@ -200,8 +206,8 @@ describe('ActsBmsGetBackGroundModes', function () {
/*
* @tc.number: bms_backGroundModes_0400
* @tc.name: Get the backgroundModes information of the application through queryAbilityByWant
* @tc.desc: Read the backgroundModes information of the app's ability and replace invalid attributes
* @tc.name: Get the backgroundModes information of the application through queryAbilityByWant
* @tc.desc: Read the backgroundModes information of the app's ability and replace invalid attributes
*/
it
(
'
bms_backGroundModes_0400
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
=====================bms_backGroundModes_0400==================
'
);
...
...
@@ -250,8 +256,8 @@ describe('ActsBmsGetBackGroundModes', function () {
/*
* @tc.number: bms_backGroundModes_0500
* @tc.name: Get the backgroundModes information of the application through queryAbilityByWant
* @tc.desc: Get the backgroundModes information of the multi-hap package of the application
* @tc.name: Get the backgroundModes information of the application through queryAbilityByWant
* @tc.desc: Get the backgroundModes information of the multi-hap package of the application
*/
it
(
'
bms_backGroundModes_0500
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
=====================bms_backGroundModes_0500==================
'
);
...
...
@@ -274,14 +280,14 @@ describe('ActsBmsGetBackGroundModes', function () {
elementName
:
{
deviceId
:
'
0
'
,
bundleName
:
BUNDLE_NAME1
,
abilityName
:
'
com.example.third1.MainAbility
'
,
abilityName
:
'
com.example.third1.MainAbility
A
'
,
},
}
},
0
,
0
)
expect
(
dataInfos
.
length
).
assertEqual
(
NUM_
TWO
);
if
(
dataInfos
.
length
==
NUM_
TWO
)
{
expect
(
dataInfos
[
0
].
name
).
assertEqual
(
"
com.example.third1.MainAbility
"
)
expect
(
dataInfos
[
0
].
backgroundModes
).
assertEqual
(
dataTransfer
+
audioPlayback
+
audioRecording
+
expect
(
dataInfos
.
length
).
assertEqual
(
NUM_
FOUR
);
if
(
dataInfos
.
length
==
NUM_
FOUR
)
{
expect
(
dataInfos
[
1
].
name
).
assertEqual
(
"
com.example.third1.MainAbilityA
"
)
expect
(
dataInfos
[
1
].
backgroundModes
).
assertEqual
(
dataTransfer
+
audioPlayback
+
audioRecording
+
location
+
bluetoothInteraction
+
multiDeviceConnection
+
wifiInteraction
+
voip
+
taskKeeping
)
}
console
.
info
(
"
========dataInfos[0].backgroundModes=======>
"
+
dataInfos
[
0
].
backgroundModes
)
...
...
@@ -303,7 +309,7 @@ describe('ActsBmsGetBackGroundModes', function () {
/*
* @tc.number: bms_backGroundModes_0600
* @tc.name: Get the backgroundModes information of the application through queryAbilityByWant
* @tc.desc: Get the backgroundModes information of the upgraded application's ability
* @tc.desc: Get the backgroundModes information of the upgraded application's ability
*/
it
(
'
bms_backGroundModes_0600
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
=====================bms_backGroundModes_0600==================
'
);
...
...
@@ -327,14 +333,14 @@ describe('ActsBmsGetBackGroundModes', function () {
elementName
:
{
deviceId
:
'
0
'
,
bundleName
:
BUNDLE_NAME1
,
abilityName
:
'
com.example.third1.MainAbility
'
,
abilityName
:
'
com.example.third1.MainAbility
A
'
,
},
}
},
0
,
0
)
expect
(
dataInfos
.
length
).
assertEqual
(
1
);
if
(
dataInfos
.
length
==
1
)
{
expect
(
dataInfos
[
0
].
name
).
assertEqual
(
"
com.example.third1.MainAbility
"
)
expect
(
dataInfos
[
0
].
backgroundModes
).
assertEqual
(
dataTransfer
+
audioPlayback
+
audioRecording
+
expect
(
dataInfos
.
length
).
assertEqual
(
NUM_TWO
);
if
(
dataInfos
.
length
==
NUM_TWO
)
{
expect
(
dataInfos
[
1
].
name
).
assertEqual
(
"
com.example.third1.MainAbilityA
"
)
expect
(
dataInfos
[
1
].
backgroundModes
).
assertEqual
(
dataTransfer
+
audioPlayback
+
audioRecording
+
location
+
bluetoothInteraction
+
multiDeviceConnection
+
wifiInteraction
+
voip
+
taskKeeping
)
}
installer
.
install
(
bundlePath2
,
{
...
...
@@ -358,10 +364,10 @@ describe('ActsBmsGetBackGroundModes', function () {
},
}
},
0
,
0
)
expect
(
dataInfos
.
length
).
assertEqual
(
1
);
if
(
dataInfos
.
length
==
1
)
{
expect
(
dataInfos
[
0
].
name
).
assertEqual
(
"
com.example.third1.AMainAbility
"
);
expect
(
dataInfos
[
0
].
backgroundModes
).
assertEqual
(
audioRecording
+
location
+
bluetoothInteraction
+
expect
(
dataInfos
.
length
).
assertEqual
(
NUM_TWO
);
if
(
dataInfos
.
length
==
NUM_TWO
)
{
expect
(
dataInfos
[
1
].
name
).
assertEqual
(
"
com.example.third1.AMainAbilityA
"
);
expect
(
dataInfos
[
1
].
backgroundModes
).
assertEqual
(
audioRecording
+
location
+
bluetoothInteraction
+
multiDeviceConnection
+
wifiInteraction
+
voip
+
taskKeeping
);
}
installer
.
uninstall
(
BUNDLE_NAME1
,
{
...
...
@@ -383,7 +389,7 @@ describe('ActsBmsGetBackGroundModes', function () {
/*
* @tc.number: bms_backGroundModes_0700
* @tc.name: Get the backgroundModes information of the application through queryAbilityByWant
* @tc.desc: Uninstall the application, get the backgroundModes information of the upgraded application's ability
* @tc.desc: Uninstall the application, get the backgroundModes information of the upgraded application's ability
*/
it
(
'
bms_backGroundModes_0700
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
=====================bms_backGroundModes_0700==================
'
);
...
...
@@ -410,10 +416,10 @@ describe('ActsBmsGetBackGroundModes', function () {
}
}
},
0
,
0
)
expect
(
dataInfos
.
length
).
assertEqual
(
1
);
if
(
dataInfos
.
length
==
1
)
{
expect
(
dataInfos
[
0
].
name
).
assertEqual
(
"
com.example.third1.MainAbility
"
)
expect
(
dataInfos
[
0
].
backgroundModes
).
assertEqual
(
dataTransfer
+
audioPlayback
+
audioRecording
+
expect
(
dataInfos
.
length
).
assertEqual
(
NUM_TWO
);
if
(
dataInfos
.
length
==
NUM_TWO
)
{
expect
(
dataInfos
[
1
].
name
).
assertEqual
(
"
com.example.third1.MainAbilityA
"
)
expect
(
dataInfos
[
1
].
backgroundModes
).
assertEqual
(
dataTransfer
+
audioPlayback
+
audioRecording
+
location
+
bluetoothInteraction
+
multiDeviceConnection
+
wifiInteraction
+
voip
+
taskKeeping
)
}
installer
.
uninstall
(
BUNDLE_NAME1
,
{
...
...
@@ -442,4 +448,145 @@ describe('ActsBmsGetBackGroundModes', function () {
});
})
})
/*
* @tc.number: bms_getIsKeepAliveAndSingleUser_0100
* @tc.name: Get the isKeepAlive and singleUser information of the third-party application
* @tc.desc: Get the isKeepAlive and singleUser information of the third-party application by getBundleInfo
*/
it
(
'
bms_getIsKeepAliveAndSingleUser_0100
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
===========begin bms_getIsKeepAliveAndSingleUser_0100===========
'
);
var
installer
=
await
bundle
.
getBundleInstaller
();
installer
.
install
([
BUNDLE_PATH1
],
{
param
:
{
userId
:
0
,
installFlag
:
1
,
isKeepData
:
false
}
},
async
(
err
,
data
)
=>
{
expect
(
err
.
code
).
assertEqual
(
0
);
expect
(
data
.
status
).
assertEqual
(
0
);
expect
(
data
.
statusMessage
).
assertEqual
(
'
SUCCESS
'
);
bundle
.
getBundleInfo
(
BUNDLE_NAME1
,
1
,
(
err
,
bundleInfo
)
=>
{
expect
(
err
.
code
).
assertEqual
(
0
);
expect
(
bundleInfo
.
isKeepAlive
).
assertFalse
();
expect
(
bundleInfo
.
singleUser
).
assertFalse
();
installer
.
uninstall
(
BUNDLE_NAME1
,
{
param
:
{
userId
:
0
,
installFlag
:
1
,
isKeepData
:
false
}
},
(
err
,
data
)
=>
{
expect
(
err
.
code
).
assertEqual
(
0
);
expect
(
data
.
status
).
assertEqual
(
0
);
expect
(
data
.
statusMessage
).
assertEqual
(
'
SUCCESS
'
);
done
();
});
});
})
})
/*
* @tc.number: bms_getIsKeepAliveAndSingleUser_0200
* @tc.name: Get the isKeepAlive and singleUser information of the application which doesn't config those fields
* @tc.desc: Get the isKeepAlive and singleUser information of the application which doesn't config those fields
* by getBundleInfo(application is system)
*/
it
(
'
bms_getIsKeepAliveAndSingleUser_0200
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
=====================bms_getIsKeepAliveAndSingleUser_0200==================
'
);
var
bundleInfo
=
await
bundle
.
getBundleInfo
(
'
com.example.system1
'
,
1
);
console
.
info
(
'
========bundleInfo is=====
'
+
JSON
.
stringify
(
bundleInfo
));
expect
(
bundleInfo
.
isKeepAlive
).
assertFalse
();
expect
(
bundleInfo
.
singleUser
).
assertFalse
();
done
();
})
/*
* @tc.number: bms_getIsKeepAliveAndSingleUser_0300
* @tc.name: Get the isKeepAlive and singleUser information of the application includes two haps
* @tc.desc: Get the isKeepAlive and singleUser information of the application includes two haps, the attribute value
* will remain the same as the attribute value of the first installed hap(application is system)
*/
it
(
'
bms_getIsKeepAliveAndSingleUser_0300
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
===========begin bms_getIsKeepAliveAndSingleUser_0300===========
'
);
let
installer
=
await
bundle
.
getBundleInstaller
()
installer
.
install
([
SYSTEM_PATH
,
SYSTEM_FEATURE_PATH
],
{
param
:
{
userId
:
0
,
isKeepData
:
false
}
},
async
(
err
,
data
)
=>
{
expect
(
err
.
code
).
assertEqual
(
0
);
expect
(
data
.
status
).
assertEqual
(
0
);
expect
(
data
.
statusMessage
).
assertEqual
(
'
SUCCESS
'
);
var
bundleInfo
=
await
bundle
.
getBundleInfo
(
SYSTEM_NAME
,
1
);
expect
(
bundleInfo
.
singleUser
).
assertTrue
();
expect
(
bundleInfo
.
isKeepAlive
).
assertFalse
();
installer
.
uninstall
(
SYSTEM_NAME
,
{
param
:
{
userId
:
0
,
isKeepData
:
false
}
},
(
err
,
data
)
=>
{
expect
(
err
.
code
).
assertEqual
(
0
);
expect
(
data
.
status
).
assertEqual
(
0
);
expect
(
data
.
statusMessage
).
assertEqual
(
'
SUCCESS
'
);
done
();
});
});
})
/*
* @tc.number: bms_getIsKeepAliveAndSingleUser_0400
* @tc.name: Update application, get the isKeepAlive and singleUser information of the application
* @tc.desc: Update application, get the isKeepAlive and singleUser information of the application whether update
* (application is system)
*/
it
(
'
bms_getIsKeepAliveAndSingleUser_0400
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
=====================bms_getIsKeepAliveAndSingleUser_0400==================
'
);
var
installer
=
await
bundle
.
getBundleInstaller
();
installer
.
install
([
SYSTEM_PATH
],
{
param
:
{
userId
:
0
,
installFlag
:
1
,
isKeepData
:
false
}
},
async
(
err
,
data
)
=>
{
expect
(
err
.
code
).
assertEqual
(
0
);
expect
(
data
.
status
).
assertEqual
(
0
);
expect
(
data
.
statusMessage
).
assertEqual
(
'
SUCCESS
'
);
var
bundleInfo
=
await
bundle
.
getBundleInfo
(
SYSTEM_NAME
,
1
);
expect
(
bundleInfo
.
singleUser
).
assertTrue
();
expect
(
bundleInfo
.
isKeepAlive
).
assertFalse
();
installer
.
install
([
SYSTEM_UPDATE_PATH
],
{
param
:
{
userId
:
0
,
installFlag
:
1
,
isKeepData
:
false
}
},
async
(
err
,
data
)
=>
{
expect
(
err
.
code
).
assertEqual
(
0
);
expect
(
data
.
status
).
assertEqual
(
0
);
expect
(
data
.
statusMessage
).
assertEqual
(
'
SUCCESS
'
);
var
bundleInfo
=
await
bundle
.
getBundleInfo
(
SYSTEM_NAME
,
1
);
console
.
info
(
'
========bundleInfo is=====
'
+
JSON
.
stringify
(
bundleInfo
));
expect
(
bundleInfo
.
name
).
assertEqual
(
SYSTEM_NAME
);
expect
(
bundleInfo
.
isKeepAlive
).
assertTrue
();
expect
(
bundleInfo
.
singleUser
).
assertTrue
();
installer
.
uninstall
(
SYSTEM_NAME
,
{
param
:
{
userId
:
0
,
installFlag
:
1
,
isKeepData
:
false
}
},
(
err
,
data
)
=>
{
expect
(
err
.
code
).
assertEqual
(
0
);
expect
(
data
.
status
).
assertEqual
(
0
);
expect
(
data
.
statusMessage
).
assertEqual
(
'
SUCCESS
'
);
done
();
});
})
})
})
})
\ No newline at end of file
appexecfwk/bundle_standard/bundlemanager/actsbmsjstest/entry/src/main/js/test/ActsBmsJsTest.test.js
浏览文件 @
6b8be82e
...
...
@@ -14,6 +14,8 @@
*/
import
bundle
from
'
@ohos.bundle
'
import
{
describe
,
beforeAll
,
beforeEach
,
afterEach
,
afterAll
,
it
,
expect
}
from
'
deccjsunit/index
'
const
NUM_TWO
=
2
;
const
NUM_FOUR
=
4
;
describe
(
'
ActsBmsJsTest
'
,
function
()
{
/*
* @tc.number: bms_getJsAbility_0100
...
...
@@ -42,8 +44,8 @@ describe('ActsBmsJsTest', function () {
expect
(
data
.
status
).
assertEqual
(
0
);
expect
(
data
.
statusMessage
).
assertEqual
(
'
SUCCESS
'
);
let
result
=
await
bundle
.
getBundleInfo
(
bundleName
,
1
);
expect
(
result
.
abilityInfo
.
length
).
assertEqual
(
1
);
if
(
result
.
abilityInfo
.
length
==
1
)
{
expect
(
result
.
abilityInfo
.
length
).
assertEqual
(
NUM_TWO
);
if
(
result
.
abilityInfo
.
length
==
NUM_TWO
)
{
console
.
debug
(
'
========check abilityName ========
'
+
JSON
.
stringify
(
result
.
abilityInfo
));
expect
(
result
.
abilityInfo
[
0
].
name
).
assertEqual
(
abilityName
);
expect
(
result
.
abilityInfo
[
0
].
srcLanguage
).
assertEqual
(
'
js
'
);
...
...
@@ -94,8 +96,8 @@ describe('ActsBmsJsTest', function () {
expect
(
data
.
statusMessage
).
assertEqual
(
'
SUCCESS
'
);
let
result
=
await
bundle
.
getBundleInfo
(
bundleName
,
1
)
console
.
debug
(
'
==========bundleInfo==========
'
+
JSON
.
stringify
(
result
))
expect
(
result
.
abilityInfo
.
length
).
assertEqual
(
2
);
if
(
result
.
abilityInfo
.
length
==
2
)
{
expect
(
result
.
abilityInfo
.
length
).
assertEqual
(
NUM_FOUR
);
if
(
result
.
abilityInfo
.
length
==
NUM_FOUR
)
{
console
.
debug
(
'
========check abilityName ========
'
+
JSON
.
stringify
(
result
.
abilityInfo
));
expect
(
result
.
abilityInfo
[
0
].
name
).
assertEqual
(
abilityName1
);
expect
(
result
.
abilityInfo
[
0
].
srcLanguage
).
assertEqual
(
'
js
'
);
...
...
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosfifthscene/src/main/config.json
浏览文件 @
6b8be82e
...
...
@@ -37,17 +37,6 @@
]
}
],
"backgroundModes"
:
[
"dataTransfer"
,
"audioPlayback"
,
"audioRecording"
,
"location"
,
"bluetoothInteraction"
,
"multiDeviceConnection"
,
"wifiInteraction"
,
"voip"
,
"taskKeeping"
],
"name"
:
"com.example.third5.AMainAbility"
,
"srcLanguage"
:
"js"
,
"icon"
:
"$media:icon"
,
...
...
@@ -129,10 +118,6 @@
]
}
],
"backgroundModes"
:
[
"dataTransfer"
,
"voip"
],
"name"
:
".BMainAbility"
,
"srcLanguage"
:
"js"
,
"icon"
:
"$media:icon"
,
...
...
@@ -191,6 +176,61 @@
}
]
}
},
{
"skills"
:
[
{
"entities"
:
[
"entity.system.home"
],
"actions"
:
[
"action.system.home"
]
}
],
"backgroundModes"
:
[
"dataTransfer"
,
"audioPlayback"
,
"audioRecording"
,
"location"
,
"bluetoothInteraction"
,
"multiDeviceConnection"
,
"wifiInteraction"
,
"voip"
,
"taskKeeping"
],
"name"
:
"com.example.third5.MainAbilityA"
,
"srcLanguage"
:
"js"
,
"icon"
:
"$media:icon"
,
"description"
:
"$string:mainability_description"
,
"label"
:
"$string:app_name"
,
"type"
:
"service"
,
"visible"
:
true
,
"launchType"
:
"standard"
},
{
"skills"
:
[
{
"entities"
:
[
"entity.system.home"
],
"actions"
:
[
"action.system.home"
]
}
],
"backgroundModes"
:
[
"dataTransfer"
,
"voip"
],
"name"
:
"com.example.third5.MainAbilityB"
,
"srcLanguage"
:
"js"
,
"icon"
:
"$media:icon"
,
"description"
:
"$string:mainability_description"
,
"label"
:
"$string:app_name"
,
"type"
:
"service"
,
"visible"
:
true
,
"launchType"
:
"standard"
}
],
"js"
:
[
...
...
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosfirstscene/src/main/config.json
浏览文件 @
6b8be82e
...
...
@@ -41,17 +41,6 @@
]
}
],
"backgroundModes"
:
[
"dataTransfer"
,
"audioPlayback"
,
"audioRecording"
,
"location"
,
"bluetoothInteraction"
,
"multiDeviceConnection"
,
"wifiInteraction"
,
"voip"
,
"taskKeeping"
],
"name"
:
"com.example.third1.MainAbility"
,
"icon"
:
"$media:icon"
,
"form"
:
{
...
...
@@ -120,6 +109,46 @@
}
]
}
},
{
"skills"
:
[
{
"entities"
:
[
"entity.system.home"
],
"actions"
:
[
"action.system.home"
]
}
],
"backgroundModes"
:
[
"dataTransfer"
,
"audioPlayback"
,
"audioRecording"
,
"location"
,
"bluetoothInteraction"
,
"multiDeviceConnection"
,
"wifiInteraction"
,
"voip"
,
"taskKeeping"
],
"name"
:
"com.example.third1.MainAbilityA"
,
"icon"
:
"$media:icon"
,
"form"
:
{
"formEntity"
:
[
"homeScreen"
,
"searchbox"
],
"defaultHeight"
:
100
,
"defaultWidth"
:
200
,
"minHeight"
:
50
,
"minWidth"
:
100
},
"description"
:
"$string:mainability_description"
,
"label"
:
"$string:app_name"
,
"type"
:
"service"
,
"launchType"
:
"standard"
,
"visible"
:
true
}
],
"shortcuts"
:
[
...
...
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosfirstsceneupdate/src/main/config.json
浏览文件 @
6b8be82e
...
...
@@ -42,15 +42,6 @@
]
}
],
"backgroundModes"
:
[
"audioRecording"
,
"location"
,
"bluetoothInteraction"
,
"multiDeviceConnection"
,
"wifiInteraction"
,
"voip"
,
"taskKeeping"
],
"name"
:
"com.example.third1.AMainAbility"
,
"icon"
:
"$media:icon"
,
"description"
:
"$string:mainability_description"
,
...
...
@@ -118,6 +109,34 @@
}
]
}
},
{
"skills"
:
[
{
"entities"
:
[
"entity.system.home"
],
"actions"
:
[
"action.system.home"
]
}
],
"backgroundModes"
:
[
"audioRecording"
,
"location"
,
"bluetoothInteraction"
,
"multiDeviceConnection"
,
"wifiInteraction"
,
"voip"
,
"taskKeeping"
],
"name"
:
"com.example.third1.AMainAbilityA"
,
"icon"
:
"$media:icon"
,
"description"
:
"$string:mainability_description"
,
"label"
:
"$string:app_name"
,
"type"
:
"service"
,
"launchType"
:
"standard"
,
"visible"
:
true
}
],
"shortcuts"
:
[
...
...
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystem/src/main/config.json
浏览文件 @
6b8be82e
...
...
@@ -2,7 +2,6 @@
"app"
:
{
"bundleName"
:
"com.example.system1"
,
"vendor"
:
"example"
,
"singleUser"
:
true
,
"version"
:
{
"code"
:
1
,
"name"
:
"1.0"
...
...
@@ -14,9 +13,7 @@
}
},
"deviceConfig"
:
{
"default"
:{
"keepAlive"
:
true
}
"default"
:{}
},
"module"
:
{
"package"
:
"com.example.system1"
,
...
...
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemfeature/BUILD.gn
0 → 100644
浏览文件 @
6b8be82e
# 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_hap("bmsSystemBundleTest2Feature") {
hap_profile = "./src/main/config.json"
hap_name = "bmsSystemBundleTest2Feature"
subsystem_name = XTS_SUITENAME
final_hap_path =
"${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap"
testonly = true
deps = [
":hjs_demo_js_assets",
":hjs_demo_resources",
]
certificate_profile = "./signature/openharmony_sx.p7b"
}
ohos_js_assets("hjs_demo_js_assets") {
source_dir = "./src/main/js/default"
}
ohos_resources("hjs_demo_resources") {
sources = [ "./src/main/js/resources" ]
hap_profile = "./src/main/config.json"
}
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemfeature/Test.json
0 → 100644
浏览文件 @
6b8be82e
{
"description"
:
"Configuration for hjunit demo Tests"
,
}
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemfeature/signature/openharmony_sx.p7b
0 → 100755
浏览文件 @
6b8be82e
文件已添加
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemfeature/src/main/config.json
0 → 100644
浏览文件 @
6b8be82e
{
"app"
:
{
"bundleName"
:
"com.example.system2"
,
"vendor"
:
"example"
,
"singleUser"
:
true
,
"version"
:
{
"code"
:
1
,
"name"
:
"1.0"
},
"apiVersion"
:
{
"compatible"
:
4
,
"target"
:
5
,
"releaseType"
:
"Beta1"
}
},
"deviceConfig"
:
{
"default"
:{
"keepAlive"
:
true
}
},
"module"
:
{
"package"
:
"com.example.system.feature"
,
"name"
:
".system2feature"
,
"mainAbility"
:
"com.example.system2.MainAbility"
,
"deviceType"
:
[
"phone"
],
"distro"
:
{
"deliveryWithInstall"
:
true
,
"moduleName"
:
"systemFeature"
,
"moduleType"
:
"feature"
},
"abilities"
:
[
{
"skills"
:
[
{
"entities"
:
[
"entity.system.home"
],
"actions"
:
[
"action.system.home"
]
}
],
"name"
:
"com.example.system2.MainAbilityB"
,
"icon"
:
"$media:icon"
,
"description"
:
"$string:mainability_description"
,
"label"
:
"$string:app_name"
,
"type"
:
"page"
,
"launchType"
:
"standard"
}
],
"js"
:
[
{
"pages"
:
[
"pages/index/index"
],
"name"
:
"default"
,
"window"
:
{
"designWidth"
:
720
,
"autoDesignWidth"
:
false
}
}
]
}
}
\ No newline at end of file
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemfeature/src/main/js/default/app.js
0 → 100644
浏览文件 @
6b8be82e
/*
* 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
(
'
AceApplication onCreate
'
);
},
onDestroy
()
{
console
.
info
(
'
AceApplication onDestroy
'
);
}
};
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemfeature/src/main/js/default/i18n/en-US.json
0 → 100644
浏览文件 @
6b8be82e
{
"strings"
:
{
"hello"
:
"Hello"
,
"world"
:
"World"
}
}
\ No newline at end of file
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemfeature/src/main/js/default/i18n/zh-CN.json
0 → 100644
浏览文件 @
6b8be82e
{
"strings"
:
{
"hello"
:
"您好"
,
"world"
:
"世界"
}
}
\ No newline at end of file
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemfeature/src/main/js/default/pages/index/index.css
0 → 100644
浏览文件 @
6b8be82e
.container
{
flex-direction
:
column
;
justify-content
:
center
;
align-items
:
center
;
}
.title
{
font-size
:
100px
;
}
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemfeature/src/main/js/default/pages/index/index.hml
0 → 100644
浏览文件 @
6b8be82e
<div class="container">
<text class="title">
{{ $t('strings.hello') }} {{ title }}
</text>
</div>
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemfeature/src/main/js/default/pages/index/index.js
0 → 100644
浏览文件 @
6b8be82e
/*
* 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.
*/
const
injectRef
=
Object
.
getPrototypeOf
(
global
)
||
global
injectRef
.
regeneratorRuntime
=
require
(
'
@babel/runtime/regenerator
'
)
export
default
{
data
:
{
title
:
""
},
onInit
()
{
this
.
title
=
this
.
$t
(
'
strings.world
'
);
}
}
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemfeature/src/main/js/resources/base/element/string.json
0 → 100644
浏览文件 @
6b8be82e
{
"string"
:
[
{
"name"
:
"app_name"
,
"value"
:
"system2"
},
{
"name"
:
"mainability_description"
,
"value"
:
"JS_Phone_Empty Feature Ability"
},
{
"name"
:
"shortcut"
,
"value"
:
"JS_Phone_Empty Shortcut"
}
]
}
\ No newline at end of file
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemfeature/src/main/js/resources/base/media/icon.png
0 → 100644
浏览文件 @
6b8be82e
6.6 KB
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemtwo/BUILD.gn
0 → 100644
浏览文件 @
6b8be82e
# 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_hap("bmsSystemBundleTest2") {
hap_profile = "./src/main/config.json"
hap_name = "bmsSystemBundleTest2"
subsystem_name = XTS_SUITENAME
final_hap_path =
"${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap"
testonly = true
deps = [
":hjs_demo_js_assets",
":hjs_demo_resources",
]
certificate_profile = "./signature/openharmony_sx.p7b"
}
ohos_js_assets("hjs_demo_js_assets") {
source_dir = "./src/main/js/default"
}
ohos_resources("hjs_demo_resources") {
sources = [ "./src/main/js/resources" ]
hap_profile = "./src/main/config.json"
}
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemtwo/Test.json
0 → 100644
浏览文件 @
6b8be82e
{
"description"
:
"Configuration for hjunit demo Tests"
,
}
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemtwo/signature/openharmony_sx.p7b
0 → 100755
浏览文件 @
6b8be82e
文件已添加
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemtwo/src/main/config.json
0 → 100644
浏览文件 @
6b8be82e
{
"app"
:
{
"bundleName"
:
"com.example.system2"
,
"vendor"
:
"example"
,
"singleUser"
:
true
,
"version"
:
{
"code"
:
1
,
"name"
:
"1.0"
},
"apiVersion"
:
{
"compatible"
:
4
,
"target"
:
5
,
"releaseType"
:
"Beta1"
}
},
"deviceConfig"
:
{
"default"
:{
"keepAlive"
:
false
}
},
"module"
:
{
"package"
:
"com.example.system2"
,
"name"
:
".BmsSystemBundle1"
,
"mainAbility"
:
"com.example.system2.MainAbility"
,
"deviceType"
:
[
"phone"
],
"distro"
:
{
"deliveryWithInstall"
:
true
,
"moduleName"
:
"entry"
,
"moduleType"
:
"entry"
},
"abilities"
:
[
{
"skills"
:
[
{
"entities"
:
[
"entity.system.home"
],
"actions"
:
[
"action.system.home"
]
}
],
"name"
:
"com.example.system2.MainAbility"
,
"icon"
:
"$media:icon"
,
"description"
:
"$string:mainability_description"
,
"label"
:
"$string:app_name"
,
"type"
:
"page"
,
"launchType"
:
"standard"
}
],
"js"
:
[
{
"pages"
:
[
"pages/index/index"
],
"name"
:
"default"
,
"window"
:
{
"designWidth"
:
720
,
"autoDesignWidth"
:
false
}
}
]
}
}
\ No newline at end of file
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemtwo/src/main/js/default/app.js
0 → 100644
浏览文件 @
6b8be82e
/*
* 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
(
'
AceApplication onCreate
'
);
},
onDestroy
()
{
console
.
info
(
'
AceApplication onDestroy
'
);
}
};
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemtwo/src/main/js/default/i18n/en-US.json
0 → 100644
浏览文件 @
6b8be82e
{
"strings"
:
{
"hello"
:
"Hello"
,
"world"
:
"World"
}
}
\ No newline at end of file
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemtwo/src/main/js/default/i18n/zh-CN.json
0 → 100644
浏览文件 @
6b8be82e
{
"strings"
:
{
"hello"
:
"您好"
,
"world"
:
"世界"
}
}
\ No newline at end of file
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemtwo/src/main/js/default/pages/index/index.css
0 → 100644
浏览文件 @
6b8be82e
.container
{
flex-direction
:
column
;
justify-content
:
center
;
align-items
:
center
;
}
.title
{
font-size
:
100px
;
}
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemtwo/src/main/js/default/pages/index/index.hml
0 → 100644
浏览文件 @
6b8be82e
<div class="container">
<text class="title">
{{ $t('strings.hello') }} {{ title }}
</text>
</div>
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemtwo/src/main/js/default/pages/index/index.js
0 → 100644
浏览文件 @
6b8be82e
/*
* 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.
*/
const
injectRef
=
Object
.
getPrototypeOf
(
global
)
||
global
injectRef
.
regeneratorRuntime
=
require
(
'
@babel/runtime/regenerator
'
)
export
default
{
data
:
{
title
:
""
},
onInit
()
{
this
.
title
=
this
.
$t
(
'
strings.world
'
);
}
}
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemtwo/src/main/js/resources/base/element/string.json
0 → 100644
浏览文件 @
6b8be82e
{
"string"
:
[
{
"name"
:
"app_name"
,
"value"
:
"system2"
},
{
"name"
:
"mainability_description"
,
"value"
:
"JS_Phone_Empty Feature Ability"
},
{
"name"
:
"shortcut"
,
"value"
:
"JS_Phone_Empty Shortcut"
}
]
}
\ No newline at end of file
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemtwo/src/main/js/resources/base/media/icon.png
0 → 100644
浏览文件 @
6b8be82e
6.6 KB
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemupdate/BUILD.gn
0 → 100644
浏览文件 @
6b8be82e
# 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_hap("bmsSystemBundleTest2Update") {
hap_profile = "./src/main/config.json"
hap_name = "bmsSystemBundleTest2Update"
subsystem_name = XTS_SUITENAME
final_hap_path =
"${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap"
testonly = true
deps = [
":hjs_demo_js_assets",
":hjs_demo_resources",
]
certificate_profile = "./signature/openharmony_sx.p7b"
}
ohos_js_assets("hjs_demo_js_assets") {
source_dir = "./src/main/js/default"
}
ohos_resources("hjs_demo_resources") {
sources = [ "./src/main/js/resources" ]
hap_profile = "./src/main/config.json"
}
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemupdate/Test.json
0 → 100644
浏览文件 @
6b8be82e
{
"description"
:
"Configuration for hjunit demo Tests"
,
}
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemupdate/signature/openharmony_sx.p7b
0 → 100755
浏览文件 @
6b8be82e
文件已添加
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemupdate/src/main/config.json
0 → 100644
浏览文件 @
6b8be82e
{
"app"
:
{
"bundleName"
:
"com.example.system2"
,
"vendor"
:
"example"
,
"singleUser"
:
true
,
"version"
:
{
"code"
:
5
,
"name"
:
"5.0"
},
"apiVersion"
:
{
"compatible"
:
4
,
"target"
:
5
,
"releaseType"
:
"Beta1"
}
},
"deviceConfig"
:
{
"default"
:{
"keepAlive"
:
true
}
},
"module"
:
{
"package"
:
"com.example.system2"
,
"name"
:
".BmsSystemBundle1"
,
"mainAbility"
:
"com.example.system2.MainAbility"
,
"deviceType"
:
[
"phone"
],
"distro"
:
{
"deliveryWithInstall"
:
true
,
"moduleName"
:
"entry"
,
"moduleType"
:
"entry"
},
"abilities"
:
[
{
"skills"
:
[
{
"entities"
:
[
"entity.system.home"
],
"actions"
:
[
"action.system.home"
]
}
],
"name"
:
"com.example.system2.MainAbility"
,
"icon"
:
"$media:icon"
,
"description"
:
"$string:mainability_description"
,
"label"
:
"$string:app_name"
,
"type"
:
"page"
,
"launchType"
:
"standard"
}
],
"js"
:
[
{
"pages"
:
[
"pages/index/index"
],
"name"
:
"default"
,
"window"
:
{
"designWidth"
:
720
,
"autoDesignWidth"
:
false
}
}
]
}
}
\ No newline at end of file
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemupdate/src/main/js/default/app.js
0 → 100644
浏览文件 @
6b8be82e
/*
* 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
(
'
AceApplication onCreate
'
);
},
onDestroy
()
{
console
.
info
(
'
AceApplication onDestroy
'
);
}
};
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemupdate/src/main/js/default/i18n/en-US.json
0 → 100644
浏览文件 @
6b8be82e
{
"strings"
:
{
"hello"
:
"Hello"
,
"world"
:
"World"
}
}
\ No newline at end of file
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemupdate/src/main/js/default/i18n/zh-CN.json
0 → 100644
浏览文件 @
6b8be82e
{
"strings"
:
{
"hello"
:
"您好"
,
"world"
:
"世界"
}
}
\ No newline at end of file
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemupdate/src/main/js/default/pages/index/index.css
0 → 100644
浏览文件 @
6b8be82e
.container
{
flex-direction
:
column
;
justify-content
:
center
;
align-items
:
center
;
}
.title
{
font-size
:
100px
;
}
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemupdate/src/main/js/default/pages/index/index.hml
0 → 100644
浏览文件 @
6b8be82e
<div class="container">
<text class="title">
{{ $t('strings.hello') }} {{ title }}
</text>
</div>
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemupdate/src/main/js/default/pages/index/index.js
0 → 100644
浏览文件 @
6b8be82e
/*
* 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.
*/
const
injectRef
=
Object
.
getPrototypeOf
(
global
)
||
global
injectRef
.
regeneratorRuntime
=
require
(
'
@babel/runtime/regenerator
'
)
export
default
{
data
:
{
title
:
""
},
onInit
()
{
this
.
title
=
this
.
$t
(
'
strings.world
'
);
}
}
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemupdate/src/main/js/resources/base/element/string.json
0 → 100644
浏览文件 @
6b8be82e
{
"string"
:
[
{
"name"
:
"app_name"
,
"value"
:
"upsystem"
},
{
"name"
:
"mainability_description"
,
"value"
:
"JS_Phone_Empty Feature Ability"
},
{
"name"
:
"shortcut"
,
"value"
:
"JS_Phone_Empty Shortcut"
}
]
}
\ No newline at end of file
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemupdate/src/main/js/resources/base/media/icon.png
0 → 100644
浏览文件 @
6b8be82e
6.6 KB
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfossecondscene/src/main/config.json
浏览文件 @
6b8be82e
...
...
@@ -25,6 +25,26 @@
"moduleType"
:
"entry"
},
"abilities"
:
[
{
"skills"
:
[
{
"entities"
:
[
"entity.system.home"
],
"actions"
:
[
"action.system.home"
]
}
],
"name"
:
"com.example.third2.MainAbility"
,
"srcLanguage"
:
"js"
,
"visible"
:
true
,
"icon"
:
"$media:icon"
,
"description"
:
"$string:mainability_description"
,
"label"
:
"$string:app_name"
,
"type"
:
"page"
,
"launchType"
:
"standard"
},
{
"skills"
:
[
{
...
...
@@ -47,13 +67,13 @@
"voip"
,
"taskKeeping"
],
"name"
:
"com.example.third2.MainAbility"
,
"name"
:
"com.example.third2.MainAbility
A
"
,
"srcLanguage"
:
"js"
,
"visible"
:
true
,
"icon"
:
"$media:icon"
,
"description"
:
"$string:mainability_description"
,
"label"
:
"$string:app_name"
,
"type"
:
"
pag
e"
,
"type"
:
"
servic
e"
,
"launchType"
:
"standard"
}
],
...
...
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfossixthscene/src/main/config.json
浏览文件 @
6b8be82e
...
...
@@ -44,7 +44,7 @@
"icon"
:
"$media:icon"
,
"description"
:
"$string:mainability_description"
,
"label"
:
"$string:app_name"
,
"type"
:
"
pag
e"
,
"type"
:
"
servic
e"
,
"launchType"
:
"standard"
},
{
...
...
@@ -66,7 +66,7 @@
"icon"
:
"$media:icon"
,
"description"
:
"$string:mainability_description"
,
"label"
:
"$string:app_name"
,
"type"
:
"
pag
e"
,
"type"
:
"
servic
e"
,
"launchType"
:
"standard"
},
{
...
...
@@ -88,7 +88,7 @@
"icon"
:
"$media:icon"
,
"description"
:
"$string:mainability_description"
,
"label"
:
"$string:app_name"
,
"type"
:
"
pag
e"
,
"type"
:
"
servic
e"
,
"launchType"
:
"standard"
},
{
...
...
@@ -110,7 +110,7 @@
"icon"
:
"$media:icon"
,
"description"
:
"$string:mainability_description"
,
"label"
:
"$string:app_name"
,
"type"
:
"
pag
e"
,
"type"
:
"
servic
e"
,
"launchType"
:
"standard"
},
{
...
...
@@ -132,7 +132,7 @@
"icon"
:
"$media:icon"
,
"description"
:
"$string:mainability_description"
,
"label"
:
"$string:app_name"
,
"type"
:
"
pag
e"
,
"type"
:
"
servic
e"
,
"launchType"
:
"standard"
},
{
...
...
@@ -154,7 +154,7 @@
"icon"
:
"$media:icon"
,
"description"
:
"$string:mainability_description"
,
"label"
:
"$string:app_name"
,
"type"
:
"
pag
e"
,
"type"
:
"
servic
e"
,
"launchType"
:
"standard"
},
{
...
...
@@ -176,7 +176,7 @@
"icon"
:
"$media:icon"
,
"description"
:
"$string:mainability_description"
,
"label"
:
"$string:app_name"
,
"type"
:
"
pag
e"
,
"type"
:
"
servic
e"
,
"launchType"
:
"standard"
},
{
...
...
@@ -198,7 +198,7 @@
"icon"
:
"$media:icon"
,
"description"
:
"$string:mainability_description"
,
"label"
:
"$string:app_name"
,
"type"
:
"
pag
e"
,
"type"
:
"
servic
e"
,
"launchType"
:
"standard"
},
{
...
...
@@ -220,7 +220,7 @@
"icon"
:
"$media:icon"
,
"description"
:
"$string:mainability_description"
,
"label"
:
"$string:app_name"
,
"type"
:
"
pag
e"
,
"type"
:
"
servic
e"
,
"launchType"
:
"standard"
}
],
...
...
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosthirdscene/src/main/config.json
浏览文件 @
6b8be82e
...
...
@@ -41,17 +41,6 @@
]
}
],
"backgroundModes"
:
[
"dataTransfer"
,
"audioPlayback"
,
"audioRecording"
,
"location"
,
"bluetoothInteraction"
,
"multiDeviceConnection"
,
"wifiInteraction"
,
"voip"
,
"taskKeeping"
],
"name"
:
"com.example.third3.MainAbility"
,
"icon"
:
"$media:icon"
,
"description"
:
"$string:mainability_description"
,
...
...
@@ -120,6 +109,46 @@
}
]
}
},
{
"skills"
:
[
{
"entities"
:
[
"entity.system.home"
],
"actions"
:
[
"action.system.home"
]
}
],
"backgroundModes"
:
[
"dataTransfer"
,
"audioPlayback"
,
"audioRecording"
,
"location"
,
"bluetoothInteraction"
,
"multiDeviceConnection"
,
"wifiInteraction"
,
"voip"
,
"taskKeeping"
],
"name"
:
"com.example.third1.MainAbilityA"
,
"icon"
:
"$media:icon"
,
"form"
:
{
"formEntity"
:
[
"homeScreen"
,
"searchbox"
],
"defaultHeight"
:
100
,
"defaultWidth"
:
200
,
"minHeight"
:
50
,
"minWidth"
:
100
},
"description"
:
"$string:mainability_description"
,
"label"
:
"$string:app_name"
,
"type"
:
"service"
,
"launchType"
:
"standard"
,
"visible"
:
true
}
],
"shortcuts"
:
[
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录