Recover Files v1.3.9版本的 MD5 值为:27a8b2c239c6cb7111d74d6bb07d21b2
以下内容为反编译后的 o.java 源代码,内容仅作参考
package com.game.humpbackwhale.recover.files.utils;
import android.text.TextUtils;
import android.util.Base64;
import com.blankj.utilcode.util.g0;
import com.game.humpbackwhale.recover.files.model.AdListBean;
import com.game.humpbackwhale.recover.files.model.AdShieldingCountry;
import com.game.humpbackwhale.recover.files.model.CurrencyModel;
import com.game.humpbackwhale.recover.files.model.LocationBean;
import com.game.humpbackwhale.recover.files.model.WeatherBean;
import com.zhy.http.okhttp.callback.StringCallback;
import java.util.List;
import java.util.Locale;
public class o {
public static o f20780e;
public final String f20781a = "RemoteUtils";
public final String f20782b = "https://openweathermap.org/img/wn/%s@2x.png";
public final String f20783c = "last_location_info";
public final String f20784d = "WEATHER_BEAN_TIME";
public class c extends StringCallback {
public final String f20787a;
public c(String str) {
this.f20787a = str;
}
@Override
public void onResponse(String str, int i10) {
if (str != null && !str.isEmpty()) {
String str2 = new String(Base64.decode(str.getBytes(), 0));
"currency: ".concat(str2);
CurrencyModel currencyModel = (CurrencyModel) g0.h(str2, CurrencyModel.class);
if (currencyModel != null && currencyModel.getData() != null && currencyModel.getData().size() > 0) {
na.b.v(currencyModel.getData().get(0).getCurrency(), currencyModel.getData().get(0).getValueNum());
}
}
}
@Override
public void onError(okhttp3.e eVar, Exception exc, int i10) {
na.b.v(this.f20787a, y.a("USD"));
StringBuilder sb2 = new StringBuilder("onError: ");
sb2.append(this.f20787a);
sb2.append(y.a(this.f20787a));
}
}
public class d extends StringCallback {
public final e f20789a;
public class a extends StringCallback {
public final double f20791a;
public final double f20792b;
public a(double d10, double d11) {
this.f20791a = d10;
this.f20792b = d11;
}
@Override
public void onResponse(String str, int i10) {
WeatherBean weatherBean;
if (str != null && !str.isEmpty()) {
try {
weatherBean = (WeatherBean) g0.h(j.a(str), WeatherBean.class);
} catch (com.google.gson.v unused) {
weatherBean = new WeatherBean();
}
weatherBean.setLat(this.f20791a);
weatherBean.setLon(this.f20792b);
o.this.j(weatherBean);
o.this.k(System.currentTimeMillis());
e eVar = d.this.f20789a;
if (eVar != null) {
eVar.a(weatherBean);
}
}
}
@Override
public void onError(okhttp3.e eVar, Exception exc, int i10) {
e eVar2 = d.this.f20789a;
if (eVar2 != null && exc != null) {
eVar2.b(exc.getMessage());
}
}
}
public d(e eVar) {
this.f20789a = eVar;
}
@Override
public void onResponse(String str, int i10) {
LocationBean locationBean;
if (str == null || str.isEmpty() || (locationBean = (LocationBean) g0.h(str, LocationBean.class)) == null) {
return;
}
double parseDouble = Double.parseDouble(locationBean.getData().getLat());
double parseDouble2 = Double.parseDouble(locationBean.getData().getLon());
r5.a.e(parseDouble, parseDouble2, new a(parseDouble, parseDouble2));
}
@Override
public void onError(okhttp3.e eVar, Exception exc, int i10) {
e eVar2 = this.f20789a;
if (eVar2 != null && exc != null) {
eVar2.b(exc.getMessage());
}
}
}
public interface e {
void a(WeatherBean weatherBean);
void b(String str);
}
public static o i() {
if (f20780e == null) {
synchronized (o.class) {
if (f20780e == null) {
f20780e = new o();
}
}
}
return f20780e;
}
public void b(e eVar) {
r5.a.c(new d(eVar));
}
public WeatherBean c() {
return (WeatherBean) qc.h.h("last_location_info", null);
}
public long d() {
return ((Long) qc.h.h("WEATHER_BEAN_TIME", 0L)).longValue();
}
public boolean e() {
if (System.currentTimeMillis() - d() > 21600000) {
return true;
}
return false;
}
public void f() {
r5.a.f(getClass().getSimpleName(), new b());
}
public void g(String str) {
r5.a.b(str, new c(str));
}
public void h() {
r5.a.g(q5.b.f37697b, "G_RecoverFiles", new a());
}
public final void j(WeatherBean weatherBean) {
qc.h.k("last_location_info", weatherBean);
}
public void k(long j10) {
qc.h.k("WEATHER_BEAN_TIME", Long.valueOf(j10));
}
public String l(double d10) {
return String.format(Locale.getDefault(), "%d°", Long.valueOf(Math.round(d10)));
}
public class a extends StringCallback {
public a() {
}
@Override
public void onResponse(String str, int i10) {
if (TextUtils.isEmpty(str)) {
return;
}
try {
new StringBuilder("广告屏蔽国家: ").append(str);
AdShieldingCountry adShieldingCountry = (AdShieldingCountry) new com.google.gson.f().n(str, AdShieldingCountry.class);
if (adShieldingCountry != null) {
p.m().k0(adShieldingCountry.getdataShield());
}
} catch (Exception unused) {
}
}
@Override
public void onError(okhttp3.e eVar, Exception exc, int i10) {
}
}
public class b extends StringCallback {
public b() {
}
@Override
public void onResponse(String str, int i10) {
if (TextUtils.isEmpty(str)) {
return;
}
try {
List<AdListBean.DataBean> data = ((AdListBean) new com.google.gson.f().n(str, AdListBean.class)).getData();
if (data != null && data.size() > 0) {
String urlOfGoogle = data.get(0).getUrlOfGoogle();
String urlOfIcon = data.get(0).getUrlOfIcon();
String nameOfApk = data.get(0).getNameOfApk();
if (!TextUtils.isEmpty(urlOfGoogle)) {
p.m().f20842a = urlOfGoogle;
}
if (!TextUtils.isEmpty(urlOfIcon)) {
p.m().b1(urlOfIcon);
}
if (!TextUtils.isEmpty(nameOfApk)) {
p.m().l0(nameOfApk);
}
qc.h.k("AdListBean", data);
}
} catch (Exception unused) {
}
}
@Override
public void onError(okhttp3.e eVar, Exception exc, int i10) {
}
}
}