Support for nested bundles in setApplicationRestrictions
Replaced RestrictionUtils.restrictionsToBundle with RestrictionsManager. convertRestrictionsToBundle. Bug: 19540606 Change-Id: I32b264e04d5d177ea5b4c39a8ace5ee0ce907970
This commit is contained in:
@@ -90,18 +90,4 @@ public class RestrictionUtils {
|
||||
}
|
||||
um.setUserRestrictions(userRestrictions, user);
|
||||
}
|
||||
|
||||
public static Bundle restrictionsToBundle(ArrayList<RestrictionEntry> entries) {
|
||||
final Bundle bundle = new Bundle();
|
||||
for (RestrictionEntry entry : entries) {
|
||||
if (entry.getType() == RestrictionEntry.TYPE_BOOLEAN) {
|
||||
bundle.putBoolean(entry.getKey(), entry.getSelectedState());
|
||||
} else if (entry.getType() == RestrictionEntry.TYPE_MULTI_SELECT) {
|
||||
bundle.putStringArray(entry.getKey(), entry.getAllSelectedStrings());
|
||||
} else {
|
||||
bundle.putString(entry.getKey(), entry.getSelectedString());
|
||||
}
|
||||
}
|
||||
return bundle;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user