diff --git a/services/include/concurrent_task_controller.h b/services/include/concurrent_task_controller.h index 4d6e2e6afdb510bc5f788c5a24686a0e40674110..faf442162181b9ab1e14f5d0c7c8cc448b6097e3 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 9d6f03089bc365847331df8b45e3105dbea28275..11d3f1915888d65d40ae0b320281e9600bb6e8d1 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) {