正在查看: Hopscotch v9.7.2 应用的 SearchDataIntentService.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Hopscotch v9.7.2 应用的 SearchDataIntentService.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package in.hopscotch.android.service.applaunch;
import android.content.Intent;
import android.text.TextUtils;
import androidx.annotation.NonNull;
import androidx.core.app.j;
import com.google.android.gms.ads.internal.client.z0;
import in.hopscotch.android.api.factory.ResourcesApiFactory;
import in.hopscotch.android.components.util.i;
import in.hopscotch.android.components.util.w;
import in.hopscotch.android.domain.model.extras.AwsInfo;
import in.hopscotch.android.domain.model.extras.SearchResourcesResponse;
import in.hopscotch.android.domain.response.base.b;
import in.hopscotch.android.util.a1;
import in.hopscotch.android.util.g;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.Locale;
import retrofit2.Response;
public class SearchDataIntentService extends j {
public final void d(@NonNull Intent intent) {
boolean z;
SearchResourcesResponse searchResourcesResponse;
if (ResourcesApiFactory.getInstance().getResourcesApi() != null) {
HashMap hashMap = new HashMap();
if (!TextUtils.isEmpty(i.a())) {
hashMap.put("updateDate", i.a());
}
if (!TextUtils.isEmpty(in.hopscotch.android.db.a.x().getString("utm_referrer_info", ""))) {
String[] split = in.hopscotch.android.db.a.x().getString("utm_referrer_info", "").split("&");
in.hopscotch.android.db.a.x().getString("utm_referrer_info", "");
for (String str : split) {
String[] split2 = str.split("=");
if (split2.length == 2) {
hashMap.put(split2[0], split2[1]);
}
}
}
if (in.hopscotch.android.db.a.x().getBoolean("first_call_to_get_search_resources", true)) {
z0.p("first_call_to_get_search_resources", false);
z = false;
} else {
z = true;
}
String i = in.hopscotch.android.db.a.i();
if (z) {
hashMap.put("last_utm_source", in.hopscotch.android.db.a.x().getString("utm_source", null));
hashMap.put("last_utm_campaign", in.hopscotch.android.db.a.x().getString("utm_campaign", null));
hashMap.put("last_utm_medium", in.hopscotch.android.db.a.x().getString("utm_medium", null));
if (!TextUtils.isEmpty(i) && i.split("//").length > 1) {
hashMap.put("last_deeplink", i.split("//")[1]);
}
hashMap.put("last_utm_content", in.hopscotch.android.db.a.x().getString("utm_content", null));
hashMap.put("last_utm_section", in.hopscotch.android.db.a.x().getString("utm_section", null));
hashMap.put("last_utm_product", in.hopscotch.android.db.a.x().getString("utm_product", null));
hashMap.put("last_utm_promo", in.hopscotch.android.db.a.x().getString("utm_promo", null));
} else {
hashMap.put("utm_source", in.hopscotch.android.db.a.x().getString("utm_source", null));
hashMap.put("utm_campaign", in.hopscotch.android.db.a.x().getString("utm_campaign", null));
hashMap.put("utm_medium", in.hopscotch.android.db.a.x().getString("utm_medium", null));
if (!TextUtils.isEmpty(i) && i.split("//").length > 1) {
hashMap.put("deeplink", i.split("//")[1]);
}
hashMap.put("utm_content", in.hopscotch.android.db.a.x().getString("utm_content", null));
hashMap.put("utm_section", in.hopscotch.android.db.a.x().getString("utm_section", null));
hashMap.put("utm_product", in.hopscotch.android.db.a.x().getString("utm_product", null));
hashMap.put("utm_promo", in.hopscotch.android.db.a.x().getString("utm_promo", null));
}
in.hopscotch.android.db.a.g0((String) null, false);
in.hopscotch.android.db.a.m0((String) null, false);
in.hopscotch.android.db.a.i0((String) null, false);
in.hopscotch.android.db.a.h0((String) null, false);
in.hopscotch.android.db.a.l0((String) null, false);
in.hopscotch.android.db.a.j0((String) null, false);
in.hopscotch.android.db.a.k0((String) null, false);
HashMap hashMap2 = new HashMap();
for (String str2 : hashMap.keySet()) {
if (hashMap.get(str2) != null) {
hashMap2.put(str2, hashMap.get(str2));
}
}
try {
Response execute = ResourcesApiFactory.getInstance().getResourcesApi().getSearchResources(hashMap2).execute();
if (execute == null || !execute.isSuccessful() || (searchResourcesResponse = (SearchResourcesResponse) execute.body()) == null) {
return;
}
String action = searchResourcesResponse.getAction();
String str3 = a1.a;
if (b.SUCCESS.equalsIgnoreCase(action)) {
in.hopscotch.android.db.a.k().remove("utm_referrer_info");
in.hopscotch.android.db.a.k().apply();
AwsInfo awsInfo = searchResourcesResponse.awsInfo;
if (awsInfo != null) {
in.hopscotch.android.db.a.k().putString("awsInfo", in.hopscotch.android.db.a.m().h(awsInfo));
in.hopscotch.android.db.a.k().apply();
}
w.c().g(searchResourcesResponse);
in.hopscotch.android.components.util.j.a().getClass();
in.hopscotch.android.common.util.j.o0(new SimpleDateFormat("yyyyMMdd", Locale.US).format(new Date(System.currentTimeMillis())));
if (searchResourcesResponse.displayUpdateDialog) {
Intent intent2 = new Intent("displayUpdateDialog");
intent2.putExtra("FORCE_UPDATE_MESSAGE", searchResourcesResponse.updateDialogMessage);
intent2.putExtra("FORCE_UPDATE_IS_DISMISSIBLE", searchResourcesResponse.isUpdateDialogDismissible);
intent2.putExtra("FORCE_UPDATE_POSITIVE_BTN_LABEL", searchResourcesResponse.updateDialogPositiveBtnLabel);
intent2.putExtra("FORCE_UPDATE_NEGATIVE_BTN_LABEL", searchResourcesResponse.updateDialogNegativeBtnLabel);
intent2.putExtra("FORCE_UPDATE_TITLE", searchResourcesResponse.updateDialogTitle);
androidx.localbroadcastmanager.content.a.b(getApplicationContext()).d(intent2);
}
}
} catch (IOException e) {
g.b(e);
}
}
}
}