From ba0156e56f77849d4e9e05e8fbb466638d7bee78 Mon Sep 17 00:00:00 2001 From: Evan Laird Date: Fri, 15 Mar 2024 10:41:00 -0400 Subject: [Sb] Use WIFI_NO_INTERNET_ICONS instead of resIds directly WIFI_NO_INTERNET_ICONS defines a collection of resIds to use for wifi icons. With the NEW_STATUS_BAR_ICONS flag, those ids will be swapped out and we shouldn't consider them to be the correct constants. This change just uses the statically defined array so the test is always checking against the correct set of icons Test: InternetTileDataInteractorTest Test: run this test with the flag on and off, and verify that it works Bug: 314812750 Flag: ACONFIG com.android.settingslib.flags.new_status_bar_icons DEVELOPMENT Change-Id: I3e333a3228089a36be8b17cb4827034baf5fcb4a --- .../interactor/InternetTileDataInteractorTest.kt | 24 ++++------------------ 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/tiles/impl/internet/domain/interactor/InternetTileDataInteractorTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/tiles/impl/internet/domain/interactor/InternetTileDataInteractorTest.kt index 37ef6ad17a64..769a54aee862 100644 --- a/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/tiles/impl/internet/domain/interactor/InternetTileDataInteractorTest.kt +++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/tiles/impl/internet/domain/interactor/InternetTileDataInteractorTest.kt @@ -127,31 +127,15 @@ class InternetTileDataInteractorTest : SysuiTestCase() { context.orCreateTestableResources.apply { addOverride(com.android.internal.R.drawable.ic_signal_cellular, TestStubDrawable()) - addOverride( - com.android.settingslib.R.drawable.ic_no_internet_wifi_signal_0, - TestStubDrawable() - ) - addOverride( - com.android.settingslib.R.drawable.ic_no_internet_wifi_signal_1, - TestStubDrawable() - ) - addOverride( - com.android.settingslib.R.drawable.ic_no_internet_wifi_signal_2, - TestStubDrawable() - ) - addOverride( - com.android.settingslib.R.drawable.ic_no_internet_wifi_signal_3, - TestStubDrawable() - ) - addOverride( - com.android.settingslib.R.drawable.ic_no_internet_wifi_signal_4, - TestStubDrawable() - ) addOverride(com.android.settingslib.R.drawable.ic_hotspot_phone, TestStubDrawable()) addOverride(com.android.settingslib.R.drawable.ic_hotspot_laptop, TestStubDrawable()) addOverride(com.android.settingslib.R.drawable.ic_hotspot_tablet, TestStubDrawable()) addOverride(com.android.settingslib.R.drawable.ic_hotspot_watch, TestStubDrawable()) addOverride(com.android.settingslib.R.drawable.ic_hotspot_auto, TestStubDrawable()) + + WifiIcons.WIFI_NO_INTERNET_ICONS.forEach { iconId -> + addOverride(iconId, TestStubDrawable()) + } } underTest = -- cgit v1.2.3-59-g8ed1b