Skip to content

Instantly share code, notes, and snippets.

@btipling
Created January 4, 2012 09:32
Show Gist options
  • Save btipling/1559304 to your computer and use it in GitHub Desktop.
Save btipling/1559304 to your computer and use it in GitHub Desktop.
Filtering out system files on Android
/**
* Return whether the given PackgeInfo represents a system package or not.
* User-installed packages (Market or otherwise) should not be denoted as
* system packages.
*
* @param pkgInfo
* @return
*/
private boolean isSystemPackage(PackageInfo pkgInfo) {
return ((pkgInfo.applicationInfo.flags & ApplicationInfo.FLAG_SYSTEM) != 0) ? true
: false;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment