package com.tencent.mm.plugin.music.model.notification;

import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.g.a.ke;
import com.tencent.mm.plugin.music.e.e;
import com.tencent.mm.plugin.music.model.e.a;
import com.tencent.mm.sdk.b.b;
import com.tencent.mm.sdk.b.c;
import com.tencent.mm.sdk.platformtools.ab;
import com.tencent.mm.sdk.platformtools.al;

public class b$1 extends c<ke> {
    final /* synthetic */ b oMR;

    public b$1(b bVar) {
        this.oMR = bVar;
        AppMethodBeat.i(104986);
        this.xxI = ke.class.getName().hashCode();
        AppMethodBeat.o(104986);
    }

    public final /* synthetic */ boolean a(b bVar) {
        AppMethodBeat.i(104987);
        ke keVar = (ke) bVar;
        if (this.oMR.oMK != null) {
            ab.i("MicroMsg.Music.MMMusicNotificationHelper", "event.data.action:%d", new Object[]{Integer.valueOf(keVar.cFH.action)});
            a bTU;
            switch (keVar.cFH.action) {
                case 0:
                case 1:
                case 11:
                    if (this.oMR.oMK != null) {
                        bTU = ((e) com.tencent.mm.plugin.music.f.c.b.ar(e.class)).bTU();
                        if (bTU != null) {
                            this.oMR.oMK.c(bTU);
                            break;
                        }
                        ab.e("MicroMsg.Music.MMMusicNotificationHelper", "music is null, return");
                        break;
                    }
                    break;
                case 2:
                    if (!(this.oMR.oMK == null || keVar.cFH.cFK)) {
                        this.oMR.oMK.stop();
                        break;
                    }
                case 3:
                    if (this.oMR.oMK != null) {
                        bTU = ((e) com.tencent.mm.plugin.music.f.c.b.ar(e.class)).bTU();
                        if (bTU != null) {
                            this.oMR.oMK.d(bTU);
                            break;
                        }
                        ab.e("MicroMsg.Music.MMMusicNotificationHelper", "music is null, return");
                        break;
                    }
                    break;
                case 4:
                    if (this.oMR.oMK != null) {
                        this.oMR.oMK.stop();
                        break;
                    }
                    break;
                case 7:
                    if (((e) com.tencent.mm.plugin.music.f.c.b.ar(e.class)).getMode() == 1 && this.oMR.oMK != null) {
                        MMMusicPlayerService mMMusicPlayerService = this.oMR.oMK;
                        ab.i("MicroMsg.Music.MMMusicPlayerService", "end");
                        a aVar = mMMusicPlayerService.oMS;
                        if (!aVar.bZi) {
                            ab.e("MicroMsg.Music.MMMusicNotification", "MMMusicNotification not init, close err");
                        } else if (aVar.oMK == null) {
                            ab.e("MicroMsg.Music.MMMusicNotification", "mmMusicPlayerService is null, return");
                        } else {
                            ab.i("MicroMsg.Music.MMMusicNotification", "end");
                            al.af(aVar.oMM);
                            al.n(aVar.oMM, 2000);
                        }
                        al.af(mMMusicPlayerService.oMT);
                        al.n(mMMusicPlayerService.oMT, 60000);
                        break;
                    }
            }
        }
        this.oMR.bUr();
        AppMethodBeat.o(104987);
        return false;
    }
}
