diff --git a/services/include/concurrent_task_controller.h b/services/include/concurrent_task_controller.h index 25e211ac3f32342dbfa23e3c88597a08f626be60..3eb2243318f6ec32f7cc78a5f23e7aa661f6b537 100644 --- a/services/include/concurrent_task_controller.h +++ b/services/include/concurrent_task_controller.h @@ -111,7 +111,7 @@ private: int uniAppRate_ = 0; bool rtgEnabled_ = false; bool configEnable_ = false; - bool rsAuthed_ = false; + int authedRSPid_ = 0; bool ddlSceneSchedSwitch_ = false; bool ddlPowerModeEnable_ = false; bool isVideoApp_ = false; diff --git a/services/src/concurrent_task_controller.cpp b/services/src/concurrent_task_controller.cpp index 24cddd662d8709bbe152fca62c8f2a39c475a3a0..9d9d73b967e78abed9b968e46c1724c2f2b6ceb3 100644 --- a/services/src/concurrent_task_controller.cpp +++ b/services/src/concurrent_task_controller.cpp @@ -216,14 +216,14 @@ void TaskController::QueryRenderService(int uid, IntervalReply& queryRs) void TaskController::QueryRenderServiceMain(int uid, int pid, IntervalReply& queryRs) { - if (GetProcessNameByToken() != RENDER_SERVICE_PROCESS_NAME) { + if (uid != RS_UID) { return; } - if (!rsAuthed_) { + if (authedRSPid_ != pid) { if (AuthSystemProcess(pid) != 0) { return; } - rsAuthed_ = true; + authedRSPid_ = pid; } if (renderServiceMainGrpId_ <= 0) { TryCreateRSMainGrp(); @@ -246,7 +246,7 @@ void TaskController::QueryRenderServiceMain(int uid, int pid, IntervalReply& que void TaskController::QueryRenderServiceRender(int uid, int pid, IntervalReply& queryRs) { - if (GetProcessNameByToken() != RENDER_SERVICE_PROCESS_NAME) { + if (uid != RS_UID) { return; } if (renderServiceRenderGrpId_ <= 0) {