正在查看: Uptodown App Store v6.80 应用的 InstallReferrerReceiver.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Uptodown App Store v6.80 应用的 InstallReferrerReceiver.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package org.matomo.sdk.extra;
import P3.b;
import Y3.a;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import java.util.Collections;
import java.util.List;
import org.matomo.sdk.extra.InstallReferrerReceiver;
public class InstallReferrerReceiver extends BroadcastReceiver {
private static final String a = b.i(InstallReferrerReceiver.class);
static final List b = Collections.singletonList("com.android.vending.INSTALL_REFERRER");
public static void a(Context context, String str, BroadcastReceiver.PendingResult pendingResult) {
b.f(context.getApplicationContext()).g().edit().putString("referrer.extras", str).apply();
a.b(a).a("Stored Google Play referrer extras: %s", str);
pendingResult.finish();
}
@Override
public void onReceive(final Context context, Intent intent) {
final String stringExtra;
String str = a;
a.b(str).a(intent.toString(), new Object[0]);
if (intent.getAction() == null || !b.contains(intent.getAction())) {
a.b(str).h("Got called outside our responsibilities: %s", intent.getAction());
return;
}
if (intent.getBooleanExtra("forwarded", false)) {
a.b(str).a("Dropping forwarded intent", new Object[0]);
return;
}
if (intent.getAction().equals("com.android.vending.INSTALL_REFERRER") && (stringExtra = intent.getStringExtra("referrer")) != null) {
final BroadcastReceiver.PendingResult goAsync = goAsync();
new Thread(new Runnable() {
@Override
public final void run() {
InstallReferrerReceiver.a(context, stringExtra, goAsync);
}
}).start();
}
intent.setComponent(null);
intent.setPackage(context.getPackageName());
intent.putExtra("forwarded", true);
context.sendBroadcast(intent);
}
}