package com.sh.sdk.shareinstall.c.a; import com.sh.sdk.shareinstall.c.c.i; import com.sh.sdk.shareinstall.c.c.j; import com.sh.sdk.shareinstall.c.f.c; import com.sh.sdk.shareinstall.c.g.a; import com.sh.sdk.shareinstall.c.g.e; import java.util.HashMap; import org.json.JSONObject; /* compiled from: GetIPLocationHelper */ public class f { /* renamed from: a reason: collision with root package name */ private c f2902a; public void a(String str, c cVar) { this.f2902a = cVar; HashMap hashMap = new HashMap(); hashMap.put("ip", str); new HashMap().put("Authorization", "APPCODE 03e7078ecb6d48acaede35db7dae501f"); e.a("http://iploc.market.alicloudapi.com/v3/ip", hashMap, new a<String>() { /* class com.sh.sdk.shareinstall.c.a.f.AnonymousClass1 */ public void a(String str) { try { JSONObject jSONObject = new JSONObject(j.b(str)); if ("1".equals(jSONObject.optString("status"))) { f.this.a((f) jSONObject.optString("province"), jSONObject.optString("city")); } else { f.this.a((f) "", ""); } } catch (Exception e) { i.a(e.getMessage()); f.this.a((f) "", ""); } } @Override // com.sh.sdk.shareinstall.c.g.c public void a(int i, String str) { f.this.a((f) "", ""); } }); } /* access modifiers changed from: private */ /* access modifiers changed from: public */ private void a(String str, String str2) { if (this.f2902a != null) { this.f2902a.a(str, str2); } } }