mirror of
https://github.com/openharmony/applications_photos.git
synced 2026-07-01 13:17:23 -04:00
适配createAssetsForApp接口入参变更
Signed-off-by: pengpeng7872 <2285070166@qq.com>
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user