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

Skip to content
Commit 62c089ce authored by Yohei Yukawa's avatar Yohei Yukawa
Browse files

Mock local services in a more reliable way

This is a preparation before making

  InputMethodManagerService#mImeDrawsImeNavBarRes

multi-user ready.

As discussed in https://github.com/mockito/mockito/issues/2142, mocked
static methods are available only in the calling thread. For testing
purposes just calling

  LocalServices.addService()

to inject mocked local services then removing them with

  LocalServices.removeAllServicesForTest()

would be much more simpler and easier to understand.

Bug: 345519864
Test: atest FrameworksInputMethodSystemServerTests
Flag: TEST_ONLY
Change-Id: If2d5e8ae6e002de9698c6a8eda489a6824f244e7
parent c7aa0be4
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