package com.cmic.sso.sdk.b; import android.text.TextUtils; import com.cmic.sso.sdk.b.b.d; import com.cmic.sso.sdk.b.b.g; import com.cmic.sso.sdk.b.c.c; import com.cmic.sso.sdk.b.d.b; import com.cmic.sso.sdk.d.s; import com.tencent.qcloud.core.http.HttpConstants; import java.util.List; import java.util.Map; import org.cybergarage.http.HTTP; /* compiled from: RedirectHandler */ public class a { /* renamed from: a reason: collision with root package name */ private String f21530a; /* renamed from: b reason: collision with root package name */ private String f21531b; public c a(c cVar, b bVar, com.cmic.sso.sdk.a aVar) { List<String> list; Map<String, List<String>> b14 = bVar.b(); if (TextUtils.isEmpty(this.f21530a) && (list = b14.get("pplocation")) != null && list.size() > 0) { this.f21530a = list.get(0); } s.b(aVar, String.valueOf(bVar.a())); List<String> list2 = b14.get(HTTP.LOCATION); if (list2 == null || list2.isEmpty()) { list2 = b14.get(HTTP.LOCATION.toLowerCase()); } if (list2 != null && list2.size() > 0) { String str = list2.get(0); this.f21531b = str; if (!TextUtils.isEmpty(str)) { String b15 = aVar.b("operatortype", "0"); if ("2".equals(b15)) { s.a(aVar, "getUnicomMobile"); } else if ("3".equals(b15)) { s.a(aVar, "getTelecomMobile"); } else { s.a(aVar, "NONE"); } } } c a14 = a(this.f21531b, cVar.f(), "GET", new com.cmic.sso.sdk.b.b.c(cVar.k().a())); a14.a(cVar.h()); return a14; } public c b(c cVar, b bVar, com.cmic.sso.sdk.a aVar) { String b14 = aVar.b("operatortype", "0"); if ("2".equals(b14)) { s.a(aVar, "getNewUnicomPhoneNumberNotify"); } else if ("3".equals(b14)) { s.a(aVar, "getNewTelecomPhoneNumberNotify"); } else { s.a(aVar, "NONE"); } s.b(aVar, String.valueOf(bVar.a())); d dVar = new d(cVar.k().a(), "1.0", bVar.c()); c a14 = a("http://www.cmpassport.com/unisdk" + this.f21530a, cVar.f(), "POST", dVar); a14.a(cVar.h()); this.f21530a = null; return a14; } private c a(String str, String str2, String str3, g gVar) { c cVar = new c(str, gVar, str3, str2); if (str3.equals("GET")) { cVar.a("Content-Type", HttpConstants.ContentType.X_WWW_FORM_URLENCODED); } return cVar; } public String a() { return this.f21530a; } }