DataLoaderImpl

Implementation of DataLoader that uses a AbstractAppDataListFactory to load initial data and PackageManagerHelper to load data on demand.

It maintains a lazy-loaded map for labels and uses a CachedLoader for icons to optimize performance by caching previously loaded data.

Constructors

Link copied to clipboard
constructor(factory: AbstractAppDataListFactory, packageManagerHelper: PackageManagerHelper)

Functions

Link copied to clipboard

Creates an application icon Drawable for the given AppInfo.

Link copied to clipboard
open override fun getLabel(key: AppInfo): String

Gets the label for the given AppInfo key.

Link copied to clipboard
open override fun loadIcon(key: AppInfo): Flow<Drawable>

Loads the icon for the given AppInfo as a Flow of Drawable.