Merge "Do not throw RuntimeException from stopScan()."

am: 7ac5deaf38

Change-Id: I64e0486f26d6bc9e468cf0c69ec6ada50889940b
This commit is contained in:
yinxu
2018-03-08 21:31:49 +00:00
committed by android-build-merger
2 changed files with 2 additions and 3 deletions

View File

@@ -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();
}
}

View File

@@ -5222,7 +5222,8 @@ public class TelephonyManager {
* <p>
* 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.