Guess the correct routing when initializing AudioModeProvider

Previously the default route for AudioModeProvider is ROUTE_EARPIECE. The in call ProximitySensor is initialized before InCallServiceImpl is fully bound, and the real route is not updated by telecom yet, which will cause a proximity wake lock to be held on bluetooth and turn off the screen.

In this CL, when initializing AudioModeProvider the routing will be guessed based on what audio devices is connected.

Bug: 64211001
Test: AudioModeProviderTest
PiperOrigin-RevId: 165987811
Change-Id: I0a976a9654fbf5b6f966d45d219a3d3685b207f5
2 files changed
tree: ce87abb3781be4bd6c062becdb6f86178ece8c46
  1. assets/
  2. java/
  3. Android.mk
  4. AndroidManifest.xml
  5. CleanSpec.mk
  6. LICENSE