Deal with the case that no print services are installed.
am: 7833d183e7
* commit '7833d183e7ddeaf08938b9db6d8714185e11901f':
Deal with the case that no print services are installed.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user