Change expected userId for mock for emulation
The userId changes when emulation is on where the userId becomes 10 instead of 0. Bug: 236727647 Test: atest com.android.server.devicepolicy.DevicePolicyManagerTest#testIsUninstallBlocked_financeDo_success Change-Id: I48752308cdcab9523939f979904ffa9b2493aa1c
This commit is contained in:
@@ -7846,7 +7846,7 @@ public class DevicePolicyManagerTest extends DpmTestBase {
|
||||
setDeviceOwner();
|
||||
dpm.setDeviceOwnerType(admin1, DEVICE_OWNER_TYPE_FINANCED);
|
||||
when(getServices().ipackageManager.getBlockUninstallForUser(
|
||||
eq(packageName), eq(UserHandle.USER_SYSTEM)))
|
||||
eq(packageName), eq(UserHandle.getCallingUserId())))
|
||||
.thenReturn(true);
|
||||
|
||||
assertThat(dpm.isUninstallBlocked(admin1, packageName)).isTrue();
|
||||
|
||||
Reference in New Issue
Block a user