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

Skip to content
Commit 1867db33 authored by Alex Johnston's avatar Alex Johnston
Browse files

Prevent location for the work profile from being enabled

* Previously the user could still enable location for the work profile
  even after enabling DISALLOW_CONFIG_LOCATION. This was because the
  LocationForWorkPreferenceController checked whether the base restriction
  was set and whether the restriction was enforced by the admin in the
  same condition.
* This was fixed by giving the admin precedence and moving the check for
  the base restriction to only be checked if the admin has not enforced
  the DISALLOW_CONFIG_LOCATION or DISALLOW_SHARING_LOCATION restriction.

Bug: 147758996
Test: Manual testing with Settings and TestDPC
      atest com.android.settings.location.LocationForWorkPreferenceControllerTest

Change-Id: Ide341f2dab4f59f26ffa0c929ba412d61b6ebf1a
parent 8b15d86c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment