diff --git a/frameworks/accesstoken/include/hap_policy_parcel.h b/frameworks/accesstoken/include/hap_policy_parcel.h index 43562c09cefb46db268b65fa7e84019af4ace66f..ceafe550f57fb38d449bb812b9977518102ba480 100644 --- a/frameworks/accesstoken/include/hap_policy_parcel.h +++ b/frameworks/accesstoken/include/hap_policy_parcel.h @@ -17,8 +17,7 @@ #define HAP_POLICY_PARCEL_H #include "hap_token_info.h" -#include "permission_def_parcel.h" -#include "permission_state_full_parcel.h" +#include "parcel.h" namespace OHOS { namespace Security { diff --git a/frameworks/accesstoken/src/hap_policy_parcel.cpp b/frameworks/accesstoken/src/hap_policy_parcel.cpp index 7d4ed108c5b2f391937b372bee2cb97daec1a8ef..a437e4614c2d7cce60fe17866b24065bccff4af3 100644 --- a/frameworks/accesstoken/src/hap_policy_parcel.cpp +++ b/frameworks/accesstoken/src/hap_policy_parcel.cpp @@ -14,7 +14,13 @@ */ #include "hap_policy_parcel.h" +#include "refbase.h" +#include "access_token.h" #include "parcel_utils.h" +#include "permission_def.h" +#include "permission_def_parcel.h" +#include "permission_state_full.h" +#include "permission_state_full_parcel.h" namespace OHOS { namespace Security { diff --git a/frameworks/accesstoken/src/hap_token_info_for_sync_parcel.cpp b/frameworks/accesstoken/src/hap_token_info_for_sync_parcel.cpp index 769bf40465972045dc29cf01043c0205c7170855..17b04b3a53e3154c28d2af7b6e8fb9107cec6bac 100644 --- a/frameworks/accesstoken/src/hap_token_info_for_sync_parcel.cpp +++ b/frameworks/accesstoken/src/hap_token_info_for_sync_parcel.cpp @@ -14,8 +14,10 @@ */ #include "hap_token_info_for_sync_parcel.h" +#include "refbase.h" #include "hap_token_info_parcel.h" #include "parcel_utils.h" +#include "permission_state_full.h" #include "permission_state_full_parcel.h" namespace OHOS { diff --git a/frameworks/accesstoken/src/native_token_info_for_sync_parcel.cpp b/frameworks/accesstoken/src/native_token_info_for_sync_parcel.cpp index cfbddc9f7a412309d59664c10b59877408df9243..6b0f65ed6b380b7a1f61f755cad17755df6b87a5 100644 --- a/frameworks/accesstoken/src/native_token_info_for_sync_parcel.cpp +++ b/frameworks/accesstoken/src/native_token_info_for_sync_parcel.cpp @@ -14,8 +14,10 @@ */ #include "native_token_info_for_sync_parcel.h" +#include "refbase.h" #include "native_token_info_parcel.h" #include "parcel_utils.h" +#include "permission_state_full.h" #include "permission_state_full_parcel.h" namespace OHOS { diff --git a/frameworks/accesstoken/src/native_token_info_parcel.cpp b/frameworks/accesstoken/src/native_token_info_parcel.cpp index ce55f5f57f99e5fef755c01453f78d698921e5b1..d48c7fbd8f08c2f1d2477b88af54a7188e719add 100644 --- a/frameworks/accesstoken/src/native_token_info_parcel.cpp +++ b/frameworks/accesstoken/src/native_token_info_parcel.cpp @@ -14,6 +14,11 @@ */ #include "native_token_info_parcel.h" +#include +#include +#include +#include +#include "access_token.h" #include "parcel_utils.h" namespace OHOS { diff --git a/frameworks/common/include/constant_common.h b/frameworks/common/include/constant_common.h index f520054fc8476c804a310f20e67990b830265643..8651f5d4e77c956572bfb92bd1cbb4c724d6fc9e 100644 --- a/frameworks/common/include/constant_common.h +++ b/frameworks/common/include/constant_common.h @@ -16,7 +16,7 @@ #define FRAMEWORK_CONSTANT_COMMON_H #include -#include +#include namespace OHOS { namespace Security { diff --git a/frameworks/common/src/constant_common.cpp b/frameworks/common/src/constant_common.cpp index 35a9fbf0840674a13e35e2563fd558cc416214a5..736a66ce0f070143bc4f4840f37a0d1923243807 100644 --- a/frameworks/common/src/constant_common.cpp +++ b/frameworks/common/src/constant_common.cpp @@ -12,7 +12,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + #include "constant_common.h" +#include #include "parameter.h" namespace OHOS { diff --git a/frameworks/privacy/src/bundle_used_record_parcel.cpp b/frameworks/privacy/src/bundle_used_record_parcel.cpp index 179ea569a939bc4521cc3f944e8777a5d61d34bb..529c386e17179df14f2324847ead17459c1dda8f 100644 --- a/frameworks/privacy/src/bundle_used_record_parcel.cpp +++ b/frameworks/privacy/src/bundle_used_record_parcel.cpp @@ -14,6 +14,7 @@ */ #include "bundle_used_record_parcel.h" +#include "refbase.h" #include "parcel_utils.h" #include "permission_used_record_parcel.h" diff --git a/frameworks/privacy/src/permission_used_record_parcel.cpp b/frameworks/privacy/src/permission_used_record_parcel.cpp index a2a7a1e94fa644237b4f45ee7b0299f75406d2cb..135e4a918100c15603ab8dd0ddb1c71125eb1f3f 100644 --- a/frameworks/privacy/src/permission_used_record_parcel.cpp +++ b/frameworks/privacy/src/permission_used_record_parcel.cpp @@ -14,6 +14,7 @@ */ #include "permission_used_record_parcel.h" +#include "refbase.h" #include "parcel_utils.h" #include "used_record_detail_parcel.h" diff --git a/frameworks/privacy/src/permission_used_result_parcel.cpp b/frameworks/privacy/src/permission_used_result_parcel.cpp index 88f9abf57f1e16cbf9bbf0eaf65497fe54f25470..8dec895ab8d786c5a46d28ffe4179d515d608cb2 100644 --- a/frameworks/privacy/src/permission_used_result_parcel.cpp +++ b/frameworks/privacy/src/permission_used_result_parcel.cpp @@ -14,6 +14,7 @@ */ #include "permission_used_result_parcel.h" +#include "refbase.h" #include "bundle_used_record_parcel.h" #include "parcel_utils.h" diff --git a/interfaces/innerkits/accesstoken/src/accesstoken_death_recipient.cpp b/interfaces/innerkits/accesstoken/src/accesstoken_death_recipient.cpp index cd00a54776ab3d28f760cf2a6885e85a6689281f..d0608aaccf53944493865818696bc65e3c965eb3 100644 --- a/interfaces/innerkits/accesstoken/src/accesstoken_death_recipient.cpp +++ b/interfaces/innerkits/accesstoken/src/accesstoken_death_recipient.cpp @@ -13,7 +13,6 @@ * limitations under the License. */ #include "accesstoken_death_recipient.h" - #include "accesstoken_log.h" #include "accesstoken_manager_client.h" diff --git a/interfaces/innerkits/accesstoken/src/accesstoken_kit.cpp b/interfaces/innerkits/accesstoken/src/accesstoken_kit.cpp index a20496aa740e0cc921ca226710eea0835b055272..8168fcb952830d41a1e2f91fe18cfb2212dd1a24 100644 --- a/interfaces/innerkits/accesstoken/src/accesstoken_kit.cpp +++ b/interfaces/innerkits/accesstoken/src/accesstoken_kit.cpp @@ -14,14 +14,14 @@ */ #include "accesstoken_kit.h" - #include #include - #include "accesstoken_log.h" #include "accesstoken_manager_client.h" #include "constant_common.h" #include "data_validator.h" +#include "hap_token_info.h" +#include "permission_def.h" namespace OHOS { namespace Security { diff --git a/interfaces/innerkits/nativetoken/include/nativetoken.h b/interfaces/innerkits/nativetoken/include/nativetoken.h index dc71d3888e53901c094f0b34747fc38c60d15294..7c3c9f9be0143fdc850f6ec2d85c05aecf08ef5c 100644 --- a/interfaces/innerkits/nativetoken/include/nativetoken.h +++ b/interfaces/innerkits/nativetoken/include/nativetoken.h @@ -13,17 +13,7 @@ * limitations under the License. */ -#include -#include #include -#include -#include -#include -#include - -#include "cJSON.h" -#include "securec.h" -#include "nativetoken_log.h" #ifndef NATIVE_TOKEN_H #define NATIVE_TOKEN_H diff --git a/interfaces/innerkits/nativetoken/include/nativetoken_json_oper.h b/interfaces/innerkits/nativetoken/include/nativetoken_json_oper.h index ef2146922ea412a2fd80a72118c696b5a430c645..820f56581be6a542587f5b3a5baff8048f93ea83 100644 --- a/interfaces/innerkits/nativetoken/include/nativetoken_json_oper.h +++ b/interfaces/innerkits/nativetoken/include/nativetoken_json_oper.h @@ -14,13 +14,8 @@ */ #include -#include -#include - #include "cJSON.h" -#include "securec.h" #include "nativetoken.h" -#include "nativetoken_log.h" #ifndef NATIVETOKEN_JSON_OPER_H #define NATIVETOKEN_JSON_OPER_H diff --git a/interfaces/innerkits/nativetoken/src/nativetoken.c b/interfaces/innerkits/nativetoken/src/nativetoken.c index 89c507868d9fb5e91e4f2b019b5d75c573e3be74..8a58d5fb5a40b7831f9d41692210f3fde2b504d5 100644 --- a/interfaces/innerkits/nativetoken/src/nativetoken.c +++ b/interfaces/innerkits/nativetoken/src/nativetoken.c @@ -18,8 +18,18 @@ #include #endif // WITH_SELINUX +#include +#include +#include +#include +#include +#include +#include +#include "securec.h" #include "nativetoken_json_oper.h" #include "nativetoken_kit.h" +#include "nativetoken_log.h" + NativeTokenList *g_tokenListHead; int32_t g_isNativeTokenInited = 0; diff --git a/interfaces/innerkits/nativetoken/src/nativetoken_json_oper.c b/interfaces/innerkits/nativetoken/src/nativetoken_json_oper.c index 7921b36cea88008651fa5a11f3d7f25ea0021c61..25062d1b7715470920cb20b7fc44610507b696b8 100644 --- a/interfaces/innerkits/nativetoken/src/nativetoken_json_oper.c +++ b/interfaces/innerkits/nativetoken/src/nativetoken_json_oper.c @@ -13,6 +13,10 @@ * limitations under the License. */ #include "nativetoken_json_oper.h" +#include +#include +#include +#include "nativetoken_log.h" void FreeStrArray(char **arr, int32_t num) { diff --git a/interfaces/innerkits/nativetoken/test/unittest/src/nativetoken_kit_test.cpp b/interfaces/innerkits/nativetoken/test/unittest/src/nativetoken_kit_test.cpp index f13cf2b45be685c28eabb7b52a3f4ae35f4b2ecf..d9f9827e0a267992c43f97d8ae1ede2235d44ff2 100644 --- a/interfaces/innerkits/nativetoken/test/unittest/src/nativetoken_kit_test.cpp +++ b/interfaces/innerkits/nativetoken/test/unittest/src/nativetoken_kit_test.cpp @@ -14,7 +14,10 @@ */ #include "nativetoken_kit_test.h" +#include +#include #include +#include "securec.h" #include "nativetoken.h" #include "nativetoken_kit.h" diff --git a/interfaces/innerkits/token_setproc/src/token_setproc.c b/interfaces/innerkits/token_setproc/src/token_setproc.c index da5dd2a1afe5edacb8ae3e9079fc764cd41598bd..8ca00b88117b06ceaaa075a6ac7b3874d828a4d2 100644 --- a/interfaces/innerkits/token_setproc/src/token_setproc.c +++ b/interfaces/innerkits/token_setproc/src/token_setproc.c @@ -16,11 +16,9 @@ #include "token_setproc.h" #include -#include -#include +#include #include #include -#include #define ACCESS_TOKEN_ID_IOCTL_BASE 'A'