Merge branch 'install-lint' into 'master'

Ignore lint for GET_UNINSTALLED_PACKAGES



See merge request !287
This commit is contained in:
Daniel Martí 2016-05-12 22:04:34 +00:00
commit d9f1215142
2 changed files with 2 additions and 0 deletions

View File

@ -236,6 +236,7 @@ public class PrivilegedInstaller extends Installer {
throws InstallFailedException {
ApplicationInfo appInfo;
try {
//noinspection WrongConstant (lint is actually wrong here!)
appInfo = mPm.getApplicationInfo(packageName, PackageManager.GET_UNINSTALLED_PACKAGES);
} catch (PackageManager.NameNotFoundException e) {
Log.w(TAG, "Failed to get ApplicationInfo for uninstalling");

View File

@ -66,6 +66,7 @@ public class AppDiff {
// This is a little convoluted because we want to get all uninstalled
// apps, but this may include apps with just data, and if it is just
// data we still want to count it as "installed".
//noinspection WrongConstant (lint is actually wrong here!)
mInstalledAppInfo = mPm.getApplicationInfo(pkgName,
PackageManager.GET_UNINSTALLED_PACKAGES);
if ((mInstalledAppInfo.flags & ApplicationInfo.FLAG_INSTALLED) == 0) {