package c5;

import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.os.Message;

/* JADX INFO: loaded from: classes.dex */
public final class e extends Handler {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final /* synthetic */ f f4748a;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public e(f fVar, Looper looper) {
        super(looper);
        this.f4748a = fVar;
    }

    @Override // android.os.Handler
    public final void handleMessage(Message message) {
        super.handleMessage(message);
        f fVar = this.f4748a;
        if (fVar.f4752m != null) {
            Bundle data = message.getData();
            if (data.containsKey("ERROR")) {
                fVar.d(true, 8, data.getString("ERROR"), null, null);
                return;
            }
            long j5 = data.getLong("BYTES_DOWNLOADED");
            fVar.d(false, 1, "", null, "" + ((j5 * 100) / data.getLong("BYTES_TOTAL")));
        }
    }
}
