Skip to content
Commit a4e79e3d authored by Nathan Harold's avatar Nathan Harold Committed by Jack Yu
Browse files

Convert getAdditionalPlmns to return a Set

Set support is a little weird in Java and Android.
Java doesn't support ArraySet, but Android does; Parcel
has both read/write for ArraySet, but they are @hide. Thus,
my options were limited to:
-use the hidden parcel methods
-convert between list and set in the constructor and parcel code
-convert between list and set in the getter
-maintain parallel data structures.

Using the hidden methods seemed cleanest. Since they are
@UnsupportedAppUsage they can't be credibly removed.

In addition, the HAL code doesn't understand Set<> only List<> so
I was faced with the choice of having 2 constructors or using
Collection<>, which actually works just fine and avoids changing
a hundred or so unit tests with no ill effect.

Bug: 149476549
Test: atest FrameworksTelephonyTests
Test: (cts) atest CellInfoTest
Merged-In: I9dfa5f59512f3d1305187cc383c4069ceaaf27fd
Change-Id: I9dfa5f59512f3d1305187cc383c4069ceaaf27fd
(cherry picked from commit 5522de1a)
parent 1c9035f5
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment