title: AUDIOFOCUS_GAIN doesn't called after AUDIOFOCUS_LOSS_TRANSIENT after a phone call
body: <p>I've got a typical <code>onAudioFocusChange</code> code in my game. </p>
  
  <pre><code>@Override
  public void onAudioFocusChange(int focusChange) {
      switch (focusChange) {
          case AudioManager.AUDIOFOCUS_GAIN:
              Log.i(TAG,"AUDIOFOCUS_GAIN");
              mHasAudioFocus = requestAudioFocus();
              break;
          case AudioManager.AUDIOFOCUS_LOSS:
              Log.i(TAG,"AUDIOFOCUS_LOSS");
              abandonAudioFocus();
              break;
          case AudioManager.AUDIOFOCUS_LOSS_TRANSIENT:
              Log.i(TAG,"AUDIOFOCUS_LOSS_TRANSIENT");
              abandonAudioFocus();
              break;
          case AudioManager.AUDIOFOCUS_LOSS_TRANSIENT_CAN_DUCK:
              Log.i(TAG,"AUDIOFOCUS_LOSS_TRANSIENT_CAN_DUCK");
              abandonAudioFocus();
              break;
          default:
              Log.i(TAG,"Unrecognized audiofocus change");
      }
  </code></pre>
  
  <p>The issue is, that when a floating window appears on <em>Samsung</em> phones the application receives <code>AUDIOFOCUS_LOSS_TRANSIENT</code> message, but when this window is closed, no message comes to the application.   </p>
  
  <p><a href="https://i.stack.imgur.com/JwT1w.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/JwT1w.jpg" alt="enter image description here"></a></p>
  
  <p>Here are relevant log lines:</p>
  
  <pre><code>13:20:53.253   770  7745 I MediaFocusControl:  AudioFocus  requestAudioFocus() from AudioFocus_For_Phone_Ring_And_Calls
  13:20:53.253 14499 14499 I com.js.helpers.JSNativeActivity: AUDIOFOCUS_LOSS_TRANSIENT
  13:20:53.253 14499 14499 I com.js.helpers.JSNativeActivity: abandonAudioFocus()
  13:20:53.253 14499 14499 I JSNativeActivity: onAbandonAudioFocus
  13:20:53.253   770  1508 I MediaFocusControl:  AudioFocus  abandonAudioFocus() from android.media.AudioManager$42599770com.js.helpers.JSNativeActivity$4252c788
  13:20:53.253   770  1508 I MediaFocusControl: AudioFocus  removeFocusStackEntry(): removing entry for android.media.AudioManager$42599770com.js.helpers.JSNativeActivity$4252c788
  13:21:01.383   770  1220 I MediaFocusControl:  AudioFocus  abandonAudioFocus() from AudioFocus_For_Phone_Ring_And_Calls
  </code></pre>
  
  <p>Any ideas how to catch closing of this window? </p>