final boolean a(android.view.KeyEvent p7)
    {
        String v0_0 = this.d;
        int v2 = 1;
        if (((v0_0 instanceof a.hq$a)) || ((v0_0 instanceof a.t))) {
            String v0_15 = this.c.getDecorView();
            if ((v0_15 != null) && (a.hq.a(v0_15, p7))) {
                return 1;
            }
        }
        if ((p7.getKeyCode() != 82) || (!this.d.dispatchKeyEvent(p7))) {
            int v3_1;
            String v0_9 = p7.getKeyCode();
            if (p7.getAction() != 0) {
                v3_1 = 0;
            } else {
                v3_1 = 1;
            }
            if (v3_1 == 0) {
                if (v0_9 == 4) {
                    int v7_9 = this.M;
                    this.M = 0;
                    String v0_10 = this.e(0);
                    if ((v0_10 == null) || (!v0_10.o)) {
                        int v7_13;
                        int v7_10 = this.i;
                        if (v7_10 == 0) {
                            int v7_11 = this.a();
                            if ((v7_11 == 0) || (!v7_11.h())) {
                                v7_13 = 0;
                            } else {
                                v7_13 = 1;
                            }
                        } else {
                            v7_10.c();
                        }
                        if (v7_13 != 0) {
                            return 1;
                        }
                    } else {
                        if (v7_9 == 0) {
                            this.a(v0_10, 1);
                        }
                        return 1;
                    }
                } else {
                    if (v0_9 == 82) {
                        if (this.i == null) {
                            int v7_1;
                            String v0_13 = this.e(0);
                            int v1_4 = this.A;
                            if ((v1_4 == 0) || ((!v1_4.b()) || (android.view.ViewConfiguration.get(this.b).hasPermanentMenuKey()))) {
                                if ((!v0_13.o) && (!v0_13.n)) {
                                    if (!v0_13.m) {
                                        v7_1 = 0;
                                    } else {
                                        int v1_13;
                                        if (!v0_13.r) {
                                            v1_13 = 1;
                                        } else {
                                            v0_13.m = 0;
                                            v1_13 = this.b(v0_13, p7);
                                        }
                                        if (v1_13 == 0) {
                                        } else {
                                            this.a(v0_13, p7);
                                            v7_1 = 1;
                                        }
                                    }
                                } else {
                                    v7_1 = v0_13.o;
                                    this.a(v0_13, 1);
                                }
                            } else {
                                if (this.A.c()) {
                                    v7_1 = this.A.f();
                                } else {
                                    if ((this.t) || (!this.b(v0_13, p7))) {
                                    } else {
                                        v7_1 = this.A.e();
                                    }
                                }
                            }
                            if (v7_1 != 0) {
                                int v7_5 = ((android.media.AudioManager) this.b.getSystemService(audio));
                                if (v7_5 == 0) {
                                    android.util.Log.w(AppCompatDelegate, Couldn't get audio manager);
                                } else {
                                    v7_5.playSoundEffect(0);
                                }
                            }
                        }
                        return 1;
                    }
                }
                return 0;
            } else {
                if (v0_9 == 4) {
                    if ((p7.getFlags() & 128) == 0) {
                        v2 = 0;
                    }
                    this.M = v2;
                } else {
                    if (v0_9 == 82) {
                        if (p7.getRepeatCount() == 0) {
                            String v0_5 = this.e(0);
                            if (!v0_5.o) {
                                this.b(v0_5, p7);
                            }
                        }
                        return 1;
                    }
                }
                return 0;
            }
        } else {
            return 1;
        }
    }