Replace the RequestRecommendationCaller if the timeout changes.

The timeout associated with a TimedRemoteCaller can't be changed
after creation so we have to create a new instance anytime the
timeout changes (which shouldn't be too often). The instance is
stored and retrieved from an AtomicReference to avoid concurrency
issues.

Test: runtest frameworks-services -c com.android.server.NetworkScoreServiceTest
Bug: 34060959
Change-Id: I52f5d617feb9b3536ff3474b5d032113e3caea5c
Merged-In: I1662ac27f7442a16d2ffd7257469f1983b7f0e5c
1 file changed