QQ浏览器 v12.2.3.7053版本的 MD5 值为:8285ab3059e5c8b521a264dfbc5c3685
以下内容为反编译后的 SearchResultPageTypeConfigHolder.java 源代码,内容仅作参考
package com.tencent.mtt.searchresult;
import android.text.TextUtils;
import com.tencent.mtt.base.stat.utils.PlatformStatUtils;
import com.tencent.mtt.search.operation.SearchOpManager;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import org.json.JSONException;
import org.json.JSONObject;
public class SearchResultPageTypeConfigHolder {
private static final Map<String, SearchResultPageTypeConfig> f71124a = new HashMap();
private static boolean f71125b = false;
public static class SearchResultPageTypeConfig {
private String f71126a;
private String f71127b;
private SearchResultPageTypeConfig() {
}
public String a() {
return TextUtils.isEmpty(this.f71126a) ? "https://static.res.qq.com/nav/search/search_result_loading_round.gif" : this.f71126a;
}
public void a(String str) {
this.f71126a = str;
}
public String b() {
return TextUtils.isEmpty(this.f71127b) ? "https://static.res.qq.com/nav/search/search_result_loading_round_night.gif" : this.f71127b;
}
public void b(String str) {
this.f71127b = str;
}
public void c(String str) {
try {
JSONObject jSONObject = new JSONObject(str);
if (jSONObject.has("loadingGifUrl")) {
a(jSONObject.getString("loadingGifUrl"));
}
if (jSONObject.has("loadingGifUrlNight")) {
b(jSONObject.getString("loadingGifUrlNight"));
}
} catch (JSONException unused) {
}
}
public boolean c() {
if (TextUtils.isEmpty(this.f71126a) || TextUtils.isEmpty(this.f71127b)) {
return true;
}
return TextUtils.equals(this.f71126a, "https://static.res.qq.com/nav/search/search_result_loading_round.gif") && TextUtils.equals(this.f71127b, "https://static.res.qq.com/nav/search/search_result_loading_round_night.gif");
}
}
public static synchronized SearchResultPageTypeConfig a(String str) {
synchronized (SearchResultPageTypeConfigHolder.class) {
if (!f71125b) {
a();
}
f71125b = true;
if (!TextUtils.isEmpty(str) && f71124a.containsKey(str)) {
return f71124a.get(str);
}
return new SearchResultPageTypeConfig();
}
}
private static void a() {
String b2 = SearchOpManager.getInstance().b("search_result_page_type_config", "");
if (TextUtils.isEmpty(b2)) {
return;
}
PlatformStatUtils.a("HUICHUAN_LOADING_CONFIG_RECEIVE");
try {
JSONObject jSONObject = new JSONObject(b2);
Iterator<String> keys = jSONObject.keys();
while (keys != null) {
if (!keys.hasNext()) {
return;
}
String next = keys.next();
String string = jSONObject.getString(next);
if (!TextUtils.isEmpty(string)) {
SearchResultPageTypeConfig searchResultPageTypeConfig = new SearchResultPageTypeConfig();
searchResultPageTypeConfig.c(string);
f71124a.put(next, searchResultPageTypeConfig);
}
}
} catch (JSONException unused) {
}
}
}