导航菜单

页面标题

页面副标题

Tasker v6.5.11 - ProfileProperties.java 源代码

正在查看: Tasker v6.5.11 应用的 ProfileProperties.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package net.dinglisch.android.taskerm;

import android.content.ComponentName;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.CompoundButton;
import android.widget.EditText;
import android.widget.ImageButton;
import android.widget.LinearLayout;
import android.widget.SeekBar;
import android.widget.TextView;

public class ProfileProperties extends MyActivity implements View.OnClickListener, CompoundButton.OnCheckedChangeListener, SeekBar.OnSeekBarChangeListener, pf.a {
    private static final int[] O = {2131296549, 2131296474, 2131296521, 2131296522, 2131296479, 2131296491, 2131296562, 2131296559};
    private static final int[] P = {2131890140, 2131890135, 2131890137, 2131890138, 2131890136, 2131889597, 2131889915, 2131889911};
    private static final int[] Q = {2131887303, 2131887302, 2131887240, 2131887241, 2131887171, 2131887187, 2131887313, 2131887304};
    private CheckBox A;
    private CheckBox B;
    private EditText C;
    public EditText D;
    public Button E;
    public TextView F;
    private LinearLayout G;
    private LinearLayout H;
    private LinearLayout I;
    private TextView J;
    private Button K;
    private SeekBar L;
    public int M = -1;
    private com.joaomgcd.taskerm.helper.v N = new com.joaomgcd.taskerm.helper.v(this);
    private TextView v;
    private CheckBox w;
    private CheckBox x;
    private CheckBox y;
    private CheckBox z;

    class a extends Handler {
        a() {
        }

        @Override
        public void handleMessage(Message message) {
            if (message.what == 0) {
                ProfileProperties.this.K.setText(new co(new qi(message.getData().getBundle("timer"))).toString());
            }
        }
    }

    private void i0() {
        r7.G("PP", "onCreate: no data");
        finish();
    }

    public static Intent j0(wo woVar) {
        Intent intent = new Intent();
        intent.setComponent(new ComponentName(th.B(), ProfileProperties.class.getName()));
        intent.putExtra("profile", woVar.C0());
        return intent;
    }

    private void n0() {
        this.J.setText(Integer.toString(this.L.getProgress()));
    }

    private void o0(boolean z) {
        this.H.setVisibility(z ? 0 : 8);
        this.G.setVisibility(z ? 0 : 8);
    }

    private void p0() {
        t1.j(this, new a(), null, new co(this.K.getText().toString()), false).i(this);
    }

    @Override
    public void g(com.joaomgcd.taskerm.util.e5 e5Var, com.joaomgcd.taskerm.util.t6 t6Var) {
    }

    public void k0() {
        setContentView(2131493638);
        CheckBox checkBox = (CheckBox) findViewById(2131296480);
        this.w = checkBox;
        checkBox.setOnClickListener(this);
        CheckBox checkBox2 = (CheckBox) findViewById(2131296567);
        this.x = checkBox2;
        checkBox2.setOnClickListener(this);
        CheckBox checkBox3 = (CheckBox) findViewById(2131296560);
        this.z = checkBox3;
        checkBox3.setOnClickListener(this);
        CheckBox checkBox4 = (CheckBox) findViewById(2131296490);
        this.A = checkBox4;
        checkBox4.setOnClickListener(this);
        CheckBox checkBox5 = (CheckBox) findViewById(2131296561);
        this.B = checkBox5;
        checkBox5.setOnClickListener(this);
        SeekBar seekBar = (SeekBar) findViewById(2131297268);
        this.L = seekBar;
        seekBar.setMax(50);
        Button button = (Button) findViewById(2131296473);
        this.K = button;
        button.setOnClickListener(this);
        this.J = (TextView) findViewById(2131297271);
        this.L.setOnSeekBarChangeListener(this);
        CheckBox checkBox6 = (CheckBox) findViewById(2131296520);
        this.y = checkBox6;
        checkBox6.setOnClickListener(this);
        this.y.setOnCheckedChangeListener(this);
        this.C = (EditText) findViewById(2131297310);
        this.D = (EditText) findViewById(2131297600);
        this.E = (Button) findViewById(2131296472);
        this.F = (TextView) findViewById(2131297601);
        this.v = (TextView) findViewById(2131296793);
        int i = 0;
        while (true) {
            int[] iArr = O;
            if (i >= iArr.length) {
                this.G = (LinearLayout) findViewById(2131296399);
                this.H = (LinearLayout) findViewById(2131296401);
                this.I = (LinearLayout) findViewById(2131296402);
                setTitle(vh.g(this, 2131887413, new Object[0]));
                dq.M2(this, 2131297248, 2131889940);
                dq.M2(this, 2131297245, 2131889911);
                dq.M2(this, 2131297239, 2131889597);
                dq.M2(this, 2131297246, 2131889915);
                return;
            }
            ((ImageButton) findViewById(iArr[i])).setOnClickListener(this);
            i++;
        }
    }

    public void l0(wo woVar, to toVar) {
        boolean Y0 = woVar.Y0();
        boolean j1 = woVar.j1();
        this.y.setChecked(j1);
        if (j1) {
            int M0 = woVar.M0();
            this.w.setChecked(woVar.j0());
            this.C.setText(Integer.toString(M0));
            o0(true);
        } else {
            o0(false);
        }
        findViewById(2131297327).setVisibility(Y0 ? 8 : 0);
        this.x.setChecked(true ^ woVar.d1());
        this.I.setVisibility(woVar.i1(this, com.joaomgcd.taskerm.util.x2.t(toVar, this, woVar, null, "ProfileProperties:prepare")) ? 8 : 0);
        this.z.setChecked(woVar.q1());
        this.A.setChecked(woVar.s0());
        this.B.setChecked(woVar.H1());
        this.L.setProgress(woVar.L0());
        n0();
        this.K.setText(new co(woVar.y0()).toString());
        this.v.setText(bh.l(this, bh.t(woVar.d())) + " ");
        this.N.G1(woVar.M());
        this.N.H1(woVar.o0());
    }

    public boolean m0() {
        throw new UnsupportedOperationException("Method not decompiled: net.dinglisch.android.taskerm.ProfileProperties.m0():boolean");
    }

    @Override
    public void onBackPressed() {
        if (m0()) {
            setResult(-1);
            finish();
        }
    }

    @Override
    public void onCheckedChanged(CompoundButton compoundButton, boolean z) {
        if (z) {
            this.C.setText("1");
            this.w.setChecked(true);
        }
        o0(z);
    }

    @Override
    public void onClick(View view) {
        if (this.K.equals(view)) {
            p0();
            return;
        }
        int id = view.getId();
        int i = 0;
        while (true) {
            int[] iArr = O;
            if (i >= iArr.length) {
                return;
            }
            if (id == iArr[i]) {
                oi.j(this, P[i], vh.g(this, Q[i], new Object[0]));
                return;
            }
            i++;
        }
    }

    @Override
    public void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        setResult(0);
        k0();
        net.dinglisch.android.taskerm.a.T(this, true);
        if (bundle == null) {
            bundle = getIntent().getExtras();
        }
        if (bundle != null) {
            this.M = bundle.getInt("profile");
        }
        if (this.M != -1) {
            to h2 = to.h2(this);
            if (h2 != null) {
                wo c = h2.c(this.M);
                if (c == null) {
                    i0();
                } else {
                    l0(c, h2);
                }
            } else {
                i0();
            }
        } else {
            r7.G("PP", "onCreate: no profile ID specified");
            finish();
        }
        this.N.I();
    }

    @Override
    public void onDestroy() {
        super.onDestroy();
        this.v = null;
        this.w = null;
        this.x = null;
        this.y = null;
        this.z = null;
        this.A = null;
        this.B = null;
        this.C = null;
        this.G = null;
        this.H = null;
        this.I = null;
        this.N.J();
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem menuItem) {
        int itemId = menuItem.getItemId();
        if (itemId == 1) {
            finish();
        } else if (itemId == 16908332) {
            onBackPressed();
        }
        return true;
    }

    @Override
    public boolean onPrepareOptionsMenu(Menu menu) {
        super.onPrepareOptionsMenu(menu);
        menu.clear();
        net.dinglisch.android.taskerm.a.d(this, 1, menu);
        return true;
    }

    @Override
    public void onProgressChanged(SeekBar seekBar, int i, boolean z) {
        if (seekBar.equals(this.L)) {
            n0();
        }
    }

    @Override
    public void onSaveInstanceState(Bundle bundle) {
        super.onSaveInstanceState(bundle);
        bundle.putInt("profile", this.M);
    }

    @Override
    public void onStartTrackingTouch(SeekBar seekBar) {
    }

    @Override
    public void onStopTrackingTouch(SeekBar seekBar) {
    }
}