Commit 2df5abe6 by sikang

add new api

parent 250fc738
......@@ -25,6 +25,8 @@ import com.tencent.bugly.crashreport.CrashReport;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.util.Locale;
import io.github.inflationx.viewpump.ViewPump;
import io.github.inflationx.viewpump.ViewPumpContextWrapper;
import tech.starwin.BuildConfig;
......@@ -42,6 +44,7 @@ public abstract class BaseApplication extends MultiDexApplication {
@Override
protected void attachBaseContext(Context base) {
DeviceInfo.initDefaultLanguage(Locale.getDefault());
initLibCnofig();
// Context languageContext = AppLanguageUtils.attachBaseContext(base, LibConfig.LANGUAGE);
// super.attachBaseContext(ViewPumpContextWrapper.wrap(Philology.INSTANCE.wrap(languageContext)));
......
......@@ -19,16 +19,6 @@ public class AppLanguageUtils {
public static void setLanguage(Context context, String language) {
if (DeviceInfo.DEFAULT_LANGUAGE == "") {
DeviceInfo.DEFAULT_LANGUAGE = "country=" + Locale.getDefault().getCountry() + "&" +
"language=" + Locale.getDefault().getLanguage() + "&" +
"display_country=" + Locale.getDefault().getDisplayCountry() + "&" +
"display_language=" + Locale.getDefault().getDisplayLanguage() + "&" +
"display_name=" + Locale.getDefault().getDisplayName();
}
Resources resources = context.getApplicationContext().getResources();
DisplayMetrics dm = resources.getDisplayMetrics();
Configuration config = resources.getConfiguration();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment