lmkd: Set task profiles to the entire process

set_process_group_and_prio sets task profiles for each thread in the
process separately. This can be avoided by setting task profiles to
the entire process using its pid.

Bug: 215557553
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: I9c1917172019a42809385f6c9c084b8cb343b520
diff --git a/lmkd.cpp b/lmkd.cpp
index b028d2c..7e23f77 100644
--- a/lmkd.cpp
+++ b/lmkd.cpp
@@ -2088,7 +2088,7 @@
             continue;
         }
 
-        if (reaper.kill({ target.pidfd, target.pid }, true) == 0) {
+        if (reaper.kill({ target.pidfd, target.pid, target.uid }, true) == 0) {
             ALOGW("lmkd watchdog killed process %d, oom_score_adj %d", target.pid, oom_score);
             killinfo_log(&target, 0, 0, 0, NULL, NULL, NULL, NULL);
             break;
@@ -2260,7 +2260,7 @@
     trace_kill_start(pid, desc);
 
     start_wait_for_proc_kill(pidfd < 0 ? pid : pidfd);
-    kill_result = reaper.kill({ pidfd, pid }, false);
+    kill_result = reaper.kill({ pidfd, pid, uid }, false);
 
     trace_kill_end();