Hidden ApplicationInfo flags are now in privateFlags.
See b9f8a5204a1b0b3919fa921e858d04124c582828. Change-Id: I98bbe4b1a5ac0939e0000e4da8b21a1964c75e8b
This commit is contained in:
@@ -370,7 +370,7 @@ public class AppRestrictionsFragment extends SettingsPreferenceFragment implemen
|
||||
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);
|
||||
@@ -637,9 +637,10 @@ public class AppRestrictionsFragment extends SettingsPreferenceFragment implemen
|
||||
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() {
|
||||
|
Reference in New Issue
Block a user