From d2968af535e656395e49c61534bbf53aafc759ef Mon Sep 17 00:00:00 2001 From: pengpeng7872 <2285070166@qq.com> Date: Fri, 5 Sep 2025 12:06:01 +0800 Subject: [PATCH] =?UTF-8?q?[PhotoPicker]=E6=94=AF=E6=8C=81=E7=8E=B0?= =?UTF-8?q?=E5=9C=BA=E6=81=A2=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 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 2592c0a655..e27414499e 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. * @@ -7866,6 +7941,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; } /** @@ -8006,6 +8091,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