Allow media apps to receive media key events after the phone call

This CL makes the global priority session (i.e. media session of the
Telecom) to be received media key events only if it's active.
This makes the global priority session as an exception of the media
button handling logic, which sends the media key events to the lastly
played media app.

Bug: 37910759
Test: Run CTS tests (MediaSessionTest, MediaSessionManagerTest,
   and CtsMediaHostTestCases) and manual test (Media apps receives the
   media keys after the phone call, and was able to answer/end the call)
Change-Id: I080dfcae9c9690628ed339ad9325633d818a9591
2 files changed