If the service doesn't exist when the media server crashes, Eleven
will crash when creating the TrackErrorInfo object. The SERVER_DIED
message is processed only when the service is not null, so just
ignore the MEDIA_ERROR_SERVER_DIED message if service is null.
BUGBASH-1045
Change-Id: Idaf3e238eefd412ebb85244b48ad7b20bc049ff0
switch (what) {
case MediaPlayer.MEDIA_ERROR_SERVER_DIED:
final MusicPlaybackService service = mService.get();
+ if (service == null) {
+ return false;
+ }
final TrackErrorInfo errorInfo = new TrackErrorInfo(service.getAudioId(),
service.getTrackName());