Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d4b447b3 authored by Lee Shombert's avatar Lee Shombert
Browse files

Add Process.isProcessFrozen()

Add Process.isProcessFrozen(pid, uid).  The method returns true if
/sys/fs/cgroup/[apps,system]/uid_<uid>/pid_<pid>/cgroup.freeze is
readable and contains the character '1'.  Otherwise the method returns
false.  This means that the method returns false if the caller does
not have sufficient privileges.

The method queries the "system" path if the UID is less than 10000.
It queries the "apps" path if the UID >= 10000.

The command "isfrozen <PROCESS>" is now avaiable in the am shell
command.  It prints "true" or "false" depending on the return value
from the new method.

Flag: EXEMPT bugfix
Bug: 409803220
Test: manual test using 'am' commands to freeze, unfreeze, and query
processes.

Change-Id: I27d8a82716d593d4e714e375d79a400381765fa8
parent 43e4a4ec
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment