diff options
| author | 2017-05-30 18:04:19 -0700 | |
|---|---|---|
| committer | 2017-06-13 13:27:39 -0700 | |
| commit | a88d1990b7482d94f20f2ba3d04a8eea8543e22d (patch) | |
| tree | a8281d2ea680bf139705946b454e64d6d953a4cc | |
| parent | aadb414f02facebe84010167aa8a3777c7f700a3 (diff) | |
Adds error codes and maximum RAN/Bands/Channels
Added error codes which are mapped from the RadioError which is returned
from RIL, also added some errors which will be generated at telephony.
Those errors will be returned to the user with the onError() callback.
Added the maximun number of RAN/Bands/Channels in 1 scan request.
Test: Telephony sanity tests
Bug: 30954762
Change-Id: Ie7865ed2101d9564e26870a8ebbb0ceb7bd9bd1b
| -rw-r--r-- | telephony/java/android/telephony/NetworkScan.java | 24 | ||||
| -rw-r--r-- | telephony/java/android/telephony/NetworkScanRequest.java | 8 |
2 files changed, 27 insertions, 5 deletions
diff --git a/telephony/java/android/telephony/NetworkScan.java b/telephony/java/android/telephony/NetworkScan.java index 0cb4cff0858e..f15fde8f0700 100644 --- a/telephony/java/android/telephony/NetworkScan.java +++ b/telephony/java/android/telephony/NetworkScan.java @@ -34,12 +34,26 @@ public class NetworkScan { public static final String TAG = "NetworkScan"; - public static final int SUCCESS = 0; - public static final int ERROR_INVALID_SCAN = 1; - public static final int ERROR_UNSUPPORTED = 2; - public static final int ERROR_INTERRUPTED = 3; - public static final int ERROR_CANCELLED = 4; + // Below errors are mapped from RadioError which is returned from RIL. We will consolidate + // RadioErrors during the mapping if those RadioErrors mean no difference to the users. + public static final int SUCCESS = 0; // RadioError:NONE + public static final int ERROR_MODEM_ERROR = 1; // RadioError:RADIO_NOT_AVAILABLE + // RadioError:NO_MEMORY + // RadioError:INTERNAL_ERR + // RadioError:MODEM_ERR + // RadioError:OPERATION_NOT_ALLOWED + public static final int ERROR_INVALID_SCAN = 2; // RadioError:INVALID_ARGUMENTS + public static final int ERROR_MODEM_BUSY = 3; // RadioError:DEVICE_IN_USE + public static final int ERROR_UNSUPPORTED = 4; // RadioError:REQUEST_NOT_SUPPORTED + // Below errors are generated at the Telephony. + public static final int ERROR_RIL_ERROR = 10000; // Nothing or only exception is + // returned from RIL. + public static final int ERROR_INVALID_SCANID = 10001; // The scanId is invalid. The user is + // either trying to stop a scan which + // does not exist or started by others. + public static final int ERROR_INTERRUPTED = 10002; // Scan was interrupted by another scan + // with higher priority. private final int mScanId; private final int mSubId; diff --git a/telephony/java/android/telephony/NetworkScanRequest.java b/telephony/java/android/telephony/NetworkScanRequest.java index 0a542a7aacef..d2aef2007044 100644 --- a/telephony/java/android/telephony/NetworkScanRequest.java +++ b/telephony/java/android/telephony/NetworkScanRequest.java @@ -31,6 +31,14 @@ import java.util.Arrays; */ public final class NetworkScanRequest implements Parcelable { + // Below size limits for RAN/Band/Channel are for pre-treble modems and will be removed later. + /** @hide */ + public static final int MAX_RADIO_ACCESS_NETWORKS = 8; + /** @hide */ + public static final int MAX_BANDS = 8; + /** @hide */ + public static final int MAX_CHANNELS = 32; + /** Performs the scan only once */ public static final int SCAN_TYPE_ONE_SHOT = 0; /** |