AppUtils

2018-05-07  本文已影响11人  Simple_is_Best

1、多module下 判断是否debug环境

 private static Boolean isDeBug = null;

    public static boolean isDebug() {
        return isDeBug != null && isDeBug.booleanValue();
    }

    public static void syncIsDebug(Context context) {
        if (isDeBug == null) {
            isDeBug = context.getApplicationInfo() != null && (context.getApplicationInfo().flags & ApplicationInfo.FLAG_DEBUGGABLE) != 0;
        }
    }
上一篇 下一篇

猜你喜欢

热点阅读