Merge "Put the current user to mUsers in UserManagerServiceTest." into udc-qpr-dev am: 837bd198df

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/23874249

Change-Id: Id67709317b6c492b591388659c55c7a0476acd4b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Treehugger Robot
2023-07-02 14:39:32 +00:00
committed by Automerger Merge Worker

View File

@@ -70,6 +70,9 @@ public class UserManagerServiceTest {
LocalServices.removeServiceForTest(UserManagerInternal.class); LocalServices.removeServiceForTest(UserManagerInternal.class);
mUserManagerService = new UserManagerService(InstrumentationRegistry.getContext()); mUserManagerService = new UserManagerService(InstrumentationRegistry.getContext());
// Put the current user to mUsers. UMS can't find userlist.xml, and fallbackToSingleUserLP.
mUserManagerService.putUserInfo(
new UserInfo(ActivityManager.getCurrentUser(), "Current User", 0));
restrictionsFile = new File(mContext.getCacheDir(), "restrictions.xml"); restrictionsFile = new File(mContext.getCacheDir(), "restrictions.xml");
restrictionsFile.delete(); restrictionsFile.delete();