From baabe4134845b19bebb1e21a2b3ee34a304d9c37 Mon Sep 17 00:00:00 2001 From: Lorenzo Colitti Date: Tue, 8 Sep 2015 16:21:52 +0900 Subject: [PATCH] Don't crash on startup if we can't fetch the interface list. The intent of the code was to catch exceptions, but it wasn't actually doing that because when a netd command fails we get an IllegalStateException, not a RemoteException. Bug: 23581852 Change-Id: I66c7c33bdc7b0d0de4fa5cd92dff054797cf860f --- .../src/com/android/server/ethernet/EthernetNetworkFactory.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/service-t/src/com/android/server/ethernet/EthernetNetworkFactory.java b/service-t/src/com/android/server/ethernet/EthernetNetworkFactory.java index 4503197fc6..6074dda6e0 100644 --- a/service-t/src/com/android/server/ethernet/EthernetNetworkFactory.java +++ b/service-t/src/com/android/server/ethernet/EthernetNetworkFactory.java @@ -396,7 +396,7 @@ class EthernetNetworkFactory { } } } - } catch (RemoteException e) { + } catch (RemoteException|IllegalStateException e) { Log.e(TAG, "Could not get list of interfaces " + e); } }