package e;

import android.content.IntentFilter;
import androidx.annotation.Nullable;

/* JADX INFO: loaded from: classes.dex */
public abstract class j0 {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public i0 f25226a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final /* synthetic */ m0 f25227b;

    public j0(m0 m0Var) {
        this.f25227b = m0Var;
    }

    public final void a() {
        i0 i0Var = this.f25226a;
        if (i0Var != null) {
            try {
                this.f25227b.f25285k.unregisterReceiver(i0Var);
            } catch (IllegalArgumentException unused) {
            }
            this.f25226a = null;
        }
    }

    public abstract int b();

    public final void c() {
        a();
        IntentFilter intentFilterCreateIntentFilterForBroadcastReceiver = createIntentFilterForBroadcastReceiver();
        if (intentFilterCreateIntentFilterForBroadcastReceiver.countActions() == 0) {
            return;
        }
        if (this.f25226a == null) {
            this.f25226a = new i0(this, 0);
        }
        this.f25227b.f25285k.registerReceiver(this.f25226a, intentFilterCreateIntentFilterForBroadcastReceiver);
    }

    @Nullable
    public abstract IntentFilter createIntentFilterForBroadcastReceiver();
}
