diff --git a/distributeddatamgr/Pasteboardjsapitest/signature/openharmony_sx.p7b b/distributeddatamgr/Pasteboardjsapitest/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..51ed63f3c01ec94c0c343b3adac4cb15efdcc7c2 100644 Binary files a/distributeddatamgr/Pasteboardjsapitest/signature/openharmony_sx.p7b and b/distributeddatamgr/Pasteboardjsapitest/signature/openharmony_sx.p7b differ diff --git a/distributeddatamgr/dataObjectjstest/hap/src/main/config.json b/distributeddatamgr/dataObjectjstest/hap/src/main/config.json index 5cd042f20b639798f9a1208195924f0e3b02cd23..7aaccad9a5bcbd289058366d5b107ed6a0774ce0 100644 --- a/distributeddatamgr/dataObjectjstest/hap/src/main/config.json +++ b/distributeddatamgr/dataObjectjstest/hap/src/main/config.json @@ -17,7 +17,8 @@ "name": ".entry", "mainAbility": ".MainAbility", "deviceType": [ - "default", + "default", + "tablet", "phone" ], "distro": { diff --git a/distributeddatamgr/dataSharejstest/hap/signature/openharmony_sx.p7b b/distributeddatamgr/dataSharejstest/hap/signature/openharmony_sx.p7b index 9be1e98fa4c0c28ca997ed660112fa16b194f0f5..1631c54db59ca1e146c75ed9a515e93e7a6e5ea1 100644 Binary files a/distributeddatamgr/dataSharejstest/hap/signature/openharmony_sx.p7b and b/distributeddatamgr/dataSharejstest/hap/signature/openharmony_sx.p7b differ diff --git a/distributeddatamgr/dataSharejstest/hap/src/main/config.json b/distributeddatamgr/dataSharejstest/hap/src/main/config.json index 8a86c779bce40e9ca730a50975139bac6264d35e..af3908bab1bb01f0c265b5f1a8ae7e103dc63045 100644 --- a/distributeddatamgr/dataSharejstest/hap/src/main/config.json +++ b/distributeddatamgr/dataSharejstest/hap/src/main/config.json @@ -16,8 +16,8 @@ "package": "ohos.acts.dataSharejstest", "name": ".entry", "deviceType": [ - "tablet", - "default", + "default", + "tablet", "phone" ], "distro": { diff --git a/distributeddatamgr/distributedKVStoretest/distributedKVStorejstest/hap/signature/openharmony_sx.p7b b/distributeddatamgr/distributedKVStoretest/distributedKVStorejstest/hap/signature/openharmony_sx.p7b index 9be1e98fa4c0c28ca997ed660112fa16b194f0f5..521f6ed25cdb26dc252b416e7aa33d4ec2e4ddf5 100644 Binary files a/distributeddatamgr/distributedKVStoretest/distributedKVStorejstest/hap/signature/openharmony_sx.p7b and b/distributeddatamgr/distributedKVStoretest/distributedKVStorejstest/hap/signature/openharmony_sx.p7b differ diff --git a/distributeddatamgr/distributedKVStoretest/distributedKVStorejstest/hap/src/main/config.json b/distributeddatamgr/distributedKVStoretest/distributedKVStorejstest/hap/src/main/config.json index 4eb191549f534c9a2de1f7641f9b57f3f80e2595..60b07868870fa621f1df7cdbc6a7c02e7ebbdd5a 100644 --- a/distributeddatamgr/distributedKVStoretest/distributedKVStorejstest/hap/src/main/config.json +++ b/distributeddatamgr/distributedKVStoretest/distributedKVStorejstest/hap/src/main/config.json @@ -18,8 +18,9 @@ "mainAbility": ".MainAbility", "srcPath":"", "deviceType": [ - "default", - "phone" + "default", + "tablet", + "phone" ], "distro": { "deliveryWithInstall": true, @@ -92,4 +93,4 @@ "srcPath": "TestRunner" } } -} \ No newline at end of file +} diff --git a/distributeddatamgr/kvStoretest/kvStorejstest/hap/signature/openharmony_sx.p7b b/distributeddatamgr/kvStoretest/kvStorejstest/hap/signature/openharmony_sx.p7b index 9be1e98fa4c0c28ca997ed660112fa16b194f0f5..cb7f395cfb818db99d5360d9095de4435bde85b8 100644 Binary files a/distributeddatamgr/kvStoretest/kvStorejstest/hap/signature/openharmony_sx.p7b and b/distributeddatamgr/kvStoretest/kvStorejstest/hap/signature/openharmony_sx.p7b differ diff --git a/distributeddatamgr/preferencesjstest/hap/signature/openharmony_sx.p7b b/distributeddatamgr/preferencesjstest/hap/signature/openharmony_sx.p7b index 9be1e98fa4c0c28ca997ed660112fa16b194f0f5..97d82281cc2d8abcad06106255b783c7366f8b96 100644 Binary files a/distributeddatamgr/preferencesjstest/hap/signature/openharmony_sx.p7b and b/distributeddatamgr/preferencesjstest/hap/signature/openharmony_sx.p7b differ diff --git a/distributeddatamgr/preferencesjstest/hap/src/main/config.json b/distributeddatamgr/preferencesjstest/hap/src/main/config.json index 652a38366284e6055dc865f5370565511153d8bb..d02d088425251d888613703c310c12978f2aed0c 100644 --- a/distributeddatamgr/preferencesjstest/hap/src/main/config.json +++ b/distributeddatamgr/preferencesjstest/hap/src/main/config.json @@ -16,9 +16,9 @@ "package": "ohos.acts.preferencesjstest", "name": ".entry", "deviceType": [ - "tablet", - "default", - "phone" + "tablet", + "default", + "phone" ], "distro": { "deliveryWithInstall": true, diff --git a/distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/signature/openharmony_sx.p7b b/distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/signature/openharmony_sx.p7b index 9be1e98fa4c0c28ca997ed660112fa16b194f0f5..4bb6d7690796dc26857e209e50b8ec06c50ae029 100644 Binary files a/distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/signature/openharmony_sx.p7b and b/distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/signature/openharmony_sx.p7b differ diff --git a/distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/config.json b/distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/config.json index ee87a58bbb208f509c3819d6fd58b90951775ed0..81053ee05cb265d4b0510e18f1538de0a1c5d3c4 100644 --- a/distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/config.json +++ b/distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/config.json @@ -16,8 +16,9 @@ "package": "ohos.acts.relationalStorejstest", "name": ".entry", "deviceType": [ - "tablet", - "default" + "tablet", + "default", + "phone" ], "distro": { "deliveryWithInstall": true, @@ -91,4 +92,4 @@ "mainAbility": ".MainAbility", "srcPath": "" } -} +} \ No newline at end of file diff --git a/distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/List.test.js b/distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/List.test.js index d40679d59119e54902ba3dedc614baf3e0b67f9b..84bcde52bf21fa6139556987a94939085268059f 100644 --- a/distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/List.test.js +++ b/distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/List.test.js @@ -12,35 +12,35 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -// import rdbStoreBackupRestoreCallbackTest from './RdbstoreBackupRestoreCallbackJsunit.test.js' -// import rdbStoreBackupRestoreWithFAContextTest from './RdbstoreBackupRestoreWithFAContextJsunit.test.js' -// import rdbStoreDeleteTest from './RdbstoreDeleteJsunit.test.js' +import rdbStoreBackupRestoreCallbackTest from './RdbstoreBackupRestoreCallbackJsunit.test.js' +import rdbStoreBackupRestoreWithFAContextTest from './RdbstoreBackupRestoreWithFAContextJsunit.test.js' +import rdbStoreDeleteTest from './RdbstoreDeleteJsunit.test.js' import rdbStoreDistributedTest from './RdbStoreDistributedJsunit.test.js' -// import rdbstoreInsertTest from './RdbstoreInsertJsunit.test.js' -// import rdbStorePredicatesJoinTest from './RdbstorePredicatesJoinJsunit.test.js' -// import rdbPredicatesTest from './RdbstorePredicatesJsunit.test.js' -// import rdbStoreTest from './RdbstoreRdbstoreJsunit.test.js' +import rdbstoreInsertTest from './RdbstoreInsertJsunit.test.js' +import rdbStorePredicatesJoinTest from './RdbstorePredicatesJoinJsunit.test.js' +import rdbPredicatesTest from './RdbstorePredicatesJsunit.test.js' +import rdbStoreTest from './RdbstoreRdbstoreJsunit.test.js' import rdbResultSetTest from './RdbStoreResultSetJsunit.test.js' -// import rdbstoreStoreExcuteSqlTest from './RdbstoreStoreExcuteSqlJsunit.test.js' -// import rdbstoreTransactionTest from './RdbstoreTransactionJsunit.test.js' -// import rdbStoreUpdateTest from './RdbstoreUpdateJsunit.test.js' -// import rdbstoreQueryTest from './RdbstoreQuery.test.js' -// import rdbStoreEncryptionTest from './RdbstoreEncryptionJsunit.test.js' -// import rdbStorePredicatesComplexFiledTest from './RdbstorePredicatesComplexFiledJsunit.test.js' +import rdbstoreStoreExcuteSqlTest from './RdbstoreStoreExcuteSqlJsunit.test.js' +import rdbstoreTransactionTest from './RdbstoreTransactionJsunit.test.js' +import rdbStoreUpdateTest from './RdbstoreUpdateJsunit.test.js' +import rdbstoreQueryTest from './RdbstoreQuery.test.js' +import rdbStoreEncryptionTest from './RdbstoreEncryptionJsunit.test.js' +import rdbStorePredicatesComplexFiledTest from './RdbstorePredicatesComplexFiledJsunit.test.js' export default function testsuite() { - // rdbStoreBackupRestoreCallbackTest() - // rdbStoreBackupRestoreWithFAContextTest() - // rdbStoreDeleteTest() + rdbStoreBackupRestoreCallbackTest() + rdbStoreBackupRestoreWithFAContextTest() + rdbStoreDeleteTest() rdbStoreDistributedTest() - // rdbstoreInsertTest() - // rdbStorePredicatesJoinTest() - // rdbPredicatesTest() - // rdbStoreTest() + rdbstoreInsertTest() + rdbStorePredicatesJoinTest() + rdbPredicatesTest() + rdbStoreTest() rdbResultSetTest() - // rdbstoreStoreExcuteSqlTest() - // rdbstoreTransactionTest() - // rdbStoreUpdateTest() - // rdbstoreQueryTest() - // rdbStoreEncryptionTest() - // rdbStorePredicatesComplexFiledTest() + rdbstoreStoreExcuteSqlTest() + rdbstoreTransactionTest() + rdbStoreUpdateTest() + rdbstoreQueryTest() + rdbStoreEncryptionTest() + rdbStorePredicatesComplexFiledTest() } diff --git a/distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RdbStoreDistributedJsunit.test.js b/distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RdbStoreDistributedJsunit.test.js index 11c8580d0f251ccf6f7ee9a652d65f3929792125..13b05bad9b3fa290052e6d265175be39844ae6e7 100644 --- a/distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RdbStoreDistributedJsunit.test.js +++ b/distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RdbStoreDistributedJsunit.test.js @@ -13,19 +13,63 @@ * limitations under the License. */ -import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from '@ohos/hypium' +import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from '@ohos/hypium'; import dataRdb from '@ohos.data.rdb'; import abilityFeatureAbility from '@ohos.ability.featureAbility'; let context = abilityFeatureAbility.getContext(); +var sqlStatement = "CREATE TABLE IF NOT EXISTS employee (" + +"id INTEGER PRIMARY KEY AUTOINCREMENT," + +"name TEXT NOT NULL," +"age INTEGER)" +sqlStatement = "CREATE TABLE IF NOT EXISTS product (" + +"id INTEGER PRIMARY KEY AUTOINCREMENT," + +"name TEXT NOT NULL," +"price REAL," + +"vendor INTEGER," +"describe TEXT)" const TAG = "[RDB_JSKITS_TEST_Distributed]" const STORE_NAME = "distributed_rdb.db" var rdbStore = undefined; +const config = { + "name": STORE_NAME, +} + +async function executeSql1() { + let sqlStatement = "CREATE TABLE IF NOT EXISTS employee (" + + "id INTEGER PRIMARY KEY AUTOINCREMENT," + + "name TEXT NOT NULL," + + "age INTEGER)" +try { + await rdbStore.executeSql(sqlStatement, null) + console.info(TAG + "create table employee success") +} catch (err) { + console.info(TAG + "create table employee failed") + expect(null).assertFail() +} +} + +async function executeSql2() { + let sqlStatement = "CREATE TABLE IF NOT EXISTS product (" + + "id INTEGER PRIMARY KEY AUTOINCREMENT," + + "name TEXT NOT NULL," + + "price REAL," + + "vendor INTEGER," + + "describe TEXT)" +try { + await rdbStore.executeSql(sqlStatement, null) + console.info(TAG + "create table product success") +} catch (err) { + console.info(TAG + "create table product failed") + expect(null).assertFail() +} +} export default function rdbStoreDistributedTest() { describe('rdbStoreDistributedTest', function () { beforeAll(async function () { console.info(TAG + 'beforeAll') + rdbStore = await dataRdb.getRdbStore(config, 1); + console.info(TAG + "create rdb store success") + await executeSql1() + await executeSql2() }) beforeEach(async function () { @@ -43,53 +87,6 @@ describe('rdbStoreDistributedTest', function () { console.info(TAG + "*************Unit Test Begin*************"); - /** - * @tc.name rdb open test - * @tc.number SUB_DDM_AppDataFWK_JSRDB_Distributed_001 - * @tc.desc rdb open test - */ - it('testRdbStoreDistributed0001', 0, async function (done) { - console.info(TAG + "************* testRdbStoreDistributed001 start *************"); - const config = { - "name": STORE_NAME, - } - try { - rdbStore = await dataRdb.getRdbStore(config, 1); - console.info(TAG + "create rdb store success") - expect(rdbStore).assertEqual(rdbStore) - let sqlStatement = "CREATE TABLE IF NOT EXISTS employee (" + - "id INTEGER PRIMARY KEY AUTOINCREMENT," + - "name TEXT NOT NULL," + - "age INTEGER)" - try { - await rdbStore.executeSql(sqlStatement, null) - console.info(TAG + "create table employee success") - } catch (err) { - console.info(TAG + "create table employee failed") - expect(null).assertFail() - } - - sqlStatement = "CREATE TABLE IF NOT EXISTS product (" + - "id INTEGER PRIMARY KEY AUTOINCREMENT," + - "name TEXT NOT NULL," + - "price REAL," + - "vendor INTEGER," + - "describe TEXT)" - try { - await rdbStore.executeSql(sqlStatement, null) - console.info(TAG + "create table product success") - } catch (err) { - console.info(TAG + "create table product failed") - expect(null).assertFail() - } - } catch (err) { - console.info(TAG + "create rdb store failed") - expect(null).assertFail() - } - done() - console.info(TAG + "************* testRdbStoreDistributed001 end *************"); - }) - /** * @tc.name set_distributed_table_none_table * @tc.number SUB_DDM_AppDataFWK_JSRDB_Distributed_002 @@ -163,7 +160,7 @@ describe('rdbStoreDistributedTest', function () { console.info(TAG + "insert one record success " + rowId) expect(1).assertEqual(rowId) } catch (err) { - console.info(TAG + "insert one record failed"); + console.info(TAG + "insert one record failed" + err); expect(null).assertFail(); } done() @@ -189,7 +186,7 @@ describe('rdbStoreDistributedTest', function () { console.info(TAG + "update one record success " + rowId) expect(1).assertEqual(rowId) } catch (err) { - console.info(TAG + "update one record failed"); + console.info(TAG + "update one record failed" + err); expect(null).assertFail(); } } catch (err) { diff --git a/distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RdbstoreEncryptionJsunit.test.js b/distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RdbstoreEncryptionJsunit.test.js index 77434e4d9cc60c595094399477bda1b279cc6705..57338fe921149490f71a76a2b300e01ca8768bc6 100644 --- a/distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RdbstoreEncryptionJsunit.test.js +++ b/distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RdbstoreEncryptionJsunit.test.js @@ -94,7 +94,7 @@ describe('rdbEncryptTest', function () { console.info(TAG + 'afterAll') }) - console.log(TAG + "*************Unit Test Begin*************") + console.info(TAG + "*************Unit Test Begin*************") /** * @tc.name RDB encrypted test @@ -102,23 +102,15 @@ describe('rdbEncryptTest', function () { * @tc.desc RDB create encrypt db test */ it('RdbEncryptTest_0010', 0, async function (done) { - await console.log(TAG + "************* RdbEncryptTest_0010 start *************") + console.info(TAG + "************* RdbEncryptTest_0010 start *************") context = ability_featureAbility.getContext() - let storePromise = data_rdb.getRdbStore(context, STORE_CONFIG_ENCRYPT, 1); - storePromise.then(async (store) => { - try { - await console.log(TAG + "getRdbStore done: " + store); - } catch (err) { - expect(null).assertFail(); - } + data_rdb.getRdbStore(context, STORE_CONFIG_ENCRYPT, 1).then((store) => { + done() + expect(store != null).assertTrue(); }).catch((err) => { expect(null).assertFail(); }) - await storePromise - storePromise = null - - done() - await console.log(TAG + "************* RdbEncryptTest_0010 end *************") + console.info(TAG + "************* RdbEncryptTest_0010 end *************") }) /** @@ -127,23 +119,17 @@ describe('rdbEncryptTest', function () { * @tc.desc RDB create unencrypted db test */ it('RdbEncryptTest_0020', 0, async function (done) { - await console.log(TAG + "************* RdbEncryptTest_0020 start *************") + console.info(TAG + "************* RdbEncryptTest_0020 start *************") context = ability_featureAbility.getContext() let storePromise = data_rdb.getRdbStore(context, STORE_CONFIG_UNENCRYPT, 1); - storePromise.then(async (store) => { - try { - await console.log(TAG + "getRdbStore done: " + store); - } catch (err) { - expect(null).assertFail(); - } + storePromise.then((store) => { + expect(store != null).assertTrue(); + done() }).catch((err) => { expect(null).assertFail(); }) - await storePromise - storePromise = null - - done() - await console.log(TAG + "************* RdbEncryptTest_0020 end *************") + + console.info(TAG + "************* RdbEncryptTest_0020 end *************") }) @@ -153,14 +139,14 @@ describe('rdbEncryptTest', function () { * @tc.desc RDB Encrypt function test */ it('RdbEncryptTest_0030', 0, async function (done) { - await console.log(TAG + "************* RdbEncryptTest_0030 start *************") + console.info(TAG + "************* RdbEncryptTest_0030 start *************") context = ability_featureAbility.getContext() rdbStore = await CreatRdbStore(context, STORE_CONFIG_ENCRYPT) let predicates = new data_rdb.RdbPredicates("test") predicates.equalTo("name", "zhangsan") let resultSet = await rdbStore.query(predicates) try { - console.log(TAG + "After restore resultSet query done") + console.info(TAG + "After restore resultSet query done") expect(true).assertEqual(resultSet.goToFirstRow()) const id = resultSet.getLong(resultSet.getColumnIndex("id")) const name = resultSet.getString(resultSet.getColumnIndex("name")) @@ -174,7 +160,7 @@ describe('rdbEncryptTest', function () { resultSet = null rdbStore = null done() - await console.log(TAG + "************* RdbEncryptTest_0030 end *************") + console.info(TAG + "************* RdbEncryptTest_0030 end *************") }) /** @@ -183,7 +169,7 @@ describe('rdbEncryptTest', function () { * @tc.desc RDB Encrypt function test */ it('RdbEncryptTest_0040', 0, async function (done) { - await console.log(TAG + "************* RdbEncryptTest_0040 start *************") + console.info(TAG + "************* RdbEncryptTest_0040 start *************") context = ability_featureAbility.getContext() rdbStore = await CreatRdbStore(context, STORE_CONFIG_ENCRYPT) rdbStore = null @@ -191,9 +177,9 @@ describe('rdbEncryptTest', function () { expect(rdbStore).assertNull done() - await console.log(TAG + "************* RdbEncryptTest_0040 end *************") + console.info(TAG + "************* RdbEncryptTest_0040 end *************") }) - console.log(TAG + "*************Unit Test End*************") + console.info(TAG + "*************Unit Test End*************") } ) diff --git a/distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RdbstoreQuery.test.js b/distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RdbstoreQuery.test.js index e009cee5901bc3db85edec5d663d19ec852e0506..e2e2461fa8847637b413145057251f7b6ec26cb8 100644 --- a/distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RdbstoreQuery.test.js +++ b/distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RdbstoreQuery.test.js @@ -12,23 +12,22 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from '@ohos/hypium' +import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from '@ohos/hypium'; import dataRdb from '@ohos.data.rdb'; -import factory from '@ohos.data.distributedData' -import abilityFeatureAbility from '@ohos.ability.featureAbility' +import factory from '@ohos.data.distributedData'; +import abilityFeatureAbility from '@ohos.ability.featureAbility'; const TAG = "[RDB_JSKITS_TEST]" 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)" -const DATABASE_DIR = "/data/storage/el2/database/entry/rdb/" const STORE_CONFIG = { name: "Query.db", } const TEST_BUNDLE_NAME="ohos.acts.relationalStorejstest" -var kvManager = null; -var kvStore = null; -var localDeviceId = null; +var kvManager = null +var kvStore = null +var localDeviceId = null var rdbStore let context = abilityFeatureAbility.getContext() diff --git a/distributeddatamgr/relationalStoretest/relationalStoreStagetest/entry/src/main/ets/Application/AbilityStage.ts b/distributeddatamgr/relationalStoretest/relationalStoreStagetest/entry/src/main/ets/Application/AbilityStage.ts index 582953b77acfea6ba949ddb2e4c378fd08d042a8..02ecba3c3e620207210edec3de91aa7191f6e8c7 100644 --- a/distributeddatamgr/relationalStoretest/relationalStoreStagetest/entry/src/main/ets/Application/AbilityStage.ts +++ b/distributeddatamgr/relationalStoretest/relationalStoreStagetest/entry/src/main/ets/Application/AbilityStage.ts @@ -13,7 +13,7 @@ * limitations under the License. */ -import AbilityStage from "@ohos.app.ability.AbilityStage" +import AbilityStage from "@ohos.application.AbilityStage" export default class MyAbilityStage extends AbilityStage { onCreate() { diff --git a/distributeddatamgr/relationalStoretest/relationalStoreStagetest/entry/src/main/ets/MainAbility/MainAbility.ts b/distributeddatamgr/relationalStoretest/relationalStoreStagetest/entry/src/main/ets/MainAbility/MainAbility.ts index fb807f8be22a061626b54fe23ce5f17031b4cd78..cc6fdc5ef88488efe7bb9715a0c385c4bc32ffd0 100644 --- a/distributeddatamgr/relationalStoretest/relationalStoreStagetest/entry/src/main/ets/MainAbility/MainAbility.ts +++ b/distributeddatamgr/relationalStoretest/relationalStoreStagetest/entry/src/main/ets/MainAbility/MainAbility.ts @@ -13,7 +13,7 @@ * limitations under the License. */ -import Ability from '@ohos.app.ability.UIAbility' +import Ability from '@ohos.application.Ability' import dataShare from '@ohos.data.dataShare' import rpc from "@ohos.rpc"; @@ -111,7 +111,7 @@ export default class MainAbility extends Ability { console.log("[ttt] [DataShareTest] <> MainAbility onWindowStageCreate") globalThis.abilityContext = this.context; let context = this.context; - dseConnectionId = context.connectServiceExtensionAbility(dseWant, dseConnect); + dseConnectionId = context.connectAbility(dseWant, dseConnect); globalThis.connectDataShareExtAbility = (async () => { console.log("[ttt] [DataShareTest] <> connectDataShareExtAbility begin"); await dataShare.createDataShareHelper(globalThis.abilityContext, dseUri, (err,data)=>{ @@ -122,7 +122,7 @@ export default class MainAbility extends Ability { console.info("[ttt] [DataShareTest] <> ----- 3 -----, err = " + err); console.info("[ttt] [DataShareTest] <> ----- 4 -----, JSON.stringify(err) = " + JSON.stringify(err)); }); - dseConnectionId = await context.connectServiceExtensionAbility(dseWant, dseConnect); + dseConnectionId = await context.connectAbility(dseWant, dseConnect); }) windowStage.setUIContent(this.context, "MainAbility/pages/index", null) } diff --git a/distributeddatamgr/relationalStoretest/relationalStoreStagetest/entry/src/main/ets/TestAbility/TestAbility.ts b/distributeddatamgr/relationalStoretest/relationalStoreStagetest/entry/src/main/ets/TestAbility/TestAbility.ts index 8028a70f8af44690b95a08bd177bca6b09f24687..89a84730505783ba229175ab4b55d37f91a16266 100644 --- a/distributeddatamgr/relationalStoretest/relationalStoreStagetest/entry/src/main/ets/TestAbility/TestAbility.ts +++ b/distributeddatamgr/relationalStoretest/relationalStoreStagetest/entry/src/main/ets/TestAbility/TestAbility.ts @@ -12,7 +12,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import Ability from '@ohos.app.ability.UIAbility' +import Ability from '@ohos.application.Ability' export default class TestAbility extends Ability { onCreate(want, launchParam) { diff --git a/distributeddatamgr/relationalStoretest/relationalStoreStagetest/entry/src/main/module.json b/distributeddatamgr/relationalStoretest/relationalStoreStagetest/entry/src/main/module.json index 9da23290334d7b4eea829923843f7bf570fb1bab..eed3943f3deffc8b1315a848b2c8ed66e0f8474a 100644 --- a/distributeddatamgr/relationalStoretest/relationalStoreStagetest/entry/src/main/module.json +++ b/distributeddatamgr/relationalStoretest/relationalStoreStagetest/entry/src/main/module.json @@ -8,8 +8,9 @@ "description": "$string:entry_desc", "mainElement": "MainAbility", "deviceTypes": [ - "default", - "tablet" + "default", + "tablet", + "phone" ], "deliveryWithInstall": true, "installationFree": false, diff --git a/distributeddatamgr/relationalStoretest/relationalStoreStagetest/signature/openharmony_sx.p7b b/distributeddatamgr/relationalStoretest/relationalStoreStagetest/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..2b4a5fbe0179c26ae219b7f8a6c372c23d777880 100644 Binary files a/distributeddatamgr/relationalStoretest/relationalStoreStagetest/signature/openharmony_sx.p7b and b/distributeddatamgr/relationalStoretest/relationalStoreStagetest/signature/openharmony_sx.p7b differ