正在查看: Perplexity v2.48.1 应用的 DownloadCompletedReceiver.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Perplexity v2.48.1 应用的 DownloadCompletedReceiver.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package ai.perplexity.app.android.common.util;
import Jn.c;
import Xm.d;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import b.l;
import java.util.List;
import kotlin.Metadata;
import kotlin.Result;
import kotlin.ResultKt;
import kotlin.Unit;
import kotlin.jvm.internal.Intrinsics;
import l0.C3181m;
import l0.C3200r;
import l0.InterfaceC3173k;
@Metadata(d1 = {"\u0000\b\n\u0002\u0018\u0002\n\u0002\b\u0003\b\u0007\u0018\u0000B\u0007¢\u0006\u0004\b\u0001\u0010\u0002¨\u0006\u0003"}, d2 = {"Lai/perplexity/app/android/common/util/DownloadCompletedReceiver;", "<init>", "()V", "common_release"}, k = 1, mv = {2, 1, 0}, xi = 48)
public final class DownloadCompletedReceiver extends BroadcastReceiver {
public volatile boolean f19550a = false;
public final Object f19551b = new Object();
public C3200r f19552c;
public final void a(Context context, Intent intent) {
if (this.f19550a) {
return;
}
synchronized (this.f19551b) {
try {
if (!this.f19550a) {
this.f19552c = (C3200r) ((l) ((InterfaceC3173k) d.C0(context))).f21925v1.get();
this.f19550a = true;
}
} catch (Throwable th) {
throw th;
}
}
}
@Override
public final void onReceive(Context context, Intent intent) {
Unit a4;
a(context, intent);
if (Intrinsics.c(intent != null ? intent.getAction() : null, "android.intent.action.DOWNLOAD_COMPLETE")) {
long longExtra = intent.getLongExtra("extra_download_id", -1L);
if (longExtra != -1) {
C3200r c3200r = this.f19552c;
if (c3200r == null) {
Intrinsics.n("downloads");
throw null;
}
synchronized (c3200r.f34996a) {
try {
List<C3181m> list = (List) c3200r.f34996a.get(Long.valueOf(longExtra));
if (list != null) {
for (C3181m c3181m : list) {
try {
int i10 = Result.x;
c3181m.getClass();
c3181m.f34948a.resumeWith(Boolean.TRUE);
a4 = Unit.a;
} catch (Throwable th) {
int i11 = Result.x;
a4 = ResultKt.a(th);
}
Throwable a10 = Result.a(a4);
if (a10 != null) {
c.a.j(a10, "Failed to notify download listener: %s", new Object[]{a10.getLocalizedMessage()});
}
}
}
} catch (Throwable th2) {
throw th2;
}
}
}
}
}
}