Reduce chance for leak in MediaPlayerData

MediaPlayerData#getMediaPlayerIndex had a chance to leak
data if called with two existing keys. This refactor reduces
the responsibility of #getMediaPlayerIndex, and adds a new method,

Fixes: 191150828
Test: atest SystemUITests
Change-Id: I989ac5e7d169d43c9ef6aa09a44603323543b305
2 files changed