private void buildInstalledPackagesCache ( Context context ) { final List < PackageInfo > installedPackages = context . getPackageManager ( ) . getInstalledPackages ( 0 ) ; for ( PackageInfo installedPackage : installedPackages ) { addInstalledPackageToCache ( installedPackage . packageName ) ; } }
Builds a cache of installed packages .