Merge "Address leftover comments" am: 1ddb4889b6 am: 5c19cb00cc am: b91a2d415f

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1495899

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I3f46b0c6d5c2dcce540fcb1f9d7f2cc22c934f93
This commit is contained in:
Paul Hu
2020-12-11 10:51:37 +00:00
committed by Automerger Merge Worker
2 changed files with 2 additions and 1 deletions

View File

@@ -1253,7 +1253,7 @@ public class Vpn {
final PackageManager packageManager = mUserIdContext.getPackageManager();
if (packageManager == null) {
throw new UnsupportedOperationException("Cannot get PackageManager.");
throw new IllegalStateException("Cannot get PackageManager.");
}
final ResolveInfo info = packageManager.resolveService(intent, 0 /* flags */);
if (info == null) {

View File

@@ -130,6 +130,7 @@ public class MultipathPolicyTrackerTest {
when(mContext.getResources()).thenReturn(mResources);
when(mContext.getApplicationInfo()).thenReturn(new ApplicationInfo());
// Mock user id to all users that Context#registerReceiver will register with all users too.
doReturn(UserHandle.ALL.getIdentifier()).when(mUserAllContext).getUserId();
when(mContext.createContextAsUser(eq(UserHandle.ALL), anyInt()))
.thenReturn(mUserAllContext);