适配createAssetsForApp接口入参变更

Signed-off-by: pengpeng7872 <2285070166@qq.com>
This commit is contained in:
pengpeng7872
2025-08-11 15:46:24 +08:00
parent 0eac32332b
commit 0306fb49cc
@@ -33,6 +33,7 @@ export struct SaveUIExtensionPage {
private bundleName: string = '';
private appName: string = '';
private appId: number = 0;
private tokenId: number = 0;
private photoTypeArray: photoAccessHelper.PhotoType[] = [];
private srcFileUris: Array<photoAccessHelper.PhotoCreationConfig> = [];
private title: string = 'app.string.third_save_dialog_picture_and_video';
@@ -153,6 +154,7 @@ export struct SaveUIExtensionPage {
this.bundleName = this.wantParam?.bundleName as string;
this.appName = this.wantParam?.appName as string;
this.appId = this.wantParam?.appId as number;
this.tokenId = this.wantParam?.['ohos.aafwk.param.callerToken'] as number;
let titleArray = this.wantParam?.titleArray as string[];
let extensionArray = this.wantParam?.extensionArray as string[];
let photoTypeArray = this.wantParam?.photoTypeArray as photoAccessHelper.PhotoType[];
@@ -210,7 +212,7 @@ export struct SaveUIExtensionPage {
try {
let phAccessHelper = photoAccessHelper.getPhotoAccessHelper(this.context);
let result: string[] =
await phAccessHelper.createAssetsForApp(this.bundleName, this.appName, this.appId, this.srcFileUris);
await phAccessHelper.createAssetsForApp(this.bundleName, this.appName, this.tokenId, this.srcFileUris);
Log.info(TAG, `Photo agentCreateAssets: ${JSON.stringify(result)}`);
return result;
} catch (err) {