// Path: arouter-api/src/main/java/com/alibaba/android/arouter/launcher/ARouter.java
// public static ILogger logger;
// 
// Path: arouter-api/src/main/java/com/alibaba/android/arouter/utils/Consts.java
// public static final String AROUTER_SP_CACHE_KEY = "SP_AROUTER_CACHE";
// 
// Path: arouter-api/src/main/java/com/alibaba/android/arouter/utils/Consts.java
// public static final String LAST_VERSION_CODE = "LAST_VERSION_CODE";
// 
// Path: arouter-api/src/main/java/com/alibaba/android/arouter/utils/Consts.java
// public static final String LAST_VERSION_NAME = "LAST_VERSION_NAME";


import android.content.Context;
import android.content.SharedPreferences;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import static com.alibaba.android.arouter.launcher.ARouter.logger;
import static com.alibaba.android.arouter.utils.Consts.AROUTER_SP_CACHE_KEY;
import static com.alibaba.android.arouter.utils.Consts.LAST_VERSION_CODE;
import static com.alibaba.android.arouter.utils.Consts.LAST_VERSION_NAME;
package com.alibaba.android.arouter.utils;



/**
 * Android package utils
 *
 * @author zhilong <a href="mailto:zhilong.liu@aliyun.com">Contact me.</a>
 * @version 1.0
 * @since 2017/8/8 下午8:19
 */
public class PackageUtils {
    private static String NEW_VERSION_NAME;
    private static int NEW_VERSION_CODE;

    public static boolean isNewVersion(Context context) {
        PackageInfo packageInfo = getPackageInfo(context);
        if (null != packageInfo) {
            String versionName = packageInfo.versionName;
            int versionCode = packageInfo.versionCode;

// Path: arouter-api/src/main/java/com/alibaba/android/arouter/launcher/ARouter.java
// public static ILogger logger;
// 
// Path: arouter-api/src/main/java/com/alibaba/android/arouter/utils/Consts.java
// public static final String AROUTER_SP_CACHE_KEY = "SP_AROUTER_CACHE";
// 
// Path: arouter-api/src/main/java/com/alibaba/android/arouter/utils/Consts.java
// public static final String LAST_VERSION_CODE = "LAST_VERSION_CODE";
// 
// Path: arouter-api/src/main/java/com/alibaba/android/arouter/utils/Consts.java
// public static final String LAST_VERSION_NAME = "LAST_VERSION_NAME";


// Path: arouter-api/src/main/java/com/alibaba/android/arouter/utils/PackageUtils.java
import android.content.Context;
import android.content.SharedPreferences;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import static com.alibaba.android.arouter.launcher.ARouter.logger;
import static com.alibaba.android.arouter.utils.Consts.AROUTER_SP_CACHE_KEY;
import static com.alibaba.android.arouter.utils.Consts.LAST_VERSION_CODE;
import static com.alibaba.android.arouter.utils.Consts.LAST_VERSION_NAME;

package com.alibaba.android.arouter.utils;



/**
 * Android package utils
 *
 * @author zhilong <a href="mailto:zhilong.liu@aliyun.com">Contact me.</a>
 * @version 1.0
 * @since 2017/8/8 下午8:19
 */
public class PackageUtils {
    private static String NEW_VERSION_NAME;
    private static int NEW_VERSION_CODE;

    public static boolean isNewVersion(Context context) {
        PackageInfo packageInfo = getPackageInfo(context);
        if (null != packageInfo) {
            String versionName = packageInfo.versionName;
            int versionCode = packageInfo.versionCode;

            SharedPreferences sp = context.getSharedPreferences(AROUTER_SP_CACHE_KEY, Context.MODE_PRIVATE);