am de4e7b49: Merge "Include the interface for clearDnsInterfaceForUidRange" into klp-dev

* commit 'de4e7b4947998638e0345ab9a181bf35a8827bef':
  Include the interface for clearDnsInterfaceForUidRange
This commit is contained in:
Chad Brubaker
2014-03-21 20:56:37 +00:00
committed by Android Git Automerger
3 changed files with 4 additions and 4 deletions

View File

@ -420,7 +420,7 @@ interface INetworkManagementService
/** /**
* Clear a user range from being associated with an interface. * Clear a user range from being associated with an interface.
*/ */
void clearDnsInterfaceForUidRange(int uid_start, int uid_end); void clearDnsInterfaceForUidRange(String iface, int uid_start, int uid_end);
/** /**
* Clear the mappings from pid to Dns interface and from uid range to Dns interface. * Clear the mappings from pid to Dns interface and from uid range to Dns interface.

View File

@ -3907,7 +3907,7 @@ public class ConnectivityService extends IConnectivityManager.Stub {
boolean forwardDns) { boolean forwardDns) {
try { try {
mNetd.clearUidRangeRoute(interfaze, uidStart, uidEnd); mNetd.clearUidRangeRoute(interfaze, uidStart, uidEnd);
if (forwardDns) mNetd.clearDnsInterfaceForUidRange(uidStart, uidEnd); if (forwardDns) mNetd.clearDnsInterfaceForUidRange(interfaze, uidStart, uidEnd);
} catch (RemoteException e) { } catch (RemoteException e) {
} }

View File

@ -1567,10 +1567,10 @@ public class NetworkManagementService extends INetworkManagementService.Stub
} }
@Override @Override
public void clearDnsInterfaceForUidRange(int uid_start, int uid_end) { public void clearDnsInterfaceForUidRange(String iface, int uid_start, int uid_end) {
mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG); mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG);
try { try {
mConnector.execute("resolver", "clearifaceforuidrange", uid_start, uid_end); mConnector.execute("resolver", "clearifaceforuidrange", iface, uid_start, uid_end);
} catch (NativeDaemonConnectorException e) { } catch (NativeDaemonConnectorException e) {
throw e.rethrowAsParcelableException(); throw e.rethrowAsParcelableException();
} }