This line is described on the developer site but I did not understand it perfectly
Call getInstalledApplications() or getInstalledPackages(). Both methods should return a filtered list.
Actually, I need to test Testing package visibility behavior
https://developer.android.com/training/package-visibility/testing