Merge "NetworkStackClient: Use @SystemApi alternative for isSameApp"

am: 6a612863e6

Change-Id: Ib2cea3e218fdee4ebe054912465b4a1f575b3dd2
This commit is contained in:
Roshan Pius
2019-11-19 15:18:58 -08:00
committed by android-build-merger

View File

@@ -103,7 +103,7 @@ public class NetworkStackClient {
// checks here should be kept in sync with PermissionUtil. // checks here should be kept in sync with PermissionUtil.
if (caller != Process.SYSTEM_UID if (caller != Process.SYSTEM_UID
&& caller != Process.NETWORK_STACK_UID && caller != Process.NETWORK_STACK_UID
&& !UserHandle.isSameApp(caller, Process.BLUETOOTH_UID)) { && UserHandle.getAppId(caller) != Process.BLUETOOTH_UID) {
throw new SecurityException( throw new SecurityException(
"Only the system server should try to bind to the network stack."); "Only the system server should try to bind to the network stack.");
} }