!1137 蜂窝通话权限更改

Merge pull request !1137 from wangziming/master
This commit is contained in:
openharmony_ci 2023-03-20 08:57:42 +00:00 committed by Gitee
commit aafdbcb06c
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 2 additions and 8 deletions

View File

@ -24,10 +24,6 @@ namespace OHOS {
namespace Telephony {
int32_t ImsCoreServiceProxy::GetImsRegistrationStatus(int32_t slotId)
{
if (!TelephonyPermission::CheckPermission(Permission::GET_TELEPHONY_STATE)) {
TELEPHONY_LOGE("[slot%{public}d]Permission denied!", slotId);
return TELEPHONY_ERR_PERMISSION_ERR;
}
MessageParcel in;
if (!in.WriteInterfaceToken(ImsCoreServiceProxy::GetDescriptor())) {
TELEPHONY_LOGE("[slot%{public}d]Write descriptor token fail!", slotId);
@ -54,10 +50,6 @@ int32_t ImsCoreServiceProxy::GetImsRegistrationStatus(int32_t slotId)
int32_t ImsCoreServiceProxy::RegisterImsCoreServiceCallback(const sptr<ImsCoreServiceCallbackInterface> &callback)
{
if (!TelephonyPermission::CheckPermission(Permission::SET_TELEPHONY_STATE)) {
TELEPHONY_LOGE("Permission denied!");
return TELEPHONY_ERR_PERMISSION_ERR;
}
if (callback == nullptr) {
TELEPHONY_LOGE("callback is nullptr!");
return TELEPHONY_ERR_ARGUMENT_INVALID;

View File

@ -37,6 +37,8 @@ static constexpr const char *CELL_LOCATION = "ohos.permission.LOCATION";
static constexpr const char *READ_MESSAGES = "ohos.permission.READ_MESSAGES";
static constexpr const char *SEND_MESSAGES = "ohos.permission.SEND_MESSAGES";
static constexpr const char *RECEIVE_MESSAGES = "ohos.permission.RECEIVE_SMS";
static constexpr const char *CONNECT_CELLULAR_CALL_SERVICE = "ohos.permission.CONNECT_CELLULAR_CALL_SERVICE";
static constexpr const char *CONNECT_IMS_SERVICE = "ohos.permission.CONNECT_IMS_SERVICE";
} // namespace Permission
class TelephonyPermission {