package o; import android.content.Context; import android.os.Bundle; import android.util.Base64; import android.util.TypedValue; import android.view.KeyEvent; import android.view.View; import android.view.ViewGroup; import java.nio.charset.StandardCharsets; import o.Rut; import o.SYO; import o.vsf; /* loaded from: classes.dex */ public class JRt extends HBt implements qPj { private static byte b = 6; private static int d = 1; private static int e; private final Rut.Sts a; private Yju c; @Override // o.qPj public void onSupportActionModeFinished(vsf vsfVar) { } @Override // o.qPj public void onSupportActionModeStarted(vsf vsfVar) { } @Override // o.qPj public vsf onWindowStartingSupportActionMode(vsf.HBt hBt) { return null; } private void k(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] ^ b); } objArr[0] = new String(bArr, StandardCharsets.UTF_8); } public JRt(Context context, int i) { super(context, c(context, i)); this.a = new Rut.Sts(this) { // from class: o.lmI public final JRt c; @Override // o.Rut.Sts public final boolean superDispatchKeyEvent(KeyEvent keyEvent) { return this.c.di_(keyEvent); } { this.c = this; } }; Yju e2 = e(); e2.b(c(context, i)); e2.cC_(null); } @Override // o.HBt, android.app.Dialog public void onCreate(Bundle bundle) { e().o(); super.onCreate(bundle); e().cC_(bundle); } @Override // o.HBt, android.app.Dialog public void setContentView(int i) { e().d(i); } @Override // o.HBt, android.app.Dialog public void setContentView(View view) { e().d(view); } @Override // o.HBt, android.app.Dialog public void setContentView(View view, ViewGroup.LayoutParams layoutParams) { e().cL_(view, layoutParams); } @Override // android.app.Dialog public T findViewById(int i) { return (T) e().c(i); } @Override // android.app.Dialog public void setTitle(CharSequence charSequence) { super.setTitle(charSequence); e().c(charSequence); } /* JADX WARN: Code restructure failed: missing block: B:10:0x0052, code lost: k(r6, r0); r6 = ((java.lang.String) r0[0]).intern(); */ /* JADX WARN: Code restructure failed: missing block: B:11:0x005e, code lost: k(r6, r0); ((java.lang.String) r0[0]).intern(); r6 = null; r6.hashCode(); */ /* JADX WARN: Code restructure failed: missing block: B:12:0x006c, code lost: throw null; */ /* JADX WARN: Code restructure failed: missing block: B:14:0x003d, code lost: if (r6.startsWith(",*,)") != false) goto L9; */ /* JADX WARN: Code restructure failed: missing block: B:4:0x0027, code lost: if (r6.startsWith(",*,)") != false) goto L9; */ /* JADX WARN: Code restructure failed: missing block: B:8:0x003f, code lost: r2 = o.JRt.d + 121; o.JRt.e = r2 % 128; r2 = r2 % 2; r6 = r6.substring(4); r0 = new java.lang.Object[1]; */ /* JADX WARN: Code restructure failed: missing block: B:9:0x0050, code lost: if (r2 != 0) goto L12; */ @Override // android.app.Dialog /* Code decompiled incorrectly, please refer to instructions dump. To view partially-correct add '--show-bad-code' argument */ public void setTitle(int r6) { /* r5 = this; r0 = 2 int r1 = r0 % r0 int r1 = o.JRt.d int r1 = r1 + 13 int r2 = r1 % 128 o.JRt.e = r2 int r1 = r1 % r0 java.lang.String r2 = ",*,)" r3 = 0 if (r1 == 0) goto L2a super.setTitle(r6) o.Yju r1 = r5.e() android.content.Context r4 = r5.getContext() java.lang.String r6 = r4.getString(r6) boolean r2 = r6.startsWith(r2) r4 = 63 int r4 = r4 / r3 if (r2 == 0) goto L6d goto L3f L2a: super.setTitle(r6) o.Yju r1 = r5.e() android.content.Context r4 = r5.getContext() java.lang.String r6 = r4.getString(r6) boolean r2 = r6.startsWith(r2) if (r2 == 0) goto L6d L3f: int r2 = o.JRt.d int r2 = r2 + 121 int r4 = r2 % 128 o.JRt.e = r4 int r2 = r2 % r0 r0 = 1 r4 = 4 java.lang.String r6 = r6.substring(r4) java.lang.Object[] r0 = new java.lang.Object[r0] if (r2 != 0) goto L5e r5.k(r6, r0) r6 = r0[r3] java.lang.String r6 = (java.lang.String) r6 java.lang.String r6 = r6.intern() goto L6d L5e: r5.k(r6, r0) r6 = r0[r3] java.lang.String r6 = (java.lang.String) r6 r6.intern() r6 = 0 r6.hashCode() throw r6 L6d: r1.c(r6) return */ throw new UnsupportedOperationException("Method not decompiled: o.JRt.setTitle(int):void"); } @Override // o.HBt, android.app.Dialog public void addContentView(View view, ViewGroup.LayoutParams layoutParams) { e().ct_(view, layoutParams); } @Override // o.HBt, android.app.Dialog public void onStop() { super.onStop(); e().t(); } @Override // android.app.Dialog, android.content.DialogInterface public void dismiss() { super.dismiss(); e().l(); } public boolean b(int i) { return e().a(i); } @Override // android.app.Dialog public void invalidateOptionsMenu() { e().n(); } public Yju e() { if (this.c == null) { this.c = Yju.bV_(this, this); } return this.c; } private static int c(Context context, int i) { if (i != 0) { return i; } TypedValue typedValue = new TypedValue(); context.getTheme().resolveAttribute(SYO.IeS.dialogTheme, typedValue, true); return typedValue.resourceId; } /* JADX INFO: Access modifiers changed from: package-private */ public boolean di_(KeyEvent keyEvent) { return super.dispatchKeyEvent(keyEvent); } @Override // android.app.Dialog, android.view.Window.Callback public boolean dispatchKeyEvent(KeyEvent keyEvent) { return Rut.ru_(this.a, getWindow().getDecorView(), this, keyEvent); } }