Merge "Fix DPM unit tests, also fix a log message." into nyc-mr1-dev

This commit is contained in:
Makoto Onuki
2016-09-23 15:34:37 +00:00
committed by Android (Google) Code Review
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().