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

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


package com.tencent.mobileqq.troop.activity;

import android.app.Activity;
import android.app.Dialog;
import android.content.Intent;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.View;
import com.tencent.mobileqq.troop.data.TroopCreateUtils;
import com.tencent.mobileqq.utils.JumpAction;
import com.tencent.mobileqq.utils.NetworkUtil;
import com.tencent.mobileqq.widget.QQToast;
import com.tencent.tim.R;
import com.tencent.widget.ActionSheet;
import com.tencent.widget.ActionSheetHelper;
public class TroopLocationModifyActivity extends TroopCreateMapViewSupportActivity {
    public static final int f93776c = 41;
    public static final String f31873c = "http://admin.qun.qq.com/mcreatev3/location.html?_bid=206&from=edit&_wv=2097152";
    long f93777a = 0;
    Boolean f31874a = true;
    public Dialog f93778b;

    public static void a(Activity activity, String str, String str2, int i) {
        Intent intent = new Intent(activity, TroopLocationModifyActivity.class);
        intent.putExtra("url", f31873c);
        intent.putExtra("troopUin", str);
        intent.putExtra(TroopCreateUtils.f93901b, str2);
        activity.startActivityForResult(intent, i);
    }

    public static void b(Activity activity, String str, String str2, int i) {
        Intent intent = new Intent(activity, TroopLocationModifyActivity.class);
        intent.putExtra("url", f31873c);
        intent.putExtra("saveDirect", false);
        intent.putExtra("troopUin", str);
        intent.putExtra(TroopCreateUtils.f93901b, str2);
        activity.startActivityForResult(intent, i);
    }

    @Override
    public void doOnActivityResult(int i, int i2, Intent intent) {
        String string;
        switch (i) {
            case 41:
                if (intent == null || i2 != -1) {
                    super.doOnActivityResult(i, i2, intent);
                    return;
                }
                int intExtra = intent.getIntExtra("errCode", -1);
                boolean booleanExtra = intent.getBooleanExtra("isClear", false);
                String stringExtra = intent.getStringExtra("location");
                int intExtra2 = intent.getIntExtra(JumpAction.cy, 0);
                int intExtra3 = intent.getIntExtra(JumpAction.cx, 0);
                if (intExtra == 0) {
                    if (booleanExtra) {
                        QQToast.a(this, (int) R.string.f64638name_res_0x7f0a185d, 0).b(getTitleBarHeight());
                    } else {
                        QQToast.a(this, (int) R.string.f64636name_res_0x7f0a185b, 0).b(getTitleBarHeight());
                    }
                    Intent intent2 = new Intent();
                    intent2.putExtra("location", stringExtra);
                    intent2.putExtra(JumpAction.cy, intExtra2);
                    intent2.putExtra(JumpAction.cx, intExtra3);
                    setResult(-1, intent2);
                    finish();
                    break;
                } else {
                    if (intExtra == 1002) {
                        string = getString(R.string.f64640name_res_0x7f0a185f);
                    } else if (booleanExtra) {
                        string = getString(R.string.f64639name_res_0x7f0a185e);
                    } else {
                        string = getString(R.string.f64637name_res_0x7f0a185c);
                    }
                    QQToast.a(this, string, 0).b(getTitleBarHeight());
                    break;
                }
        }
        super.doOnActivityResult(i, i2, intent);
    }

    @Override
    public boolean doOnCreate(Bundle bundle) {
        super.doOnCreate(bundle);
        Bundle extras = getIntent().getExtras();
        String string = extras.getString("troopUin");
        this.f31874a = Boolean.valueOf(extras.getBoolean("saveDirect", true));
        this.f93777a = Long.parseLong(string);
        return true;
    }

    @Override
    public void doOnDestroy() {
        super.doOnDestroy();
    }

    public void f(String str) {
        if (this.f93777a != 0) {
            b(getString(R.string.f64635name_res_0x7f0a185a));
            Intent intent = new Intent(this, TroopCreateLogicActivity.class);
            intent.putExtra("type", 5);
            intent.putExtra(TroopCreateLogicActivity.f31861e, str);
            intent.putExtra("troop_uin", this.f93777a);
            startActivityForResult(intent, 41);
        }
    }

    private void g(String str) {
        String[] split = str.split("\\|");
        String str2 = "";
        if (split.length >= 4) {
            str2 = split[3];
        }
        Intent intent = new Intent();
        intent.putExtra("location", str2);
        intent.putExtra("locationOriginal", str);
        setResult(-1, intent);
        finish();
    }

    public void d(String str) {
        if (!this.f31874a.booleanValue()) {
            e(str);
        } else if (!NetworkUtil.e(this)) {
            QQToast.a(this, (int) R.string.f63380name_res_0x7f0a1373, 0).b(getTitleBarHeight());
        } else if (TextUtils.isEmpty(str)) {
            h();
        } else {
            f(str);
        }
    }

    public void e(String str) {
        if (!NetworkUtil.e(this)) {
            QQToast.a(this, (int) R.string.f63380name_res_0x7f0a1373, 0).b(getTitleBarHeight());
        } else if (!TextUtils.isEmpty(str)) {
            g(str);
        }
    }

    public void h() {
        i();
        ActionSheet actionSheet = (ActionSheet) ActionSheetHelper.a(this, (View) null);
        actionSheet.m10333a(R.string.f64633name_res_0x7f0a1858);
        actionSheet.a(R.string.f64634name_res_0x7f0a1859, 3);
        actionSheet.d(R.string.f63203cancel);
        actionSheet.setOnDismissListener(new uwk(this));
        actionSheet.a(new uwl(this));
        this.f93778b = actionSheet;
        this.f93778b.show();
    }

    public void i() {
        if (this.f93778b != null) {
            if (this.f93778b.isShowing()) {
                this.f93778b.dismiss();
            }
            this.f93778b = null;
        }
    }
}