Skip to content
Commit 4602e87f authored by Pavel Grafov's avatar Pavel Grafov
Browse files

Drive-by fix for wtfIfInLock + two violations

wtfIfInLock() method was checking 'this' lock while the code is
actually using mLockDoNoUseDirectly returned by getLockObject(),
thus violation werent reported. This CL changes this and fixes
violations when calling hasIncompatibleAccountsOrNonAdbNoLock.
Also move it to other lock-related methods.

Bug: 162815601
Test: atest com.android.cts.devicepolicy.DeviceOwnerTest#testDeviceOwnerSetup
Test: atest com.android.cts.devicepolicy.ProfileOwnerTest#testManagement
Test: manual: add account, attempt setting a DO
Change-Id: Id64930552f5a9b25464ba942b0b1ddbe9378928e
parent 1b2c6656
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