Fix carrier-specific Wi-Fi settings appears in search - even on non-carrier phone

The preference should be removed from the search result when
the availability status is false.

Change-Id: I979bc70ec7672b137b96a7e02db2e9ba29fbb7a8
Fixes: 112550245
Test: manual and robotests
This commit is contained in:
Stanley Wang
2018-12-03 18:51:03 +08:00
parent 32ee158e2a
commit f301f8b216
4 changed files with 17 additions and 44 deletions

View File

@@ -33,6 +33,7 @@ import org.mockito.MockitoAnnotations;
@RunWith(SettingsRobolectricTestRunner.class)
public class CellularFallbackPreferenceControllerTest {
private static final String KEY_CELLULAR_FALLBACK = "wifi_cellular_data_fallback";
@Mock(answer = Answers.RETURNS_DEEP_STUBS)
private Context mContext;
@@ -42,7 +43,7 @@ public class CellularFallbackPreferenceControllerTest {
@Before
public void setUp() {
MockitoAnnotations.initMocks(this);
mController = new CellularFallbackPreferenceController(mContext);
mController = new CellularFallbackPreferenceController(mContext, KEY_CELLULAR_FALLBACK);
}
@Test