正在查看: Mint v5.7.3 应用的 a.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Mint v5.7.3 应用的 a.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package q6;
import android.content.Context;
import android.content.res.Resources;
import com.htmedia.mint.AppController;
import com.htmedia.mint.marketRevamp.graphqlNetwork.GraphQLRequest;
import com.htmedia.mint.marketRevamp.graphqlNetwork.GraphQLRetrofitClient;
import com.htmedia.mint.marketRevamp.graphqlNetwork.GraphQLService;
import com.htmedia.mint.marketRevamp.graphqlNetwork.Queries;
import com.htmedia.mint.pojo.config.Config;
import com.htmedia.mint.pojo.config.MarketWidgetHome;
import com.htmedia.sso.helpers.DialogHelper;
import com.snowplowanalytics.snowplow.tracker.constants.Parameters;
import com.thoughtbot.expandablerecyclerview.BuildConfig;
import in.juspay.hyper.constants.LogCategory;
import kotlin.Metadata;
import kotlin.jvm.internal.m;
import okhttp3.ResponseBody;
import org.json.JSONObject;
import retrofit2.Call;
import retrofit2.Callback;
import retrofit2.Response;
import ug.a0;
@Metadata(d1 = {"\u00004\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u0002\n\u0000\n\u0002\u0010\u000e\n\u0002\b\u0002\n\u0002\u0010\u000b\n\u0000\u0018\u00002\u00020\u0001B\u0017\u0012\b\u0010\u0002\u001a\u0004\u0018\u00010\u0003\u0012\u0006\u0010\u0004\u001a\u00020\u0005¢\u0006\u0002\u0010\u0006J \u0010\u000e\u001a\u00020\u000f2\u0006\u0010\u0010\u001a\u00020\u00112\u0006\u0010\u0012\u001a\u00020\u00112\u0006\u0010\u0013\u001a\u00020\u0014H\u0016R\u001c\u0010\u0002\u001a\u0004\u0018\u00010\u0003X\u0086\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b\u0007\u0010\b\"\u0004\b\t\u0010\nR\u0010\u0010\u000b\u001a\u0004\u0018\u00010\fX\u0082\u000e¢\u0006\u0002\n\u0000R\u0010\u0010\r\u001a\u0004\u0018\u00010\u0005X\u0082\u000e¢\u0006\u0002\n\u0000¨\u0006\u0015"}, d2 = {"Lcom/htmedia/mint/presenter/marketRevamp/MarketRevampPresenter;", "Lcom/htmedia/mint/presenter/marketRevamp/MarketRevampPresenterInterface;", LogCategory.CONTEXT, "Landroid/content/Context;", "mMarketRevampViewInterface", "Lcom/htmedia/mint/presenter/marketRevamp/MarketRevampViewInterface;", "(Landroid/content/Context;Lcom/htmedia/mint/presenter/marketRevamp/MarketRevampViewInterface;)V", "getContext", "()Landroid/content/Context;", "setContext", "(Landroid/content/Context;)V", "graphQLService", "Lcom/htmedia/mint/marketRevamp/graphqlNetwork/GraphQLService;", "marketRevampViewInterface", "getGraphQlRequestData", BuildConfig.FLAVOR, "tag", BuildConfig.FLAVOR, "query", "isLoader", BuildConfig.FLAVOR, "app_productionRelease"}, k = 1, mv = {1, 9, 0}, xi = 48)
public final class a {
private Context a;
private GraphQLService b;
private b c;
@Metadata(d1 = {"\u0000)\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0003\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000*\u0001\u0000\b\n\u0018\u00002\b\u0012\u0004\u0012\u00020\u00020\u0001J\u001e\u0010\u0003\u001a\u00020\u00042\f\u0010\u0005\u001a\b\u0012\u0004\u0012\u00020\u00020\u00062\u0006\u0010\u0007\u001a\u00020\bH\u0016J$\u0010\t\u001a\u00020\u00042\f\u0010\u0005\u001a\b\u0012\u0004\u0012\u00020\u00020\u00062\f\u0010\n\u001a\b\u0012\u0004\u0012\u00020\u00020\u000bH\u0016¨\u0006\f"}, d2 = {"com/htmedia/mint/presenter/marketRevamp/MarketRevampPresenter$getGraphQlRequestData$1", "Lretrofit2/Callback;", "Lokhttp3/ResponseBody;", "onFailure", BuildConfig.FLAVOR, "call", "Lretrofit2/Call;", "t", BuildConfig.FLAVOR, "onResponse", "response", "Lretrofit2/Response;", "app_productionRelease"}, k = 1, mv = {1, 9, 0}, xi = 48)
public static final class C0170a implements Callback<ResponseBody> {
final boolean a;
final a b;
final String c;
C0170a(boolean z, a aVar, String str) {
this.a = z;
this.b = aVar;
this.c = str;
}
public void onFailure(Call<ResponseBody> call, Throwable t) {
m.g(call, "call");
m.g(t, "t");
if (this.a) {
DialogHelper.dismissProgressDialog();
}
b bVar = this.b.c;
if (bVar != null) {
bVar.onFailure(t.getMessage(), this.c);
}
}
public void onResponse(Call<ResponseBody> call, Response<ResponseBody> response) {
Resources resources;
Resources resources2;
Resources resources3;
m.g(call, "call");
m.g(response, "response");
if (this.a) {
DialogHelper.dismissProgressDialog();
}
String str = null;
if (!response.isSuccessful()) {
try {
ResponseBody errorBody = response.errorBody();
String string = errorBody != null ? errorBody.string() : null;
if (string == null) {
b bVar = this.b.c;
if (bVar != null) {
bVar.onFailure(response.message(), this.c);
return;
}
return;
}
JSONObject jSONObject = new JSONObject(string);
if (jSONObject.has("message")) {
String string2 = jSONObject.getString("message");
b bVar2 = this.b.c;
if (bVar2 != null) {
bVar2.onFailure(string2, this.c);
return;
}
return;
}
b bVar3 = this.b.c;
if (bVar3 != null) {
Context a = this.b.getA();
if (a != null && (resources = a.getResources()) != null) {
str = resources.getString(2131952646);
}
bVar3.onFailure(str, this.c);
return;
}
return;
} catch (Exception unused) {
b bVar4 = this.b.c;
if (bVar4 != null) {
bVar4.onFailure(response.message(), this.c);
return;
}
return;
}
}
ResponseBody responseBody = (ResponseBody) response.body();
if (responseBody != null) {
a aVar = this.b;
String str2 = this.c;
try {
JSONObject jSONObject2 = new JSONObject(responseBody.string());
if (jSONObject2.has(Parameters.DATA) && jSONObject2.getJSONObject(Parameters.DATA) != null) {
b bVar5 = aVar.c;
if (bVar5 != null) {
bVar5.onSuccess(jSONObject2, str2);
a0 a0Var = a0.a;
return;
}
return;
}
if (jSONObject2.has("errors")) {
b bVar6 = aVar.c;
if (bVar6 != null) {
Context a2 = aVar.getA();
if (a2 != null && (resources3 = a2.getResources()) != null) {
str = resources3.getString(2131952559);
}
bVar6.onFailure(str, str2);
a0 a0Var2 = a0.a;
return;
}
return;
}
b bVar7 = aVar.c;
if (bVar7 != null) {
Context a3 = aVar.getA();
if (a3 != null && (resources2 = a3.getResources()) != null) {
str = resources2.getString(2131952646);
}
bVar7.onFailure(str, str2);
a0 a0Var3 = a0.a;
}
} catch (Exception e) {
b bVar8 = aVar.c;
if (bVar8 != null) {
bVar8.onFailure(e.getMessage(), str2);
a0 a0Var4 = a0.a;
}
}
}
}
}
public a(Context context, b bVar) {
m.g(bVar, "mMarketRevampViewInterface");
this.a = context;
this.b = GraphQLRetrofitClient.INSTANCE.getGraphQLService();
this.c = bVar;
}
public final Context getA() {
return this.a;
}
public void c(String str, String str2, boolean z) {
MarketWidgetHome marketWidgetHome;
m.g(str, "tag");
m.g(str2, "query");
if (z) {
DialogHelper.showProgressDialog(this.a);
}
Config g = AppController.j().g();
String graphql_url = (g == null || (marketWidgetHome = g.getMarketWidgetHome()) == null) ? null : marketWidgetHome.getGraphql_url();
if (graphql_url == null) {
graphql_url = "https://api-mintgenie.livemint.com/api-gateway/fundamental/graphql";
}
GraphQLRequest graphQLRequest = new GraphQLRequest(str2);
GraphQLRetrofitClient.INSTANCE.getGraphQLService().executeQuery(graphql_url + '/', graphQLRequest, Queries.INSTANCE.getGRAPH_QL_HEADERS()).enqueue(new C0170a(z, this, str));
}
}