package ῲ.ῲ.ඓ.㳳;

import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.view.KeyEvent;
import android.view.Menu;
import android.view.MenuItem;
import android.view.SubMenu;
import ῲ.ᨨ.㸾.K.AbstractMenuC1864;
import ῲ.ᨨ.㸾.K.AbstractMenuItemC1863;
import ῲ.ᨨ.㸾.K.AbstractSubMenuC1862;
import ῲ.㴹.C2288;

/* renamed from: ῲ.ῲ.ඓ.㳳.ؿ  reason: contains not printable characters */
/* compiled from: MenuWrapperICS */
public class MenuC1899 extends AbstractC1896 implements Menu {

    /* renamed from: 㸾  reason: contains not printable characters */
    public final AbstractMenuC1864 f6439;

    public MenuC1899(Context context, AbstractMenuC1864 k) {
        super(context);
        if (k != null) {
            this.f6439 = k;
            return;
        }
        throw new IllegalArgumentException("Wrapped Object can not be null.");
    }

    @Override // android.view.Menu
    public MenuItem add(CharSequence charSequence) {
        return m4920(this.f6439.add(charSequence));
    }

    public int addIntentOptions(int i, int i2, int i3, ComponentName componentName, Intent[] intentArr, Intent intent, int i4, MenuItem[] menuItemArr) {
        MenuItem[] menuItemArr2 = menuItemArr != null ? new MenuItem[menuItemArr.length] : null;
        int addIntentOptions = this.f6439.addIntentOptions(i, i2, i3, componentName, intentArr, intent, i4, menuItemArr2);
        if (menuItemArr2 != null) {
            int length = menuItemArr2.length;
            for (int i5 = 0; i5 < length; i5++) {
                menuItemArr[i5] = m4920(menuItemArr2[i5]);
            }
        }
        return addIntentOptions;
    }

    @Override // android.view.Menu
    public SubMenu addSubMenu(CharSequence charSequence) {
        return m4921(this.f6439.addSubMenu(charSequence));
    }

    public void clear() {
        C2288<AbstractMenuItemC1863, MenuItem> r0 = this.f6437;
        if (r0 != null) {
            r0.clear();
        }
        C2288<AbstractSubMenuC1862, SubMenu> r02 = this.f6436;
        if (r02 != null) {
            r02.clear();
        }
        this.f6439.clear();
    }

    public void close() {
        this.f6439.close();
    }

    public MenuItem findItem(int i) {
        return m4920(this.f6439.findItem(i));
    }

    public MenuItem getItem(int i) {
        return m4920(this.f6439.getItem(i));
    }

    public boolean hasVisibleItems() {
        return this.f6439.hasVisibleItems();
    }

    public boolean isShortcutKey(int i, KeyEvent keyEvent) {
        return this.f6439.isShortcutKey(i, keyEvent);
    }

    public boolean performIdentifierAction(int i, int i2) {
        return this.f6439.performIdentifierAction(i, i2);
    }

    public boolean performShortcut(int i, KeyEvent keyEvent, int i2) {
        return this.f6439.performShortcut(i, keyEvent, i2);
    }

    public void removeGroup(int i) {
        if (this.f6437 != null) {
            int i2 = 0;
            while (true) {
                C2288<AbstractMenuItemC1863, MenuItem> r1 = this.f6437;
                if (i2 >= r1.f7909) {
                    break;
                }
                if (r1.m5972(i2).getGroupId() == i) {
                    this.f6437.m5982(i2);
                    i2--;
                }
                i2++;
            }
        }
        this.f6439.removeGroup(i);
    }

    public void removeItem(int i) {
        if (this.f6437 != null) {
            int i2 = 0;
            while (true) {
                C2288<AbstractMenuItemC1863, MenuItem> r1 = this.f6437;
                if (i2 >= r1.f7909) {
                    break;
                } else if (r1.m5972(i2).getItemId() == i) {
                    this.f6437.m5982(i2);
                    break;
                } else {
                    i2++;
                }
            }
        }
        this.f6439.removeItem(i);
    }

    public void setGroupCheckable(int i, boolean z, boolean z2) {
        this.f6439.setGroupCheckable(i, z, z2);
    }

    public void setGroupEnabled(int i, boolean z) {
        this.f6439.setGroupEnabled(i, z);
    }

    public void setGroupVisible(int i, boolean z) {
        this.f6439.setGroupVisible(i, z);
    }

    public void setQwertyMode(boolean z) {
        this.f6439.setQwertyMode(z);
    }

    public int size() {
        return this.f6439.size();
    }

    @Override // android.view.Menu
    public MenuItem add(int i) {
        return m4920(this.f6439.add(i));
    }

    @Override // android.view.Menu
    public SubMenu addSubMenu(int i) {
        return m4921(this.f6439.addSubMenu(i));
    }

    @Override // android.view.Menu
    public MenuItem add(int i, int i2, int i3, CharSequence charSequence) {
        return m4920(this.f6439.add(i, i2, i3, charSequence));
    }

    @Override // android.view.Menu
    public SubMenu addSubMenu(int i, int i2, int i3, CharSequence charSequence) {
        return m4921(this.f6439.addSubMenu(i, i2, i3, charSequence));
    }

    @Override // android.view.Menu
    public MenuItem add(int i, int i2, int i3, int i4) {
        return m4920(this.f6439.add(i, i2, i3, i4));
    }

    @Override // android.view.Menu
    public SubMenu addSubMenu(int i, int i2, int i3, int i4) {
        return m4921(this.f6439.addSubMenu(i, i2, i3, i4));
    }
}
