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

Commit 1b4ab485 authored by Ayush Sharma's avatar Ayush Sharma Committed by Automerger Merge Worker
Browse files

Merge "Return PO or DO for POLICY_SUSPEND_PACKAGES" into sc-qpr1-dev am: 3c7c22f4 am: 1ae887c0

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16659231

Change-Id: I7f3bd1b324baeff177811ffd338c9f668499e759
parents ebe15642 1ae887c0
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -13186,12 +13186,17 @@ public class DevicePolicyManagerService extends BaseIDevicePolicyManager {
    /**
     * @param restriction The restriction enforced by admin. It could be any user restriction or
     *                    policy like {@link DevicePolicyManager#POLICY_DISABLE_CAMERA} and
     *                    {@link DevicePolicyManager#POLICY_DISABLE_SCREEN_CAPTURE}.
     *                    policy like {@link DevicePolicyManager#POLICY_DISABLE_CAMERA},
     *                    {@link DevicePolicyManager#POLICY_DISABLE_SCREEN_CAPTURE} and  {@link
     *                    DevicePolicyManager#POLICY_SUSPEND_PACKAGES}.
     */
    private Bundle getEnforcingAdminAndUserDetailsInternal(int userId, String restriction) {
        Bundle result = null;
        if (restriction == null) {
        // For POLICY_SUSPEND_PACKAGES return PO or DO to keep the behavior same as
        // before the bug fix for b/192245204.
        if (restriction == null || DevicePolicyManager.POLICY_SUSPEND_PACKAGES.equals(
                restriction)) {
            ComponentName profileOwner = mOwners.getProfileOwnerComponent(userId);
            if (profileOwner != null) {
                result = new Bundle();