Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
f0009239
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看板
提交
f0009239
编写于
10月 27, 2022
作者:
I
inter515
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
新增api覆盖
Signed-off-by:
N
inter515
<
ry.renyi@huawei.com
>
上级
9d2c51f4
变更
12
展开全部
隐藏空白更改
内联
并排
Showing
12 changed file
with
2806 addition
and
1044 deletion
+2806
-1044
bundlemanager/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/config.json
...nager/actsbundlemanageretstest/entry/src/main/config.json
+24
-1
bundlemanager/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/test/GetBundleInfoForSelf.test.ets
...est/entry/src/main/ets/test/GetBundleInfoForSelf.test.ets
+55
-0
bundlemanager/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/test/List.test.ets
...undlemanageretstest/entry/src/main/ets/test/List.test.ets
+2
-0
bundlemanager/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/resources/base/element/string.json
...etstest/entry/src/main/resources/base/element/string.json
+12
-0
bundlemanager/bundle_standard/bundlemanager/actsbundlemanagerstagetest/entry/src/main/ets/test/GetBundleInfoForSelf.test.ets
...est/entry/src/main/ets/test/GetBundleInfoForSelf.test.ets
+1098
-0
bundlemanager/bundle_standard/bundlemanager/actsbundlemanagerstagetest/entry/src/main/ets/test/GetSecondModule.test.ets
...tagetest/entry/src/main/ets/test/GetSecondModule.test.ets
+75
-0
bundlemanager/bundle_standard/bundlemanager/actsbundlemanagerstagetest/entry/src/main/ets/test/List.test.ets
...dlemanagerstagetest/entry/src/main/ets/test/List.test.ets
+4
-0
bundlemanager/bundle_standard/bundlemanager/actsbundlemanagerstagetest/entry/src/main/ets/test/Utils.ets
...sbundlemanagerstagetest/entry/src/main/ets/test/Utils.ets
+30
-0
bundlemanager/bundle_standard/bundlemanager/actsbundlemanagerstagetest/entry/src/main/module.json
...ger/actsbundlemanagerstagetest/entry/src/main/module.json
+253
-3
bundlemanager/bundle_standard/bundlemanager/actsbundlemanagerstagetest/entry/src/main/resources/base/element/string.json
...agetest/entry/src/main/resources/base/element/string.json
+4
-0
bundlemanager/zlib/actszipfileandunzipfiletest/src/main/js/test/actszipfileandunzipfiletest.test.js
...test/src/main/js/test/actszipfileandunzipfiletest.test.js
+1243
-1040
bundlemanager/zlib/actszlibtest/ActsZlibTest.cpp
bundlemanager/zlib/actszlibtest/ActsZlibTest.cpp
+6
-0
未找到文件。
bundlemanager/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/config.json
浏览文件 @
f0009239
...
...
@@ -20,7 +20,7 @@
"mainAbility"
:
"com.open.harmony.packagemag.MainAbility"
,
"deviceType"
:
[
"default"
,
"
defaul
t"
"
table
t"
],
"reqPermissions"
:
[
{
...
...
@@ -52,6 +52,7 @@
}
],
"visible"
:
true
,
"orientation"
:
"unspecified"
,
"srcPath"
:
"MainAbility"
,
"name"
:
".MainAbility"
,
"srcLanguage"
:
"ets"
,
...
...
@@ -81,6 +82,28 @@
"srcLanguage"
:
"ets"
,
"description"
:
"$string:description_serviceability"
,
"type"
:
"service"
},
{
"name"
:
".DataAbility"
,
"srcLanguage"
:
"ets"
,
"srcPath"
:
"MainAbility"
,
"icon"
:
"$media:icon"
,
"description"
:
"$string:DataAbility_desc"
,
"type"
:
"data"
,
"uri"
:
"dataability://com.open.harmony.packagemag.DataAbility"
},
{
"orientation"
:
"followRecent"
,
"formsEnabled"
:
false
,
"name"
:
".FollowRecentAbility"
,
"srcLanguage"
:
"ets"
,
"srcPath"
:
"MainAbility"
,
"icon"
:
"$media:icon"
,
"description"
:
"$string:PageAbility1_desc"
,
"label"
:
"$string:PageAbility1_label"
,
"type"
:
"page"
,
"visible"
:
true
,
"launchType"
:
"standard"
}
],
"js"
:
[
...
...
bundlemanager/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/test/GetBundleInfoForSelf.test.ets
0 → 100644
浏览文件 @
f0009239
/**
* 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 impligetProfileByAbilityEmptyAbilityCalled.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import bundle from '@ohos.bundle.bundleManager';
import util from "./Utils";
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from "hypium/index"
export default function getBundleInfoForSelf() {
describe('getBundleInfoForSelf', function () {
/*
* @tc.number: SUB_BMS_APPINFO_QUERY_0124
* @tc.name: getBundleInfoForSelfAbilityPro
* @tc.desc: Test getBundleInfoForSelf with ability flag(by promise).
*/
it('getBundleInfoForSelfAbilityPro', 0, async function (done) {
await bundle.getBundleInfoForSelf(
bundle.BundleFlag.GET_BUNDLE_INFO_WITH_HAP_MODULE | bundle.BundleFlag.GET_BUNDLE_INFO_WITH_ABILITY
).then(data => {
console.info("AbilityPro" + JSON.stringify(data.hapModulesInfo[0].abilitiesInfo[0]));
expect(data.hapModulesInfo[0].abilitiesInfo.length).assertEqual(5);
expect(data.hapModulesInfo[0].abilitiesInfo[0].type).assertEqual(bundle.AbilityType.DATA);
expect(data.hapModulesInfo[0].abilitiesInfo[0].orientation).assertEqual(bundle.DisplayOrientation.UNSPECIFIED);
expect(data.hapModulesInfo[0].abilitiesInfo[1].type).assertEqual(bundle.AbilityType.PAGE);
expect(data.hapModulesInfo[0].abilitiesInfo[1].orientation).assertEqual(bundle.DisplayOrientation.FOLLOW_RECENT);
expect(data.hapModulesInfo[0].abilitiesInfo[2].type).assertEqual(bundle.AbilityType.PAGE);
expect(data.hapModulesInfo[0].abilitiesInfo[2].orientation).assertEqual(bundle.DisplayOrientation.UNSPECIFIED);
expect(data.hapModulesInfo[0].abilitiesInfo[3].type).assertEqual(bundle.AbilityType.SERVICE);
expect(data.hapModulesInfo[0].abilitiesInfo[3].orientation).assertEqual(bundle.DisplayOrientation.UNSPECIFIED);
expect(data.hapModulesInfo[0].abilitiesInfo[4].type).assertEqual(bundle.AbilityType.PAGE);
expect(data.hapModulesInfo[0].abilitiesInfo[4].orientation).assertEqual(bundle.DisplayOrientation.UNSPECIFIED);
console.info("AbilityPro11" + JSON.stringify(data.hapModulesInfo[0].abilitiesInfo[0]));
done();
}).catch(err => {
console.info("getBundleInfoForSelf fail" + JSON.stringify(err));
expect(err).assertFail();
done();
})
})
})
}
\ No newline at end of file
bundlemanager/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/test/List.test.ets
浏览文件 @
f0009239
...
...
@@ -29,8 +29,10 @@ import getWindowPorperties from './getWindowProperties.test.ets';
import GetSecondModuleTest from './GetSecondModule.test.ets';
import GetInfoSync from './GetInfoSync.test.ets';
import GetResourceTest from './GetResourceTest.test.ets';
import getBundleInfoForSelf from './GetBundleInfoForSelf.test.ets';
export default function testsuite() {
getBundleInfoForSelf();
getBundleArchiveInfo();
queryExtensionAbilityInfos();
getAbilityIcon();
...
...
bundlemanager/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/resources/base/element/string.json
浏览文件 @
f0009239
...
...
@@ -27,6 +27,18 @@
{
"name"
:
"entry_description"
,
"value"
:
"entry_description"
},
{
"name"
:
"PageAbility1_desc"
,
"value"
:
"description"
},
{
"name"
:
"PageAbility1_label"
,
"value"
:
"label"
},
{
"name"
:
"DataAbility_desc"
,
"value"
:
"hap sample empty provider"
}
]
}
\ No newline at end of file
bundlemanager/bundle_standard/bundlemanager/actsbundlemanagerstagetest/entry/src/main/ets/test/GetBundleInfoForSelf.test.ets
0 → 100644
浏览文件 @
f0009239
此差异已折叠。
点击以展开。
bundlemanager/bundle_standard/bundlemanager/actsbundlemanagerstagetest/entry/src/main/ets/test/GetSecondModule.test.ets
0 → 100644
浏览文件 @
f0009239
/*
* 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 bundle from '@ohos.bundle.bundleManager';
import { describe, beforeAll, it, expect } from '@ohos/hypium'
export default function GetSecondModuleTest() {
describe('getSecondModuleTest', function () {
/**
* @tc.number SUB_BMS_APPINFO_QUERY_0138
* @tc.name GetSecondModuleTest
* @tc.desc Test the bundleManager secondary module
*/
it('GetSecondModuleTest', 0, async function (done) {
let bundleInfo = await bundle.getBundleInfoForSelf(
bundle.BundleFlag.GET_BUNDLE_INFO_WITH_APPLICATION |
bundle.BundleFlag.GET_BUNDLE_INFO_WITH_SIGNATURE_INFO |
bundle.BundleFlag.GET_BUNDLE_INFO_WITH_HAP_MODULE |
bundle.BundleFlag.GET_BUNDLE_INFO_WITH_METADATA |
bundle.BundleFlag.GET_BUNDLE_INFO_WITH_EXTENSION_ABILITY |
bundle.BundleFlag.GET_BUNDLE_INFO_WITH_ABILITY |
bundle.BundleFlag.GET_BUNDLE_INFO_WITH_REQUESTED_PERMISSION)
let applicationInfoTest: bundle.ApplicationInfo = bundleInfo.appInfo;
expect(typeof (applicationInfoTest.name)).assertEqual('string');
let metadataTest: bundle.Metadata = bundleInfo.hapModulesInfo[0].metadata[0];
expect(typeof (metadataTest.name)).assertEqual('string');
let bundleInfoTest: bundle.BundleInfo = bundleInfo;
expect(typeof (bundleInfoTest.name)).assertEqual('string');
let usedSceneTest: bundle.UsedScene = bundleInfo.reqPermissionDetails[0].usedScene
expect(typeof (usedSceneTest.abilities[0])).assertEqual('string');
let reqPermissionDetailsTest: bundle.ReqPermissionDetail = bundleInfo.reqPermissionDetails[0]
expect(typeof (reqPermissionDetailsTest.name)).assertEqual('string');
let signatureInfoTest: bundle.SignatureInfo = bundleInfo.signatureInfo;
expect(typeof (signatureInfoTest.appId)).assertEqual('string');
let hapModuleInfoTest: bundle.HapModuleInfo = bundleInfo.hapModulesInfo[0];
expect(typeof (hapModuleInfoTest.name)).assertEqual('string');
let abilityInfoTest: bundle.AbilityInfo = bundleInfo.hapModulesInfo[0].abilitiesInfo[0];
expect(typeof (abilityInfoTest.bundleName)).assertEqual('string');
let windowSizeTest: bundle.WindowSize = bundleInfo.hapModulesInfo[0].abilitiesInfo[0].windowSize;
expect(windowSizeTest.maxWindowRatio).assertEqual(0);
let extensionAbilityInfoTest: bundle.ExtensionAbilityInfo = bundleInfo.hapModulesInfo[0].extensionAbilitiesInfo[0];
expect(typeof (extensionAbilityInfoTest.bundleName)).assertEqual('string');
let elementNameExample = {
deviceId: "123456789",
bundleName: "bundleName",
moduleName:"moduleName",
abilityName: "abilityName",
uri:"uri",
shortName:"shortName"
}
let elementNameTest: bundle.ElementName = elementNameExample;
expect(elementNameTest.deviceId).assertEqual("123456789");
expect(elementNameTest.bundleName).assertEqual("bundleName");
expect(elementNameTest.moduleName).assertEqual("moduleName");
expect(elementNameTest.abilityName).assertEqual("abilityName");
expect(elementNameTest.uri).assertEqual("uri");
expect(elementNameTest.shortName).assertEqual("shortName");
done();
})
})
}
bundlemanager/bundle_standard/bundlemanager/actsbundlemanagerstagetest/entry/src/main/ets/test/List.test.ets
浏览文件 @
f0009239
...
...
@@ -15,8 +15,12 @@
import getProfileByAbility from './GetProfileByAbility.test.ets';
import getProfileByExtensionAbility from './GetProfileByExtensionAbility.test.ets';
import getBundleInfoForSelf from './GetBundleInfoForSelf.test.ets';
import getSecondModuleTest from './GetSecondModule.test.ets';
export default function testsuite() {
getProfileByAbility();
getProfileByExtensionAbility();
getBundleInfoForSelf();
getSecondModuleTest();
}
\ No newline at end of file
bundlemanager/bundle_standard/bundlemanager/actsbundlemanagerstagetest/entry/src/main/ets/test/Utils.ets
0 → 100644
浏览文件 @
f0009239
/**
* 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 class Utils {
static sleep(time) {
return new Promise((resolve, reject) => {
setTimeout((data) => {
resolve(data)
}, time)
}).then(() => {
console.info(`sleep ${time} over...`)
})
}
}
bundlemanager/bundle_standard/bundlemanager/actsbundlemanagerstagetest/entry/src/main/module.json
浏览文件 @
f0009239
...
...
@@ -4,9 +4,10 @@
"type"
:
"entry"
,
"srcEntrance"
:
"./ets/Application/AbilityStage.ts"
,
"description"
:
"$string:testModule_entry_dsc"
,
"mainElement"
:
"MainAbility"
,
"mainElement"
:
"
ohos.acts.bundle.stage.test.
MainAbility"
,
"deviceTypes"
:
[
"default"
"default"
,
"tablet"
],
"deliveryWithInstall"
:
true
,
"installationFree"
:
false
,
...
...
@@ -20,6 +21,7 @@
"icon"
:
"$media:icon"
,
"label"
:
"$string:entry_label"
,
"visible"
:
true
,
"launchType"
:
"singleton"
,
"orientation"
:
"portrait"
,
"skills"
:
[
{
...
...
@@ -66,7 +68,107 @@
"icon"
:
"$media:icon"
,
"label"
:
"$string:entry_label"
,
"visible"
:
true
,
"orientation"
:
"portrait"
,
"launchType"
:
"standard"
,
"orientation"
:
"landscape"
,
"skills"
:
[]
},
{
"name"
:
"ohos.acts.bundle.stage.test.MainAbility2"
,
"srcEntrance"
:
"./ets/MainAbility/MainAbility.ts"
,
"description"
:
"$string:testModule_entry_main"
,
"icon"
:
"$media:icon"
,
"label"
:
"$string:entry_label"
,
"visible"
:
true
,
"launchType"
:
"specified"
,
"orientation"
:
"landscape_inverted"
,
"skills"
:
[]
},
{
"name"
:
"ohos.acts.bundle.stage.test.MainAbility3"
,
"srcEntrance"
:
"./ets/MainAbility/MainAbility.ts"
,
"description"
:
"$string:testModule_entry_main"
,
"icon"
:
"$media:icon"
,
"label"
:
"$string:entry_label"
,
"visible"
:
true
,
"launchType"
:
"specified"
,
"orientation"
:
"portrait_inverted"
,
"skills"
:
[]
},
{
"name"
:
"ohos.acts.bundle.stage.test.MainAbility4"
,
"srcEntrance"
:
"./ets/MainAbility/MainAbility.ts"
,
"description"
:
"$string:testModule_entry_main"
,
"icon"
:
"$media:icon"
,
"label"
:
"$string:entry_label"
,
"visible"
:
true
,
"launchType"
:
"specified"
,
"orientation"
:
"auto_rotation"
,
"skills"
:
[]
},
{
"name"
:
"ohos.acts.bundle.stage.test.MainAbility5"
,
"srcEntrance"
:
"./ets/MainAbility/MainAbility.ts"
,
"description"
:
"$string:testModule_entry_main"
,
"icon"
:
"$media:icon"
,
"label"
:
"$string:entry_label"
,
"visible"
:
true
,
"launchType"
:
"specified"
,
"orientation"
:
"auto_rotation_landscape"
,
"skills"
:
[]
},
{
"name"
:
"ohos.acts.bundle.stage.test.MainAbility6"
,
"srcEntrance"
:
"./ets/MainAbility/MainAbility.ts"
,
"description"
:
"$string:testModule_entry_main"
,
"icon"
:
"$media:icon"
,
"label"
:
"$string:entry_label"
,
"visible"
:
true
,
"launchType"
:
"specified"
,
"orientation"
:
"auto_rotation_portrait"
,
"skills"
:
[]
},
{
"name"
:
"ohos.acts.bundle.stage.test.MainAbility7"
,
"srcEntrance"
:
"./ets/MainAbility/MainAbility.ts"
,
"description"
:
"$string:testModule_entry_main"
,
"icon"
:
"$media:icon"
,
"label"
:
"$string:entry_label"
,
"visible"
:
true
,
"launchType"
:
"specified"
,
"orientation"
:
"auto_rotation_restricted"
,
"skills"
:
[]
},
{
"name"
:
"ohos.acts.bundle.stage.test.MainAbility8"
,
"srcEntrance"
:
"./ets/MainAbility/MainAbility.ts"
,
"description"
:
"$string:testModule_entry_main"
,
"icon"
:
"$media:icon"
,
"label"
:
"$string:entry_label"
,
"visible"
:
true
,
"launchType"
:
"specified"
,
"orientation"
:
"auto_rotation_landscape_restricted"
,
"skills"
:
[]
},
{
"name"
:
"ohos.acts.bundle.stage.test.MainAbility9"
,
"srcEntrance"
:
"./ets/MainAbility/MainAbility.ts"
,
"description"
:
"$string:testModule_entry_main"
,
"icon"
:
"$media:icon"
,
"label"
:
"$string:entry_label"
,
"visible"
:
true
,
"launchType"
:
"specified"
,
"orientation"
:
"auto_rotation_portrait_restricted"
,
"skills"
:
[]
},
{
"name"
:
"ohos.acts.bundle.stage.test.MainAbility10"
,
"srcEntrance"
:
"./ets/MainAbility/MainAbility.ts"
,
"description"
:
"$string:testModule_entry_main"
,
"icon"
:
"$media:icon"
,
"label"
:
"$string:entry_label"
,
"visible"
:
true
,
"launchType"
:
"specified"
,
"orientation"
:
"locked"
,
"skills"
:
[]
}
],
...
...
@@ -76,6 +178,7 @@
"descriptionId"
:
16777219
,
"icon"
:
"$media:icon"
,
"iconId"
:
16777225
,
"label"
:
"$string:entry_label"
,
"metadata"
:
[
{
"name"
:
"ohos.extension.form"
,
...
...
@@ -113,11 +216,158 @@
"descriptionId"
:
16777219
,
"icon"
:
"$media:icon"
,
"iconId"
:
16777225
,
"label"
:
"$string:entry_label"
,
"name"
:
"Form1"
,
"srcEntrance"
:
"./ets/FormAbility/FormAbility.ts"
,
"type"
:
"form"
,
"visible"
:
true
},
{
"description"
:
"$string:form_description"
,
"descriptionId"
:
16777219
,
"icon"
:
"$media:icon"
,
"iconId"
:
16777225
,
"label"
:
"$string:entry_label"
,
"name"
:
"workScheduler"
,
"srcEntrance"
:
"./ets/FormAbility/FormAbility.ts"
,
"type"
:
"workScheduler"
,
"visible"
:
true
},
{
"description"
:
"$string:form_description"
,
"descriptionId"
:
16777219
,
"icon"
:
"$media:icon"
,
"iconId"
:
16777225
,
"label"
:
"$string:entry_label"
,
"name"
:
"inputMethod"
,
"srcEntrance"
:
"./ets/FormAbility/FormAbility.ts"
,
"type"
:
"inputMethod"
,
"visible"
:
true
},
{
"description"
:
"$string:form_description"
,
"descriptionId"
:
16777219
,
"icon"
:
"$media:icon"
,
"iconId"
:
16777225
,
"label"
:
"$string:entry_label"
,
"name"
:
"accessibility"
,
"srcEntrance"
:
"./ets/FormAbility/FormAbility.ts"
,
"type"
:
"accessibility"
,
"visible"
:
true
},
{
"description"
:
"$string:form_description"
,
"descriptionId"
:
16777219
,
"icon"
:
"$media:icon"
,
"iconId"
:
16777225
,
"label"
:
"$string:entry_label"
,
"name"
:
"fileShare"
,
"srcEntrance"
:
"./ets/FormAbility/FormAbility.ts"
,
"type"
:
"fileShare"
,
"visible"
:
true
},
{
"description"
:
"$string:form_description"
,
"descriptionId"
:
16777219
,
"icon"
:
"$media:icon"
,
"iconId"
:
16777225
,
"label"
:
"$string:entry_label"
,
"name"
:
"staticSubscriber"
,
"srcEntrance"
:
"./ets/FormAbility/FormAbility.ts"
,
"type"
:
"staticSubscriber"
,
"visible"
:
true
},
{
"description"
:
"$string:form_description"
,
"descriptionId"
:
16777219
,
"icon"
:
"$media:icon"
,
"iconId"
:
16777225
,
"label"
:
"$string:entry_label"
,
"name"
:
"wallpaper"
,
"srcEntrance"
:
"./ets/FormAbility/FormAbility.ts"
,
"type"
:
"wallpaper"
,
"visible"
:
true
},
{
"description"
:
"$string:form_description"
,
"descriptionId"
:
16777219
,
"icon"
:
"$media:icon"
,
"iconId"
:
16777225
,
"label"
:
"$string:entry_label"
,
"name"
:
"backup"
,
"srcEntrance"
:
"./ets/FormAbility/FormAbility.ts"
,
"type"
:
"backup"
,
"visible"
:
true
},
{
"description"
:
"$string:form_description"
,
"descriptionId"
:
16777219
,
"icon"
:
"$media:icon"
,
"iconId"
:
16777225
,
"label"
:
"$string:entry_label"
,
"name"
:
"window"
,
"srcEntrance"
:
"./ets/FormAbility/FormAbility.ts"
,
"type"
:
"window"
,
"visible"
:
true
},
{
"description"
:
"$string:form_description"
,
"descriptionId"
:
16777219
,
"icon"
:
"$media:icon"
,
"iconId"
:
16777225
,
"label"
:
"$string:entry_label"
,
"name"
:
"enterpriseAdmin"
,
"srcEntrance"
:
"./ets/FormAbility/FormAbility.ts"
,
"type"
:
"enterpriseAdmin"
,
"visible"
:
true
},
{
"description"
:
"$string:form_description"
,
"descriptionId"
:
16777219
,
"icon"
:
"$media:icon"
,
"iconId"
:
16777225
,
"label"
:
"$string:entry_label"
,
"name"
:
"thumbnail"
,
"srcEntrance"
:
"./ets/FormAbility/FormAbility.ts"
,
"type"
:
"thumbnail"
,
"visible"
:
true
},
{
"description"
:
"$string:form_description"
,
"descriptionId"
:
16777219
,
"icon"
:
"$media:icon"
,
"iconId"
:
16777225
,
"label"
:
"$string:entry_label"
,
"name"
:
"preview"
,
"srcEntrance"
:
"./ets/FormAbility/FormAbility.ts"
,
"type"
:
"preview"
,
"visible"
:
true
}
],
"requestPermissions"
:
[
{
"name"
:
"ohos.permission.GET_BUNDLE_INFO"
,
"reason"
:
"$string:permission_reason"
,
"usedScene"
:
{
"abilities"
:
[
"MainAbility"
],
"when"
:
"always"
}
},
{
"name"
:
"ohos.permission.READ_CALENDAR"
,
"reason"
:
"$string:permission_reason"
,
"usedScene"
:
{
"abilities"
:
[
"MainAbility"
],
"when"
:
"inuse"
}
}
],
"metadata"
:
[
{
"name"
:
"MetaData1"
,
"value"
:
"MetaDataValue"
,
"resource"
:
"$profile:shortcuts_config"
}
]
}
}
bundlemanager/bundle_standard/bundlemanager/actsbundlemanagerstagetest/entry/src/main/resources/base/element/string.json
浏览文件 @
f0009239
...
...
@@ -35,6 +35,10 @@
{
"name"
:
"form_FormAbility_label"
,
"value"
:
"form_label"
},
{
"name"
:
"permission_reason"
,
"value"
:
"Need permission"
}
]
}
bundlemanager/zlib/actszipfileandunzipfiletest/src/main/js/test/actszipfileandunzipfiletest.test.js
浏览文件 @
f0009239
此差异已折叠。
点击以展开。
bundlemanager/zlib/actszlibtest/ActsZlibTest.cpp
浏览文件 @
f0009239
...
...
@@ -18,6 +18,7 @@
#include <cstdlib>
#include <fstream>
#include <gtest/gtest.h>
#include <mutex>
#include <securec.h>
#include <sstream>
#include <string>
...
...
@@ -38,9 +39,12 @@ static int SIX = 6;
static
int
EIGHT
=
8
;
static
int
GARBAGE_LEN
=
strlen
(
GARBAGE
);
static
unsigned
BUFFER_SIZE
=
8192
;
std
::
mutex
gzMutex_
;
std
::
mutex
puMutex_
;
static
unsigned
pull
(
void
*
desc
,
unsigned
char
**
buf
)
{
std
::
lock_guard
<
std
::
mutex
>
lock
(
puMutex_
);
static
unsigned
int
next
=
0
;
static
unsigned
char
dat
[]
=
{
0x63
,
0
,
2
,
0
};
...
...
@@ -53,12 +57,14 @@ static unsigned pull(void *desc, unsigned char **buf)
static
int
push
(
void
*
desc
,
unsigned
char
*
buf
,
unsigned
len
)
{
std
::
lock_guard
<
std
::
mutex
>
lock
(
puMutex_
);
buf
+=
len
;
return
desc
!=
nullptr
;
/* force error if desc not null */
}
static
int
TestGzPrintf
(
gzFile
file
,
const
char
*
format
,
...)
{
std
::
lock_guard
<
std
::
mutex
>
lock
(
gzMutex_
);
va_list
va
;
int
ret
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录