package o;

import android.app.AlarmManager;
import android.app.PendingIntent;
import android.app.job.JobScheduler;
import android.content.Context;
import android.content.Intent;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* renamed from: o.xu0, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public final class C2952xu0 extends Iu0 {
    public final AlarmManager d;
    public C1813lu0 e;
    public Integer f;

    public C2952xu0(C1051dv0 c1051dv0) {
        super(c1051dv0);
        this.d = (AlarmManager) ((Kr0) this.a).a.getSystemService("alarm");
    }

    @Override // o.Iu0
    public final void v() {
        AlarmManager alarmManager = this.d;
        if (alarmManager != null) {
            Context context = ((Kr0) this.a).a;
            alarmManager.cancel(PendingIntent.getBroadcast(context, 0, new Intent().setClassName(context, "com.google.android.gms.measurement.AppMeasurementReceiver").setAction("com.google.android.gms.measurement.UPLOAD"), AbstractC1518ip0.a));
        }
        y();
    }

    public final void w() {
        t();
        Kr0 kr0 = (Kr0) this.a;
        Nq0 nq0 = kr0.f;
        Kr0.l(nq0);
        nq0.n.b("Unscheduling upload");
        AlarmManager alarmManager = this.d;
        if (alarmManager != null) {
            Context context = kr0.a;
            alarmManager.cancel(PendingIntent.getBroadcast(context, 0, new Intent().setClassName(context, "com.google.android.gms.measurement.AppMeasurementReceiver").setAction("com.google.android.gms.measurement.UPLOAD"), AbstractC1518ip0.a));
        }
        x().c();
        y();
    }

    public final AbstractC3035yo0 x() {
        if (this.e == null) {
            this.e = new C1813lu0(this, this.b.l, 1);
        }
        return this.e;
    }

    public final void y() {
        JobScheduler jobScheduler = (JobScheduler) ((Kr0) this.a).a.getSystemService("jobscheduler");
        if (jobScheduler != null) {
            jobScheduler.cancel(z());
        }
    }

    public final int z() {
        if (this.f == null) {
            this.f = Integer.valueOf("measurement".concat(String.valueOf(((Kr0) this.a).a.getPackageName())).hashCode());
        }
        return this.f.intValue();
    }
}
