Apply top intro preference in Settings app (1/n)

Based on content in footer, we need to convert some footers
to top info prefernce.

Test: Run robo test and see the screens
Bug: 173087905
Change-Id: Ie62a503481f9d385f5468896fba8f607cb3437d3
This commit is contained in:
Tsung-Mao Fang
2020-11-16 18:13:36 +08:00
parent 564eaec283
commit 00956fb4e1
15 changed files with 86 additions and 83 deletions

View File

@@ -158,13 +158,13 @@ public class TetherSettingsTest {
final TetherSettings spyTetherSettings = spy(new TetherSettings());
when(spyTetherSettings.getContext()).thenReturn(mContext);
final Preference mockPreference = mock(Preference.class);
when(spyTetherSettings.findPreference(TetherSettings.KEY_TETHER_PREFS_FOOTER))
when(spyTetherSettings.findPreference(TetherSettings.KEY_TETHER_PREFS_TOP_INTRO))
.thenReturn(mockPreference);
final WifiManager mockWifiManager = mock(WifiManager.class);
when(mContext.getSystemService(Context.WIFI_SERVICE)).thenReturn(mockWifiManager);
when(mockWifiManager.isStaApConcurrencySupported()).thenReturn(true);
spyTetherSettings.setFooterPreferenceTitle();
spyTetherSettings.setTopIntroPreferenceTitle();
verify(mockPreference, never()).setTitle(R.string.tethering_footer_info);
verify(mockPreference).setTitle(R.string.tethering_footer_info_sta_ap_concurrency);