Browse Source

Merge pull request #1093 in BA/design from ~NEIL/design:release/9.0 to release/9.0

* commit 'e7132750d64795050329e6a6e3db85f858e1d68c':
  1
  1
  REPORT-3721 加个功能点检测.
master
superman 7 years ago
parent
commit
9aa7df172f
  1. 10
      designer/src/com/fr/design/mainframe/errorinfo/ErrorInfoUploader.java

10
designer/src/com/fr/design/mainframe/errorinfo/ErrorInfoUploader.java

@ -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() {

Loading…
Cancel
Save