// Path: app/src/main/java/com/antest1/kcanotify/KcaAlarmService.java
// public static long ALARM_DELAY = 61000;
// 
// Path: app/src/main/java/com/antest1/kcanotify/KcaUtils.java
// public static String getTimeStr(int left_time, boolean is_min) {
//     int sec, min, hour;
//     sec = left_time;
//     min = sec / 60;
//     hour = min / 60;
//     sec = sec % 60;
//     min = min % 60;
//     if (is_min) return KcaUtils.format("%02d:%02d", hour * 60 + min, sec);
//     else return KcaUtils.format("%02d:%02d:%02d", hour, min, sec);
// }


import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;
import static android.text.TextUtils.concat;
import static com.antest1.kcanotify.KcaAlarmService.ALARM_DELAY;
import static com.antest1.kcanotify.KcaUtils.getTimeStr;

    public static boolean isCanceled(int idx) {
        return canceled_flag[idx];
    }

    public static String getDeckName(int idx) {
        return deck_name[idx];
    }

    public static int getIdxByMissionNo(int mission) {
        for (int i = 1; i < mission_no.length; i++) {
            if (mission_no[i] == mission) {
                return i;
            }
        }
        return -1;
    }

    public static void cancel(int idx, long arrive_time) {
        canceled_flag[idx] = true;
        complete_time_check[idx] = arrive_time;
    }

    public static long getArriveTime(int idx) {
        return complete_time_check[idx];
    }

    public static String getLeftTimeStr(int idx) {
        if (complete_time_check[idx] == -1) return "";
        else {
// Path: app/src/main/java/com/antest1/kcanotify/KcaAlarmService.java
// public static long ALARM_DELAY = 61000;
// 
// Path: app/src/main/java/com/antest1/kcanotify/KcaUtils.java
// public static String getTimeStr(int left_time, boolean is_min) {
//     int sec, min, hour;
//     sec = left_time;
//     min = sec / 60;
//     hour = min / 60;
//     sec = sec % 60;
//     min = min % 60;
//     if (is_min) return KcaUtils.format("%02d:%02d", hour * 60 + min, sec);
//     else return KcaUtils.format("%02d:%02d:%02d", hour, min, sec);
// }


// Path: app/src/main/java/com/antest1/kcanotify/KcaExpedition2.java
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;
import static android.text.TextUtils.concat;
import static com.antest1.kcanotify.KcaAlarmService.ALARM_DELAY;
import static com.antest1.kcanotify.KcaUtils.getTimeStr;


    public static boolean isCanceled(int idx) {
        return canceled_flag[idx];
    }

    public static String getDeckName(int idx) {
        return deck_name[idx];
    }

    public static int getIdxByMissionNo(int mission) {
        for (int i = 1; i < mission_no.length; i++) {
            if (mission_no[i] == mission) {
                return i;
            }
        }
        return -1;
    }

    public static void cancel(int idx, long arrive_time) {
        canceled_flag[idx] = true;
        complete_time_check[idx] = arrive_time;
    }

    public static long getArriveTime(int idx) {
        return complete_time_check[idx];
    }

    public static String getLeftTimeStr(int idx) {
        if (complete_time_check[idx] == -1) return "";
        else {
            int left_time = (int) (complete_time_check[idx] - System.currentTimeMillis() - ALARM_DELAY) / 1000;