From 56e1195a791acebe2de4fe19e67f652087a8c183 Mon Sep 17 00:00:00 2001 From: yangbo Date: Mon, 10 Jul 2023 18:10:09 +0800 Subject: [PATCH] mediaLibrary xts fixbug Signed-off-by: yangbo --- multimedia/medialibrary/common.js | 49 +++++++----------- .../medialibrary/mediaLibrary_album/Test.json | 33 +++++++++--- .../main/ets/test/albumTestCallBack.test.ets | 1 - .../entry/src/main/module.json | 16 ------ .../signature/openharmony_sx.p7b | Bin 3736 -> 3474 bytes .../medialibrary/mediaLibrary_base/Test.json | 29 +++++++++-- .../src/main/ets/MainAbility/MainAbility.ts | 35 ------------- .../ets/MainAbility/pages/index/index.ets | 2 - .../ets/test/mediaLibraryTestPromise.test.ets | 1 - .../mediaLibraryTestPromiseOnOff.test.ets | 2 - .../entry/src/main/module.json | 16 ------ .../signature/openharmony_sx.p7b | Bin 3736 -> 3474 bytes .../mediaLibrary_favorite/Test.json | 29 +++++++++-- .../entry/src/main/module.json | 16 ------ .../signature/openharmony_sx.p7b | Bin 3736 -> 3474 bytes .../medialibrary/mediaLibrary_file/Test.json | 29 +++++++++-- .../entry/src/main/module.json | 16 ------ .../signature/openharmony_sx.p7b | Bin 3736 -> 3474 bytes .../mediaLibrary_fileAsset/Test.json | 29 +++++++++-- .../entry/src/main/module.json | 16 ------ .../signature/openharmony_sx.p7b | Bin 3736 -> 3474 bytes .../mediaLibrary_fileKey/Test.json | 29 +++++++++-- .../entry/src/main/module.json | 16 ------ .../signature/openharmony_sx.p7b | Bin 3736 -> 3474 bytes .../mediaLibrary_fileResult/Test.json | 29 +++++++++-- .../entry/src/main/module.json | 16 ------ .../signature/openharmony_sx.p7b | Bin 3736 -> 3474 bytes .../mediaLibrary_getExifNoLocation/Test.json | 29 +++++++++-- .../main/ets/test/getExifNoLocation.test.ets | 45 ++++++++-------- .../entry/src/main/module.json | 16 ------ .../signature/openharmony_sx.p7b | Bin 3674 -> 3474 bytes .../mediaLibrary_getExiflocation/Test.json | 29 +++++++++-- .../main/ets/test/getExifLocation.test.ets | 46 ++++++++-------- .../entry/src/main/module.json | 16 ------ .../signature/openharmony_sx.p7b | Bin 3705 -> 3474 bytes .../mediaLibrary_getThumbnail/Test.json | 29 +++++++++-- .../ets/test/getThumbnailPromise.test.ets | 1 - .../entry/src/main/module.json | 16 ------ .../signature/openharmony_sx.p7b | Bin 3736 -> 3474 bytes .../mediaLibrary_mediafetchoptions/Test.json | 29 +++++++++-- .../entry/src/main/module.json | 16 ------ .../signature/openharmony_sx.p7b | Bin 3736 -> 3474 bytes .../medialibrary/mediaLibrary_trash/Test.json | 29 +++++++++-- .../src/main/ets/test/trashCallback.test.ets | 2 +- .../entry/src/main/module.json | 16 ------ .../signature/openharmony_sx.p7b | Bin 3736 -> 3474 bytes 46 files changed, 363 insertions(+), 365 deletions(-) diff --git a/multimedia/medialibrary/common.js b/multimedia/medialibrary/common.js index 42f526717..0bb01d665 100644 --- a/multimedia/medialibrary/common.js +++ b/multimedia/medialibrary/common.js @@ -14,7 +14,6 @@ */ import mediaLibrary from "@ohos.multimedia.mediaLibrary"; import abilityAccessCtrl from "@ohos.abilityAccessCtrl"; -import bundleManager from '@ohos.bundle.bundleManager'; import uitest from "@ohos.UiTest"; const presetsCount = { ActsMediaLibraryAlbumTest: { albumsCount: 15, assetsCount: 27 }, @@ -239,38 +238,28 @@ const getPermission = async function (name, context) { name = "ohos.acts.multimedia.mediaLibrary"; } - try { - console.info('getPermission start', name); - let permissionState = new Map(); - const permissions = [ - 'ohos.permission.MEDIA_LOCATION', - 'ohos.permission.READ_MEDIA', - 'ohos.permission.WRITE_MEDIA', - ]; + console.info('getPermission start: ' + name); + let permissions = ["ohos.permission.MEDIA_LOCATION", "ohos.permission.READ_MEDIA", "ohos.permission.WRITE_MEDIA"]; + let atManager = abilityAccessCtrl.createAtManager(); + atManager.requestPermissionsFromUser(context, permissions, (err, result) => { + if (err) { + console.info('getPermission failed: ' + JSON.stringify(err)); + } else { + console.info('getPermission suc: ' + JSON.stringify(result)); + } + }); - const atManager = abilityAccessCtrl.createAtManager(); - const appFlags = bundleManager.ApplicationFlag.GET_APPLICATION_INFO_DEFAULT; - const userId = 100; - const appInfo = await bundleManager.getApplicationInfo(name, appFlags, userId); - const tokenID = appInfo.accessTokenId; - for (const permission of permissions) { - console.info('getPermission permission: ' + permission); - try { - await atManager.grantUserGrantedPermission(tokenID, permission, 1); - } catch (error) { - console.info(`getPermission ${permission} failed`); - } - permissionState.set(permission, await atManager.verifyAccessToken(tokenID, permission)); + let driver = uitest.Driver.create(); + await sleep(500); + + for (let i = 0; i < 10; i++) { + await sleep(500); + let button = await driver.findComponent(uitest.ON.text('允许')); + if (button != undefined) { + await button.click(); } - permissionState.forEach((value, key, map) => { - if (value !== 0) { - console.info(`getPermission failed; permission: ${key}, state: ${value}`); - } - }); - console.info('getPermission end'); - } catch (error) { - console.info(`getPermission failed, error: ${error}`); } + console.info("getPermission end"); }; const MODIFY_ERROR_CODE_01 = "-1000"; diff --git a/multimedia/medialibrary/mediaLibrary_album/Test.json b/multimedia/medialibrary/mediaLibrary_album/Test.json index 007c9a0b1..a6c88e4eb 100644 --- a/multimedia/medialibrary/mediaLibrary_album/Test.json +++ b/multimedia/medialibrary/mediaLibrary_album/Test.json @@ -13,13 +13,23 @@ "type": "ShellKit", "pre-push": [], "run-command": [ - "rm -rf /storage/media/100/local/files/*", - "rm -rf /storage/media/100/local/files/.*", - "scanner", + "rm -rf /storage/media/100/local/files/Audios/*", + "rm -rf /storage/media/100/local/files/Audios/.*", + "rm -rf /storage/media/100/local/files/Camera/*", + "rm -rf /storage/media/100/local/files/Camera/.*", + "rm -rf /storage/media/100/local/files/Documents/*", + "rm -rf /storage/media/100/local/files/Documents/.*", + "rm -rf /storage/media/100/local/files/Download/*", + "rm -rf /storage/media/100/local/files/Download/.*", + "rm -rf /storage/media/100/local/files/Pictures/*", + "rm -rf /storage/media/100/local/files/Pictures/.*", + "rm -rf /storage/media/100/local/files/Videos/*", + "rm -rf /storage/media/100/local/files/Videos/.*", "sleep 5", "rm -rf /data/app/el2/100/database/com.ohos.medialibrary.medialibrarydata/*", "kill -9 `pidof com.ohos.medialibrary.medialibrarydata`", - "sleep 3", + "scanner", + "sleep 5", "mkdir /storage/media/100/local/temp", "param set persist.ace.testmode.enabled 1", "power-shell wakeup", @@ -56,11 +66,20 @@ "teardown-command": [ "power-shell setmode 600", "rm -rf /storage/media/100/local/temp", - "rm -rf /storage/media/100/local/files/*", - "rm -rf /storage/media/100/local/files/.*", + "rm -rf /storage/media/100/local/files/Audios/*", + "rm -rf /storage/media/100/local/files/Audios/.*", + "rm -rf /storage/media/100/local/files/Camera/*", + "rm -rf /storage/media/100/local/files/Camera/.*", + "rm -rf /storage/media/100/local/files/Documents/*", + "rm -rf /storage/media/100/local/files/Documents/.*", + "rm -rf /storage/media/100/local/files/Download/*", + "rm -rf /storage/media/100/local/files/Download/.*", + "rm -rf /storage/media/100/local/files/Pictures/*", + "rm -rf /storage/media/100/local/files/Pictures/.*", + "rm -rf /storage/media/100/local/files/Videos/*", + "rm -rf /storage/media/100/local/files/Videos/.*", "rm -rf /data/app/el2/100/database/com.ohos.medialibrary.medialibrarydata/*", "kill -9 `pidof com.ohos.medialibrary.medialibrarydata`", - "scanner", "sleep 5" ] }, diff --git a/multimedia/medialibrary/mediaLibrary_album/entry/src/main/ets/test/albumTestCallBack.test.ets b/multimedia/medialibrary/mediaLibrary_album/entry/src/main/ets/test/albumTestCallBack.test.ets index 4daafe9f3..7f67a776d 100644 --- a/multimedia/medialibrary/mediaLibrary_album/entry/src/main/ets/test/albumTestCallBack.test.ets +++ b/multimedia/medialibrary/mediaLibrary_album/entry/src/main/ets/test/albumTestCallBack.test.ets @@ -30,7 +30,6 @@ export default function albumTestCallbackTest(abilityContext) { describe("albumTestCallbackTest", function () { const media = mediaLibrary.getMediaLibrary(abilityContext); beforeAll(async function () { - await getPermission(null, abilityContext); console.info("beforeAll case"); }); beforeEach(function () { diff --git a/multimedia/medialibrary/mediaLibrary_album/entry/src/main/module.json b/multimedia/medialibrary/mediaLibrary_album/entry/src/main/module.json index 025062ffe..473ee0c51 100644 --- a/multimedia/medialibrary/mediaLibrary_album/entry/src/main/module.json +++ b/multimedia/medialibrary/mediaLibrary_album/entry/src/main/module.json @@ -36,22 +36,6 @@ } ], "requestPermissions": [ - { - "name": "ohos.permission.GET_BUNDLE_INFO", - "reason": "use ohos.permission.GET_BUNDLE_INFO" - }, - { - "name": "ohos.permission.GET_BUNDLE_INFO_PRIVILEGED", - "reason": "use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED" - }, - { - "name": "ohos.permission.GRANT_SENSITIVE_PERMISSIONS", - "reason": "use ohos.permission.GRANT_SENSITIVE_PERMISSIONS" - }, - { - "name": "ohos.permission.REVOKE_SENSITIVE_PERMISSIONS", - "reason": "use ohos.permission.REVOKE_SENSITIVE_PERMISSIONS" - }, { "name": "ohos.permission.MEDIA_LOCATION", "reason": "use ohos.permission.MEDIA_LOCATION" diff --git a/multimedia/medialibrary/mediaLibrary_album/signature/openharmony_sx.p7b b/multimedia/medialibrary/mediaLibrary_album/signature/openharmony_sx.p7b index 64b33bf079b2ab68a3f26f240d127186546b33d9..f8875c87ff37487a44b1f942342ff1d5a62ad75c 100644 GIT binary patch delta 248 zcmbOsJ4xEXpozDSjZ>@5qwPB{BRkWACf<6WP&E@Hqam*WHydX{n+IbmGYb==K@+PU zLLuXVCRTZtCRXW<4(nOi^74yv6LThiWs%=3&1TKc>SWNwXg4{UcXhq7fw`f9fsv7c zfkl*oK3qR1i=h&W0&m(f9aXKfldBGF{rG9-g8M#?rzXu~vRYlbCQ*5X&x1$d#AN85K^Ms}tJO?<6Dp++V~Mnhf$ZZ^(@HV?*BW)>z!gC;gp zghIvzO>Al`O>9aV9oDn36;~FQq~=ck$|7H{l%J7btXGg)l$%*xoSC1e=k6L3?-c6i z;^P|c>F4Gj9}wgj=IP_=?&_kXgQ+;k(Jv%E*wruCGsH8@H9o*K$k#JC*wf!H7>nv4 z*D!x?R}|&-_|&601&fKkt}dRA@jm{}jv+uhu_y>~b##dbtHL4~9^}ax;tG}CEW&Ed z&gE#(#Api)OoQyn4Xmk?_whK^8yNzjftjhLk#UrPK0HV{Sqzm}6zuroKZgsRYOsI$ z@M+8Jc-fUkS&{2SG7?|x-q`taW1gS^7aIpKvd-DEFf*~Z8@MtlR7_EAnLCMV?dPX= zES8j(8qH>rIuNt?+v@u>S22B4dCkJ4$gpCP`hgQCFIn^TWi7ZXoLlpkVNd2XRk1Mc N|844Cd@Yxs0s!TNu37*9 diff --git a/multimedia/medialibrary/mediaLibrary_base/Test.json b/multimedia/medialibrary/mediaLibrary_base/Test.json index b1ee582a6..3d57ffee8 100644 --- a/multimedia/medialibrary/mediaLibrary_base/Test.json +++ b/multimedia/medialibrary/mediaLibrary_base/Test.json @@ -13,7 +13,19 @@ "type": "ShellKit", "pre-push": [], "run-command": [ - "rm -rf /storage/media/100/local/files/*", + "rm -rf /storage/media/100/local/files/Audios/*", + "rm -rf /storage/media/100/local/files/Audios/.*", + "rm -rf /storage/media/100/local/files/Camera/*", + "rm -rf /storage/media/100/local/files/Camera/.*", + "rm -rf /storage/media/100/local/files/Documents/*", + "rm -rf /storage/media/100/local/files/Documents/.*", + "rm -rf /storage/media/100/local/files/Download/*", + "rm -rf /storage/media/100/local/files/Download/.*", + "rm -rf /storage/media/100/local/files/Pictures/*", + "rm -rf /storage/media/100/local/files/Pictures/.*", + "rm -rf /storage/media/100/local/files/Videos/*", + "rm -rf /storage/media/100/local/files/Videos/.*", + "sleep 5", "rm -rf /data/app/el2/100/database/com.ohos.medialibrary.medialibrarydata/*", "kill -9 `pidof com.ohos.medialibrary.medialibrarydata`", "scanner", @@ -60,11 +72,20 @@ "teardown-command": [ "power-shell setmode 600", "rm -rf /storage/media/100/local/temp", - "rm -rf /storage/media/100/local/files/*", - "rm -rf /storage/media/100/local/files/.*", + "rm -rf /storage/media/100/local/files/Audios/*", + "rm -rf /storage/media/100/local/files/Audios/.*", + "rm -rf /storage/media/100/local/files/Camera/*", + "rm -rf /storage/media/100/local/files/Camera/.*", + "rm -rf /storage/media/100/local/files/Documents/*", + "rm -rf /storage/media/100/local/files/Documents/.*", + "rm -rf /storage/media/100/local/files/Download/*", + "rm -rf /storage/media/100/local/files/Download/.*", + "rm -rf /storage/media/100/local/files/Pictures/*", + "rm -rf /storage/media/100/local/files/Pictures/.*", + "rm -rf /storage/media/100/local/files/Videos/*", + "rm -rf /storage/media/100/local/files/Videos/.*", "rm -rf /data/app/el2/100/database/com.ohos.medialibrary.medialibrarydata/*", "kill -9 `pidof com.ohos.medialibrary.medialibrarydata`", - "scanner", "sleep 5" ] }, diff --git a/multimedia/medialibrary/mediaLibrary_base/entry/src/main/ets/MainAbility/MainAbility.ts b/multimedia/medialibrary/mediaLibrary_base/entry/src/main/ets/MainAbility/MainAbility.ts index 14bc9e002..baa7a87d6 100644 --- a/multimedia/medialibrary/mediaLibrary_base/entry/src/main/ets/MainAbility/MainAbility.ts +++ b/multimedia/medialibrary/mediaLibrary_base/entry/src/main/ets/MainAbility/MainAbility.ts @@ -27,45 +27,10 @@ export default class MainAbility extends Ability { async onWindowStageCreate(windowStage) { // Main window is created, set main page for this ability - - - // var context = this.context - - // let array: Array = ["ohos.permission.MEDIA_LOCATION", "ohos.permission.READ_MEDIA", "ohos.permission.WRITE_MEDIA"]; - // //requestPermissionsFromUser会判断权限的授权状态来决定是否唤起弹窗 - // context.requestPermissionsFromUser(array).then(async function (data) { - // console.log("data type:" + JSON.stringify(data)); - // console.log("data:" + data); - // console.log("data permissions:" + data.permissions); - // console.log("data result:" + data.authResults); - // }, (err) => { - // console.error('Failed to start ability', err.code); - // }); - // console.info("getPermission 1"); - // await new Promise((res) => setTimeout(res, 200)); - - - // let driver = Driver.create(); - // console.info("getPermission 2"); - // console.info(`driver is ${JSON.stringify(driver)}`); - // await new Promise((res) => setTimeout(res, 200)); - - // let button = await driver.findComponent(ON.text("允许")); - - // while (button) { - // console.info(`button is ${JSON.stringify(button)}`); - // await new Promise((res) => setTimeout(res, 200)); - // await button.click(); - // button = await driver.findComponent(ON.text("允许")); - // } - // console.info("getPermission 3"); - console.log("[Demo] MainAbility onWindowStageCreate windowStage=" + windowStage) globalThis.windowStage = windowStage globalThis.abilityContext = this.context windowStage.setUIContent(this.context, "MainAbility/pages/index/index", null) - console.info("getPermission 4"); - } onWindowStageDestroy() { diff --git a/multimedia/medialibrary/mediaLibrary_base/entry/src/main/ets/MainAbility/pages/index/index.ets b/multimedia/medialibrary/mediaLibrary_base/entry/src/main/ets/MainAbility/pages/index/index.ets index c5b5c5c8c..97504e244 100644 --- a/multimedia/medialibrary/mediaLibrary_base/entry/src/main/ets/MainAbility/pages/index/index.ets +++ b/multimedia/medialibrary/mediaLibrary_base/entry/src/main/ets/MainAbility/pages/index/index.ets @@ -24,8 +24,6 @@ struct Index { aboutToAppear(){ console.info("start run testcase!!!!") - console.info("getPermission 5"); - var abilityDelegator: any abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() var abilityDelegatorArguments: any diff --git a/multimedia/medialibrary/mediaLibrary_base/entry/src/main/ets/test/mediaLibraryTestPromise.test.ets b/multimedia/medialibrary/mediaLibrary_base/entry/src/main/ets/test/mediaLibraryTestPromise.test.ets index 2eef384c9..fe333fecd 100644 --- a/multimedia/medialibrary/mediaLibrary_base/entry/src/main/ets/test/mediaLibraryTestPromise.test.ets +++ b/multimedia/medialibrary/mediaLibrary_base/entry/src/main/ets/test/mediaLibraryTestPromise.test.ets @@ -24,7 +24,6 @@ import { FILEKEY, checkAssetsCount, fetchOps, - getPermission, isNum, } from "../../../../../../common"; diff --git a/multimedia/medialibrary/mediaLibrary_base/entry/src/main/ets/test/mediaLibraryTestPromiseOnOff.test.ets b/multimedia/medialibrary/mediaLibrary_base/entry/src/main/ets/test/mediaLibraryTestPromiseOnOff.test.ets index 74559fafc..f441b1064 100644 --- a/multimedia/medialibrary/mediaLibrary_base/entry/src/main/ets/test/mediaLibraryTestPromiseOnOff.test.ets +++ b/multimedia/medialibrary/mediaLibrary_base/entry/src/main/ets/test/mediaLibraryTestPromiseOnOff.test.ets @@ -24,7 +24,6 @@ import { checkAssetsCount, fetchOps, albumFetchOps, - getPermission, checkAlbumsCount, FILEKEY, fileFetchOption, @@ -34,7 +33,6 @@ export default function mediaLibraryTestPromiseOnOffTest(abilityContext) { describe("mediaLibraryTestPromiseOnOffTest", function () { const media = mediaLibrary.getMediaLibrary(abilityContext); beforeAll(async function () { - await getPermission(null, abilityContext); console.info("beforeAll case"); }); beforeEach(function () { diff --git a/multimedia/medialibrary/mediaLibrary_base/entry/src/main/module.json b/multimedia/medialibrary/mediaLibrary_base/entry/src/main/module.json index 025062ffe..473ee0c51 100644 --- a/multimedia/medialibrary/mediaLibrary_base/entry/src/main/module.json +++ b/multimedia/medialibrary/mediaLibrary_base/entry/src/main/module.json @@ -36,22 +36,6 @@ } ], "requestPermissions": [ - { - "name": "ohos.permission.GET_BUNDLE_INFO", - "reason": "use ohos.permission.GET_BUNDLE_INFO" - }, - { - "name": "ohos.permission.GET_BUNDLE_INFO_PRIVILEGED", - "reason": "use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED" - }, - { - "name": "ohos.permission.GRANT_SENSITIVE_PERMISSIONS", - "reason": "use ohos.permission.GRANT_SENSITIVE_PERMISSIONS" - }, - { - "name": "ohos.permission.REVOKE_SENSITIVE_PERMISSIONS", - "reason": "use ohos.permission.REVOKE_SENSITIVE_PERMISSIONS" - }, { "name": "ohos.permission.MEDIA_LOCATION", "reason": "use ohos.permission.MEDIA_LOCATION" diff --git a/multimedia/medialibrary/mediaLibrary_base/signature/openharmony_sx.p7b b/multimedia/medialibrary/mediaLibrary_base/signature/openharmony_sx.p7b index 64b33bf079b2ab68a3f26f240d127186546b33d9..f8875c87ff37487a44b1f942342ff1d5a62ad75c 100644 GIT binary patch delta 248 zcmbOsJ4xEXpozDSjZ>@5qwPB{BRkWACf<6WP&E@Hqam*WHydX{n+IbmGYb==K@+PU zLLuXVCRTZtCRXW<4(nOi^74yv6LThiWs%=3&1TKc>SWNwXg4{UcXhq7fw`f9fsv7c zfkl*oK3qR1i=h&W0&m(f9aXKfldBGF{rG9-g8M#?rzXu~vRYlbCQ*5X&x1$d#AN85K^Ms}tJO?<6Dp++V~Mnhf$ZZ^(@HV?*BW)>z!gC;gp zghIvzO>Al`O>9aV9oDn36;~FQq~=ck$|7H{l%J7btXGg)l$%*xoSC1e=k6L3?-c6i z;^P|c>F4Gj9}wgj=IP_=?&_kXgQ+;k(Jv%E*wruCGsH8@H9o*K$k#JC*wf!H7>nv4 z*D!x?R}|&-_|&601&fKkt}dRA@jm{}jv+uhu_y>~b##dbtHL4~9^}ax;tG}CEW&Ed z&gE#(#Api)OoQyn4Xmk?_whK^8yNzjftjhLk#UrPK0HV{Sqzm}6zuroKZgsRYOsI$ z@M+8Jc-fUkS&{2SG7?|x-q`taW1gS^7aIpKvd-DEFf*~Z8@MtlR7_EAnLCMV?dPX= zES8j(8qH>rIuNt?+v@u>S22B4dCkJ4$gpCP`hgQCFIn^TWi7ZXoLlpkVNd2XRk1Mc N|844Cd@Yxs0s!TNu37*9 diff --git a/multimedia/medialibrary/mediaLibrary_favorite/Test.json b/multimedia/medialibrary/mediaLibrary_favorite/Test.json index ddf8fb96a..3e0dfdbf4 100644 --- a/multimedia/medialibrary/mediaLibrary_favorite/Test.json +++ b/multimedia/medialibrary/mediaLibrary_favorite/Test.json @@ -13,7 +13,19 @@ "type": "ShellKit", "pre-push": [], "run-command": [ - "rm -rf /storage/media/100/local/files/*", + "rm -rf /storage/media/100/local/files/Audios/*", + "rm -rf /storage/media/100/local/files/Audios/.*", + "rm -rf /storage/media/100/local/files/Camera/*", + "rm -rf /storage/media/100/local/files/Camera/.*", + "rm -rf /storage/media/100/local/files/Documents/*", + "rm -rf /storage/media/100/local/files/Documents/.*", + "rm -rf /storage/media/100/local/files/Download/*", + "rm -rf /storage/media/100/local/files/Download/.*", + "rm -rf /storage/media/100/local/files/Pictures/*", + "rm -rf /storage/media/100/local/files/Pictures/.*", + "rm -rf /storage/media/100/local/files/Videos/*", + "rm -rf /storage/media/100/local/files/Videos/.*", + "sleep 5", "rm -rf /data/app/el2/100/database/com.ohos.medialibrary.medialibrarydata/*", "kill -9 `pidof com.ohos.medialibrary.medialibrarydata`", "scanner", @@ -58,11 +70,20 @@ "teardown-command": [ "power-shell setmode 600", "rm -rf /storage/media/100/local/temp", - "rm -rf /storage/media/100/local/files/*", - "rm -rf /storage/media/100/local/files/.*", + "rm -rf /storage/media/100/local/files/Audios/*", + "rm -rf /storage/media/100/local/files/Audios/.*", + "rm -rf /storage/media/100/local/files/Camera/*", + "rm -rf /storage/media/100/local/files/Camera/.*", + "rm -rf /storage/media/100/local/files/Documents/*", + "rm -rf /storage/media/100/local/files/Documents/.*", + "rm -rf /storage/media/100/local/files/Download/*", + "rm -rf /storage/media/100/local/files/Download/.*", + "rm -rf /storage/media/100/local/files/Pictures/*", + "rm -rf /storage/media/100/local/files/Pictures/.*", + "rm -rf /storage/media/100/local/files/Videos/*", + "rm -rf /storage/media/100/local/files/Videos/.*", "rm -rf /data/app/el2/100/database/com.ohos.medialibrary.medialibrarydata/*", "kill -9 `pidof com.ohos.medialibrary.medialibrarydata`", - "scanner", "sleep 5" ] }, diff --git a/multimedia/medialibrary/mediaLibrary_favorite/entry/src/main/module.json b/multimedia/medialibrary/mediaLibrary_favorite/entry/src/main/module.json index 025062ffe..473ee0c51 100644 --- a/multimedia/medialibrary/mediaLibrary_favorite/entry/src/main/module.json +++ b/multimedia/medialibrary/mediaLibrary_favorite/entry/src/main/module.json @@ -36,22 +36,6 @@ } ], "requestPermissions": [ - { - "name": "ohos.permission.GET_BUNDLE_INFO", - "reason": "use ohos.permission.GET_BUNDLE_INFO" - }, - { - "name": "ohos.permission.GET_BUNDLE_INFO_PRIVILEGED", - "reason": "use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED" - }, - { - "name": "ohos.permission.GRANT_SENSITIVE_PERMISSIONS", - "reason": "use ohos.permission.GRANT_SENSITIVE_PERMISSIONS" - }, - { - "name": "ohos.permission.REVOKE_SENSITIVE_PERMISSIONS", - "reason": "use ohos.permission.REVOKE_SENSITIVE_PERMISSIONS" - }, { "name": "ohos.permission.MEDIA_LOCATION", "reason": "use ohos.permission.MEDIA_LOCATION" diff --git a/multimedia/medialibrary/mediaLibrary_favorite/signature/openharmony_sx.p7b b/multimedia/medialibrary/mediaLibrary_favorite/signature/openharmony_sx.p7b index 64b33bf079b2ab68a3f26f240d127186546b33d9..f8875c87ff37487a44b1f942342ff1d5a62ad75c 100644 GIT binary patch delta 248 zcmbOsJ4xEXpozDSjZ>@5qwPB{BRkWACf<6WP&E@Hqam*WHydX{n+IbmGYb==K@+PU zLLuXVCRTZtCRXW<4(nOi^74yv6LThiWs%=3&1TKc>SWNwXg4{UcXhq7fw`f9fsv7c zfkl*oK3qR1i=h&W0&m(f9aXKfldBGF{rG9-g8M#?rzXu~vRYlbCQ*5X&x1$d#AN85K^Ms}tJO?<6Dp++V~Mnhf$ZZ^(@HV?*BW)>z!gC;gp zghIvzO>Al`O>9aV9oDn36;~FQq~=ck$|7H{l%J7btXGg)l$%*xoSC1e=k6L3?-c6i z;^P|c>F4Gj9}wgj=IP_=?&_kXgQ+;k(Jv%E*wruCGsH8@H9o*K$k#JC*wf!H7>nv4 z*D!x?R}|&-_|&601&fKkt}dRA@jm{}jv+uhu_y>~b##dbtHL4~9^}ax;tG}CEW&Ed z&gE#(#Api)OoQyn4Xmk?_whK^8yNzjftjhLk#UrPK0HV{Sqzm}6zuroKZgsRYOsI$ z@M+8Jc-fUkS&{2SG7?|x-q`taW1gS^7aIpKvd-DEFf*~Z8@MtlR7_EAnLCMV?dPX= zES8j(8qH>rIuNt?+v@u>S22B4dCkJ4$gpCP`hgQCFIn^TWi7ZXoLlpkVNd2XRk1Mc N|844Cd@Yxs0s!TNu37*9 diff --git a/multimedia/medialibrary/mediaLibrary_file/Test.json b/multimedia/medialibrary/mediaLibrary_file/Test.json index 85e583c29..1ff7f34c3 100644 --- a/multimedia/medialibrary/mediaLibrary_file/Test.json +++ b/multimedia/medialibrary/mediaLibrary_file/Test.json @@ -13,7 +13,19 @@ "type": "ShellKit", "pre-push": [], "run-command": [ - "rm -rf /storage/media/100/local/files/*", + "rm -rf /storage/media/100/local/files/Audios/*", + "rm -rf /storage/media/100/local/files/Audios/.*", + "rm -rf /storage/media/100/local/files/Camera/*", + "rm -rf /storage/media/100/local/files/Camera/.*", + "rm -rf /storage/media/100/local/files/Documents/*", + "rm -rf /storage/media/100/local/files/Documents/.*", + "rm -rf /storage/media/100/local/files/Download/*", + "rm -rf /storage/media/100/local/files/Download/.*", + "rm -rf /storage/media/100/local/files/Pictures/*", + "rm -rf /storage/media/100/local/files/Pictures/.*", + "rm -rf /storage/media/100/local/files/Videos/*", + "rm -rf /storage/media/100/local/files/Videos/.*", + "sleep 5", "rm -rf /data/app/el2/100/database/com.ohos.medialibrary.medialibrarydata/*", "kill -9 `pidof com.ohos.medialibrary.medialibrarydata`", "scanner", @@ -62,11 +74,20 @@ "teardown-command": [ "power-shell setmode 600", "rm -rf /storage/media/100/local/temp", - "rm -rf /storage/media/100/local/files/*", - "rm -rf /storage/media/100/local/files/.*", + "rm -rf /storage/media/100/local/files/Audios/*", + "rm -rf /storage/media/100/local/files/Audios/.*", + "rm -rf /storage/media/100/local/files/Camera/*", + "rm -rf /storage/media/100/local/files/Camera/.*", + "rm -rf /storage/media/100/local/files/Documents/*", + "rm -rf /storage/media/100/local/files/Documents/.*", + "rm -rf /storage/media/100/local/files/Download/*", + "rm -rf /storage/media/100/local/files/Download/.*", + "rm -rf /storage/media/100/local/files/Pictures/*", + "rm -rf /storage/media/100/local/files/Pictures/.*", + "rm -rf /storage/media/100/local/files/Videos/*", + "rm -rf /storage/media/100/local/files/Videos/.*", "rm -rf /data/app/el2/100/database/com.ohos.medialibrary.medialibrarydata/*", "kill -9 `pidof com.ohos.medialibrary.medialibrarydata`", - "scanner", "sleep 5" ] }, diff --git a/multimedia/medialibrary/mediaLibrary_file/entry/src/main/module.json b/multimedia/medialibrary/mediaLibrary_file/entry/src/main/module.json index 025062ffe..473ee0c51 100644 --- a/multimedia/medialibrary/mediaLibrary_file/entry/src/main/module.json +++ b/multimedia/medialibrary/mediaLibrary_file/entry/src/main/module.json @@ -36,22 +36,6 @@ } ], "requestPermissions": [ - { - "name": "ohos.permission.GET_BUNDLE_INFO", - "reason": "use ohos.permission.GET_BUNDLE_INFO" - }, - { - "name": "ohos.permission.GET_BUNDLE_INFO_PRIVILEGED", - "reason": "use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED" - }, - { - "name": "ohos.permission.GRANT_SENSITIVE_PERMISSIONS", - "reason": "use ohos.permission.GRANT_SENSITIVE_PERMISSIONS" - }, - { - "name": "ohos.permission.REVOKE_SENSITIVE_PERMISSIONS", - "reason": "use ohos.permission.REVOKE_SENSITIVE_PERMISSIONS" - }, { "name": "ohos.permission.MEDIA_LOCATION", "reason": "use ohos.permission.MEDIA_LOCATION" diff --git a/multimedia/medialibrary/mediaLibrary_file/signature/openharmony_sx.p7b b/multimedia/medialibrary/mediaLibrary_file/signature/openharmony_sx.p7b index 64b33bf079b2ab68a3f26f240d127186546b33d9..f8875c87ff37487a44b1f942342ff1d5a62ad75c 100644 GIT binary patch delta 248 zcmbOsJ4xEXpozDSjZ>@5qwPB{BRkWACf<6WP&E@Hqam*WHydX{n+IbmGYb==K@+PU zLLuXVCRTZtCRXW<4(nOi^74yv6LThiWs%=3&1TKc>SWNwXg4{UcXhq7fw`f9fsv7c zfkl*oK3qR1i=h&W0&m(f9aXKfldBGF{rG9-g8M#?rzXu~vRYlbCQ*5X&x1$d#AN85K^Ms}tJO?<6Dp++V~Mnhf$ZZ^(@HV?*BW)>z!gC;gp zghIvzO>Al`O>9aV9oDn36;~FQq~=ck$|7H{l%J7btXGg)l$%*xoSC1e=k6L3?-c6i z;^P|c>F4Gj9}wgj=IP_=?&_kXgQ+;k(Jv%E*wruCGsH8@H9o*K$k#JC*wf!H7>nv4 z*D!x?R}|&-_|&601&fKkt}dRA@jm{}jv+uhu_y>~b##dbtHL4~9^}ax;tG}CEW&Ed z&gE#(#Api)OoQyn4Xmk?_whK^8yNzjftjhLk#UrPK0HV{Sqzm}6zuroKZgsRYOsI$ z@M+8Jc-fUkS&{2SG7?|x-q`taW1gS^7aIpKvd-DEFf*~Z8@MtlR7_EAnLCMV?dPX= zES8j(8qH>rIuNt?+v@u>S22B4dCkJ4$gpCP`hgQCFIn^TWi7ZXoLlpkVNd2XRk1Mc N|844Cd@Yxs0s!TNu37*9 diff --git a/multimedia/medialibrary/mediaLibrary_fileAsset/Test.json b/multimedia/medialibrary/mediaLibrary_fileAsset/Test.json index 499fbd49c..85f980e4e 100644 --- a/multimedia/medialibrary/mediaLibrary_fileAsset/Test.json +++ b/multimedia/medialibrary/mediaLibrary_fileAsset/Test.json @@ -13,7 +13,19 @@ "type": "ShellKit", "pre-push": [], "run-command": [ - "rm -rf /storage/media/100/local/files/*", + "rm -rf /storage/media/100/local/files/Audios/*", + "rm -rf /storage/media/100/local/files/Audios/.*", + "rm -rf /storage/media/100/local/files/Camera/*", + "rm -rf /storage/media/100/local/files/Camera/.*", + "rm -rf /storage/media/100/local/files/Documents/*", + "rm -rf /storage/media/100/local/files/Documents/.*", + "rm -rf /storage/media/100/local/files/Download/*", + "rm -rf /storage/media/100/local/files/Download/.*", + "rm -rf /storage/media/100/local/files/Pictures/*", + "rm -rf /storage/media/100/local/files/Pictures/.*", + "rm -rf /storage/media/100/local/files/Videos/*", + "rm -rf /storage/media/100/local/files/Videos/.*", + "sleep 5", "rm -rf /data/app/el2/100/database/com.ohos.medialibrary.medialibrarydata/*", "kill -9 `pidof com.ohos.medialibrary.medialibrarydata`", "scanner", @@ -62,11 +74,20 @@ "teardown-command": [ "power-shell setmode 600", "rm -rf /storage/media/100/local/temp", - "rm -rf /storage/media/100/local/files/*", - "rm -rf /storage/media/100/local/files/.*", + "rm -rf /storage/media/100/local/files/Audios/*", + "rm -rf /storage/media/100/local/files/Audios/.*", + "rm -rf /storage/media/100/local/files/Camera/*", + "rm -rf /storage/media/100/local/files/Camera/.*", + "rm -rf /storage/media/100/local/files/Documents/*", + "rm -rf /storage/media/100/local/files/Documents/.*", + "rm -rf /storage/media/100/local/files/Download/*", + "rm -rf /storage/media/100/local/files/Download/.*", + "rm -rf /storage/media/100/local/files/Pictures/*", + "rm -rf /storage/media/100/local/files/Pictures/.*", + "rm -rf /storage/media/100/local/files/Videos/*", + "rm -rf /storage/media/100/local/files/Videos/.*", "rm -rf /data/app/el2/100/database/com.ohos.medialibrary.medialibrarydata/*", "kill -9 `pidof com.ohos.medialibrary.medialibrarydata`", - "scanner", "sleep 5" ] }, diff --git a/multimedia/medialibrary/mediaLibrary_fileAsset/entry/src/main/module.json b/multimedia/medialibrary/mediaLibrary_fileAsset/entry/src/main/module.json index 025062ffe..473ee0c51 100644 --- a/multimedia/medialibrary/mediaLibrary_fileAsset/entry/src/main/module.json +++ b/multimedia/medialibrary/mediaLibrary_fileAsset/entry/src/main/module.json @@ -36,22 +36,6 @@ } ], "requestPermissions": [ - { - "name": "ohos.permission.GET_BUNDLE_INFO", - "reason": "use ohos.permission.GET_BUNDLE_INFO" - }, - { - "name": "ohos.permission.GET_BUNDLE_INFO_PRIVILEGED", - "reason": "use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED" - }, - { - "name": "ohos.permission.GRANT_SENSITIVE_PERMISSIONS", - "reason": "use ohos.permission.GRANT_SENSITIVE_PERMISSIONS" - }, - { - "name": "ohos.permission.REVOKE_SENSITIVE_PERMISSIONS", - "reason": "use ohos.permission.REVOKE_SENSITIVE_PERMISSIONS" - }, { "name": "ohos.permission.MEDIA_LOCATION", "reason": "use ohos.permission.MEDIA_LOCATION" diff --git a/multimedia/medialibrary/mediaLibrary_fileAsset/signature/openharmony_sx.p7b b/multimedia/medialibrary/mediaLibrary_fileAsset/signature/openharmony_sx.p7b index 64b33bf079b2ab68a3f26f240d127186546b33d9..f8875c87ff37487a44b1f942342ff1d5a62ad75c 100644 GIT binary patch delta 248 zcmbOsJ4xEXpozDSjZ>@5qwPB{BRkWACf<6WP&E@Hqam*WHydX{n+IbmGYb==K@+PU zLLuXVCRTZtCRXW<4(nOi^74yv6LThiWs%=3&1TKc>SWNwXg4{UcXhq7fw`f9fsv7c zfkl*oK3qR1i=h&W0&m(f9aXKfldBGF{rG9-g8M#?rzXu~vRYlbCQ*5X&x1$d#AN85K^Ms}tJO?<6Dp++V~Mnhf$ZZ^(@HV?*BW)>z!gC;gp zghIvzO>Al`O>9aV9oDn36;~FQq~=ck$|7H{l%J7btXGg)l$%*xoSC1e=k6L3?-c6i z;^P|c>F4Gj9}wgj=IP_=?&_kXgQ+;k(Jv%E*wruCGsH8@H9o*K$k#JC*wf!H7>nv4 z*D!x?R}|&-_|&601&fKkt}dRA@jm{}jv+uhu_y>~b##dbtHL4~9^}ax;tG}CEW&Ed z&gE#(#Api)OoQyn4Xmk?_whK^8yNzjftjhLk#UrPK0HV{Sqzm}6zuroKZgsRYOsI$ z@M+8Jc-fUkS&{2SG7?|x-q`taW1gS^7aIpKvd-DEFf*~Z8@MtlR7_EAnLCMV?dPX= zES8j(8qH>rIuNt?+v@u>S22B4dCkJ4$gpCP`hgQCFIn^TWi7ZXoLlpkVNd2XRk1Mc N|844Cd@Yxs0s!TNu37*9 diff --git a/multimedia/medialibrary/mediaLibrary_fileKey/Test.json b/multimedia/medialibrary/mediaLibrary_fileKey/Test.json index fad234aef..7bdeb786b 100644 --- a/multimedia/medialibrary/mediaLibrary_fileKey/Test.json +++ b/multimedia/medialibrary/mediaLibrary_fileKey/Test.json @@ -13,7 +13,19 @@ "type": "ShellKit", "pre-push": [], "run-command": [ - "rm -rf /storage/media/100/local/files/*", + "rm -rf /storage/media/100/local/files/Audios/*", + "rm -rf /storage/media/100/local/files/Audios/.*", + "rm -rf /storage/media/100/local/files/Camera/*", + "rm -rf /storage/media/100/local/files/Camera/.*", + "rm -rf /storage/media/100/local/files/Documents/*", + "rm -rf /storage/media/100/local/files/Documents/.*", + "rm -rf /storage/media/100/local/files/Download/*", + "rm -rf /storage/media/100/local/files/Download/.*", + "rm -rf /storage/media/100/local/files/Pictures/*", + "rm -rf /storage/media/100/local/files/Pictures/.*", + "rm -rf /storage/media/100/local/files/Videos/*", + "rm -rf /storage/media/100/local/files/Videos/.*", + "sleep 5", "rm -rf /data/app/el2/100/database/com.ohos.medialibrary.medialibrarydata/*", "kill -9 `pidof com.ohos.medialibrary.medialibrarydata`", "scanner", @@ -54,11 +66,20 @@ "teardown-command": [ "power-shell setmode 600", "rm -rf /storage/media/100/local/temp", - "rm -rf /storage/media/100/local/files/*", - "rm -rf /storage/media/100/local/files/.*", + "rm -rf /storage/media/100/local/files/Audios/*", + "rm -rf /storage/media/100/local/files/Audios/.*", + "rm -rf /storage/media/100/local/files/Camera/*", + "rm -rf /storage/media/100/local/files/Camera/.*", + "rm -rf /storage/media/100/local/files/Documents/*", + "rm -rf /storage/media/100/local/files/Documents/.*", + "rm -rf /storage/media/100/local/files/Download/*", + "rm -rf /storage/media/100/local/files/Download/.*", + "rm -rf /storage/media/100/local/files/Pictures/*", + "rm -rf /storage/media/100/local/files/Pictures/.*", + "rm -rf /storage/media/100/local/files/Videos/*", + "rm -rf /storage/media/100/local/files/Videos/.*", "rm -rf /data/app/el2/100/database/com.ohos.medialibrary.medialibrarydata/*", "kill -9 `pidof com.ohos.medialibrary.medialibrarydata`", - "scanner", "sleep 5" ] }, diff --git a/multimedia/medialibrary/mediaLibrary_fileKey/entry/src/main/module.json b/multimedia/medialibrary/mediaLibrary_fileKey/entry/src/main/module.json index 025062ffe..473ee0c51 100644 --- a/multimedia/medialibrary/mediaLibrary_fileKey/entry/src/main/module.json +++ b/multimedia/medialibrary/mediaLibrary_fileKey/entry/src/main/module.json @@ -36,22 +36,6 @@ } ], "requestPermissions": [ - { - "name": "ohos.permission.GET_BUNDLE_INFO", - "reason": "use ohos.permission.GET_BUNDLE_INFO" - }, - { - "name": "ohos.permission.GET_BUNDLE_INFO_PRIVILEGED", - "reason": "use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED" - }, - { - "name": "ohos.permission.GRANT_SENSITIVE_PERMISSIONS", - "reason": "use ohos.permission.GRANT_SENSITIVE_PERMISSIONS" - }, - { - "name": "ohos.permission.REVOKE_SENSITIVE_PERMISSIONS", - "reason": "use ohos.permission.REVOKE_SENSITIVE_PERMISSIONS" - }, { "name": "ohos.permission.MEDIA_LOCATION", "reason": "use ohos.permission.MEDIA_LOCATION" diff --git a/multimedia/medialibrary/mediaLibrary_fileKey/signature/openharmony_sx.p7b b/multimedia/medialibrary/mediaLibrary_fileKey/signature/openharmony_sx.p7b index 64b33bf079b2ab68a3f26f240d127186546b33d9..f8875c87ff37487a44b1f942342ff1d5a62ad75c 100644 GIT binary patch delta 248 zcmbOsJ4xEXpozDSjZ>@5qwPB{BRkWACf<6WP&E@Hqam*WHydX{n+IbmGYb==K@+PU zLLuXVCRTZtCRXW<4(nOi^74yv6LThiWs%=3&1TKc>SWNwXg4{UcXhq7fw`f9fsv7c zfkl*oK3qR1i=h&W0&m(f9aXKfldBGF{rG9-g8M#?rzXu~vRYlbCQ*5X&x1$d#AN85K^Ms}tJO?<6Dp++V~Mnhf$ZZ^(@HV?*BW)>z!gC;gp zghIvzO>Al`O>9aV9oDn36;~FQq~=ck$|7H{l%J7btXGg)l$%*xoSC1e=k6L3?-c6i z;^P|c>F4Gj9}wgj=IP_=?&_kXgQ+;k(Jv%E*wruCGsH8@H9o*K$k#JC*wf!H7>nv4 z*D!x?R}|&-_|&601&fKkt}dRA@jm{}jv+uhu_y>~b##dbtHL4~9^}ax;tG}CEW&Ed z&gE#(#Api)OoQyn4Xmk?_whK^8yNzjftjhLk#UrPK0HV{Sqzm}6zuroKZgsRYOsI$ z@M+8Jc-fUkS&{2SG7?|x-q`taW1gS^7aIpKvd-DEFf*~Z8@MtlR7_EAnLCMV?dPX= zES8j(8qH>rIuNt?+v@u>S22B4dCkJ4$gpCP`hgQCFIn^TWi7ZXoLlpkVNd2XRk1Mc N|844Cd@Yxs0s!TNu37*9 diff --git a/multimedia/medialibrary/mediaLibrary_fileResult/Test.json b/multimedia/medialibrary/mediaLibrary_fileResult/Test.json index 1d2917047..1ff42252c 100644 --- a/multimedia/medialibrary/mediaLibrary_fileResult/Test.json +++ b/multimedia/medialibrary/mediaLibrary_fileResult/Test.json @@ -13,7 +13,19 @@ "type": "ShellKit", "pre-push": [], "run-command": [ - "rm -rf /storage/media/100/local/files/*", + "rm -rf /storage/media/100/local/files/Audios/*", + "rm -rf /storage/media/100/local/files/Audios/.*", + "rm -rf /storage/media/100/local/files/Camera/*", + "rm -rf /storage/media/100/local/files/Camera/.*", + "rm -rf /storage/media/100/local/files/Documents/*", + "rm -rf /storage/media/100/local/files/Documents/.*", + "rm -rf /storage/media/100/local/files/Download/*", + "rm -rf /storage/media/100/local/files/Download/.*", + "rm -rf /storage/media/100/local/files/Pictures/*", + "rm -rf /storage/media/100/local/files/Pictures/.*", + "rm -rf /storage/media/100/local/files/Videos/*", + "rm -rf /storage/media/100/local/files/Videos/.*", + "sleep 5", "rm -rf /data/app/el2/100/database/com.ohos.medialibrary.medialibrarydata/*", "kill -9 `pidof com.ohos.medialibrary.medialibrarydata`", "scanner", @@ -58,11 +70,20 @@ "teardown-command": [ "power-shell setmode 600", "rm -rf /storage/media/100/local/temp", - "rm -rf /storage/media/100/local/files/*", - "rm -rf /storage/media/100/local/files/.*", + "rm -rf /storage/media/100/local/files/Audios/*", + "rm -rf /storage/media/100/local/files/Audios/.*", + "rm -rf /storage/media/100/local/files/Camera/*", + "rm -rf /storage/media/100/local/files/Camera/.*", + "rm -rf /storage/media/100/local/files/Documents/*", + "rm -rf /storage/media/100/local/files/Documents/.*", + "rm -rf /storage/media/100/local/files/Download/*", + "rm -rf /storage/media/100/local/files/Download/.*", + "rm -rf /storage/media/100/local/files/Pictures/*", + "rm -rf /storage/media/100/local/files/Pictures/.*", + "rm -rf /storage/media/100/local/files/Videos/*", + "rm -rf /storage/media/100/local/files/Videos/.*", "rm -rf /data/app/el2/100/database/com.ohos.medialibrary.medialibrarydata/*", "kill -9 `pidof com.ohos.medialibrary.medialibrarydata`", - "scanner", "sleep 5" ] }, diff --git a/multimedia/medialibrary/mediaLibrary_fileResult/entry/src/main/module.json b/multimedia/medialibrary/mediaLibrary_fileResult/entry/src/main/module.json index 025062ffe..473ee0c51 100644 --- a/multimedia/medialibrary/mediaLibrary_fileResult/entry/src/main/module.json +++ b/multimedia/medialibrary/mediaLibrary_fileResult/entry/src/main/module.json @@ -36,22 +36,6 @@ } ], "requestPermissions": [ - { - "name": "ohos.permission.GET_BUNDLE_INFO", - "reason": "use ohos.permission.GET_BUNDLE_INFO" - }, - { - "name": "ohos.permission.GET_BUNDLE_INFO_PRIVILEGED", - "reason": "use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED" - }, - { - "name": "ohos.permission.GRANT_SENSITIVE_PERMISSIONS", - "reason": "use ohos.permission.GRANT_SENSITIVE_PERMISSIONS" - }, - { - "name": "ohos.permission.REVOKE_SENSITIVE_PERMISSIONS", - "reason": "use ohos.permission.REVOKE_SENSITIVE_PERMISSIONS" - }, { "name": "ohos.permission.MEDIA_LOCATION", "reason": "use ohos.permission.MEDIA_LOCATION" diff --git a/multimedia/medialibrary/mediaLibrary_fileResult/signature/openharmony_sx.p7b b/multimedia/medialibrary/mediaLibrary_fileResult/signature/openharmony_sx.p7b index 64b33bf079b2ab68a3f26f240d127186546b33d9..f8875c87ff37487a44b1f942342ff1d5a62ad75c 100644 GIT binary patch delta 248 zcmbOsJ4xEXpozDSjZ>@5qwPB{BRkWACf<6WP&E@Hqam*WHydX{n+IbmGYb==K@+PU zLLuXVCRTZtCRXW<4(nOi^74yv6LThiWs%=3&1TKc>SWNwXg4{UcXhq7fw`f9fsv7c zfkl*oK3qR1i=h&W0&m(f9aXKfldBGF{rG9-g8M#?rzXu~vRYlbCQ*5X&x1$d#AN85K^Ms}tJO?<6Dp++V~Mnhf$ZZ^(@HV?*BW)>z!gC;gp zghIvzO>Al`O>9aV9oDn36;~FQq~=ck$|7H{l%J7btXGg)l$%*xoSC1e=k6L3?-c6i z;^P|c>F4Gj9}wgj=IP_=?&_kXgQ+;k(Jv%E*wruCGsH8@H9o*K$k#JC*wf!H7>nv4 z*D!x?R}|&-_|&601&fKkt}dRA@jm{}jv+uhu_y>~b##dbtHL4~9^}ax;tG}CEW&Ed z&gE#(#Api)OoQyn4Xmk?_whK^8yNzjftjhLk#UrPK0HV{Sqzm}6zuroKZgsRYOsI$ z@M+8Jc-fUkS&{2SG7?|x-q`taW1gS^7aIpKvd-DEFf*~Z8@MtlR7_EAnLCMV?dPX= zES8j(8qH>rIuNt?+v@u>S22B4dCkJ4$gpCP`hgQCFIn^TWi7ZXoLlpkVNd2XRk1Mc N|844Cd@Yxs0s!TNu37*9 diff --git a/multimedia/medialibrary/mediaLibrary_getExifNoLocation/Test.json b/multimedia/medialibrary/mediaLibrary_getExifNoLocation/Test.json index 62e7bdbc2..dd3a633ff 100644 --- a/multimedia/medialibrary/mediaLibrary_getExifNoLocation/Test.json +++ b/multimedia/medialibrary/mediaLibrary_getExifNoLocation/Test.json @@ -13,7 +13,19 @@ "type": "ShellKit", "pre-push": [], "run-command": [ - "rm -rf /storage/media/100/local/files/*", + "rm -rf /storage/media/100/local/files/Audios/*", + "rm -rf /storage/media/100/local/files/Audios/.*", + "rm -rf /storage/media/100/local/files/Camera/*", + "rm -rf /storage/media/100/local/files/Camera/.*", + "rm -rf /storage/media/100/local/files/Documents/*", + "rm -rf /storage/media/100/local/files/Documents/.*", + "rm -rf /storage/media/100/local/files/Download/*", + "rm -rf /storage/media/100/local/files/Download/.*", + "rm -rf /storage/media/100/local/files/Pictures/*", + "rm -rf /storage/media/100/local/files/Pictures/.*", + "rm -rf /storage/media/100/local/files/Videos/*", + "rm -rf /storage/media/100/local/files/Videos/.*", + "sleep 5", "rm -rf /data/app/el2/100/database/com.ohos.medialibrary.medialibrarydata/*", "kill -9 `pidof com.ohos.medialibrary.medialibrarydata`", "scanner", @@ -49,11 +61,20 @@ "teardown-command": [ "power-shell setmode 600", "rm -rf /storage/media/100/local/temp", - "rm -rf /storage/media/100/local/files/*", - "rm -rf /storage/media/100/local/files/.*", + "rm -rf /storage/media/100/local/files/Audios/*", + "rm -rf /storage/media/100/local/files/Audios/.*", + "rm -rf /storage/media/100/local/files/Camera/*", + "rm -rf /storage/media/100/local/files/Camera/.*", + "rm -rf /storage/media/100/local/files/Documents/*", + "rm -rf /storage/media/100/local/files/Documents/.*", + "rm -rf /storage/media/100/local/files/Download/*", + "rm -rf /storage/media/100/local/files/Download/.*", + "rm -rf /storage/media/100/local/files/Pictures/*", + "rm -rf /storage/media/100/local/files/Pictures/.*", + "rm -rf /storage/media/100/local/files/Videos/*", + "rm -rf /storage/media/100/local/files/Videos/.*", "rm -rf /data/app/el2/100/database/com.ohos.medialibrary.medialibrarydata/*", "kill -9 `pidof com.ohos.medialibrary.medialibrarydata`", - "scanner", "sleep 5" ] }, diff --git a/multimedia/medialibrary/mediaLibrary_getExifNoLocation/entry/src/main/ets/test/getExifNoLocation.test.ets b/multimedia/medialibrary/mediaLibrary_getExifNoLocation/entry/src/main/ets/test/getExifNoLocation.test.ets index a3b4fce8d..d9045e9c8 100644 --- a/multimedia/medialibrary/mediaLibrary_getExifNoLocation/entry/src/main/ets/test/getExifNoLocation.test.ets +++ b/multimedia/medialibrary/mediaLibrary_getExifNoLocation/entry/src/main/ets/test/getExifNoLocation.test.ets @@ -16,38 +16,35 @@ import image from "@ohos.multimedia.image"; import mediaLibrary from "@ohos.multimedia.mediaLibrary"; import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from "deccjsunit/index"; import abilityAccessCtrl from "@ohos.abilityAccessCtrl"; -import bundleManager from '@ohos.bundle.bundleManager'; +import uitest from "@ohos.UiTest"; +import { sleep, } from "../../../../../../common"; export default function getExifNoLocation(abilityContext) { describe("getExifNoLocation", function () { beforeAll(async function () { console.info("beforeAll case"); try { - let permissionState = new Map(); - const permissions = [ - 'ohos.permission.READ_MEDIA', - ]; - - const atManager = abilityAccessCtrl.createAtManager(); - const appFlags = bundleManager.ApplicationFlag.GET_APPLICATION_INFO_DEFAULT; - const userId = 100; - const appInfo = await bundleManager.getApplicationInfo('ohos.acts.multimedia.mediaLibrary', appFlags, userId); - const tokenID = appInfo.accessTokenId; - for (const permission of permissions) { - console.info('getPermission permission: ' + permission); - try { - await atManager.grantUserGrantedPermission(tokenID, permission, 1); - } catch (error) { - console.info(`getPermission ${permission} failed`); - } - permissionState.set(permission, await atManager.verifyAccessToken(tokenID, permission)); - } - permissionState.forEach((value, key, map) => { - if (value !== 0) { - console.info(`getPermission failed; permission: ${key}, state: ${value}`); + let permissions = ["ohos.permission.READ_MEDIA"]; + let atManager = abilityAccessCtrl.createAtManager(); + atManager.requestPermissionsFromUser(abilityContext, permissions, (err, result) => { + if (err) { + console.info('getPermission failed: ' + JSON.stringify(err)); + } else { + console.info('getPermission suc: ' + JSON.stringify(result)); } }); - console.info('getPermission end'); + + let driver = uitest.Driver.create(); + await sleep(500); + + for (let i = 0; i < 10; i++) { + await sleep(500); + let button = await driver.findComponent(uitest.ON.text('允许')); + if (button != undefined) { + await button.click(); + } + } + console.info("getPermission end"); } catch (error) { console.info(`getPermission failed, error: ${error}`); } diff --git a/multimedia/medialibrary/mediaLibrary_getExifNoLocation/entry/src/main/module.json b/multimedia/medialibrary/mediaLibrary_getExifNoLocation/entry/src/main/module.json index f89c932e2..299d72256 100644 --- a/multimedia/medialibrary/mediaLibrary_getExifNoLocation/entry/src/main/module.json +++ b/multimedia/medialibrary/mediaLibrary_getExifNoLocation/entry/src/main/module.json @@ -36,22 +36,6 @@ } ], "requestPermissions": [ - { - "name": "ohos.permission.GET_BUNDLE_INFO", - "reason": "use ohos.permission.GET_BUNDLE_INFO" - }, - { - "name": "ohos.permission.GET_BUNDLE_INFO_PRIVILEGED", - "reason": "use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED" - }, - { - "name": "ohos.permission.GRANT_SENSITIVE_PERMISSIONS", - "reason": "use ohos.permission.GRANT_SENSITIVE_PERMISSIONS" - }, - { - "name": "ohos.permission.REVOKE_SENSITIVE_PERMISSIONS", - "reason": "use ohos.permission.REVOKE_SENSITIVE_PERMISSIONS" - }, { "name": "ohos.permission.READ_MEDIA", "reason": "use ohos.permission.READ_MEDIA" diff --git a/multimedia/medialibrary/mediaLibrary_getExifNoLocation/signature/openharmony_sx.p7b b/multimedia/medialibrary/mediaLibrary_getExifNoLocation/signature/openharmony_sx.p7b index 9c7fac97dde577f20d65b199da244a72f925ed50..f8875c87ff37487a44b1f942342ff1d5a62ad75c 100644 GIT binary patch delta 238 zcmca5GfCRPpozDSjZ>@5qwPB{BRkWACf<6WP&E@Hqam*WHydX{n+IbmGYb==K@+PU zLLuXVCRTZtCRXW<4(nOi^74yv6LThiWs%=}hxIjky|ID0p@D&sk%56llz~267blCM z5{m+F+A4s8ASY373aK98p+&114!UAiVwd4fnw!1w^!2BV8@5qwPB{BRkWACO&tdkTVk_qam*WHydX{n+IbmGYb==K@;mY zghIvzO{~vZnphuibXd>AR$N(JlA1gDD~o)+Qhr8$v0g!HQEp~&ab|v=p1W&Eyi=&3 zi;ru(r=OdDd_a(An5U1cyQ_ { - if (value !== 0) { - console.info(`getPermission failed; permission: ${key}, state: ${value}`); + let permissions = ["ohos.permission.MEDIA_LOCATION", "ohos.permission.READ_MEDIA"]; + let atManager = abilityAccessCtrl.createAtManager(); + atManager.requestPermissionsFromUser(abilityContext, permissions, (err, result) => { + if (err) { + console.info('getPermission failed: ' + JSON.stringify(err)); + } else { + console.info('getPermission suc: ' + JSON.stringify(result)); } }); - console.info('getPermission end'); + + let driver = uitest.Driver.create(); + await sleep(500); + + for (let i = 0; i < 10; i++) { + await sleep(500); + let button = await driver.findComponent(uitest.ON.text('允许')); + if (button != undefined) { + await button.click(); + } + } + console.info("getPermission end"); } catch (error) { console.info(`getPermission failed, error: ${error}`); } diff --git a/multimedia/medialibrary/mediaLibrary_getExiflocation/entry/src/main/module.json b/multimedia/medialibrary/mediaLibrary_getExiflocation/entry/src/main/module.json index 3edbbf74e..4819ee90c 100644 --- a/multimedia/medialibrary/mediaLibrary_getExiflocation/entry/src/main/module.json +++ b/multimedia/medialibrary/mediaLibrary_getExiflocation/entry/src/main/module.json @@ -36,22 +36,6 @@ } ], "requestPermissions": [ - { - "name": "ohos.permission.GET_BUNDLE_INFO", - "reason": "use ohos.permission.GET_BUNDLE_INFO" - }, - { - "name": "ohos.permission.GET_BUNDLE_INFO_PRIVILEGED", - "reason": "use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED" - }, - { - "name": "ohos.permission.GRANT_SENSITIVE_PERMISSIONS", - "reason": "use ohos.permission.GRANT_SENSITIVE_PERMISSIONS" - }, - { - "name": "ohos.permission.REVOKE_SENSITIVE_PERMISSIONS", - "reason": "use ohos.permission.REVOKE_SENSITIVE_PERMISSIONS" - }, { "name": "ohos.permission.MEDIA_LOCATION", "reason": "use ohos.permission.MEDIA_LOCATION" diff --git a/multimedia/medialibrary/mediaLibrary_getExiflocation/signature/openharmony_sx.p7b b/multimedia/medialibrary/mediaLibrary_getExiflocation/signature/openharmony_sx.p7b index 30d0df085b93cd9a9cc16a266651fbcb166696ed..f8875c87ff37487a44b1f942342ff1d5a62ad75c 100644 GIT binary patch delta 248 zcmew@5qwPB{BRkWACf<6WP&E@Hqam*WHydX{n+IbmGYb==K@+PU zLLuXVCRTZtCRXW<4(nOi^74yv6LThiWs%?fm(`k`)ybfV(QdLW@9KJE19L+I10y2? z1B)mFeYk#37DFW#1>Uq}I;vV{Cs!TV`tj4u1^0a(PfeP~WVO0c9d*SKpPZ>8Pxs`N35`DP+vq2Br6pdB8&Yp9B6(jKisN`4o k!v`G4TAkj;`i6>FeG>n}d?Q=rW^E8}@5qwPB{BRkWACcZSFP!ba(qam*WHydX{n+IbmGYb==K@*!e zLLuXVCN>V1CN`Fh4(nOiiYtptQgbJNWs$E}%FoCz)+qj zYnZ>cD~j@ZeCpAhg2hB%R~Jvmcpraf#}J^MSQG@gI=aMzRVl^R>L?-nS*&DLtyGk{ zS(8b04&(5VgLXD diff --git a/multimedia/medialibrary/mediaLibrary_getThumbnail/Test.json b/multimedia/medialibrary/mediaLibrary_getThumbnail/Test.json index c2aed8c1c..e3755f0be 100644 --- a/multimedia/medialibrary/mediaLibrary_getThumbnail/Test.json +++ b/multimedia/medialibrary/mediaLibrary_getThumbnail/Test.json @@ -13,7 +13,19 @@ "type": "ShellKit", "pre-push": [], "run-command": [ - "rm -rf /storage/media/100/local/files/*", + "rm -rf /storage/media/100/local/files/Audios/*", + "rm -rf /storage/media/100/local/files/Audios/.*", + "rm -rf /storage/media/100/local/files/Camera/*", + "rm -rf /storage/media/100/local/files/Camera/.*", + "rm -rf /storage/media/100/local/files/Documents/*", + "rm -rf /storage/media/100/local/files/Documents/.*", + "rm -rf /storage/media/100/local/files/Download/*", + "rm -rf /storage/media/100/local/files/Download/.*", + "rm -rf /storage/media/100/local/files/Pictures/*", + "rm -rf /storage/media/100/local/files/Pictures/.*", + "rm -rf /storage/media/100/local/files/Videos/*", + "rm -rf /storage/media/100/local/files/Videos/.*", + "sleep 5", "rm -rf /data/app/el2/100/database/com.ohos.medialibrary.medialibrarydata/*", "kill -9 `pidof com.ohos.medialibrary.medialibrarydata`", "scanner", @@ -55,11 +67,20 @@ "teardown-command": [ "power-shell setmode 600", "rm -rf /storage/media/100/local/temp", - "rm -rf /storage/media/100/local/files/*", - "rm -rf /storage/media/100/local/files/.*", + "rm -rf /storage/media/100/local/files/Audios/*", + "rm -rf /storage/media/100/local/files/Audios/.*", + "rm -rf /storage/media/100/local/files/Camera/*", + "rm -rf /storage/media/100/local/files/Camera/.*", + "rm -rf /storage/media/100/local/files/Documents/*", + "rm -rf /storage/media/100/local/files/Documents/.*", + "rm -rf /storage/media/100/local/files/Download/*", + "rm -rf /storage/media/100/local/files/Download/.*", + "rm -rf /storage/media/100/local/files/Pictures/*", + "rm -rf /storage/media/100/local/files/Pictures/.*", + "rm -rf /storage/media/100/local/files/Videos/*", + "rm -rf /storage/media/100/local/files/Videos/.*", "rm -rf /data/app/el2/100/database/com.ohos.medialibrary.medialibrarydata/*", "kill -9 `pidof com.ohos.medialibrary.medialibrarydata`", - "scanner", "sleep 5" ] }, diff --git a/multimedia/medialibrary/mediaLibrary_getThumbnail/entry/src/main/ets/test/getThumbnailPromise.test.ets b/multimedia/medialibrary/mediaLibrary_getThumbnail/entry/src/main/ets/test/getThumbnailPromise.test.ets index 215a3cee8..7dfb56b1a 100644 --- a/multimedia/medialibrary/mediaLibrary_getThumbnail/entry/src/main/ets/test/getThumbnailPromise.test.ets +++ b/multimedia/medialibrary/mediaLibrary_getThumbnail/entry/src/main/ets/test/getThumbnailPromise.test.ets @@ -24,7 +24,6 @@ import { AUDIO_TYPE, checkAssetsCount, fetchOps, - getPermission, } from "../../../../../../common"; export default function getThumbnailPromise(abilityContext) { diff --git a/multimedia/medialibrary/mediaLibrary_getThumbnail/entry/src/main/module.json b/multimedia/medialibrary/mediaLibrary_getThumbnail/entry/src/main/module.json index 025062ffe..473ee0c51 100644 --- a/multimedia/medialibrary/mediaLibrary_getThumbnail/entry/src/main/module.json +++ b/multimedia/medialibrary/mediaLibrary_getThumbnail/entry/src/main/module.json @@ -36,22 +36,6 @@ } ], "requestPermissions": [ - { - "name": "ohos.permission.GET_BUNDLE_INFO", - "reason": "use ohos.permission.GET_BUNDLE_INFO" - }, - { - "name": "ohos.permission.GET_BUNDLE_INFO_PRIVILEGED", - "reason": "use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED" - }, - { - "name": "ohos.permission.GRANT_SENSITIVE_PERMISSIONS", - "reason": "use ohos.permission.GRANT_SENSITIVE_PERMISSIONS" - }, - { - "name": "ohos.permission.REVOKE_SENSITIVE_PERMISSIONS", - "reason": "use ohos.permission.REVOKE_SENSITIVE_PERMISSIONS" - }, { "name": "ohos.permission.MEDIA_LOCATION", "reason": "use ohos.permission.MEDIA_LOCATION" diff --git a/multimedia/medialibrary/mediaLibrary_getThumbnail/signature/openharmony_sx.p7b b/multimedia/medialibrary/mediaLibrary_getThumbnail/signature/openharmony_sx.p7b index 64b33bf079b2ab68a3f26f240d127186546b33d9..f8875c87ff37487a44b1f942342ff1d5a62ad75c 100644 GIT binary patch delta 248 zcmbOsJ4xEXpozDSjZ>@5qwPB{BRkWACf<6WP&E@Hqam*WHydX{n+IbmGYb==K@+PU zLLuXVCRTZtCRXW<4(nOi^74yv6LThiWs%=3&1TKc>SWNwXg4{UcXhq7fw`f9fsv7c zfkl*oK3qR1i=h&W0&m(f9aXKfldBGF{rG9-g8M#?rzXu~vRYlbCQ*5X&x1$d#AN85K^Ms}tJO?<6Dp++V~Mnhf$ZZ^(@HV?*BW)>z!gC;gp zghIvzO>Al`O>9aV9oDn36;~FQq~=ck$|7H{l%J7btXGg)l$%*xoSC1e=k6L3?-c6i z;^P|c>F4Gj9}wgj=IP_=?&_kXgQ+;k(Jv%E*wruCGsH8@H9o*K$k#JC*wf!H7>nv4 z*D!x?R}|&-_|&601&fKkt}dRA@jm{}jv+uhu_y>~b##dbtHL4~9^}ax;tG}CEW&Ed z&gE#(#Api)OoQyn4Xmk?_whK^8yNzjftjhLk#UrPK0HV{Sqzm}6zuroKZgsRYOsI$ z@M+8Jc-fUkS&{2SG7?|x-q`taW1gS^7aIpKvd-DEFf*~Z8@MtlR7_EAnLCMV?dPX= zES8j(8qH>rIuNt?+v@u>S22B4dCkJ4$gpCP`hgQCFIn^TWi7ZXoLlpkVNd2XRk1Mc N|844Cd@Yxs0s!TNu37*9 diff --git a/multimedia/medialibrary/mediaLibrary_mediafetchoptions/Test.json b/multimedia/medialibrary/mediaLibrary_mediafetchoptions/Test.json index 2bfb872d6..a8dc841b6 100644 --- a/multimedia/medialibrary/mediaLibrary_mediafetchoptions/Test.json +++ b/multimedia/medialibrary/mediaLibrary_mediafetchoptions/Test.json @@ -13,7 +13,19 @@ "type": "ShellKit", "pre-push": [], "run-command": [ - "rm -rf /storage/media/100/local/files/*", + "rm -rf /storage/media/100/local/files/Audios/*", + "rm -rf /storage/media/100/local/files/Audios/.*", + "rm -rf /storage/media/100/local/files/Camera/*", + "rm -rf /storage/media/100/local/files/Camera/.*", + "rm -rf /storage/media/100/local/files/Documents/*", + "rm -rf /storage/media/100/local/files/Documents/.*", + "rm -rf /storage/media/100/local/files/Download/*", + "rm -rf /storage/media/100/local/files/Download/.*", + "rm -rf /storage/media/100/local/files/Pictures/*", + "rm -rf /storage/media/100/local/files/Pictures/.*", + "rm -rf /storage/media/100/local/files/Videos/*", + "rm -rf /storage/media/100/local/files/Videos/.*", + "sleep 5", "rm -rf /data/app/el2/100/database/com.ohos.medialibrary.medialibrarydata/*", "kill -9 `pidof com.ohos.medialibrary.medialibrarydata`", "scanner", @@ -54,11 +66,20 @@ "teardown-command": [ "power-shell setmode 600", "rm -rf /storage/media/100/local/temp", - "rm -rf /storage/media/100/local/files/*", - "rm -rf /storage/media/100/local/files/.*", + "rm -rf /storage/media/100/local/files/Audios/*", + "rm -rf /storage/media/100/local/files/Audios/.*", + "rm -rf /storage/media/100/local/files/Camera/*", + "rm -rf /storage/media/100/local/files/Camera/.*", + "rm -rf /storage/media/100/local/files/Documents/*", + "rm -rf /storage/media/100/local/files/Documents/.*", + "rm -rf /storage/media/100/local/files/Download/*", + "rm -rf /storage/media/100/local/files/Download/.*", + "rm -rf /storage/media/100/local/files/Pictures/*", + "rm -rf /storage/media/100/local/files/Pictures/.*", + "rm -rf /storage/media/100/local/files/Videos/*", + "rm -rf /storage/media/100/local/files/Videos/.*", "rm -rf /data/app/el2/100/database/com.ohos.medialibrary.medialibrarydata/*", "kill -9 `pidof com.ohos.medialibrary.medialibrarydata`", - "scanner", "sleep 5" ] }, diff --git a/multimedia/medialibrary/mediaLibrary_mediafetchoptions/entry/src/main/module.json b/multimedia/medialibrary/mediaLibrary_mediafetchoptions/entry/src/main/module.json index 025062ffe..473ee0c51 100644 --- a/multimedia/medialibrary/mediaLibrary_mediafetchoptions/entry/src/main/module.json +++ b/multimedia/medialibrary/mediaLibrary_mediafetchoptions/entry/src/main/module.json @@ -36,22 +36,6 @@ } ], "requestPermissions": [ - { - "name": "ohos.permission.GET_BUNDLE_INFO", - "reason": "use ohos.permission.GET_BUNDLE_INFO" - }, - { - "name": "ohos.permission.GET_BUNDLE_INFO_PRIVILEGED", - "reason": "use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED" - }, - { - "name": "ohos.permission.GRANT_SENSITIVE_PERMISSIONS", - "reason": "use ohos.permission.GRANT_SENSITIVE_PERMISSIONS" - }, - { - "name": "ohos.permission.REVOKE_SENSITIVE_PERMISSIONS", - "reason": "use ohos.permission.REVOKE_SENSITIVE_PERMISSIONS" - }, { "name": "ohos.permission.MEDIA_LOCATION", "reason": "use ohos.permission.MEDIA_LOCATION" diff --git a/multimedia/medialibrary/mediaLibrary_mediafetchoptions/signature/openharmony_sx.p7b b/multimedia/medialibrary/mediaLibrary_mediafetchoptions/signature/openharmony_sx.p7b index 64b33bf079b2ab68a3f26f240d127186546b33d9..f8875c87ff37487a44b1f942342ff1d5a62ad75c 100644 GIT binary patch delta 248 zcmbOsJ4xEXpozDSjZ>@5qwPB{BRkWACf<6WP&E@Hqam*WHydX{n+IbmGYb==K@+PU zLLuXVCRTZtCRXW<4(nOi^74yv6LThiWs%=3&1TKc>SWNwXg4{UcXhq7fw`f9fsv7c zfkl*oK3qR1i=h&W0&m(f9aXKfldBGF{rG9-g8M#?rzXu~vRYlbCQ*5X&x1$d#AN85K^Ms}tJO?<6Dp++V~Mnhf$ZZ^(@HV?*BW)>z!gC;gp zghIvzO>Al`O>9aV9oDn36;~FQq~=ck$|7H{l%J7btXGg)l$%*xoSC1e=k6L3?-c6i z;^P|c>F4Gj9}wgj=IP_=?&_kXgQ+;k(Jv%E*wruCGsH8@H9o*K$k#JC*wf!H7>nv4 z*D!x?R}|&-_|&601&fKkt}dRA@jm{}jv+uhu_y>~b##dbtHL4~9^}ax;tG}CEW&Ed z&gE#(#Api)OoQyn4Xmk?_whK^8yNzjftjhLk#UrPK0HV{Sqzm}6zuroKZgsRYOsI$ z@M+8Jc-fUkS&{2SG7?|x-q`taW1gS^7aIpKvd-DEFf*~Z8@MtlR7_EAnLCMV?dPX= zES8j(8qH>rIuNt?+v@u>S22B4dCkJ4$gpCP`hgQCFIn^TWi7ZXoLlpkVNd2XRk1Mc N|844Cd@Yxs0s!TNu37*9 diff --git a/multimedia/medialibrary/mediaLibrary_trash/Test.json b/multimedia/medialibrary/mediaLibrary_trash/Test.json index 6dda711e2..566d32b21 100644 --- a/multimedia/medialibrary/mediaLibrary_trash/Test.json +++ b/multimedia/medialibrary/mediaLibrary_trash/Test.json @@ -13,7 +13,19 @@ "type": "ShellKit", "pre-push": [], "run-command": [ - "rm -rf /storage/media/100/local/files/*", + "rm -rf /storage/media/100/local/files/Audios/*", + "rm -rf /storage/media/100/local/files/Audios/.*", + "rm -rf /storage/media/100/local/files/Camera/*", + "rm -rf /storage/media/100/local/files/Camera/.*", + "rm -rf /storage/media/100/local/files/Documents/*", + "rm -rf /storage/media/100/local/files/Documents/.*", + "rm -rf /storage/media/100/local/files/Download/*", + "rm -rf /storage/media/100/local/files/Download/.*", + "rm -rf /storage/media/100/local/files/Pictures/*", + "rm -rf /storage/media/100/local/files/Pictures/.*", + "rm -rf /storage/media/100/local/files/Videos/*", + "rm -rf /storage/media/100/local/files/Videos/.*", + "sleep 5", "rm -rf /data/app/el2/100/database/com.ohos.medialibrary.medialibrarydata/*", "kill -9 `pidof com.ohos.medialibrary.medialibrarydata`", "scanner", @@ -57,11 +69,20 @@ "teardown-command": [ "power-shell setmode 600", "rm -rf /storage/media/100/local/temp", - "rm -rf /storage/media/100/local/files/*", - "rm -rf /storage/media/100/local/files/.*", + "rm -rf /storage/media/100/local/files/Audios/*", + "rm -rf /storage/media/100/local/files/Audios/.*", + "rm -rf /storage/media/100/local/files/Camera/*", + "rm -rf /storage/media/100/local/files/Camera/.*", + "rm -rf /storage/media/100/local/files/Documents/*", + "rm -rf /storage/media/100/local/files/Documents/.*", + "rm -rf /storage/media/100/local/files/Download/*", + "rm -rf /storage/media/100/local/files/Download/.*", + "rm -rf /storage/media/100/local/files/Pictures/*", + "rm -rf /storage/media/100/local/files/Pictures/.*", + "rm -rf /storage/media/100/local/files/Videos/*", + "rm -rf /storage/media/100/local/files/Videos/.*", "rm -rf /data/app/el2/100/database/com.ohos.medialibrary.medialibrarydata/*", "kill -9 `pidof com.ohos.medialibrary.medialibrarydata`", - "scanner", "sleep 5" ] }, diff --git a/multimedia/medialibrary/mediaLibrary_trash/entry/src/main/ets/test/trashCallback.test.ets b/multimedia/medialibrary/mediaLibrary_trash/entry/src/main/ets/test/trashCallback.test.ets index 705903bd5..bd7e8f8a7 100644 --- a/multimedia/medialibrary/mediaLibrary_trash/entry/src/main/ets/test/trashCallback.test.ets +++ b/multimedia/medialibrary/mediaLibrary_trash/entry/src/main/ets/test/trashCallback.test.ets @@ -30,8 +30,8 @@ import { export default function trashCallback(abilityContext) { describe("trashCallback", function () { beforeAll(async function () { - await getPermission(null, abilityContext); console.info("beforeAll case"); + await getPermission(null, abilityContext); await checkPresetsAssets(media, "ActsMediaLibraryTrashJsTest"); }); beforeEach(function () { diff --git a/multimedia/medialibrary/mediaLibrary_trash/entry/src/main/module.json b/multimedia/medialibrary/mediaLibrary_trash/entry/src/main/module.json index 025062ffe..473ee0c51 100644 --- a/multimedia/medialibrary/mediaLibrary_trash/entry/src/main/module.json +++ b/multimedia/medialibrary/mediaLibrary_trash/entry/src/main/module.json @@ -36,22 +36,6 @@ } ], "requestPermissions": [ - { - "name": "ohos.permission.GET_BUNDLE_INFO", - "reason": "use ohos.permission.GET_BUNDLE_INFO" - }, - { - "name": "ohos.permission.GET_BUNDLE_INFO_PRIVILEGED", - "reason": "use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED" - }, - { - "name": "ohos.permission.GRANT_SENSITIVE_PERMISSIONS", - "reason": "use ohos.permission.GRANT_SENSITIVE_PERMISSIONS" - }, - { - "name": "ohos.permission.REVOKE_SENSITIVE_PERMISSIONS", - "reason": "use ohos.permission.REVOKE_SENSITIVE_PERMISSIONS" - }, { "name": "ohos.permission.MEDIA_LOCATION", "reason": "use ohos.permission.MEDIA_LOCATION" diff --git a/multimedia/medialibrary/mediaLibrary_trash/signature/openharmony_sx.p7b b/multimedia/medialibrary/mediaLibrary_trash/signature/openharmony_sx.p7b index 64b33bf079b2ab68a3f26f240d127186546b33d9..f8875c87ff37487a44b1f942342ff1d5a62ad75c 100644 GIT binary patch delta 248 zcmbOsJ4xEXpozDSjZ>@5qwPB{BRkWACf<6WP&E@Hqam*WHydX{n+IbmGYb==K@+PU zLLuXVCRTZtCRXW<4(nOi^74yv6LThiWs%=3&1TKc>SWNwXg4{UcXhq7fw`f9fsv7c zfkl*oK3qR1i=h&W0&m(f9aXKfldBGF{rG9-g8M#?rzXu~vRYlbCQ*5X&x1$d#AN85K^Ms}tJO?<6Dp++V~Mnhf$ZZ^(@HV?*BW)>z!gC;gp zghIvzO>Al`O>9aV9oDn36;~FQq~=ck$|7H{l%J7btXGg)l$%*xoSC1e=k6L3?-c6i z;^P|c>F4Gj9}wgj=IP_=?&_kXgQ+;k(Jv%E*wruCGsH8@H9o*K$k#JC*wf!H7>nv4 z*D!x?R}|&-_|&601&fKkt}dRA@jm{}jv+uhu_y>~b##dbtHL4~9^}ax;tG}CEW&Ed z&gE#(#Api)OoQyn4Xmk?_whK^8yNzjftjhLk#UrPK0HV{Sqzm}6zuroKZgsRYOsI$ z@M+8Jc-fUkS&{2SG7?|x-q`taW1gS^7aIpKvd-DEFf*~Z8@MtlR7_EAnLCMV?dPX= zES8j(8qH>rIuNt?+v@u>S22B4dCkJ4$gpCP`hgQCFIn^TWi7ZXoLlpkVNd2XRk1Mc N|844Cd@Yxs0s!TNu37*9 -- GitLab