Deal with the case that no print services are installed.
Bug: 27530312 Change-Id: Idd709e66d72efcca4928b471f138f8be66e7ab00
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