Fix test failures under com.android.settings.dashboard
Bug: 313569889 Test: atest Change-Id: I44fc992be9a79681d97e573437761e379ecd1a0f
This commit is contained in:
@@ -21,6 +21,7 @@ import static android.os.UserManager.USER_TYPE_PROFILE_PRIVATE;
|
||||
|
||||
import android.annotation.UserIdInt;
|
||||
import android.content.pm.UserInfo;
|
||||
import android.content.pm.UserProperties;
|
||||
import android.os.Bundle;
|
||||
import android.os.UserHandle;
|
||||
import android.os.UserManager;
|
||||
@@ -156,6 +157,12 @@ public class ShadowUserManager extends org.robolectric.shadows.ShadowUserManager
|
||||
mDefaultGuestUserRestriction = restrictions;
|
||||
}
|
||||
|
||||
@Implementation
|
||||
protected UserProperties getUserProperties(UserHandle userHandle) {
|
||||
return new UserProperties.Builder().build();
|
||||
}
|
||||
|
||||
|
||||
public void addGuestUserRestriction(String restriction) {
|
||||
mDefaultGuestUserRestriction.putBoolean(restriction, true);
|
||||
}
|
||||
|
Reference in New Issue
Block a user