Use new RestrictedLockUtils API

This is made necessary by changes to the SystemAPI the lib relies on.

Test: RunSettingsRoboTests
Bug: 116798569
Change-Id: I2812ce9e58e3fb15a5579ddc10cd0edf33d0ed44
This commit is contained in:
Philip P. Moltmann
2018-10-08 10:46:04 -07:00
parent 1e80322df8
commit 035ea3b0d1
9 changed files with 64 additions and 25 deletions

View File

@@ -43,7 +43,7 @@ public class ActionDisabledByAdminDialogTest {
public void testGetAdminDetailsFromIntent() {
final int userId = 123;
final ComponentName component = new ComponentName("com.some.package", ".SomeClass");
final EnforcedAdmin expectedAdmin = new EnforcedAdmin(component, userId);
final EnforcedAdmin expectedAdmin = new EnforcedAdmin(component, UserHandle.of(userId));
final Intent intent = new Intent();
intent.putExtra(DevicePolicyManager.EXTRA_DEVICE_ADMIN, component);
@@ -54,7 +54,7 @@ public class ActionDisabledByAdminDialogTest {
@Test
public void testGetAdminDetailsFromNullIntent() {
final int userId = UserHandle.myUserId();
final EnforcedAdmin expectedAdmin = new EnforcedAdmin(null, userId);
final EnforcedAdmin expectedAdmin = new EnforcedAdmin(null, UserHandle.of(userId));
Assert.assertEquals(expectedAdmin, mDialog.getAdminDetailsFromIntent(null));
}