[SettingsProvider] use per-prefix caches for Config.getStrings queries

Previously all values are cached in the same map, which is inefficient
for Config.getStrings queries which request for multiple settings under
the same prefix and we have look-up the whole cache multiple times. It is
better to have per-prefix caches which only requires one look up per
prefix, and subsequent searches inside the prefix cache would be faster
as well because each per-prefix cache is much smaller.

BUG: 316866951
Test: atest CtsDeviceConfigTestCases CtsPermissionUiTestCases CtsDisplayTestCases CtsAutoFillServiceTestCases SettingsProviderTest CtsProviderTestCases

Change-Id: Ifb4ff91cc034405227d9614bf1029d2a70901bce
1 file changed