app/src/main/java/fi/finwe/orion360/sdk/pro/examples/engine/ExoPlayerWrapper.java
@Override
    protected boolean processResetPlayer() {
        // At this moment we can be in any state.
        // Decide what to do depending on the current state.
        boolean stop = false;
        boolean reset = false;
        synchronized (mCurrentStatus) {
            switch (mCurrentStatus.playerState) {
                case STARTED:
                case PAUSED:
                case PLAYBACK_COMPLETED:
                    stop = true;
                    break;
                case ERROR:
                case INITIALIZED:
                case PREPARED:
                case STOPPED:
                case PREPARING:
                    reset = true;
                    break;
                case IDLE:
                case END:
                    mCurrentStatus.uri = null;
                    break;
            }
        }
        if (stop) {
            doStop();
        } else if (reset) {
            doReset();
        }
        return false;
    }
// except END, which shouldn't happen.
except END, which shouldn't happen.
except END which shouldn ' t happen .
@Override
    protected boolean processResetPlayer() {
        boolean stop = false;
        boolean reset = false;
        synchronized (mCurrentStatus) {
            switch (mCurrentStatus.playerState) {
                case STARTED:
                case PAUSED:
                case PLAYBACK_COMPLETED:
                    stop = true;
                    break;
                case ERROR:
                case INITIALIZED:
                case PREPARED:
                case STOPPED:
                case PREPARING:
                    reset = true;
                    break;
                case IDLE:
                case END:
                    mCurrentStatus.uri = null;
                    break;
            }
        }
        if (stop) {
            doStop();
        } else if (reset) {
            doReset();
        }
        return false;
    }
@ Override protected boolean processResetPlayer ( ) { boolean stop = false ; boolean reset = false ; synchronized ( mCurrentStatus ) { switch ( mCurrentStatus . playerState ) { case STARTED : case PAUSED : case PLAYBACK_COMPLETED : stop = true ; break ; case ERROR : case INITIALIZED : case PREPARED : case STOPPED : case PREPARING : reset = true ; break ; case IDLE : case END : mCurrentStatus . uri = null ; break ; } } if ( stop ) { doStop ( ) ; } else if ( reset ) { doReset ( ) ; } return false ; }
except END, which shouldn't happen.
except END which shouldn ' t happen .
// At this moment we can be in any state. // Decide what to do depending on the current state.