Update summary for Connected devices->Printing.
The summary text now shows the number of enabled print services. Update the flag to only select enabled service from PrintManager. Bug: 36234108 Test: make RunSettingsRoboTests Change-Id: I81e1584182edd1f290faa941c7d3ee711a9d67b8
This commit is contained in:
@@ -68,14 +68,15 @@ public class PrintSettingsFragmentTest {
|
||||
when(printServices.isEmpty()).thenReturn(false);
|
||||
when(printServices.size()).thenReturn(2);
|
||||
// 2 services
|
||||
when(mPrintManager.getPrintServices(PrintManager.ALL_SERVICES)).thenReturn(printServices);
|
||||
when(mPrintManager.getPrintServices(PrintManager.ENABLED_SERVICES))
|
||||
.thenReturn(printServices);
|
||||
|
||||
mSummaryProvider.setListening(true);
|
||||
|
||||
verify(mRes).getQuantityString(R.plurals.print_settings_summary, 2, 2);
|
||||
|
||||
// No service
|
||||
when(mPrintManager.getPrintServices(PrintManager.ALL_SERVICES)).thenReturn(null);
|
||||
when(mPrintManager.getPrintServices(PrintManager.ENABLED_SERVICES)).thenReturn(null);
|
||||
|
||||
mSummaryProvider.setListening(true);
|
||||
|
||||
|
Reference in New Issue
Block a user