Only force notification visible from focus loss on Honeycomb or above

This commit is contained in:
Christopher Eby 2012-02-21 01:56:54 -06:00
parent dba5d4f1b9
commit b5fedb6993

View File

@ -1704,7 +1704,12 @@ public final class PlaybackService extends Service
case AudioManager.AUDIOFOCUS_LOSS:
case AudioManager.AUDIOFOCUS_LOSS_TRANSIENT:
mDuckedLoss = false;
mForceNotificationVisible = true;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
// On Honeycomb and above we have controls in the notification.
// Ensure they are shown when music is paused from focus loss
// so music can easily be started again if desired.
mForceNotificationVisible = true;
}
unsetFlag(FLAG_PLAYING);
break;
case AudioManager.AUDIOFOCUS_GAIN: