From 86aea3524af23bb858cafac743c632eed29ebfcc Mon Sep 17 00:00:00 2001 From: wuzhihuitmac Date: Thu, 21 Mar 2024 09:45:06 +0000 Subject: [PATCH] native permission modify Signed-off-by: wuzhihuitmac Change-Id: I44f2588782953faae236a0f99ace908607e22bf0 --- test/unittest/light/light_agent_test.cpp | 12 +----------- test/unittest/vibrator/capi/vibrator_test.cpp | 12 +----------- .../unittest/vibrator/native/vibrator_agent_test.cpp | 12 +----------- 3 files changed, 3 insertions(+), 33 deletions(-) diff --git a/test/unittest/light/light_agent_test.cpp b/test/unittest/light/light_agent_test.cpp index 4dd677f..1535369 100644 --- a/test/unittest/light/light_agent_test.cpp +++ b/test/unittest/light/light_agent_test.cpp @@ -33,16 +33,6 @@ using Security::AccessToken::AccessTokenID; namespace { constexpr int32_t TIME_WAIT_FOR_OP = 2; -PermissionDef g_infoManagerTestPermDef = { - .permissionName = "ohos.permission.SYSTEM_LIGHT_CONTROL", - .bundleName = "accesstoken_test", - .grantMode = 1, - .label = "label", - .labelId = 1, - .description = "test light agent", - .descriptionId = 1, - .availableLevel = APL_NORMAL -}; PermissionStateFull g_infoManagerTestState = { .grantFlags = {1}, @@ -55,7 +45,7 @@ PermissionStateFull g_infoManagerTestState = { HapPolicyParams g_infoManagerTestPolicyPrams = { .apl = APL_NORMAL, .domain = "test.domain", - .permList = {g_infoManagerTestPermDef}, + .permList = {}, .permStateList = {g_infoManagerTestState} }; diff --git a/test/unittest/vibrator/capi/vibrator_test.cpp b/test/unittest/vibrator/capi/vibrator_test.cpp index c71d38a..34d6aea 100644 --- a/test/unittest/vibrator/capi/vibrator_test.cpp +++ b/test/unittest/vibrator/capi/vibrator_test.cpp @@ -37,16 +37,6 @@ using Security::AccessToken::AccessTokenID; namespace { uint32_t g_duration = 300; constexpr int32_t TIME_WAIT_FOR_OP = 2; -PermissionDef infoManagerTestPermDef_ = { - .permissionName = "ohos.permission.VIBRATE", - .bundleName = "accesstoken_test", - .grantMode = 1, - .label = "label", - .labelId = 1, - .description = "native vibrator test", - .descriptionId = 1, - .availableLevel = APL_NORMAL -}; PermissionStateFull infoManagerTestState_ = { .grantFlags = {1}, @@ -59,7 +49,7 @@ PermissionStateFull infoManagerTestState_ = { HapPolicyParams infoManagerTestPolicyPrams_ = { .apl = APL_NORMAL, .domain = "test.domain", - .permList = {infoManagerTestPermDef_}, + .permList = {}, .permStateList = {infoManagerTestState_} }; diff --git a/test/unittest/vibrator/native/vibrator_agent_test.cpp b/test/unittest/vibrator/native/vibrator_agent_test.cpp index 7fd4d5d..b21f11f 100644 --- a/test/unittest/vibrator/native/vibrator_agent_test.cpp +++ b/test/unittest/vibrator/native/vibrator_agent_test.cpp @@ -39,16 +39,6 @@ namespace { constexpr int32_t TIME_WAIT_FOR_OP = 2; const std::string PHONE_TYPE = "phone"; std::string g_deviceType; -PermissionDef g_infoManagerTestPermDef = { - .permissionName = "ohos.permission.VIBRATE", - .bundleName = "accesstoken_test", - .grantMode = 1, - .label = "label", - .labelId = 1, - .description = "test vibrator agent", - .descriptionId = 1, - .availableLevel = APL_NORMAL -}; PermissionStateFull g_infoManagerTestState = { .grantFlags = {1}, @@ -61,7 +51,7 @@ PermissionStateFull g_infoManagerTestState = { HapPolicyParams g_infoManagerTestPolicyPrams = { .apl = APL_NORMAL, .domain = "test.domain", - .permList = {g_infoManagerTestPermDef}, + .permList = {}, .permStateList = {g_infoManagerTestState} }; -- Gitee