Reduce cost of FooterView#showHistory

FooterView#showHistory could take up to 3ms to execute due to resource
fetching. The strings are now cached and we abort earlier when possible.

Now the method is executed withing 800us

Bug: 210432290
Test: atest FooterViewTest
Test: https://ui.perfetto.dev/#!/?s=cf1a328f424429fd30f131cd31c7d17c8ff412eb5ae1cfeec272c5f2d5a1c5e
Change-Id: If09c47646e168e8dded17b59be8573d0a9386eb9
1 file changed