提交 64e30b4e 编写于 作者: C chengxingzhen

XTS元能力编译问题整改

Signed-off-by: Nchengxingzhen <chengxingzhen@huawei.com>
上级 16ad42f5

要显示的变更太多。

To preserve performance only 1000 of 1000+ files are displayed.
# 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("//build/ohos_var.gni")
group("aafwk") {
testonly = true
if (is_standard_system) {
deps = [ "aafwk_standard:aafwk_standard" ]
}
}
# 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("//build/ohos_var.gni")
group("aafwk_standard") {
testonly = true
if (is_standard_system) {
deps = [
"abilitymanager:actsabilitymanagertest",
"abilitymultiinstance:abilitymultiinstance",
"actsabilitydelegatorcase:ActsAbilityDelegatorCaseTest",
"actsabilitylifecyclestatenew:ActsAbilityLifecycleStateNewTest",
"actsabilitymanageretstest:ActsAbilityManagerEtsTest",
"actscalltest:actscalltest",
"actsfwkdataaccessortest:dataability",
"actsserviceabilityclienttest:serviceability",
"actsstartcomponenttest:actsstartcomponenttest",
"actsstserviceabilityclientcase:ActsStServiceAbilityClientCaseTest",
"actsusers:actsusers",
"amscontextualinforquery:amscontextualinforquery",
"amsdatauriutils:ActsAmsDataUriUtilsTest",
"amsdisplayIdtest:amsdisplayIdtest",
"amsgetabilityprocessinfo:amsgetabilityprocessinfo",
"context:context",
"fa:fa",
"featureability:featureability",
"formmanager:formmanager",
"killprocesswithaccountstage:killprocesswithaccountstage",
"newwant:newwant",
"non_concurrent:non_concurrent",
"processmultiinstance:processmultiinstance",
"stage:stage",
"want:want",
"zidltest:zidltest",
]
}
}
{
"app": {
"bundleName": "com.example.actsamscallbackfifthscene",
"vendor": "example",
"version": {
"code": 1,
"name": "1.0"
},
"apiVersion": {
"compatible": 4,
"target": 5,
"releaseType": "Beta1"
}
},
"deviceConfig": {},
"module": {
"package": "com.example.actsamscallbackfifthscene",
"name": ".MyApplication",
"deviceType": [
"phone"
],
"distro": {
"deliveryWithInstall": true,
"moduleName": "entry",
"moduleType": "entry",
"installationFree": true
},
"abilities": [
{
"visible": true,
"name": "com.example.actsamscallbackfifthscene.MainAbility",
"icon": "$media:icon",
"description": "$string:mainability_description",
"label": "$string:app_name",
"type": "page",
"isVisible": "true",
"launchType": "singleton"
}
],
"reqPermissions": [
{
"name": "ohos.permission.INSTALL_BUNDLE",
"reason": "need use ohos.permission.INSTALL_BUNDLE"
},
{
"name":"ohos.permission.GET_BUNDLE_INFO_PRIVILEGED",
"reason":"need use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED"
},
{
"name":"ohos.permission.CHANGE_ABILITY_ENABLED_STATE",
"reason":"need use ohos.permission.CHANGE_ABILITY_ENABLED_STATE"
},
{
"name":"ohos.permission.REMOVE_CACHE_FILES",
"reason":"need use ohos.permission.REMOVE_CACHE_FILES"
},
{
"name":"ohos.permission.LISTEN_BUNDLE_CHANGE",
"reason":"need use ohos.permission.LISTEN_BUNDLE_CHANGE"
},
{
"name":"ohos.permission.CLEAN_BACKGROUND_PROCESSES",
"reason":"need use ohos.permission.CLEAN_BACKGROUND_PROCESSES"
},
{
"name":"ohos.permission.MANAGE_MISSIONS",
"reason":"need use ohos.permission.MANAGE_MISSIONS"
}
],
"js": [
{
"pages": [
"pages/index/index"
],
"name": "default",
"window": {
"designWidth": 720,
"autoDesignWidth": false
}
}
]
}
}
\ No newline at end of file
/*
* 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');
}
};
/*
* 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.
*/
.container {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
left: 0px;
top: 0px;
width: 100%;
height: 100%;
}
.title {
font-size: 60px;
text-align: center;
width: 100%;
height: 40%;
margin: 10px;
}
.btn {
width: 50%;
height: 100px;
font-size: 40px;
}
<!--
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.
-->
<div class="container" onswipe="touchMove">
<text class="title">
{{ $t('strings.hello') }} {{title}}
</text>
<input class="btn" type="button" value="{{ $t('strings.next') }}" onclick="onclick"></input>
</div>
{
"string": [
{
"name": "app_name",
"value": "JsHelloWorld"
},
{
"name": "mainability_description",
"value": "hap sample empty page"
}
]
}
\ No newline at end of file
/*
* 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 featureAbility from '@ohos.ability.featureAbility'
import appManager from "@ohos.application.appManager"
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index'
let abilityNameList = [
"com.ohos.launcher.MainAbility",
"com.ohos.callui.ServiceAbility",
"com.example.SimulateFeatureAbilityFir",
"com.example.VerifyIoThirdAbility",
"com.example.SimulateFeatureAbilitySed",
"com.example.actsamscallbackfifthscene.MainAbility"
]
let bundleNameList = [
"com.ohos.launcher",
"com.ohos.systemui",
"com.ohos.callui",
"com.ohos.contacts",
"com.ohos.mms",
"com.ohos.telephonydataability",
"com.ohos.contactsdataability",
"com.ix.simulate.feature",
"com.ix.verify.io",
"com.example.actsamscallbackfifthscene"
]
describe('ActsAmsCallBackFifthScene', function () {
console.info('----ActsAmsCallBackFifthScene----');
beforeAll(async function (done) {
await featureAbility.startAbility(
{
want:
{
deviceId: "",
bundleName: "com.ix.simulate.feature",
abilityName: "com.example.SimulateFeatureAbilityFir",
action: "action1",
parameters:
{},
},
}, (error, data) => {
console.info('ActsAmsCallBackFifthScene SimulateFeatureAbilityFir start, error.code \
' + error.code + ', data length [' + data.length + ']');
}
);
await featureAbility.startAbility(
{
want:
{
deviceId: "",
bundleName: "com.ix.verify.io",
abilityName: "com.example.VerifyIoThirdAbility",
action: "action1",
parameters:
{},
},
}, (error, data) => {
console.info('ActsAmsCallBackFifthScene VerifyIoThirdAbility start, error.code \
' + error.code + ', data length [' + data.length + ']');
}
);
await featureAbility.startAbility(
{
want:
{
deviceId: "",
bundleName: "com.ix.simulate.feature",
abilityName: "com.example.SimulateFeatureAbilitySed",
action: "action1",
parameters:
{},
},
}, (error, data) => {
console.info('ActsAmsCallBackFifthScene SimulateFeatureAbilitySed start, error.code \
' + error.code + ', data length [' + data.length + ']');
}
);
setTimeout(done, 5000);
});
function timeout(done) {
expect().assertFail();
console.debug('Acts_Ams_test=========timeout========');
done();
}
function sleep(delay) {
let start = new Date().getTime();
while (true) {
if (new Date().getTime() - start > delay) {
break;
}
}
}
/*
* @tc.number : Acts_Ams_test_6600
* @tc.name : getProcessRunningInfos : Get All Running Processes Info
* @tc.desc : Get All Running Processes Info(by CallBack)
*/
it('Acts_Ams_test_6600', 0, async function (done) {
console.info("sleep begin");
sleep(5000);
console.info("sleep end");
appManager.getProcessRunningInfos(
(error, info) => {
console.info('Acts_Ams_test_6600 getProcessRunningInfos error.code \
' + error.code + ', data length [' + info.length + ']');
expect(Array.isArray(info)).assertEqual(true);
expect(info.length).assertLarger(0);
for (let i = 0; i < info.length; i++) {
console.info('Acts_Ams_test_6600 getProcessRunningInfo[' + i + "]: " + JSON.stringify(info[i]));
expect(typeof (info[i].pid)).assertEqual("number");
expect(info[i].pid).assertLarger(0);
expect(typeof (info[i].processName)).assertEqual("string");
expect(info[i].processName.length).assertLarger(0);
expect(Array.isArray(info[i].bundleNames)).assertEqual(true);
expect(info[i].bundleNames.length).assertEqual(0);
expect(typeof (info[i].uid)).assertEqual("number");
expect(info[i].uid).assertLarger(0);
}
done();
}
);
})
})
\ No newline at end of file
{
"app": {
"bundleName": "com.example.actsamscallbackfirstscene",
"vendor": "example",
"version": {
"code": 1,
"name": "1.0"
},
"apiVersion": {
"compatible": 4,
"target": 5,
"releaseType": "Beta1"
}
},
"deviceConfig": {},
"module": {
"package": "com.example.actsamscallbackfirstscene",
"name": ".MyApplication",
"deviceType": [
"phone"
],
"distro": {
"deliveryWithInstall": true,
"moduleName": "entry",
"moduleType": "entry",
"installationFree": true
},
"abilities": [
{
"visible": true,
"name": "com.example.actsamscallbackfirstscene.MainAbility",
"icon": "$media:icon",
"description": "$string:mainability_description",
"label": "$string:app_name",
"type": "page",
"isVisible": "true",
"launchType": "singleton"
}
],
"reqPermissions": [
{
"name": "ohos.permission.INSTALL_BUNDLE",
"reason": "need use ohos.permission.INSTALL_BUNDLE"
},
{
"name":"ohos.permission.GET_BUNDLE_INFO_PRIVILEGED",
"reason":"need use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED"
},
{
"name":"ohos.permission.CHANGE_ABILITY_ENABLED_STATE",
"reason":"need use ohos.permission.CHANGE_ABILITY_ENABLED_STATE"
},
{
"name":"ohos.permission.REMOVE_CACHE_FILES",
"reason":"need use ohos.permission.REMOVE_CACHE_FILES"
},
{
"name":"ohos.permission.LISTEN_BUNDLE_CHANGE",
"reason":"need use ohos.permission.LISTEN_BUNDLE_CHANGE"
},
{
"name":"ohos.permission.CLEAN_BACKGROUND_PROCESSES",
"reason":"need use ohos.permission.CLEAN_BACKGROUND_PROCESSES"
},
{
"name":"ohos.permission.MANAGE_MISSIONS",
"reason":"need use ohos.permission.MANAGE_MISSIONS"
},
{
"name":"ohos.permission.GET_RUNNING_INFO",
"reason":"need use ohos.permission.GET_RUNNING_INFO"
}
],
"js": [
{
"pages": [
"pages/index/index"
],
"name": "default",
"window": {
"designWidth": 720,
"autoDesignWidth": false
}
}
]
}
}
\ No newline at end of file
/*
* 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');
}
};
/*
* 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.
*/
.container {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
left: 0px;
top: 0px;
width: 100%;
height: 100%;
}
.title {
font-size: 60px;
text-align: center;
width: 100%;
height: 40%;
margin: 10px;
}
.btn {
width: 50%;
height: 100px;
font-size: 40px;
}
<!--
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.
-->
<div class="container" onswipe="touchMove">
<text class="title">
{{ $t('strings.hello') }} {{title}}
</text>
<input class="btn" type="button" value="{{ $t('strings.next') }}" onclick="onclick"></input>
</div>
{
"string": [
{
"name": "app_name",
"value": "JsHelloWorld"
},
{
"name": "mainability_description",
"value": "hap sample empty page"
}
]
}
\ No newline at end of file
/*
* 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 featureAbility from '@ohos.ability.featureAbility'
import appManager from "@ohos.application.appManager"
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit'
describe('ActsAmsCallBackFirstScene', function () {
console.info('----ActsAmsCallBackFirstScene----');
beforeAll(async function (done) {
await featureAbility.startAbility(
{
want:
{
deviceId: "",
bundleName: "com.ix.simulate.feature",
abilityName: "com.example.SimulateFeatureAbilityFir",
action: "action1",
parameters:
{},
},
}, (error, data) => {
console.info('ActsAmsCallBackFirstScene SimulateFeatureAbilityFir start, error.code \
' + error.code + ', data length [' + data.length + ']');
}
);
done();
});
function timeout(done) {
expect().assertFail();
console.debug('Acts_Ams_test=========timeout========');
done();
}
function sleep(delay) {
var start = new Date().getTime();
while (true) {
if (new Date().getTime() - start > delay) {
break;
}
}
}
/*
* @tc.number : Acts_Ams_test_0200
* @tc.name : getProcessRunningInfos : Get All Running Processes Info
* @tc.desc : Get All Running Processes Info(by CallBack)
*/
it('Acts_Ams_test_0200', 0, async function (done) {
console.info("sleep begin");
sleep(5000);
console.info("sleep end");
appManager.getProcessRunningInfos(
(error, info) => {
console.info('Acts_Ams_test_0200 getProcessRunningInfos error.code \
' + error.code + ', data length [' + info.length + ']');
expect(Array.isArray(info)).assertEqual(true);
expect(info.length).assertLarger(0);
for (var i = 0; i < info.length; i++) {
console.info('Acts_Ams_test_0200 getProcessRunningInfo[' + i + "]: " + JSON.stringify(info[i]));
expect(typeof (info[i].pid)).assertEqual("number");
expect(info[i].pid).assertLarger(0);
expect(typeof (info[i].processName)).assertEqual("string");
expect(info[i].processName.length).assertLarger(0);
expect(Array.isArray(info[i].bundleNames)).assertEqual(true);
expect(info[i].bundleNames.length).assertEqual(0);
expect(typeof (info[i].uid)).assertEqual("number");
expect(info[i].uid).assertLarger(0);
}
done();
});
})
})
\ No newline at end of file
{
"app": {
"bundleName": "com.example.actsamscallbackfourthscene",
"vendor": "example",
"version": {
"code": 1,
"name": "1.0"
},
"apiVersion": {
"compatible": 4,
"target": 5,
"releaseType": "Beta1"
}
},
"deviceConfig": {},
"module": {
"package": "com.example.actsamscallbackfourthscene",
"name": ".MyApplication",
"deviceType": [
"phone"
],
"distro": {
"deliveryWithInstall": true,
"moduleName": "entry",
"moduleType": "entry",
"installationFree": true
},
"abilities": [
{
"visible": true,
"name": "com.example.actsamscallbackfourthscene.MainAbility",
"icon": "$media:icon",
"description": "$string:mainability_description",
"label": "$string:app_name",
"type": "page",
"isVisible": "true",
"launchType": "singleton"
}
],
"reqPermissions": [
{
"name": "ohos.permission.INSTALL_BUNDLE",
"reason": "need use ohos.permission.INSTALL_BUNDLE"
},
{
"name":"ohos.permission.GET_BUNDLE_INFO_PRIVILEGED",
"reason":"need use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED"
},
{
"name":"ohos.permission.CHANGE_ABILITY_ENABLED_STATE",
"reason":"need use ohos.permission.CHANGE_ABILITY_ENABLED_STATE"
},
{
"name":"ohos.permission.REMOVE_CACHE_FILES",
"reason":"need use ohos.permission.REMOVE_CACHE_FILES"
},
{
"name":"ohos.permission.LISTEN_BUNDLE_CHANGE",
"reason":"need use ohos.permission.LISTEN_BUNDLE_CHANGE"
},
{
"name":"ohos.permission.CLEAN_BACKGROUND_PROCESSES",
"reason":"need use ohos.permission.CLEAN_BACKGROUND_PROCESSES"
},
{
"name":"ohos.permission.MANAGE_MISSIONS",
"reason":"need use ohos.permission.MANAGE_MISSIONS"
},
{
"name":"ohos.permission.GET_RUNNING_INFO",
"reason":"need use ohos.permission.GET_RUNNING_INFO"
}
],
"js": [
{
"pages": [
"pages/index/index"
],
"name": "default",
"window": {
"designWidth": 720,
"autoDesignWidth": false
}
}
]
}
}
\ No newline at end of file
/*
* 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');
}
};
/*
* 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.
*/
.container {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
left: 0px;
top: 0px;
width: 100%;
height: 100%;
}
.title {
font-size: 60px;
text-align: center;
width: 100%;
height: 40%;
margin: 10px;
}
.btn {
width: 50%;
height: 100px;
font-size: 40px;
}
<!--
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.
-->
<div class="container" onswipe="touchMove">
<text class="title">
{{ $t('strings.hello') }} {{title}}
</text>
<input class="btn" type="button" value="{{ $t('strings.next') }}" onclick="onclick"></input>
</div>
{
"string": [
{
"name": "app_name",
"value": "JsHelloWorld"
},
{
"name": "mainability_description",
"value": "hap sample empty page"
}
]
}
\ No newline at end of file
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import featureAbility from '@ohos.ability.featureAbility'
import appManager from "@ohos.application.appManager"
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index'
describe('ActsAmsCallBackFourthScene', function () {
console.info('----ActsAmsCallBackFourthScene----');
beforeAll(async function (done) {
await featureAbility.startAbility(
{
want:
{
deviceId: "",
bundleName: "com.ix.verify.io",
abilityName: "com.example.VerifyIoThirdAbility",
action: "action1",
parameters:
{},
},
}, (error, data) => {
console.info('ActsAmsCallBackFourthScene VerifyIoThirdAbility start, error.code \
' + error.code + ', data length [' + data.length + ']');
}
);
await featureAbility.startAbility(
{
want:
{
deviceId: "",
bundleName: "com.ix.simulate.feature",
abilityName: "com.example.SimulateFeatureAbilityFir",
action: "action1",
parameters:
{},
},
}, (error, data) => {
console.info('ActsAmsCallBackFourthScene SimulateFeatureAbilityFir start, error.code \
' + error.code + ', data length [' + data.length + ']');
}
);
await featureAbility.startAbility(
{
want:
{
deviceId: "",
bundleName: "com.ix.verify.act",
abilityName: "com.example.VerifyActThirdAbility",
action: "action1",
parameters:
{},
},
}, (error, data) => {
console.info('ActsAmsCallBackFourthScene VerifyActThirdAbility start, error.code \
' + error.code + ', data length [' + data.length + ']');
}
);
await featureAbility.startAbility(
{
want:
{
deviceId: "",
bundleName: "com.ix.simulate.entry",
abilityName: "com.example.SimulateEntryAbilityFir",
action: "action1",
parameters:
{},
},
}, (error, data) => {
console.info('ActsAmsCallBackFourthScene SimulateEntryAbilityFir start, error.code \
' + error.code + ', data length [' + data.length + ']');
}
);
done();
});
function timeout(done) {
expect().assertFail();
console.debug('Acts_Ams_test=========timeout========');
done();
}
function sleep(delay) {
let start = new Date().getTime();
while (true) {
if (new Date().getTime() - start > delay) {
break;
}
}
}
/*
* @tc.number : Acts_Ams_test_5000
* @tc.name : getProcessRunningInfos : Get All Running Processes Info
* @tc.desc : Get All Running Processes Info(by CallBack)
*/
it('Acts_Ams_test_5000', 0, async function (done) {
console.info("sleep begin");
sleep(5000);
console.info("sleep end");
appManager.getProcessRunningInfos(
(error, info) => {
console.info('Acts_Ams_test_5000 getProcessRunningInfos error.code \
' + error.code + ', data length [' + info.length + ']');
expect(Array.isArray(info)).assertEqual(true);
expect(info.length).assertLarger(0);
for (let i = 0; i < info.length; i++) {
console.info('Acts_Ams_test_5000 getProcessRunningInfo[' + i + "]: " + JSON.stringify(info[i]));
expect(typeof (info[i].pid)).assertEqual("number");
expect(info[i].pid).assertLarger(0);
expect(typeof (info[i].processName)).assertEqual("string");
expect(info[i].processName.length).assertLarger(0);
expect(Array.isArray(info[i].bundleNames)).assertEqual(true);
expect(info[i].bundleNames.length).assertEqual(0);
expect(typeof (info[i].uid)).assertEqual("number");
expect(info[i].uid).assertLarger(0);
}
done();
});
})
})
\ No newline at end of file
/*
* 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');
}
};
/*
* 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.
*/
.container {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
left: 0px;
top: 0px;
width: 100%;
height: 100%;
}
.title {
font-size: 60px;
text-align: center;
width: 100%;
height: 40%;
margin: 10px;
}
.btn {
width: 50%;
height: 100px;
font-size: 40px;
}
<!--
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.
-->
<div class="container" onswipe="touchMove">
<text class="title">
{{ $t('strings.hello') }} {{title}}
</text>
<input class="btn" type="button" value="{{ $t('strings.next') }}" onclick="onclick"></input>
</div>
{
"string": [
{
"name": "app_name",
"value": "JsHelloWorld"
},
{
"name": "mainability_description",
"value": "hap sample empty page"
}
]
}
\ No newline at end of file
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import featureAbility from '@ohos.ability.featureAbility'
import appManager from "@ohos.application.appManager"
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit'
describe('ActsAmsCallBackSecondScene', function () {
console.info('----ActsAmsCallBackSecondScene----');
beforeAll(async function (done) {
await featureAbility.startAbility(
{
want:
{
deviceId: "",
bundleName: "com.ix.verify.io",
abilityName: "com.example.VerifyIoThirdAbility",
action: "action1",
parameters:
{},
},
}, (error, data) => {
console.info('ActsAmsCallBackSecondScene VerifyIoThirdAbility start, error.code \
' + error.code + ', data length [' + data.length + ']');
}
);
await featureAbility.startAbility(
{
want:
{
deviceId: "",
bundleName: "com.ix.simulate.feature",
abilityName: "com.example.SimulateFeatureAbilityFir",
action: "action1",
parameters:
{},
},
}, (error, data) => {
console.info('ActsAmsCallBackSecondScene SimulateFeatureAbilityFir start, error.code \
' + error.code + ', data length [' + data.length + ']');
}
);
done();
});
function timeout(done) {
expect().assertFail();
console.debug('Acts_Ams_test=========timeout========');
done();
}
function sleep(delay) {
let start = new Date().getTime();
while (true) {
if (new Date().getTime() - start > delay) {
break;
}
}
}
/*
* @tc.number : Acts_Ams_test_1800
* @tc.name : getProcessRunningInfos : Get All Running Processes Info
* @tc.desc : Get All Running Processes Info(by CallBack)
*/
it('Acts_Ams_test_1800', 0, async function (done) {
console.info("sleep begin");
sleep(5000);
console.info("sleep end");
appManager.getProcessRunningInfos(
(error, info) => {
console.info('Acts_Ams_test_1800 getProcessRunningInfos error.code \
' + error.code + ', data length [' + info.length + ']');
expect(Array.isArray(info)).assertEqual(true);
expect(info.length).assertLarger(0);
for (let i = 0; i < info.length; i++) {
console.info('Acts_Ams_test_1800 getProcessRunningInfo[' + i + "]: " + JSON.stringify(info[i]));
expect(typeof (info[i].pid)).assertEqual("number");
expect(info[i].pid).assertLarger(0);
expect(typeof (info[i].processName)).assertEqual("string");
expect(info[i].processName.length).assertLarger(0);
expect(Array.isArray(info[i].bundleNames)).assertEqual(true);
expect(info[i].bundleNames.length).assertEqual(0);
expect(typeof (info[i].uid)).assertEqual("number");
expect(info[i].uid).assertLarger(0);
}
done();
});
})
})
\ No newline at end of file
{
"app": {
"bundleName": "com.example.actsamscallbackthirdscene",
"vendor": "example",
"version": {
"code": 1,
"name": "1.0"
},
"apiVersion": {
"compatible": 4,
"target": 5,
"releaseType": "Beta1"
}
},
"deviceConfig": {},
"module": {
"package": "com.example.actsamscallbackthirdscene",
"name": ".MyApplication",
"deviceType": [
"phone"
],
"distro": {
"deliveryWithInstall": true,
"moduleName": "entry",
"moduleType": "entry",
"installationFree": true
},
"abilities": [
{
"visible": true,
"name": "com.example.actsamscallbackthirdscene.MainAbility",
"icon": "$media:icon",
"description": "$string:mainability_description",
"label": "$string:app_name",
"type": "page",
"isVisible": "true",
"launchType": "singleton"
}
],
"reqPermissions": [
{
"name": "ohos.permission.INSTALL_BUNDLE",
"reason": "need use ohos.permission.INSTALL_BUNDLE"
},
{
"name":"ohos.permission.GET_BUNDLE_INFO_PRIVILEGED",
"reason":"need use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED"
},
{
"name":"ohos.permission.CHANGE_ABILITY_ENABLED_STATE",
"reason":"need use ohos.permission.CHANGE_ABILITY_ENABLED_STATE"
},
{
"name":"ohos.permission.REMOVE_CACHE_FILES",
"reason":"need use ohos.permission.REMOVE_CACHE_FILES"
},
{
"name":"ohos.permission.LISTEN_BUNDLE_CHANGE",
"reason":"need use ohos.permission.LISTEN_BUNDLE_CHANGE"
},
{
"name":"ohos.permission.CLEAN_BACKGROUND_PROCESSES",
"reason":"need use ohos.permission.CLEAN_BACKGROUND_PROCESSES"
},
{
"name":"ohos.permission.MANAGE_MISSIONS",
"reason":"need use ohos.permission.MANAGE_MISSIONS"
},
{
"name":"ohos.permission.GET_RUNNING_INFO",
"reason":"need use ohos.permission.GET_RUNNING_INFO"
}
],
"js": [
{
"pages": [
"pages/index/index"
],
"name": "default",
"window": {
"designWidth": 720,
"autoDesignWidth": false
}
}
]
}
}
\ No newline at end of file
/*
* 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');
}
};
/*
* 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.
*/
.container {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
left: 0px;
top: 0px;
width: 100%;
height: 100%;
}
.title {
font-size: 60px;
text-align: center;
width: 100%;
height: 40%;
margin: 10px;
}
.btn {
width: 50%;
height: 100px;
font-size: 40px;
}
<!--
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.
-->
<div class="container" onswipe="touchMove">
<text class="title">
{{ $t('strings.hello') }} {{title}}
</text>
<input class="btn" type="button" value="{{ $t('strings.next') }}" onclick="onclick"></input>
</div>
{
"string": [
{
"name": "app_name",
"value": "JsHelloWorld"
},
{
"name": "mainability_description",
"value": "hap sample empty page"
}
]
}
\ No newline at end of file
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import featureAbility from '@ohos.ability.featureAbility'
import appManager from "@ohos.application.appManager"
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index'
describe('ActsAmsCallBackThirdScene', function () {
console.info('----ActsAmsCallBackThirdScene----');
beforeAll(async function (done) {
await featureAbility.startAbility(
{
want:
{
deviceId: "",
bundleName: "com.ix.simulate.feature",
abilityName: "com.example.SimulateFeatureAbilityFir",
action: "action1",
parameters:
{},
},
}, (error, data) => {
console.info('ActsAmsCallBackThirdScene SimulateFeatureAbilityFir start, error.code \
' + error.code + ', data length [' + data.length + ']');
}
);
await featureAbility.startAbility(
{
want:
{
deviceId: "",
bundleName: "com.ix.verify.io",
abilityName: "com.example.VerifyIoThirdAbility",
action: "action1",
parameters:
{},
},
}, (error, data) => {
console.info('ActsAmsCallBackThirdScene VerifyIoThirdAbility start, error.code \
' + error.code + ', data length [' + data.length + ']');
}
);
done();
});
function sleep(delay) {
let start = new Date().getTime();
while (true) {
if (new Date().getTime() - start > delay) {
break;
}
}
}
/*
* @tc.number : Acts_Ams_test_3400
* @tc.name : getProcessRunningInfos : Get All Running Processes Info
* @tc.desc : Get All Running Processes Info(by CallBack)
*/
it('Acts_Ams_test_3400', 0, async function (done) {
console.info("sleep begin");
sleep(5000);
console.info("sleep end");
appManager.getProcessRunningInfos(
(error, info) => {
console.info('Acts_Ams_test_3400 getProcessRunningInfos error.code \
' + error.code + ', data length [' + info.length + ']');
expect(Array.isArray(info)).assertEqual(true);
expect(info.length).assertLarger(0);
for (let i = 0; i < info.length; i++) {
console.info('Acts_Ams_test_3400 getProcessRunningInfo[' + i + "]: " + JSON.stringify(info[i]));
expect(typeof (info[i].pid)).assertEqual("number");
expect(info[i].pid).assertLarger(0);
expect(typeof (info[i].processName)).assertEqual("string");
expect(info[i].processName.length).assertLarger(0);
expect(Array.isArray(info[i].bundleNames)).assertEqual(true);
expect(info[i].bundleNames.length).assertEqual(0);
expect(typeof (info[i].uid)).assertEqual("number");
expect(info[i].uid).assertLarger(0);
}
done();
});
})
})
\ No newline at end of file
{
"app": {
"bundleName": "com.example.actsamstestfifthscene",
"vendor": "example",
"version": {
"code": 1,
"name": "1.0"
},
"apiVersion": {
"compatible": 4,
"target": 5,
"releaseType": "Beta1"
}
},
"deviceConfig": {},
"module": {
"package": "com.example.actsamstestfifthscene",
"name": ".MyApplication",
"deviceType": [
"phone"
],
"distro": {
"deliveryWithInstall": true,
"moduleName": "entry",
"moduleType": "entry",
"installationFree": true
},
"abilities": [
{
"visible": true,
"name": "com.example.actsamstestfifthscene.MainAbility",
"icon": "$media:icon",
"description": "$string:mainability_description",
"label": "$string:app_name",
"type": "page",
"isVisible": "true",
"launchType": "singleton"
}
],
"reqPermissions": [
{
"name": "ohos.permission.INSTALL_BUNDLE",
"reason": "need use ohos.permission.INSTALL_BUNDLE"
},
{
"name":"ohos.permission.GET_BUNDLE_INFO_PRIVILEGED",
"reason":"need use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED"
},
{
"name":"ohos.permission.CHANGE_ABILITY_ENABLED_STATE",
"reason":"need use ohos.permission.CHANGE_ABILITY_ENABLED_STATE"
},
{
"name":"ohos.permission.REMOVE_CACHE_FILES",
"reason":"need use ohos.permission.REMOVE_CACHE_FILES"
},
{
"name":"ohos.permission.LISTEN_BUNDLE_CHANGE",
"reason":"need use ohos.permission.LISTEN_BUNDLE_CHANGE"
},
{
"name":"ohos.permission.CLEAN_BACKGROUND_PROCESSES",
"reason":"need use ohos.permission.CLEAN_BACKGROUND_PROCESSES"
},
{
"name":"ohos.permission.MANAGE_MISSIONS",
"reason":"need use ohos.permission.MANAGE_MISSIONS"
},
{
"name":"ohos.permission.GET_RUNNING_INFO",
"reason":"need use ohos.permission.GET_RUNNING_INFO"
}
],
"js": [
{
"pages": [
"pages/index/index"
],
"name": "default",
"window": {
"designWidth": 720,
"autoDesignWidth": false
}
}
]
}
}
\ No newline at end of file
/*
* 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');
}
};
/*
* 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.
*/
.container {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
left: 0px;
top: 0px;
width: 100%;
height: 100%;
}
.title {
font-size: 60px;
text-align: center;
width: 100%;
height: 40%;
margin: 10px;
}
.btn {
width: 50%;
height: 100px;
font-size: 40px;
}
<!--
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.
-->
<div class="container" onswipe="touchMove">
<text class="title">
{{ $t('strings.hello') }} {{title}}
</text>
<input class="btn" type="button" value="{{ $t('strings.next') }}" onclick="onclick"></input>
</div>
{
"string": [
{
"name": "app_name",
"value": "JsHelloWorld"
},
{
"name": "mainability_description",
"value": "hap sample empty page"
}
]
}
\ No newline at end of file
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import featureAbility from '@ohos.ability.featureAbility'
import appManager from "@ohos.application.appManager"
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index'
let abilityNameList = [
"com.ohos.launcher.MainAbility",
"com.ohos.callui.ServiceAbility",
"com.example.SimulateFeatureAbilityFir",
"com.example.SimulateFeatureAbilitySed",
"com.example.VerifyIoThirdAbility",
"com.example.actsamstestfifthscene.MainAbility"
]
let bundleNameList = [
"com.ohos.launcher",
"com.ohos.systemui",
"com.ohos.callui",
"com.ohos.contacts",
"com.ohos.mms",
"com.ohos.telephonydataability",
"com.ohos.contactsdataability",
"com.ix.simulate.feature",
"com.ix.verify.io",
"com.example.actsamstestfifthscene"
]
describe('ActsAmsTestFifthScene', function () {
console.info('----ActsAmsTestFifthScene----');
beforeAll(async function (done) {
await featureAbility.startAbility(
{
want:
{
deviceId: "",
bundleName: "com.ix.simulate.feature",
abilityName: "com.example.SimulateFeatureAbilityFir",
action: "action1",
entities: ["entity1"],
type: "MIMETYPE",
uri: "key={true,true,false}",
options:
{},
parameters:
{},
},
}, (error, data) => {
console.info('ActsAmsTestFifthScene SimulateFeatureAbilityFir start, error.code \
' + error.code + ', data length [' + data.length + ']');
}
);
await featureAbility.startAbility(
{
want:
{
deviceId: "",
bundleName: "com.ix.verify.io",
abilityName: "com.example.VerifyIoThirdAbility",
action: "action1",
entities: ["entity1"],
type: "MIMETYPE",
uri: "key={true,true,false}",
options:
{},
parameters:
{},
},
}, (error, data) => {
console.info('ActsAmsTestFifthScene VerifyIoThirdAbility start, error.code \
' + error.code + ', data length [' + data.length + ']');
}
);
await featureAbility.startAbility(
{
want:
{
deviceId: "",
bundleName: "com.ix.simulate.feature",
abilityName: "com.example.SimulateFeatureAbilitySed",
action: "action1",
entities: ["entity1"],
type: "MIMETYPE",
uri: "key={true,true,false}",
options:
{},
parameters:
{},
},
}, (error, data) => {
console.info('ActsAmsTestFifthScene SimulateFeatureAbilitySed start, error.code \
' + error.code + ', data length [' + data.length + ']');
}
);
done();
});
function timeout(done) {
expect().assertFail();
console.debug('Acts_Ams_test=========timeout========');
done();
}
function sleep(delay) {
let start = new Date().getTime();
while (true) {
if (new Date().getTime() - start > delay) {
break;
}
}
}
/*
* @tc.number : Acts_Ams_test_0100
* @tc.name : getProcessRunningInfos : Get All Running Processes Info
* @tc.desc : Get All Running Processes Info(by Promise)
*/
it('Acts_Ams_test_0100', 0, async function (done) {
console.info("sleep begin");
sleep(5000);
console.info("sleep end");
let info = await appManager.getProcessRunningInfos();
expect(Array.isArray(info)).assertEqual(true);
expect(info.length).assertLarger(0);
for (let i = 0; i < info.length; i++) {
console.info('Acts_Ams_test_0100 getProcessRunningInfo[' + i + "]: " + JSON.stringify(info[i]));
expect(typeof (info[i].pid)).assertEqual("number");
expect(info[i].pid).assertLarger(0);
expect(typeof (info[i].processName)).assertEqual("string");
expect(info[i].processName.length).assertLarger(0);
expect(Array.isArray(info[i].bundleNames)).assertEqual(true);
expect(info[i].bundleNames.length).assertEqual(0);
expect(typeof (info[i].uid)).assertEqual("number");
expect(info[i].uid).assertLarger(0);
}
done();
})
})
\ No newline at end of file
{
"app": {
"bundleName": "com.example.actsamstestfirstscene",
"vendor": "example",
"version": {
"code": 1,
"name": "1.0"
},
"apiVersion": {
"compatible": 4,
"target": 5,
"releaseType": "Beta1"
}
},
"deviceConfig": {},
"module": {
"package": "com.example.actsamstestfirstscene",
"name": ".MyApplication",
"deviceType": [
"phone"
],
"distro": {
"deliveryWithInstall": true,
"moduleName": "entry",
"moduleType": "entry"
},
"abilities": [
{
"skills": [
{
"entities": [
"entity.system.home"
],
"actions": [
"action.system.home"
]
}
],
"visible": true,
"name": "com.example.actsamstestfirstscene.MainAbility",
"icon": "$media:icon",
"description": "$string:mainability_description",
"label": "$string:app_name",
"type": "page",
"isVisible": "true",
"launchType": "singleton"
}
],
"reqPermissions": [
{
"name": "ohos.permission.INSTALL_BUNDLE",
"reason": "need use ohos.permission.INSTALL_BUNDLE"
},
{
"name":"ohos.permission.GET_BUNDLE_INFO_PRIVILEGED",
"reason":"need use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED"
},
{
"name":"ohos.permission.CHANGE_ABILITY_ENABLED_STATE",
"reason":"need use ohos.permission.CHANGE_ABILITY_ENABLED_STATE"
},
{
"name":"ohos.permission.REMOVE_CACHE_FILES",
"reason":"need use ohos.permission.REMOVE_CACHE_FILES"
},
{
"name":"ohos.permission.LISTEN_BUNDLE_CHANGE",
"reason":"need use ohos.permission.LISTEN_BUNDLE_CHANGE"
},
{
"name":"ohos.permission.CLEAN_BACKGROUND_PROCESSES",
"reason":"need use ohos.permission.CLEAN_BACKGROUND_PROCESSES"
},
{
"name":"ohos.permission.MANAGE_MISSIONS",
"reason":"need use ohos.permission.MANAGE_MISSIONS"
},
{
"name":"ohos.permission.GET_RUNNING_INFO",
"reason":"need use ohos.permission.GET_RUNNING_INFO"
}
],
"js": [
{
"pages": [
"pages/index/index"
],
"name": "default",
"window": {
"designWidth": 720,
"autoDesignWidth": false
}
}
]
}
}
\ No newline at end of file
/*
* 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');
}
};
/*
* 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.
*/
.container {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
left: 0px;
top: 0px;
width: 100%;
height: 100%;
}
.title {
font-size: 60px;
text-align: center;
width: 100%;
height: 40%;
margin: 10px;
}
.btn {
width: 50%;
height: 100px;
font-size: 40px;
}
<!--
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.
-->
<div class="container" onswipe="touchMove">
<text class="title">
{{ $t('strings.hello') }} {{title}}
</text>
<input class="btn" type="button" value="{{ $t('strings.next') }}" onclick="onclick"></input>
</div>
{
"string": [
{
"name": "app_name",
"value": "JsHelloWorld"
},
{
"name": "mainability_description",
"value": "hap sample empty page"
}
]
}
\ No newline at end of file
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import featureAbility from '@ohos.ability.featureAbility'
import appManager from "@ohos.application.appManager"
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index'
describe('ActsAmsTestFirstScene', function () {
console.info('----ActsAmsTestFirstScene----');
beforeAll(async function (done) {
await featureAbility.startAbility(
{
want:
{
deviceId: "",
bundleName: "com.ix.simulate.feature",
abilityName: "com.example.SimulateFeatureAbilityFir",
action: "action1",
entities: ["entity1"],
type: "MIMETYPE",
uri: "key={true,true,false}",
options:
{},
parameters:
{},
},
}, (error, data) => {
console.info('ActsAmsTestFirstScene SimulateFeatureAbilityFir start, error.code \
' + error.code + ', data length [' + data.length + ']');
}
);
done();
});
function timeout(done) {
expect().assertFail();
console.debug('Acts_Ams_test=========timeout========');
done();
}
function sleep(delay) {
var start = new Date().getTime();
while (true) {
if (new Date().getTime() - start > delay) {
break;
}
}
}
/*
* @tc.number : Acts_Ams_test_0100
* @tc.name : getProcessRunningInfos : Get All Running Processes Info
* @tc.desc : Get All Running Processes Info(by Promise)
*/
it('Acts_Ams_test_0100', 0, async function (done) {
console.info("sleep begin");
sleep(5000);
console.info("sleep end");
var info = await appManager.getProcessRunningInfos();
expect(Array.isArray(info)).assertEqual(true);
expect(info.length).assertLarger(0);
for (var i = 0; i < info.length; i++) {
console.info('Acts_Ams_test_0100 getProcessRunningInfo[' + i + "]: " + JSON.stringify(info[i]));
expect(typeof (info[i].pid)).assertEqual("number");
expect(info[i].pid).assertLarger(0);
expect(typeof (info[i].processName)).assertEqual("string");
expect(info[i].processName.length).assertLarger(0);
expect(Array.isArray(info[i].bundleNames)).assertEqual(true);
expect(info[i].bundleNames.length).assertEqual(0);
expect(typeof (info[i].uid)).assertEqual("number");
expect(info[i].uid).assertLarger(0);
}
done();
})
})
\ No newline at end of file
{
"app": {
"bundleName": "com.example.actsamstestfourthscene",
"vendor": "example",
"version": {
"code": 1,
"name": "1.0"
},
"apiVersion": {
"compatible": 4,
"target": 5,
"releaseType": "Beta1"
}
},
"deviceConfig": {},
"module": {
"package": "com.example.actsamstestfourthscene",
"name": ".MyApplication",
"deviceType": [
"phone"
],
"distro": {
"deliveryWithInstall": true,
"moduleName": "entry",
"moduleType": "entry",
"installationFree": true
},
"abilities": [
{
"visible": true,
"name": "com.example.actsamstestfourthscene.MainAbility",
"icon": "$media:icon",
"description": "$string:mainability_description",
"label": "$string:app_name",
"type": "page",
"isVisible": "true",
"launchType": "singleton"
}
],
"reqPermissions": [
{
"name": "ohos.permission.INSTALL_BUNDLE",
"reason": "need use ohos.permission.INSTALL_BUNDLE"
},
{
"name":"ohos.permission.GET_BUNDLE_INFO_PRIVILEGED",
"reason":"need use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED"
},
{
"name":"ohos.permission.CHANGE_ABILITY_ENABLED_STATE",
"reason":"need use ohos.permission.CHANGE_ABILITY_ENABLED_STATE"
},
{
"name":"ohos.permission.REMOVE_CACHE_FILES",
"reason":"need use ohos.permission.REMOVE_CACHE_FILES"
},
{
"name":"ohos.permission.LISTEN_BUNDLE_CHANGE",
"reason":"need use ohos.permission.LISTEN_BUNDLE_CHANGE"
},
{
"name":"ohos.permission.CLEAN_BACKGROUND_PROCESSES",
"reason":"need use ohos.permission.CLEAN_BACKGROUND_PROCESSES"
},
{
"name":"ohos.permission.MANAGE_MISSIONS",
"reason":"need use ohos.permission.MANAGE_MISSIONS"
},
{
"name":"ohos.permission.GET_RUNNING_INFO",
"reason":"need use ohos.permission.GET_RUNNING_INFO"
}
],
"js": [
{
"pages": [
"pages/index/index"
],
"name": "default",
"window": {
"designWidth": 720,
"autoDesignWidth": false
}
}
]
}
}
\ No newline at end of file
/*
* 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');
}
};
/*
* 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.
*/
.container {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
left: 0px;
top: 0px;
width: 100%;
height: 100%;
}
.title {
font-size: 60px;
text-align: center;
width: 100%;
height: 40%;
margin: 10px;
}
.btn {
width: 50%;
height: 100px;
font-size: 40px;
}
<!--
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.
-->
<div class="container" onswipe="touchMove">
<text class="title">
{{ $t('strings.hello') }} {{title}}
</text>
<input class="btn" type="button" value="{{ $t('strings.next') }}" onclick="onclick"></input>
</div>
{
"string": [
{
"name": "app_name",
"value": "JsHelloWorld"
},
{
"name": "mainability_description",
"value": "hap sample empty page"
}
]
}
\ No newline at end of file
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import featureAbility from '@ohos.ability.featureAbility'
import appManager from "@ohos.application.appManager"
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index'
describe('ActsAmsTestFourthScene', function () {
console.info('----ActsAmsTestFourthScene----');
beforeAll(async function (done) {
await featureAbility.startAbility(
{
want:
{
deviceId: "",
bundleName: "com.ix.verify.io",
abilityName: "com.example.VerifyIoThirdAbility",
action: "action1",
entities: ["entity1"],
type: "MIMETYPE",
uri: "key={true,true,false}",
options:
{},
parameters:
{},
},
}, (error, data) => {
console.info('ActsAmsTestFourthScene VerifyIoThirdAbility start, error.code \
' + error.code + ', data length [' + data.length + ']');
}
);
await featureAbility.startAbility(
{
want:
{
deviceId: "",
bundleName: "com.ix.simulate.feature",
abilityName: "com.example.SimulateFeatureAbilityFir",
action: "action1",
entities: ["entity1"],
type: "MIMETYPE",
uri: "key={true,true,false}",
options:
{},
parameters:
{},
},
}, (error, data) => {
console.info('ActsAmsTestFourthScene SimulateFeatureAbilityFir start, error.code \
' + error.code + ', data length [' + data.length + ']');
}
);
await featureAbility.startAbility(
{
want:
{
deviceId: "",
bundleName: "com.ix.verify.act",
abilityName: "com.example.VerifyActThirdAbility",
action: "action1",
entities: ["entity1"],
type: "MIMETYPE",
uri: "key={true,true,false}",
options:
{},
parameters:
{},
},
}, (error, data) => {
console.info('ActsAmsTestFourthScene VerifyActThirdAbility start, error.code \
' + error.code + ', data length [' + data.length + ']');
}
);
await featureAbility.startAbility(
{
want:
{
deviceId: "",
bundleName: "com.ix.simulate.entry",
abilityName: "com.example.SimulateEntryAbility",
action: "action1",
entities: ["entity1"],
type: "MIMETYPE",
uri: "key={true,true,false}",
options:
{},
parameters:
{},
},
}, (error, data) => {
console.info('ActsAmsTestFourthScene SimulateEntryAbility start, error.code \
' + error.code + ', data length [' + data.length + ']');
}
);
done();
});
function timeout(done) {
expect().assertFail();
console.debug('Acts_Ams_test=========timeout========');
done();
}
function sleep(delay) {
var start = new Date().getTime();
while (true) {
if (new Date().getTime() - start > delay) {
break;
}
}
}
/*
* @tc.number : Acts_Ams_test_1700
* @tc.name : getProcessRunningInfos : Get All Running Processes Info
* @tc.desc : Get All Running Processes Info(by Promise)
*/
it('Acts_Ams_test_1700', 0, async function (done) {
console.info("sleep begin");
sleep(5000);
console.info("sleep end");
var info = await appManager.getProcessRunningInfos();
expect(Array.isArray(info)).assertEqual(true);
expect(info.length).assertLarger(0);
for (var i = 0; i < info.length; i++) {
console.info('Acts_Ams_test_1700 getProcessRunningInfo[' + i + "]: " + JSON.stringify(info[i]));
expect(typeof (info[i].pid)).assertEqual("number");
expect(info[i].pid).assertLarger(0);
expect(typeof (info[i].processName)).assertEqual("string");
expect(info[i].processName.length).assertLarger(0);
expect(Array.isArray(info[i].bundleNames)).assertEqual(true);
expect(info[i].bundleNames.length).assertEqual(0);
expect(typeof (info[i].uid)).assertEqual("number");
expect(info[i].uid).assertLarger(0);
}
done();
})
})
\ No newline at end of file
{
"app": {
"bundleName": "com.example.actsamstestsecondscene",
"vendor": "example",
"version": {
"code": 1,
"name": "1.0"
},
"apiVersion": {
"compatible": 4,
"target": 5,
"releaseType": "Beta1"
}
},
"deviceConfig": {},
"module": {
"package": "com.example.actsamstestsecondscene",
"name": ".MyApplication",
"deviceType": [
"phone"
],
"distro": {
"deliveryWithInstall": true,
"moduleName": "entry",
"moduleType": "entry",
"installationFree": true
},
"abilities": [
{
"visible": true,
"name": "com.example.actsamstestsecondscene.MainAbility",
"icon": "$media:icon",
"description": "$string:mainability_description",
"label": "$string:app_name",
"type": "page",
"isVisible": "true",
"launchType": "singleton"
}
],
"reqPermissions": [
{
"name": "ohos.permission.INSTALL_BUNDLE",
"reason": "need use ohos.permission.INSTALL_BUNDLE"
},
{
"name":"ohos.permission.GET_BUNDLE_INFO_PRIVILEGED",
"reason":"need use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED"
},
{
"name":"ohos.permission.CHANGE_ABILITY_ENABLED_STATE",
"reason":"need use ohos.permission.CHANGE_ABILITY_ENABLED_STATE"
},
{
"name":"ohos.permission.REMOVE_CACHE_FILES",
"reason":"need use ohos.permission.REMOVE_CACHE_FILES"
},
{
"name":"ohos.permission.LISTEN_BUNDLE_CHANGE",
"reason":"need use ohos.permission.LISTEN_BUNDLE_CHANGE"
},
{
"name":"ohos.permission.CLEAN_BACKGROUND_PROCESSES",
"reason":"need use ohos.permission.CLEAN_BACKGROUND_PROCESSES"
},
{
"name":"ohos.permission.MANAGE_MISSIONS",
"reason":"need use ohos.permission.MANAGE_MISSIONS"
},
{
"name":"ohos.permission.GET_RUNNING_INFO",
"reason":"need use ohos.permission.GET_RUNNING_INFO"
}
],
"js": [
{
"pages": [
"pages/index/index"
],
"name": "default",
"window": {
"designWidth": 720,
"autoDesignWidth": false
}
}
]
}
}
\ No newline at end of file
/*
* 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');
}
};
/*
* 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.
*/
.container {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
left: 0px;
top: 0px;
width: 100%;
height: 100%;
}
.title {
font-size: 60px;
text-align: center;
width: 100%;
height: 40%;
margin: 10px;
}
.btn {
width: 50%;
height: 100px;
font-size: 40px;
}
<!--
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.
-->
<div class="container" onswipe="touchMove">
<text class="title">
{{ $t('strings.hello') }} {{title}}
</text>
<input class="btn" type="button" value="{{ $t('strings.next') }}" onclick="onclick"></input>
</div>
{
"string": [
{
"name": "app_name",
"value": "JsHelloWorld"
},
{
"name": "mainability_description",
"value": "hap sample empty page"
}
]
}
\ No newline at end of file
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import featureAbility from '@ohos.ability.featureAbility'
import appManager from "@ohos.application.appManager"
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index'
describe('ActsAmsTestSecondScene', function () {
console.info('----ActsAmsTestSecondScene----');
beforeAll(async function (done) {
await featureAbility.startAbility(
{
want:
{
deviceId: "",
bundleName: "com.ix.verify.io",
abilityName: "com.example.VerifyIoThirdAbility",
action: "action1",
entities: ["entity1"],
type: "MIMETYPE",
uri: "key={true,true,false}",
options:
{},
parameters:
{},
},
}, (error, data) => {
console.info('ActsAmsTestSecondScene VerifyIoThirdAbility start, error.code \
' + error.code + ', data length [' + data.length + ']');
}
);
await featureAbility.startAbility(
{
want:
{
deviceId: "",
bundleName: "com.ix.simulate.feature",
abilityName: "com.example.SimulateFeatureAbilityFir",
action: "action1",
entities: ["entity1"],
type: "MIMETYPE",
uri: "key={true,true,false}",
options:
{},
parameters:
{},
},
}, (error, data) => {
console.info('ActsAmsTestSecondScene SimulateFeatureAbilityFir start, error.code \
' + error.code + ', data length [' + data.length + ']');
}
);
done();
});
function timeout(done) {
expect().assertFail();
console.debug('Acts_Ams_test=========timeout========');
done();
}
function sleep(delay) {
var start = new Date().getTime();
while (true) {
if (new Date().getTime() - start > delay) {
break;
}
}
}
/*
* @tc.number : Acts_Ams_test_1700
* @tc.name : getProcessRunningInfos : Get All Running Processes Info
* @tc.desc : Get All Running Processes Info(by Promise)
*/
it('Acts_Ams_test_1700', 0, async function (done) {
console.info("sleep begin");
sleep(5000);
console.info("sleep end");
var info = await appManager.getProcessRunningInfos();
expect(Array.isArray(info)).assertEqual(true);
expect(info.length).assertLarger(0);
for (var i = 0; i < info.length; i++) {
console.info('Acts_Ams_test_1700 getProcessRunningInfo[' + i + "]: " + JSON.stringify(info[i]));
expect(typeof (info[i].pid)).assertEqual("number");
expect(info[i].pid).assertLarger(0);
expect(typeof (info[i].processName)).assertEqual("string");
expect(info[i].processName.length).assertLarger(0);
expect(Array.isArray(info[i].bundleNames)).assertEqual(true);
expect(info[i].bundleNames.length).assertEqual(0);
expect(typeof (info[i].uid)).assertEqual("number");
expect(info[i].uid).assertLarger(0);
}
done();
})
})
\ No newline at end of file
{
"app": {
"bundleName": "com.example.actsamstestthirdscene",
"vendor": "example",
"version": {
"code": 1,
"name": "1.0"
},
"apiVersion": {
"compatible": 4,
"target": 5,
"releaseType": "Beta1"
}
},
"deviceConfig": {},
"module": {
"package": "com.example.actsamstestthirdscene",
"name": ".MyApplication",
"deviceType": [
"phone"
],
"distro": {
"deliveryWithInstall": true,
"moduleName": "entry",
"moduleType": "entry",
"installationFree": true
},
"abilities": [
{
"visible": true,
"name": "com.example.actsamstestthirdscene.MainAbility",
"icon": "$media:icon",
"description": "$string:mainability_description",
"label": "$string:app_name",
"type": "page",
"isVisible": "true",
"launchType": "singleton"
}
],
"reqPermissions": [
{
"name": "ohos.permission.INSTALL_BUNDLE",
"reason": "need use ohos.permission.INSTALL_BUNDLE"
},
{
"name":"ohos.permission.GET_BUNDLE_INFO_PRIVILEGED",
"reason":"need use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED"
},
{
"name":"ohos.permission.CHANGE_ABILITY_ENABLED_STATE",
"reason":"need use ohos.permission.CHANGE_ABILITY_ENABLED_STATE"
},
{
"name":"ohos.permission.REMOVE_CACHE_FILES",
"reason":"need use ohos.permission.REMOVE_CACHE_FILES"
},
{
"name":"ohos.permission.LISTEN_BUNDLE_CHANGE",
"reason":"need use ohos.permission.LISTEN_BUNDLE_CHANGE"
},
{
"name":"ohos.permission.CLEAN_BACKGROUND_PROCESSES",
"reason":"need use ohos.permission.CLEAN_BACKGROUND_PROCESSES"
},
{
"name":"ohos.permission.MANAGE_MISSIONS",
"reason":"need use ohos.permission.MANAGE_MISSIONS"
},
{
"name":"ohos.permission.GET_RUNNING_INFO",
"reason":"need use ohos.permission.GET_RUNNING_INFO"
}
],
"js": [
{
"pages": [
"pages/index/index"
],
"name": "default",
"window": {
"designWidth": 720,
"autoDesignWidth": false
}
}
]
}
}
\ No newline at end of file
/*
* 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');
}
};
/*
* 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.
*/
.container {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
left: 0px;
top: 0px;
width: 100%;
height: 100%;
}
.title {
font-size: 60px;
text-align: center;
width: 100%;
height: 40%;
margin: 10px;
}
.btn {
width: 50%;
height: 100px;
font-size: 40px;
}
<!--
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.
-->
<div class="container" onswipe="touchMove">
<text class="title">
{{ $t('strings.hello') }} {{title}}
</text>
<input class="btn" type="button" value="{{ $t('strings.next') }}" onclick="onclick"></input>
</div>
{
"string": [
{
"name": "app_name",
"value": "JsHelloWorld"
},
{
"name": "mainability_description",
"value": "hap sample empty page"
}
]
}
\ No newline at end of file
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import featureAbility from '@ohos.ability.featureAbility'
import appManager from "@ohos.application.appManager"
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index'
describe('ActsAmsTestThirdScene', function () {
console.info('----ActsAmsTestThirdScene----');
beforeAll(async function (done) {
await featureAbility.startAbility(
{
want:
{
deviceId: "",
bundleName: "com.ix.simulate.feature",
abilityName: "com.example.SimulateFeatureAbilityFir",
action: "action1",
entities: ["entity1"],
type: "MIMETYPE",
uri: "key={true,true,false}",
options:
{},
parameters:
{},
},
}, (error, data) => {
console.info('ActsAmsTestThirdScene SimulateFeatureAbilityFir start, error.code \
' + error.code + ', data length [' + data.length + ']');
}
);
await featureAbility.startAbility(
{
want:
{
deviceId: "",
bundleName: "com.ix.verify.io",
abilityName: "com.example.VerifyIoThirdAbility",
action: "action1",
entities: ["entity1"],
type: "MIMETYPE",
uri: "key={true,true,false}",
options:
{},
parameters:
{},
},
}, (error, data) => {
console.info('ActsAmsTestThirdScene VerifyIoThirdAbility start, error.code \
' + error.code + ', data length [' + data.length + ']');
}
);
done();
});
function timeout(done) {
expect().assertFail();
console.debug('Acts_Ams_test=========timeout========');
done();
}
function sleep(delay) {
var start = new Date().getTime();
while (true) {
if (new Date().getTime() - start > delay) {
break;
}
}
}
/*
* @tc.number : Acts_Ams_test_3300
* @tc.name : getProcessRunningInfos : Get All Running Processes Info
* @tc.desc : Get All Running Processes Info(by Promise)
*/
it('Acts_Ams_test_3300', 0, async function (done) {
console.info("sleep begin");
sleep(5000);
console.info("sleep end");
var info = await appManager.getProcessRunningInfos();
console.info('Acts_Ams_test_3300 getProcessRunningInfos JSON String: ' + JSON.stringify(info));
expect(Array.isArray(info)).assertEqual(true);
expect(info.length).assertLarger(0);
for (var i = 0; i < info.length; i++) {
console.info('Acts_Ams_test_3300 getProcessRunningInfo[' + i + "]: " + JSON.stringify(info[i]));
expect(typeof (info[i].pid)).assertEqual("number");
expect(info[i].pid).assertLarger(0);
expect(typeof (info[i].processName)).assertEqual("string");
expect(info[i].processName.length).assertLarger(0);
expect(Array.isArray(info[i].bundleNames)).assertEqual(true);
expect(info[i].bundleNames.length).assertEqual(0);
expect(typeof (info[i].uid)).assertEqual("number");
expect(info[i].uid).assertLarger(0);
}
done();
})
})
\ No newline at end of file
{
"app": {
"bundleName": "com.ix.simulate.entry",
"vendor": "example",
"version": {
"code": 1,
"name": "1.0"
},
"apiVersion": {
"compatible": 4,
"target": 5,
"releaseType": "Beta1"
}
},
"deviceConfig": {},
"module": {
"package": "com.example.simulateeability",
"name": ".MyApplication",
"deviceType": [
"phone"
],
"distro": {
"deliveryWithInstall": true,
"moduleName": "simulateEAbility",
"moduleType": "feature",
"installationFree": true
},
"abilities": [
{
"visible": true,
"name": "com.example.SimulateEntryAbility",
"icon": "$media:icon",
"description": "$string:mainability_description",
"label": "$string:app_name",
"type": "page",
"launchType": "standard"
}
],
"reqPermissions": [
{
"name": "ohos.permission.INSTALL_BUNDLE",
"reason": "need use ohos.permission.INSTALL_BUNDLE"
},
{
"name":"ohos.permission.GET_BUNDLE_INFO_PRIVILEGED",
"reason":"need use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED"
},
{
"name":"ohos.permission.CHANGE_ABILITY_ENABLED_STATE",
"reason":"need use ohos.permission.CHANGE_ABILITY_ENABLED_STATE"
},
{
"name":"ohos.permission.REMOVE_CACHE_FILES",
"reason":"need use ohos.permission.REMOVE_CACHE_FILES"
},
{
"name":"ohos.permission.LISTEN_BUNDLE_CHANGE",
"reason":"need use ohos.permission.LISTEN_BUNDLE_CHANGE"
}
],
"js": [
{
"pages": [
"pages/index/index"
],
"name": "default",
"window": {
"designWidth": 720,
"autoDesignWidth": false
}
}
]
}
}
\ No newline at end of file
/*
* 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');
}
};
/*
* 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.
*/
.container {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
left: 0px;
top: 0px;
width: 100%;
height: 100%;
}
.title {
font-size: 60px;
text-align: center;
width: 100%;
height: 40%;
margin: 10px;
}
.btn {
width: 50%;
height: 100px;
font-size: 40px;
}
<!--
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.
-->
<div class="container" onswipe="touchMove">
<text class="title">
{{ $t('strings.hello') }} {{title}}
</text>
<input class="btn" type="button" value="{{ $t('strings.next') }}" onclick="onclick"></input>
</div>
{
"string": [
{
"name": "app_name",
"value": "JsHelloWorld"
},
{
"name": "mainability_description",
"value": "hap sample empty page"
}
]
}
\ No newline at end of file
{
"app": {
"bundleName": "com.ix.simulate.feature",
"vendor": "example",
"version": {
"code": 1,
"name": "1.0"
},
"apiVersion": {
"compatible": 4,
"target": 5,
"releaseType": "Beta1"
}
},
"deviceConfig": {},
"module": {
"package": "com.example.simulatefabilityfir",
"name": ".MyApplication",
"deviceType": [
"phone"
],
"distro": {
"deliveryWithInstall": true,
"moduleName": "simulateFAbilityFir",
"moduleType": "feature",
"installationFree": true
},
"abilities": [
{
"visible": true,
"name": "com.example.SimulateFeatureAbilityFir",
"icon": "$media:icon",
"description": "$string:mainability_description",
"label": "$string:app_name",
"type": "page",
"launchType": "standard"
}
],
"reqPermissions": [
{
"name": "ohos.permission.INSTALL_BUNDLE",
"reason": "need use ohos.permission.INSTALL_BUNDLE"
},
{
"name":"ohos.permission.GET_BUNDLE_INFO_PRIVILEGED",
"reason":"need use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED"
},
{
"name":"ohos.permission.CHANGE_ABILITY_ENABLED_STATE",
"reason":"need use ohos.permission.CHANGE_ABILITY_ENABLED_STATE"
},
{
"name":"ohos.permission.REMOVE_CACHE_FILES",
"reason":"need use ohos.permission.REMOVE_CACHE_FILES"
},
{
"name":"ohos.permission.LISTEN_BUNDLE_CHANGE",
"reason":"need use ohos.permission.LISTEN_BUNDLE_CHANGE"
}
],
"js": [
{
"pages": [
"pages/index/index"
],
"name": "default",
"window": {
"designWidth": 720,
"autoDesignWidth": false
}
}
]
}
}
\ No newline at end of file
/*
* 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');
}
};
/*
* 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.
*/
.container {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
left: 0px;
top: 0px;
width: 100%;
height: 100%;
}
.title {
font-size: 60px;
text-align: center;
width: 100%;
height: 40%;
margin: 10px;
}
.btn {
width: 50%;
height: 100px;
font-size: 40px;
}
<!--
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.
-->
<div class="container" onswipe="touchMove">
<text class="title">
{{ $t('strings.hello') }} {{title}}
</text>
<input class="btn" type="button" value="{{ $t('strings.next') }}" onclick="onclick"></input>
</div>
{
"string": [
{
"name": "app_name",
"value": "JsHelloWorld"
},
{
"name": "mainability_description",
"value": "hap sample empty page"
}
]
}
\ No newline at end of file
{
"app": {
"bundleName": "com.ix.simulate.feature",
"vendor": "example",
"version": {
"code": 1,
"name": "1.0"
},
"apiVersion": {
"compatible": 4,
"target": 5,
"releaseType": "Beta1"
}
},
"deviceConfig": {},
"module": {
"package": "com.example.simulatefabilitysed",
"name": ".MyApplication",
"deviceType": [
"phone"
],
"distro": {
"deliveryWithInstall": true,
"moduleName": "simulateFAbilitySed",
"moduleType": "feature",
"installationFree": true
},
"abilities": [
{
"visible": true,
"name": "com.example.SimulateFeatureAbilitySed",
"icon": "$media:icon",
"description": "$string:mainability_description",
"label": "$string:app_name",
"type": "page",
"launchType": "standard"
}
],
"reqPermissions": [
{
"name": "ohos.permission.INSTALL_BUNDLE",
"reason": "need use ohos.permission.INSTALL_BUNDLE"
},
{
"name":"ohos.permission.GET_BUNDLE_INFO_PRIVILEGED",
"reason":"need use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED"
},
{
"name":"ohos.permission.CHANGE_ABILITY_ENABLED_STATE",
"reason":"need use ohos.permission.CHANGE_ABILITY_ENABLED_STATE"
},
{
"name":"ohos.permission.REMOVE_CACHE_FILES",
"reason":"need use ohos.permission.REMOVE_CACHE_FILES"
},
{
"name":"ohos.permission.LISTEN_BUNDLE_CHANGE",
"reason":"need use ohos.permission.LISTEN_BUNDLE_CHANGE"
}
],
"js": [
{
"pages": [
"pages/index/index"
],
"name": "default",
"window": {
"designWidth": 720,
"autoDesignWidth": false
}
}
]
}
}
\ No newline at end of file
/*
* 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');
}
};
/*
* 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.
*/
.container {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
left: 0px;
top: 0px;
width: 100%;
height: 100%;
}
.title {
font-size: 60px;
text-align: center;
width: 100%;
height: 40%;
margin: 10px;
}
.btn {
width: 50%;
height: 100px;
font-size: 40px;
}
<!--
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.
-->
<div class="container" onswipe="touchMove">
<text class="title">
{{ $t('strings.hello') }} {{title}}
</text>
<input class="btn" type="button" value="{{ $t('strings.next') }}" onclick="onclick"></input>
</div>
{
"string": [
{
"name": "app_name",
"value": "JsHelloWorld"
},
{
"name": "mainability_description",
"value": "hap sample empty page"
}
]
}
\ No newline at end of file
{
"app": {
"bundleName": "com.ix.verify.act",
"vendor": "example",
"version": {
"code": 1,
"name": "1.0"
},
"apiVersion": {
"compatible": 4,
"target": 5,
"releaseType": "Beta1"
}
},
"deviceConfig": {},
"module": {
"package": "com.example.verifyaability",
"name": ".MyApplication",
"deviceType": [
"phone"
],
"distro": {
"deliveryWithInstall": true,
"moduleName": "verifyAAbility",
"moduleType": "feature",
"installationFree": true
},
"abilities": [
{
"visible": true,
"name": "com.example.VerifyActThirdAbility",
"icon": "$media:icon",
"description": "$string:mainability_description",
"label": "$string:app_name",
"type": "page",
"launchType": "singleton"
}
],
"reqPermissions": [
{
"name": "ohos.permission.INSTALL_BUNDLE",
"reason": "need use ohos.permission.INSTALL_BUNDLE"
},
{
"name":"ohos.permission.GET_BUNDLE_INFO_PRIVILEGED",
"reason":"need use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED"
},
{
"name":"ohos.permission.CHANGE_ABILITY_ENABLED_STATE",
"reason":"need use ohos.permission.CHANGE_ABILITY_ENABLED_STATE"
},
{
"name":"ohos.permission.REMOVE_CACHE_FILES",
"reason":"need use ohos.permission.REMOVE_CACHE_FILES"
},
{
"name":"ohos.permission.LISTEN_BUNDLE_CHANGE",
"reason":"need use ohos.permission.LISTEN_BUNDLE_CHANGE"
}
],
"js": [
{
"pages": [
"pages/index/index"
],
"name": "default",
"window": {
"designWidth": 720,
"autoDesignWidth": false
}
}
]
}
}
\ No newline at end of file
/*
* 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');
}
};
/*
* 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.
*/
.container {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
left: 0px;
top: 0px;
width: 100%;
height: 100%;
}
.title {
font-size: 60px;
text-align: center;
width: 100%;
height: 40%;
margin: 10px;
}
.btn {
width: 50%;
height: 100px;
font-size: 40px;
}
<!--
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.
-->
<div class="container" onswipe="touchMove">
<text class="title">
{{ $t('strings.hello') }} {{title}}
</text>
<input class="btn" type="button" value="{{ $t('strings.next') }}" onclick="onclick"></input>
</div>
{
"string": [
{
"name": "app_name",
"value": "JsHelloWorld"
},
{
"name": "mainability_description",
"value": "hap sample empty page"
}
]
}
\ No newline at end of file
{
"app": {
"bundleName": "com.ix.verify.io",
"vendor": "example",
"version": {
"code": 1,
"name": "1.0"
},
"apiVersion": {
"compatible": 4,
"target": 5,
"releaseType": "Beta1"
}
},
"deviceConfig": {},
"module": {
"package": "com.example.verifyiability",
"name": ".MyApplication",
"deviceType": [
"phone"
],
"distro": {
"deliveryWithInstall": true,
"moduleName": "verifyIAbility",
"moduleType": "feature",
"installationFree": true
},
"abilities": [
{
"visible": true,
"name": "com.example.VerifyIoThirdAbility",
"icon": "$media:icon",
"description": "$string:mainability_description",
"label": "$string:app_name",
"type": "page",
"launchType": "singleton"
}
],
"reqPermissions": [
{
"name": "ohos.permission.INSTALL_BUNDLE",
"reason": "need use ohos.permission.INSTALL_BUNDLE"
},
{
"name":"ohos.permission.GET_BUNDLE_INFO_PRIVILEGED",
"reason":"need use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED"
},
{
"name":"ohos.permission.CHANGE_ABILITY_ENABLED_STATE",
"reason":"need use ohos.permission.CHANGE_ABILITY_ENABLED_STATE"
},
{
"name":"ohos.permission.REMOVE_CACHE_FILES",
"reason":"need use ohos.permission.REMOVE_CACHE_FILES"
},
{
"name":"ohos.permission.LISTEN_BUNDLE_CHANGE",
"reason":"need use ohos.permission.LISTEN_BUNDLE_CHANGE"
}
],
"js": [
{
"pages": [
"pages/index/index"
],
"name": "default",
"window": {
"designWidth": 720,
"autoDesignWidth": false
}
}
]
}
}
\ No newline at end of file
/*
* 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');
}
};
/*
* 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.
*/
.container {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
left: 0px;
top: 0px;
width: 100%;
height: 100%;
}
.title {
font-size: 60px;
text-align: center;
width: 100%;
height: 40%;
margin: 10px;
}
.btn {
width: 50%;
height: 100px;
font-size: 40px;
}
<!--
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.
-->
<div class="container" onswipe="touchMove">
<text class="title">
{{ $t('strings.hello') }} {{title}}
</text>
<input class="btn" type="button" value="{{ $t('strings.next') }}" onclick="onclick"></input>
</div>
{
"string": [
{
"name": "app_name",
"value": "JsHelloWorld"
},
{
"name": "mainability_description",
"value": "hap sample empty page"
}
]
}
\ No newline at end of file
{
"app": {
"bundleName": "com.example.amsabilitymultiinstanceappa",
"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
/*
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import AbilityStage from "@ohos.application.AbilityStage"
const ONACCEPTWANT_KEY_NOTSET_ID = -1;
const ONACCEPTWANT_KEY_UNDEFINED_ID = -2;
var onAcceptWantCalledSeq;
export default class MyAbilityStage extends AbilityStage {
onCreate() {
console.log("AbilityMultiInstanceAppA MyAbilityStage onCreate")
globalThis.stageOnCreateRun = 1;
globalThis.stageContext = this.context;
}
onAcceptWant(want) {
console.log("AbilityMultiInstanceAppA onAcceptWant called want:" + JSON.stringify(want));
if ((want.parameters == undefined) || (want.parameters.startId == undefined)) {
console.log("AbilityMultiInstanceAppA specified param err");
return;
}
var abilityId = want.parameters.startId.toString();
onAcceptWantCalledSeq = "onAcceptWantCalled";
onAcceptWantCalledSeq += "Id";
onAcceptWantCalledSeq += abilityId;
globalThis.onAcceptWantCalledSeq = onAcceptWantCalledSeq;
if (want.parameters.startId == ONACCEPTWANT_KEY_NOTSET_ID) {
return;
} else if (want.parameters.startId == ONACCEPTWANT_KEY_UNDEFINED_ID) {
return undefined;
}
globalThis.abilityWant = want;
console.log("AbilityMultiInstanceAppA set globalThis result :" + globalThis.onAcceptWantCalledSeq);
return abilityId;
}
}
\ No newline at end of file
/*
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import Ability from '@ohos.application.Ability'
import commonEvent from '@ohos.commonEvent'
var callBackSeq = "";
function publishCallBack() {
console.debug("====>Publish CallBack ====>");
}
async function startAbilityProcess(abilityContext, parameters) {
let bundleName = "com.example.amsabilitymultiinstanceappa";
let abilityName = "com.example.amsabilitymultiinstanceappa.MainAbility";
let idx = parameters.nextStep;
switch (parameters.step[idx]) {
case "StartA1":
parameters.startId = 1;
break;
case "StartA2":
parameters.startId = 2;
break;
case "StartB":
bundleName = "com.example.amsabilitymultiinstanceappb";
abilityName = "com.example.amsabilitymultiinstanceappb.MainAbility";
break;
case "StartC":
bundleName = "com.example.amsabilitymultiinstanceappc";
abilityName = "com.example.amsabilitymultiinstanceappc.MainAbility";
break;
case "StartDMain1":
bundleName = "com.example.amsabilitymultiinstanceappd";
abilityName = "com.example.amsabilitymultiinstanceappd.MainAbility";
parameters.startId = 1;
break;
case "StartDMain2":
bundleName = "com.example.amsabilitymultiinstanceappd";
abilityName = "com.example.amsabilitymultiinstanceappd.MainAbility";
parameters.startId = 2;
break;
case "StartDSec":
bundleName = "com.example.amsabilitymultiinstanceappd";
abilityName = "com.example.amsabilitymultiinstanceappd.SecondAbility";
break;
case "StartDThd":
bundleName = "com.example.amsabilitymultiinstanceappd";
abilityName = "com.example.amsabilitymultiinstanceappd.ThirdAbility";
break;
case "StartE":
bundleName = "com.example.amsabilitymultiinstanceappe";
abilityName = "com.example.amsabilitymultiinstanceappe.MainAbility";
break;
default:
break;
}
parameters.nextStep = ++idx;
abilityContext.startAbility({
bundleName: bundleName,
abilityName: abilityName,
parameters: parameters
}, (error, data) => {
console.log('AppA startAbilityProcess result: ' + JSON.stringify(error) + ", " + JSON.stringify(data))
})
}
async function onShowProcess() {
var abilityWant = globalThis.abilityWant;
var callBackData = "AppA:"
callBackSeq += globalThis.onAcceptWantCalledSeq;
callBackData += callBackSeq;
var commonEventPublishData = {
data: callBackData,
parameters: abilityWant.parameters
};
console.log("AbilityMultiInstanceAppA abilityWant = " + JSON.stringify(abilityWant));
if (abilityWant.parameters.nextStep >= abilityWant.parameters.stepNum) {
commonEvent.publish("MultiInstanceStartFinish", commonEventPublishData, publishCallBack);
callBackSeq = "";
globalThis.onAcceptWantCalledSeq = "";
} else {
commonEvent.publish("MultiInstanceStartNext", commonEventPublishData, () => {
callBackSeq = "";
globalThis.onAcceptWantCalledSeq = "";
startAbilityProcess(globalThis.abilityContext, abilityWant.parameters);
});
}
}
export default class MainAbility extends Ability {
onCreate(want, launchParam) {
// Ability is creating, initialize resources for this ability
console.log("AbilityMultiInstanceAppA onCreate")
callBackSeq += "onCreate";
globalThis.abilityWant = want;
}
onDestroy() {
// Ability is destroying, release resources for this ability
console.log("AbilityMultiInstanceAppA onDestroy")
}
onWindowStageCreate(windowStage) {
// Main window is created, set main page for this ability
console.log("AbilityMultiInstanceAppA onWindowStageCreate")
globalThis.abilityContext = this.context
windowStage.setUIContent(this.context, "pages/index/index", null)
}
onWindowStageDestroy() {
// Main window is destroyed, release UI related resources
console.log("AbilityMultiInstanceAppA onWindowStageDestroy")
}
onForeground() {
// Ability has brought to foreground
console.log("AbilityMultiInstanceAppA onForeground")
callBackSeq += "onForeground";
onShowProcess();
}
onBackground() {
// Ability has back to background
console.log("AbilityMultiInstanceAppA onBackground")
}
};
{
"module": {
"name": "com.example.amsabilitymultiinstanceappa",
"type": "entry",
"srcEntrance": "./ets/Application/AbilityStage.ts",
"description": "$string:phone_entry_dsc",
"mainElement": "MainAbility",
"deviceTypes": [
"phone"
],
"deliveryWithInstall": true,
"installationFree": false,
"uiSyntax": "ets",
"pages": "$profile:main_pages",
"abilities": [
{
"name": "com.example.amsabilitymultiinstanceappa.MainAbility",
"srcEntrance": "./ets/MainAbility/MainAbility.ts",
"description": "$string:phone_entry_main",
"icon": "$media:icon",
"label": "$string:entry_label",
"visible": true,
"orientation": "portrait",
"launchType": "specified",
"skills": [
{
"actions": [
"action.system.home"
],
"entities": [
"entity.system.home"
]
}
]
}
],
"requestPermissions": [
{
"name":"ohos.permission.GET_BUNDLE_INFO_PRIVILEGED",
"reason":"need use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED"
},
{
"name":"ohos.permission.GET_BUNDLE_INFO",
"reason":"need use ohos.permission.GET_BUNDLE_INFO"
},
{
"name":"ohos.permission.CHANGE_ABILITY_ENABLED_STATE",
"reason":"need use ohos.permission.CHANGE_ABILITY_ENABLED_STATE"
},
{
"name":"ohos.permission.REMOVE_CACHE_FILES",
"reason":"need use ohos.permission.REMOVE_CACHE_FILES"
},
{
"name":"ohos.permission.LISTEN_BUNDLE_CHANGE",
"reason":"need use ohos.permission.LISTEN_BUNDLE_CHANGE"
},
{
"name":"ohos.permission.INSTALL_BUNDLE",
"reason":"need use ohos.permission.INSTALL_BUNDLE"
},
{
"name":"ohos.permission.MANAGE_MISSIONS",
"reason":"need use ohos.permission.MANAGE_MISSIONS"
},
{
"name":"ohos.permission.GET_RUNNING_INFO",
"reason":"need use ohos.permission.GET_RUNNING_INFO"
},
{
"name":"ohos.permission.CLEAN_BACKGROUND_PROCESSES",
"reason":"need use ohos.permission.CLEAN_BACKGROUND_PROCESSES"
},
{
"name":"ohos.permission.CLEAN_APPLICATION_DATA",
"reason":"need use ohos.permission.CLEAN_APPLICATION_DATA"
}
]
}
}
{
"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
{
"app": {
"bundleName": "com.example.amsabilitymultiinstanceappb",
"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
/*
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import AbilityStage from "@ohos.application.AbilityStage"
export default class MyAbilityStage extends AbilityStage {
onCreate() {
console.log("MyAbilityStage onCreate")
globalThis.stageOnCreateRun = 1;
globalThis.stageContext = this.context;
}
}
\ No newline at end of file
/*
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import Ability from '@ohos.application.Ability'
import commonEvent from '@ohos.commonEvent'
var callBackSeq = "";
function publishCallBack() {
console.debug("====>AbilityMultiInstanceAppB Publish CallBack ====>");
}
async function startAbilityProcess(abilityContext, parameters) {
let bundleName = "com.example.amsabilitymultiinstanceappa";
let abilityName = "com.example.amsabilitymultiinstanceappa.MainAbility";
let idx = parameters.nextStep;
switch (parameters.step[idx]) {
case "StartA1":
parameters.startId = 1;
break;
case "StartA2":
parameters.startId = 2;
break;
case "StartB":
bundleName = "com.example.amsabilitymultiinstanceappb";
abilityName = "com.example.amsabilitymultiinstanceappb.MainAbility";
break;
case "StartC":
bundleName = "com.example.amsabilitymultiinstanceappc";
abilityName = "com.example.amsabilitymultiinstanceappc.MainAbility";
break;
case "StartDMain1":
bundleName = "com.example.amsabilitymultiinstanceappd";
abilityName = "com.example.amsabilitymultiinstanceappd.MainAbility";
parameters.startId = 1;
break;
case "StartDMain2":
bundleName = "com.example.amsabilitymultiinstanceappd";
abilityName = "com.example.amsabilitymultiinstanceappd.MainAbility";
parameters.startId = 2;
break;
case "StartDSec":
bundleName = "com.example.amsabilitymultiinstanceappd";
abilityName = "com.example.amsabilitymultiinstanceappd.SecondAbility";
break;
case "StartDThd":
bundleName = "com.example.amsabilitymultiinstanceappd";
abilityName = "com.example.amsabilitymultiinstanceappd.ThirdAbility";
break;
case "StartE":
bundleName = "com.example.amsabilitymultiinstanceappe";
abilityName = "com.example.amsabilitymultiinstanceappe.MainAbility";
break;
default:
break;
}
parameters.nextStep = ++idx;
abilityContext.startAbility({
bundleName: bundleName,
abilityName: abilityName,
parameters: parameters
}, (error, data) => {
console.log('AppB startAbilityProcess result: ' + JSON.stringify(error) + ", " + JSON.stringify(data))
})
}
async function onShowProcess() {
var abilityWant = globalThis.abilityWant;
var callBackData = "AppB:"
callBackData += callBackSeq;
var commonEventPublishData = {
data: callBackData,
parameters: abilityWant.parameters
};
console.log("AbilityMultiInstanceAppB onShowProcess")
if (abilityWant.parameters.nextStep >= abilityWant.parameters.stepNum) {
commonEvent.publish("MultiInstanceStartFinish", commonEventPublishData, publishCallBack);
callBackSeq = "";
} else {
commonEvent.publish("MultiInstanceStartNext", commonEventPublishData, () => {
callBackSeq = "";
startAbilityProcess(globalThis.abilityContext, abilityWant.parameters);
});
}
}
export default class MainAbility extends Ability {
onCreate(want, launchParam) {
// Ability is creating, initialize resources for this ability
console.log("AbilityMultiInstanceAppB MainAbility onCreate")
callBackSeq += "onCreate";
globalThis.abilityWant = want;
}
onDestroy() {
// Ability is destroying, release resources for this ability
console.log("AbilityMultiInstanceAppB MainAbility onDestroy")
}
onWindowStageCreate(windowStage) {
// Main window is created, set main page for this ability
console.log("AbilityMultiInstanceAppB MainAbility onWindowStageCreate")
globalThis.abilityContext = this.context
windowStage.setUIContent(this.context, "pages/index/index", null)
}
onWindowStageDestroy() {
// Main window is destroyed, release UI related resources
console.log("AbilityMultiInstanceAppB MainAbility onWindowStageDestroy")
}
onForeground() {
// Ability has brought to foreground
console.log("AbilityMultiInstanceAppB MainAbility onForeground")
callBackSeq += "onForeground";
onShowProcess();
}
onBackground() {
// Ability has back to background
console.log("AbilityMultiInstanceAppB MainAbility onBackground")
}
};
{
"module": {
"name": "com.example.amsabilitymultiinstanceappb",
"type": "entry",
"srcEntrance": "./ets/Application/AbilityStage.ts",
"description": "$string:phone_entry_dsc",
"mainElement": "MainAbility",
"deviceTypes": [
"phone"
],
"deliveryWithInstall": true,
"installationFree": false,
"uiSyntax": "ets",
"pages": "$profile:main_pages",
"abilities": [
{
"name": "com.example.amsabilitymultiinstanceappb.MainAbility",
"srcEntrance": "./ets/MainAbility/MainAbility.ts",
"description": "$string:phone_entry_main",
"icon": "$media:icon",
"label": "$string:entry_label",
"visible": true,
"orientation": "portrait",
"launchType": "standard",
"skills": [
{
"actions": [
"action.system.home"
],
"entities": [
"entity.system.home"
]
}
]
}
],
"requestPermissions": [
{
"name":"ohos.permission.GET_BUNDLE_INFO_PRIVILEGED",
"reason":"need use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED"
},
{
"name":"ohos.permission.GET_BUNDLE_INFO",
"reason":"need use ohos.permission.GET_BUNDLE_INFO"
},
{
"name":"ohos.permission.CHANGE_ABILITY_ENABLED_STATE",
"reason":"need use ohos.permission.CHANGE_ABILITY_ENABLED_STATE"
},
{
"name":"ohos.permission.REMOVE_CACHE_FILES",
"reason":"need use ohos.permission.REMOVE_CACHE_FILES"
},
{
"name":"ohos.permission.LISTEN_BUNDLE_CHANGE",
"reason":"need use ohos.permission.LISTEN_BUNDLE_CHANGE"
},
{
"name":"ohos.permission.INSTALL_BUNDLE",
"reason":"need use ohos.permission.INSTALL_BUNDLE"
},
{
"name":"ohos.permission.MANAGE_MISSIONS",
"reason":"need use ohos.permission.MANAGE_MISSIONS"
},
{
"name":"ohos.permission.GET_RUNNING_INFO",
"reason":"need use ohos.permission.GET_RUNNING_INFO"
},
{
"name":"ohos.permission.CLEAN_BACKGROUND_PROCESSES",
"reason":"need use ohos.permission.CLEAN_BACKGROUND_PROCESSES"
},
{
"name":"ohos.permission.CLEAN_APPLICATION_DATA",
"reason":"need use ohos.permission.CLEAN_APPLICATION_DATA"
}
]
}
}
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册