diff --git a/access_token.gni b/access_token.gni index 5629e9fc04e4a0524166ca4c323c4ccf61d5bead..6cc5a1681f3a73bc64a7180381268ac2f99db50a 100644 --- a/access_token.gni +++ b/access_token.gni @@ -24,6 +24,10 @@ module_output_path_service_access_token = module_output_path_unittest_accesstoken = "access_token/access_token" module_output_path_unittest_privacy = "access_token/privacy" +declare_args() { + access_token_camera_float_window_enable = true +} + if (!defined(global_parts_info) || defined(global_parts_info.distributedhardware_device_manager)) { token_sync_enable = true diff --git a/services/privacymanager/BUILD.gn b/services/privacymanager/BUILD.gn index 60f3b7bab8e6c0a769b7bde943e470052b47a4e7..42185c93bb20959bf3e84b8069946f06bdf8f4d0 100644 --- a/services/privacymanager/BUILD.gn +++ b/services/privacymanager/BUILD.gn @@ -241,6 +241,9 @@ if (is_standard_system && ability_base_enable == true) { sources += [ "src/common/privacy_common_event_subscriber.cpp" ] } + if (access_token_camera_float_window_enable) { + cflags_cc += [ "-DCAMERA_FLOAT_WINDOW_ENABLE" ] + } if (access_token_app_security_privacy_service_enable) { cflags_cc += [ "-DAPP_SECURITY_PRIVACY_SERVICE" ] } else { diff --git a/services/privacymanager/src/record/permission_record_manager.cpp b/services/privacymanager/src/record/permission_record_manager.cpp index 01e428e1370928625cd1a003e71ec316a966bc6b..b01b4dc922485a9d8303b877269a9e4ad9820f65 100644 --- a/services/privacymanager/src/record/permission_record_manager.cpp +++ b/services/privacymanager/src/record/permission_record_manager.cpp @@ -998,12 +998,14 @@ void PermissionRecordManager::ExecuteAndUpdateRecord(uint32_t tokenId, int32_t p continue; } +#ifdef CAMERA_FLOAT_WINDOW_ENABLE if ((perm == CAMERA_PERMISSION_NAME) && (status == PERM_ACTIVE_IN_BACKGROUND)) { LOGI(PRI_DOMAIN, PRI_TAG, "Camera float window is close!"); camPermList.emplace_back(perm); ++it; continue; } +#endif // update status to input and timestamp to now in cache auto record = *it;