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

import android.view.View;
import android.view.View.OnClickListener;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.plugin.qqmail.stub.ReadMailProxy;
import com.tencent.mm.sdk.platformtools.ab;
import com.tencent.mm.sdk.platformtools.bo;

class ReadMailUI$7 implements OnClickListener {
    final /* synthetic */ ReadMailUI pzZ;

    ReadMailUI$7(ReadMailUI readMailUI) {
        this.pzZ = readMailUI;
    }

    public final void onClick(View view) {
        AppMethodBeat.i(68426);
        switch (ReadMailUI.w(this.pzZ)) {
            case 0:
                ReadMailUI.a(this.pzZ, 2);
                if (bo.isNullOrNil(ReadMailUI.x(this.pzZ)) || bo.isNullOrNil(ReadMailUI.y(this.pzZ))) {
                    ReadMailUI.A(this.pzZ);
                    AppMethodBeat.o(68426);
                    return;
                }
                ReadMailUI.z(this.pzZ);
                AppMethodBeat.o(68426);
                return;
            case 1:
                ReadMailUI.a(this.pzZ, 1);
                int intValue = ((Integer) new ReadMailProxy(ReadMailUI.l(this.pzZ), null).REMOTE_CALL("removeDownloadQQMailAppTask", new Object[]{Long.valueOf(ReadMailUI.B(this.pzZ))})).intValue();
                if (intValue == -1) {
                    ab.e("MicroMsg.ReadMailUI", "cancel_download_task:fail_apilevel_too_low downloadId = %d", new Object[]{Long.valueOf(ReadMailUI.B(this.pzZ))});
                    AppMethodBeat.o(68426);
                    return;
                } else if (intValue <= 0) {
                    ab.e("MicroMsg.ReadMailUI", "cancel_download_task:fail downloadId = %d", new Object[]{Long.valueOf(ReadMailUI.B(this.pzZ))});
                    AppMethodBeat.o(68426);
                    return;
                } else {
                    ab.i("MicroMsg.ReadMailUI", "cancel_download_task:ok downloadId = %d", new Object[]{Long.valueOf(ReadMailUI.B(this.pzZ))});
                    ReadMailUI.C(this.pzZ).stopTimer();
                    ReadMailUI.b(this.pzZ, 0);
                    ReadMailUI.D(this.pzZ);
                    ReadMailUI.p(this.pzZ);
                    AppMethodBeat.o(68426);
                    return;
                }
            case 2:
                ReadMailUI.a(this.pzZ, 3);
                ReadMailUI.E(this.pzZ);
                AppMethodBeat.o(68426);
                return;
            case 3:
                ReadMailUI.a(this.pzZ, 4);
                ReadMailUI.F(this.pzZ);
                break;
        }
        AppMethodBeat.o(68426);
    }
}
