diff options
| author | Fabian Kozynski <kozynski@google.com> | 2022-01-04 18:10:59 -0500 |
|---|---|---|
| committer | Fabian Kozynski <kozynski@google.com> | 2022-01-04 18:13:32 -0500 |
| commit | 7e1bed5a2884241e97300c41f3715d2f9c9ced42 (patch) | |
| tree | 2c460589aa46961725ea265ef6dd8e9672a9149e /core/java/android/inputmethodservice/InputMethodService.java | |
| parent | f8660097ff862962305d6c645b76baf211347422 (diff) | |
Clear mocks in tests
Inline mocks were leaking and the accumulation of all of them throughout
all our test led to OOM.
In order to prevent memory leak
(https://github.com/mockito/mockito/issues/1614), use suggested fix in tests
(https://github.com/mockito/mockito/wiki/What's-new-in-Mockito-2#mockito-2250).
This fix uncovered a handful of leaked Handlers. Mitigated by removing
cleaning up on teardown, but they probably should be injected in the
future so we can directly use a TestableLooper (or an executor).
Test: atest SystemUITests
Fixes: 212492048
Change-Id: I108be93088d56863aa7dae5482229b74133d3105
Diffstat (limited to 'core/java/android/inputmethodservice/InputMethodService.java')
0 files changed, 0 insertions, 0 deletions
