360手机助手 v3.3.0版本的 MD5 值为:127c345ad16bbebee6e347381328afd0

以下内容为反编译后的 UserCheckDialog.java 源代码,内容仅作参考


package com.qihoo.appstore.activities;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.os.ResultReceiver;
import android.text.TextUtils;
import android.view.KeyEvent;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import com.qihoo.appstore.webview.MyWebView;
import com.qihoo.freewifi.push.R;

public class UserCheckDialog extends Activity implements View.OnClickListener {

    private TextView f713a;

    private TextView f714b;
    private MyWebView d;
    private TextView e;
    private ResultReceiver c = null;
    private String f = "http://openbox.mobilem.360.cn/html/xieyi_one/index.html";

    private void a(int i) {
        if (this.c != null) {
            this.c.send(i, null);
        }
    }

    private void a(Intent intent) {
        this.c = (ResultReceiver) intent.getParcelableExtra("receiver");
        String stringExtra = intent.getStringExtra("name");
        if (!TextUtils.isEmpty(stringExtra)) {
            ((TextView) findViewById(R.id.check_name)).setText(String.format(getString(R.string.user_check_dialog_name), "\"" + stringExtra + "\""));
        }
        findViewById(R.id.wrapper).setOnClickListener(this);
        this.f713a = (TextView) findViewById(R.id.ok_btn);
        this.f713a.setOnClickListener(this);
        this.f714b = (TextView) findViewById(R.id.cancle_btn);
        this.f714b.setOnClickListener(this);
        this.d = new MyWebView(MainActivity.e());
        ViewGroup viewGroup = (ViewGroup) findViewById(R.id.webview_container);
        this.d.a(findViewById(R.id.loading), findViewById(R.id.retry), (View) null);
        viewGroup.addView(this.d);
        this.e = (TextView) findViewById(R.id.checkTxt);
        this.e.setOnClickListener(this);
        this.e.setSelected(true);
        this.d.loadUrl(this.f);
    }

    private void a(View view) {
        View findViewById = findViewById(R.id.wb_view_wrapper);
        findViewById.getLayoutParams().height = (int) getResources().getDimension(R.dimen.web_license_expand_height);
        view.setVisibility(8);
        findViewById.requestLayout();
    }

    private void b(View view) {
        TextView textView = (TextView) view;
        textView.setSelected(!textView.isSelected());
        textView.setCompoundDrawablesWithIntrinsicBounds(textView.isSelected() ? R.drawable.explorer_blue_selected : R.drawable.explorer_blue_unselected, 0, 0, 0);
        this.f713a.setTextColor(textView.isSelected() ? -1 : getResources().getColor(R.color.cancle_btn_bg));
        this.f713a.setBackgroundResource(textView.isSelected() ? R.drawable.share_main_ok_bottom : R.drawable.share_main_bottom_cancel);
        this.f713a.setClickable(textView.isSelected());
    }

    @Override
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.wrapper:
                a(view);
                return;
            case R.id.ok_btn:
                a(1);
                finish();
                return;
            case R.id.checkTxt:
                b(view);
                return;
            case R.id.cancle_btn:
                a(2);
                finish();
                return;
            default:
                return;
        }
    }

    @Override
    protected void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        setContentView(R.layout.user_check_dialog);
        a(getIntent());
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        if (this.d != null) {
            this.d.b();
        }
    }

    @Override
    public boolean onKeyDown(int i, KeyEvent keyEvent) {
        if (i == 82) {
            return false;
        }
        if (i == 4) {
            return true;
        }
        return super.onKeyDown(i, keyEvent);
    }
}