am e029b91c: am 1d33bca0: Merge "Hidden ApplicationInfo flags are now in privateFlags."
* commit 'e029b91c53323c27ea18a57c6af8c00ecab5576b':
Hidden ApplicationInfo flags are now in privateFlags.
diff --git a/src/com/android/settings/search/Index.java b/src/com/android/settings/search/Index.java
index 3957cf6..5dbf24f 100644
--- a/src/com/android/settings/search/Index.java
+++ b/src/com/android/settings/search/Index.java
@@ -448,7 +448,8 @@
final PackageManager pm = mContext.getPackageManager();
try {
PackageInfo packInfo = pm.getPackageInfo(packageName, 0);
- return ((packInfo.applicationInfo.flags & ApplicationInfo.FLAG_PRIVILEGED) != 0);
+ return ((packInfo.applicationInfo.privateFlags
+ & ApplicationInfo.PRIVATE_FLAG_PRIVILEGED) != 0);
} catch (PackageManager.NameNotFoundException e) {
return false;
}
diff --git a/src/com/android/settings/users/AppRestrictionsFragment.java b/src/com/android/settings/users/AppRestrictionsFragment.java
index faaa333..37b1813 100644
--- a/src/com/android/settings/users/AppRestrictionsFragment.java
+++ b/src/com/android/settings/users/AppRestrictionsFragment.java
@@ -348,7 +348,7 @@
Log.d(TAG, "Installing " + packageName);
}
}
- if (info != null && (info.flags&ApplicationInfo.FLAG_HIDDEN) != 0
+ if (info != null && (info.privateFlags&ApplicationInfo.PRIVATE_FLAG_HIDDEN) != 0
&& (info.flags&ApplicationInfo.FLAG_INSTALLED) != 0) {
disableUiForPackage(packageName);
mIPm.setApplicationHiddenSettingAsUser(packageName, false, userId);
@@ -615,9 +615,10 @@
private boolean isAppEnabledForUser(PackageInfo pi) {
if (pi == null) return false;
final int flags = pi.applicationInfo.flags;
+ final int privateFlags = pi.applicationInfo.privateFlags;
// Return true if it is installed and not hidden
return ((flags&ApplicationInfo.FLAG_INSTALLED) != 0
- && (flags&ApplicationInfo.FLAG_HIDDEN) == 0);
+ && (privateFlags&ApplicationInfo.PRIVATE_FLAG_HIDDEN) == 0);
}
private void populateApps() {