Deflake ServiceStateTracker test and others
Switching MccTable over to using TelephonyComponentFactory
in commit 42e5c2ccbf2d6a6a7319cd5003a938207e049020
appears to have made an existing flakiness problem worse:
Evidence from Treehugger suggests that
MccTable.updateMccMncConfiguration() (which started using
TelephonyComponentFactory to obtain a TimeServiceHelper) is
called in various places while a test may be running.
TelephonyTest's replacement of the static
TelephonyComponentFactory instance used by MccTable is probably
leading to spurious NullPointerExceptions.
This change allows logic to be shared while side-stepping
the test infrastructure issue implied.
This change also moves the replacement of static instances
of various fundamental telephony classes until after they have
been baseline configured: it's not a solution but reduces the
time window where there may be unconfigured mocks replacing
real instances.
Bug: 63743683
Test: atest FrameworksTelephonyTests
Test: Treehugger
(cherry picked from commit eff964878d590a8a74837c48bbb0e4ff4ff8f28f)
Merged-In: Ib93a87ab87464af93f8092434e971f09326973a4
Change-Id: Ib93a87ab87464af93f8092434e971f09326973a4
3 files changed