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

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


package com.tencent.mobileqq.teamwork;

import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.Color;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.os.Message;
import android.os.ResultReceiver;
import android.support.v4.util.MQLruCache;
import android.text.ClipboardManager;
import android.text.TextUtils;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.tencent.biz.qrcode.util.QRUtils;
import com.tencent.common.app.BaseApplicationImpl;
import com.tencent.mobileqq.activity.DirectForwardActivity;
import com.tencent.mobileqq.activity.QQBrowserActivity;
import com.tencent.mobileqq.activity.TeamWorkDocEditBrowserActivity;
import com.tencent.mobileqq.app.AppConstants;
import com.tencent.mobileqq.app.BaseActivity;
import com.tencent.mobileqq.app.QQAppInterface;
import com.tencent.mobileqq.forward.ForwardConstants;
import com.tencent.mobileqq.mail.MailPluginConstants;
import com.tencent.mobileqq.mail.MailPluginManager;
import com.tencent.mobileqq.service.report.ReportConstants;
import com.tencent.mobileqq.statistics.ClickReportInfo;
import com.tencent.mobileqq.statistics.ReportUtils;
import com.tencent.mobileqq.teamwork.TeamWorkAuthorizeUinListAdapter;
import com.tencent.mobileqq.teamworkforgroup.GroupTeamWorkObserver;
import com.tencent.mobileqq.troop.utils.TroopBarUtils;
import com.tencent.mobileqq.util.BitmapManager;
import com.tencent.mobileqq.utils.CacheKeyHelper;
import com.tencent.mobileqq.utils.ContactUtils;
import com.tencent.mobileqq.utils.NetworkUtil;
import com.tencent.mobileqq.utils.ShareMsgHelper;
import com.tencent.mobileqq.widget.QQProgressDialog;
import com.tencent.mobileqq.widget.QQToast;
import com.tencent.qphone.base.util.QLog;
import com.tencent.tim.R;
import com.tencent.tim.sso.cmd.TimDocSSOMsg;
import com.tencent.tim.wxapi.WXShareHelper;
import com.tencent.util.MqqWeakReferenceHandler;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import mqq.app.MobileQQ;
import mqq.os.MqqHandler;
public class TeamWorkTransparentShareActivity extends BaseActivity implements Handler.Callback, uej {
    public static final String f93180a = "TeamWorkTransparentShareActivity";
    private static final long f93181b = 1500;
    public static final String f30127b = "team_is_my_document";
    public static final String f93182c = "team_policy";
    public static final int d = 1;
    public static final String f30128d = "from_activity";
    public static final int e = 2;
    public static final String f30129e = "select_type";
    public static final String f = "team_work_pad_type";
    public static final String g = "team_work_auth_info";
    public static final String o = "com.tencent.tim.com.tencent.qq.authClicked";
    public static final String p = "key_result_receiver";
    public int f30130a;
    public long f30131a;
    private ResultReceiver f30132a;
    private View f30133a;
    private ImageView f30134a;
    private RelativeLayout f30135a;
    private TextView f30136a;
    private SharePolicyInfo f30137a;
    private ShareUtils f30138a;
    private TeamWorkHandler f30139a;
    private QQProgressDialog f30142a;
    public WXShareHelper.WXShareListener f30143a;
    private ArrayList f30144a;
    private HashMap f30145a;
    List f30146a;
    public MqqHandler f30148a;
    private boolean f30149a;
    public int f30150b;
    private TextView f30151b;
    public int f30153c;
    private long f30154c;
    private TextView f30155c;
    private int f30156f;
    public String h;
    public String i;
    public String j;
    public String k;
    protected String l;
    protected String m;
    protected String n;
    private String q;
    private String r;
    public Map f30147a = new HashMap();
    private int f30157g = -1;
    private final MqqHandler f30152b = new MqqWeakReferenceHandler(Looper.getMainLooper(), this, true);
    GroupTeamWorkObserver f30141a = new ugp(this);
    TeamWorkObserver f30140a = new ugq(this);

    @Override
    public boolean doOnCreate(Bundle bundle) {
        super.doOnCreate(bundle);
        setContentView(R.layout.f58262name_res_0x7f03077d);
        f();
        c();
        return true;
    }

    @Override
    public void doOnStart() {
        this.app.addObserver(this.f30140a);
        this.app.addObserver(this.f30141a);
        if (this.f30137a != null && this.f30137a.f29894a) {
            this.f30139a = (TeamWorkHandler) this.app.getBusinessHandler(100);
        } else if (this.f30138a != null) {
            this.f30138a.m8265b();
        }
    }

    private void c() {
        this.f30148a = new MqqHandler();
        this.app.setHandler(getClass(), this.f30152b);
        if (this.f30138a == null) {
            this.f30138a = new ShareUtils(this, this.app);
        }
        if (!TextUtils.isEmpty(this.h)) {
            if (TextUtils.isEmpty(this.l)) {
                this.l = getString(R.string.f66536name_res_0x7f0a1fcc);
                if (this.f30150b == 2) {
                    this.l = getString(R.string.f66537name_res_0x7f0a1fcd);
                }
            }
            if (TextUtils.isEmpty(this.m)) {
                this.m = TeamWorkConstants.t;
                String a2 = TeamWorkManager.a();
                if (!TextUtils.isEmpty(a2)) {
                    this.m = a2;
                }
                if (this.f30150b == 2) {
                    this.m = TeamWorkConstants.u;
                    String b2 = TeamWorkManager.b();
                    if (!TextUtils.isEmpty(b2)) {
                        this.m = b2;
                    }
                }
            }
            if (TextUtils.isEmpty(this.n)) {
                this.n = TeamWorkConstants.v;
                String c2 = TeamWorkManager.c();
                if (!TextUtils.isEmpty(c2)) {
                    this.n = c2;
                }
                if (this.f30150b == 2) {
                    this.n = TeamWorkConstants.w;
                    String d2 = TeamWorkManager.d();
                    if (!TextUtils.isEmpty(d2)) {
                        this.n = d2;
                    }
                }
            }
            this.f30138a.a(this.h, this.q, this.l, "", this.f30150b);
            if (this.f30149a) {
                this.f30138a.a(false);
            } else {
                this.f30138a.a(true);
            }
            this.f30138a.a(this);
            if (this.f30153c != 0 && !AppConstants.dF.equals(this.i)) {
                try {
                    this.f30138a.b(TeamWorkDocEditBrowserActivity.f11368a.equals(this.r));
                } catch (Exception e2) {
                    if (QLog.isColorLevel()) {
                        QLog.e(f93180a, 2, "exception =" + e2.toString());
                    }
                }
            }
            d();
            this.f30138a.m8262a();
            return;
        }
        finish();
    }

    private void d() {
        this.f30133a = getLayoutInflater().inflate(R.layout.f58264name_res_0x7f03077f, (ViewGroup) null);
        if (this.f30133a != null) {
            this.f30134a = (ImageView) this.f30133a.findViewById(R.id.f55972name_res_0x7f0922c1);
            this.f30136a = (TextView) this.f30133a.findViewById(R.id.f55973name_res_0x7f0922c2);
            this.f30151b = (TextView) this.f30133a.findViewById(R.id.f55974name_res_0x7f0922c3);
            this.f30135a = (RelativeLayout) this.f30133a.findViewById(R.id.f55971name_res_0x7f0922c0);
            this.f30155c = (TextView) this.f30133a.findViewById(R.id.f55975name_res_0x7f0922c4);
            if (this.f30137a != null && this.f30137a.f29894a) {
                c(this.f30137a);
                this.f30138a.a(this.f30133a, 0);
            }
        }
    }

    private void a(SharePolicyInfo sharePolicyInfo) {
        if (this.f30155c != null && ((ViewGroup) this.f30155c.getParent()) != null) {
            if (sharePolicyInfo != null && sharePolicyInfo.f29894a) {
                c(sharePolicyInfo);
                this.f30138a.a(this.f30133a, 0);
                return;
            }
            return;
        }
        d();
    }

    private void b(SharePolicyInfo sharePolicyInfo) {
        this.f30137a = sharePolicyInfo;
    }

    private void c(SharePolicyInfo sharePolicyInfo) {
        if (sharePolicyInfo != null && sharePolicyInfo.f29894a && this.h.equals(TeamWorkUtils.a(sharePolicyInfo.e, this.f30150b))) {
            this.f30155c.setOnClickListener(new ugn(this, sharePolicyInfo));
            switch (sharePolicyInfo.f93135c) {
                case 1:
                    if (sharePolicyInfo.f93135c == 1) {
                        this.f30155c.setText("更改权限");
                        this.f30136a.setText(sharePolicyInfo.f29893a);
                        this.f30136a.setTextColor(Color.parseColor("#000000"));
                        a(sharePolicyInfo.f, sharePolicyInfo.d);
                        return;
                    }
                    return;
                case 2:
                    this.f30155c.setText("更改有效期");
                    this.f30136a.setText(sharePolicyInfo.f29893a);
                    this.f30136a.setTextColor(Color.parseColor("#fe6c6c"));
                    if (TextUtils.isEmpty(sharePolicyInfo.f29895b)) {
                        this.f30151b.setVisibility(8);
                        return;
                    }
                    this.f30151b.setVisibility(0);
                    this.f30151b.setText(sharePolicyInfo.f29895b);
                    return;
                default:
                    return;
            }
        }
    }

    private void e() {
        PadInfo padInfo;
        ArrayList arrayList;
        TeamWorkManager teamWorkManager = (TeamWorkManager) this.app.getManager(182);
        if (teamWorkManager != null) {
            this.h = TeamWorkUtils.a(this.h, this.f30150b);
            padInfo = teamWorkManager.a(this.h, this.f30130a);
        } else {
            padInfo = null;
        }
        if (padInfo == null && QLog.isDevelopLevel()) {
            QLog.i(f93180a, 1, "padInfo is null, maybe is newpad");
        }
        if (this.f30138a.b() != null) {
            ArrayList arrayList2 = new ArrayList();
            if (padInfo != null) {
                this.f30156f = padInfo.policy;
                c(padInfo.policy);
                Iterator it = padInfo.getRightList().iterator();
                while (true) {
                    if (!it.hasNext()) {
                        arrayList = arrayList2;
                        break;
                    }
                    TimDocSSOMsg.UinRightInfo uinRightInfo = (TimDocSSOMsg.UinRightInfo) it.next();
                    TeamWorkAuthorizeUinListAdapter.ItemData itemData = new TeamWorkAuthorizeUinListAdapter.ItemData();
                    itemData.f29942a = String.valueOf(uinRightInfo.uint64_uin.get());
                    itemData.f29941a = uinRightInfo;
                    this.f30144a.add(0, itemData);
                    this.f30147a.put(itemData.f29942a, itemData);
                    String valueOf = String.valueOf(itemData.f29941a.uint64_uin.get());
                    String a2 = a(valueOf);
                    int i = itemData.f29941a.uint32_right.get();
                    if (i != 1) {
                        if (i == 2) {
                            if (getCurrentAccountUin().equals(valueOf)) {
                                a2 = "我";
                            }
                            if (a2 == null) {
                                arrayList = null;
                                break;
                            }
                            arrayList2.add(a2);
                        } else {
                            QLog.e(f93180a, 1, "team docs rights error:" + i);
                        }
                    }
                }
            } else {
                arrayList = new ArrayList();
            }
            a(arrayList, this.f30156f);
        }
    }

    private void f() {
        Intent intent = getIntent();
        this.q = intent.getStringExtra(TeamWorkConstants.f29944a);
        this.l = intent.getStringExtra(TeamWorkConstants.f29946b);
        this.m = intent.getStringExtra(TeamWorkConstants.f29948c);
        this.n = intent.getStringExtra(TeamWorkConstants.f29950d);
        this.h = intent.getStringExtra(TeamWorkAuthorizeSettingActivity.f29915c);
        this.f30130a = intent.getIntExtra(TeamWorkAuthorizeSettingActivity.f29916d, -1);
        this.f30150b = intent.getIntExtra(f, -1);
        this.f30156f = intent.getIntExtra(f93182c, -1);
        this.f30131a = intent.getLongExtra(TeamWorkDocEditBrowserActivity.g, 0L);
        this.f30153c = intent.getIntExtra(TeamWorkDocEditBrowserActivity.h, 0);
        this.i = intent.getStringExtra(TeamWorkDocEditBrowserActivity.i);
        this.j = intent.getStringExtra(TeamWorkDocEditBrowserActivity.f11371c);
        this.k = intent.getStringExtra("troop_name");
        this.f30144a = new ArrayList();
        this.f30149a = intent.getBooleanExtra(f30127b, false);
        this.r = intent.getStringExtra(f30128d);
        this.f30157g = intent.getIntExtra(f30129e, -1);
        this.f30137a = (SharePolicyInfo) getIntent().getParcelableExtra(g);
        if (this.f30156f == -1 && QLog.isColorLevel()) {
            QLog.i(f93180a, 2, "padInfo policy cannot be -1");
        }
        if (this.f30130a == -1 && QLog.isColorLevel()) {
            QLog.i(f93180a, 2, "padInfo mPadListType cannot be -1");
        }
        this.f30132a = (ResultReceiver) getIntent().getParcelableExtra("key_result_receiver");
    }

    @Override
    public void mo8336a(int i) {
        String str;
        StringBuilder sb;
        String m8337a = TeamWorkUtils.m8337a(this.h);
        if (i == 2) {
            ShareMsgHelper.a(this, 1001, 95, ForwardConstants.Y_, "", TextUtils.isEmpty(this.m) ? null : this.m, this.q, TextUtils.isEmpty(this.l) ? m8337a : this.l, getString(R.string.f60751name_res_0x7f0a092c, new Object[]{this.q}), m8337a, "web", null, null, null, "web", null, null, null, TeamWorkUtils.m, getString(R.string.f66534name_res_0x7f0a1fca), "", null, -1, TeamWorkUtils.n, -1L);
            a(1, this.h, this.f30150b);
            finish();
        } else if (i == 9 || i == 10) {
            int i2 = -1;
            if (!WXShareHelper.a().m10253a()) {
                i2 = R.string.f64448name_res_0x7f0a179f;
            } else if (!WXShareHelper.a().m10254b()) {
                i2 = R.string.f64449name_res_0x7f0a17a0;
            }
            if (i2 != -1) {
                QRUtils.a(0, i2);
            } else {
                String valueOf = String.valueOf(System.currentTimeMillis());
                if (this.f30143a == null) {
                    this.f30143a = new ugo(this, valueOf);
                }
                if (i == 9) {
                    WXShareHelper.a().a(this.f30143a);
                    String str2 = ShareUtils.f + m8337a;
                    if (TeamWorkUtils.f(this.n)) {
                        Bitmap a2 = TeamWorkUtils.a(this.n);
                        if (a2 != null) {
                            WXShareHelper.a().a(str2, ShareUtils.e, a2, this.q, this.l, m8337a, 0);
                        } else {
                            WXShareHelper.a().a(str2, ShareUtils.e, TeamWorkUtils.a(this.f30150b), this.q, this.l, m8337a, 0);
                        }
                    } else {
                        WXShareHelper.a().a(str2, ShareUtils.e, TeamWorkUtils.a(this.f30150b), this.q, this.l, m8337a, 0);
                    }
                } else if (i == 10) {
                    WXShareHelper.a().a(this.f30143a);
                    WXShareHelper.a().a(valueOf, this.q, TeamWorkUtils.a(this.f30150b), TextUtils.isEmpty(this.l) ? m8337a : this.l, m8337a, i == 9 ? 0 : 1);
                }
            }
            if (i == 9) {
                a(3, this.h, this.f30150b);
            } else {
                a(4, this.h, this.f30150b);
            }
            finish();
        } else if (i == 24) {
            String str3 = this.q;
            if (!TextUtils.isEmpty(this.m) && !TextUtils.isEmpty(this.h) && !TextUtils.isEmpty(str3)) {
                new StringBuilder().append(str3).append(" (分享自#腾讯文档#) ");
                try {
                    String str4 = ((("http://v.t.sina.com.cn/share/share.php?title=" + URLEncoder.encode(sb.toString(), "UTF-8")) + "&url=" + URLEncoder.encode(m8337a, "UTF-8")) + "&pic=" + URLEncoder.encode(str, "UTF-8")) + "&_wv=0";
                    Intent intent = new Intent(this, QQBrowserActivity.class);
                    intent.putExtra("url", str4);
                    startActivity(intent);
                } catch (Exception e2) {
                    QQToast.a(getApplicationContext(), 2, (int) R.string.f60779name_res_0x7f0a0948, 0).b(getResources().getDimensionPixelSize(R.dimen.f39450title_bar_height));
                    QLog.e(f93180a, 1, " ==== share to weibo exp: " + e2.toString());
                }
            } else {
                QQToast.a(getApplicationContext(), 2, (int) R.string.f60779name_res_0x7f0a0948, 0).b(getResources().getDimensionPixelSize(R.dimen.f39450title_bar_height));
            }
            a(5, this.h, this.f30150b);
            finish();
        } else if (i == 11) {
            String currentAccountUin = this.app.getCurrentAccountUin();
            String str5 = null;
            try {
                str5 = URLEncoder.encode(this.h, "UTF-8");
            } catch (UnsupportedEncodingException e3) {
                if (QLog.isColorLevel()) {
                    QLog.d(f93180a, 2, "encode shareUrl failed, because UTF-8 is unknown");
                }
            }
            String str6 = "http://guanjia.qq.com/online_server/m_report.html?shareUrl=" + str5 + "&qq=" + currentAccountUin + "&_wv=7";
            Intent intent2 = new Intent(this, QQBrowserActivity.class);
            intent2.putExtra("url", str6);
            intent2.putExtra("hide_more_button", true);
            startActivity(intent2);
            a(6, this.h, this.f30150b);
            finish();
        } else if (i == 1) {
            StringBuilder sb2 = new StringBuilder();
            sb2.append("我分享了腾讯文档 “").append(this.q).append("”,点击查看:\n").append(m8337a).append(TroopBarUtils.y);
            ((ClipboardManager) getSystemService("clipboard")).setText(sb2);
            QRUtils.a(3, (int) R.string.f60645name_res_0x7f0a08c1);
            a(2, this.h, this.f30150b);
            finish();
        } else if (i == 23) {
            Intent intent3 = new Intent(this, DirectForwardActivity.class);
            intent3.putExtra("isFromShare", true);
            intent3.putExtra("isFromTeamWork", true);
            intent3.putExtra("toUin", AppConstants.aD);
            intent3.putExtra("uinType", 6000);
            intent3.putExtra(AppConstants.Key.G, -1);
            intent3.putExtra(AppConstants.Key.F, m8337a);
            intent3.putExtra(DirectForwardActivity.e, MobileQQ.getMobileQQ().getProcessName());
            startActivity(intent3);
            a(10, this.h, this.f30150b);
            finish();
        } else if (i == 26) {
            a(12, this.h, this.f30150b);
            if (!NetworkUtil.e(getApplicationContext())) {
                QQToast.a(getApplicationContext(), (int) R.string.f63198name_res_0x7f0a12bb, 0).b(getTitleBarHeight());
                return;
            }
            b(R.string.f67060name_res_0x7f0a21d8);
            this.f30154c = System.currentTimeMillis();
            TeamWorkHandler teamWorkHandler = (TeamWorkHandler) this.app.getBusinessHandler(100);
            if (this.f30153c != 0 && !AppConstants.dF.equals(this.i)) {
                try {
                    teamWorkHandler.a(this.f30153c, this.i, "副本-" + this.q);
                } catch (Exception e4) {
                    if (QLog.isColorLevel()) {
                        QLog.e(f93180a, 2, "exception =" + e4.toString());
                    }
                }
            }
        } else if (i == 27) {
            StringBuilder sb3 = new StringBuilder();
            sb3.append("<html><body><p>我分享了来自TIM的腾讯文档 “").append(this.q).append("”,点击查看:\n").append(m8337a).append("</p></body></html>");
            Intent intent4 = new Intent();
            intent4.putExtra("cmd", MailPluginConstants.m);
            intent4.putExtra(MailPluginConstants.o, sb3.toString());
            ((MailPluginManager) this.app.getManager(QQAppInterface.cb)).a(this, intent4, 2);
            ReportUtils.a(this.app, ReportConstants.n, ReportConstants.H, ReportConstants.J, "0X8009276");
            finish();
        }
    }

    protected void b(int i) {
        if (this.f30142a == null) {
            this.f30142a = new QQProgressDialog(this, getTitleBarHeight());
        }
        if (i == 0) {
            this.f30142a.a("");
        } else {
            this.f30142a.b(i);
        }
        this.f30142a.setCancelable(true);
        this.f30142a.show();
    }

    public void b() {
        if (this.f30142a != null && this.f30142a.isShowing()) {
            this.f30142a.dismiss();
        }
    }

    public Bitmap a(int i) {
        int i2;
        Object obj;
        Bitmap bitmap;
        if (i == 1) {
            i2 = R.drawable.f46362name_res_0x7f0214aa;
            obj = CacheKeyHelper.Q;
        } else {
            i2 = R.drawable.f46363name_res_0x7f0214ab;
            obj = CacheKeyHelper.R;
        }
        if (BaseApplicationImpl.f6969a == null) {
            bitmap = null;
        } else {
            bitmap = (Bitmap) BaseApplicationImpl.f6969a.get(obj);
        }
        if (bitmap == null && (bitmap = BitmapManager.b(getResources(), i2)) != null && BaseApplicationImpl.f6969a != null) {
            BaseApplicationImpl.f6969a.put((MQLruCache) obj, (Object) bitmap);
        }
        return bitmap;
    }

    @Override
    public void a() {
        finish();
    }

    public void c(int i) {
        if (i > 3 || i < 0) {
            QLog.e(f93180a, 1, "pubFlag error:" + i);
            return;
        }
        String str = this.f30150b == 2 ? "表格" : "文档";
        switch (i) {
            case 0:
                this.f30136a.setText(str + getString(R.string.f66654name_res_0x7f0a2042) + "可查看和编辑");
                this.f30134a.setImageResource(R.drawable.f42311name_res_0x7f0204d2);
                return;
            case 1:
                this.f30136a.setText(str + "对" + getString(R.string.f66652name_res_0x7f0a2040) + "公开");
                this.f30134a.setImageResource(R.drawable.f42311name_res_0x7f0204d2);
                return;
            case 2:
                this.f30136a.setText(getString(R.string.f66651name_res_0x7f0a203f) + "可查看此" + str);
                this.f30134a.setImageResource(R.drawable.f42309name_res_0x7f0204d0);
                return;
            case 3:
                this.f30136a.setText(getString(R.string.f66651name_res_0x7f0a203f) + "可查看和编辑" + str);
                this.f30134a.setImageResource(R.drawable.f42310name_res_0x7f0204d1);
                return;
            default:
                QLog.w(f93180a, 1, "no process PUBFLAG:" + i);
                return;
        }
    }

    public void a(List list, int i) {
        if (i > 3 || i < 0) {
            QLog.e(f93180a, 1, "pubFlag error:" + i);
            return;
        }
        this.f30151b.setTextColor(Color.parseColor("#777777"));
        String str = this.f30150b == 2 ? "表格" : "文档";
        switch (i) {
            case 0:
                this.f30151b.setVisibility(8);
                return;
            case 1:
                if (list != null) {
                    a(list);
                    if (list.size() == 0) {
                        this.f30151b.setText(getString(R.string.f66672name_res_0x7f0a2054) + str);
                    }
                    this.f30151b.setVisibility(0);
                    return;
                }
                this.f30151b.setText(getString(R.string.f66673name_res_0x7f0a2055) + str);
                this.f30151b.setVisibility(0);
                return;
            case 2:
                if (list != null) {
                    a(list);
                    if (list.size() == 0) {
                        this.f30151b.setTextColor(Color.parseColor("#fcba46"));
                        this.f30151b.setText(getString(R.string.f66672name_res_0x7f0a2054) + str);
                    }
                    this.f30151b.setVisibility(0);
                    return;
                }
                this.f30151b.setText(getString(R.string.f66673name_res_0x7f0a2055) + str);
                this.f30151b.setVisibility(0);
                return;
            case 3:
                this.f30151b.setVisibility(8);
                return;
            default:
                QLog.w(f93180a, 1, "no process PUBFLAG:" + i);
                return;
        }
    }

    public void a(List list) {
        String str = (list.size() + 1) + "人可编辑";
        StringBuilder sb = new StringBuilder();
        if (list.size() == 0) {
            this.f30151b.setText(getString(R.string.f66672name_res_0x7f0a2054));
        } else {
            this.f30135a.post(new ugs(this, list, sb, str));
        }
    }

    public void a(String str, int i) {
        this.f30135a.post(new ugt(this, str, "其中" + i + "人可编辑:", i));
    }

    public String a(String str) {
        TeamWorkAuthorizeUinListAdapter.ItemData itemData = (TeamWorkAuthorizeUinListAdapter.ItemData) this.f30147a.get(str);
        if (getAppInterface() instanceof QQAppInterface) {
            String a2 = ContactUtils.a((QQAppInterface) getAppInterface(), itemData.f29942a, itemData.f93148b, itemData.f93147a);
            if (!TextUtils.isEmpty(a2)) {
                ((TeamWorkAuthorizeUinListAdapter.ItemData) this.f30147a.get(str)).f93149c = a2;
            }
            return ((TeamWorkAuthorizeUinListAdapter.ItemData) this.f30147a.get(str)).f93149c;
        }
        return null;
    }

    @Override
    public void doOnStop() {
        super.doOnStop();
        this.app.removeObserver(this.f30140a);
        this.app.removeObserver(this.f30141a);
    }

    @Override
    public void doOnDestroy() {
        super.doOnDestroy();
        this.f30138a.c();
        if (this.f30143a != null) {
            WXShareHelper.a().b(this.f30143a);
            this.f30143a = null;
        }
        if (this.f30148a != null) {
            this.f30148a.removeCallbacksAndMessages(null);
        }
    }

    @Override
    public void finish() {
        super.finish();
        overridePendingTransition(0, 0);
    }

    public void a(int i, String str, int i2) {
        boolean z;
        String str2 = "";
        boolean z2 = false;
        if (this.r != null && this.r.equals(TeamWorkDocEditBrowserActivity.f11368a)) {
            if (i == 0) {
                str2 = "0X80074D2";
                z2 = true;
            } else if (i == 1) {
                str2 = "0X80074D3";
                z2 = true;
            } else if (i == 2) {
                str2 = "0X80074D4";
                z2 = true;
            } else if (i == 3) {
                str2 = "0X80075FF";
                z2 = true;
            } else if (i == 4) {
                str2 = "0X80075FE";
                z2 = true;
            } else if (i == 5) {
                str2 = "0X8007762";
                z2 = true;
            } else if (i == 6) {
                str2 = "0X8007764";
                z2 = true;
            } else if (i == 10) {
                str2 = "0X8007763";
                z2 = true;
            }
        } else if (this.r != null && this.r.equals(TeamWorkListActivity.m8289a())) {
            if (this.f30157g == -1 && QLog.isColorLevel()) {
                QLog.e(f93180a, 2, "TeamWorkListActivity must have a selected type");
            }
            if (this.f30157g == 0) {
                if (i == 0) {
                    str2 = "0X80074C2";
                    z2 = true;
                } else if (i == 1) {
                    str2 = "0X80074C3";
                    z2 = true;
                } else if (i == 2) {
                    str2 = "0X80074C4";
                    z2 = true;
                } else if (i == 3) {
                    str2 = "0X80075F9";
                    z2 = true;
                } else if (i == 4) {
                    str2 = "0X80075F8";
                    z2 = true;
                } else if (i == 5) {
                    str2 = "0X800775C";
                    z2 = true;
                } else if (i == 6) {
                    str2 = "0X800775E";
                    z2 = true;
                } else if (i == 10) {
                    str2 = "0X800775D";
                    z2 = true;
                }
            } else if (this.f30157g == 1) {
                if (i == 0) {
                    str2 = "0X80074C8";
                    z2 = true;
                } else if (i == 1) {
                    str2 = "0X80074C9";
                    z2 = true;
                } else if (i == 2) {
                    str2 = "0X80074CA";
                    z2 = true;
                } else if (i == 3) {
                    str2 = "0X80075FC";
                    z2 = true;
                } else if (i == 4) {
                    str2 = "0X80075FB";
                    z2 = true;
                } else if (i == 5) {
                    str2 = "0X800775F";
                    z2 = true;
                } else if (i == 6) {
                    str2 = "0X8007761";
                    z2 = true;
                } else if (i == 10) {
                    str2 = "0X8007760";
                    z2 = true;
                }
            } else if (this.f30157g == 2) {
                if (i == 0) {
                    str2 = "0X8007CD3";
                    z2 = true;
                } else if (i == 1) {
                    str2 = "0X8007CD4";
                    z2 = true;
                } else if (i == 2) {
                    str2 = "0X8007CD9";
                    z2 = true;
                } else if (i == 3) {
                    str2 = "0X8007CD5";
                    z2 = true;
                } else if (i == 4) {
                    str2 = "0X8007CD6";
                    z2 = true;
                } else if (i == 5) {
                    str2 = "0X8007CD7";
                    z2 = true;
                } else if (i == 6) {
                    str2 = "0X8007CDA";
                    z2 = true;
                } else if (i == 10) {
                    str2 = "0X8007CD8";
                    z2 = true;
                }
            }
        }
        if (i == 11) {
            str2 = "0X8008325";
            z = true;
        } else if (i == 12) {
            str2 = "0X80090B1";
            z = true;
        } else {
            z = z2;
        }
        if (!TextUtils.isEmpty(str2)) {
            ClickReportInfo clickReportInfo = new ClickReportInfo(ReportConstants.n, ReportConstants.H, ReportConstants.L, str2, str2);
            if (z) {
                clickReportInfo.d = i2;
                List a2 = TeamWorkDocEditBrowserActivity.a(str);
                if (a2 != null && a2.size() == 2) {
                    clickReportInfo.i = (String) a2.get(0);
                    clickReportInfo.j = (String) a2.get(1);
                }
            }
            ReportUtils.a(this.app, clickReportInfo);
        }
    }

    @Override
    public boolean handleMessage(Message message) {
        this.f30137a = (SharePolicyInfo) message.getData().getParcelable(TeamWorkConstants.g);
        if (this.f30137a != null) {
            a(this.f30137a);
            return false;
        }
        return false;
    }
}