Change the resource cache key and limit the maximum size of cache

Change the key valus of ResoucesCache. Key contains package name and
configuration of resources.
Even the same context object can return different resources depending
on its state, such as language changes. So a Configuration that can
logically distinguish whether a resource is logically equal can be
used as a key. (context does not have localical equals for resources)
Also, since unique resources can be used for each package, package
name is added as a resource cache key.

Bug: 289045241
Test: atest CtsTelephonyTestCases
Test: atest CellBroadcastServiceTests
Test: atest GoogleCellBroadcastReceiverUnitTests
Test: manually perform telephony tests and sanity checks
Change-Id: Iacd2b350a4f32d52aae63038303413c0768185fa
1 file changed