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

Commit e8568568 authored by Lais Andrade's avatar Lais Andrade
Browse files

Remove BenchmarkRule pause/resume calls outside test loop

Fix ViewPerfTest to remove the calls to pause/resume benchmark
timings outside the main test loop, which started to cause NPE
after a library update.

Change-Id: Ie3772ee7554ec1ff32a412cfd5cedfe970fbe186
Fix: 399277699
Test: ViewPerfTest
Flag: EXEMPT test only
parent 0a40deba
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -84,12 +84,10 @@ public class ViewPerfTest {

        final BenchmarkState state = mBenchmarkRule.getState();
        mActivityRule.runOnUiThread(() -> {
            state.pauseTiming();
            View view = new View(mContext);
            mActivityRule.getActivity().setContentView(view);
            assertTrue("View needs to be attached to Window to perform haptic feedback",
                    view.isAttachedToWindow());
            state.resumeTiming();

            // Disable settings so perform will never be ignored.
            int flags = HapticFeedbackConstants.FLAG_IGNORE_VIEW_SETTING