package com.applovin.adview; import androidx.lifecycle.Lifecycle; import androidx.lifecycle.LifecycleObserver; import androidx.lifecycle.OnLifecycleEvent; import com.applovin.impl.p9; import com.applovin.impl.sdk.j; import com.applovin.impl.tb; import java.util.concurrent.atomic.AtomicBoolean; /* loaded from: classes.dex */ public class AppLovinFullscreenAdViewObserver implements LifecycleObserver { private final j a; private final AtomicBoolean b = new AtomicBoolean(true); private p9 c; private tb d; @OnLifecycleEvent(Lifecycle.Event.ON_RESUME) public void onResume() { p9 p9Var; if (this.b.getAndSet(false) || (p9Var = this.c) == null) { return; } p9Var.v(); this.c.a(0L); } public void setPresenter(p9 p9Var) { this.c = p9Var; } @OnLifecycleEvent(Lifecycle.Event.ON_DESTROY) public void onDestroy() { tb tbVar = this.d; if (tbVar != null) { tbVar.a(); this.d = null; } p9 p9Var = this.c; if (p9Var != null) { p9Var.f(); this.c.t(); this.c = null; } } @OnLifecycleEvent(Lifecycle.Event.ON_PAUSE) public void onPause() { p9 p9Var = this.c; if (p9Var != null) { p9Var.u(); this.c.x(); } } @OnLifecycleEvent(Lifecycle.Event.ON_STOP) public void onStop() { p9 p9Var = this.c; if (p9Var != null) { p9Var.w(); } } public AppLovinFullscreenAdViewObserver(Lifecycle lifecycle, tb tbVar, j jVar) { this.d = tbVar; this.a = jVar; lifecycle.addObserver(this); } }