54 lines
1.7 KiB
Java
54 lines
1.7 KiB
Java
|
package o;
|
||
|
|
||
|
import android.content.Context;
|
||
|
import android.view.MenuItem;
|
||
|
import android.view.SubMenu;
|
||
|
import androidx.appcompat.view.menu.MenuItemImpl;
|
||
|
|
||
|
/* loaded from: classes2.dex */
|
||
|
public final class Vnx extends NoP {
|
||
|
private final Class<?> q;
|
||
|
private final int s;
|
||
|
|
||
|
public Vnx(Context context, Class<?> cls, int i) {
|
||
|
super(context);
|
||
|
this.q = cls;
|
||
|
this.s = i;
|
||
|
}
|
||
|
|
||
|
@Override // o.NoP, android.view.Menu
|
||
|
public final SubMenu addSubMenu(int i, int i2, int i3, CharSequence charSequence) {
|
||
|
StringBuilder sb = new StringBuilder();
|
||
|
sb.append(this.q.getSimpleName());
|
||
|
sb.append(" does not support submenus");
|
||
|
throw new UnsupportedOperationException(sb.toString());
|
||
|
}
|
||
|
|
||
|
@Override // o.NoP
|
||
|
public final MenuItem Kj_(int i, int i2, int i3, CharSequence charSequence) {
|
||
|
if (size() + 1 > this.s) {
|
||
|
String simpleName = this.q.getSimpleName();
|
||
|
StringBuilder sb = new StringBuilder("Maximum number of items supported by ");
|
||
|
sb.append(simpleName);
|
||
|
sb.append(" is ");
|
||
|
sb.append(this.s);
|
||
|
sb.append(". Limit can be checked with ");
|
||
|
sb.append(simpleName);
|
||
|
sb.append("#getMaxItemCount()");
|
||
|
throw new IllegalArgumentException(sb.toString());
|
||
|
}
|
||
|
if (!this.t) {
|
||
|
this.t = true;
|
||
|
this.n = false;
|
||
|
this.p = false;
|
||
|
}
|
||
|
MenuItem Kj_ = super.Kj_(i, i2, i3, charSequence);
|
||
|
if (Kj_ instanceof MenuItemImpl) {
|
||
|
MenuItemImpl menuItemImpl = (MenuItemImpl) Kj_;
|
||
|
menuItemImpl.a = (menuItemImpl.a & (-5)) | 4;
|
||
|
}
|
||
|
f();
|
||
|
return Kj_;
|
||
|
}
|
||
|
}
|