Fix 4 broken work profile tests
Commit 2953f31b61
skipped
RunSettingsRoboTests. The tests started failing because
WorkSoundPreferenceController calls UserManager.isUserUnlocked(int) now
which is not implemented in robolectric.
Fixed by adding a wrapper method to AudioHelper.
Fix: 34819603
Test: make RunSettingsRoboTests
Change-Id: Ia79cc4def9442706752f7e7b9a895ffa8150fd9d
This commit is contained in:
@@ -42,6 +42,10 @@ public class AudioHelper {
|
||||
return Utils.getManagedProfileId(um, UserHandle.myUserId());
|
||||
}
|
||||
|
||||
public boolean isUserUnlocked(UserManager um, @UserIdInt int userId) {
|
||||
return um.isUserUnlocked(userId);
|
||||
}
|
||||
|
||||
public Context createPackageContextAsUser(@UserIdInt int profileId) {
|
||||
return Utils.createPackageContextAsUser(mContext, profileId);
|
||||
}
|
||||
|
Reference in New Issue
Block a user