Make data RAT icon test pass

Change merged in from aosp (I0428ba1749bdb884d210f1ff02cdf86b376a0ca8)
had a test written that was failing because the CL only updated the
status bar icon, not qs icon.

This is my attempt to make the code work as it seemed to be intended.

Test: runtest -x \
packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/NetworkControllerDataTest.java \
-m testAlwaysShowDataRatIcon

Change-Id: I4fe11c2e866cbb1f7784e4ed109671a957ffdf36
This commit is contained in:
Evan Laird
2017-12-04 14:31:48 -05:00
parent e3def31ec0
commit 9dcd3226c1
2 changed files with 1 additions and 3 deletions

View File

@@ -288,7 +288,7 @@ public class MobileSignalController extends SignalController<
String description = null;
// Only send data sim callbacks to QS.
if (mCurrentState.dataSim) {
qsTypeIcon = showDataIcon ? icons.mQsDataType : 0;
qsTypeIcon = (showDataIcon || mConfig.alwaysShowDataRatIcon) ? icons.mQsDataType : 0;
qsIcon = new IconState(mCurrentState.enabled
&& !mCurrentState.isEmergency, getQsCurrentIconId(), contentDescription);
description = mCurrentState.isEmergency ? null : mCurrentState.networkName;

View File

@@ -138,8 +138,6 @@ public class NetworkControllerDataTest extends NetworkControllerBaseTest {
}
@Test
@Ignore("Flaky")
//TODO(evanlaird): figure out why this fails
public void testAlwaysShowDataRatIcon() {
setupDefaultSignal();
when(mMockTm.getDataEnabled(mSubId)).thenReturn(false);