package com.amap.api.mapcore.util; import android.content.Context; import com.lzy.okgo.cache.CacheEntity; import com.meizu.cloud.pushsdk.notification.model.TimeDisplaySetting; import java.util.Hashtable; import java.util.Map; import org.json.JSONObject; /* compiled from: AuthRequest */ public final class i extends en<String, a> { private boolean j = true; private int[] k = {10000, 0, 10018, 10019, 10020, 10021, 10022, 10023}; /* compiled from: AuthRequest */ public static class a { public int a = -1; public String b; public String c; public boolean d = false; } /* access modifiers changed from: protected */ @Override // com.amap.api.mapcore.util.en public final String c() { return null; } @Override // com.amap.api.mapcore.util.hd public final boolean isSupportIPV6() { return true; } public i(Context context, String str) { super(context, str); this.h = "/feedback"; this.isPostFlag = false; this.j = true; } /* access modifiers changed from: private */ /* renamed from: b */ public a a(String str) throws em { 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.a = i; aVar.b = str3; aVar.c = str2; int i2 = 0; aVar.d = false; int[] iArr = this.k; int length = iArr.length; while (true) { if (i2 >= length) { break; } else if (iArr[i2] == i) { aVar.d = true; break; } else { i2++; } } return aVar; } catch (Throwable th) { th.printStackTrace(); return null; } } @Override // com.amap.api.mapcore.util.hd, com.amap.api.mapcore.util.cp public final Map<String, String> getParams() { Hashtable hashtable = new Hashtable(16); hashtable.put(CacheEntity.KEY, ev.f(this.g)); if (this.j) { hashtable.put("pname", "3dmap"); } String a2 = ey.a(); String a3 = ey.a(this.g, a2, fg.b(hashtable)); hashtable.put(TimeDisplaySetting.TIME_DISPLAY_SETTING, a2); hashtable.put("scode", a3); return hashtable; } @Override // com.amap.api.mapcore.util.hd public final String getURL() { return "http://restsdk.amap.com/v4" + this.h; } @Override // com.amap.api.mapcore.util.hd public final String getIPV6URL() { return dl.a(getURL()); } }