Catch Netd exceptions to avoid runtime restart
bug:13475636
Change-Id: If36a0051a957fc066711fe8225f8981bc07add04
diff --git a/services/core/java/com/android/server/ConnectivityService.java b/services/core/java/com/android/server/ConnectivityService.java
index 68b779c..ca1c0ae 100644
--- a/services/core/java/com/android/server/ConnectivityService.java
+++ b/services/core/java/com/android/server/ConnectivityService.java
@@ -2434,7 +2434,9 @@
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 @@
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);
}
}
}