This commit is contained in:
@ -26,7 +26,6 @@ import com.gh.gamecenter.manager.UserManager;
|
||||
import com.gh.gamecenter.qa.entity.Questions;
|
||||
import com.gh.gamecenter.retrofit.EmptyResponse;
|
||||
import com.gh.gamecenter.retrofit.RetrofitManager;
|
||||
import com.google.gson.Gson;
|
||||
import com.halo.assistant.HaloApp;
|
||||
import com.lightgame.utils.Utils;
|
||||
|
||||
@ -35,7 +34,6 @@ import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
@ -710,6 +708,100 @@ public class LogUtils {
|
||||
LoghubUtils.log(object, "event", false);
|
||||
}
|
||||
|
||||
public static void logServerTestAccessEvent(String entrance,
|
||||
String entranceDetail,
|
||||
String serverTestName,
|
||||
String serverTestNote) {
|
||||
JSONObject payload = new JSONObject();
|
||||
try {
|
||||
payload.put("server_test_name", serverTestName);
|
||||
payload.put("server_test_note", serverTestNote);
|
||||
payload.put("entrance", entrance);
|
||||
payload.put("entrance_detail", entranceDetail);
|
||||
} catch (JSONException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
logServerTestEvent("access_to_server_test", payload);
|
||||
}
|
||||
|
||||
public static void logServerTestSelectTypeEvent(String buttonText,
|
||||
String serverTestName,
|
||||
String serverTestNote) {
|
||||
JSONObject payload = new JSONObject();
|
||||
try {
|
||||
payload.put("server_test_name", serverTestName);
|
||||
payload.put("server_test_note", serverTestNote);
|
||||
payload.put("button_text", buttonText);
|
||||
} catch (JSONException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
logServerTestEvent("server_test_select_type", payload);
|
||||
}
|
||||
|
||||
public static void logServerTestSelectTimeEvent(String buttonText,
|
||||
String serverTestName,
|
||||
String serverTestNote) {
|
||||
JSONObject payload = new JSONObject();
|
||||
try {
|
||||
payload.put("server_test_name", serverTestName);
|
||||
payload.put("server_test_note", serverTestNote);
|
||||
payload.put("button_text", buttonText);
|
||||
} catch (JSONException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
logServerTestEvent("server_test_select_time", payload);
|
||||
}
|
||||
|
||||
public static void logServerTestClickAllEvent(String serverTestName,
|
||||
String serverTestNote) {
|
||||
JSONObject payload = new JSONObject();
|
||||
try {
|
||||
payload.put("server_test_name", serverTestName);
|
||||
payload.put("server_test_note", serverTestNote);
|
||||
} catch (JSONException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
logServerTestEvent("server_test_click_all", payload);
|
||||
}
|
||||
|
||||
public static void logServerTestClickMoreEvent(String serverTestName,
|
||||
String serverTestNote,
|
||||
String redirectType,
|
||||
String redirectLink) {
|
||||
JSONObject payload = new JSONObject();
|
||||
try {
|
||||
payload.put("server_test_name", serverTestName);
|
||||
payload.put("server_test_note", serverTestNote);
|
||||
payload.put("redirect_type", redirectType);
|
||||
payload.put("redirect_link", redirectLink);
|
||||
} catch (JSONException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
logServerTestEvent("server_test_click_more", payload);
|
||||
}
|
||||
|
||||
private static void logServerTestEvent(String event, JSONObject payload) {
|
||||
JSONObject object = new JSONObject();
|
||||
try {
|
||||
object.put("event", event);
|
||||
object.put("meta", getMetaObject());
|
||||
object.put("timestamp", System.currentTimeMillis() / 1000);
|
||||
object.put("payload", payload);
|
||||
} catch (JSONException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
if (BuildConfig.DEBUG) {
|
||||
Utils.log("LogUtils->" + object.toString());
|
||||
}
|
||||
LoghubUtils.log(object, "event", false);
|
||||
}
|
||||
|
||||
public static void logNewCatalogAppearanceEvent(String entrance, String key) {
|
||||
logCatalogEvent("access_to_classification", entrance, key, -1, -1, -1, -1);
|
||||
}
|
||||
@ -817,7 +909,7 @@ public class LogUtils {
|
||||
LoghubUtils.log(object, "event", false);
|
||||
}
|
||||
|
||||
public static void uploadPackageCheck(String event, String action, GameEntity gameEntity, String linkTitle, String linkDesc,String downloadGameId,String downloadGameName) {
|
||||
public static void uploadPackageCheck(String event, String action, GameEntity gameEntity, String linkTitle, String linkDesc, String downloadGameId, String downloadGameName) {
|
||||
PackageDialogEntity packageDialog = gameEntity.getPackageDialog();
|
||||
if (packageDialog == null) return;
|
||||
JSONObject object = new JSONObject();
|
||||
|
||||
Reference in New Issue
Block a user