Loading core/res/AndroidManifest.xml +2 −0 Original line number Diff line number Diff line Loading @@ -91,6 +91,8 @@ <protected-broadcast android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED" /> <protected-broadcast android:name="android.hardware.usb.action.USB_DEVICE_DETACHED" /> <protected-broadcast android:name="android.net.vpn.action.REVOKED" /> <protected-broadcast android:name="android.nfc.action.LLCP_LINK_STATE_CHANGED" /> <protected-broadcast android:name="com.android.nfc_extras.action.RF_FIELD_ON_DETECTED" /> <protected-broadcast android:name="com.android.nfc_extras.action.RF_FIELD_OFF_DETECTED" /> Loading services/java/com/android/server/connectivity/Vpn.java +11 −3 Original line number Diff line number Diff line Loading @@ -102,14 +102,22 @@ public class Vpn extends INetworkManagementEventObserver.Stub { /** * Protect a socket from routing changes by binding it to the given * interface. The socket is NOT closed by this method. * interface. The socket IS closed by this method. * * @param socket The socket to be bound. * @param name The name of the interface. */ public void protect(ParcelFileDescriptor socket, String name) { try { mContext.enforceCallingPermission(VPN, "protect"); nativeProtect(socket.getFd(), name); } finally { try { socket.close(); } catch (Exception e) { // ignore } } } /** Loading Loading
core/res/AndroidManifest.xml +2 −0 Original line number Diff line number Diff line Loading @@ -91,6 +91,8 @@ <protected-broadcast android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED" /> <protected-broadcast android:name="android.hardware.usb.action.USB_DEVICE_DETACHED" /> <protected-broadcast android:name="android.net.vpn.action.REVOKED" /> <protected-broadcast android:name="android.nfc.action.LLCP_LINK_STATE_CHANGED" /> <protected-broadcast android:name="com.android.nfc_extras.action.RF_FIELD_ON_DETECTED" /> <protected-broadcast android:name="com.android.nfc_extras.action.RF_FIELD_OFF_DETECTED" /> Loading
services/java/com/android/server/connectivity/Vpn.java +11 −3 Original line number Diff line number Diff line Loading @@ -102,14 +102,22 @@ public class Vpn extends INetworkManagementEventObserver.Stub { /** * Protect a socket from routing changes by binding it to the given * interface. The socket is NOT closed by this method. * interface. The socket IS closed by this method. * * @param socket The socket to be bound. * @param name The name of the interface. */ public void protect(ParcelFileDescriptor socket, String name) { try { mContext.enforceCallingPermission(VPN, "protect"); nativeProtect(socket.getFd(), name); } finally { try { socket.close(); } catch (Exception e) { // ignore } } } /** Loading