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

Commit 82de3006 authored by Makoto Onuki's avatar Makoto Onuki
Browse files

Fix DO user restrictions persisting in UMS

<device_policy_restrictions> was *not* written in <guestRestrictions>.

<guestRestrictions>
    <restrictions no_sms="true" />
</guestRestrictions>
<device_policy_restrictions no_fun="true" no_adjust_volume="true" />

Fix the loading code.

Test: Manually set DO/PO restrictions, rebooted the device and checked with
dumpsys.

Bug 30949168

Change-Id: I8708a0b716852e3d981d2fe866f6628c0df80dcb
parent c83f46dc
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -1706,14 +1706,13 @@ public class UserManagerService extends IUserManager.Stub {
                                        UserRestrictionsUtils
                                                .readRestrictions(parser, mGuestRestrictions);
                                    }
                                } else if (parser.getName().equals(TAG_DEVICE_POLICY_RESTRICTIONS)
                                        ) {
                                    UserRestrictionsUtils.readRestrictions(parser,
                                            newDevicePolicyGlobalUserRestrictions);
                                }
                                break;
                            }
                        }
                    } else if (name.equals(TAG_DEVICE_POLICY_RESTRICTIONS)) {
                        UserRestrictionsUtils.readRestrictions(parser,
                                newDevicePolicyGlobalUserRestrictions);
                    } else if (name.equals(TAG_GLOBAL_RESTRICTION_OWNER_ID)) {
                        String ownerUserId = parser.getAttributeValue(null, ATTR_ID);
                        if (ownerUserId != null) {