From 39ab95a4dff6d6a322c97e3c775bcc7ed01fa6b0 Mon Sep 17 00:00:00 2001 From: zhouyan Date: Thu, 17 Jul 2025 16:07:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dpc=E4=BA=A7=E5=93=81=E7=9B=B8?= =?UTF-8?q?=E6=9C=BA=E4=BD=BF=E7=94=A8=E8=BF=87=E7=A8=8B=E4=B8=AD=E5=88=87?= =?UTF-8?q?=E5=90=8E=E5=8F=B0=E4=B8=94=E6=97=A0=E7=94=BB=E4=B8=AD=E7=94=BB?= =?UTF-8?q?=E6=97=B6=E6=96=AD=E6=B5=81=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhouyan Change-Id: I9c5d497d97c9dea9697ba88b308ef775ac391359 --- access_token.gni | 4 ++++ services/privacymanager/BUILD.gn | 3 +++ .../privacymanager/src/record/permission_record_manager.cpp | 2 ++ 3 files changed, 9 insertions(+) diff --git a/access_token.gni b/access_token.gni index 5629e9fc0..6cc5a1681 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 60f3b7bab..42185c93b 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 01e428e13..b01b4dc92 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; -- Gitee