Delegate PrintServicesLoader to the framework's one

1. Remove the duplicated PrintServicesLoader in Settings
2. Make a androidx.loader in Settings and internally just delegate all calls to the real PrintServicesLoader
3. Get the result from the real loader

Test: manual
Fixes: 111581651
Change-Id: I2a9b3653f5c68f8383a468cd16ef5f7c3fd4bc3a
This commit is contained in:
Jason Chiu
2018-07-18 16:39:29 +08:00
parent ec7a9df676
commit 104e04dab4
4 changed files with 84 additions and 128 deletions

View File

@@ -168,7 +168,7 @@ public class PrintSettingsFragment extends ProfileSettingsPreferenceFragment
PrintManager printManager =
(PrintManager) getContext().getSystemService(Context.PRINT_SERVICE);
if (printManager != null) {
return new PrintServicesLoader(printManager, getContext(),
return new SettingsPrintServicesLoader(printManager, getContext(),
PrintManager.ALL_SERVICES);
} else {
return null;