Merge "Add idleTimer existence check before removing idleTimer"
This commit is contained in:
commit
40177cf4cb
1 changed files with 4 additions and 0 deletions
|
|
@ -11285,6 +11285,10 @@ public class ConnectivityService extends IConnectivityManager.Stub
|
||||||
updateRadioPowerState(false /* isActive */, type);
|
updateRadioPowerState(false /* isActive */, type);
|
||||||
synchronized (mActiveIdleTimers) {
|
synchronized (mActiveIdleTimers) {
|
||||||
final IdleTimerParams params = mActiveIdleTimers.remove(iface);
|
final IdleTimerParams params = mActiveIdleTimers.remove(iface);
|
||||||
|
if (params == null) {
|
||||||
|
// IdleTimer is not added if the configured timeout is 0 or negative value
|
||||||
|
return;
|
||||||
|
}
|
||||||
// The call fails silently if no idle timer setup for this interface
|
// The call fails silently if no idle timer setup for this interface
|
||||||
mNetd.idletimerRemoveInterface(iface, params.timeout,
|
mNetd.idletimerRemoveInterface(iface, params.timeout,
|
||||||
Integer.toString(params.transportType));
|
Integer.toString(params.transportType));
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue