[TNU03] Add TetheringNotificationUpdaterTest

Add new test for TetheringNotificationUpdater

Bug: 122085773
Bug: 130596698
Test: atest TetheringTests
Change-Id: I0db3df3e85dd6a8c3989c8bc66a06c50f45a0c15
Merged-In: I0db3df3e85dd6a8c3989c8bc66a06c50f45a0c15
(cherry picked from aosp/1209985)
This commit is contained in:
Paul Hu
2020-03-25 07:53:03 +00:00
parent e4beb93149
commit 71007d31b5
2 changed files with 231 additions and 3 deletions

View File

@@ -134,8 +134,9 @@ public class TetheringNotificationUpdater {
*
* @return downstream types mask value.
*/
@VisibleForTesting
@IntRange(from = 0, to = 7)
private int getDownstreamTypesMask(@NonNull final String types) {
int getDownstreamTypesMask(@NonNull final String types) {
int downstreamTypesMask = DOWNSTREAM_NONE;
final String[] downstreams = types.split("\\|");
for (String downstream : downstreams) {
@@ -158,8 +159,8 @@ public class TetheringNotificationUpdater {
*
* @return {@link android.util.SparseArray} with downstream types and icon id info.
*/
@NonNull
private SparseArray<Integer> getIcons(@ArrayRes int id, @NonNull Resources res) {
@VisibleForTesting
SparseArray<Integer> getIcons(@ArrayRes int id, @NonNull Resources res) {
final String[] array = res.getStringArray(id);
final SparseArray<Integer> icons = new SparseArray<>();
for (String config : array) {