package com.tencent.mm.plugin.setting.ui.fixtools;

import android.os.Bundle;
import android.view.KeyEvent;
import android.view.MenuItem;
import android.view.MenuItem.OnMenuItemClickListener;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.ProgressBar;
import android.widget.TextView;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.kernel.b;
import com.tencent.mm.kernel.g;
import com.tencent.mm.model.bk;
import com.tencent.mm.model.r;
import com.tencent.mm.plugin.setting.model.a$2;
import com.tencent.mm.plugin.setting.model.a.1;
import com.tencent.mm.sdk.platformtools.ab;
import com.tencent.mm.sdk.platformtools.bo;
import com.tencent.mm.ui.MMWizardActivity;
import com.tencent.mm.ui.base.a;

@a(3)
public class FixToolsUpLogUploadingUI extends MMWizardActivity {
    private Button ixU;
    public com.tencent.mm.plugin.setting.model.a.a qjB = new 3(this);
    private TextView qkk;
    private ImageView qkl;
    protected ProgressBar qkm;

    public void onWindowFocusChanged(boolean z) {
        super.onWindowFocusChanged(z);
        AppMethodBeat.at(this, z);
    }

    public FixToolsUpLogUploadingUI() {
        AppMethodBeat.i(126889);
        AppMethodBeat.o(126889);
    }

    public void onCreate(Bundle bundle) {
        AppMethodBeat.i(126890);
        super.onCreate(bundle);
        if (getIntent().getExtras().getBoolean("WizardRootKillSelf", false)) {
            AppMethodBeat.o(126890);
            return;
        }
        setMMTitle(2131299888);
        this.qkk = (TextView) findViewById(2131824069);
        this.qkl = (ImageView) findViewById(2131824068);
        this.ixU = (Button) findViewById(2131824071);
        this.qkm = (ProgressBar) findViewById(2131824070);
        this.qkl.setImageResource(2131231309);
        this.qkk.setText(2131299894);
        this.ixU.setOnClickListener(new 1(this));
        setBackBtn(new OnMenuItemClickListener() {
            public final boolean onMenuItemClick(MenuItem menuItem) {
                AppMethodBeat.i(126887);
                FixToolsUpLogUploadingUI.b(FixToolsUpLogUploadingUI.this);
                AppMethodBeat.o(126887);
                return true;
            }
        });
        this.qkm.setVisibility(0);
        this.ixU.setVisibility(8);
        String stringExtra = getIntent().getStringExtra("date");
        com.tencent.mm.plugin.setting.model.a cir = com.tencent.mm.plugin.setting.model.a.cir();
        com.tencent.mm.plugin.setting.model.a.qjB = this.qjB;
        ab.i("MicroMsg.FixToolsUplogModel", "startUplog, date:%s, isUploading:%b", new Object[]{stringExtra, Boolean.valueOf(cir.fPO)});
        if (!cir.fPO) {
            cir.fPO = true;
            String str = "weixin";
            if (g.RK()) {
                str = r.Yz();
            }
            ab.i("MicroMsg.FixToolsUplogModel", "startNewUplog, chooseTime:%d, time:%d", new Object[]{Long.valueOf(com.tencent.mm.plugin.setting.model.a.Ff(new StringBuffer(stringExtra).append("000000").toString())), Integer.valueOf((int) ((((((bo.anU() / 86400000) * 86400000) + 57600000) - 1) - com.tencent.mm.plugin.setting.model.a.Ff(new StringBuffer(stringExtra).append("000000").toString())) / 86400000))});
            g.Rg().a(new bk(new 1(cir, str, r1)), 0);
            b.a(new a$2(cir));
        }
        AppMethodBeat.o(126890);
    }

    public boolean onKeyDown(int i, KeyEvent keyEvent) {
        AppMethodBeat.i(126891);
        if (i == 4) {
            Ni(1);
            AppMethodBeat.o(126891);
            return true;
        }
        boolean onKeyDown = super.onKeyDown(i, keyEvent);
        AppMethodBeat.o(126891);
        return onKeyDown;
    }

    public final int getLayoutId() {
        return 2130969568;
    }

    static /* synthetic */ void a(FixToolsUpLogUploadingUI fixToolsUpLogUploadingUI) {
        AppMethodBeat.i(126892);
        fixToolsUpLogUploadingUI.Ni(1);
        AppMethodBeat.o(126892);
    }

    static /* synthetic */ void b(FixToolsUpLogUploadingUI fixToolsUpLogUploadingUI) {
        AppMethodBeat.i(126893);
        fixToolsUpLogUploadingUI.Ni(1);
        AppMethodBeat.o(126893);
    }
}
