- 28,932 files - Full Java source code - Smali files - Resources Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
85 lines
3.1 KiB
Java
85 lines
3.1 KiB
Java
package com.ea.nimble;
|
|
|
|
import android.content.pm.ApplicationInfo;
|
|
import android.os.Bundle;
|
|
import com.ea.nimble.Log;
|
|
|
|
/* loaded from: classes2.dex */
|
|
public class NimbleApplicationConfiguration {
|
|
private static final String LOG_TITLE = "AppConfig";
|
|
|
|
public static boolean configValueExists(String str) {
|
|
Bundle bundle;
|
|
Log.Helper.LOGPUBLICFUNCS(LOG_TITLE);
|
|
ApplicationInfo applicationInfo = Utility.getApplicationInfo(128);
|
|
if (applicationInfo == null || (bundle = applicationInfo.metaData) == null) {
|
|
return false;
|
|
}
|
|
return bundle.containsKey(str);
|
|
}
|
|
|
|
public static String getConfigValueAsString(String str) {
|
|
Log.Helper.LOGPUBLICFUNCS(LOG_TITLE);
|
|
return getConfigValueAsString(str, "");
|
|
}
|
|
|
|
public static String getConfigValueAsString(String str, String str2) {
|
|
Bundle bundle;
|
|
Log.Helper.LOGPUBLICFUNCS(LOG_TITLE);
|
|
ApplicationInfo applicationInfo = Utility.getApplicationInfo(128);
|
|
if (applicationInfo != null && (bundle = applicationInfo.metaData) != null) {
|
|
return bundle.getString(str);
|
|
}
|
|
Log.Helper.LOGES(LOG_TITLE, "Config value of key '%s' cannot be retrieved.", str);
|
|
return str2;
|
|
}
|
|
|
|
public static int getConfigValueAsInt(String str) {
|
|
Log.Helper.LOGPUBLICFUNCS(LOG_TITLE);
|
|
return getConfigValueAsInt(str, 0);
|
|
}
|
|
|
|
public static int getConfigValueAsInt(String str, int i) {
|
|
Bundle bundle;
|
|
Log.Helper.LOGPUBLICFUNCS(LOG_TITLE);
|
|
ApplicationInfo applicationInfo = Utility.getApplicationInfo(128);
|
|
if (applicationInfo != null && (bundle = applicationInfo.metaData) != null) {
|
|
return bundle.getInt(str);
|
|
}
|
|
Log.Helper.LOGES(LOG_TITLE, "Config value of key '%s' cannot be retrieved.", str);
|
|
return i;
|
|
}
|
|
|
|
public static double getConfigValueAsDouble(String str) {
|
|
Log.Helper.LOGPUBLICFUNCS(LOG_TITLE);
|
|
return getConfigValueAsDouble(str, 0.0d);
|
|
}
|
|
|
|
public static double getConfigValueAsDouble(String str, double d) {
|
|
Bundle bundle;
|
|
Log.Helper.LOGPUBLICFUNCS(LOG_TITLE);
|
|
ApplicationInfo applicationInfo = Utility.getApplicationInfo(128);
|
|
if (applicationInfo != null && (bundle = applicationInfo.metaData) != null) {
|
|
return bundle.getDouble(str);
|
|
}
|
|
Log.Helper.LOGES(LOG_TITLE, "Config value of key '%s' cannot be retrieved.", str);
|
|
return d;
|
|
}
|
|
|
|
public static boolean getConfigValueAsBoolean(String str) {
|
|
Log.Helper.LOGPUBLICFUNCS(LOG_TITLE);
|
|
return getConfigValueAsBoolean(str, false);
|
|
}
|
|
|
|
public static boolean getConfigValueAsBoolean(String str, boolean z) {
|
|
Bundle bundle;
|
|
Log.Helper.LOGPUBLICFUNCS(LOG_TITLE);
|
|
ApplicationInfo applicationInfo = Utility.getApplicationInfo(128);
|
|
if (applicationInfo != null && (bundle = applicationInfo.metaData) != null) {
|
|
return bundle.getBoolean(str);
|
|
}
|
|
Log.Helper.LOGES(LOG_TITLE, "Config value of key '%s' cannot be retrieved.", str);
|
|
return z;
|
|
}
|
|
}
|