package o;

import android.content.Context;
import android.content.IntentFilter;
import android.view.MenuItem;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* renamed from: o.q0, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public abstract class AbstractC2201q0 {
    public Object a;
    public Object b;

    public AbstractC2201q0(Context context) {
        this.a = context;
    }

    public void c() {
        P7 p7 = (P7) this.a;
        if (p7 != null) {
            try {
                ((S7) this.b).v.unregisterReceiver(p7);
            } catch (IllegalArgumentException unused) {
            }
            this.a = null;
        }
    }

    public abstract IntentFilter d();

    public abstract int[] e(int i);

    public abstract int f();

    public MenuItem g(MenuItem menuItem) {
        if (!(menuItem instanceof Eb0)) {
            return menuItem;
        }
        Eb0 eb0 = (Eb0) menuItem;
        if (((I80) this.b) == null) {
            this.b = new I80(0);
        }
        MenuItem menuItem2 = (MenuItem) ((I80) this.b).get(eb0);
        if (menuItem2 != null) {
            return menuItem2;
        }
        PO po = new PO((Context) this.a, eb0);
        ((I80) this.b).put(eb0, po);
        return po;
    }

    public int[] h(int i, int i2) {
        if (i < 0 || i2 < 0 || i == i2) {
            return null;
        }
        int[] iArr = (int[]) this.b;
        iArr[0] = i;
        iArr[1] = i2;
        return iArr;
    }

    public abstract void i();

    public abstract int[] j(int i);

    public void k() {
        c();
        IntentFilter intentFilterD = d();
        if (intentFilterD.countActions() == 0) {
            return;
        }
        if (((P7) this.a) == null) {
            this.a = new P7(this);
        }
        ((S7) this.b).v.registerReceiver((P7) this.a, intentFilterD);
    }

    public AbstractC2201q0() {
        this.b = new int[2];
    }

    public AbstractC2201q0(S7 s7) {
        this.b = s7;
    }
}
