Update data types to support cross user suspension
This CL is a refactoring for the follow-up implementation and shouldn't
change any behavior. It changes the data types and signatures to allow
expressing cross-profile suspension and refactors the code to make
adding a flagged functionality change easier in a follow-up. Some
changes only make sense in that contex.
String package is replaced with UserPackage, which encapsulates both
suspending user id and suspending package. In this CL suspending user
id is always the same as target user id, so suspension is never cross
user.
Some userId arguments were renamed to make it clearer whether it refers
to the suspending user or the target user.
Brief doc: go/ae-xu-suspend
Also inline setPackagesSuspendedByAdmin into PMII
Bug: 263464464
Test: atest PackageManagerSettingsTests
Test: atest PackageUserStateTest
Test: atest com.android.server.pm.SuspendPackageHelperTest
Test: atest CtsSuspendAppsTestCases
Test: atest WmTests:ActivityStartInterceptorTest
Change-Id: I71a4c524fb22fc3d3e0c64fd0b984ea44423b5d8
28 files changed