Loading services/core/java/com/android/server/connectivity/Vpn.java +1 −1 Original line number Diff line number Diff line Loading @@ -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) { Loading tests/net/java/com/android/server/connectivity/MultipathPolicyTrackerTest.java +1 −0 Original line number Diff line number Diff line Loading @@ -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); Loading Loading
services/core/java/com/android/server/connectivity/Vpn.java +1 −1 Original line number Diff line number Diff line Loading @@ -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) { Loading
tests/net/java/com/android/server/connectivity/MultipathPolicyTrackerTest.java +1 −0 Original line number Diff line number Diff line Loading @@ -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); Loading