!266 备忘录接口整改

Merge pull request !266 from 张宏/0601
This commit is contained in:
openharmony_ci 2024-06-01 06:27:47 +00:00 committed by Gitee
commit bb1913cec8
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 5 additions and 2 deletions

View File

@ -14,7 +14,7 @@
*/
import {LogUtil} from '../baseUtil/LogUtil'
import MediaLib from '@ohos.multimedia.mediaLibrary';
import photoAccessHelper from '@ohos.file.photoAccessHelper';
const TAG = "MediaLibraryAccess"
export class MediaLibraryAccess {
@ -28,7 +28,7 @@ export class MediaLibraryAccess {
// 通过Uri拷贝图片到指定指定的包路径下
// 1、获取本地路径
let fileResult = await MediaLib.getMediaLibrary(context).getFileAssets(fetchOpt)
let fileResult = await photoAccessHelper.getPhotoAccessHelper(context).getAssets(fetchOpt)
if (fileResult != undefined) {
album.count = fileResult.getCount();
if (album.count <= 0) {

View File

@ -47,6 +47,9 @@
},
{
"name": "ohos.permission.START_ABILITIES_FROM_BACKGROUND"
},
{
"name": "ohos.permission.READ_IMAGEVIDEO"
}
],
"deliveryWithInstall": true,