Commit Graph

8 Commits

Author SHA1 Message Date
Nathan Harold
ce40801ef5 Catch IllegalArgumentException on NetworkScan.stopScan
IllegalArgumentException is thrown when a terminated
scan calls stop. This change softens the exception and
error type that is logged and considers this normal.

Bug: 113823866
Test: compilation
Change-Id: I7ce60d6badfac52156cceca83b39c1afe21b4eda
2018-09-27 11:17:22 -07:00
Jeff Sharkey
3990ee1c9f Clean up APIs before declaring API 28.
As part of finalizing an SDK, we need to ensure that no new APIs are
marked @Deprecated, since they're typically cleanup that someone
forgot to finish.

Someone forgot to replace Slice.getTimestamp() with Slice.getLong().

Bug: 77588754
Test: builds, boots
Exempt-From-Owner-Approval: SDK finalization
Change-Id: Ic0ec91a43d161a69c1e840c42046ad500b7aeca0
2018-04-11 13:49:21 -06:00
yinxu
7ea1a49c0a 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.

Bug:73750871
Test: Unit Test
Change-Id: Ib72e5ce0f20fbbe913b054314ed3942862c0ab95
2018-03-12 15:55:28 -07:00
yinxu
70c5286f98 Do not throw RuntimeException from stopScan().
This is a clean cherry-pick from
https://android-review.googlesource.com/#/c/platform/frameworks/base/+/635589/

Bug:73750871
Test: Unit Test
Change-Id: I640093627c103fe1d2fe5707e6854ba748789919
Merged-in: I640093627c103fe1d2fe5707e6854ba748789919
(cherry picked from commit 5e366e31ae)
2018-03-08 13:32:25 -08:00
yinxu
8aac40520b Address the API review comments.
This is a clean cherry-pick from:
https://android-review.git.corp.google.com/c/platform/frameworks/base/+/632313

Bug:73750871
Test: Unit Test
Change-Id: I8ebb617c819c7604957b3c086098ef5074d70f78
Merged-in: I8ebb617c819c7604957b3c086098ef5074d70f78
(cherry picked from commit 1abe9b187c)
2018-03-07 09:50:55 -08:00
yinxu
bbc3d36782 Expose the scan API and network select API.
Bug: 67748005
Test: Basic telephony sanity
Change-Id: I54aa5d5eacfeb39ada14e843917fe08e382e79de
2017-12-19 13:37:05 -08:00
yinxu
a88d1990b7 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
2017-06-13 13:27:39 -07:00
yinxu
f19bc1a0e5 Add API to support async network scans.
This CL includes the new Java API that supports async network scans.
Applications could get faster network scan results with this new API.
The long-term goal is to support Subsecond Switching which is separate
from what this CL is doing.

Bug: 30954762
Test: Unit test, run runtest -x NetworkScanRequestTest.java
Change-Id: I78cadaf838dee8439fe7417ef39f689990bf5705
(cherry picked from commit fdfb6f4d2f)
2017-05-12 15:01:02 -07:00