From 7ea1a49c0aa1bb9bd990060a193507e5e4d0c292 Mon Sep 17 00:00:00 2001 From: yinxu Date: Mon, 12 Mar 2018 15:55:28 -0700 Subject: [PATCH] Catch the RuntimeException for stopScan() Some RuntimeExceptions will be thrown across the binder so we need to catch RuntimeException even we already catch the RemoteException. Bug:73750871 Test: Unit Test Change-Id: Ib72e5ce0f20fbbe913b054314ed3942862c0ab95 --- telephony/java/android/telephony/NetworkScan.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/telephony/java/android/telephony/NetworkScan.java b/telephony/java/android/telephony/NetworkScan.java index 7f43ee5f425c9..073c313a61df3 100644 --- a/telephony/java/android/telephony/NetworkScan.java +++ b/telephony/java/android/telephony/NetworkScan.java @@ -115,6 +115,8 @@ public class NetworkScan { telephony.stopNetworkScan(mSubId, mScanId); } catch (RemoteException ex) { Rlog.e(TAG, "stopNetworkScan RemoteException", ex); + } catch (RuntimeException ex) { + Rlog.e(TAG, "stopNetworkScan RuntimeException", ex); } }