[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:
Arc Wang
2020-01-08 15:35:11 +08:00
parent 7f437bb343
commit c72460f73e
2 changed files with 3 additions and 3 deletions

View File

@@ -118,7 +118,7 @@ public class WifiEntryPreference extends Preference implements WifiEntry.WifiEnt
notifyChanged();
}
setSummary(mWifiEntry.getSummary());
setSummary(mWifiEntry.getSummary(false /* concise */));
mContentDescription = buildContentDescription();
}

View File

@@ -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();