// Path: app/src/main/java/com/cxsj/runhdu/constant/Types.java
// public class Types {
//     public final static int TYPE_YEAR = 1000;
//     public final static int TYPE_MONTH = 1001;
//     public final static int TYPE_DATE = 1002;
//     public final static int TYPE_HOUR = 1003;
//     public final static int TYPE_MINUTE = 1004;
//     public final static int TYPE_SECOND = 1005;
//     public final static int TYPE_MONTH_DATE = 1006;
//     public final static int TYPE_CURRENT_TIME = 1007;
//     public final static int TYPE_AM_PM = 1008;
//     public final static int TYPE_CHANGE_PROFILE = 1009;
//     public final static int TYPE_CHANGE_MENU_BG = 1010;
//     public final static int MANUAL_UPDATE = 1011;
//     public final static int AUTO_UPDATE = 1012;
//     public final static int TYPE_SAVE_PROFILE = 1013;
//     public final static int TYPE_STRING_FORM=1014;
// }
// 
// Path: app/src/main/java/com/cxsj/runhdu/constant/URLs.java
// public class URLs {
//     public static final String DOWNLOAD = "http://d1.51gugu.com/170258/RunHDU";
//     public static final String LOGIN = "http://112.74.115.231:8080/CXSJ/Login";
//     public static final String REGISTER="http://112.74.115.231:8080/CXSJ/Register";
//     public static final String GET_RUN_INFO = "http://112.74.115.231:8080/chuangxinshijian/ReadAll";
//     public static final String UPLOAD_RUN_INFO = "http://112.74.115.231:8080/chuangxinshijian/Write";
//     public static final String CLEAR_DATA = "http://112.74.115.231:8080/chuangxinshijian/ClearTheTable";
//     public static final String UPDATE_URL = "http://112.74.115.231:8080/chuangxinshijian/VersionCompare";
//     public static final String GET_RUN_TIMES = "http://112.74.115.231:8080/chuangxinshijian/ReadUserNameAndTimesOnly";
//     public static final String UPLOAD_ALL_INFO = "http://112.74.115.231:8080/chuangxinshijian/WriteByJson";
//     public static final String UPLOAD_PROFILE = "http://112.74.115.231:8080/CXSJ/UploadHead";
//     public static final String PROFILE_URL = "http://112.74.115.231:8080/CXSJ/Image/";
//     public static final String FEEDBACK_URL = "http://112.74.115.231:8080/chuangxinshijian/WriteFeedback";
//     public static final String SUNNY_RUN_QUERY_API = "http://hdu.sunnysport.org.cn/api/student/achievements/";
//     public static final String SUNNY_RUN_INFO_API = "http://hdu.sunnysport.org.cn/api/student/info/";
//     public static final String DELETE_ITEM = "http://112.74.115.231:8080/chuangxinshijian/ClearByUserNameAndRunId";
//     public static final String APPLY_FRIEND = "http://112.74.115.231:8080/CXSJ/Apply";
//     public static final String REPLY_FRIEND = "http://112.74.115.231:8080/CXSJ/BeFriend";
//     public static final String GET_FRIEND = "http://112.74.115.231:8080/CXSJ/MyFriends";
//     public static final String DELETE_FRIEND = "http://112.74.115.231:8080/CXSJ/DeleteFriend";
//     public static final String OFF_LINE = "http://112.74.115.231:8080/CXSJ/Xiaxian";
// }


import android.annotation.SuppressLint;
import android.content.Context;
import android.content.pm.PackageManager;
import android.content.res.Resources;
import android.location.LocationManager;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.net.Uri;
import android.telephony.TelephonyManager;
import android.widget.ImageView;
import android.widget.Toast;
import com.baidu.mapapi.model.LatLng;
import com.baidu.mapapi.utils.DistanceUtil;
import com.bumptech.glide.Glide;
import com.bumptech.glide.signature.StringSignature;
import com.cxsj.runhdu.R;
import com.cxsj.runhdu.constant.Types;
import com.cxsj.runhdu.constant.URLs;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
import java.util.Locale;
                } else {
                    return "晚上";
                }
            case Types.TYPE_MONTH_DATE:
                return new SimpleDateFormat("M月d日", Locale.getDefault()).format(new Date());
            case Types.TYPE_CURRENT_TIME:
                return new SimpleDateFormat("HH:mm", Locale.getDefault()).format(new Date());
            case Types.TYPE_MONTH:
                return String.valueOf(calendar.get(Calendar.MONTH) + 1);
            case Types.TYPE_STRING_FORM:
                return new SimpleDateFormat("yyyyMMddHHmmss", Locale.getDefault()).format(new Date());
            default:
                return String.valueOf(calendar.get(type));
        }
    }

    /**
     * 返回计时器时间字符串的分钟数量。
     *
     * @return 两个时间间隔的分钟数
     */
    public static int getMinutes(String time) {
        String[] times = time.split(":");
        int minutes = Integer.parseInt(times[1]);
        int hours = Integer.parseInt(times[0]);
        int seconds = Integer.parseInt(times[2]);
        return hours * 60 + minutes + seconds / 60;
    }

    public static Uri getDownloadUri(String latestVersion) {
// Path: app/src/main/java/com/cxsj/runhdu/constant/Types.java
// public class Types {
//     public final static int TYPE_YEAR = 1000;
//     public final static int TYPE_MONTH = 1001;
//     public final static int TYPE_DATE = 1002;
//     public final static int TYPE_HOUR = 1003;
//     public final static int TYPE_MINUTE = 1004;
//     public final static int TYPE_SECOND = 1005;
//     public final static int TYPE_MONTH_DATE = 1006;
//     public final static int TYPE_CURRENT_TIME = 1007;
//     public final static int TYPE_AM_PM = 1008;
//     public final static int TYPE_CHANGE_PROFILE = 1009;
//     public final static int TYPE_CHANGE_MENU_BG = 1010;
//     public final static int MANUAL_UPDATE = 1011;
//     public final static int AUTO_UPDATE = 1012;
//     public final static int TYPE_SAVE_PROFILE = 1013;
//     public final static int TYPE_STRING_FORM=1014;
// }
// 
// Path: app/src/main/java/com/cxsj/runhdu/constant/URLs.java
// public class URLs {
//     public static final String DOWNLOAD = "http://d1.51gugu.com/170258/RunHDU";
//     public static final String LOGIN = "http://112.74.115.231:8080/CXSJ/Login";
//     public static final String REGISTER="http://112.74.115.231:8080/CXSJ/Register";
//     public static final String GET_RUN_INFO = "http://112.74.115.231:8080/chuangxinshijian/ReadAll";
//     public static final String UPLOAD_RUN_INFO = "http://112.74.115.231:8080/chuangxinshijian/Write";
//     public static final String CLEAR_DATA = "http://112.74.115.231:8080/chuangxinshijian/ClearTheTable";
//     public static final String UPDATE_URL = "http://112.74.115.231:8080/chuangxinshijian/VersionCompare";
//     public static final String GET_RUN_TIMES = "http://112.74.115.231:8080/chuangxinshijian/ReadUserNameAndTimesOnly";
//     public static final String UPLOAD_ALL_INFO = "http://112.74.115.231:8080/chuangxinshijian/WriteByJson";
//     public static final String UPLOAD_PROFILE = "http://112.74.115.231:8080/CXSJ/UploadHead";
//     public static final String PROFILE_URL = "http://112.74.115.231:8080/CXSJ/Image/";
//     public static final String FEEDBACK_URL = "http://112.74.115.231:8080/chuangxinshijian/WriteFeedback";
//     public static final String SUNNY_RUN_QUERY_API = "http://hdu.sunnysport.org.cn/api/student/achievements/";
//     public static final String SUNNY_RUN_INFO_API = "http://hdu.sunnysport.org.cn/api/student/info/";
//     public static final String DELETE_ITEM = "http://112.74.115.231:8080/chuangxinshijian/ClearByUserNameAndRunId";
//     public static final String APPLY_FRIEND = "http://112.74.115.231:8080/CXSJ/Apply";
//     public static final String REPLY_FRIEND = "http://112.74.115.231:8080/CXSJ/BeFriend";
//     public static final String GET_FRIEND = "http://112.74.115.231:8080/CXSJ/MyFriends";
//     public static final String DELETE_FRIEND = "http://112.74.115.231:8080/CXSJ/DeleteFriend";
//     public static final String OFF_LINE = "http://112.74.115.231:8080/CXSJ/Xiaxian";
// }


// Path: app/src/main/java/com/cxsj/runhdu/utils/Utility.java
import android.annotation.SuppressLint;
import android.content.Context;
import android.content.pm.PackageManager;
import android.content.res.Resources;
import android.location.LocationManager;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.net.Uri;
import android.telephony.TelephonyManager;
import android.widget.ImageView;
import android.widget.Toast;
import com.baidu.mapapi.model.LatLng;
import com.baidu.mapapi.utils.DistanceUtil;
import com.bumptech.glide.Glide;
import com.bumptech.glide.signature.StringSignature;
import com.cxsj.runhdu.R;
import com.cxsj.runhdu.constant.Types;
import com.cxsj.runhdu.constant.URLs;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
import java.util.Locale;

                } else {
                    return "晚上";
                }
            case Types.TYPE_MONTH_DATE:
                return new SimpleDateFormat("M月d日", Locale.getDefault()).format(new Date());
            case Types.TYPE_CURRENT_TIME:
                return new SimpleDateFormat("HH:mm", Locale.getDefault()).format(new Date());
            case Types.TYPE_MONTH:
                return String.valueOf(calendar.get(Calendar.MONTH) + 1);
            case Types.TYPE_STRING_FORM:
                return new SimpleDateFormat("yyyyMMddHHmmss", Locale.getDefault()).format(new Date());
            default:
                return String.valueOf(calendar.get(type));
        }
    }

    /**
     * 返回计时器时间字符串的分钟数量。
     *
     * @return 两个时间间隔的分钟数
     */
    public static int getMinutes(String time) {
        String[] times = time.split(":");
        int minutes = Integer.parseInt(times[1]);
        int hours = Integer.parseInt(times[0]);
        int seconds = Integer.parseInt(times[2]);
        return hours * 60 + minutes + seconds / 60;
    }

    public static Uri getDownloadUri(String latestVersion) {
        return Uri.parse(URLs.DOWNLOAD + latestVersion.replace(".", "") + ".apk");