[Wi-Fi] Get a summary of more information from WifiEntry#getSummary
We can use the parameter concise to specify if the summary should contain more detailed information. Bug: 70983952 Test: make RunSettingsLibRoboTests ROBOTEST_FILTER=WifiEntryPreferenceTest Change-Id: I6c5dc8ae62e1fa184025cbc1723e128e3cb76986
This commit is contained in:
@@ -118,7 +118,7 @@ public class WifiEntryPreference extends Preference implements WifiEntry.WifiEnt
|
||||
notifyChanged();
|
||||
}
|
||||
|
||||
setSummary(mWifiEntry.getSummary());
|
||||
setSummary(mWifiEntry.getSummary(false /* concise */));
|
||||
mContentDescription = buildContentDescription();
|
||||
}
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@ public class WifiEntryPreferenceTest {
|
||||
MockitoAnnotations.initMocks(this);
|
||||
|
||||
when(mMockWifiEntry.getTitle()).thenReturn(MOCK_TITLE);
|
||||
when(mMockWifiEntry.getSummary()).thenReturn(MOCK_SUMMARY);
|
||||
when(mMockWifiEntry.getSummary(false /* concise */)).thenReturn(MOCK_SUMMARY);
|
||||
|
||||
when(mMockIconInjector.getIcon(0)).thenReturn(mMockDrawable0);
|
||||
when(mMockIconInjector.getIcon(1)).thenReturn(mMockDrawable1);
|
||||
@@ -112,7 +112,7 @@ public class WifiEntryPreferenceTest {
|
||||
final WifiEntryPreference pref =
|
||||
new WifiEntryPreference(mContext, mMockWifiEntry, mMockIconInjector);
|
||||
final String updatedSummary = "updated summary";
|
||||
when(mMockWifiEntry.getSummary()).thenReturn(updatedSummary);
|
||||
when(mMockWifiEntry.getSummary(false /* concise */)).thenReturn(updatedSummary);
|
||||
|
||||
pref.refresh();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user