Reland "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 Original CL ag/25262282 lacked null check in SuspendedAppActivity.createSuspendedAppInterceptIntent() and caused b/316388832. Bug: 263464464 Test: atest PackageManagerSettingsTests Test: atest PackageUserStateTest Test: atest com.android.server.pm.SuspendPackageHelperTest Test: atest CtsSuspendAppsTestCases Test: atest WmTests:ActivityStartInterceptorTest Test: make PlatformScenarioTests \ && adb install -r -g \ out/target/product/bluejay/testcases/PlatformScenarioTests/arm64/PlatformScenarioTests.apk \ && adb shell am instrument \ -w -e class android.platform.test.scenario.clock.HotAppLaunchFromHomeScreen \ -e listener android.device.collectors.AppStartupListener \ android.platform.test.scenario/androidx.test.runner.AndroidJUnitRunner Change-Id: I65507733276dea848d0860a8350260bdf4820c61
Loading
Please register or sign in to comment