From 5e366e31aecbecafd3dfb4bfc8f69ada34b1f550 Mon Sep 17 00:00:00 2001 From: yinxu Date: Wed, 7 Mar 2018 13:49:51 -0800 Subject: [PATCH] Do not throw RuntimeException from stopScan(). Bug:73750871 Test: Unit Test Change-Id: I640093627c103fe1d2fe5707e6854ba748789919 --- telephony/java/android/telephony/NetworkScan.java | 2 -- telephony/java/android/telephony/TelephonyManager.java | 3 ++- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/telephony/java/android/telephony/NetworkScan.java b/telephony/java/android/telephony/NetworkScan.java index 71a177abb8c95..7f43ee5f425c9 100644 --- a/telephony/java/android/telephony/NetworkScan.java +++ b/telephony/java/android/telephony/NetworkScan.java @@ -110,13 +110,11 @@ public class NetworkScan { ITelephony telephony = getITelephony(); if (telephony == null) { Rlog.e(TAG, "Failed to get the ITelephony instance."); - throw new RuntimeException("Failed to get the ITelephony instance."); } try { telephony.stopNetworkScan(mSubId, mScanId); } catch (RemoteException ex) { Rlog.e(TAG, "stopNetworkScan RemoteException", ex); - ex.rethrowAsRuntimeException(); } } diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java index 4d48ed0645431..0e84e7ce271ac 100644 --- a/telephony/java/android/telephony/TelephonyManager.java +++ b/telephony/java/android/telephony/TelephonyManager.java @@ -5222,7 +5222,8 @@ public class TelephonyManager { *

* Requires Permission: * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE} - * Or the calling app has carrier privileges. @see #hasCarrierPrivileges() + * Or the calling app has carrier privileges. + * @see #hasCarrierPrivileges() * * @param request Contains all the RAT with bands/channels that need to be scanned. * @param executor The executor through which the callback should be invoked.