package com.google.android.gms.measurement.internal; import android.os.Handler; import com.google.android.gms.common.internal.Preconditions; import com.google.android.gms.internal.measurement.zzdl; /* loaded from: classes.dex */ abstract class zzy { private static volatile Handler d; private final zzct a; private final Runnable b; private volatile long c; zzy(zzct zzctVar) { Preconditions.a(zzctVar); this.a = zzctVar; this.b = new zzz(this, zzctVar); } private final Handler d() { Handler handler; if (d != null) { return d; } synchronized (zzy.class) { if (d == null) { d = new zzdl(this.a.b().getMainLooper()); } handler = d; } return handler; } public final void a(long j) { a(); if (j >= 0) { this.c = this.a.d().a(); if (d().postDelayed(this.b, j)) { return; } this.a.e().t().a("Failed to schedule delayed post. time", Long.valueOf(j)); } } public abstract void b(); public final boolean c() { return this.c != 0; } final void a() { this.c = 0L; d().removeCallbacks(this.b); } static /* synthetic */ long a(zzy zzyVar, long j) { zzyVar.c = 0L; return 0L; } }