location add debug func

This commit is contained in:
zhongchao
2023-05-22 15:02:24 +08:00
parent 923acbebce
commit 977f16207f
2 changed files with 12 additions and 1 deletions

View File

@@ -14,6 +14,12 @@ public interface IMogoLocationInfoService {
*/
void init(Context context);
/**
* 设置是否为debug模式
* @param debugMode true/false
*/
void setDebugMode(Boolean debugMode);
void start();
void stop();

View File

@@ -10,7 +10,7 @@ import com.mogo.cloud.passport.MoGoAiCloudClientConfig;
public class LocationManager implements IMogoLocationInfoService {
private static volatile LocationManager mInstance;
private MoGoAiCloudClientConfig cloudClientConfig;
private final MoGoAiCloudClientConfig cloudClientConfig;
private LocationManager() {
cloudClientConfig = MoGoAiCloudClient.getInstance().getAiCloudClientConfig();
@@ -36,6 +36,11 @@ public class LocationManager implements IMogoLocationInfoService {
}
}
@Override
public void setDebugMode(Boolean debugMode) {
LocationConfig.isPrintLog = debugMode;
}
@Override
public void start() {
if (cloudClientConfig.isThirdLogin()) {