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

Commit 555a59ad authored by Tony Mak's avatar Tony Mak
Browse files

Allow current profiles to disable keyguard

Test: make cts -j20 && cts-tradefed run cts --module CtsDevicePolicyManagerTestCases --test com.android.cts.devicepolicy.MixedManagedProfileOwnerTest#testScreenCaptureDisabled_allowedPrimaryUser
      It is not really a CTS verifies the change directly.
      But I can observe that keyguard is dismissed by a test running in managed profile

Bug: 34049587
Change-Id: I94e3d0cd01b10f31745781f35fdc8e3554994db8
parent 41270645
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -3850,9 +3850,9 @@ public class WindowManagerService extends IWindowManager.Stub
            return;
        }

        // If this isn't coming from the current user, ignore it.
        if (Binder.getCallingUserHandle().getIdentifier() != mCurrentUserId) {
            Log.d(TAG_WM, "non-current user, ignore disableKeyguard");
        // If this isn't coming from the current profiles, ignore it.
        if (!isCurrentProfileLocked(UserHandle.getCallingUserId())) {
            Log.d(TAG_WM, "non-current profiles, ignore disableKeyguard");
            return;
        }