//@CalledByNative
void MediaPlayerListener::ReleaseResources()
{
    if (mContext != NULL) {
        // Unregister the wish for audio focus.
        AutoPtr<IAudioManager> am;
        AutoPtr<IInterface> obj;
        mContext->GetSystemService(IContext::AUDIO_SERVICE, (IInterface**)&obj);
        am = IAudioManager::Probe(obj);
        if (am != NULL) {
            Int32 result;
            am->AbandonAudioFocus(this, &result);
        }
    }
}