diff --git a/appexecfwk/bundle_standard/bundlemanager/BUILD.gn b/appexecfwk/bundle_standard/bundlemanager/BUILD.gn index 15ac6da0720f79428d0ececa6cb6e8a1df0d4050..4167b97c7ba4e9276e11c773d913a6eaba5c284c 100644 --- a/appexecfwk/bundle_standard/bundlemanager/BUILD.gn +++ b/appexecfwk/bundle_standard/bundlemanager/BUILD.gn @@ -39,6 +39,9 @@ group("bundlemanager") { "sceneProject/bmsgetinfoshapc:bmsThirdBundleC", "sceneProject/bmsgetinfosjsscene:bmsThirdBundleJs", "sceneProject/bmsgetinfosscenesystem:bmsSystemBundleTest1", + "sceneProject/bmsgetinfosscenesystemfeature:bmsSystemBundleTest2Feature", + "sceneProject/bmsgetinfosscenesystemtwo:bmsSystemBundleTest2", + "sceneProject/bmsgetinfosscenesystemupdate:bmsSystemBundleTest2Update", "sceneProject/bmsgetinfosscenevendor:bmsVendorBundleTest1", "sceneProject/bmsgetinfossecondscene:bmsThirdBundleTest2", "sceneProject/bmsgetinfossixthscene:bmsThirdBundleTest6", diff --git a/appexecfwk/bundle_standard/bundlemanager/actsbmsgetinfostest/Test.json b/appexecfwk/bundle_standard/bundlemanager/actsbmsgetinfostest/Test.json index 1d9cacfff355ccfe54f9b006e8efcd396b0522ac..c4815b28f7675fbc7a9dd662b49a381997735e76 100644 --- a/appexecfwk/bundle_standard/bundlemanager/actsbmsgetinfostest/Test.json +++ b/appexecfwk/bundle_standard/bundlemanager/actsbmsgetinfostest/Test.json @@ -32,7 +32,10 @@ "bmsThirdBundleTest4.hap->/data/test/bmsThirdBundleTest4.hap", "bmsThirdBundleTest5.hap->/data/test/bmsThirdBundleTest5.hap", "bmsThirdBundleTest6.hap->/data/test/bmsThirdBundleTest6.hap", - "bmsThirdBundleTestA1.hap->/data/test/bmsThirdBundleTestA1.hap" + "bmsThirdBundleTestA1.hap->/data/test/bmsThirdBundleTestA1.hap", + "bmsSystemBundleTest2.hap->/data/test/bmsSystemBundleTest2.hap", + "bmsSystemBundleTest2Feature.hap->/data/test/bmsSystemBundleTest2Feature.hap", + "bmsSystemBundleTest2Update.hap->/data/test/bmsSystemBundleTest2Update.hap" ] }, { @@ -42,4 +45,4 @@ ] } ] -} +} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/actsbmsgetinfostest/entry/src/main/js/test/ActsBmsGetBackGroundModes.test.js b/appexecfwk/bundle_standard/bundlemanager/actsbmsgetinfostest/entry/src/main/js/test/ActsBmsGetBackGroundModes.test.js index b3d08e132dd8a86f5dbc35d40406ed3d40886aa9..07d5a60b0552c25f52c021ad6d5dc030358d2311 100644 --- a/appexecfwk/bundle_standard/bundlemanager/actsbmsgetinfostest/entry/src/main/js/test/ActsBmsGetBackGroundModes.test.js +++ b/appexecfwk/bundle_standard/bundlemanager/actsbmsgetinfostest/entry/src/main/js/test/ActsBmsGetBackGroundModes.test.js @@ -23,12 +23,18 @@ const BUNDLE_PATH4 = '/data/test/bmsThirdBundleTest4.hap'; const BUNDLE_PATH5 = '/data/test/bmsThirdBundleTest5.hap'; const BUNDLE_PATH6 = '/data/test/bmsThirdBundleTest6.hap'; const BUNDLE_PATHUPDATE = '/data/test/bmsThirdBundleTestA1.hap'; +const SYSTEM_PATH = '/data/test/bmsSystemBundleTest2.hap'; +const SYSTEM_FEATURE_PATH = '/data/test/bmsSystemBundleTest2Feature.hap'; +const SYSTEM_UPDATE_PATH = '/data/test/bmsSystemBundleTest2Update.hap'; const BUNDLE_NAME1 = 'com.example.third1'; const BUNDLE_NAME2 = 'com.example.third2'; const BUNDLE_NAME4 = 'com.example.third4'; const BUNDLE_NAME5 = 'com.example.third5'; const BUNDLE_NAME6 = 'com.example.third6'; +const SYSTEM_NAME = 'com.example.system2'; const NUM_TWO = 2; +const NUM_THREE = 3; +const NUM_FOUR = 4; const NUM_NINE = 9; let dataTransfer = 1; let audioPlayback = 2; @@ -68,17 +74,17 @@ describe('ActsBmsGetBackGroundModes', function () { elementName: { deviceId: '0', bundleName: BUNDLE_NAME5, - abilityName: 'com.example.third5.AMainAbility', + abilityName: 'com.example.third5.MainAbilityA', }, } }, 0, 0) - expect(dataInfos.length).assertEqual(NUM_TWO); - if (dataInfos.length == NUM_TWO) { - expect(dataInfos[0].name).assertEqual("com.example.third5.AMainAbility"); - expect(dataInfos[0].backgroundModes).assertEqual(dataTransfer + audioPlayback + audioRecording + + expect(dataInfos.length).assertEqual(NUM_FOUR); + if (dataInfos.length == NUM_FOUR) { + expect(dataInfos[NUM_TWO].name).assertEqual("com.example.third5.MainAbilityA"); + expect(dataInfos[NUM_TWO].backgroundModes).assertEqual(dataTransfer + audioPlayback + audioRecording + location + bluetoothInteraction + multiDeviceConnection + wifiInteraction + voip + taskKeeping); - expect(dataInfos[1].name).assertEqual("com.example.third5.BMainAbility"); - expect(dataInfos[1].backgroundModes).assertEqual(dataTransfer + voip); + expect(dataInfos[NUM_THREE].name).assertEqual("com.example.third5.MainAbilityB"); + expect(dataInfos[NUM_THREE].backgroundModes).assertEqual(dataTransfer + voip); } installer.uninstall(BUNDLE_NAME5, { param: { @@ -97,7 +103,7 @@ describe('ActsBmsGetBackGroundModes', function () { /* * @tc.number: bms_backGroundModes_0200 - * @tc.name: Get the backgroundModes information of the application through queryAbilityByWant + * @tc.name: Get the backgroundModes information of the application through queryAbilityByWant * @tc.desc: Get all background modes information, and each ability of the application * contains one of the background mode */ @@ -149,8 +155,8 @@ describe('ActsBmsGetBackGroundModes', function () { /* * @tc.number: bms_backGroundModes_0300 - * @tc.name: Get the backgroundModes information of the application through queryAbilityByWant - * @tc.desc: Read the backgroundModes information of the app's ability and replace invalid attributes + * @tc.name: Get the backgroundModes information of the application through queryAbilityByWant + * @tc.desc: Read the backgroundModes information of the app's ability and replace invalid attributes */ it('bms_backGroundModes_0300', 0, async function (done) { console.info('=====================bms_backGroundModes_0300=================='); @@ -173,14 +179,14 @@ describe('ActsBmsGetBackGroundModes', function () { elementName: { deviceId: '0', bundleName: BUNDLE_NAME2, - abilityName: 'com.example.third2.MainAbility', + abilityName: 'com.example.third2.MainAbilityA', }, } }, 0, 0) - expect(dataInfos.length).assertEqual(1); - if (dataInfos.length == 1) { - expect(dataInfos[0].name).assertEqual("com.example.third2.MainAbility") - expect(dataInfos[0].backgroundModes).assertEqual(audioPlayback + audioRecording + location + expect(dataInfos.length).assertEqual(NUM_TWO); + if (dataInfos.length == NUM_TWO) { + expect(dataInfos[1].name).assertEqual("com.example.third2.MainAbilityA") + expect(dataInfos[1].backgroundModes).assertEqual(audioPlayback + audioRecording + location + bluetoothInteraction + multiDeviceConnection + wifiInteraction + voip + taskKeeping) } installer.uninstall(BUNDLE_NAME2, { @@ -200,8 +206,8 @@ describe('ActsBmsGetBackGroundModes', function () { /* * @tc.number: bms_backGroundModes_0400 - * @tc.name: Get the backgroundModes information of the application through queryAbilityByWant - * @tc.desc: Read the backgroundModes information of the app's ability and replace invalid attributes + * @tc.name: Get the backgroundModes information of the application through queryAbilityByWant + * @tc.desc: Read the backgroundModes information of the app's ability and replace invalid attributes */ it('bms_backGroundModes_0400', 0, async function (done) { console.info('=====================bms_backGroundModes_0400=================='); @@ -250,8 +256,8 @@ describe('ActsBmsGetBackGroundModes', function () { /* * @tc.number: bms_backGroundModes_0500 - * @tc.name: Get the backgroundModes information of the application through queryAbilityByWant - * @tc.desc: Get the backgroundModes information of the multi-hap package of the application + * @tc.name: Get the backgroundModes information of the application through queryAbilityByWant + * @tc.desc: Get the backgroundModes information of the multi-hap package of the application */ it('bms_backGroundModes_0500', 0, async function (done) { console.info('=====================bms_backGroundModes_0500=================='); @@ -274,14 +280,14 @@ describe('ActsBmsGetBackGroundModes', function () { elementName: { deviceId: '0', bundleName: BUNDLE_NAME1, - abilityName: 'com.example.third1.MainAbility', + abilityName: 'com.example.third1.MainAbilityA', }, } }, 0, 0) - expect(dataInfos.length).assertEqual(NUM_TWO); - if (dataInfos.length == NUM_TWO) { - expect(dataInfos[0].name).assertEqual("com.example.third1.MainAbility") - expect(dataInfos[0].backgroundModes).assertEqual(dataTransfer + audioPlayback + audioRecording + + expect(dataInfos.length).assertEqual(NUM_FOUR); + if (dataInfos.length == NUM_FOUR) { + expect(dataInfos[1].name).assertEqual("com.example.third1.MainAbilityA") + expect(dataInfos[1].backgroundModes).assertEqual(dataTransfer + audioPlayback + audioRecording + location + bluetoothInteraction + multiDeviceConnection + wifiInteraction + voip + taskKeeping) } console.info("========dataInfos[0].backgroundModes=======>" + dataInfos[0].backgroundModes) @@ -303,7 +309,7 @@ describe('ActsBmsGetBackGroundModes', function () { /* * @tc.number: bms_backGroundModes_0600 * @tc.name: Get the backgroundModes information of the application through queryAbilityByWant - * @tc.desc: Get the backgroundModes information of the upgraded application's ability + * @tc.desc: Get the backgroundModes information of the upgraded application's ability */ it('bms_backGroundModes_0600', 0, async function (done) { console.info('=====================bms_backGroundModes_0600=================='); @@ -327,14 +333,14 @@ describe('ActsBmsGetBackGroundModes', function () { elementName: { deviceId: '0', bundleName: BUNDLE_NAME1, - abilityName: 'com.example.third1.MainAbility', + abilityName: 'com.example.third1.MainAbilityA', }, } }, 0, 0) - expect(dataInfos.length).assertEqual(1); - if (dataInfos.length == 1) { - expect(dataInfos[0].name).assertEqual("com.example.third1.MainAbility") - expect(dataInfos[0].backgroundModes).assertEqual(dataTransfer + audioPlayback + audioRecording + + expect(dataInfos.length).assertEqual(NUM_TWO); + if (dataInfos.length == NUM_TWO) { + expect(dataInfos[1].name).assertEqual("com.example.third1.MainAbilityA") + expect(dataInfos[1].backgroundModes).assertEqual(dataTransfer + audioPlayback + audioRecording + location + bluetoothInteraction + multiDeviceConnection + wifiInteraction + voip + taskKeeping) } installer.install(bundlePath2, { @@ -358,10 +364,10 @@ describe('ActsBmsGetBackGroundModes', function () { }, } }, 0, 0) - expect(dataInfos.length).assertEqual(1); - if (dataInfos.length == 1) { - expect(dataInfos[0].name).assertEqual("com.example.third1.AMainAbility"); - expect(dataInfos[0].backgroundModes).assertEqual(audioRecording + location + bluetoothInteraction + + expect(dataInfos.length).assertEqual(NUM_TWO); + if (dataInfos.length == NUM_TWO) { + expect(dataInfos[1].name).assertEqual("com.example.third1.AMainAbilityA"); + expect(dataInfos[1].backgroundModes).assertEqual(audioRecording + location + bluetoothInteraction + multiDeviceConnection + wifiInteraction + voip + taskKeeping); } installer.uninstall(BUNDLE_NAME1, { @@ -383,7 +389,7 @@ describe('ActsBmsGetBackGroundModes', function () { /* * @tc.number: bms_backGroundModes_0700 * @tc.name: Get the backgroundModes information of the application through queryAbilityByWant - * @tc.desc: Uninstall the application, get the backgroundModes information of the upgraded application's ability + * @tc.desc: Uninstall the application, get the backgroundModes information of the upgraded application's ability */ it('bms_backGroundModes_0700', 0, async function (done) { console.info('=====================bms_backGroundModes_0700=================='); @@ -410,10 +416,10 @@ describe('ActsBmsGetBackGroundModes', function () { } } }, 0, 0) - expect(dataInfos.length).assertEqual(1); - if (dataInfos.length == 1) { - expect(dataInfos[0].name).assertEqual("com.example.third1.MainAbility") - expect(dataInfos[0].backgroundModes).assertEqual(dataTransfer + audioPlayback + audioRecording + + expect(dataInfos.length).assertEqual(NUM_TWO); + if (dataInfos.length == NUM_TWO) { + expect(dataInfos[1].name).assertEqual("com.example.third1.MainAbilityA") + expect(dataInfos[1].backgroundModes).assertEqual(dataTransfer + audioPlayback + audioRecording + location + bluetoothInteraction + multiDeviceConnection + wifiInteraction + voip + taskKeeping) } installer.uninstall(BUNDLE_NAME1, { @@ -442,4 +448,145 @@ describe('ActsBmsGetBackGroundModes', function () { }); }) }) + + /* + * @tc.number: bms_getIsKeepAliveAndSingleUser_0100 + * @tc.name: Get the isKeepAlive and singleUser information of the third-party application + * @tc.desc: Get the isKeepAlive and singleUser information of the third-party application by getBundleInfo + */ + it('bms_getIsKeepAliveAndSingleUser_0100', 0, async function (done) { + console.info('===========begin bms_getIsKeepAliveAndSingleUser_0100==========='); + var installer = await bundle.getBundleInstaller(); + installer.install([BUNDLE_PATH1], { + param: { + userId: 0, + installFlag: 1, + isKeepData: false + } + }, async (err, data) => { + expect(err.code).assertEqual(0); + expect(data.status).assertEqual(0); + expect(data.statusMessage).assertEqual('SUCCESS'); + bundle.getBundleInfo(BUNDLE_NAME1, 1, (err, bundleInfo) => { + expect(err.code).assertEqual(0); + expect(bundleInfo.isKeepAlive).assertFalse(); + expect(bundleInfo.singleUser).assertFalse(); + installer.uninstall(BUNDLE_NAME1, { + param: { + userId: 0, + installFlag: 1, + isKeepData: false + } + }, (err, data) => { + expect(err.code).assertEqual(0); + expect(data.status).assertEqual(0); + expect(data.statusMessage).assertEqual('SUCCESS'); + done(); + }); + }); + }) + }) + + /* + * @tc.number: bms_getIsKeepAliveAndSingleUser_0200 + * @tc.name: Get the isKeepAlive and singleUser information of the application which doesn't config those fields + * @tc.desc: Get the isKeepAlive and singleUser information of the application which doesn't config those fields + * by getBundleInfo(application is system) + */ + it('bms_getIsKeepAliveAndSingleUser_0200', 0, async function (done) { + console.info('=====================bms_getIsKeepAliveAndSingleUser_0200=================='); + var bundleInfo = await bundle.getBundleInfo('com.example.system1', 1); + console.info('========bundleInfo is=====' + JSON.stringify(bundleInfo)); + expect(bundleInfo.isKeepAlive).assertFalse(); + expect(bundleInfo.singleUser).assertFalse(); + done(); + }) + + /* + * @tc.number: bms_getIsKeepAliveAndSingleUser_0300 + * @tc.name: Get the isKeepAlive and singleUser information of the application includes two haps + * @tc.desc: Get the isKeepAlive and singleUser information of the application includes two haps, the attribute value + * will remain the same as the attribute value of the first installed hap(application is system) + */ + it('bms_getIsKeepAliveAndSingleUser_0300', 0, async function (done) { + console.info('===========begin bms_getIsKeepAliveAndSingleUser_0300==========='); + let installer = await bundle.getBundleInstaller() + installer.install([SYSTEM_PATH, SYSTEM_FEATURE_PATH], { + param: { + userId: 0, + isKeepData: false + } + }, async (err, data) => { + expect(err.code).assertEqual(0); + expect(data.status).assertEqual(0); + expect(data.statusMessage).assertEqual('SUCCESS'); + var bundleInfo = await bundle.getBundleInfo(SYSTEM_NAME, 1); + expect(bundleInfo.singleUser).assertTrue(); + expect(bundleInfo.isKeepAlive).assertFalse(); + installer.uninstall(SYSTEM_NAME, { + param: { + userId: 0, + isKeepData: false + } + }, (err, data) => { + expect(err.code).assertEqual(0); + expect(data.status).assertEqual(0); + expect(data.statusMessage).assertEqual('SUCCESS'); + done(); + }); + }); + }) + + /* + * @tc.number: bms_getIsKeepAliveAndSingleUser_0400 + * @tc.name: Update application, get the isKeepAlive and singleUser information of the application + * @tc.desc: Update application, get the isKeepAlive and singleUser information of the application whether update + * (application is system) + */ + it('bms_getIsKeepAliveAndSingleUser_0400', 0, async function (done) { + console.info('=====================bms_getIsKeepAliveAndSingleUser_0400=================='); + var installer = await bundle.getBundleInstaller(); + installer.install([SYSTEM_PATH], { + param: { + userId: 0, + installFlag: 1, + isKeepData: false + } + }, async (err, data) => { + expect(err.code).assertEqual(0); + expect(data.status).assertEqual(0); + expect(data.statusMessage).assertEqual('SUCCESS'); + var bundleInfo = await bundle.getBundleInfo(SYSTEM_NAME, 1); + expect(bundleInfo.singleUser).assertTrue(); + expect(bundleInfo.isKeepAlive).assertFalse(); + installer.install([SYSTEM_UPDATE_PATH], { + param: { + userId: 0, + installFlag: 1, + isKeepData: false + } + }, async (err, data) => { + expect(err.code).assertEqual(0); + expect(data.status).assertEqual(0); + expect(data.statusMessage).assertEqual('SUCCESS'); + var bundleInfo = await bundle.getBundleInfo(SYSTEM_NAME, 1); + console.info('========bundleInfo is=====' + JSON.stringify(bundleInfo)); + expect(bundleInfo.name).assertEqual(SYSTEM_NAME); + expect(bundleInfo.isKeepAlive).assertTrue(); + expect(bundleInfo.singleUser).assertTrue(); + installer.uninstall(SYSTEM_NAME, { + param: { + userId: 0, + installFlag: 1, + isKeepData: false + } + }, (err, data) => { + expect(err.code).assertEqual(0); + expect(data.status).assertEqual(0); + expect(data.statusMessage).assertEqual('SUCCESS'); + done(); + }); + }) + }) + }) }) \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/actsbmsjstest/entry/src/main/js/test/ActsBmsJsTest.test.js b/appexecfwk/bundle_standard/bundlemanager/actsbmsjstest/entry/src/main/js/test/ActsBmsJsTest.test.js index 33bd55b0b7d45b1e465a89522bb352621de1eb27..3d11808d9d5d50a3e31aaa34fc128efb8c35cae0 100644 --- a/appexecfwk/bundle_standard/bundlemanager/actsbmsjstest/entry/src/main/js/test/ActsBmsJsTest.test.js +++ b/appexecfwk/bundle_standard/bundlemanager/actsbmsjstest/entry/src/main/js/test/ActsBmsJsTest.test.js @@ -14,6 +14,8 @@ */ import bundle from '@ohos.bundle' import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index' +const NUM_TWO = 2; +const NUM_FOUR = 4; describe('ActsBmsJsTest', function () { /* * @tc.number: bms_getJsAbility_0100 @@ -42,8 +44,8 @@ describe('ActsBmsJsTest', function () { expect(data.status).assertEqual(0); expect(data.statusMessage).assertEqual('SUCCESS'); let result = await bundle.getBundleInfo(bundleName, 1); - expect(result.abilityInfo.length).assertEqual(1); - if (result.abilityInfo.length == 1) { + expect(result.abilityInfo.length).assertEqual(NUM_TWO); + if (result.abilityInfo.length == NUM_TWO) { console.debug('========check abilityName ========' + JSON.stringify(result.abilityInfo)); expect(result.abilityInfo[0].name).assertEqual(abilityName); expect(result.abilityInfo[0].srcLanguage).assertEqual('js'); @@ -94,8 +96,8 @@ describe('ActsBmsJsTest', function () { expect(data.statusMessage).assertEqual('SUCCESS'); let result = await bundle.getBundleInfo(bundleName, 1) console.debug('==========bundleInfo==========' + JSON.stringify(result)) - expect(result.abilityInfo.length).assertEqual(2); - if (result.abilityInfo.length == 2) { + expect(result.abilityInfo.length).assertEqual(NUM_FOUR); + if (result.abilityInfo.length == NUM_FOUR) { console.debug('========check abilityName ========' + JSON.stringify(result.abilityInfo)); expect(result.abilityInfo[0].name).assertEqual(abilityName1); expect(result.abilityInfo[0].srcLanguage).assertEqual('js'); diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosfifthscene/src/main/config.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosfifthscene/src/main/config.json index 92948d11d1f295674832611b1535dda583a57087..ef4d2a41399dfaf74e1b756fc7e3bed72674dce6 100644 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosfifthscene/src/main/config.json +++ b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosfifthscene/src/main/config.json @@ -37,17 +37,6 @@ ] } ], - "backgroundModes": [ - "dataTransfer", - "audioPlayback", - "audioRecording", - "location", - "bluetoothInteraction", - "multiDeviceConnection", - "wifiInteraction", - "voip", - "taskKeeping" - ], "name": "com.example.third5.AMainAbility", "srcLanguage": "js", "icon": "$media:icon", @@ -129,10 +118,6 @@ ] } ], - "backgroundModes": [ - "dataTransfer", - "voip" - ], "name": ".BMainAbility", "srcLanguage": "js", "icon": "$media:icon", @@ -191,6 +176,61 @@ } ] } + }, + { + "skills": [ + { + "entities": [ + "entity.system.home" + ], + "actions": [ + "action.system.home" + ] + } + ], + "backgroundModes": [ + "dataTransfer", + "audioPlayback", + "audioRecording", + "location", + "bluetoothInteraction", + "multiDeviceConnection", + "wifiInteraction", + "voip", + "taskKeeping" + ], + "name": "com.example.third5.MainAbilityA", + "srcLanguage": "js", + "icon": "$media:icon", + "description": "$string:mainability_description", + "label": "$string:app_name", + "type": "service", + "visible": true, + "launchType": "standard" + }, + { + "skills": [ + { + "entities": [ + "entity.system.home" + ], + "actions": [ + "action.system.home" + ] + } + ], + "backgroundModes": [ + "dataTransfer", + "voip" + ], + "name": "com.example.third5.MainAbilityB", + "srcLanguage": "js", + "icon": "$media:icon", + "description": "$string:mainability_description", + "label": "$string:app_name", + "type": "service", + "visible": true, + "launchType": "standard" } ], "js": [ diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosfirstscene/src/main/config.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosfirstscene/src/main/config.json index 2e8cab47381df18102030f0e1d91c07443d8abcc..d9a1d7edf14876860a5a1b6fca2eeeae7cdcd6d3 100644 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosfirstscene/src/main/config.json +++ b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosfirstscene/src/main/config.json @@ -41,17 +41,6 @@ ] } ], - "backgroundModes": [ - "dataTransfer", - "audioPlayback", - "audioRecording", - "location", - "bluetoothInteraction", - "multiDeviceConnection", - "wifiInteraction", - "voip", - "taskKeeping" - ], "name": "com.example.third1.MainAbility", "icon": "$media:icon", "form": { @@ -120,6 +109,46 @@ } ] } + }, + { + "skills": [ + { + "entities": [ + "entity.system.home" + ], + "actions": [ + "action.system.home" + ] + } + ], + "backgroundModes": [ + "dataTransfer", + "audioPlayback", + "audioRecording", + "location", + "bluetoothInteraction", + "multiDeviceConnection", + "wifiInteraction", + "voip", + "taskKeeping" + ], + "name": "com.example.third1.MainAbilityA", + "icon": "$media:icon", + "form": { + "formEntity": [ + "homeScreen", + "searchbox" + ], + "defaultHeight": 100, + "defaultWidth": 200, + "minHeight": 50, + "minWidth": 100 + }, + "description": "$string:mainability_description", + "label": "$string:app_name", + "type": "service", + "launchType": "standard", + "visible": true } ], "shortcuts": [ diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosfirstsceneupdate/src/main/config.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosfirstsceneupdate/src/main/config.json index 9d6006a707b67905f24552619f267575f46e7001..2edecc3a5d17d543acf9b73218642402252b1a9a 100644 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosfirstsceneupdate/src/main/config.json +++ b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosfirstsceneupdate/src/main/config.json @@ -42,15 +42,6 @@ ] } ], - "backgroundModes": [ - "audioRecording", - "location", - "bluetoothInteraction", - "multiDeviceConnection", - "wifiInteraction", - "voip", - "taskKeeping" - ], "name": "com.example.third1.AMainAbility", "icon": "$media:icon", "description": "$string:mainability_description", @@ -118,6 +109,34 @@ } ] } + }, + { + "skills": [ + { + "entities": [ + "entity.system.home" + ], + "actions": [ + "action.system.home" + ] + } + ], + "backgroundModes": [ + "audioRecording", + "location", + "bluetoothInteraction", + "multiDeviceConnection", + "wifiInteraction", + "voip", + "taskKeeping" + ], + "name": "com.example.third1.AMainAbilityA", + "icon": "$media:icon", + "description": "$string:mainability_description", + "label": "$string:app_name", + "type": "service", + "launchType": "standard", + "visible": true } ], "shortcuts": [ diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystem/src/main/config.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystem/src/main/config.json index 2437ceb4edda67f851e606580b9d9dc5a7444c62..e055a9a8202bd78d91eae3f92101677fc39f38f9 100644 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystem/src/main/config.json +++ b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystem/src/main/config.json @@ -2,7 +2,6 @@ "app": { "bundleName": "com.example.system1", "vendor": "example", - "singleUser":true, "version": { "code": 1, "name": "1.0" @@ -14,9 +13,7 @@ } }, "deviceConfig": { - "default":{ - "keepAlive":true - } + "default":{} }, "module": { "package": "com.example.system1", diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemfeature/BUILD.gn b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemfeature/BUILD.gn new file mode 100644 index 0000000000000000000000000000000000000000..3212864f9e9256650d62f946e4308a99462b47f8 --- /dev/null +++ b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemfeature/BUILD.gn @@ -0,0 +1,34 @@ +# Copyright (c) 2021 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +import("//test/xts/tools/build/suite.gni") + +ohos_hap("bmsSystemBundleTest2Feature") { + hap_profile = "./src/main/config.json" + hap_name = "bmsSystemBundleTest2Feature" + subsystem_name = XTS_SUITENAME + final_hap_path = + "${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap" + testonly = true + deps = [ + ":hjs_demo_js_assets", + ":hjs_demo_resources", + ] + certificate_profile = "./signature/openharmony_sx.p7b" +} +ohos_js_assets("hjs_demo_js_assets") { + source_dir = "./src/main/js/default" +} +ohos_resources("hjs_demo_resources") { + sources = [ "./src/main/js/resources" ] + hap_profile = "./src/main/config.json" +} diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemfeature/Test.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemfeature/Test.json new file mode 100644 index 0000000000000000000000000000000000000000..7a88763ed8d2ac31dd30211b9574f47273e84549 --- /dev/null +++ b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemfeature/Test.json @@ -0,0 +1,3 @@ +{ + "description": "Configuration for hjunit demo Tests", +} diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemfeature/signature/openharmony_sx.p7b b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemfeature/signature/openharmony_sx.p7b new file mode 100755 index 0000000000000000000000000000000000000000..9be1e98fa4c0c28ca997ed660112fa16b194f0f5 Binary files /dev/null and b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemfeature/signature/openharmony_sx.p7b differ diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemfeature/src/main/config.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemfeature/src/main/config.json new file mode 100644 index 0000000000000000000000000000000000000000..0fd6bb419733da0ab9a3e5b27e15a068d6f4efd0 --- /dev/null +++ b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemfeature/src/main/config.json @@ -0,0 +1,66 @@ +{ + "app": { + "bundleName": "com.example.system2", + "vendor": "example", + "singleUser":true, + "version": { + "code": 1, + "name": "1.0" + }, + "apiVersion": { + "compatible": 4, + "target": 5, + "releaseType": "Beta1" + } + }, + "deviceConfig": { + "default":{ + "keepAlive":true + } + }, + "module": { + "package": "com.example.system.feature", + "name": ".system2feature", + "mainAbility": "com.example.system2.MainAbility", + "deviceType": [ + "phone" + ], + "distro": { + "deliveryWithInstall": true, + "moduleName": "systemFeature", + "moduleType": "feature" + }, + "abilities": [ + { + "skills": [ + { + "entities": [ + "entity.system.home" + ], + "actions": [ + "action.system.home" + ] + } + ], + "name": "com.example.system2.MainAbilityB", + "icon": "$media:icon", + "description": "$string:mainability_description", + "label": "$string:app_name", + "type": "page", + "launchType": "standard" + } + ], + "js": [ + { + "pages": [ + "pages/index/index" + ], + "name": "default", + "window": { + "designWidth": 720, + "autoDesignWidth": false + } + } + ] + } +} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemfeature/src/main/js/default/app.js b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemfeature/src/main/js/default/app.js new file mode 100644 index 0000000000000000000000000000000000000000..2a68c1992145a976957d7dcdd69a7e9c2e8e9877 --- /dev/null +++ b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemfeature/src/main/js/default/app.js @@ -0,0 +1,22 @@ +/* + * 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'); + } +}; diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemfeature/src/main/js/default/i18n/en-US.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemfeature/src/main/js/default/i18n/en-US.json new file mode 100644 index 0000000000000000000000000000000000000000..e63c70d978a3a53be988388c87182f81785e170c --- /dev/null +++ b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemfeature/src/main/js/default/i18n/en-US.json @@ -0,0 +1,6 @@ +{ + "strings": { + "hello": "Hello", + "world": "World" + } +} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemfeature/src/main/js/default/i18n/zh-CN.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemfeature/src/main/js/default/i18n/zh-CN.json new file mode 100644 index 0000000000000000000000000000000000000000..de6ee5748322f44942c1b003319d8e66c837675f --- /dev/null +++ b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemfeature/src/main/js/default/i18n/zh-CN.json @@ -0,0 +1,6 @@ +{ + "strings": { + "hello": "您好", + "world": "世界" + } +} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemfeature/src/main/js/default/pages/index/index.css b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemfeature/src/main/js/default/pages/index/index.css new file mode 100644 index 0000000000000000000000000000000000000000..6fda792753f2e15f22b529c7b90a82185b2770bf --- /dev/null +++ b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemfeature/src/main/js/default/pages/index/index.css @@ -0,0 +1,9 @@ +.container { + flex-direction: column; + justify-content: center; + align-items: center; +} + +.title { + font-size: 100px; +} diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemfeature/src/main/js/default/pages/index/index.hml b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemfeature/src/main/js/default/pages/index/index.hml new file mode 100644 index 0000000000000000000000000000000000000000..f64b040a5ae394dbaa5e185e1ecd4f4556b92184 --- /dev/null +++ b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemfeature/src/main/js/default/pages/index/index.hml @@ -0,0 +1,5 @@ +
+ + {{ $t('strings.hello') }} {{ title }} + +
diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemfeature/src/main/js/default/pages/index/index.js b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemfeature/src/main/js/default/pages/index/index.js new file mode 100644 index 0000000000000000000000000000000000000000..23ac44c8d392bb6b777ebae8c8a6f17bfff13f83 --- /dev/null +++ b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemfeature/src/main/js/default/pages/index/index.js @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +const injectRef = Object.getPrototypeOf(global) || global +injectRef.regeneratorRuntime = require('@babel/runtime/regenerator') + +export default { + data: { + title: "" + }, + onInit() { + this.title = this.$t('strings.world'); + } +} diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemfeature/src/main/js/resources/base/element/string.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemfeature/src/main/js/resources/base/element/string.json new file mode 100644 index 0000000000000000000000000000000000000000..8abf35edcac1a14aba258130c1ace4d237188ee7 --- /dev/null +++ b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemfeature/src/main/js/resources/base/element/string.json @@ -0,0 +1,16 @@ +{ + "string": [ + { + "name": "app_name", + "value": "system2" + }, + { + "name": "mainability_description", + "value": "JS_Phone_Empty Feature Ability" + }, + { + "name": "shortcut", + "value": "JS_Phone_Empty Shortcut" + } + ] +} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemfeature/src/main/js/resources/base/media/icon.png b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemfeature/src/main/js/resources/base/media/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..ce307a8827bd75456441ceb57d530e4c8d45d36c Binary files /dev/null and b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemfeature/src/main/js/resources/base/media/icon.png differ diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemtwo/BUILD.gn b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemtwo/BUILD.gn new file mode 100644 index 0000000000000000000000000000000000000000..ee9cfd7afa635850e26de0e2b57daae469be5fe6 --- /dev/null +++ b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemtwo/BUILD.gn @@ -0,0 +1,34 @@ +# Copyright (c) 2021 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +import("//test/xts/tools/build/suite.gni") + +ohos_hap("bmsSystemBundleTest2") { + hap_profile = "./src/main/config.json" + hap_name = "bmsSystemBundleTest2" + subsystem_name = XTS_SUITENAME + final_hap_path = + "${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap" + testonly = true + deps = [ + ":hjs_demo_js_assets", + ":hjs_demo_resources", + ] + certificate_profile = "./signature/openharmony_sx.p7b" +} +ohos_js_assets("hjs_demo_js_assets") { + source_dir = "./src/main/js/default" +} +ohos_resources("hjs_demo_resources") { + sources = [ "./src/main/js/resources" ] + hap_profile = "./src/main/config.json" +} diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemtwo/Test.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemtwo/Test.json new file mode 100644 index 0000000000000000000000000000000000000000..7a88763ed8d2ac31dd30211b9574f47273e84549 --- /dev/null +++ b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemtwo/Test.json @@ -0,0 +1,3 @@ +{ + "description": "Configuration for hjunit demo Tests", +} diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemtwo/signature/openharmony_sx.p7b b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemtwo/signature/openharmony_sx.p7b new file mode 100755 index 0000000000000000000000000000000000000000..9be1e98fa4c0c28ca997ed660112fa16b194f0f5 Binary files /dev/null and b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemtwo/signature/openharmony_sx.p7b differ diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemtwo/src/main/config.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemtwo/src/main/config.json new file mode 100644 index 0000000000000000000000000000000000000000..17ab528bd10ebf7374f6d377076f9dc2f9008a26 --- /dev/null +++ b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemtwo/src/main/config.json @@ -0,0 +1,66 @@ +{ + "app": { + "bundleName": "com.example.system2", + "vendor": "example", + "singleUser":true, + "version": { + "code": 1, + "name": "1.0" + }, + "apiVersion": { + "compatible": 4, + "target": 5, + "releaseType": "Beta1" + } + }, + "deviceConfig": { + "default":{ + "keepAlive":false + } + }, + "module": { + "package": "com.example.system2", + "name": ".BmsSystemBundle1", + "mainAbility": "com.example.system2.MainAbility", + "deviceType": [ + "phone" + ], + "distro": { + "deliveryWithInstall": true, + "moduleName": "entry", + "moduleType": "entry" + }, + "abilities": [ + { + "skills": [ + { + "entities": [ + "entity.system.home" + ], + "actions": [ + "action.system.home" + ] + } + ], + "name": "com.example.system2.MainAbility", + "icon": "$media:icon", + "description": "$string:mainability_description", + "label": "$string:app_name", + "type": "page", + "launchType": "standard" + } + ], + "js": [ + { + "pages": [ + "pages/index/index" + ], + "name": "default", + "window": { + "designWidth": 720, + "autoDesignWidth": false + } + } + ] + } +} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemtwo/src/main/js/default/app.js b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemtwo/src/main/js/default/app.js new file mode 100644 index 0000000000000000000000000000000000000000..2a68c1992145a976957d7dcdd69a7e9c2e8e9877 --- /dev/null +++ b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemtwo/src/main/js/default/app.js @@ -0,0 +1,22 @@ +/* + * 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'); + } +}; diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemtwo/src/main/js/default/i18n/en-US.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemtwo/src/main/js/default/i18n/en-US.json new file mode 100644 index 0000000000000000000000000000000000000000..e63c70d978a3a53be988388c87182f81785e170c --- /dev/null +++ b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemtwo/src/main/js/default/i18n/en-US.json @@ -0,0 +1,6 @@ +{ + "strings": { + "hello": "Hello", + "world": "World" + } +} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemtwo/src/main/js/default/i18n/zh-CN.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemtwo/src/main/js/default/i18n/zh-CN.json new file mode 100644 index 0000000000000000000000000000000000000000..de6ee5748322f44942c1b003319d8e66c837675f --- /dev/null +++ b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemtwo/src/main/js/default/i18n/zh-CN.json @@ -0,0 +1,6 @@ +{ + "strings": { + "hello": "您好", + "world": "世界" + } +} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemtwo/src/main/js/default/pages/index/index.css b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemtwo/src/main/js/default/pages/index/index.css new file mode 100644 index 0000000000000000000000000000000000000000..6fda792753f2e15f22b529c7b90a82185b2770bf --- /dev/null +++ b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemtwo/src/main/js/default/pages/index/index.css @@ -0,0 +1,9 @@ +.container { + flex-direction: column; + justify-content: center; + align-items: center; +} + +.title { + font-size: 100px; +} diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemtwo/src/main/js/default/pages/index/index.hml b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemtwo/src/main/js/default/pages/index/index.hml new file mode 100644 index 0000000000000000000000000000000000000000..f64b040a5ae394dbaa5e185e1ecd4f4556b92184 --- /dev/null +++ b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemtwo/src/main/js/default/pages/index/index.hml @@ -0,0 +1,5 @@ +
+ + {{ $t('strings.hello') }} {{ title }} + +
diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemtwo/src/main/js/default/pages/index/index.js b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemtwo/src/main/js/default/pages/index/index.js new file mode 100644 index 0000000000000000000000000000000000000000..23ac44c8d392bb6b777ebae8c8a6f17bfff13f83 --- /dev/null +++ b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemtwo/src/main/js/default/pages/index/index.js @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +const injectRef = Object.getPrototypeOf(global) || global +injectRef.regeneratorRuntime = require('@babel/runtime/regenerator') + +export default { + data: { + title: "" + }, + onInit() { + this.title = this.$t('strings.world'); + } +} diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemtwo/src/main/js/resources/base/element/string.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemtwo/src/main/js/resources/base/element/string.json new file mode 100644 index 0000000000000000000000000000000000000000..8abf35edcac1a14aba258130c1ace4d237188ee7 --- /dev/null +++ b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemtwo/src/main/js/resources/base/element/string.json @@ -0,0 +1,16 @@ +{ + "string": [ + { + "name": "app_name", + "value": "system2" + }, + { + "name": "mainability_description", + "value": "JS_Phone_Empty Feature Ability" + }, + { + "name": "shortcut", + "value": "JS_Phone_Empty Shortcut" + } + ] +} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemtwo/src/main/js/resources/base/media/icon.png b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemtwo/src/main/js/resources/base/media/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..ce307a8827bd75456441ceb57d530e4c8d45d36c Binary files /dev/null and b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemtwo/src/main/js/resources/base/media/icon.png differ diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemupdate/BUILD.gn b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemupdate/BUILD.gn new file mode 100644 index 0000000000000000000000000000000000000000..2669e011c1c7ce8f382ca821d1ed29d2a4e0c715 --- /dev/null +++ b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemupdate/BUILD.gn @@ -0,0 +1,34 @@ +# Copyright (c) 2021 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +import("//test/xts/tools/build/suite.gni") + +ohos_hap("bmsSystemBundleTest2Update") { + hap_profile = "./src/main/config.json" + hap_name = "bmsSystemBundleTest2Update" + subsystem_name = XTS_SUITENAME + final_hap_path = + "${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap" + testonly = true + deps = [ + ":hjs_demo_js_assets", + ":hjs_demo_resources", + ] + certificate_profile = "./signature/openharmony_sx.p7b" +} +ohos_js_assets("hjs_demo_js_assets") { + source_dir = "./src/main/js/default" +} +ohos_resources("hjs_demo_resources") { + sources = [ "./src/main/js/resources" ] + hap_profile = "./src/main/config.json" +} diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemupdate/Test.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemupdate/Test.json new file mode 100644 index 0000000000000000000000000000000000000000..7a88763ed8d2ac31dd30211b9574f47273e84549 --- /dev/null +++ b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemupdate/Test.json @@ -0,0 +1,3 @@ +{ + "description": "Configuration for hjunit demo Tests", +} diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemupdate/signature/openharmony_sx.p7b b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemupdate/signature/openharmony_sx.p7b new file mode 100755 index 0000000000000000000000000000000000000000..9be1e98fa4c0c28ca997ed660112fa16b194f0f5 Binary files /dev/null and b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemupdate/signature/openharmony_sx.p7b differ diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemupdate/src/main/config.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemupdate/src/main/config.json new file mode 100644 index 0000000000000000000000000000000000000000..704050bee7a5b131c060b22cc787dfcae540342c --- /dev/null +++ b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemupdate/src/main/config.json @@ -0,0 +1,66 @@ +{ + "app": { + "bundleName": "com.example.system2", + "vendor": "example", + "singleUser":true, + "version": { + "code": 5, + "name": "5.0" + }, + "apiVersion": { + "compatible": 4, + "target": 5, + "releaseType": "Beta1" + } + }, + "deviceConfig": { + "default":{ + "keepAlive":true + } + }, + "module": { + "package": "com.example.system2", + "name": ".BmsSystemBundle1", + "mainAbility": "com.example.system2.MainAbility", + "deviceType": [ + "phone" + ], + "distro": { + "deliveryWithInstall": true, + "moduleName": "entry", + "moduleType": "entry" + }, + "abilities": [ + { + "skills": [ + { + "entities": [ + "entity.system.home" + ], + "actions": [ + "action.system.home" + ] + } + ], + "name": "com.example.system2.MainAbility", + "icon": "$media:icon", + "description": "$string:mainability_description", + "label": "$string:app_name", + "type": "page", + "launchType": "standard" + } + ], + "js": [ + { + "pages": [ + "pages/index/index" + ], + "name": "default", + "window": { + "designWidth": 720, + "autoDesignWidth": false + } + } + ] + } +} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemupdate/src/main/js/default/app.js b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemupdate/src/main/js/default/app.js new file mode 100644 index 0000000000000000000000000000000000000000..2a68c1992145a976957d7dcdd69a7e9c2e8e9877 --- /dev/null +++ b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemupdate/src/main/js/default/app.js @@ -0,0 +1,22 @@ +/* + * 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'); + } +}; diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemupdate/src/main/js/default/i18n/en-US.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemupdate/src/main/js/default/i18n/en-US.json new file mode 100644 index 0000000000000000000000000000000000000000..e63c70d978a3a53be988388c87182f81785e170c --- /dev/null +++ b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemupdate/src/main/js/default/i18n/en-US.json @@ -0,0 +1,6 @@ +{ + "strings": { + "hello": "Hello", + "world": "World" + } +} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemupdate/src/main/js/default/i18n/zh-CN.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemupdate/src/main/js/default/i18n/zh-CN.json new file mode 100644 index 0000000000000000000000000000000000000000..de6ee5748322f44942c1b003319d8e66c837675f --- /dev/null +++ b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemupdate/src/main/js/default/i18n/zh-CN.json @@ -0,0 +1,6 @@ +{ + "strings": { + "hello": "您好", + "world": "世界" + } +} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemupdate/src/main/js/default/pages/index/index.css b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemupdate/src/main/js/default/pages/index/index.css new file mode 100644 index 0000000000000000000000000000000000000000..6fda792753f2e15f22b529c7b90a82185b2770bf --- /dev/null +++ b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemupdate/src/main/js/default/pages/index/index.css @@ -0,0 +1,9 @@ +.container { + flex-direction: column; + justify-content: center; + align-items: center; +} + +.title { + font-size: 100px; +} diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemupdate/src/main/js/default/pages/index/index.hml b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemupdate/src/main/js/default/pages/index/index.hml new file mode 100644 index 0000000000000000000000000000000000000000..f64b040a5ae394dbaa5e185e1ecd4f4556b92184 --- /dev/null +++ b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemupdate/src/main/js/default/pages/index/index.hml @@ -0,0 +1,5 @@ +
+ + {{ $t('strings.hello') }} {{ title }} + +
diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemupdate/src/main/js/default/pages/index/index.js b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemupdate/src/main/js/default/pages/index/index.js new file mode 100644 index 0000000000000000000000000000000000000000..23ac44c8d392bb6b777ebae8c8a6f17bfff13f83 --- /dev/null +++ b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemupdate/src/main/js/default/pages/index/index.js @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +const injectRef = Object.getPrototypeOf(global) || global +injectRef.regeneratorRuntime = require('@babel/runtime/regenerator') + +export default { + data: { + title: "" + }, + onInit() { + this.title = this.$t('strings.world'); + } +} diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemupdate/src/main/js/resources/base/element/string.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemupdate/src/main/js/resources/base/element/string.json new file mode 100644 index 0000000000000000000000000000000000000000..56a8d952c81f3f6c0bee12a1fc212218d10cc1ca --- /dev/null +++ b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemupdate/src/main/js/resources/base/element/string.json @@ -0,0 +1,16 @@ +{ + "string": [ + { + "name": "app_name", + "value": "upsystem" + }, + { + "name": "mainability_description", + "value": "JS_Phone_Empty Feature Ability" + }, + { + "name": "shortcut", + "value": "JS_Phone_Empty Shortcut" + } + ] +} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemupdate/src/main/js/resources/base/media/icon.png b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemupdate/src/main/js/resources/base/media/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..ce307a8827bd75456441ceb57d530e4c8d45d36c Binary files /dev/null and b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemupdate/src/main/js/resources/base/media/icon.png differ diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfossecondscene/src/main/config.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfossecondscene/src/main/config.json index d64c2cf6a01ae597e4ec395e26adb47503bc88d0..10db86225767da3ba99607d2d828effe86d43357 100644 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfossecondscene/src/main/config.json +++ b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfossecondscene/src/main/config.json @@ -25,6 +25,26 @@ "moduleType": "entry" }, "abilities": [ + { + "skills": [ + { + "entities": [ + "entity.system.home" + ], + "actions": [ + "action.system.home" + ] + } + ], + "name": "com.example.third2.MainAbility", + "srcLanguage": "js", + "visible": true, + "icon": "$media:icon", + "description": "$string:mainability_description", + "label": "$string:app_name", + "type": "page", + "launchType": "standard" + }, { "skills": [ { @@ -47,13 +67,13 @@ "voip", "taskKeeping" ], - "name": "com.example.third2.MainAbility", + "name": "com.example.third2.MainAbilityA", "srcLanguage": "js", "visible": true, "icon": "$media:icon", "description": "$string:mainability_description", "label": "$string:app_name", - "type": "page", + "type": "service", "launchType": "standard" } ], diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfossixthscene/src/main/config.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfossixthscene/src/main/config.json index 860bb5ba98d2aff0837600df368d4a564d2656d3..44cabba3a4c576b6b05406e0fe5ea8f667744a35 100644 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfossixthscene/src/main/config.json +++ b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfossixthscene/src/main/config.json @@ -44,7 +44,7 @@ "icon": "$media:icon", "description": "$string:mainability_description", "label": "$string:app_name", - "type": "page", + "type": "service", "launchType": "standard" }, { @@ -66,7 +66,7 @@ "icon": "$media:icon", "description": "$string:mainability_description", "label": "$string:app_name", - "type": "page", + "type": "service", "launchType": "standard" }, { @@ -88,7 +88,7 @@ "icon": "$media:icon", "description": "$string:mainability_description", "label": "$string:app_name", - "type": "page", + "type": "service", "launchType": "standard" }, { @@ -110,7 +110,7 @@ "icon": "$media:icon", "description": "$string:mainability_description", "label": "$string:app_name", - "type": "page", + "type": "service", "launchType": "standard" }, { @@ -132,7 +132,7 @@ "icon": "$media:icon", "description": "$string:mainability_description", "label": "$string:app_name", - "type": "page", + "type": "service", "launchType": "standard" }, { @@ -154,7 +154,7 @@ "icon": "$media:icon", "description": "$string:mainability_description", "label": "$string:app_name", - "type": "page", + "type": "service", "launchType": "standard" }, { @@ -176,7 +176,7 @@ "icon": "$media:icon", "description": "$string:mainability_description", "label": "$string:app_name", - "type": "page", + "type": "service", "launchType": "standard" }, { @@ -198,7 +198,7 @@ "icon": "$media:icon", "description": "$string:mainability_description", "label": "$string:app_name", - "type": "page", + "type": "service", "launchType": "standard" }, { @@ -220,7 +220,7 @@ "icon": "$media:icon", "description": "$string:mainability_description", "label": "$string:app_name", - "type": "page", + "type": "service", "launchType": "standard" } ], diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosthirdscene/src/main/config.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosthirdscene/src/main/config.json index 8c05e0f848c0808d977c3f0002214f592dad6a45..54c86428eb244bd77e59a6228b8d144e14e00a1a 100644 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosthirdscene/src/main/config.json +++ b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosthirdscene/src/main/config.json @@ -41,17 +41,6 @@ ] } ], - "backgroundModes": [ - "dataTransfer", - "audioPlayback", - "audioRecording", - "location", - "bluetoothInteraction", - "multiDeviceConnection", - "wifiInteraction", - "voip", - "taskKeeping" - ], "name": "com.example.third3.MainAbility", "icon": "$media:icon", "description": "$string:mainability_description", @@ -120,6 +109,46 @@ } ] } + }, + { + "skills": [ + { + "entities": [ + "entity.system.home" + ], + "actions": [ + "action.system.home" + ] + } + ], + "backgroundModes": [ + "dataTransfer", + "audioPlayback", + "audioRecording", + "location", + "bluetoothInteraction", + "multiDeviceConnection", + "wifiInteraction", + "voip", + "taskKeeping" + ], + "name": "com.example.third1.MainAbilityA", + "icon": "$media:icon", + "form": { + "formEntity": [ + "homeScreen", + "searchbox" + ], + "defaultHeight": 100, + "defaultWidth": 200, + "minHeight": 50, + "minWidth": 100 + }, + "description": "$string:mainability_description", + "label": "$string:app_name", + "type": "service", + "launchType": "standard", + "visible": true } ], "shortcuts": [