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

Skip to content
Commit 7f44da66 authored by Eric Biggers's avatar Eric Biggers
Browse files

DPMS: add permission check to getDeviceOwnerLockScreenInfo()

The public API DPMS.getDeviceOwnerLockScreenInfo() currently doesn't
require any permission, as it doesn't check for one itself, and it uses
ILockSettings.getString() which doesn't check for a permission either.

We're fixing ILockSettings.getString() to check for
ACCESS_KEYGUARD_SECURE_STORAGE.  Therefore, to keep
DPMS.getDeviceOwnerLockScreenInfo() working for DPCs, make it explicitly
check for the device or profile owner before calling into ILockSettings
with a cleared calling identity.

Note, this is the same permission check that
DPMS.setDeviceOwnerLockScreenInfo() does.

Bug: 256170784
Test: m cts && atest com.android.cts.devicepolicy.MixedDeviceOwnerTest#testLockScreenInfo
Change-Id: Ic81d04b7c3746fa2da65f932ca28cb852fdeccb8
parent 6ec1f430
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