// Path: app/src/main/java/com/koma/music/util/LogUtils.java
// public class LogUtils {
//     private static final boolean IS_DEBUG = true;
//     private static final String TAG = "KomaMusic";
// 
//     public static void d(String tag, String msg) {
//         if (IS_DEBUG) {
//             Log.d(TAG, buildString(tag, msg));
//         }
//     }
// 
//     public static void i(String tag, String msg) {
//         if (IS_DEBUG) {
//             Log.i(TAG, buildString(tag, msg));
//         }
//     }
// 
//     public static void e(String tag, String msg) {
//         if (IS_DEBUG) {
//             Log.e(TAG, buildString(tag, msg));
//         }
//     }
// 
//     private static String buildString(String tag, String msg) {
//         StringBuilder sb = new StringBuilder(tag);
//         sb.append("----");
//         sb.append(msg);
//         return sb.toString();
//     }
// }


import android.media.AudioManager;
import android.media.MediaPlayer;
import android.net.Uri;
import android.os.Handler;
import android.os.Message;
import android.util.Log;
import com.koma.music.util.LogUtils;
import java.io.IOException;
import java.lang.ref.WeakReference;
        mIsInitialized = setDataSourceImpl(mCurrentMediaPlayer, path);
        if (mIsInitialized) {
            setNextDataSource(null);
        }
    }

    /**
     * @param player The {@link MediaPlayer} to use
     * @param path   The path of the file, or the http/rtsp URL of the stream
     *               you want to play
     * @return True if the <code>player</code> has been prepared and is
     * ready to play, false otherwise
     */
    private boolean setDataSourceImpl(final MediaPlayer player, final String path) {
        try {
            player.reset();
            player.setOnPreparedListener(null);
            if (path.startsWith("content://")) {
                player.setDataSource(mService.get(), Uri.parse(path));
            } else {
                player.setDataSource(path);
            }
            player.setAudioStreamType(AudioManager.STREAM_MUSIC);

            player.prepare();
        } catch (final IOException todo) {
            LogUtils.e(TAG, "setDataSourceImpl IOException error : " + todo.toString());
            // TODO: notify the user why the file couldn't be opened
            return false;
        } catch (final IllegalArgumentException todo) {
// Path: app/src/main/java/com/koma/music/util/LogUtils.java
// public class LogUtils {
//     private static final boolean IS_DEBUG = true;
//     private static final String TAG = "KomaMusic";
// 
//     public static void d(String tag, String msg) {
//         if (IS_DEBUG) {
//             Log.d(TAG, buildString(tag, msg));
//         }
//     }
// 
//     public static void i(String tag, String msg) {
//         if (IS_DEBUG) {
//             Log.i(TAG, buildString(tag, msg));
//         }
//     }
// 
//     public static void e(String tag, String msg) {
//         if (IS_DEBUG) {
//             Log.e(TAG, buildString(tag, msg));
//         }
//     }
// 
//     private static String buildString(String tag, String msg) {
//         StringBuilder sb = new StringBuilder(tag);
//         sb.append("----");
//         sb.append(msg);
//         return sb.toString();
//     }
// }


// Path: app/src/main/java/com/koma/music/service/MultiPlayer.java
import android.media.AudioManager;
import android.media.MediaPlayer;
import android.net.Uri;
import android.os.Handler;
import android.os.Message;
import android.util.Log;
import com.koma.music.util.LogUtils;
import java.io.IOException;
import java.lang.ref.WeakReference;

        mIsInitialized = setDataSourceImpl(mCurrentMediaPlayer, path);
        if (mIsInitialized) {
            setNextDataSource(null);
        }
    }

    /**
     * @param player The {@link MediaPlayer} to use
     * @param path   The path of the file, or the http/rtsp URL of the stream
     *               you want to play
     * @return True if the <code>player</code> has been prepared and is
     * ready to play, false otherwise
     */
    private boolean setDataSourceImpl(final MediaPlayer player, final String path) {
        try {
            player.reset();
            player.setOnPreparedListener(null);
            if (path.startsWith("content://")) {
                player.setDataSource(mService.get(), Uri.parse(path));
            } else {
                player.setDataSource(path);
            }
            player.setAudioStreamType(AudioManager.STREAM_MUSIC);

            player.prepare();
        } catch (final IOException todo) {
            LogUtils.e(TAG, "setDataSourceImpl IOException error : " + todo.toString());
            // TODO: notify the user why the file couldn't be opened
            return false;
        } catch (final IllegalArgumentException todo) {
            LogUtils.e(TAG, "setDataSourceImpl IllegalArgumentException error : " + todo.toString());