Fix a bug where the wrong profile is queried
UserManager#isManagedProfile() is not aware of the user handle of the context the UM instance is created on. Instead, call isManagedProfile(int). Bug: 183625645 Test: ConnectivityServiceTest Change-Id: I1fef22d67d75df25a8c2d0694f857c3e1c1a1306
This commit is contained in:
@@ -572,6 +572,7 @@ public class ConnectivityServiceTest {
|
||||
final UserManager umMock = createContextAsUser(userHandle, 0 /* flags */)
|
||||
.getSystemService(UserManager.class);
|
||||
doReturn(value).when(umMock).isManagedProfile();
|
||||
doReturn(value).when(mUserManager).isManagedProfile(eq(userHandle.getIdentifier()));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user