Create new context with new resources

The old implementation of this function had the unintended side effect
of modifying the default configuration for the context which the caller
passed in. This CL avoids that by creating a new context with the new
configuration.

Test: atest SubscriptionControllerTest#testGetResourcesForSubId
Bug: 146481715
Change-Id: I6539817caa67e1100e50018fa0186993a1f56ccb
Merged-In: I6539817caa67e1100e50018fa0186993a1f56ccb
1 file changed