Merge "Idletimer-related commands porting"

am: b6b8516ba0

Change-Id: I48997db764885415f952520c5a29c5da34327e39
This commit is contained in:
Luke Huang
2018-08-01 15:44:30 -07:00
committed by android-build-merger

View File

@@ -1490,10 +1490,9 @@ public class NetworkManagementService extends INetworkManagementService.Stub
}
try {
mConnector.execute("idletimer", "add", iface, Integer.toString(timeout),
Integer.toString(type));
} catch (NativeDaemonConnectorException e) {
throw e.rethrowAsParcelableException();
mNetdService.idletimerAddInterface(iface, timeout, Integer.toString(type));
} catch (RemoteException | ServiceSpecificException e) {
throw new IllegalStateException(e);
}
mActiveIdleTimers.put(iface, new IdleTimerParams(timeout, type));
@@ -1524,10 +1523,10 @@ public class NetworkManagementService extends INetworkManagementService.Stub
}
try {
mConnector.execute("idletimer", "remove", iface,
Integer.toString(params.timeout), Integer.toString(params.type));
} catch (NativeDaemonConnectorException e) {
throw e.rethrowAsParcelableException();
mNetdService.idletimerRemoveInterface(iface,
params.timeout, Integer.toString(params.type));
} catch (RemoteException | ServiceSpecificException e) {
throw new IllegalStateException(e);
}
mActiveIdleTimers.remove(iface);
mDaemonHandler.post(new Runnable() {