|
|
@@ -10,7 +10,7 @@ import android.content.pm.ApplicationInfo;
|
|
|
*/
|
|
|
public class BaseConfig {
|
|
|
private static Context context;
|
|
|
- private static boolean DEBUG;
|
|
|
+ private static boolean debug;
|
|
|
private static boolean canShowTocat = true;
|
|
|
|
|
|
private BaseConfig() {
|
|
|
@@ -26,9 +26,9 @@ public class BaseConfig {
|
|
|
private static void isApkInDebug() {
|
|
|
try {
|
|
|
ApplicationInfo info = getContext().getApplicationInfo();
|
|
|
- DEBUG = (info.flags & ApplicationInfo.FLAG_DEBUGGABLE) != 0;
|
|
|
+ debug = (info.flags & ApplicationInfo.FLAG_DEBUGGABLE) != 0;
|
|
|
} catch (Exception e) {
|
|
|
- DEBUG = false;
|
|
|
+ debug = false;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -41,8 +41,10 @@ public class BaseConfig {
|
|
|
|
|
|
/*是否显示log*/
|
|
|
public static boolean showLogAble() {
|
|
|
- return DEBUG && canShowTocat;
|
|
|
+ return debug && canShowTocat;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+ public static boolean isDebug() {
|
|
|
+ return debug;
|
|
|
+ }
|
|
|
}
|