|
|
@ -1,6 +1,7 @@ |
|
|
|
package com.fr.design.mainframe.errorinfo; |
|
|
|
package com.fr.design.mainframe.errorinfo; |
|
|
|
|
|
|
|
|
|
|
|
import com.fr.base.FRContext; |
|
|
|
import com.fr.base.FRContext; |
|
|
|
|
|
|
|
import com.fr.base.FRCoreContext; |
|
|
|
import com.fr.general.*; |
|
|
|
import com.fr.general.*; |
|
|
|
import com.fr.general.http.HttpClient; |
|
|
|
import com.fr.general.http.HttpClient; |
|
|
|
import com.fr.json.JSONException; |
|
|
|
import com.fr.json.JSONException; |
|
|
@ -27,6 +28,7 @@ public class ErrorInfoUploader { |
|
|
|
public static final String FOLDER_NAME = "errorInfo"; |
|
|
|
public static final String FOLDER_NAME = "errorInfo"; |
|
|
|
|
|
|
|
|
|
|
|
private static ErrorInfoUploader collector; |
|
|
|
private static ErrorInfoUploader collector; |
|
|
|
|
|
|
|
private static boolean licSupport = true; |
|
|
|
|
|
|
|
|
|
|
|
static { |
|
|
|
static { |
|
|
|
GeneralContext.addEnvChangedListener(new EnvChangedListener() { |
|
|
|
GeneralContext.addEnvChangedListener(new EnvChangedListener() { |
|
|
@ -35,6 +37,9 @@ public class ErrorInfoUploader { |
|
|
|
FRLogger.getLogger().addLogAppender(new ErrorInfoLogAppender()); |
|
|
|
FRLogger.getLogger().addLogAppender(new ErrorInfoLogAppender()); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 这个控制没啥意义, 主要在于宣传功能.
|
|
|
|
|
|
|
|
licSupport = VT4FR.isLicAvailable(FRCoreContext.getBytes()) && VT4FR.ALPHA_FINE.support(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private ErrorInfoUploader() { |
|
|
|
private ErrorInfoUploader() { |
|
|
@ -51,6 +56,11 @@ public class ErrorInfoUploader { |
|
|
|
|
|
|
|
|
|
|
|
// 从云中心更新最新的解决方案文件
|
|
|
|
// 从云中心更新最新的解决方案文件
|
|
|
|
private void checkUpdateSolution(){ |
|
|
|
private void checkUpdateSolution(){ |
|
|
|
|
|
|
|
if (!licSupport) { |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Thread updateThread = new Thread(new Runnable() { |
|
|
|
Thread updateThread = new Thread(new Runnable() { |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void run() { |
|
|
|
public void run() { |
|
|
|