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

Commit 8616af1a authored by Amith Yamasani's avatar Amith Yamasani
Browse files

Setup correct initial guest restrictions

Disable SMS by default, in addition to any other the primary
user may have set.

Bug: 16474761
Change-Id: I67b510ac72c2adfcafd95fb34e50ab5d8194090a
parent ad3aa32f
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -625,8 +625,9 @@ public class UserManager {
            Settings.Secure.putStringForUser(context.getContentResolver(),
                    Settings.Secure.SKIP_FIRST_USE_HINTS, "1", guest.id);
            try {
                mService.setUserRestrictions(
                        mService.getDefaultGuestRestrictions(), guest.id);
                Bundle guestRestrictions = mService.getDefaultGuestRestrictions();
                guestRestrictions.putBoolean(DISALLOW_SMS, true);
                mService.setUserRestrictions(guestRestrictions, guest.id);
            } catch (RemoteException re) {
                Log.w(TAG, "Could not update guest restrictions");
            }