Merge "Catch Netd exceptions to avoid runtime restart" am: 1f025e18eb

Original change: undetermined

Change-Id: I01f25837b95daa4ef661f72c80e2b4d60fa16888
This commit is contained in:
Etan Cohen
2021-05-31 07:13:02 +00:00
committed by Automerger Merge Worker

View File

@@ -2434,7 +2434,9 @@ public class ConnectivityService extends IConnectivityManager.Stub {
if (timeout > 0 && iface != null) {
try {
mNetd.addIdleTimer(iface, timeout, type);
} catch (RemoteException e) {
} catch (Exception e) {
// You shall not crash!
loge("Exception in setupDataActivityTracking " + e);
}
}
}
@@ -2451,7 +2453,8 @@ public class ConnectivityService extends IConnectivityManager.Stub {
try {
// the call fails silently if no idletimer setup for this interface
mNetd.removeIdleTimer(iface);
} catch (RemoteException e) {
} catch (Exception e) {
loge("Exception in removeDataActivityTracking " + e);
}
}
}