Bug 1181660 - Restricted profiles: At least one restriction has to be enabled in order to be a restricted profile. r=ally

This commit is contained in:
Sebastian Kaspari 2015-07-15 13:14:14 +02:00
parent c450b397d1
commit 2d069af658

View File

@ -195,7 +195,15 @@ public class RestrictedProfiles {
return false;
}
return !getRestrictions(context).isEmpty();
Bundle restrictions = getRestrictions(context);
for (String key : restrictions.keySet()) {
if (restrictions.getBoolean(key)) {
// At least one restriction is enabled -> We are a restricted profile
return true;
}
}
return false;
}
public static boolean isAllowed(final Context context, final Restriction action) {