package com.google.android.play.core.assetpacks;

import android.os.Bundle;
import com.google.android.gms.tasks.TaskCompletionSource;
import java.util.concurrent.atomic.AtomicBoolean;

/* loaded from: classes3.dex */
final class o extends k {

    /* renamed from: g, reason: collision with root package name */
    final /* synthetic */ s f14023g;

    /* JADX INFO: Access modifiers changed from: package-private */
    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public o(s sVar, TaskCompletionSource taskCompletionSource) {
        super(sVar, taskCompletionSource);
        this.f14023g = sVar;
    }

    @Override // com.google.android.play.core.assetpacks.k, rj.a0
    public final void G(Bundle bundle) {
        rj.s0 s0Var;
        rj.h0 h0Var;
        s0Var = this.f14023g.f14064e;
        s0Var.u(this.f13958e);
        int i10 = bundle.getInt("error_code");
        h0Var = s.f14058g;
        h0Var.b("onError(%d)", Integer.valueOf(i10));
        this.f13958e.trySetException(new a(i10));
    }

    @Override // com.google.android.play.core.assetpacks.k, rj.a0
    public final void g(Bundle bundle, Bundle bundle2) {
        AtomicBoolean atomicBoolean;
        rj.h0 h0Var;
        super.g(bundle, bundle2);
        atomicBoolean = this.f14023g.f14065f;
        if (!atomicBoolean.compareAndSet(true, false)) {
            h0Var = s.f14058g;
            h0Var.e("Expected keepingAlive to be true, but was false.", new Object[0]);
        }
        if (bundle.getBoolean("keep_alive")) {
            this.f14023g.f();
        }
    }
}
