Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9921cf9f authored by yinxu's avatar yinxu Committed by android-build-merger
Browse files

Merge "Do not throw RuntimeException from stopScan()." am: 7ac5deaf

am: 9846b539

Change-Id: I09c905f0a7f54e3b24b94793d14f46ad9c56cf3c
parents 85328af4 9846b539
Loading
Loading
Loading
Loading
+0 −2
Original line number Original line Diff line number Diff line
@@ -110,13 +110,11 @@ public class NetworkScan {
        ITelephony telephony = getITelephony();
        ITelephony telephony = getITelephony();
        if (telephony == null) {
        if (telephony == null) {
            Rlog.e(TAG, "Failed to get the ITelephony instance.");
            Rlog.e(TAG, "Failed to get the ITelephony instance.");
            throw new RuntimeException("Failed to get the ITelephony instance.");
        }
        }
        try {
        try {
            telephony.stopNetworkScan(mSubId, mScanId);
            telephony.stopNetworkScan(mSubId, mScanId);
        } catch (RemoteException ex) {
        } catch (RemoteException ex) {
            Rlog.e(TAG, "stopNetworkScan  RemoteException", ex);
            Rlog.e(TAG, "stopNetworkScan  RemoteException", ex);
            ex.rethrowAsRuntimeException();
        }
        }
    }
    }


+2 −1
Original line number Original line Diff line number Diff line
@@ -5396,7 +5396,8 @@ public class TelephonyManager {
     * <p>
     * <p>
     * Requires Permission:
     * Requires Permission:
     *   {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}
     *   {@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 request Contains all the RAT with bands/channels that need to be scanned.
     * @param executor The executor through which the callback should be invoked.
     * @param executor The executor through which the callback should be invoked.