Cache flag value to prevent performance regressions

Cache the value of the enable_per_device_input_latency_metrics flag
to prevent performace regressions.

Bug: 369812450
Test: atest inputflinger_tests
Flag: com.android.input.flags.enable_per_device_input_latency_metrics
Change-Id: I7afc2eb5ce25ae4be12bcb836f8645f1168b9e94
2 files changed