Refine calls related to process global configuration

updateFrom is an expensive method, and we want to avoid it if possible.
If a process has not register to any display as a configuration change
listener, we do not need to do the manual merge in getConfiguration.

Another improvement is, as getGlobalConfiguration returns the
mFullConfiguration itself without copy, getProcessGlobalConfiguration
should be safe to do the same thing. Remove the copy to furthur
accelerate the related calls. But make a copy before changing it in
getConfiguration.

Test: go/wm-smoke
Test: ddms shows a great performance improvement
Test: atest com.android.uibench.janktests.UiBenchJankTests
Bug: 129269005
Bug: 129389526
Change-Id: Ie560917d57932e58bf1db796814eb1c519706f35
2 files changed