Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1e19a670 authored by Paul Keith's avatar Paul Keith Committed by Michael Bestas
Browse files

UserRestrictionUtils: Return null Bundle if there are no restrictions

* This prevents passing in an empty Bundle object when
  creating a new RestrictionSet from legacyLocalRestrictions
* This causes issues with the tag device_policy_restrictions, which
  is the only case where we actually create a RestrictionSet object

Change-Id: Ibc1ee8fd170836c3b34a2e3c2e6e24405bf957fe
parent 1108fc36
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -355,6 +355,9 @@ public class UserRestrictionsUtils {
    public static Bundle readRestrictions(XmlPullParser parser) {
        final Bundle result = new Bundle();
        readRestrictions(parser, result);
        if (result.isEmpty()) {
            return null;
        }
        return result;
    }