mac
2023-12-01 593303fa91fd541844b204ec913c462d7855a31e
app/src/main/java/com/hdl/photovoltaic/HDLApp.java
@@ -23,6 +23,7 @@
import com.hdl.photovoltaic.internet.HttpServer.MyNanoHttpService;
import com.hdl.photovoltaic.other.HdlFileLogic;
import com.hdl.photovoltaic.other.HdlOtaLogic;
import com.hdl.photovoltaic.other.HdlThreadLogic;
import com.hdl.photovoltaic.ui.HomeLoginActivity;
import com.hdl.photovoltaic.uni.HDLUniMPSDKManager;
import com.hdl.photovoltaic.utils.AppManagerUtils;
@@ -42,10 +43,6 @@
public class HDLApp extends Application {
    /**
     * 默认中文
     */
    public String currentAppLanguage = "zh";
    //控制打印 Debug模式打印
    private Boolean isLogEnabled = true;
    //三方sdk初始化标识
@@ -65,24 +62,22 @@
        super.onCreate();
        mHDLApp = this;
        SharedPreUtils.init(this);
        getAppLanguage();
        initThirdSDK();
    }
    public void getAppLanguage() {
        String language = SharedPreUtils.getSharedPreferencesKey("language", this);
        String language = UserConfigManage.getInstance().getCurrentAppLanguage();
        if (TextUtils.isEmpty(language)) {
            //从内存里面获取不到语言,获取当前系统的;
            String str = getResources().getConfiguration().locale.getCountry();
            if (str.equals("CN") || str.equals("TW")) {
                language = "zh";
                UserConfigManage.getInstance().setCurrentAppLanguage(LocalManageUtil.zh);
            } else {
                language = "en";
                UserConfigManage.getInstance().setCurrentAppLanguage(LocalManageUtil.en);
            }
        }
        currentAppLanguage = language;
    }
    public void setInfoMap(String key, String value) {