MediaSessionLegacyHelper uses global Application context

MediaSessionLegacyHelper used a Context passed by an application
  which can cause a leak of Activity instances. Use the global
  Application context instead.
Also prevent crash if a null Context is supplied (method not
  documented as requesting a non-null Context).

Bug 18767503

Change-Id: I8281047d0af233a323f3fc11ababedff848829ec
1 file changed