diff --git a/interfaces/kits/js/ani/file_cloud_sync/ets/@ohos.file.cloudSync.ets b/interfaces/kits/js/ani/file_cloud_sync/ets/@ohos.file.cloudSync.ets index 657a7d43fd11508e307499b0f7b9dbbb9c379485..6ddd13fe998f640d9661b91b2b05d84584492fae 100644 --- a/interfaces/kits/js/ani/file_cloud_sync/ets/@ohos.file.cloudSync.ets +++ b/interfaces/kits/js/ani/file_cloud_sync/ets/@ohos.file.cloudSync.ets @@ -59,7 +59,7 @@ export default namespace cloudSync { export class GallerySync { static { - loadLibrary("cloud_sync_ani"); + loadLibraryWithPermissionCheck("cloud_sync_ani", "@ohos.file.cloudSync"); } private nativePtr: long = 0; native constructor(); @@ -186,7 +186,7 @@ export default namespace cloudSync { export class MultiDownloadProgress { static { - loadLibrary("cloud_sync_ani"); + loadLibraryWithPermissionCheck("cloud_sync_ani", "@ohos.file.cloudSync"); } state: State; taskId: number; @@ -212,7 +212,7 @@ export default namespace cloudSync { export class Download { static { - loadLibrary("cloud_sync_ani"); + loadLibraryWithPermissionCheck("cloud_sync_ani", "@ohos.file.cloudSync"); } private nativePtr: long = 0; native constructor(); @@ -360,7 +360,7 @@ export default namespace cloudSync { export class FileSync { static { - loadLibrary("cloud_sync_ani"); + loadLibraryWithPermissionCheck("cloud_sync_ani", "@ohos.file.cloudSync"); } private nativePtr: long = 0; native constructor(); @@ -464,7 +464,7 @@ export default namespace cloudSync { export class CloudFileCache { static { - loadLibrary("cloud_sync_ani"); + loadLibraryWithPermissionCheck("cloud_sync_ani", "@ohos.file.cloudSync"); } private nativePtr: long = 0; native constructor(); @@ -635,7 +635,7 @@ export default namespace cloudSync { class StaticFunction { static { - loadLibrary("cloud_sync_ani"); + loadLibraryWithPermissionCheck("cloud_sync_ani", "@ohos.file.cloudSync"); } static native getFileSyncStateInner(uri: string): int; static native getCoreFileSyncStateInner(uri: string): int; @@ -806,7 +806,7 @@ export default namespace cloudSync { export class FileVersion { static { - loadLibrary("cloud_sync_ani"); + loadLibraryWithPermissionCheck("cloud_sync_ani", "@ohos.file.cloudSync"); } private nativePtr: long = 0; native constructor(); diff --git a/interfaces/kits/js/ani/file_cloud_sync_manager/ets/@ohos.file.cloudSyncManager.ets b/interfaces/kits/js/ani/file_cloud_sync_manager/ets/@ohos.file.cloudSyncManager.ets index 98a6fb5c096692f00065b35c1a92ce152a9b89c7..d92b19c8cba70f8c32057a89e43230723c44c8f0 100644 --- a/interfaces/kits/js/ani/file_cloud_sync_manager/ets/@ohos.file.cloudSyncManager.ets +++ b/interfaces/kits/js/ani/file_cloud_sync_manager/ets/@ohos.file.cloudSyncManager.ets @@ -117,7 +117,7 @@ export default namespace cloudSyncManager { export class DowngradeDownload { static { - loadLibrary("cloud_sync_manager_ani"); + loadLibraryWithPermissionCheck("cloud_sync_manager_ani", "@ohos.file.cloudSyncManager"); } private nativePtr: long = 0; native constructor(bundleName: string); @@ -190,7 +190,7 @@ export default namespace cloudSyncManager { class StaticFunction { static { - loadLibrary("cloud_sync_manager_ani"); + loadLibraryWithPermissionCheck("cloud_sync_manager_ani", "@ohos.file.cloudSyncManager"); } static native changeAppCloudSwitchInner(accountId: string, bundleName: string, status: boolean): void; static native notifyDataChangeInner(accountId: string, bundleName: string): void;