// Path: app/src/main/java/clock/socoolby/com/clock/ClockApplication.java
// public class ClockApplication extends Application {
// 
//     private static ClockApplication sEndzoneBoxApp;
//     private BusinessService mBusinessService = new BusinessService();
// 
//     public static ClockApplication getInstance() {
//         return sEndzoneBoxApp;
//     }
// 
//     @Override
//     public void onCreate() {
//         sEndzoneBoxApp = this;
//         init();
//         super.onCreate();
//     }
// 
// 
//     public void init() {
//         if (!FileUtils.isExistsFile(Constants.SHARE_PERFERENCE_FILE)) {
//             SharePerferenceModel model = new SharePerferenceModel();
//             model.setTypeHourPower(Constants.TALKING_HALF_AN_HOUR);
//             DateModel startTimeModel = new DateModel();
//             startTimeModel.setTime(12, 31);
//             DateModel stopTimeModel = new DateModel();
//             stopTimeModel.setTime(14, 31);
//             model.setStartHourPowerTime(startTimeModel);
//             model.setStopHourPowerTime(stopTimeModel);
//             model.setCity(getString(R.string.shenzhen));
//             model.save();
//         }
//     }
// 
//     public static Context getContext() {
//         return ClockApplication.getInstance().getApplicationContext();
//     }
// 
//     public BusinessService getBusinessService() {
//         return mBusinessService;
//     }
// 
//     private MainActivity mMainActivity;
// 
//     public void setMainActivity(MainActivity mainActivity) {
//         this.mMainActivity = mainActivity;
//     }
// 
//     public MainActivity getMainActivity() {
//         return mMainActivity;
//     }
// 
// }


import android.content.Context;
import android.content.res.AssetFileDescriptor;
import android.media.AudioManager;
import android.media.MediaPlayer;
import android.util.Log;
import java.io.IOException;
import java.util.HashMap;
import java.util.LinkedList;
import clock.socoolby.com.clock.ClockApplication;
import clock.socoolby.com.clock.R;
            if (hourUnit > 0) {
                playList.add(NUM_AUDIO.get(hourUnit));
            }
        } else {
            playList.add(NUM_AUDIO.get(hour));
        }
        playList.add(R.raw.hour);

        int minuteUnit = minute % 10;
        int minuteTenDigit = minute / 10 * 10;
        playList.add(NUM_AUDIO.get(minuteTenDigit));
        if (minuteUnit > 0)
            playList.add(NUM_AUDIO.get(minuteUnit));
        playList.add(R.raw.minute);

        play(playList, activity);


    }

    private void play(LinkedList<Integer> playList, Context activity) {
        this.playList = playList;
        if (mediaPlayer == null)
            mediaPlayer = buildMediaPlayer();
        play(activity);
    }

    private AssetFileDescriptor tickFile = null;

    public void playTick(Context activity) {
// Path: app/src/main/java/clock/socoolby/com/clock/ClockApplication.java
// public class ClockApplication extends Application {
// 
//     private static ClockApplication sEndzoneBoxApp;
//     private BusinessService mBusinessService = new BusinessService();
// 
//     public static ClockApplication getInstance() {
//         return sEndzoneBoxApp;
//     }
// 
//     @Override
//     public void onCreate() {
//         sEndzoneBoxApp = this;
//         init();
//         super.onCreate();
//     }
// 
// 
//     public void init() {
//         if (!FileUtils.isExistsFile(Constants.SHARE_PERFERENCE_FILE)) {
//             SharePerferenceModel model = new SharePerferenceModel();
//             model.setTypeHourPower(Constants.TALKING_HALF_AN_HOUR);
//             DateModel startTimeModel = new DateModel();
//             startTimeModel.setTime(12, 31);
//             DateModel stopTimeModel = new DateModel();
//             stopTimeModel.setTime(14, 31);
//             model.setStartHourPowerTime(startTimeModel);
//             model.setStopHourPowerTime(stopTimeModel);
//             model.setCity(getString(R.string.shenzhen));
//             model.save();
//         }
//     }
// 
//     public static Context getContext() {
//         return ClockApplication.getInstance().getApplicationContext();
//     }
// 
//     public BusinessService getBusinessService() {
//         return mBusinessService;
//     }
// 
//     private MainActivity mMainActivity;
// 
//     public void setMainActivity(MainActivity mainActivity) {
//         this.mMainActivity = mainActivity;
//     }
// 
//     public MainActivity getMainActivity() {
//         return mMainActivity;
//     }
// 
// }


// Path: app/src/main/java/clock/socoolby/com/clock/utils/Player.java
import android.content.Context;
import android.content.res.AssetFileDescriptor;
import android.media.AudioManager;
import android.media.MediaPlayer;
import android.util.Log;
import java.io.IOException;
import java.util.HashMap;
import java.util.LinkedList;
import clock.socoolby.com.clock.ClockApplication;
import clock.socoolby.com.clock.R;

            if (hourUnit > 0) {
                playList.add(NUM_AUDIO.get(hourUnit));
            }
        } else {
            playList.add(NUM_AUDIO.get(hour));
        }
        playList.add(R.raw.hour);

        int minuteUnit = minute % 10;
        int minuteTenDigit = minute / 10 * 10;
        playList.add(NUM_AUDIO.get(minuteTenDigit));
        if (minuteUnit > 0)
            playList.add(NUM_AUDIO.get(minuteUnit));
        playList.add(R.raw.minute);

        play(playList, activity);


    }

    private void play(LinkedList<Integer> playList, Context activity) {
        this.playList = playList;
        if (mediaPlayer == null)
            mediaPlayer = buildMediaPlayer();
        play(activity);
    }

    private AssetFileDescriptor tickFile = null;

    public void playTick(Context activity) {
        if (!ScreenManager.isScreenOn() || ScreenManager.isApplicationBroughtToBackground(ClockApplication.getContext()))