package com.ironsource; import android.os.Handler; import android.os.Looper; import android.os.Message; import com.ironsource.mediationsdk.logger.IronLog; import com.ironsource.sdk.utils.Logger; /* loaded from: classes2.dex */ public class qa extends Handler { private static final String b = "DownloadHandler"; hn a; public qa(Looper looper) { super(looper); } public void a() { this.a = null; } public void a(hn hnVar) { if (hnVar == null) { throw new IllegalArgumentException(); } this.a = hnVar; } @Override // android.os.Handler public void handleMessage(Message message) { hn hnVar = this.a; if (hnVar == null) { Logger.i(b, "OnPreCacheCompletion listener is null, msg: " + message.toString()); return; } try { int i = message.what; if (i == 1016) { hnVar.a((zf) message.obj); } else { this.a.a((zf) message.obj, new rf(i, yt.a(i))); } } catch (Throwable th) { i9.d().a(th); Logger.i(b, "handleMessage | Got exception: " + th.getMessage()); IronLog.INTERNAL.error(th.toString()); } } }