Fix DPM unit tests, also fix a log message.
am: 6ad5f92512
Change-Id: Ieab914cf8538e3086fb32cc351e45e6a5c2017c5
This commit is contained in:
@@ -3029,8 +3029,8 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
|
|||||||
throw new IllegalStateException(e);
|
throw new IllegalStateException(e);
|
||||||
}
|
}
|
||||||
if (ai == null) {
|
if (ai == null) {
|
||||||
throw new IllegalStateException("Couldn't find package to remove admin "
|
throw new IllegalStateException("Couldn't find package: "
|
||||||
+ packageName + " " + userHandle);
|
+ packageName + " on user " + userHandle);
|
||||||
}
|
}
|
||||||
return (ai.flags & ApplicationInfo.FLAG_TEST_ONLY) != 0;
|
return (ai.flags & ApplicationInfo.FLAG_TEST_ONLY) != 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -131,7 +131,7 @@ public abstract class DpmTestBase extends AndroidTestCase {
|
|||||||
|
|
||||||
doReturn(ai).when(mMockContext.ipackageManager).getApplicationInfo(
|
doReturn(ai).when(mMockContext.ipackageManager).getApplicationInfo(
|
||||||
eq(admin.getPackageName()),
|
eq(admin.getPackageName()),
|
||||||
eq(PackageManager.GET_DISABLED_UNTIL_USED_COMPONENTS),
|
anyInt(),
|
||||||
eq(UserHandle.getUserId(packageUid)));
|
eq(UserHandle.getUserId(packageUid)));
|
||||||
|
|
||||||
// Set up queryBroadcastReceivers().
|
// Set up queryBroadcastReceivers().
|
||||||
|
|||||||
Reference in New Issue
Block a user