Support for nested bundles in setApplicationRestrictions

Replaced RestrictionUtils.restrictionsToBundle with RestrictionsManager.
convertRestrictionsToBundle.

Bug: 19540606
Change-Id: I32b264e04d5d177ea5b4c39a8ace5ee0ce907970
This commit is contained in:
Fyodor Kupolov
2015-03-23 18:57:24 -07:00
parent bca21083a3
commit 2b2ab5a947
2 changed files with 4 additions and 17 deletions

View File

@@ -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;
}
}