From 97922be2ac27d3de159b57c8eb2dad4be63a3830 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. This is a clean cherry-pick from https://googleplex-android-review.git.corp.google.com/c/platform/frameworks/base/+/3725821 Bug:73750871 Test: Unit Test Change-Id: Ib72e5ce0f20fbbe913b054314ed3942862c0ab95 Merged-in: Ib72e5ce0f20fbbe913b054314ed3942862c0ab95 (cherry picked from commit 7ea1a49c0aa1bb9bd990060a193507e5e4d0c292) --- 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); } }