use of android.content.pm.ModuleInfo in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class ModuleLicensesPreferenceController method displayPreference.
@Override
public void displayPreference(PreferenceScreen screen) {
super.displayPreference(screen);
PackageManager packageManager = mContext.getPackageManager();
List<ModuleInfo> modules = packageManager.getInstalledModules(0);
PreferenceGroup group = screen.findPreference(getPreferenceKey());
modules.stream().sorted(Comparator.comparing(o -> o.getName().toString())).filter(new Predicate(mContext)).forEach(module -> group.addPreference(new ModuleLicensePreference(group.getContext(), module)));
}
Aggregations