mirror of
https://gitee.com/openharmony/filemanagement_storage_service
synced 2024-11-23 06:59:59 +00:00
!1482 NotifyMtpMounted,NotifyMtpUnmounted接口新增权限校验
Merge pull request !1482 from 李尚/master
This commit is contained in:
commit
57a7317cbb
@ -1232,6 +1232,10 @@ int32_t StorageManagerStub::HandleUMountDfsDocs(MessageParcel &data, MessageParc
|
||||
|
||||
int32_t StorageManagerStub::HandleNotifyMtpMount(MessageParcel &data, MessageParcel &reply)
|
||||
{
|
||||
if (!CheckClientPermission(PERMISSION_STORAGE_MANAGER)) {
|
||||
return E_PERMISSION_DENIED;
|
||||
}
|
||||
|
||||
std::string id = data.ReadString();
|
||||
std::string path = data.ReadString();
|
||||
std::string desc = data.ReadString();
|
||||
@ -1248,6 +1252,10 @@ int32_t StorageManagerStub::HandleNotifyMtpMount(MessageParcel &data, MessagePar
|
||||
|
||||
int32_t StorageManagerStub::HandleNotifyMtpUnmount(MessageParcel &data, MessageParcel &reply)
|
||||
{
|
||||
if (!CheckClientPermission(PERMISSION_STORAGE_MANAGER)) {
|
||||
return E_PERMISSION_DENIED;
|
||||
}
|
||||
|
||||
std::string id = data.ReadString();
|
||||
std::string path = data.ReadString();
|
||||
int32_t err = NotifyMtpUnmounted(id, path);
|
||||
|
Loading…
Reference in New Issue
Block a user