diff options
author | Nathan Harold <nharold@google.com> | 2020-02-13 19:50:51 -0800 |
---|---|---|
committer | Jack Yu <jackyu@google.com> | 2020-03-18 22:05:36 -0700 |
commit | a4e79e3d415f817422ff011c0f6e0feedf0dfcf9 (patch) | |
tree | cc8c9b86c073228372b741f994596d068f5b502d /tools/aapt2/java/JavaClassGenerator_test.cpp | |
parent | 1c9035f578c34dd11ef86a6bd8a7e69401b66276 (diff) |
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 5522de1af3bd875cfb4aa584e275ff148e95eb1f)
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator_test.cpp')
0 files changed, 0 insertions, 0 deletions