package com.tencent.mm.plugin.shake.ui;

import android.content.DialogInterface;
import android.content.DialogInterface.OnClickListener;
import android.database.Cursor;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.model.aw;
import com.tencent.mm.plugin.report.service.h;
import com.tencent.mm.plugin.shake.b.m;
import com.tencent.mm.plugin.shake.d.a.c;
import com.tencent.mm.plugin.shake.d.a.n;
import com.tencent.mm.plugin.shake.d.a.o;
import com.tencent.mm.plugin.shake.ui.ShakeTvHistoryListUI.2;
import java.util.ArrayList;

class ShakeTvHistoryListUI$2$1 implements OnClickListener {
    final /* synthetic */ 2 qwy;

    ShakeTvHistoryListUI$2$1(2 2) {
        this.qwy = 2;
    }

    public final void onClick(DialogInterface dialogInterface, int i) {
        AppMethodBeat.i(24893);
        h hVar = h.pYm;
        Object[] objArr = new Object[2];
        objArr[0] = Integer.valueOf(2);
        o cjU = m.cjU();
        ArrayList<n> arrayList = new ArrayList();
        Cursor cky = cjU.cky();
        if (cky != null) {
            while (cky.moveToNext()) {
                n nVar = new n();
                nVar.d(cky);
                arrayList.add(nVar);
            }
            cky.close();
        }
        StringBuilder stringBuilder = new StringBuilder();
        for (n nVar2 : arrayList) {
            stringBuilder.append(nVar2.field_username);
            stringBuilder.append("|");
        }
        objArr[1] = stringBuilder.toString();
        hVar.e(12662, objArr);
        m.cjU().bSd.delete("shaketvhistory", null, null);
        aw.Rg().a(new c(2, null), 0);
        ShakeTvHistoryListUI.a(this.qwy.qwx).KC();
        this.qwy.qwx.enableOptionMenu(false);
        AppMethodBeat.o(24893);
    }
}
