Reduce unnecessary overhead of always-true predicate lambda
Currently compiler always generates new class as
$$ExternalSyntheticLambda* on every invocation place.
And a new instance will be always created on invocation no matter
whether the lambda is capturing arguments or not.
By using an explicit shared instance, it can reduce synthetic class
and method generation. Also reduce 4 instructions per invocation:
new-instance, invoke-direct, check-cast, invoke-static.
Bug: 163976519
Test: CtsWindowManagerDeviceActivity
Change-Id: I71a89713d64f0605faf6045ba44389a8eb47f3d5
5 files changed