Fix NetworkControllerDataTest fail if inflateSignalStrength is true
NetworkControllerBaseTest doesn't consider inflate signal strength
condition. Consider inflate condition when compare icon.
Bug: 130317133
Test: atest NetworkControllerDataTest pass
Change-Id: I2f9e994cb169001d4081ecead3702f9ef00234ff
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/NetworkControllerBaseTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/NetworkControllerBaseTest.java
index 4fe18b4..ce5bfce 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/NetworkControllerBaseTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/NetworkControllerBaseTest.java
@@ -428,8 +428,12 @@
IconState iconState = iconArg.getValue();
- int state = SignalDrawable.getState(icon, SignalStrength.NUM_SIGNAL_STRENGTH_BINS,
- cutOut);
+ int numSignalStrengthBins = SignalStrength.NUM_SIGNAL_STRENGTH_BINS;
+ if (mMobileSignalController.mInflateSignalStrengths) {
+ numSignalStrengthBins++;
+ icon++;
+ }
+ int state = SignalDrawable.getState(icon, numSignalStrengthBins, cutOut);
assertEquals("Data icon in status bar", typeIcon, (int) typeIconArg.getValue());
assertEquals("Signal icon in status bar", state, iconState.icon);
assertEquals("Visibility in status bar", visible, iconState.visible);