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
Loading
Please register or sign in to comment