Fix memory usage issue on WindowTokenClient
As WindowTokenClient#{onConfigurationChanged, onWindowTokenRemoved}
requires to post on mainthread, in case posting runnable accquires more
java objects to increase java heap memory, use PooledLambda to obtain
cached runnable for saving memory usage.
Also, use ActivityThread.currentActivityThread.getHandler to get the
main handler rather than creating the new object.
Fix: 215447496
Test: run MemoryOnBoot
Change-Id: Idb2c01a0da02ff669e1a3f1a55f4841f7aa258ba
1 file changed