Buggy code:
public class DLNAController extends RemoteController { private static final String TAG = DLNAController . class . getSimpleName ( ) ; private static final long STATUS_UPDATE_INTERVAL_SECONDS = 3000L ; DLNADevice device ; ControlPoint controlPoint ; SubscriptionCallback callback ; private FileProxy proxy ; String rootLocation = "" ; boolean error = false ; final AtomicLong lastUpdate = new AtomicLong ( ) ; int currentPosition = 0 ; String currentPlayingURI ; boolean running = true ; boolean seekable = false ; public DLNAController ( DownloadService downloadService , ControlPoint controlPoint , DLNADevice device ) { } @ Override public void create ( final boolean playing , final int seconds ) { downloadService . setPlayerState ( PREPARING ) ; callback = new SubscriptionCallback ( getTransportService ( ) , 600 ) { @ Override protected void failed ( GENASubscription genaSubscription , UpnpResponse upnpResponse , Exception e , String msg ) { Log . w ( DLNAController . TAG , ( "Register<seq2seq4repair_space>subscription<seq2seq4repair_space>callback<seq2seq4repair_space>failed:<seq2seq4repair_space>" + msg ) , e ) ; } @ Override protected void established ( GENASubscription genaSubscription ) { startSong ( downloadService . getCurrentPlaying ( ) , playing , seconds ) ; } @ Override protected void ended ( GENASubscription genaSubscription , CancelReason cancelReason , UpnpResponse upnpResponse ) { } @ Override protected void eventReceived ( GENASubscription genaSubscription ) { Map < String , StateVariableValue > m = genaSubscription . getCurrentValues ( ) ; try { LastChange lastChange = new LastChange ( new AVTransportLastChangeParser ( ) , m . get ( "LastChange" ) . toString ( ) ) ; if ( playing || ( ( lastChange . getEventedValue ( 0 , TransportState . class ) ) == null ) ) { return ; } switch ( lastChange . getEventedValue ( 0 , TransportState . class ) . getValue ( ) ) { case PLAYING : downloadService . setPlayerState ( STARTED ) ; break ; case PAUSED_PLAYBACK : downloadService . setPlayerState ( PAUSED ) ; break ; case STOPPED : boolean failed = false ; for ( StateVariableValue val : m . values ( ) ) { if ( ( val . toString ( ) . indexOf ( "TransportStatus<seq2seq4repair_space>val=\"ERROR_OCCURRED\"" ) ) != ( - 1 ) ) { Log . w ( DLNAController . TAG , ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>load<seq2seq4repair_space>with<seq2seq4repair_space>event:<seq2seq4repair_space>" + ( val . toString ( ) ) ) ) ; failed = true ; } } if ( failed ) { failedLoad ( ) ; } else if ( ( downloadService . getPlayerState ( ) ) == ( PlayerState . STARTED ) ) { downloadService . setPlayerState ( COMPLETED ) ; <START_BUG> downloadService . next ( ) ; <END_BUG> } else { downloadService . setPlayerState ( STOPPED ) ; } break ; case TRANSITIONING : downloadService . setPlayerState ( PREPARING ) ; break ; case NO_MEDIA_PRESENT : downloadService . setPlayerState ( IDLE ) ; break ; default : } } catch ( Exception e ) { Log . w ( DLNAController . TAG , "Failed<seq2seq4repair_space>to<seq2seq4repair_space>parse<seq2seq4repair_space>UPNP<seq2seq4repair_space>event" , e ) ; failedLoad ( ) ; } } @ Override protected void eventsMissed ( GENASubscription genaSubscription , int i ) { } } ; controlPoint . execute ( callback ) ; } @ Override public void start ( ) { } @ Override public void stop ( ) { } @ Override public void shutdown ( ) { } @ Override public void updatePlaylist ( ) { } @ Override public void changePosition ( int seconds ) { } @ Override public void changeTrack ( int index , DownloadFile song ) { } @ Override public void setVolume ( int volume ) { } @ Override public void updateVolume ( boolean up ) { } @ Override public double getVolume ( ) { } @ Override public int getRemotePosition ( ) { } @ Override public boolean isSeekable ( ) { } private void startSong ( final DownloadFile currentPlaying , final boolean autoStart , final int position ) { } private void failedLoad ( ) { } private Service getTransportService ( ) { } private void getUpdatedStatus ( ) { } }

Fix:
downloadService . onSongCompleted ( ) ;