Merge "NetworkStackClient: Allow modules with network_stack uid"
This commit is contained in:
@@ -488,7 +488,9 @@ public class NetworkStackClient {
|
|||||||
private void requestConnector(@NonNull NetworkStackCallback request) {
|
private void requestConnector(@NonNull NetworkStackCallback request) {
|
||||||
// TODO: PID check.
|
// TODO: PID check.
|
||||||
final int caller = Binder.getCallingUid();
|
final int caller = Binder.getCallingUid();
|
||||||
if (caller != Process.SYSTEM_UID && !UserHandle.isSameApp(caller, Process.BLUETOOTH_UID)
|
if (caller != Process.SYSTEM_UID
|
||||||
|
&& caller != Process.NETWORK_STACK_UID
|
||||||
|
&& !UserHandle.isSameApp(caller, Process.BLUETOOTH_UID)
|
||||||
&& !UserHandle.isSameApp(caller, Process.PHONE_UID)) {
|
&& !UserHandle.isSameApp(caller, Process.PHONE_UID)) {
|
||||||
// Don't even attempt to obtain the connector and give a nice error message
|
// Don't even attempt to obtain the connector and give a nice error message
|
||||||
throw new SecurityException(
|
throw new SecurityException(
|
||||||
|
|||||||
Reference in New Issue
Block a user