From 796c73b89b4af60bd3adca4e19d7ee8b8fdc7274 Mon Sep 17 00:00:00 2001 From: yuxiaoya2 Date: Thu, 1 Feb 2024 19:33:47 +0800 Subject: [PATCH] =?UTF-8?q?Stage=E6=A8=A1=E5=9E=8B=E6=95=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: yuxiaoya2 Change-Id: I9aae537d22fedad7bccb82ed9a348b63cac12ed6 --- .../client/hap/Test.json | 4 +- .../client/hap/signature/openharmony_sx.p7b | Bin 3692 -> 3727 bytes .../client/hap/src/main/config.json | 4 +- .../js/test/RdbStoreSyncCustomDir.test.js | 24 +-- .../test/RdbStoreSyncFirstLevelJsunit.test.js | 159 ++++++++++++------ .../server/hap/AppScope/app.json | 21 +++ .../resources/base/element/string.json | 8 + .../resources/base/media/app_icon.png | Bin 0 -> 15458 bytes .../distributed_rdb_store/server/hap/BUILD.gn | 30 +++- .../server/hap/Test.json | 18 -- .../src/main/ets/Application/AbilityStage.ts | 24 +++ .../src/main/ets/MainAbility/MainAbility.ts | 52 ++++++ .../MainAbility/pages/MainAbility_pages.ets | 32 ++++ .../main/ets/serviceability/ServiceAbility.ts | 137 +++++++++++++++ .../server/hap/entry/src/main/module.json | 63 +++++++ .../main/resources/base/element/string.json | 92 ++++++++++ .../src/main/resources/base/media/icon.png | Bin 0 -> 15458 bytes .../resources/base/profile/main_pages.json | 5 + .../server/hap/signature/openharmony_sx.p7b | Bin 3692 -> 3727 bytes .../server/hap/src/main/config.json | 96 ----------- .../server/hap/src/main/js/MainAbility/app.js | 44 ----- .../src/main/js/MainAbility/i18n/en-US.json | 8 - .../src/main/js/MainAbility/i18n/zh-CN.json | 8 - .../main/js/MainAbility/pages/index/index.css | 23 --- .../main/js/MainAbility/pages/index/index.hml | 5 - .../main/js/MainAbility/pages/index/index.js | 112 ------------ .../src/main/js/MainAbility/test/List.test.js | 15 -- .../hap/src/main/js/ServiceAbility/service.js | 84 --------- .../main/resources/base/element/string.json | 16 -- .../src/main/resources/base/media/icon.png | Bin 6790 -> 0 bytes testtools/disjsTest/client/testService.js | 6 +- 31 files changed, 574 insertions(+), 516 deletions(-) create mode 100644 distributeddatamgr/jstest/distributed_rdb_store/server/hap/AppScope/app.json create mode 100644 distributeddatamgr/jstest/distributed_rdb_store/server/hap/AppScope/resources/base/element/string.json create mode 100644 distributeddatamgr/jstest/distributed_rdb_store/server/hap/AppScope/resources/base/media/app_icon.png delete mode 100644 distributeddatamgr/jstest/distributed_rdb_store/server/hap/Test.json create mode 100644 distributeddatamgr/jstest/distributed_rdb_store/server/hap/entry/src/main/ets/Application/AbilityStage.ts create mode 100644 distributeddatamgr/jstest/distributed_rdb_store/server/hap/entry/src/main/ets/MainAbility/MainAbility.ts create mode 100644 distributeddatamgr/jstest/distributed_rdb_store/server/hap/entry/src/main/ets/MainAbility/pages/MainAbility_pages.ets create mode 100644 distributeddatamgr/jstest/distributed_rdb_store/server/hap/entry/src/main/ets/serviceability/ServiceAbility.ts create mode 100644 distributeddatamgr/jstest/distributed_rdb_store/server/hap/entry/src/main/module.json create mode 100644 distributeddatamgr/jstest/distributed_rdb_store/server/hap/entry/src/main/resources/base/element/string.json create mode 100644 distributeddatamgr/jstest/distributed_rdb_store/server/hap/entry/src/main/resources/base/media/icon.png create mode 100644 distributeddatamgr/jstest/distributed_rdb_store/server/hap/entry/src/main/resources/base/profile/main_pages.json delete mode 100644 distributeddatamgr/jstest/distributed_rdb_store/server/hap/src/main/config.json delete mode 100644 distributeddatamgr/jstest/distributed_rdb_store/server/hap/src/main/js/MainAbility/app.js delete mode 100644 distributeddatamgr/jstest/distributed_rdb_store/server/hap/src/main/js/MainAbility/i18n/en-US.json delete mode 100644 distributeddatamgr/jstest/distributed_rdb_store/server/hap/src/main/js/MainAbility/i18n/zh-CN.json delete mode 100644 distributeddatamgr/jstest/distributed_rdb_store/server/hap/src/main/js/MainAbility/pages/index/index.css delete mode 100644 distributeddatamgr/jstest/distributed_rdb_store/server/hap/src/main/js/MainAbility/pages/index/index.hml delete mode 100644 distributeddatamgr/jstest/distributed_rdb_store/server/hap/src/main/js/MainAbility/pages/index/index.js delete mode 100644 distributeddatamgr/jstest/distributed_rdb_store/server/hap/src/main/js/MainAbility/test/List.test.js delete mode 100644 distributeddatamgr/jstest/distributed_rdb_store/server/hap/src/main/js/ServiceAbility/service.js delete mode 100644 distributeddatamgr/jstest/distributed_rdb_store/server/hap/src/main/resources/base/element/string.json delete mode 100644 distributeddatamgr/jstest/distributed_rdb_store/server/hap/src/main/resources/base/media/icon.png diff --git a/distributeddatamgr/jstest/distributed_rdb_store/client/hap/Test.json b/distributeddatamgr/jstest/distributed_rdb_store/client/hap/Test.json index bf711f8..2c9b2de 100644 --- a/distributeddatamgr/jstest/distributed_rdb_store/client/hap/Test.json +++ b/distributeddatamgr/jstest/distributed_rdb_store/client/hap/Test.json @@ -4,8 +4,8 @@ "type": "OHJSUnitTest", "test-timeout": "60000", "testcase-timeout": 60000, - "bundle-name": "com.ohos.distributerdbdisjs", - "package-name": "com.ohos.distributerdbdisjs", + "bundle-name": "com.acts.distributerdbdisjs", + "package-name": "com.acts.distributerdbdisjs", "shell-timeout": "60000" }, "kits": [ diff --git a/distributeddatamgr/jstest/distributed_rdb_store/client/hap/signature/openharmony_sx.p7b b/distributeddatamgr/jstest/distributed_rdb_store/client/hap/signature/openharmony_sx.p7b index b58d5f6505edfe1696d400b4b1c0c42fdc71a447..c65cbc844edaa8a017a0b5f57b4db8006040a0d9 100644 GIT binary patch delta 294 zcmaDO(=Y2_(8Slx#;Mij(e|B}k)3Hl6JHHbsDg=+(U8}Gn~gJ}&4V$OnT3hbpovWv zp^$Mw6Pp}M6PwgVhddVM#N?968(C!8^74yv6LTitV)35r!>Tk{l~sH4G**epF|20d z-mb0z@lKA;-tIyEp?)s$L7{$ro__9|*Rs~KvjSbgXfs)#cXhpqfuWJ5fu)h9p;459 zKHNS|7DFW#h0onZKNrf2DF4cFUtlz8NuD~-zGaCSlRxuD%4O+E%|B+q#l`{j$vImV zW+oOl0~aO*i>!r`3?ljSU8EmB75{9$okceNoUz&TkK2sg)N9)n+dcpQ)45=8 delta 286 zcmeB|eIw&w(8QO)#;Mij(e|B}k)3Hl6JI1yD3pnj(U8}Gn~gJ}&4V$OnT3hbpoxtW zp^$Mw6YDRQCf08o9r9S1^E2`%Z)B0>DXuIoNzIK|_GD#NxyjR5 zRVHV!%51*GTEoueXwbxH3$(x>d-6o?)X95!9qWw^ObjgzEDbFT%%TkR;nr}n7%H(S zgt4Av;=X1g|NM!OUe(TNO72rH@R+_9H~(tf9Ovk=xWs^qjRWX`bG9tZOf2pOu1tyy zE1OgHY^@MvHt0^j`t?{q;<|+y)zT(gm$v%x?R3vge9WZaSayLsRb9)zscFKeIN>#1 WOsjs+bSlyNXtvBXbOwvfiDdxx#9TK3 diff --git a/distributeddatamgr/jstest/distributed_rdb_store/client/hap/src/main/config.json b/distributeddatamgr/jstest/distributed_rdb_store/client/hap/src/main/config.json index 3fc765a..57a50ff 100644 --- a/distributeddatamgr/jstest/distributed_rdb_store/client/hap/src/main/config.json +++ b/distributeddatamgr/jstest/distributed_rdb_store/client/hap/src/main/config.json @@ -1,6 +1,6 @@ { "app": { - "bundleName": "com.ohos.distributerdbdisjs", + "bundleName": "com.acts.distributerdbdisjs", "vendor": "ohos", "version": { "code": 1000000, @@ -14,7 +14,7 @@ }, "deviceConfig": {}, "module": { - "package": "com.ohos.distributerdbdisjs", + "package": "com.acts.distributerdbdisjs", "name": ".entry", "mainAbility":".MainAbility", "srcPath":"", diff --git a/distributeddatamgr/jstest/distributed_rdb_store/client/hap/src/main/js/test/RdbStoreSyncCustomDir.test.js b/distributeddatamgr/jstest/distributed_rdb_store/client/hap/src/main/js/test/RdbStoreSyncCustomDir.test.js index 6506e45..e1b9548 100644 --- a/distributeddatamgr/jstest/distributed_rdb_store/client/hap/src/main/js/test/RdbStoreSyncCustomDir.test.js +++ b/distributeddatamgr/jstest/distributed_rdb_store/client/hap/src/main/js/test/RdbStoreSyncCustomDir.test.js @@ -42,7 +42,7 @@ let remoteHelpers = null; let deviceId = null; let syncDeviceIds = undefined; let deviceList = undefined; -const TEST_BUNDLE_NAME = 'com.ohos.distributerdbdisjs'; +const TEST_BUNDLE_NAME = 'com.acts.distributerdbdisjs'; function sleep(ms) { @@ -87,30 +87,10 @@ export default function rdbSyncCustomDirlTest(){ let dmInstance = deviceManager.createDeviceManager(TEST_BUNDLE_NAME); deviceList = dmInstance.getAvailableDeviceListSync(); - deviceId = deviceList[0].networkId; + deviceId = deviceList[0].networkId; console.info(logTag + "deviceId is: " + deviceId); syncDeviceIds = [deviceId]; - try{ - console.info(logTag + "deviceId: " + deviceId); - let wantValue = { - bundleName: "com.ohos.distributerdbdisjs", - abilityName: "com.ohos.distributerdbdisjs.MainAbility", - deviceId: deviceId - }; - await featureAbility.startAbility({ - want: wantValue - }).then((data) => { - console.info(logTag + 'beforeAll startAbility data success' + JSON.stringify(data)); - }).catch((err) => { - console.info(logTag + 'beforeAll startAbility err: ' + err.code); - console.info(logTag + 'beforeAll startAbility err: ' + err.message); - }); - }catch(error){ - console.info(logTag + "beforeAll startAbility:error = " + error); - } - await sleep(100); - testservice = new TestService(); await testservice.toConnectRdbAbility().then(data => { gIRemoteObject = data; diff --git a/distributeddatamgr/jstest/distributed_rdb_store/client/hap/src/main/js/test/RdbStoreSyncFirstLevelJsunit.test.js b/distributeddatamgr/jstest/distributed_rdb_store/client/hap/src/main/js/test/RdbStoreSyncFirstLevelJsunit.test.js index b97c258..e7589fa 100644 --- a/distributeddatamgr/jstest/distributed_rdb_store/client/hap/src/main/js/test/RdbStoreSyncFirstLevelJsunit.test.js +++ b/distributeddatamgr/jstest/distributed_rdb_store/client/hap/src/main/js/test/RdbStoreSyncFirstLevelJsunit.test.js @@ -41,7 +41,7 @@ let remoteHelpers = null; let deviceId = null; let syncDeviceIds = undefined; let deviceList = undefined; -const TEST_BUNDLE_NAME = 'com.ohos.distributerdbdisjs'; +const TEST_BUNDLE_NAME = 'com.acts.distributerdbdisjs'; function sleep(ms) { @@ -90,26 +90,6 @@ export default function rdbSyncFirstLevelTest(){ console.info(logTag + "deviceId is: " + deviceId); syncDeviceIds = [deviceId]; - try{ - console.info(logTag + "deviceId: " + deviceId); - let wantValue = { - bundleName: "com.ohos.distributerdbdisjs", - abilityName: "com.ohos.distributerdbdisjs.MainAbility", - deviceId: deviceId - }; - await featureAbility.startAbility({ - want: wantValue - }).then((data) => { - console.info(logTag + 'beforeAll startAbility data success' + JSON.stringify(data)); - }).catch((err) => { - console.info(logTag + 'beforeAll startAbility err: ' + err.code); - console.info(logTag + 'beforeAll startAbility err: ' + err.message); - }); - }catch(error){ - console.info(logTag + "beforeAll startAbility:error = " + error); - } - await sleep(100); - testservice = new TestService(); await testservice.toConnectRdbAbility().then(data => { gIRemoteObject = data; @@ -181,9 +161,12 @@ export default function rdbSyncFirstLevelTest(){ }) /** - * @tc.number SUB_DISTRIBUTEDDATAMGR_SyncRDBTest_0100 + * @tc.number SUB_DistributedData_RelastionStore_CrossDevice_SDK_RemoteQueryJsAPITest_1000 * @tc.name testRdbSyncTest0010 * @tc.desc Server rdbStore Insert first and synchronize + * @tc.size MediumTest + * @tc.type Function + * @tc.level Level 2 */ it("testRdbSyncTest0010", 0, async function (done) { console.info(logTag + "testRdbSyncTest0010 start"); @@ -234,9 +217,12 @@ export default function rdbSyncFirstLevelTest(){ }) /** - * @tc.number SUB_DISTRIBUTEDDATAMGR_SyncRDBTest_0200 + * @tc.number SUB_DistributedData_RelastionStore_CrossDevice_SDK_RemoteQueryJsAPITest_1800 * @tc.name testRdbSyncTest0020 * @tc.desc Server rdbStore Insert twice and synchronize twice + * @tc.size MediumTest + * @tc.type Function + * @tc.level Level 2 */ it("testRdbSyncTest0020", 0, async function (done) { console.info(logTag + "testRdbSyncTest0020 start"); @@ -310,9 +296,12 @@ export default function rdbSyncFirstLevelTest(){ }) /** - * @tc.number SUB_DISTRIBUTEDDATAMGR_SyncRDBTest_0300 + * @tc.number SUB_DistributedData_RelastionStore_CrossDevice_SDK_RemoteQueryJsAPITest_2300 * @tc.name testRdbSyncTest0030 * @tc.desc Server rdbStore Insert synchronization and then update synchronization + * @tc.size MediumTest + * @tc.type Function + * @tc.level Level 2 */ it("testRdbSyncTest0030", 0, async function (done) { console.info(logTag + "testRdbSyncTest0030 start"); @@ -386,9 +375,12 @@ export default function rdbSyncFirstLevelTest(){ /** - * @tc.number SUB_DISTRIBUTEDDATAMGR_SyncRDBTest_0400 + * @tc.number SUB_DistributedData_RelastionStore_CrossDevice_SDK_RemoteQueryJsAPITest_2100 * @tc.name testRdbSyncTest0040 * @tc.desc Server rdbStore Insert synchronization, and then delete synchronization + * @tc.size MediumTest + * @tc.type Function + * @tc.level Level 2 */ it("testRdbSyncTest0040", 0, async function (done) { console.info(logTag + "testRdbSyncTest0040 start"); @@ -449,9 +441,12 @@ export default function rdbSyncFirstLevelTest(){ /** - * @tc.number SUB_DISTRIBUTEDDATAMGR_SyncRDBTest_0500 + * @tc.number SUB_DistributedData_RelastionStore_CrossDevice_SDK_RemoteQueryJsAPITest_1100 * @tc.name testRdbSyncTest0050 * @tc.desc Server rdbStore batchInsert sync + * @tc.size MediumTest + * @tc.type Function + * @tc.level Level 2 */ it("testRdbSyncTest0050", 0, async function (done) { console.info(logTag + "testRdbSyncTest0050 start"); @@ -516,9 +511,12 @@ export default function rdbSyncFirstLevelTest(){ /** - * @tc.number SUB_DISTRIBUTEDDATAMGR_SyncRDBTest_0600 + * @tc.number SUB_DistributedData_RelastionStore_CrossDevice_SDK_RemoteQueryJsAPITest_1600 * @tc.name testRdbSyncTest0060 * @tc.desc Server rdbStore BatchInsert synchronization and then update synchronization + * @tc.size MediumTest + * @tc.type Function + * @tc.level Level 2 */ it("testRdbSyncTest0060", 0, async function (done) { console.info(logTag + "testRdbSyncTest0060 start"); @@ -611,9 +609,12 @@ export default function rdbSyncFirstLevelTest(){ /** - * @tc.number SUB_DISTRIBUTEDDATAMGR_SyncRDBTest_0700 + * @tc.number SUB_DistributedData_RelastionStore_CrossDevice_SDK_RemoteQueryJsAPITest_1300 * @tc.name testRdbSyncTest0070 * @tc.desc Server rdbStore BatchInsert synchronization, and then delete synchronization + * @tc.size MediumTest + * @tc.type Function + * @tc.level Level 2 */ it("testRdbSyncTest0070", 0, async function (done) { console.info(logTag + "testRdbSyncTest0070 start"); @@ -689,9 +690,12 @@ export default function rdbSyncFirstLevelTest(){ }) /** - * @tc.number SUB_DISTRIBUTEDDATAMGR_SyncRDBTest_0800 + * @tc.number SUB_DistributedData_RelastionStore_CrossDevice_SDK_RemoteQueryJsAPITest_1500 * @tc.name testRdbSyncTest0080 * @tc.desc Server rdbStore BatchInsert synchronization, and then delete synchronization,and then update synchronization + * @tc.size MediumTest + * @tc.type Function + * @tc.level Level 2 */ it("testRdbSyncTest0080", 0, async function (done) { console.info(logTag + "testRdbSyncTest0080 start"); @@ -801,9 +805,12 @@ export default function rdbSyncFirstLevelTest(){ /** - * @tc.number SUB_DISTRIBUTEDDATAMGR_SyncRDBTest_0900 + * @tc.number SUB_DistributedData_RelastionStore_CrossDevice_SDK_RemoteQueryJsAPITest_1400 * @tc.name testRdbSyncTest0090 * @tc.desc Server rdbStore BatchInsert synchronization, and then delete synchronization, and then insert synchronization + * @tc.size MediumTest + * @tc.type Function + * @tc.level Level 2 */ it("testRdbSyncTest0090", 0, async function (done) { console.info(logTag + "testRdbSyncTest0090 start"); @@ -914,9 +921,12 @@ export default function rdbSyncFirstLevelTest(){ /** - * @tc.number SUB_DISTRIBUTEDDATAMGR_SyncRDBTest_1000 + * @tc.number SUB_DistributedData_RelastionStore_CrossDevice_SDK_RemoteQueryJsAPITest_1200 * @tc.name testRdbSyncTest0100 - * @tc.desc Server rdbStore BatchInsert synchronization callback, + * @tc.desc Server rdbStore BatchInsert synchronization callback + * @tc.size MediumTest + * @tc.type Function + * @tc.level Level 2 */ it("testRdbSyncTest0100", 0, async function (done) { console.info(logTag + "testRdbSyncTest0100 start"); @@ -985,9 +995,12 @@ export default function rdbSyncFirstLevelTest(){ /** - * @tc.number SUB_DISTRIBUTEDDATAMGR_SyncRDBTest_1100 + * @tc.number SUB_DistributedData_RelastionStore_CrossDevice_SDK_RemoteQueryJsAPITest_0800 * @tc.name testRdbSyncTest0110 * @tc.desc Server rdbStore Insert first and synchronize salary Number.MIN_VALUE-1 + * @tc.size MediumTest + * @tc.type Function + * @tc.level Level 2 */ it("testRdbSyncTest0110", 0, async function (done) { console.info(logTag + "testRdbSyncTest0110 start"); @@ -1038,9 +1051,12 @@ export default function rdbSyncFirstLevelTest(){ /** - * @tc.number SUB_DISTRIBUTEDDATAMGR_SyncRDBTest_1200 + * @tc.number SUB_DistributedData_RelastionStore_CrossDevice_SDK_RemoteQueryJsAPITest_1700 * @tc.name testRdbSyncTest0120 * @tc.desc Server rdbStore BatchInsert synchronization, and then update synchronization,and then update synchronization + * @tc.size MediumTest + * @tc.type Function + * @tc.level Level 2 */ it("testRdbSyncTest0120", 0, async function (done) { console.info(logTag + "testRdbSyncTest0120 start"); @@ -1168,9 +1184,12 @@ export default function rdbSyncFirstLevelTest(){ /** - * @tc.number SUB_DISTRIBUTEDDATAMGR_SyncRDBTest_1300 + * @tc.number SUB_DistributedData_RelastionStore_CrossDevice_SDK_RemoteQueryJsAPITest_0700 * @tc.name testRdbSyncTest0130 * @tc.desc Server rdbStore Insert first and synchronize salary Number.MAX_VALUE+1 + * @tc.size MediumTest + * @tc.type Function + * @tc.level Level 2 */ it("testRdbSyncTest0130", 0, async function (done) { console.info(logTag + "testRdbSyncTest0130 start"); @@ -1221,9 +1240,12 @@ export default function rdbSyncFirstLevelTest(){ /** - * @tc.number SUB_DISTRIBUTEDDATAMGR_SyncRDBTest_1400 + * @tc.number SUB_DistributedData_RelastionStore_CrossDevice_SDK_RemoteQueryJsAPITest_2200 * @tc.name testRdbSyncTest0140 * @tc.desc Server rdbStore Insert first and synchronize,delete all + * @tc.size MediumTest + * @tc.type Function + * @tc.level Level 2 */ it("testRdbSyncTest0140", 0, async function (done) { console.info(logTag + "testRdbSyncTest0140 start"); @@ -1291,9 +1313,12 @@ export default function rdbSyncFirstLevelTest(){ }) /** - * @tc.number SUB_DISTRIBUTEDDATAMGR_SyncRDBTest_1600 + * @tc.number SUB_DistributedData_RelastionStore_CrossDevice_SDK_RemoteQueryJsAPITest_1900 * @tc.name testRdbSyncTest0160 * @tc.desc Server rdbStore Insert first and synchronize, Sync the null character of the pre-device id + * @tc.size MediumTest + * @tc.type Function + * @tc.level Level 2 */ it("testRdbSyncTest0160", 0, async function (done) { console.info(logTag + "testRdbSyncTest0160 start"); @@ -1347,9 +1372,12 @@ export default function rdbSyncFirstLevelTest(){ /** - * @tc.number SUB_DISTRIBUTEDDATAMGR_SyncRDBTest_1700 + * @tc.number SUB_DistributedData_RelastionStore_CrossDevice_SDK_RemoteQueryJsAPITest_2000 * @tc.name testRdbSyncTest0170 * @tc.desc Server rdbStore Insert first and synchronize, Error in synchronization of pre-tableName + * @tc.size MediumTest + * @tc.type Function + * @tc.level Level 2 */ it("testRdbSyncTest0170", 0, async function (done) { console.info(logTag + "testRdbSyncTest0170 start"); @@ -1405,9 +1433,12 @@ export default function rdbSyncFirstLevelTest(){ }) /** - * @tc.number SUB_DISTRIBUTEDDATAMGR_SyncRDBTest_1800 + * @tc.number SUB_DistributedData_RelastionStore_CrossDevice_SDK_RemoteQueryJsAPITest_0900 * @tc.name testRdbSyncTest0180 * @tc.desc Server rdbStore Insert first and synchronize, Pass null in synchronous mode + * @tc.size MediumTest + * @tc.type Function + * @tc.level Level 2 */ it("testRdbSyncTest0180", 0, async function (done) { console.info(logTag + "testRdbSyncTest0180 start"); @@ -1463,9 +1494,12 @@ export default function rdbSyncFirstLevelTest(){ }) /** - * @tc.number SUB_DISTRIBUTEDDATAMGR_SyncRDBTest_1900 + * @tc.number SUB_DistributedData_RelastionStore_CrossDevice_SDK_RemoteQueryJsAPITest_2500 * @tc.name testRdbSyncTest0190 * @tc.desc Server get rdbStoreS2 level, Name different + * @tc.size MediumTest + * @tc.type Function + * @tc.level Level 2 */ it("testRdbSyncTest0190", 0, async function (done) { console.info(logTag + "testRdbSyncTest0190 start"); @@ -1542,9 +1576,12 @@ export default function rdbSyncFirstLevelTest(){ /** - * @tc.number SUB_DISTRIBUTEDDATAMGR_SyncRDBTest_2000 + * @tc.number SUB_DistributedData_RelastionStore_CrossDevice_SDK_RemoteQueryJsAPITest_2400 * @tc.name testRdbSyncTest0200 * @tc.desc Server get rdbStoreS2 level, Name different + * @tc.size MediumTest + * @tc.type Function + * @tc.level Level 2 */ it("testRdbSyncTest0200", 0, async function (done) { console.info(logTag + "testRdbSyncTest0200 start"); @@ -1619,9 +1656,12 @@ export default function rdbSyncFirstLevelTest(){ }) /** - * @tc.number SUB_DISTRIBUTEDDATAMGR_SyncRDBTest_2100 + * @tc.number SUB_DistributedData_RelastionStore_CrossDevice_SDK_RemoteQueryJsAPITest_2600 * @tc.name testRdbSyncTest0210 * @tc.desc Server rdbStore get rdbStoreS2 level, Name equal + * @tc.size MediumTest + * @tc.type Function + * @tc.level Level 2 */ it("testRdbSyncTest0210", 0, async function (done) { console.info(logTag + "testRdbSyncTest0210 start"); @@ -1658,9 +1698,12 @@ export default function rdbSyncFirstLevelTest(){ /** - * @tc.number SUB_DISTRIBUTEDDATAMGR_SyncRDBTest_2200 + * @tc.number SUB_DistributedData_RelastionStore_CrossDevice_SDK_RemoteQueryJsAPITest_0100 * @tc.name testRdbSyncTest0220 * @tc.desc Server get rdbStoreS2 level, Name different + * @tc.size MediumTest + * @tc.type Function + * @tc.level Level 2 */ it("testRdbSyncTest0220", 0, async function (done) { console.info(logTag + "testRdbSyncTest0220 start"); @@ -1694,9 +1737,12 @@ export default function rdbSyncFirstLevelTest(){ /** - * @tc.number SUB_DISTRIBUTEDDATAMGR_SyncRDBTest_2300 + * @tc.number SUB_DistributedData_RelastionStore_CrossDevice_SDK_RemoteQueryJsAPITest_2700 * @tc.name testRdbSyncTest0230 * @tc.desc Server get rdbStoreS2 level, Name different + * @tc.size MediumTest + * @tc.type Function + * @tc.level Level 2 */ it("testRdbSyncTest0230", 0, async function (done) { console.info(logTag + "testRdbSyncTest0230 start"); @@ -1728,9 +1774,12 @@ export default function rdbSyncFirstLevelTest(){ }) /** - * @tc.number SUB_DISTRIBUTEDDATAMGR_SyncRDBTest_2400 + * @tc.number SUB_DistributedData_RelastionStore_CrossDevice_SDK_RemoteQueryJsAPITest_0500 * @tc.name testRdbSyncTest0240 * @tc.desc Server rdbStore Insert first and synchronize, intValue = Max + * @tc.size MediumTest + * @tc.type Function + * @tc.level Level 2 */ it("testRdbSyncTest0240", 0, async function (done) { console.info(logTag + "testRdbSyncTest0240 start"); @@ -1782,9 +1831,12 @@ export default function rdbSyncFirstLevelTest(){ /** - * @tc.number SUB_DISTRIBUTEDDATAMGR_SyncRDBTest_2500 + * @tc.number SUB_DistributedData_RelastionStore_CrossDevice_SDK_RemoteQueryJsAPITest_0600 * @tc.name testRdbSyncTest0250 * @tc.desc Server rdbStore Insert first and synchronize, intValue = Min + * @tc.size MediumTest + * @tc.type Function + * @tc.level Level 2 */ it("testRdbSyncTest0250", 0, async function (done) { console.info(logTag + "testRdbSyncTest0250 start"); @@ -1835,9 +1887,12 @@ export default function rdbSyncFirstLevelTest(){ /** - * @tc.number SUB_DISTRIBUTEDDATAMGR_SyncRDBTest_2600 + * @tc.number SUB_DistributedData_RelastionStore_CrossDevice_SDK_RemoteQueryJsAPITest_0200 * @tc.name testRdbSyncTest0260 * @tc.desc Server rdbStore Insert first and synchronize, intValue = NaN + * @tc.size MediumTest + * @tc.type Function + * @tc.level Level 2 */ it("testRdbSyncTest0260", 0, async function (done) { console.info(logTag + "testRdbSyncTest0260 start"); @@ -1888,9 +1943,12 @@ export default function rdbSyncFirstLevelTest(){ /** - * @tc.number SUB_DISTRIBUTEDDATAMGR_SyncRDBTest_2700 + * @tc.number SUB_DistributedData_RelastionStore_CrossDevice_SDK_RemoteQueryJsAPITest_0400 * @tc.name testRdbSyncTest0270 * @tc.desc Server rdbStore Insert first and synchronize, intValue = POSITIVE_INFINITY + * @tc.size MediumTest + * @tc.type Function + * @tc.level Level 2 */ it("testRdbSyncTest0270", 0, async function (done) { console.info(logTag + "testRdbSyncTest0270 start"); @@ -1941,9 +1999,12 @@ export default function rdbSyncFirstLevelTest(){ /** - * @tc.number SUB_DISTRIBUTEDDATAMGR_SyncRDBTest_2800 + * @tc.number SUB_DistributedData_RelastionStore_CrossDevice_SDK_RemoteQueryJsAPITest_0300 * @tc.name testRdbSyncTest0280 * @tc.desc Server rdbStore Insert first and synchronize, intValue = NEGATIVE_INFINITY + * @tc.size MediumTest + * @tc.type Function + * @tc.level Level 2 */ it("testRdbSyncTest0280", 0, async function (done) { console.info(logTag + "testRdbSyncTest0280 start"); diff --git a/distributeddatamgr/jstest/distributed_rdb_store/server/hap/AppScope/app.json b/distributeddatamgr/jstest/distributed_rdb_store/server/hap/AppScope/app.json new file mode 100644 index 0000000..6b73078 --- /dev/null +++ b/distributeddatamgr/jstest/distributed_rdb_store/server/hap/AppScope/app.json @@ -0,0 +1,21 @@ +{ + "app": { + "bundleName": "com.acts.distributerdbdisjs", + "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": 9, + "targetAPIVersion": 9, + "car": { + "apiCompatibleVersion": 9, + "singleUser": false + } + } +} diff --git a/distributeddatamgr/jstest/distributed_rdb_store/server/hap/AppScope/resources/base/element/string.json b/distributeddatamgr/jstest/distributed_rdb_store/server/hap/AppScope/resources/base/element/string.json new file mode 100644 index 0000000..3cae507 --- /dev/null +++ b/distributeddatamgr/jstest/distributed_rdb_store/server/hap/AppScope/resources/base/element/string.json @@ -0,0 +1,8 @@ +{ + "string":[ + { + "name":"app_name", + "value":"rdbserver" + } + ] +} \ No newline at end of file diff --git a/distributeddatamgr/jstest/distributed_rdb_store/server/hap/AppScope/resources/base/media/app_icon.png b/distributeddatamgr/jstest/distributed_rdb_store/server/hap/AppScope/resources/base/media/app_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..474a55588fd7216113dd42073aadf254d4dba023 GIT binary patch literal 15458 zcmV-oJe|XdP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!~g&e!~vBn4jTXfJNHRMK~#8N)t$?W zZ`*d)f6uD@IOn2&LJ;lP6@!gHh#>Y1!r&0HL_gDqb&`3X(Z=GaQp8SP` z92In5!tr>lHv4nxKS1{J@p1P!+F4$_JksuYcRrnVr_*tFKEi|jF}%m8r`_Y_l6p^% z@+LnCznqL`mDBrry9$FzRWuxkQF=}GpwhbiR|yW zmfjQNx4tFelhpeM=s1qPZ}7VBtuHUqIh+_+IvN7$>(jXIa?55SEAd6rfw_FG^Ciq> zUAOb*d;6XH7UwzzrTnE1QtLJmPK4||=GS#JMbf8dX;2o^T+5qYx7QF%t86tY^M!6V zrngTY z1udv}ju^g5nNRXGgh*Bp3Mrd$sWa|p#az3e^Glh~4OYDwx?a*KW72*IFc`5a72{iM zp*N~%>#A7GyQ5CGc@5sreOI4Vr-jh46-ty$UgtlNS4u^>BKcJpW(i@*S9!$UCqmcd z(U6LQxPK-@LYcI@ROQlUqYfv9)@pP1D z^PGd_#Bn=j?h;(A2YP*^zO{q!-impmO*sshM)pxC{aRnxpLI$OVz(ElViw;?d~N$q$^VbIP>sa0q0)N~6iq!!fI>IcRGDdADCq?$^K61=g>C{IY# z;~=ksR37V9Yzp%@sRJ8ebxt7()agtNj zFX-#JY(~NHNecrS7DT}|J>yQfr$J*Ww>;PMMSj|?ifs>m;mOpS;hB2QJtAw(Aw2S_ zSHe`NtQeUBZN(O=rgRoV{J5F+Ft*YQkw zwtwkXsI}a&=y|SSZxEX3H8VG5pvDb*DypGrx7RHOJ0i^ra2-P!NRFO4D{+Ry>|JXL zGjQaB$9omq%IUE9OgQbqtQMtUx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`@|=dDkKs@MXyRk(q=Sb__5!7i&kaqd|~>q`yW64akf!;YC=W70<8l5tW13-+~|Y; zkOj7m+O z!5pPf&u5hW8I_=fD zD*;20N{)BIOQ{tj;NRl5w-|ch2}M5c{wK!f>CfqKoBq&WEM66PqkaN5`Y)t8TRI`--F?$f7FyF2*vpx(dgmuRWV_Q&1- Y0jIQKqpXab7ytkO07*qoM6N<$f;yQ2zW@LL literal 0 HcmV?d00001 diff --git a/distributeddatamgr/jstest/distributed_rdb_store/server/hap/BUILD.gn b/distributeddatamgr/jstest/distributed_rdb_store/server/hap/BUILD.gn index 132598a..16da37f 100644 --- a/distributeddatamgr/jstest/distributed_rdb_store/server/hap/BUILD.gn +++ b/distributeddatamgr/jstest/distributed_rdb_store/server/hap/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (C) 2023 Huawei Device Co., Ltd. +# 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 @@ -11,22 +11,34 @@ # See the License for the specific language governing permissions and # limitations under the License. -import("../../../../../../tools/build/suite.gni") +import("//test/xts/tools/build/suite.gni") ohos_hap_assist_suite("distributerdbdisjs_server") { - hap_profile = "./src/main/config.json" + hap_profile = "entry/src/main/module.json" + hap_name = "DctsDistributeRdbDisJsServer" + + testonly = true deps = [ ":distributerdbdisjs_assets", ":distributerdbdisjs_resources", ] - certificate_profile = "./signature/openharmony_sx.p7b" - hap_name = "DctsDistributeRdbDisJsServer" + ets2abc = true + certificate_profile = "signature/openharmony_sx.p7b" + subsystem_name = "ability" + part_name = "ability_runtime" } + +ohos_app_scope("distributerdbdisjs_app_profile") { + app_profile = "AppScope/app.json" + sources = [ "AppScope/resources" ] +} + ohos_js_assets("distributerdbdisjs_assets") { - source_dir = "./src/main/js" - hap_profile = "./src/main/config.json" + source_dir = "entry/src/main/ets" } + ohos_resources("distributerdbdisjs_resources") { - sources = [ "./src/main/resources" ] - hap_profile = "./src/main/config.json" + sources = [ "entry/src/main/resources" ] + deps = [ ":distributerdbdisjs_app_profile" ] + hap_profile = "entry/src/main/module.json" } diff --git a/distributeddatamgr/jstest/distributed_rdb_store/server/hap/Test.json b/distributeddatamgr/jstest/distributed_rdb_store/server/hap/Test.json deleted file mode 100644 index 513b9d0..0000000 --- a/distributeddatamgr/jstest/distributed_rdb_store/server/hap/Test.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "description": "Configuration for hjunit demo Tests", - "driver": { - "type": "JSUnitTest", - "test-timeout": "1200000", - "package": "com.ohos.distributerdbdisjs", - "shell-timeout": "60000" - }, - "kits": [ - { - "test-file-name": [ - "DctsDistributeRdbDisJsServer.hap" - ], - "type": "AppInstallKit", - "cleanup-apps": true - } - ] -} diff --git a/distributeddatamgr/jstest/distributed_rdb_store/server/hap/entry/src/main/ets/Application/AbilityStage.ts b/distributeddatamgr/jstest/distributed_rdb_store/server/hap/entry/src/main/ets/Application/AbilityStage.ts new file mode 100644 index 0000000..e7add09 --- /dev/null +++ b/distributeddatamgr/jstest/distributed_rdb_store/server/hap/entry/src/main/ets/Application/AbilityStage.ts @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import AbilityStage from "@ohos.app.ability.AbilityStage" + +export default class MyAbilityStage extends AbilityStage { + onCreate() { + console.log("[Demo] MyAbilityStage onCreate") + globalThis.stageOnCreateRun = 1; + globalThis.stageContext = this.context; + } +} \ No newline at end of file diff --git a/distributeddatamgr/jstest/distributed_rdb_store/server/hap/entry/src/main/ets/MainAbility/MainAbility.ts b/distributeddatamgr/jstest/distributed_rdb_store/server/hap/entry/src/main/ets/MainAbility/MainAbility.ts new file mode 100644 index 0000000..577dbeb --- /dev/null +++ b/distributeddatamgr/jstest/distributed_rdb_store/server/hap/entry/src/main/ets/MainAbility/MainAbility.ts @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import Ability from '@ohos.app.ability.UIAbility' +import AcCtrl from '@ohos.abilityAccessCtrl' +let AcManager = AcCtrl.createAtManager() +export default class MainAbility3 extends Ability { + onCreate(want, launchParam) { + console.log("[Demo] MainAbility onCreate") + globalThis.abilityWant = want; + AcManager.requestPermissionsFromUser(this.context, ['ohos.permission.DISTRIBUTED_DATASYNC'], function (result) { + console.info('Calc[IndexPage] grantPermission,requestPermissionsFromUser') + }) + } + + onDestroy() { + console.log("[Demo] MainAbility onDestroy") + } + + onWindowStageCreate(windowStage) { + // Main window is created, set main page for this ability + console.log("[Demo] MainAbility onWindowStageCreate") + globalThis.abilityContext = this.context; + windowStage.setUIContent(this.context, "MainAbility/pages/MainAbility_pages", null) + } + + onWindowStageDestroy() { + // Main window is destroyed, release UI related resources + console.log("[Demo] MainAbility onWindowStageDestroy") + } + + onForeground() { + // Ability has brought to foreground + console.log("[Demo] MainAbility onForeground") + } + + onBackground() { + // Ability has back to background + console.log("[Demo] MainAbility onBackground") + } +}; diff --git a/distributeddatamgr/jstest/distributed_rdb_store/server/hap/entry/src/main/ets/MainAbility/pages/MainAbility_pages.ets b/distributeddatamgr/jstest/distributed_rdb_store/server/hap/entry/src/main/ets/MainAbility/pages/MainAbility_pages.ets new file mode 100644 index 0000000..18c7b05 --- /dev/null +++ b/distributeddatamgr/jstest/distributed_rdb_store/server/hap/entry/src/main/ets/MainAbility/pages/MainAbility_pages.ets @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import router from '@ohos.router'; +@Entry +@Component +struct Index { + @State message: string = 'MainAbility' + + build() { + Row() { + Column() { + Text(this.message) + .fontSize(50) + .fontWeight(FontWeight.Bold) + } + .width('100%') + } + .height('100%') + } +} \ No newline at end of file diff --git a/distributeddatamgr/jstest/distributed_rdb_store/server/hap/entry/src/main/ets/serviceability/ServiceAbility.ts b/distributeddatamgr/jstest/distributed_rdb_store/server/hap/entry/src/main/ets/serviceability/ServiceAbility.ts new file mode 100644 index 0000000..b73e7b1 --- /dev/null +++ b/distributeddatamgr/jstest/distributed_rdb_store/server/hap/entry/src/main/ets/serviceability/ServiceAbility.ts @@ -0,0 +1,137 @@ +/* + * Copyright (c) 2024 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 UIAbility from '@ohos.app.ability.UIAbility'; +import rpc from '@ohos.rpc'; +import commonEvent from '@ohos.commonEvent'; +import data_rdb from '@ohos.data.relationalStore'; +// import TestApi from '../../../../../../../../../../../testtools/disjsTest/server/testApi.js'; + +const CREATE_TABLE_TEST = "CREATE TABLE IF NOT EXISTS test (" + "id INTEGER PRIMARY KEY AUTOINCREMENT, " + "name TEXT NOT NULL, " + "age INTEGER, " + "salary REAL, " + "blobType BLOB)"; + +var rdbStore = undefined; +const STORE_CONFIG = { + name: "RemoteRdb.db", + securityLevel: data_rdb.SecurityLevel.S1 +}; +class StubTest extends rpc.RemoteObject { + constructor(descriptor) { + super(descriptor); + } + onRemoteRequest(code, data, reply, option) { + console.info("onRemoteRequest: " + code) + let tmp1 = data.readInt() + let tmp2 = data.readInt() + let tmp3 = tmp1 + tmp2; + let result = reply.writeInt(tmp3) + console.info("The server's writeInt result is " + result); + commonEvent.publish("RDBService_RemoteObject", { + parameters:{ + "msg":"receiveMessage = " + data.readInt() + } + }, (err, data) => { + console.info("RDBService_ConnectAbility onCreate"); + }); + return true + } +} +export default class ServiceAbility extends UIAbility { + onCreate(want) { + // Called to return a FormBindingData object. + console.info("RdbStageServer ServiceAbility onCreate") + if(want.parameters != undefined){ + if(want.parameters.startReason == "terminateSelf"){ + setTimeout(()=>{ + this.context.terminateSelf() + }, 2000) + } + } + this.createRDBStore(); + } + + onConnect(want) { + // Called when the form provider is notified that a temporary form is successfully + // converted to a normal form. + console.info("RdbStageServer ServiceAbility onConnect") + let CommonEventPublishData = { + parameters: { + "life": "onConnect" + } + } + commonEvent.publish("RDBService_ConnectAbility", CommonEventPublishData, (err) => { + console.info("RDBService_ConnectAbility onCreate"); + }); + return new StubTest("test"); + } + + onDisconnect(want) { + // Called to notify the form provider to update a specified form. + console.info("RdbStageServer ServiceAbility onDisconnect") + + } + + onRequest(want, startId){ + console.info("RdbStageServer ServiceAbility onRequest") + globalThis.extensionContext = this.context + globalThis.startAbilityReault = true + } + + onDestroy() { + // Called to notify the form provider that a specified form has been destroyed. + console.info("RdbStageServer ServiceAbility onCronDestroyeate") + + } + + async createRDBStore(){ + console.log("first context " + this.context); + let promise = data_rdb.getRdbStore(this.context, STORE_CONFIG); + promise.then(async (back) => { + rdbStore = back; + console.log("Get RdbStore successfully rdbStore " + rdbStore); + }).catch((err) => { + console.log("Get RdbStore failed, err: " + err); + }) + await promise; + await rdbStore.executeSql(CREATE_TABLE_TEST, null); + this.setDistributedTables(); + } + setDistributedTables(){ + console.info("setDistributedTables before"); + let back = rdbStore.setDistributedTables(["test"]); + back.then(() => { + console.info("SetDistributedTables successfully."); + this.insertData(); + }).catch((err) => { + console.info("SetDistributedTables failed, err: " + err.code); + }) + } + + async insertData(){ + const valueBucket = { + "id": 1, + "name": "Lisa", + "age": 18, + "salary": 100.5, + "blobType": new Uint8Array([1, 2, 3, 4, 5]) + } + console.log("Insert insertData start."); + let promise = rdbStore.insert("test", valueBucket); + promise.then((rowId) => { + console.log("Insert is successful, rowId = " + rowId); + }).catch((err) => { + console.log("Insert is failed err: "+err.code+" "+err.message); + }) + await promise; + } +}; \ No newline at end of file diff --git a/distributeddatamgr/jstest/distributed_rdb_store/server/hap/entry/src/main/module.json b/distributeddatamgr/jstest/distributed_rdb_store/server/hap/entry/src/main/module.json new file mode 100644 index 0000000..6a09e86 --- /dev/null +++ b/distributeddatamgr/jstest/distributed_rdb_store/server/hap/entry/src/main/module.json @@ -0,0 +1,63 @@ +{ + "module": { + "name": "phone", + "type": "entry", + "srcEntrance": "./ets/Application/AbilityStage.ts", + "description": "$string:phone_entry_dsc", + "mainElement": "MainAbility", + "deviceTypes": [ + "default", + "tablet" + ], + "deliveryWithInstall": true, + "installationFree": false, + "uiSyntax": "ets", + "pages": "$profile:main_pages", + "abilities": [ + { + "continuable":true, + "name": "com.acts.distributerdbdisjs", + "srcEntrance": "./ets/MainAbility/MainAbility.ts", + "description": "$string:phone_entry_main", + "icon": "$media:icon", + "label": "$string:entry_label", + "visible": true, + "orientation": "portrait", + "skills": [ + { + "actions": [ + "action.system.home" + ], + "entities": [ + "entity.system.home" + ] + } + ] + } + ], + "extensionAbilities": [ + { + "name": "com.acts.distributerdbdisjs.ServiceAbility", + "srcEntrance": "./ets/serviceability/ServiceAbility.ts", + "label": "$string:MainAbility_label", + "description": "$string:MainAbility_desc", + "type": "service", + "visible": true + } + ], + "requestPermissions": [ + { + "name":"ohos.permission.GET_BUNDLE_INFO" + }, + { + "name": "ohos.permission.DISTRIBUTED_DATASYNC" + }, + { + "name": "ohos.permission.GET_DISTRIBUTED_DEVICE_INFO" + }, + { + "name": "ohos.permission.ACCESS_SERVICE_DM" + } + ] + } +} \ No newline at end of file diff --git a/distributeddatamgr/jstest/distributed_rdb_store/server/hap/entry/src/main/resources/base/element/string.json b/distributeddatamgr/jstest/distributed_rdb_store/server/hap/entry/src/main/resources/base/element/string.json new file mode 100644 index 0000000..d3be599 --- /dev/null +++ b/distributeddatamgr/jstest/distributed_rdb_store/server/hap/entry/src/main/resources/base/element/string.json @@ -0,0 +1,92 @@ +{ + "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": "ActsLifecycleMultihapTest" + }, + { + "name": "form_description", + "value": "my form" + }, + { + "name": "description_application", + "value": "demo for test" + }, + { + "name": "entry_desc", + "value": "description" + }, + { + "name": "MainAbility_desc", + "value": "description" + }, + { + "name": "MainAbility_label", + "value": "label" + }, + { + "name": "MainAbility1_desc", + "value": "description" + }, + { + "name": "MainAbility1_label", + "value": "label" + }, + { + "name": "MainAbility2_desc", + "value": "description" + }, + { + "name": "MainAbility2_label", + "value": "label" + }, + { + "name": "MainAbility3_desc", + "value": "description" + }, + { + "name": "MainAbility3_label", + "value": "label" + }, + { + "name": "MainAbility4_desc", + "value": "description" + }, + { + "name": "MainAbility4_label", + "value": "label" + }, + { + "name": "MainAbility5_desc", + "value": "description" + }, + { + "name": "MainAbility5_label", + "value": "label" + }, + { + "name": "MainAbility6_desc", + "value": "description" + }, + { + "name": "MainAbility6_label", + "value": "label" + }, + { + "name": "MainAbility7_desc", + "value": "description" + }, + { + "name": "MainAbility7_label", + "value": "label" + } + ] +} diff --git a/distributeddatamgr/jstest/distributed_rdb_store/server/hap/entry/src/main/resources/base/media/icon.png b/distributeddatamgr/jstest/distributed_rdb_store/server/hap/entry/src/main/resources/base/media/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..474a55588fd7216113dd42073aadf254d4dba023 GIT binary patch literal 15458 zcmV-oJe|XdP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!~g&e!~vBn4jTXfJNHRMK~#8N)t$?W zZ`*d)f6uD@IOn2&LJ;lP6@!gHh#>Y1!r&0HL_gDqb&`3X(Z=GaQp8SP` z92In5!tr>lHv4nxKS1{J@p1P!+F4$_JksuYcRrnVr_*tFKEi|jF}%m8r`_Y_l6p^% z@+LnCznqL`mDBrry9$FzRWuxkQF=}GpwhbiR|yW zmfjQNx4tFelhpeM=s1qPZ}7VBtuHUqIh+_+IvN7$>(jXIa?55SEAd6rfw_FG^Ciq> zUAOb*d;6XH7UwzzrTnE1QtLJmPK4||=GS#JMbf8dX;2o^T+5qYx7QF%t86tY^M!6V zrngTY z1udv}ju^g5nNRXGgh*Bp3Mrd$sWa|p#az3e^Glh~4OYDwx?a*KW72*IFc`5a72{iM zp*N~%>#A7GyQ5CGc@5sreOI4Vr-jh46-ty$UgtlNS4u^>BKcJpW(i@*S9!$UCqmcd z(U6LQxPK-@LYcI@ROQlUqYfv9)@pP1D z^PGd_#Bn=j?h;(A2YP*^zO{q!-impmO*sshM)pxC{aRnxpLI$OVz(ElViw;?d~N$q$^VbIP>sa0q0)N~6iq!!fI>IcRGDdADCq?$^K61=g>C{IY# z;~=ksR37V9Yzp%@sRJ8ebxt7()agtNj zFX-#JY(~NHNecrS7DT}|J>yQfr$J*Ww>;PMMSj|?ifs>m;mOpS;hB2QJtAw(Aw2S_ zSHe`NtQeUBZN(O=rgRoV{J5F+Ft*YQkw zwtwkXsI}a&=y|SSZxEX3H8VG5pvDb*DypGrx7RHOJ0i^ra2-P!NRFO4D{+Ry>|JXL zGjQaB$9omq%IUE9OgQbqtQMtUxwo448OTeE6JE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MXyRk(q=Sb__5!7i&kaqd|~>q`yW64akf!;YC=W70<8l5tW13-+~|Y; zkOj7m+O z!5pPf&u5hW8I_=fD zD*;20N{)BIOQ{tj;NRl5w-|ch2}M5c{wK!f>CfqKoBq&WEM66PqkaN5`Y)t8TRI`--F?$f7FyF2*vpx(dgmuRWV_Q&1- Y0jIQKqpXab7ytkO07*qoM6N<$f;yQ2zW@LL literal 0 HcmV?d00001 diff --git a/distributeddatamgr/jstest/distributed_rdb_store/server/hap/entry/src/main/resources/base/profile/main_pages.json b/distributeddatamgr/jstest/distributed_rdb_store/server/hap/entry/src/main/resources/base/profile/main_pages.json new file mode 100644 index 0000000..8169124 --- /dev/null +++ b/distributeddatamgr/jstest/distributed_rdb_store/server/hap/entry/src/main/resources/base/profile/main_pages.json @@ -0,0 +1,5 @@ +{ + "src": [ + "MainAbility/pages/MainAbility_pages" + ] +} \ No newline at end of file diff --git a/distributeddatamgr/jstest/distributed_rdb_store/server/hap/signature/openharmony_sx.p7b b/distributeddatamgr/jstest/distributed_rdb_store/server/hap/signature/openharmony_sx.p7b index b58d5f6505edfe1696d400b4b1c0c42fdc71a447..c65cbc844edaa8a017a0b5f57b4db8006040a0d9 100644 GIT binary patch delta 294 zcmaDO(=Y2_(8Slx#;Mij(e|B}k)3Hl6JHHbsDg=+(U8}Gn~gJ}&4V$OnT3hbpovWv zp^$Mw6Pp}M6PwgVhddVM#N?968(C!8^74yv6LTitV)35r!>Tk{l~sH4G**epF|20d z-mb0z@lKA;-tIyEp?)s$L7{$ro__9|*Rs~KvjSbgXfs)#cXhpqfuWJ5fu)h9p;459 zKHNS|7DFW#h0onZKNrf2DF4cFUtlz8NuD~-zGaCSlRxuD%4O+E%|B+q#l`{j$vImV zW+oOl0~aO*i>!r`3?ljSU8EmB75{9$okceNoUz&TkK2sg)N9)n+dcpQ)45=8 delta 286 zcmeB|eIw&w(8QO)#;Mij(e|B}k)3Hl6JI1yD3pnj(U8}Gn~gJ}&4V$OnT3hbpoxtW zp^$Mw6YDRQCf08o9r9S1^E2`%Z)B0>DXuIoNzIK|_GD#NxyjR5 zRVHV!%51*GTEoueXwbxH3$(x>d-6o?)X95!9qWw^ObjgzEDbFT%%TkR;nr}n7%H(S zgt4Av;=X1g|NM!OUe(TNO72rH@R+_9H~(tf9Ovk=xWs^qjRWX`bG9tZOf2pOu1tyy zE1OgHY^@MvHt0^j`t?{q;<|+y)zT(gm$v%x?R3vge9WZaSayLsRb9)zscFKeIN>#1 WOsjs+bSlyNXtvBXbOwvfiDdxx#9TK3 diff --git a/distributeddatamgr/jstest/distributed_rdb_store/server/hap/src/main/config.json b/distributeddatamgr/jstest/distributed_rdb_store/server/hap/src/main/config.json deleted file mode 100644 index 906a42d..0000000 --- a/distributeddatamgr/jstest/distributed_rdb_store/server/hap/src/main/config.json +++ /dev/null @@ -1,96 +0,0 @@ -{ - "app": { - "bundleName": "com.ohos.distributerdbdisjs", - "vendor": "rpc", - "version": { - "code": 1000000, - "name": "1.0.0" - }, - "apiVersion": { - "compatible": 7, - "target": 7 - } - }, - "deviceConfig": {}, - "module": { - "reqPermissions": [ - { - "name": "ohos.permission.DISTRIBUTED_DATASYNC" - }, - { - "name": "ohos.permission.GET_DISTRIBUTED_DEVICE_INFO" - }, - { - "name": "ohos.permission.GET_BUNDLE_INFO" - }, - { - "name":"ohos.permission.KEEP_BACKGROUND_RUNNING" - }, - { - "name": "ohos.permission.ACCESS_SERVICE_DM" - } - ], - "package": "com.ohos.distributerdbdisjs", - "name": ".MyApplication", - "mainAbility": ".MainAbility", - "deviceType": [ - "tablet", - "default", - "phone" - ], - "distro": { - "deliveryWithInstall": true, - "moduleName": "entry", - "moduleType": "entry", - "installationFree": false - }, - "abilities": [ - { - "skills": [ - { - "entities": [ - "entity.system.home" - ], - "actions": [ - "action.system.home" - ] - } - ], - "orientation": "unspecified", - "visible": true, - "srcPath": "MainAbility", - "name": ".MainAbility", - "srcLanguage": "js", - "icon": "$media:icon", - "description": "$string:mainability_description", - "formsEnabled": false, - "label": "$string:entry_MainAbility", - "type": "page", - "launchType": "standard" - }, - { - "srcPath": "ServiceAbility", - "name": ".ServiceAbility", - "icon": "$media:icon", - "srcLanguage": "js", - "description": "$string:serviceability_description", - "type": "service", - "visible": true, - "formsEnabled": false, - "backgroundModes": ["dataTransfer", "location","multiDeviceConnection"] - } - ], - "js": [ - { - "pages": [ - "pages/index/index" - ], - "name": ".MainAbility", - "window": { - "designWidth": 720, - "autoDesignWidth": false - } - } - ] - } -} diff --git a/distributeddatamgr/jstest/distributed_rdb_store/server/hap/src/main/js/MainAbility/app.js b/distributeddatamgr/jstest/distributed_rdb_store/server/hap/src/main/js/MainAbility/app.js deleted file mode 100644 index f3c3b49..0000000 --- a/distributeddatamgr/jstest/distributed_rdb_store/server/hap/src/main/js/MainAbility/app.js +++ /dev/null @@ -1,44 +0,0 @@ -/* -* Copyright (c) 2023 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 { Core } from 'deccjsunit/index'; -import featureAbility from '@ohos.ability.featureAbility'; - - - - -export default { - onCreate() { - - console.info('AceApplication onCreate'); - const core = Core.getInstance(); - core.init(); - const configService = core.getDefaultService('config'); - configService.setConfig(this); - - console.info('Calc[IndexPage] grantPermission') - let context = featureAbility.getContext() - context.requestPermissionsFromUser(['ohos.permission.DISTRIBUTED_DATASYNC'], 666, function (result) { - console.info('Calc[IndexPage] grantPermission,requestPermissionsFromUser,' + result.requestCode); - setTimeout(() => { - require('./test/List.test'); - core.execute(); - }, 1000) - }) - - }, - onDestroy() { - console.info('AceApplication onDestroy'); - } -}; diff --git a/distributeddatamgr/jstest/distributed_rdb_store/server/hap/src/main/js/MainAbility/i18n/en-US.json b/distributeddatamgr/jstest/distributed_rdb_store/server/hap/src/main/js/MainAbility/i18n/en-US.json deleted file mode 100644 index 55561b8..0000000 --- a/distributeddatamgr/jstest/distributed_rdb_store/server/hap/src/main/js/MainAbility/i18n/en-US.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "strings": { - "hello": "Hello", - "world": "World" - }, - "Files": { - } -} \ No newline at end of file diff --git a/distributeddatamgr/jstest/distributed_rdb_store/server/hap/src/main/js/MainAbility/i18n/zh-CN.json b/distributeddatamgr/jstest/distributed_rdb_store/server/hap/src/main/js/MainAbility/i18n/zh-CN.json deleted file mode 100644 index cce1af0..0000000 --- a/distributeddatamgr/jstest/distributed_rdb_store/server/hap/src/main/js/MainAbility/i18n/zh-CN.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "strings": { - "hello": "您好", - "world": "世界" - }, - "Files": { - } -} \ No newline at end of file diff --git a/distributeddatamgr/jstest/distributed_rdb_store/server/hap/src/main/js/MainAbility/pages/index/index.css b/distributeddatamgr/jstest/distributed_rdb_store/server/hap/src/main/js/MainAbility/pages/index/index.css deleted file mode 100644 index 9eb18e5..0000000 --- a/distributeddatamgr/jstest/distributed_rdb_store/server/hap/src/main/js/MainAbility/pages/index/index.css +++ /dev/null @@ -1,23 +0,0 @@ -/* -* Copyright (c) 2023 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 { - flex-direction: column; - justify-content: center; - align-items: center; -} - -.title { - font-size: 100px; -} diff --git a/distributeddatamgr/jstest/distributed_rdb_store/server/hap/src/main/js/MainAbility/pages/index/index.hml b/distributeddatamgr/jstest/distributed_rdb_store/server/hap/src/main/js/MainAbility/pages/index/index.hml deleted file mode 100644 index 1c26cf7..0000000 --- a/distributeddatamgr/jstest/distributed_rdb_store/server/hap/src/main/js/MainAbility/pages/index/index.hml +++ /dev/null @@ -1,5 +0,0 @@ -
- - {{ $t('strings.hello') }} {{title}} - -
diff --git a/distributeddatamgr/jstest/distributed_rdb_store/server/hap/src/main/js/MainAbility/pages/index/index.js b/distributeddatamgr/jstest/distributed_rdb_store/server/hap/src/main/js/MainAbility/pages/index/index.js deleted file mode 100644 index e60f12e..0000000 --- a/distributeddatamgr/jstest/distributed_rdb_store/server/hap/src/main/js/MainAbility/pages/index/index.js +++ /dev/null @@ -1,112 +0,0 @@ -/* -* Copyright (c) 2023 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 data_rdb from '@ohos.data.relationalStore'; -import deviceManager from '@ohos.distributedDeviceManager'; -import TestApi from '../../../../../../../../../../../testtools/disjsTest/server/testApi.js'; - -let context = featureAbility.getContext(); - -const CREATE_TABLE_TEST = "CREATE TABLE IF NOT EXISTS test (" + "id INTEGER PRIMARY KEY AUTOINCREMENT, " + "name TEXT NOT NULL, " + "age INTEGER, " + "salary REAL, " + "blobType BLOB)"; - -var rdbStore = undefined; -const STORE_CONFIG = { - name: "RemoteRdb.db", - securityLevel: data_rdb.SecurityLevel.S1 -}; - -export default { - - data: { - title: "" - }, - - onInit() { - this.createRDBStore(); - }, - onShow(){ - - }, - - getIndexContext(){ - console.log("rdbStore " + rdbStore); - return rdbStore; - - }, - - async initDeviceMonitor() { - console.log("create device manager before"); - try { - await deviceManager.createDeviceManager('com.ohos.distributerdbdisjs', (err, manager) => { - if (err) { - console.log("create device manager failed, err=" + err); - return; - } - let dmInstance = manager; - console.log("create device manager success dmInstance: "+ JSON.stringify(dmInstance)); - dmInstance.on("deviceStateChange", (data) => { - console.log("deviceStateChange: " + JSON.stringify(data)); - }); - }); - } catch (error) { - console.log("createDeviceManager error : " + error.message); - } - - }, - async createRDBStore(){ - console.log("first context " + context); - let promise = data_rdb.getRdbStore(context, STORE_CONFIG); - promise.then(async (back) => { - rdbStore = back; - console.log("Get RdbStore successfully rdbStore " + rdbStore); - }).catch((err) => { - console.log("Get RdbStore failed, err: " + err); - }) - await promise; - await rdbStore.executeSql(CREATE_TABLE_TEST, null); - let testApi = new TestApi(); - this.setDistributedTables(); - }, - - setDistributedTables(){ - console.info("setDistributedTables before"); - let back = rdbStore.setDistributedTables(["test"]); - back.then(() => { - console.info("SetDistributedTables successfully."); - this.insertData(); - }).catch((err) => { - console.info("SetDistributedTables failed, err: " + err.code); - }) - }, - - async insertData(){ - const valueBucket = { - "id": 1, - "name": "Lisa", - "age": 18, - "salary": 100.5, - "blobType": new Uint8Array([1, 2, 3, 4, 5]) - } - console.log("Insert insertData start."); - let promise = rdbStore.insert("test", valueBucket); - promise.then((rowId) => { - console.log("Insert is successful, rowId = " + rowId); - }).catch((err) => { - console.log("Insert is failed err: "+err.code+" "+err.message); - }) - await promise; - } -} diff --git a/distributeddatamgr/jstest/distributed_rdb_store/server/hap/src/main/js/MainAbility/test/List.test.js b/distributeddatamgr/jstest/distributed_rdb_store/server/hap/src/main/js/MainAbility/test/List.test.js deleted file mode 100644 index 80605a0..0000000 --- a/distributeddatamgr/jstest/distributed_rdb_store/server/hap/src/main/js/MainAbility/test/List.test.js +++ /dev/null @@ -1,15 +0,0 @@ -/* -* Copyright (c) 2023 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. -*/ -//require('./ObjectStoreJsunit.test.js') diff --git a/distributeddatamgr/jstest/distributed_rdb_store/server/hap/src/main/js/ServiceAbility/service.js b/distributeddatamgr/jstest/distributed_rdb_store/server/hap/src/main/js/ServiceAbility/service.js deleted file mode 100644 index ec48bf8..0000000 --- a/distributeddatamgr/jstest/distributed_rdb_store/server/hap/src/main/js/ServiceAbility/service.js +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright (C) 2023 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 Stub from '../../../../../../../../../testtools/disjsTest/server/service.js' -import backgroundTaskManager from '@ohos.backgroundTaskManager'; -import wantAgent from '@ohos.wantAgent'; -import featureAbility from '@ohos.ability.featureAbility'; - - -function startContinuousTask() { - let wantAgentInfo = { - wants: [ - { - bundleName: "com.ohos.distributerdbdisjs", - abilityName: "com.ohos.distributerdbdisjs.ServiceAbility" - } - ], - operationType: wantAgent.OperationType.START_SERVICE, - requestCode: 0, - wantAgentFlags: [wantAgent.WantAgentFlags.UPDATE_PRESENT_FLAG] - }; - - wantAgent.getWantAgent(wantAgentInfo).then((wantAgentObj) => { - try{ - backgroundTaskManager.startBackgroundRunning(featureAbility.getContext(), - backgroundTaskManager.BackgroundMode.MULTI_DEVICE_CONNECTION, wantAgentObj).then(() => { - console.info("Operation startBackgroundRunning succeeded"); - }).catch((err) => { - console.error("Operation startBackgroundRunning failed Cause: " + err); - }); - }catch(error){ - console.error(`Operation startBackgroundRunning failed. code is ${error.code} message is ${error.message}`); - } - }); -} - -function stopContinuousTask() { - try{ - backgroundTaskManager.stopBackgroundRunning(featureAbility.getContext()).then(() => { - console.info("Operation stopBackgroundRunning succeeded"); - }).catch((err) => { - console.error("Operation stopBackgroundRunning failed Cause: " + err); - }); - }catch(error){ - console.error(`Operation stopBackgroundRunning failed. code is ${error.code} message is ${error.message}`); - } -} -export default { - onStart() { - console.log('RDBServer: onStart') - startContinuousTask(); - console.info('RDBServer: startContinuousTask'); - }, - onStop() { - console.log('RDBServer: onStop') - stopContinuousTask(); - console.info('RDBServer: stopContinuousTask'); - }, - onCommand(want, startId) { - console.log('RDBServer: onCommand, want: ' + JSON.stringify(want) + ', startId: ' + startId) - }, - onConnect(want) { - console.log('RDBServer: service onConnect called.') - return new Stub("disjsAbility") - }, - onDisconnect(want) { - console.log('RDBServer: service onDisConnect called.') - }, - onReconnect(want) { - console.log('RDBServer: service onReConnect called.') - } -} diff --git a/distributeddatamgr/jstest/distributed_rdb_store/server/hap/src/main/resources/base/element/string.json b/distributeddatamgr/jstest/distributed_rdb_store/server/hap/src/main/resources/base/element/string.json deleted file mode 100644 index b26c8b5..0000000 --- a/distributeddatamgr/jstest/distributed_rdb_store/server/hap/src/main/resources/base/element/string.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "string": [ - { - "name": "entry_MainAbility", - "value": "distributerdbdisjs" - }, - { - "name": "mainability_description", - "value": "JS_Empty Ability" - }, - { - "name": "serviceability_description", - "value": "hap sample empty service" - } - ] -} diff --git a/distributeddatamgr/jstest/distributed_rdb_store/server/hap/src/main/resources/base/media/icon.png b/distributeddatamgr/jstest/distributed_rdb_store/server/hap/src/main/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6790 zcmX|G1ymHk)?T_}Vd;>R?p|tHQo6fg38|$UVM!6B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 zfyJbSjPb+j;J52U)<|cIcntQBI2T#>2;tOxu{%D?kML476AErF(qN9hPva5Nkc@BF zC-tLF@3ZFb%Kpj)M<{)x*l|*Ia@ECeXo2E4h2f!aV=cHAhi_E_mfUth(sM4^hJq7B zQsGWqdZUm9S%F`$nQ*_#NcuD`&)Ek%_s{&^78{9Hm ztri&rYLOxgFdG>O@+XHy z9#;|&vBCPXH5Mon^I`jSuR$&~ZWtyB67ujzFSj!51>#C}C17~TffQ{c-!QFQkTQ%! zIR^b1`zHx|*1GU?tbBx23weFLz5H?y_Q%N&t$}k?w+``2A=aotj0;2v$~AL z{scF-cL{wsdrmPvf#a9OHyYLcwQD4Kcm)`LLwMh4WT~p29f7M!iafJSU`IV}QY5Wa z(n44-9oA}?J{a+ah*@31WTs#&J#o1`H98#6IQf;Wv0N_!);f&9g7o-k(lW5rWnDUR zQBFIRG+X=6NnsI@mxnwm;tf5;_Uxg?jZ8m-m0}&6+DA!qam(p$mN5R})yA_7m$q@| zFEd|dpS595rxQr-n#GjI5i-AhnUE>Cr;jpCqSrD~EwK_DqI^7%3#p5)%T_od!t3SOmH9MyXeeGO2(UQL;ax|x?Ncixmeo1=$ z{-);Au{*tfzOG?KQ~K|ak8-HQ?`Pekhe2WM(8s{xv-p>Zmu_6{G!-oE$7$mY`MOJorI=+mMx?H;`pr!;fVYz?5~yXBACruWB`Ph zZM}90_<^OBxIhyZ9BW$`>6JvO;%VFpqVr8|7t3~AmxYak6?`Pp#c;**_SYmi`&z23 z`p6_~ePvH)C6x-G9$hgL=eVALq`-AiamN>!3~Lxw&{H(b{B(7xSRm6<3<{%{yXiH# zos5Rv1L+8fUKJLo%P>4I&$}y{ let self = this; - let dmInstance = deviceManager.createDeviceManager('com.ohos.distributerdbdisjs'); + let dmInstance = deviceManager.createDeviceManager('com.acts.distributerdbdisjs'); self.getDeviceList(dmInstance); console.info(logTag + "got deviceManager: " + dmInstance); let deviceId = deviceList[0].networkId; console.info(logTag + "deviceid : " + deviceId); console.info(logTag + "online deviceList id: " + JSON.stringify(deviceList)); let want = { - "bundleName": "com.ohos.distributerdbdisjs", - "abilityName": "com.ohos.distributerdbdisjs.ServiceAbility", + "bundleName": "com.acts.distributerdbdisjs", + "abilityName": "com.acts.distributerdbdisjs.ServiceAbility", "deviceId": deviceId, "flags": 256 }