get App Info Compat
This function will query the ApplicationInfo of the packageName provided.
Will work only if Manifest.permission.QUERY_ALL_PACKAGES permission is present
Parameters
flags
are PackageManager.ApplicationInfoFlags and are listed as members of the PackageManager class.