public class PackageInfoAssembler
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
PackageInfoAssembler.Type |
Constructor and Description |
---|
PackageInfoAssembler(PackageInfoAssembler.Type type,
PackageInfoAssembler.Type... types)
Same as
PackageInfoAssembler constructor, but will use the current's packageName |
PackageInfoAssembler(java.lang.String packageName,
PackageInfoAssembler.Type type,
PackageInfoAssembler.Type... types)
Creates and configures a new assembler which uses given types as request for the info to return
in
createSection(Context, boolean) . |
Modifier and Type | Method and Description |
---|---|
static java.util.List<PageEntry<?>> |
createApkStateInfo(android.content.pm.PackageInfo packageInfo)
Includes info about when and where the apk was installed
|
static java.util.List<PageEntry<?>> |
createPmActivitiesInfo(android.content.pm.PackageInfo packageInfo)
Lists all defined activities with additional meta-data
|
static java.util.List<PageEntry<?>> |
createPmApkVersionInfo(android.content.pm.PackageInfo packageInfo)
Includes info about when and where the apk was installed
|
static java.util.List<PageEntry<?>> |
createPmBroadcastReceiversInfo(android.content.pm.PackageInfo packageInfo)
Lists all defined broadcast receivers with additional meta-data
|
static java.util.List<PageEntry<?>> |
createPmDeclaredSystemFeatureInfo(android.content.Context context,
android.content.pm.PackageInfo packageInfo)
Creates entries for all declared system features (see Manifest <uses-feature> tags)
Uses
DefaultProperties.createSystemFeatureInfo(Context, Map) call. |
static java.util.List<PageEntry<?>> |
createPmPermissionInfo(android.content.Context context,
android.content.pm.PackageInfo packageInfo,
boolean onlyDangerousPermissions)
Returns page-entry for each defined permission in the app (the passed activity belongs to).
|
static java.util.List<PageEntry<?>> |
createPmProviderInfo(android.content.pm.PackageInfo packageInfo)
Lists all defined providers with additional meta-data
|
static java.util.List<PageEntry<?>> |
createPmServiceInfo(android.content.pm.PackageInfo packageInfo)
Lists all defined services with additional meta-data
|
static java.util.List<PageEntry<?>> |
createPmSignatureHashInfo(android.content.pm.PackageInfo packageInfo)
Creates page-entries for all the apks signatures and shows sh256 hash of it
|
Section |
createSection(android.content.Context context)
Same as
createSection(Context, boolean) but will include all sub headers |
Section |
createSection(android.content.Context context,
boolean addSectionHeaders)
Creates a section containing all requested types with or without sub headers for each type.
|
public PackageInfoAssembler(PackageInfoAssembler.Type type, PackageInfoAssembler.Type... types)
PackageInfoAssembler
constructor, but will use the current's packageNametype
- must provide types - each type will request a certain packageManager info category (see PackageInfoAssembler.Type
public PackageInfoAssembler(java.lang.String packageName, PackageInfoAssembler.Type type, PackageInfoAssembler.Type... types)
createSection(Context, boolean)
.packageName
- for which packageName (ie. app) you want the info fortype
- must provide types - each type will request a certain packageManager info category (see PackageInfoAssembler.Type
public Section createSection(android.content.Context context)
createSection(Context, boolean)
but will include all sub headerscontext
- must not be null, used for getting the PackageManager
public Section createSection(android.content.Context context, boolean addSectionHeaders)
context
- must not be null, used for getting the PackageManager
addSectionHeaders
- if true includes a section header before very typepublic static java.util.List<PageEntry<?>> createPmApkVersionInfo(android.content.pm.PackageInfo packageInfo)
packageInfo
- from PackageManager.getPackageInfo(String, int)
public static java.util.List<PageEntry<?>> createPmServiceInfo(android.content.pm.PackageInfo packageInfo)
packageInfo
- from PackageManager.getPackageInfo(String, int)
requiring PackageManager.GET_SERVICES
flagpublic static java.util.List<PageEntry<?>> createPmBroadcastReceiversInfo(android.content.pm.PackageInfo packageInfo)
packageInfo
- from PackageManager.getPackageInfo(String, int)
requiring PackageManager.GET_RECEIVERS
flagpublic static java.util.List<PageEntry<?>> createPmProviderInfo(android.content.pm.PackageInfo packageInfo)
packageInfo
- from PackageManager.getPackageInfo(String, int)
requiring PackageManager.GET_PROVIDERS
flagpublic static java.util.List<PageEntry<?>> createPmActivitiesInfo(android.content.pm.PackageInfo packageInfo)
packageInfo
- from PackageManager.getPackageInfo(String, int)
requiring PackageManager.GET_ACTIVITIES
flagpublic static java.util.List<PageEntry<?>> createApkStateInfo(android.content.pm.PackageInfo packageInfo)
packageInfo
- from PackageManager.getPackageInfo(String, int)
public static java.util.List<PageEntry<?>> createPmSignatureHashInfo(android.content.pm.PackageInfo packageInfo)
packageInfo
- from PackageManager.getPackageInfo(String, int)
requiring PackageManager.GET_SIGNATURES
flagpublic static java.util.List<PageEntry<?>> createPmPermissionInfo(android.content.Context context, android.content.pm.PackageInfo packageInfo, boolean onlyDangerousPermissions)
See DefaultProperties.createSectionRuntimePermissions(Activity, List)
for more details
context
- must not be null and must be instance of activity (needed for getting the state)packageInfo
- from PackageManager.getPackageInfo(String, int)
requiring PackageManager.GET_PERMISSIONS
flagonlyDangerousPermissions
- only include permissions with flag PROTECTION_DANGEROUS (ie. have to be granted by the user)public static java.util.List<PageEntry<?>> createPmDeclaredSystemFeatureInfo(android.content.Context context, android.content.pm.PackageInfo packageInfo)
DefaultProperties.createSystemFeatureInfo(Context, Map)
call.context
- must not be nullpackageInfo
- from PackageManager.getPackageInfo(String, int)
requiring PackageManager.GET_CONFIGURATIONS
flag