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

Commit eff69128 authored by Doris Ling's avatar Doris Ling Committed by android-build-merger
Browse files

Merge "Update summary for Connected devices->Printing." into oc-dev am: 4bbfdb13

am: 38fc861a

Change-Id: I6329d63106ce55d324c284126459f03aea614ef5
parents 0ed1d928 38fc861a
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);