From 19be149de78818771293b40bf2238886200b170f Mon Sep 17 00:00:00 2001 From: Jake Hamby Date: Thu, 6 Feb 2014 14:43:50 -0800 Subject: [PATCH 1/2] Remove unneeded new RIL command. Remove the recently added RIL_REQUEST_SET_RADIO_MODE command and update the definition of the RIL_REQUEST_NV_RESET_CONFIG parameter. Also remove some accidentally added debug log lines. Bug: 12864208 Change-Id: I6f035d6900c9fcb1427bad62057d7b4a1d3cd99c --- .../core/java/com/android/server/ConnectivityService.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/services/core/java/com/android/server/ConnectivityService.java b/services/core/java/com/android/server/ConnectivityService.java index 342336e1d8..2afb53d7b3 100644 --- a/services/core/java/com/android/server/ConnectivityService.java +++ b/services/core/java/com/android/server/ConnectivityService.java @@ -169,9 +169,9 @@ public class ConnectivityService extends IConnectivityManager.Stub { private static final String TAG = "ConnectivityService"; private static final boolean DBG = true; - private static final boolean VDBG = true; + private static final boolean VDBG = false; - private static final boolean LOGD_RULES = true; + private static final boolean LOGD_RULES = false; // TODO: create better separation between radio types and network types @@ -4504,7 +4504,6 @@ public class ConnectivityService extends IConnectivityManager.Stub { * @param seconds */ private static void sleep(int seconds) { - log("XXXXX sleeping for " + seconds + " sec"); long stopTime = System.nanoTime() + (seconds * 1000000000); long sleepTime; while ((sleepTime = stopTime - System.nanoTime()) > 0) { @@ -4513,7 +4512,6 @@ public class ConnectivityService extends IConnectivityManager.Stub { } catch (InterruptedException ignored) { } } - log("XXXXX returning from sleep"); } private static void log(String s) { From 5fad0b3ae577ce7d02e76221705e57d19976e675 Mon Sep 17 00:00:00 2001 From: Robert Greenwalt Date: Wed, 19 Mar 2014 14:26:28 -0700 Subject: [PATCH 2/2] Catch Netd exceptions to avoid runtime restart bug:13475636 Change-Id: If36a0051a957fc066711fe8225f8981bc07add04 --- .../core/java/com/android/server/ConnectivityService.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/services/core/java/com/android/server/ConnectivityService.java b/services/core/java/com/android/server/ConnectivityService.java index 68b779c023..ca1c0aee29 100644 --- a/services/core/java/com/android/server/ConnectivityService.java +++ b/services/core/java/com/android/server/ConnectivityService.java @@ -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); } } }