Skip to content
Commit 97eaacba authored by Evan Laird's avatar Evan Laird
Browse files

Don't request profile owner as user if we don't have a valid user

ag/4891733 changed DevicePolicyManager#getProfileOwnerAsUser() to call
into DPMService.getProfileOwnerAsUser() instead of getProfileOwner(). It
turns out that getProfileOwnerAsUser doesn't accept invalid userIds but
the latter method did.

This CL guards against calling that method if we don't have a valid
userId. The calling code just wants to know if a profile is managed but
I'm pretty sure a UserRecord pointing at a non-user can't be managed.

Test: Expand QS, tap user switcher icon
Change-Id: Idfe46cb6c0d25ba3817ae3639f87de70bbce2d0b
Fixes: 113777483
parent a8aaa38d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment