From e31a08872eb40b99c378c76e40390cb9e0650d19 Mon Sep 17 00:00:00 2001 From: pengpeng7872 <2285070166@qq.com> Date: Mon, 8 Sep 2025 16:43:34 +0800 Subject: [PATCH] =?UTF-8?q?interface=5Fsdk-js=5F18=20PhotoPicker=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E7=8E=B0=E5=9C=BA=E6=81=A2=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: pengpeng7872 <2285070166@qq.com> --- api/@ohos.file.photoAccessHelper.d.ts | 95 +++++++++++++++++++++++++++ 1 file changed, 95 insertions(+) diff --git a/api/@ohos.file.photoAccessHelper.d.ts b/api/@ohos.file.photoAccessHelper.d.ts index c3336bda8f..c347f3fde2 100644 --- a/api/@ohos.file.photoAccessHelper.d.ts +++ b/api/@ohos.file.photoAccessHelper.d.ts @@ -127,6 +127,81 @@ declare namespace photoAccessHelper { AVFILE_FORMAT_JPG = 'jpg', } + /** + * Context information of the exit status of PhotoPicker, + * which can be used for on-site recovery of PhotoPicker next time. + * + * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core + * @atomicservice + * @since 21 + */ + class ContextRecoveryInfo { + /** + * The album URI from which the user exited during the last selection. + * The default value is empty string. + * + * @type { string } + * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core + * @atomicservice + * @since 21 + */ + albumUri: string; + + /** + * Timestamp of the first fully visible photo in the last selection interface. + * The default value is 0. + * + * @type { number } + * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core + * @atomicservice + * @since 21 + */ + time: number; + + /** + * Filename of the first fully visible photo in the last selection interface. + * The default value is empty string. + * + * @type { string } + * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core + * @atomicservice + * @since 21 + */ + displayName: string; + + /** + * Enum value of the recommendation content set by the user during the last selection (see `RecommendationType`). + * The default value is 0. + * + * @type { number } + * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core + * @atomicservice + * @since 21 + */ + recommendationType: number; + + /** + * Enum value of the recommendation content selected by the user during the last selection (see `RecommendationType`). + * The default value is 0. + * + * @type { number } + * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core + * @atomicservice + * @since 21 + */ + selectedRecommendationType: number; + + /** + * Context data version number for validating compatibility of context recovery. + * + * @type { number } + * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core + * @atomicservice + * @since 21 + */ + version: number; + } + /** * Enumerates media file types. * @@ -7910,6 +7985,16 @@ declare namespace photoAccessHelper { * @since 18 */ userId?: number; + + /** + * Context recovery information for restoring the last selection session. + * + * @type { ?ContextRecoveryInfo } + * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core + * @atomicservice + * @since 21 + */ + contextRecoveryInfo?: ContextRecoveryInfo; } /** @@ -8050,6 +8135,16 @@ declare namespace photoAccessHelper { * @since 12 */ isOriginalPhoto: boolean; + + /** + * Contextual information about the PhotoPicker's exit state. + * + * @type { ContextRecoveryInfo } + * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core + * @atomicservice + * @since 21 + */ + contextRecoveryInfo: ContextRecoveryInfo; } /** -- Gitee