package com.amap.api.col.p0003s; import android.content.Context; import com.meizu.cloud.pushsdk.notification.model.TimeDisplaySetting; import io.dcloud.common.DHInterface.IApp; import java.util.Hashtable; import java.util.Map; import org.json.JSONObject; /* renamed from: com.amap.api.col.3s.i reason: invalid package */ /* compiled from: AuthRequest */ public final class i extends gw<String, a> { private boolean j = true; private int[] k = {10000, 0, 10018, 10019, 10020, 10021, 10022, 10023}; /* renamed from: com.amap.api.col.3s.i$a */ /* compiled from: AuthRequest */ public static class a { /* renamed from: a reason: collision with root package name */ public int f3560a = -1; /* renamed from: b reason: collision with root package name */ public String f3561b; /* renamed from: c reason: collision with root package name */ public String f3562c; /* renamed from: d reason: collision with root package name */ public boolean f3563d = false; } public i(Context context, String str) { super(context, str); ((gw) this).h = "/feedback"; this.isPostFlag = false; this.j = true; } /* access modifiers changed from: private */ /* renamed from: b */ public a a(String str) throws gv { String str2; try { JSONObject jSONObject = new JSONObject(str); int i = -1; String str3 = ""; if (jSONObject.has("errcode")) { i = jSONObject.optInt("errcode"); str3 = jSONObject.optString("errmsg"); str2 = jSONObject.optString("errdetail"); } else { str2 = str3; } a aVar = new a(); aVar.f3560a = i; aVar.f3561b = str3; aVar.f3562c = str2; int i2 = 0; aVar.f3563d = false; int[] iArr = this.k; int length = iArr.length; while (true) { if (i2 >= length) { break; } else if (iArr[i2] == i) { aVar.f3563d = true; break; } else { i2++; } } return aVar; } catch (Throwable th) { th.printStackTrace(); return null; } } /* access modifiers changed from: protected */ @Override // com.amap.api.col.p0003s.gw public final String c() { return null; } @Override // com.amap.api.col.p0003s.jq public final String getIPV6URL() { return dl.a(getURL()); } @Override // com.amap.api.col.p0003s.cp, com.amap.api.col.p0003s.jq public final Map<String, String> getParams() { Hashtable hashtable = new Hashtable(16); hashtable.put(IApp.ConfigProperty.CONFIG_KEY, he.f(((gw) this).f3339g)); if (this.j) { hashtable.put("pname", "3dmap"); } String a2 = hh.a(); String a3 = hh.a(((gw) this).f3339g, a2, hr.b(hashtable)); hashtable.put(TimeDisplaySetting.TIME_DISPLAY_SETTING, a2); hashtable.put("scode", a3); return hashtable; } @Override // com.amap.api.col.p0003s.jq public final String getURL() { return "http://restsdk.amap.com/v4" + ((gw) this).h; } @Override // com.amap.api.col.p0003s.jq public final boolean isSupportIPV6() { return true; } }