Fix multiuser freeze-kills

If killPackageProcessesLSP is called with userId = -1
(UserHandle.USER_ALL) then the processes that we attempt to kill can
belong to multiple package UIDs for different users. However we only
attempt to freeze one package UID for all of the processes that get
killed. The freezing and killing logic needs to be reorganized to
ensure that the appropriate user-specific package UID is frozen for
each process kill.

Bug: 316198981
Test: CtsMultiUserTestCases
Change-Id: I5bc2111a8df031dd7aa964103d71a28e238e4e90
1 file changed