package com.tencent.mm.openim.room.a;

import android.util.Pair;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.kernel.g;
import com.tencent.mm.sdk.platformtools.ab;
import com.tencent.mm.sdk.platformtools.ap.a;
import com.tencent.mm.storage.ad;
import com.tencent.mm.storage.bd;
import java.util.LinkedList;

public class a$2 implements a {
    final /* synthetic */ bd ehA;
    final /* synthetic */ LinkedList ehz;
    final /* synthetic */ c gfO;

    public a$2(LinkedList linkedList, c cVar, bd bdVar) {
        this.ehz = linkedList;
        this.gfO = cVar;
        this.ehA = bdVar;
    }

    public final boolean BI() {
        AppMethodBeat.i(78968);
        int size = this.ehz.size() < 25 ? this.ehz.size() : 25;
        ab.d("OpenIMChatRoomContactLogic", "updateMemberDetail update ctg list size:%d, loopCount:%d", new Object[]{Integer.valueOf(this.ehz.size()), Integer.valueOf(size)});
        if (size == 0) {
            if (this.gfO != null) {
                this.gfO.mH(2);
            }
            ab.i("OpenIMChatRoomContactLogic", "updateMemberDetail update ctg done loopCount is 0");
            AppMethodBeat.o(78968);
            return false;
        }
        long currentTimeMillis = System.currentTimeMillis();
        long iV = g.RP().eJN.iV(Thread.currentThread().getId());
        for (int i = 0; i < size; i++) {
            Pair pair = (Pair) this.ehz.poll();
            this.ehA.b((String) pair.first, (ad) pair.second);
        }
        g.RP().eJN.mB(iV);
        ab.d("OpenIMChatRoomContactLogic", "updateMemberDetail update ctg loopCount:%d, take time:%d(ms)", new Object[]{Integer.valueOf(size), Long.valueOf(System.currentTimeMillis() - currentTimeMillis)});
        if (this.ehz.isEmpty()) {
            if (this.gfO != null) {
                this.gfO.mH(2);
            }
            ab.i("OpenIMChatRoomContactLogic", "updateMemberDetail update ctg done updateList is empty");
            AppMethodBeat.o(78968);
            return false;
        }
        AppMethodBeat.o(78968);
        return true;
    }
}
