Ignore lint for GET_UNINSTALLED_PACKAGES
Lint says that only GET_META_DATA and GET_SHARED_LIBRARY_FILES are allowed. This contradicts Android's documentation where GET_UNINSTALLED_PACKAGES is also allowed. Fixes #605
This commit is contained in:
parent
768b3d7688
commit
0984a93133
@ -241,6 +241,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");
|
||||
|
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user