Skip to content
Commit 809b6fd7 authored by Michal Brzezinski's avatar Michal Brzezinski
Browse files

Fixing leaks in WindowMagnificationControllerTest

The main part of this fix is always using field of mWindowMagnificationController because it's always properly cleaned up in @After. Lack of cleaning in one test was causing the leak.
Additionally, I switched mock of Handler to FakeHandler - this alone fixes the problem but only by hiding the symptom. Anyway it's likely safer to use fake instead of mock and errors should not spill to other tests.
As an extra touch in the process this CL overrides default animator to use 0 time instead of the default one which takes some real time.

Fixes: 214021969
Test: adb shell am instrument -w -e \
class com.android.systemui.accessibility.WindowMagnificationControllerTest,com.android.systemui.controls.management.ControlsRequestDialogTest \
com.android.systemui.tests/androidx.test.runner.AndroidJUnitRunner

Change-Id: I9326e48dccd93acc82e271c9eb7f137090c83dd3
parent 7b422dc1
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