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

Commit 7833d183 authored by Philip P. Moltmann's avatar Philip P. Moltmann
Browse files

Deal with the case that no print services are installed.

Bug: 27530312
Change-Id: Idd709e66d72efcca4928b471f138f8be66e7ab00
parent da995778
Loading
Loading
Loading
Loading
+17 −14
Original line number Diff line number Diff line
@@ -584,6 +584,8 @@ public class PrintSettingsFragment extends ProfileSettingsPreferenceFragment
            // updated until this function is called again
            List<PrintServiceInfo> services =
                    printManager.getPrintServices(PrintManager.ALL_SERVICES);

            if (services != null) {
                final int serviceCount = services.size();
                for (int i = 0; i < serviceCount; i++) {
                    PrintServiceInfo service = services.get(i);
@@ -600,6 +602,7 @@ public class PrintSettingsFragment extends ProfileSettingsPreferenceFragment
                    data.screenTitle = screenTitle;
                    indexables.add(data);
                }
            }

            return indexables;
        }