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

Commit 321e0254 authored by Eric Biggers's avatar Eric Biggers
Browse files

Remove LockSettingsInternal from LockPatternUtils

LockPatternUtils is a utility class shared by system_server, Settings,
SystemUI, and other system processes.  Yet, some of its methods use
LockSettingsInternal.  These methods only work in system_server.
Callers of these methods should just use LockSettingsInternal directly.

Therefore, update all such callers to do just that.  Then remove the
LockPatternUtils versions of these methods.

No change in behavior intended, but a couple details worth calling
attention to:

- LockPatternUtils#setLockCredentialWithToken() had some extra code
  before it called into LockSettingsInternal.  I moved that into
  LockSettingsInternal, which already contained nearly the same code.

- UserManagerService now caches the LockSettingsInternal, like it does
  with the other local services.  LockPatternUtils did not cache it.

Bug: 408077877
Test: atest Frameworks{,Mocking}ServicesTests:com.android.server.{devicepolicy,locksettings,recoverysystem,trust}
Test: atest Frameworks{,Mocking}CoreTests:com.android.internal.widget
Flag: EXEMPT refactor
Change-Id: I72ddc018a0747f7914542bdebbec1d2a2f6bfcac
parent 4f2fdc03
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