导航菜单

页面标题

页面副标题

050 IP Phone v2.3.0 - SendLogActivity.java 源代码

正在查看: 050 IP Phone v2.3.0 应用的 SendLogActivity.java JAVA 源代码文件

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


package com.ntt.voip.android.com050plus.setting;

import android.R;
import android.app.AlertDialog;
import android.app.Dialog;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.IntentFilter;
import android.os.Bundle;
import android.text.Editable;
import android.text.TextUtils;
import android.text.method.LinkMovementMethod;
import android.view.View;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.TextView;
import androidx.core.content.ContextCompat;
import androidx.preference.PreferenceManager;
import com.oki_access.android.ims.call.BaseActivity;
import i4.a;
import t4.p;
import t4.z;

public class SendLogActivity extends BaseActivity implements a.d {
    private Button X;
    private Button Y;
    private Button Z;
    private CheckBox y;
    private s3.a x = null;
    private BroadcastReceiver s0 = new a();

    class a extends BroadcastReceiver {
        a() {
        }

        @Override
        public void onReceive(Context context, Intent intent) {
            if (LogEnableReceiver.b.equals(intent.getAction())) {
                SendLogActivity.this.finish();
            }
        }
    }

    class b implements View.OnClickListener {
        b() {
        }

        @Override
        public void onClick(View view) {
            if (SendLogActivity.this.x.s()) {
                SendLogActivity.this.x.A();
            } else {
                p.s(SendLogActivity.this, 2, null);
            }
        }
    }

    class c implements View.OnClickListener {
        c() {
        }

        @Override
        public void onClick(View view) {
            p.s(SendLogActivity.this, 1, null);
        }
    }

    class d implements View.OnClickListener {
        d() {
        }

        @Override
        public void onClick(View view) {
            p.s(SendLogActivity.this, 3, null);
        }
    }

    class e implements DialogInterface.OnClickListener {
        e() {
        }

        @Override
        public void onClick(DialogInterface dialogInterface, int i) {
            SendLogActivity.this.x.h();
        }
    }

    class f implements DialogInterface.OnClickListener {
        f() {
        }

        @Override
        public void onClick(DialogInterface dialogInterface, int i) {
        }
    }

    class g implements DialogInterface.OnClickListener {
        g() {
        }

        @Override
        public void onClick(DialogInterface dialogInterface, int i) {
            SendLogActivity.this.x.z();
            SendLogActivity.this.y.setChecked(true);
        }
    }

    class h implements DialogInterface.OnClickListener {
        h() {
        }

        @Override
        public void onClick(DialogInterface dialogInterface, int i) {
            String string = SendLogActivity.this.getString(2131886806);
            StringBuilder sb = new StringBuilder();
            sb.append(SendLogActivity.this.getString(2131886803));
            String n = t3.d.n(SendLogActivity.this.getApplicationContext());
            if (!TextUtils.isEmpty(n)) {
                sb.append(SendLogActivity.this.getString(2131886804, n));
            }
            SendLogActivity.this.x.u(string, sb.toString(), a4.a.o().r(), SendLogActivity.this.V("pref_mail_password", com.oki_access.android.ims.call.d.e.Z4()));
        }
    }

    class i implements DialogInterface.OnShowListener {
        i() {
        }

        @Override
        public void onShow(DialogInterface dialogInterface) {
            ((TextView) ((Dialog) dialogInterface).findViewById(R.id.message)).setMovementMethod(LinkMovementMethod.getInstance());
        }
    }

    private Dialog S() {
        AlertDialog.Builder builder = new AlertDialog.Builder(this);
        builder.setMessage(2131886802);
        builder.setPositiveButton(com.oki_access.android.ims.call.d.e.H1(), new e());
        builder.setNegativeButton(com.oki_access.android.ims.call.d.e.E1(), new f());
        return builder.create();
    }

    private Dialog T() {
        AlertDialog create = new AlertDialog.Builder(this).setMessage(Editable.Factory.getInstance().newEditable(getText(2131886807))).setPositiveButton(2131887450, new h()).setNeutralButton(2131887430, (DialogInterface.OnClickListener) null).create();
        create.setOnShowListener(new i());
        return create;
    }

    private Dialog U() {
        return new AlertDialog.Builder(this).setMessage(2131886809).setPositiveButton(2131887450, new g()).setNeutralButton(2131887430, (DialogInterface.OnClickListener) null).create();
    }

    public String V(String str, int i8) {
        return com.oki_access.android.ims.settings.c.h(PreferenceManager.getDefaultSharedPreferences(this).getString(str, getString(i8)));
    }

    @Override
    public void o(boolean z) {
        z.a("SendLogActivity", "onRefresh: ready=[" + z + "]");
        if (!z) {
            z.p("SendLogActivity", "logcat recorder is not ready");
            this.X.setEnabled(false);
            this.Y.setEnabled(false);
            this.Z.setEnabled(false);
            return;
        }
        if (this.x.s() || this.x.r()) {
            this.X.setEnabled(true);
        } else {
            this.X.setEnabled(false);
        }
        this.y.setChecked(this.x.s());
        if (this.x.o()) {
            this.Y.setEnabled(!this.x.s());
        } else {
            this.Y.setEnabled(false);
        }
        if (this.x.r()) {
            this.Z.setEnabled(true);
        } else {
            this.Z.setEnabled(false);
        }
    }

    @Override
    protected void onCreate(Bundle bundle) {
        z.a("SendLogActivity", "onCreate");
        super.onCreate(bundle);
        setContentView(2131492952);
        s3.a aVar = new s3.a(this);
        this.x = aVar;
        aVar.y(this);
        this.x.v(true);
        this.y = (CheckBox) findViewById(2131296712);
        this.X = (Button) findViewById(2131296711);
        this.Y = (Button) findViewById(2131296709);
        this.Z = (Button) findViewById(2131296710);
        o(false);
        this.X.setOnClickListener(new b());
        this.Y.setOnClickListener(new c());
        this.Z.setOnClickListener(new d());
        ContextCompat.registerReceiver(this, this.s0, new IntentFilter(LogEnableReceiver.b), 4);
    }

    @Override
    protected void onDestroy() {
        z.a("SendLogActivity", "onDestroy");
        if (this.x != null) {
            unregisterReceiver(this.s0);
            this.x.v(false);
            this.x.l();
        }
        super.onDestroy();
    }

    @Override
    protected void onPause() {
        z.a("SendLogActivity", "onPause");
        super.onPause();
    }

    @Override
    protected void onResume() {
        z.a("SendLogActivity", "onResume");
        super.onResume();
    }

    @Override
    public Dialog y(int i8, Bundle bundle, p pVar) {
        return i8 != 1 ? i8 != 2 ? i8 != 3 ? super.y(i8, bundle, pVar) : T() : U() : S();
    }
}