Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4bbfdb13 authored by Doris Ling's avatar Doris Ling Committed by Android (Google) Code Review
Browse files

Merge "Update summary for Connected devices->Printing." into oc-dev

parents 28e35fcf c5f41204
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -529,7 +529,7 @@ public class PrintSettingsFragment extends ProfileSettingsPreferenceFragment
            if (mPrintManager != null) {
                if (isListening) {
                    List<PrintServiceInfo> services =
                            mPrintManager.getPrintServices(PrintManager.ALL_SERVICES);
                            mPrintManager.getPrintServices(PrintManager.ENABLED_SERVICES);
                    if (services == null || services.isEmpty()) {
                        mSummaryLoader.setSummary(this,
                                mContext.getString(R.string.print_settings_summary_no_service));
+3 −2
Original line number Diff line number Diff line
@@ -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);