TIM v2.3.1版本的 MD5 值为:d6957e3ee7ce901ccc491cefdea0da8c

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


package com.tencent.mobileqq.activity;

import SecurityAccountServer.RespondQueryQQBindingStat;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.CompoundButton;
import android.widget.TextView;
import com.tencent.common.config.AppSetting;
import com.tencent.mobileqq.activity.phone.BindNumberActivity;
import com.tencent.mobileqq.activity.phone.PhoneLaunchActivity;
import com.tencent.mobileqq.activity.phone.PhoneMatchActivity;
import com.tencent.mobileqq.activity.phone.SettingActivity2;
import com.tencent.mobileqq.activity.specialcare.SpecailCareListActivity;
import com.tencent.mobileqq.app.AppConstants;
import com.tencent.mobileqq.app.CardHandler;
import com.tencent.mobileqq.app.CardObserver;
import com.tencent.mobileqq.app.FriendListObserver;
import com.tencent.mobileqq.app.FriendsManager;
import com.tencent.mobileqq.app.IphoneTitleBarActivity;
import com.tencent.mobileqq.app.LBSObserver;
import com.tencent.mobileqq.app.PhoneContactManagerImp;
import com.tencent.mobileqq.app.ThreadManager;
import com.tencent.mobileqq.contactsync.ContactSyncManager;
import com.tencent.mobileqq.model.PhoneContactManager;
import com.tencent.mobileqq.phonecontact.BindMsgConstant;
import com.tencent.mobileqq.richstatus.IStatusListener;
import com.tencent.mobileqq.richstatus.StatusManager;
import com.tencent.mobileqq.statistics.ReportController;
import com.tencent.mobileqq.utils.ContactUtils;
import com.tencent.mobileqq.widget.FormCommonSingleLineItem;
import com.tencent.mobileqq.widget.FormCommonSwitchItem;
import com.tencent.mobileqq.widget.FormSwitchItem;
import com.tencent.mobileqq.widget.QQProgressDialog;
import com.tencent.mobileqq.widget.QQProgressNotifier;
import com.tencent.mobileqq.widget.QQToast;
import com.tencent.mobileqq.widget.QQToastNotifier;
import com.tencent.qphone.base.util.QLog;
import com.tencent.tim.R;
import cooperation.qzone.QZoneHelper;
import java.util.List;
public class PermisionPrivacyActivity extends IphoneTitleBarActivity implements View.OnClickListener, PhoneContactManager.IPhoneContactListener {
    private static final String f85219a = "Q.security";
    View f10398a;
    TextView f10401a;
    private PhoneContactManagerImp f10405a;
    private StatusManager f10407a;
    private FormCommonSingleLineItem f10408a;
    public FormCommonSwitchItem f10409a;
    FormSwitchItem f10410a;
    private QQProgressDialog f10411a;
    protected QQProgressNotifier f10412a;
    private QQToastNotifier f10413a;
    View f85220b;
    private CompoundButton f10414b;
    private FormCommonSingleLineItem f10415b;
    public FormCommonSwitchItem f10416b;
    View f85221c;
    private CompoundButton f10417c;
    private FormCommonSingleLineItem f10418c;
    public FormCommonSwitchItem f10419c;
    View d;
    public FormCommonSwitchItem f10420d;
    public FormCommonSwitchItem e;
    public FormCommonSwitchItem f;
    public FormCommonSwitchItem g;
    public FormCommonSwitchItem h;
    public CompoundButton f10400a = null;
    private int f10397a = -1;
    FriendListObserver f10403a = new ksz(this);
    LBSObserver f10404a = new kta(this);
    private CardObserver f10402a = new ktb(this);
    public CompoundButton.OnCheckedChangeListener f10399a = new ktc(this);
    private IStatusListener f10406a = new ktd(this);

    @Override
    public boolean doOnCreate(Bundle bundle) {
        super.doOnCreate(bundle);
        this.f10397a = getIntent().getIntExtra(BindMsgConstant.W, -1);
        super.setContentView(R.layout.f57610name_res_0x7f0304f1);
        setTitle(R.string.f65443name_res_0x7f0a1b87);
        this.f10412a = new QQProgressNotifier(this);
        this.f10407a = (StatusManager) this.app.getManager(14);
        if (this.f10407a != null) {
            this.f10407a.a(this.f10406a);
        }
        this.f10405a = (PhoneContactManagerImp) this.app.getManager(10);
        this.f10405a.a(this);
        c();
        addObserver(this.f10404a);
        addObserver(this.f10403a);
        addObserver(this.f10402a);
        this.app.r();
        this.app.s();
        this.app.m4703c(true);
        this.app.m4708d(true);
        return true;
    }

    @Override
    public void doOnDestroy() {
        super.doOnDestroy();
        b();
        if (this.f10402a != null) {
            removeObserver(this.f10402a);
        }
        if (this.f10407a != null) {
            this.f10407a.b(this.f10406a);
        }
        removeObserver(this.f10404a);
        removeObserver(this.f10403a);
        if (this.f10413a != null) {
            this.f10413a.a();
            this.f10413a = null;
        }
        if (this.f10412a != null) {
            this.f10412a.a();
            this.f10412a = null;
        }
        if (this.f10405a != null) {
            this.f10405a.b(this);
        }
    }

    private void c() {
        this.d = findViewById(R.id.f53172name_res_0x7f0917d1);
        this.f10398a = findViewById(R.id.f53171name_res_0x7f0917d0);
        this.f = (FormCommonSwitchItem) findViewById(R.id.f53177name_res_0x7f0917d6);
        ContactSyncManager contactSyncManager = (ContactSyncManager) this.app.getManager(40);
        if (contactSyncManager.m5849d()) {
            this.f.setChecked(contactSyncManager.m5848c());
            this.f.setOnCheckedChangeListener(this.f10399a);
        } else {
            this.f.setVisibility(8);
        }
        this.f10414b = (CompoundButton) findViewById(R.id.f53179name_res_0x7f0917d8);
        this.f10417c = (CompoundButton) findViewById(R.id.f53181name_res_0x7f0917da);
        this.f10416b = (FormCommonSwitchItem) findViewById(R.id.f53182name_res_0x7f0917db);
        this.f10416b.setChecked(this.app.m4703c(false));
        this.f10409a = (FormCommonSwitchItem) findViewById(R.id.f53184name_res_0x7f0917dd);
        this.f10420d = (FormCommonSwitchItem) findViewById(R.id.f53173name_res_0x7f0917d2);
        this.f10420d.setChecked(this.app.m4708d(false));
        this.e = (FormCommonSwitchItem) findViewById(R.id.f53183name_res_0x7f0917dc);
        this.f10419c = (FormCommonSwitchItem) findViewById(R.id.f53185name_res_0x7f0917de);
        this.f10401a = (TextView) findViewById(R.id.f53186name_res_0x7f0917df);
        FriendsManager friendsManager = (FriendsManager) this.app.getManager(50);
        CardHandler cardHandler = (CardHandler) this.app.getBusinessHandler(2);
        cardHandler.m();
        cardHandler.n();
        this.h = (FormCommonSwitchItem) findViewById(R.id.f53188name_res_0x7f0917e1);
        new ksu(this, this, "http://laidian.qq.com");
        this.g = (FormCommonSwitchItem) findViewById(R.id.f53176qq_setting_qianming_shuoshuo);
        this.g.setChecked(this.f10407a != null && this.f10407a.m7616b());
        this.d.setOnClickListener(this);
        this.f10398a.setOnClickListener(this);
        a(this.app.m4725n());
        this.f10417c.setChecked(this.app.m4728q());
        ThreadManager.a(new ksv(this), 5, null, true);
        this.f10414b.setOnCheckedChangeListener(this.f10399a);
        this.f10417c.setOnCheckedChangeListener(this.f10399a);
        this.f10409a.setOnCheckedChangeListener(this.f10399a);
        this.f10416b.setOnCheckedChangeListener(this.f10399a);
        this.f10420d.setOnCheckedChangeListener(this.f10399a);
        this.g.setOnCheckedChangeListener(this.f10399a);
        this.h.setOnCheckedChangeListener(this.f10399a);
        this.f10419c.setOnCheckedChangeListener(this.f10399a);
        this.e.setOnCheckedChangeListener(this.f10399a);
        this.f10415b = (FormCommonSingleLineItem) findViewById(R.id.f53174name_res_0x7f0917d3);
        this.f10415b.setOnClickListener(this);
        List m4349b = friendsManager.m4349b();
        this.f10415b.setRightText((m4349b == null || m4349b.size() == 0) ? "暂无" : m4349b.size() + "人");
        this.f10408a = (FormCommonSingleLineItem) findViewById(R.id.f53175name_res_0x7f0917d4);
        this.f10408a.setOnClickListener(this);
        ThreadManager.m4814b().post(new ksx(this));
        this.f10418c = (FormCommonSingleLineItem) findViewById(R.id.f53170name_res_0x7f0917cf);
        this.f10418c.setOnClickListener(this);
        d();
        if (AppSetting.f7081k) {
            this.d.setContentDescription("动态权限设置");
            this.f10398a.setContentDescription("加好友设置");
            this.f.setContentDescription("可通过系统通讯录发起QQ聊天");
            this.f10416b.setContentDescription("向好友展示网络状态");
            this.f10420d.setContentDescription("推荐可能认识的人");
            this.f10409a.setContentDescription("允许附近的人赞我");
            this.g.setContentDescription("个性签名同步到说说");
            this.h.setContentDescription("接收约会消息");
            this.f10419c.setContentDescription("连续登录天数对他人可见");
            this.e.setContentDescription("显示好友互动标识");
        }
    }

    public void a(boolean z) {
    }

    public void b(boolean z) {
        if (z) {
            ReportController.b(this.app, "dc01331", "", "", "0X8004951", "0X8004951", 0, 0, "", "", "", "");
        } else {
            ReportController.b(this.app, "dc01331", "", "", "0X8004952", "0X8004952", 0, 0, "", "", "", "");
        }
    }

    @Override
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.f53170name_res_0x7f0917cf:
                int mo4545d = this.f10405a.mo4545d();
                if (QLog.isColorLevel()) {
                    QLog.d(PhoneContactManager.f90266b, 2, "bindState = " + mo4545d);
                }
                ReportController.b(this.app, "dc01331", "", "", "0X800689F", "0X800689F", 0, 0, "", "", "", "");
                Intent intent = null;
                switch (mo4545d) {
                    case 0:
                        break;
                    case 1:
                    case 2:
                        ContactUtils.m9108a(4);
                        Intent intent2 = new Intent(this, BindNumberActivity.class);
                        intent2.putExtra(BindNumberActivity.f14268e, true);
                        ReportController.b(this.app, "dc01331", "", "", "0X80053E1", "0X80053E1", 0, 0, "", "", "", "");
                        ReportController.b(this.app, "dc01331", "", "", "0X80068A0", "0X80068A0", 0, 0, "", "", "", "");
                        intent = intent2;
                        break;
                    case 3:
                        RespondQueryQQBindingStat mo4523a = this.f10405a.mo4523a();
                        if (mo4523a != null && mo4523a.lastUsedFlag == 3) {
                            intent = new Intent(this.app.getApp().getApplicationContext(), PhoneMatchActivity.class);
                            break;
                        }
                        break;
                    case 4:
                        if (this.f10405a.mo4523a().isStopFindMatch) {
                            intent = new Intent(this, PhoneLaunchActivity.class);
                            intent.putExtra(PhoneLaunchActivity.f14383a, true);
                            intent.putExtra(PhoneLaunchActivity.f14384b, true);
                            intent.putExtra(PhoneLaunchActivity.d, true);
                            intent.putExtra(AppConstants.leftViewText.f87222a, "返回");
                            break;
                        } else {
                            intent = new Intent(this, SettingActivity2.class);
                            intent.putExtra(BindMsgConstant.W, 7);
                            break;
                        }
                    default:
                        intent = new Intent(this, SettingActivity2.class);
                        intent.putExtra(BindMsgConstant.W, 7);
                        break;
                }
                if (intent != null) {
                    intent.addFlags(67108864);
                    startActivity(intent);
                    return;
                }
                return;
            case R.id.f53171name_res_0x7f0917d0:
                a();
                ReportController.b(this.app, "dc01331", "", "", "Setting_tab", "Vfc_method_clk", 0, 0, "", "", "", "");
                return;
            case R.id.f53172name_res_0x7f0917d1:
                QZoneHelper.UserInfo a2 = QZoneHelper.UserInfo.a();
                a2.f70173a = this.app.getCurrentAccountUin();
                a2.f98380b = this.app.getCurrentNickname();
                QZoneHelper.b(this, a2, -1);
                return;
            case R.id.f53173name_res_0x7f0917d2:
            default:
                return;
            case R.id.f53174name_res_0x7f0917d3:
                startActivity(new Intent(this, SpecailCareListActivity.class));
                return;
            case R.id.f53175name_res_0x7f0917d4:
                ReportController.b(this.app, "dc01331", "", "", "0X8004C47", "0X8004C47", 3, 0, "", "", "", "");
                Intent intent3 = new Intent(this, UncommonlyUsedContactsActivity.class);
                intent3.putExtra("isBack2Root", true);
                intent3.addFlags(67108864);
                startActivity(intent3);
                return;
        }
    }

    void a() {
        Intent intent = new Intent(this, QQBrowserActivity.class);
        intent.putExtra("title", getString(R.string.f65455name_res_0x7f0a1b93));
        startActivity(intent.putExtra("url", "http://ti.qq.com/friendship_auth/index.html?_wv=3&_bid=173#p1"));
    }

    public void a(int i, int i2) {
        if (this.f10413a == null) {
            this.f10413a = new QQToastNotifier(this);
        }
        this.f10413a.a(i, getTitleBarHeight(), 0, i2);
    }

    public void a(String str) {
        if (this.f10411a == null) {
            this.f10411a = new QQProgressDialog(this, getTitleBarHeight());
        }
        this.f10411a.setCancelable(true);
        this.f10411a.a(str);
        this.f10411a.show();
    }

    void b() {
        try {
            if (this.f10411a != null) {
                this.f10411a.dismiss();
                this.f10411a.cancel();
                this.f10411a = null;
            }
        } catch (Throwable th) {
            th.printStackTrace();
        }
    }

    public void a(CompoundButton compoundButton, boolean z) {
        compoundButton.setOnCheckedChangeListener(null);
        compoundButton.setChecked(z);
        compoundButton.setOnCheckedChangeListener(this.f10399a);
    }

    public void a(int i) {
        QQToast.a(getActivity(), i, 0).b(getTitleBarHeight());
    }

    private void d() {
        int mo4545d = this.f10405a.mo4545d();
        if (QLog.isColorLevel()) {
            QLog.d(PhoneContactManager.f90266b, 2, "bindState = " + mo4545d);
        }
        String str = "";
        if (mo4545d == 1 || mo4545d == 2) {
            str = "未启用";
        } else if ((mo4545d == 4 && !this.f10405a.m4544c()) || mo4545d == 3) {
            str = this.f10405a.mo4523a().isStopFindMatch ? "未启用" : "未匹配";
        } else if (mo4545d == 6 || (mo4545d == 4 && this.f10405a.m4544c())) {
            str = this.f10405a.c() == 1 ? "未匹配" : "已匹配";
        }
        this.f10418c.setRightText(str);
    }

    @Override
    public void b(int i) {
        d();
    }

    @Override
    public void c(int i) {
    }

    @Override
    public void d(int i) {
    }

    @Override
    public void a(boolean z, int i) {
    }

    @Override
    public void a(long j) {
    }
}