Fix a race in NotifyPowerBoostTest.
There is a race on stack variables being used by the closure passed to
`mFlinger.scheduler()->replaceTouchTimer` and them going out of scope
and being destroyed. This manifested in hwasan error as in the linked bug.
On a real device, I was able to reproduce as a deadlock or crash with
```
adb root; TEST=libsurfaceflinger_unittest; m $TEST && adb sync data && adb shell -t /data/nativetest64/$TEST/$TEST --gtest_filter=DisplayTransactionTest.notifyPowerBoostNotifiesTouchEvent --gtest_repeat=20
```
With this patch, all runs complete successfully.
Bug: 432535792
Test: unit
Flag: EXEMPT test only
Change-Id: Ic8eeefc1afb0706ddc84e7e8c9c9998bf4e901be
1 file changed