From a1874cc580a96fad684820d264d1c0fb7babf6e4 Mon Sep 17 00:00:00 2001 From: Sehee Park Date: Tue, 19 Jun 2018 20:07:37 +0900 Subject: [PATCH] Modify catch when addInterfaceToLocalNetwork() is called. Fatal Exception is occured in system process. Becuase addInterfaceToLocalNetwork() throw IllegalStateException but it can not be handled in TetherInterfaceStateMachine. Modify catch from "RemoteException" to "Exception" when addInterfaceToLocalNetwork() is called. Test: Repeat on/off tethering Test: "runtest --no-hidden-api-checks frameworks-net" passes Bug: 110396460 Change-Id: I2f2f1325cfcce40c3113ccccf69b2bbd5df4ae5b Signed-off-by: Sehee Park --- .../server/connectivity/tethering/TetherInterfaceStateMachine.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/core/java/com/android/server/connectivity/tethering/TetherInterfaceStateMachine.java b/services/core/java/com/android/server/connectivity/tethering/TetherInterfaceStateMachine.java index fbee86a84f85..9e6b659dbf93 100644 --- a/services/core/java/com/android/server/connectivity/tethering/TetherInterfaceStateMachine.java +++ b/services/core/java/com/android/server/connectivity/tethering/TetherInterfaceStateMachine.java @@ -379,7 +379,7 @@ public class TetherInterfaceStateMachine extends StateMachine { // that adding routes that already exist does not cause an // error (EEXIST is silently ignored). mNMService.addInterfaceToLocalNetwork(mIfaceName, toBeAdded); - } catch (RemoteException e) { + } catch (Exception e) { mLog.e("Failed to add IPv6 routes to local table: " + e); } -- 2.11.0