Merge "Idletimer-related commands porting"
This commit is contained in:
@@ -1490,10 +1490,9 @@ public class NetworkManagementService extends INetworkManagementService.Stub
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
mConnector.execute("idletimer", "add", iface, Integer.toString(timeout),
|
mNetdService.idletimerAddInterface(iface, timeout, Integer.toString(type));
|
||||||
Integer.toString(type));
|
} catch (RemoteException | ServiceSpecificException e) {
|
||||||
} catch (NativeDaemonConnectorException e) {
|
throw new IllegalStateException(e);
|
||||||
throw e.rethrowAsParcelableException();
|
|
||||||
}
|
}
|
||||||
mActiveIdleTimers.put(iface, new IdleTimerParams(timeout, type));
|
mActiveIdleTimers.put(iface, new IdleTimerParams(timeout, type));
|
||||||
|
|
||||||
@@ -1524,10 +1523,10 @@ public class NetworkManagementService extends INetworkManagementService.Stub
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
mConnector.execute("idletimer", "remove", iface,
|
mNetdService.idletimerRemoveInterface(iface,
|
||||||
Integer.toString(params.timeout), Integer.toString(params.type));
|
params.timeout, Integer.toString(params.type));
|
||||||
} catch (NativeDaemonConnectorException e) {
|
} catch (RemoteException | ServiceSpecificException e) {
|
||||||
throw e.rethrowAsParcelableException();
|
throw new IllegalStateException(e);
|
||||||
}
|
}
|
||||||
mActiveIdleTimers.remove(iface);
|
mActiveIdleTimers.remove(iface);
|
||||||
mDaemonHandler.post(new Runnable() {
|
mDaemonHandler.post(new Runnable() {
|
||||||
|
|||||||
Reference in New Issue
Block a user