Update print jobs appropriately in the print settings.

- Always use a fresh print job as once the print job goes away it cannot
  be read. Before we were stuck with the last state which might not been
  the last state
- make loaders relative to fragment to avoid loader id duplications with
  other ids of the activity.

Fixes: 28315242
Change-Id: I57eeb64b44b5d77b2092c22b175407131f7baf97
This commit is contained in:
Philip P. Moltmann
2016-04-21 15:15:37 -07:00
parent 1624f69ac9
commit eb01628ba8
3 changed files with 19 additions and 21 deletions

View File

@@ -606,7 +606,7 @@ public class PrintServiceSettingsFragment extends SettingsPreferenceFragment
@Override
public Loader<List<PrinterInfo>> onCreateLoader(int id, Bundle args) {
if (id == LOADER_ID_PRINTERS_LOADER) {
return new PrintersLoader(getActivity());
return new PrintersLoader(getContext());
}
return null;
}