Fix DPM unit tests, also fix a log message. am: 6ad5f92512

am: 2f78ab5387

Change-Id: Id42c0cda2542eb5cc2325d8c6747e8bbe7d3a1ef
This commit is contained in:
Makoto Onuki
2016-09-23 15:46:37 +00:00
committed by android-build-merger
2 changed files with 3 additions and 3 deletions

View File

@@ -3029,8 +3029,8 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
throw new IllegalStateException(e);
}
if (ai == null) {
throw new IllegalStateException("Couldn't find package to remove admin "
+ packageName + " " + userHandle);
throw new IllegalStateException("Couldn't find package: "
+ packageName + " on user " + userHandle);
}
return (ai.flags & ApplicationInfo.FLAG_TEST_ONLY) != 0;
}

View File

@@ -131,7 +131,7 @@ public abstract class DpmTestBase extends AndroidTestCase {
doReturn(ai).when(mMockContext.ipackageManager).getApplicationInfo(
eq(admin.getPackageName()),
eq(PackageManager.GET_DISABLED_UNTIL_USED_COMPONENTS),
anyInt(),
eq(UserHandle.getUserId(packageUid)));
// Set up queryBroadcastReceivers().