Manish Singh
2023-09-28 12:02:21 +01:00
parent a223c7644e
commit 6efc455f2c
32 changed files with 954 additions and 162 deletions

View File

@@ -17,6 +17,7 @@
package com.android.settings.testutils.shadow;
import static android.os.Build.VERSION_CODES.LOLLIPOP;
import static android.os.UserManager.USER_TYPE_PROFILE_PRIVATE;
import android.annotation.UserIdInt;
import android.content.pm.UserInfo;
@@ -223,6 +224,10 @@ public class ShadowUserManager extends org.robolectric.shadows.ShadowUserManager
mManagedProfiles.addAll(profileIds);
}
public void setPrivateProfile(int id, String name, int flags) {
mUserProfileInfos.add(new UserInfo(id, name, null, flags, USER_TYPE_PROFILE_PRIVATE));
}
public void setUserSwitcherEnabled(boolean userSwitchEnabled) {
mUserSwitchEnabled = userSwitchEnabled;
}