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

import android.os.Looper;
import android.os.Message;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.model.s;
import com.tencent.mm.sdk.platformtools.ab;
import com.tencent.mm.sdk.platformtools.ak;

class j$1 extends ak {
    final /* synthetic */ j nNk;

    j$1(j jVar, Looper looper) {
        this.nNk = jVar;
        super(looper);
    }

    public final void handleMessage(Message message) {
        AppMethodBeat.i(113521);
        super.handleMessage(message);
        j jVar;
        Message obtain;
        String mJ;
        switch (message.what) {
            case 1:
                this.nNk.TF.setText(this.nNk.nNj);
                AppMethodBeat.o(113521);
                return;
            case 2:
                ab.d("MicroMsg.ShareHeaderMsgMgr", "update member num, isMyselfTalking=%b, isOtherTalking=%b", new Object[]{Boolean.valueOf(this.nNk.nMO), Boolean.valueOf(this.nNk.nNi)});
                if (!(this.nNk.nMO || this.nNk.nNi)) {
                    jVar = this.nNk;
                    jVar.TF.setTextColor(jVar.nNf);
                    jVar.TF.invalidate();
                    int intValue = ((Integer) message.obj).intValue();
                    if (intValue == 0) {
                        this.nNk.TF.setText(this.nNk.context.getString(2131304117));
                        AppMethodBeat.o(113521);
                        return;
                    }
                    this.nNk.TF.setText(this.nNk.context.getResources().getQuantityString(2131361825, intValue, new Object[]{Integer.valueOf(intValue)}));
                    AppMethodBeat.o(113521);
                    return;
                }
            case 3:
                if (this.nNk.nNi || this.nNk.nMO) {
                    removeMessages(3);
                    obtain = Message.obtain();
                    obtain.what = 3;
                    obtain.obj = message.obj;
                    sendMessage(obtain);
                    AppMethodBeat.o(113521);
                    return;
                }
                this.nNk.nNj = this.nNk.TF.getText().toString();
                j.a(this.nNk);
                mJ = s.mJ((String) message.obj);
                this.nNk.TF.setText(this.nNk.context.getString(2131304123, new Object[]{mJ}));
                if (this.nNk.nMO || this.nNk.nNi) {
                    j.b(this.nNk);
                    AppMethodBeat.o(113521);
                    return;
                }
                break;
            case 4:
                if (this.nNk.nNi || this.nNk.nMO) {
                    removeMessages(4);
                    obtain = Message.obtain();
                    obtain.what = 4;
                    obtain.obj = message.obj;
                    sendMessage(obtain);
                    AppMethodBeat.o(113521);
                    return;
                }
                this.nNk.nNj = this.nNk.TF.getText().toString();
                j.a(this.nNk);
                mJ = s.mJ((String) message.obj);
                this.nNk.TF.setText(this.nNk.context.getString(2131304124, new Object[]{mJ}));
                if (this.nNk.nMO || this.nNk.nNi) {
                    j.b(this.nNk);
                    AppMethodBeat.o(113521);
                    return;
                }
                break;
            case 5:
                this.nNk.nNi = true;
                this.nNk.nMO = false;
                j.a(this.nNk);
                mJ = s.mJ((String) message.obj);
                this.nNk.TF.setText(this.nNk.context.getString(2131304125, new Object[]{mJ}));
                AppMethodBeat.o(113521);
                return;
            case 6:
                this.nNk.nMO = true;
                this.nNk.nNi = false;
                j.a(this.nNk);
                this.nNk.TF.setText(this.nNk.context.getString(2131304122));
                AppMethodBeat.o(113521);
                return;
            case 7:
                this.nNk.nNi = true;
                jVar = this.nNk;
                jVar.TF.setTextColor(jVar.nNg);
                jVar.TF.invalidate();
                this.nNk.TF.setText(this.nNk.context.getString(2131304127));
                this.nNk.nNj = this.nNk.TF.getText().toString();
                j.b(this.nNk);
                AppMethodBeat.o(113521);
                return;
            case 8:
                jVar = this.nNk;
                jVar.TF.setTextColor(jVar.nNh);
                jVar.TF.invalidate();
                this.nNk.TF.setText(this.nNk.context.getString(2131304128));
                AppMethodBeat.o(113521);
                return;
            case 9:
                this.nNk.nMO = false;
                if (!this.nNk.nNi) {
                    this.nNk.iC(true);
                    AppMethodBeat.o(113521);
                    return;
                }
                break;
            case 10:
                this.nNk.nNi = false;
                this.nNk.iC(false);
                break;
        }
        AppMethodBeat.o(113521);
    }
}
