Don't clone the locale redundantly in Configuration.setTo()

When updating an existing Configuration instance, don't create a new
clone of the pattern's embedded Locale unless it is materially different
from the existing instance's own.

Bug: 161264248
Test: boot & run
Test: atest AppConfigurationTests
Test: atest ConfigChangeTests
Test: atest LocaleListTest
Change-Id: I5dc0598b89305c488ba50c1774ecdabf939a6ccc
1 file changed