40 lines
1.4 KiB
Java
40 lines
1.4 KiB
Java
package o;
|
|
|
|
import android.content.Context;
|
|
import android.content.res.Configuration;
|
|
import android.os.LocaleList;
|
|
import java.util.Locale;
|
|
|
|
/* renamed from: o.gB, reason: case insensitive filesystem */
|
|
/* loaded from: classes.dex */
|
|
public final class C14804gB {
|
|
public static final Context c(Context context) {
|
|
if (context == null) {
|
|
return null;
|
|
}
|
|
Configuration configuration = context.getResources().getConfiguration();
|
|
C14957gcv.c(configuration, "");
|
|
Locale locale = new Locale(xUo.b());
|
|
configuration.setLocale(locale);
|
|
Locale.setDefault(locale);
|
|
LocaleList localeList = new LocaleList(locale);
|
|
LocaleList.setDefault(localeList);
|
|
configuration.setLocales(localeList);
|
|
return context.createConfigurationContext(configuration);
|
|
}
|
|
|
|
public static final void a(Context context, Locale locale) {
|
|
C14957gcv.e(locale, "");
|
|
if (context != null) {
|
|
Configuration configuration = context.getResources().getConfiguration();
|
|
C14957gcv.c(configuration, "");
|
|
configuration.setLocale(locale);
|
|
Locale.setDefault(locale);
|
|
LocaleList localeList = new LocaleList(locale);
|
|
LocaleList.setDefault(localeList);
|
|
configuration.setLocales(localeList);
|
|
context.getApplicationContext().createConfigurationContext(configuration);
|
|
}
|
|
}
|
|
}
|