package o; import android.content.Context; import android.util.Base64; import android.view.Menu; import android.view.MenuInflater; import android.view.MenuItem; import android.view.View; import androidx.appcompat.widget.ActionBarContextView; import java.lang.ref.WeakReference; import java.nio.charset.StandardCharsets; import o.NoP; import o.vsf; /* loaded from: classes.dex */ public final class TIz extends vsf implements NoP.Sts { private static byte j = 6; private static int k = 1; private static int l; private vsf.HBt b; private ActionBarContextView d; private Context e; private boolean f; private WeakReference g; private NoP h; private boolean i; private void m(String str, Object[] objArr) { byte[] decode = Base64.decode(str, 0); byte[] bArr = new byte[decode.length]; for (int i = 0; i < decode.length; i++) { bArr[i] = (byte) (decode[(decode.length - i) - 1] ^ j); } objArr[0] = new String(bArr, StandardCharsets.UTF_8); } public TIz(Context context, ActionBarContextView actionBarContextView, vsf.HBt hBt, boolean z) { this.e = context; this.d = actionBarContextView; this.b = hBt; NoP noP = new NoP(actionBarContextView.getContext()); noP.a = 1; this.h = noP; noP.d(this); this.f = z; } @Override // o.vsf public final void d(CharSequence charSequence) { this.d.setTitle(charSequence); } @Override // o.vsf public final void e(CharSequence charSequence) { this.d.setSubtitle(charSequence); } @Override // o.vsf public final void e(int i) { int i2 = 2 % 2; int i3 = k + 93; l = i3 % 128; if (i3 % 2 != 0) { this.e.getString(i).startsWith(",*,)"); Object obj = null; obj.hashCode(); throw null; } String string = this.e.getString(i); if (string.startsWith(",*,)")) { Object[] objArr = new Object[1]; m(string.substring(4), objArr); string = ((String) objArr[0]).intern(); int i4 = k + 31; l = i4 % 128; int i5 = i4 % 2; } this.d.setTitle(string); int i6 = k + 51; l = i6 % 128; int i7 = i6 % 2; } @Override // o.vsf public final void b(int i) { int i2 = 2 % 2; int i3 = k + 101; l = i3 % 128; int i4 = i3 % 2; String string = this.e.getString(i); if (!(!string.startsWith(",*,)"))) { Object[] objArr = new Object[1]; m(string.substring(4), objArr); string = ((String) objArr[0]).intern(); } this.d.setSubtitle(string); int i5 = l + 55; k = i5 % 128; if (i5 % 2 == 0) { throw null; } } @Override // o.vsf public final void c(boolean z) { super.c(z); this.d.setTitleOptional(z); } @Override // o.vsf public final void a(View view) { this.d.setCustomView(view); this.g = view != null ? new WeakReference<>(view) : null; } @Override // o.vsf public final void f() { this.b.ek_(this, this.h); } @Override // o.vsf public final void e() { if (this.i) { return; } this.i = true; this.b.c(this); } @Override // o.vsf public final View c() { WeakReference weakReference = this.g; if (weakReference != null) { return weakReference.get(); } return null; } @Override // o.vsf public final MenuInflater ee_() { return new JHJ(this.d.getContext()); } @Override // o.NoP.Sts public final boolean Ko_(NoP noP, MenuItem menuItem) { return this.b.ei_(this, menuItem); } @Override // o.NoP.Sts public final void b(NoP noP) { this.b.ek_(this, this.h); this.d.d(); } @Override // o.vsf public final CharSequence g() { return this.d.f; } @Override // o.vsf public final CharSequence j() { return this.d.i; } @Override // o.vsf public final boolean h() { return this.d.g; } @Override // o.vsf public final Menu ed_() { return this.h; } }