Shandong video conference v3.2.10版本的 MD5 值为:e9e908f971313b4c4bca5737f96781ef
以下内容为反编译后的 MyEnterpriseActivity.java 源代码,内容仅作参考
package com.ainemo.android.enterprise;
import android.content.Intent;
import android.log.L;
import android.os.Build;
import android.os.Bundle;
import android.os.Message;
import android.os.Messenger;
import android.os.RemoteException;
import android.text.TextUtils;
import android.utils.SafeHandler;
import android.view.View;
import android.widget.Button;
import android.widget.RelativeLayout;
import android.widget.TextView;
import androidx.annotation.h0;
import androidx.annotation.l0;
import androidx.fragment.app.m;
import androidx.lifecycle.x;
import cn.gov.sdongmeeting.video.R;
import com.ainemo.android.activity.BaseMobileActivity;
import com.ainemo.android.activity.business.WebPageActivity;
import com.ainemo.android.bean.EnterpriseInfo;
import com.ainemo.android.business.apsharescreen.wifi.ApShareConst;
import com.ainemo.android.h.q;
import com.ainemo.android.net.bean.RestResponse;
import com.ainemo.android.preferences.o;
import com.ainemo.android.rest.model.contact.EnterpriseError;
import com.ainemo.android.view.dialog.ExpandedBottomSheetDialog;
import com.google.gson.Gson;
import com.xylink.common.widget.b.j;
import com.xylink.common.widget.b.l;
import com.xylink.common.widget.b.p;
import e.l.c.c;
import java.util.Locale;
public class MyEnterpriseActivity extends BaseMobileActivity implements View.OnClickListener {
private static final String f6111k = "MyEnterpriseActivity";
private Messenger a;
private p f6112b;
private TextView f6113c;
private Gson f6114d;
private l f6115e;
private com.google.android.material.bottomsheet.a f6116f;
private q f6117g;
private j f6118h;
private String f6119i;
private String f6120j;
public class a implements androidx.lifecycle.q<Integer> {
a() {
}
@Override
public void c(@h0 Integer num) {
MyEnterpriseActivity.this.b(num.intValue());
}
}
public class b implements j.d {
b() {
}
@Override
public void onPrimaryButtonClicked(Button button) {
MyEnterpriseActivity.this.showWaitDialog();
if ("logout".equals(MyEnterpriseActivity.this.f6118h.r())) {
MyEnterpriseActivity.this.n();
} else if ("quit".equals(MyEnterpriseActivity.this.f6118h.r())) {
MyEnterpriseActivity.this.p();
}
}
@Override
public void onSecondButtonClicked(Button button) {
}
}
public class c extends l.f {
final String a;
final String f6121b;
final String f6122c;
c(String str, String str2, String str3) {
this.a = str;
this.f6121b = str2;
this.f6122c = str3;
}
@Override
public void onPrimaryButtonClicked(Button button, String str) {
if (!this.a.equals("alterShortName")) {
if (this.a.equals("alterEnterpriseName")) {
MyEnterpriseActivity.this.f6120j = str;
if (com.xylink.net.e.e.a(str)) {
com.xylink.common.widget.c.b.a(MyEnterpriseActivity.this, this.f6122c);
return;
} else if (!MyEnterpriseActivity.this.d(str)) {
if (MyEnterpriseActivity.this.f6120j.length() >= 4 && MyEnterpriseActivity.this.f6120j.length() <= 64) {
MyEnterpriseActivity.this.f(str);
return;
} else {
com.xylink.common.widget.c.b.a(MyEnterpriseActivity.this, (int) R.string.limit_char_tip, 0);
return;
}
} else {
com.xylink.common.widget.c.b.a(MyEnterpriseActivity.this, (int) R.string.str_not_all_number, 0);
return;
}
}
return;
}
MyEnterpriseActivity.this.f6119i = str;
if (com.xylink.net.e.e.a(str)) {
com.xylink.common.widget.c.b.a(MyEnterpriseActivity.this, this.f6121b);
} else {
MyEnterpriseActivity.this.g(str);
}
}
@Override
public void onSecondButtonClicked(Button button) {
}
}
private static final class d extends SafeHandler<MyEnterpriseActivity> {
d(MyEnterpriseActivity myEnterpriseActivity, a aVar) {
this(myEnterpriseActivity);
}
@Override
public void handleMessage(MyEnterpriseActivity myEnterpriseActivity, Message message) {
int i2 = message.what;
if (i2 == 5052) {
myEnterpriseActivity.m();
} else if (i2 == 5053) {
myEnterpriseActivity.a((Bundle) message.obj);
} else if (i2 == 5061) {
Object obj = message.obj;
if (obj instanceof RestResponse) {
myEnterpriseActivity.c((RestResponse) obj);
} else {
myEnterpriseActivity.c((RestResponse) null);
}
} else if (i2 == 5062) {
myEnterpriseActivity.b((Bundle) message.obj);
} else if (i2 == 5108) {
myEnterpriseActivity.h(message.obj);
} else if (i2 == 5109) {
myEnterpriseActivity.g(message.obj);
} else if (i2 == 5110) {
myEnterpriseActivity.f(message.obj);
} else if (i2 == 5111) {
myEnterpriseActivity.e(message.obj);
} else if (i2 == 5112) {
myEnterpriseActivity.i(message.obj);
} else if (i2 == 5113) {
Object obj2 = message.obj;
if (obj2 instanceof Bundle) {
myEnterpriseActivity.b((Bundle) obj2, (Throwable) null);
} else if (obj2 instanceof Throwable) {
myEnterpriseActivity.b((Bundle) null, (Throwable) obj2);
}
} else if (i2 == 5114) {
myEnterpriseActivity.j(message.obj);
} else if (i2 == 5115) {
Object obj3 = message.obj;
if (obj3 instanceof Bundle) {
myEnterpriseActivity.c((Bundle) obj3, (Throwable) null);
} else if (obj3 instanceof Throwable) {
myEnterpriseActivity.c((Bundle) null, (Throwable) obj3);
}
} else if (i2 == 5188) {
Object obj4 = message.obj;
if (obj4 instanceof EnterpriseInfo) {
myEnterpriseActivity.a((EnterpriseInfo) obj4);
}
} else if (i2 == 5189) {
myEnterpriseActivity.d(message.obj);
} else if (i2 == 5190) {
Object obj5 = message.obj;
if (!(obj5 instanceof RestResponse)) {
myEnterpriseActivity.c((Object) null);
} else {
myEnterpriseActivity.b((RestResponse) obj5);
}
} else if (i2 == 5191) {
myEnterpriseActivity.c(message.obj);
} else if (i2 == 5081) {
Object obj6 = message.obj;
if (obj6 instanceof RestResponse) {
myEnterpriseActivity.a((RestResponse) obj6);
} else {
myEnterpriseActivity.a((RestResponse) null);
}
} else if (i2 == 5082) {
Object obj7 = message.obj;
if (obj7 instanceof Bundle) {
myEnterpriseActivity.a((Bundle) obj7, (Throwable) null);
} else if (obj7 instanceof Throwable) {
myEnterpriseActivity.a((Bundle) null, (Throwable) obj7);
}
}
}
private d(MyEnterpriseActivity myEnterpriseActivity) {
super(myEnterpriseActivity);
}
}
public void i(Object obj) {
L.i(f6111k, "logoutEnterpriseSuccess: " + obj);
if (obj instanceof RestResponse) {
if (((RestResponse) obj).isSuccess()) {
com.ainemo.android.preferences.g.f().q(com.xylink.net.manager.g.L());
com.ainemo.android.preferences.f.a().i(com.xylink.net.manager.g.L());
com.xylink.common.widget.c.b.a(this, (int) R.string.logout_enterprise_success_tip, 0);
finish();
return;
}
com.xylink.common.widget.c.b.a(this, (int) R.string.logout_enterprise_fail_tip, 0);
return;
}
com.xylink.common.widget.c.b.a(this, (int) R.string.logout_enterprise_fail_tip, 0);
}
private void initBottomDialog() {
ExpandedBottomSheetDialog expandedBottomSheetDialog = new ExpandedBottomSheetDialog(this, R.style.BottomSheetTransparentDialog);
this.f6116f = expandedBottomSheetDialog;
expandedBottomSheetDialog.setCanceledOnTouchOutside(true);
View inflate = View.inflate(this, R.layout.dialog_enterprise, null);
this.f6116f.setContentView(inflate);
TextView textView = (TextView) inflate.findViewById(R.id.tv_operate_enterprise);
this.f6113c = textView;
textView.setOnClickListener(this);
inflate.findViewById(R.id.tv_enterprise_cancel).setOnClickListener(this);
}
private void initData() {
if (!com.xylink.net.e.e.a(this.f6118h.v()) && this.f6118h.v().length() > 16) {
TextView textView = this.f6117g.U2;
textView.setText(this.f6118h.v().substring(0, 16) + "···");
} else {
this.f6117g.U2.setText(this.f6118h.v());
}
this.f6117g.T2.setText(this.f6118h.g());
if (this.f6118h.k()) {
this.f6117g.H2.setVisibility((com.ainemo.android.b.f5988k.equals(com.xylink.net.e.c.f()) || com.xylink.net.e.c.n.equals(com.xylink.net.e.c.f())) ? 0 : 8);
if (this.f6118h.l()) {
if (this.f6118h.e()) {
this.f6117g.F2.setVisibility(0);
} else {
this.f6117g.F2.setVisibility(8);
}
} else {
this.f6117g.F2.setVisibility(0);
}
} else {
this.f6117g.H2.setVisibility(8);
this.f6117g.F2.setVisibility(8);
}
q();
}
private void initView() {
this.f6117g.v1.setOnClickListener(this);
this.f6117g.L2.setOnClickListener(this);
this.f6117g.Q2.setOnClickListener(this);
this.f6117g.A2.setOnClickListener(this);
this.f6117g.N2.setOnClickListener(this);
this.f6117g.M2.setEnabled(false);
this.f6117g.M2.setClickable(false);
this.f6117g.M2.setOnClickListener(this);
this.f6117g.I2.setOnClickListener(this);
if (this.f6118h.l()) {
if ("enterprise".equals(this.f6118h.d())) {
b(true);
} else if ("unit".equals(o.p0().c())) {
b(false);
}
} else {
b(true);
}
String language = Locale.getDefault().getLanguage();
if (!TextUtils.isEmpty(language) && language.equals("en")) {
RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) this.f6117g.Q2.getLayoutParams();
layoutParams.topMargin = com.xylink.common.e.e.a(18.0f);
this.f6117g.Q2.setLayoutParams(layoutParams);
}
if (com.xylink.net.e.e.c(this.f6118h.f()) && this.f6118h.f().equals("ff80808163a476b10163ba8d21ea07a5")) {
this.f6117g.X2.setText("https://meeting.mwr.cn/console");
} else {
this.f6117g.X2.setText("https://vip.xylink.com/console");
}
if (this.f6118h.l()) {
if (this.f6118h.e()) {
this.f6117g.F2.setVisibility(0);
} else {
this.f6117g.F2.setVisibility(8);
}
} else {
this.f6117g.F2.setVisibility(0);
}
this.f6118h.c().a(this, new a());
this.f6118h.h().a(this, new androidx.lifecycle.q() {
@Override
public final void c(Object obj) {
MyEnterpriseActivity.this.e((String) obj);
}
});
initBottomDialog();
}
public void j(Object obj) {
dismissWaitDialog();
L.i(f6111k, "userExistEnterpriseSuccess: " + obj);
com.ainemo.android.preferences.g.f().c(com.xylink.net.manager.g.L(), "");
com.ainemo.android.preferences.g.f().e(com.xylink.net.manager.g.L(), false);
com.xylink.common.widget.c.b.a(this, (int) R.string.quit_enterprise_success, 0);
finish();
}
public void m() {
}
public void n() {
e.l.c.b.a(this, c.a.H0);
if (getAIDLService() != null) {
try {
getAIDLService().s(this.f6118h.f());
} catch (RemoteException e2) {
e2.printStackTrace();
}
}
}
private void o() {
j.c cVar = new j.c();
cVar.c(R.drawable.bg_red_style_button);
if ("logout".equals(this.f6118h.r())) {
cVar.d(getString(R.string.send_logout_enterprise));
cVar.a((CharSequence) getString(R.string.confirm_logout_content));
cVar.a(getString(R.string.string_logout_button));
} else if ("quit".equals(this.f6118h.r())) {
cVar.d(getString(R.string.send_drop_out_enterprise));
cVar.a((CharSequence) getString(R.string.confirm_quit_content));
cVar.a(getString(R.string.button_text_exit_fullscreen));
}
com.xylink.common.widget.b.j a2 = cVar.a();
a2.a(new b());
m a3 = getSupportFragmentManager().a();
a3.a(a2, "Exist");
a3.f();
}
public void p() {
e.l.c.b.a(this, c.a.G0);
if (getAIDLService() != null) {
try {
getAIDLService().F(this.f6118h.f());
} catch (RemoteException e2) {
e2.printStackTrace();
}
}
}
private void q() {
if (this.f6118h.a()) {
this.f6117g.v1.setChecked(true);
} else {
this.f6117g.v1.setChecked(false);
}
}
public void showWaitDialog() {
if (this.f6112b == null) {
p a2 = new p.a().a();
this.f6112b = a2;
a2.setCancelable(true);
}
if (this.f6112b.isAdded()) {
return;
}
getSupportFragmentManager().a().a(this.f6112b, f6111k).f();
L.i(f6111k, "show wait dialog");
}
public void dismissWaitDialog() {
L.i(f6111k, "dismiss wait dialog");
p pVar = this.f6112b;
if (pVar == null || !pVar.isVisible()) {
return;
}
this.f6112b.dismissAllowingStateLoss();
}
@Override
public Messenger getMessenger() {
if (this.a == null) {
this.a = new Messenger(new d(this, null));
}
return this.a;
}
@Override
public void onClick(View view) {
switch (view.getId()) {
case R.id.check_switch:
if (this.f6117g.v1.isChecked()) {
a(this.f6118h.f(), true);
return;
} else {
a(this.f6118h.f(), false);
return;
}
case R.id.image_back_close:
finish();
return;
case R.id.linear_merge:
if (this.f6118h.y() != null) {
StringBuilder sb = new StringBuilder();
sb.append(this.f6118h.y().getAppCombinationUrl());
sb.append("?securityKey=");
sb.append(this.f6118h.q() != null ? this.f6118h.q().getSecurityKey() : com.xylink.net.manager.f.D());
sb.append(ApShareConst.HOST);
sb.append(this.f6118h.s());
sb.append("&locale=zh_CN");
String sb2 = sb.toString();
Intent intent = new Intent(this, WebPageActivity.class);
intent.putExtra(WebPageActivity.KEY_URL, sb2);
startActivity(intent);
return;
}
return;
case R.id.rela_more:
if (this.f6116f != null) {
L.i(f6111k, "isSuperAdmin:" + this.f6118h.p() + ",isHasUser: " + this.f6118h.m() + ",isCrmReport: " + this.f6118h.i() + ",isExtension: " + this.f6118h.j() + ",isPayResource: " + this.f6118h.o() + ",isInProtectList: " + this.f6118h.n());
if (this.f6118h.p()) {
if (!this.f6118h.m() && !this.f6118h.i() && !this.f6118h.j() && !this.f6118h.o() && !this.f6118h.n()) {
if (o.p0().F()) {
if ("enterprise".equals(o.p0().c())) {
this.f6113c.setText(getString(R.string.send_logout_enterprise));
} else if ("unit".equals(o.p0().c())) {
this.f6113c.setText(getString(R.string.send_logout_unit));
}
} else {
this.f6113c.setText(getString(R.string.send_logout_enterprise));
}
this.f6118h.b("logout");
} else {
this.f6117g.L2.setVisibility(8);
}
} else {
if (o.p0().F()) {
if ("enterprise".equals(o.p0().c())) {
this.f6113c.setText(getString(R.string.send_drop_out_enterprise));
} else if ("unit".equals(o.p0().c())) {
this.f6113c.setText(getString(R.string.send_drop_out_unit));
}
} else {
this.f6113c.setText(getString(R.string.send_drop_out_enterprise));
}
this.f6118h.b("quit");
}
this.f6116f.show();
return;
}
return;
case R.id.rela_name:
h("alterEnterpriseName");
return;
case R.id.rela_short_name:
if (this.f6118h.p()) {
h("alterShortName");
return;
}
return;
case R.id.tv_certifice:
if (this.f6118h.y() != null) {
Intent intent2 = new Intent(this, WebPageActivity.class);
intent2.putExtra(WebPageActivity.KEY_URL, this.f6118h.y().getCreateEntpAuth());
startActivity(intent2);
return;
}
return;
case R.id.tv_enterprise_cancel:
com.google.android.material.bottomsheet.a aVar = this.f6116f;
if (aVar == null || !aVar.isShowing()) {
return;
}
this.f6116f.dismiss();
return;
case R.id.tv_operate_enterprise:
o();
com.google.android.material.bottomsheet.a aVar2 = this.f6116f;
if (aVar2 == null || !aVar2.isShowing()) {
return;
}
this.f6116f.dismiss();
return;
default:
return;
}
}
@Override
@l0(api = 21)
public void onCreate(Bundle bundle) {
super.onCreate(bundle);
if (Build.VERSION.SDK_INT >= 23) {
getWindow().setStatusBarColor(getResources().getColor(R.color.WHITE));
getWindow().getDecorView().setSystemUiVisibility(8192);
} else {
getWindow().clearFlags(67108864);
getWindow().addFlags(Integer.MIN_VALUE);
getWindow().setStatusBarColor(getResources().getColor(R.color.WHITE));
}
this.f6117g = (q) androidx.databinding.m.a(this, (int) R.layout.activity_my_enterprise);
j jVar = (j) new x(this).a(j.class);
this.f6118h = jVar;
this.f6117g.a(jVar);
this.f6117g.a((androidx.lifecycle.k) this);
this.f6114d = new Gson();
initView();
}
@Override
public void onMessage(Message message) {
super.onMessage(message);
}
@Override
public void onResume() {
super.onResume();
}
@Override
public void onServiceConnected(d.a aVar) {
super.onServiceConnected(aVar);
try {
this.f6118h.a(aVar.e0());
aVar.g();
aVar.r(this.f6118h.f());
aVar.o(this.f6118h.f());
if (com.xylink.net.e.e.c(this.f6118h.f())) {
aVar.j();
}
if (this.f6118h.p()) {
if (!this.f6118h.i() && !this.f6118h.m() && !this.f6118h.j() && !this.f6118h.o() && !this.f6118h.n()) {
this.f6117g.L2.setVisibility(0);
}
this.f6117g.L2.setVisibility(8);
} else {
this.f6117g.L2.setVisibility(0);
}
} catch (RemoteException e2) {
e2.printStackTrace();
}
initData();
}
public void g(Object obj) {
L.i(f6111k, "isExtensionFail");
com.ainemo.android.preferences.p.K().d(com.xylink.net.manager.g.L(), false);
}
public void h(Object obj) {
boolean parseBoolean = Boolean.parseBoolean(obj.toString());
L.i(f6111k, "isExtensionSuccess :" + parseBoolean);
com.ainemo.android.preferences.p.K().d(com.xylink.net.manager.g.L(), parseBoolean);
}
public void f(Object obj) {
boolean parseBoolean = Boolean.parseBoolean(obj.toString());
L.i(f6111k, "isEnterprisePaySuccess :" + parseBoolean);
com.ainemo.android.preferences.p.K().g(com.xylink.net.manager.g.L(), parseBoolean);
}
public void e(String str) {
this.f6117g.T2.setText(str);
}
public void d(Object obj) {
L.i(f6111k, "enterpriseInfoFail: " + obj);
}
public void e(Object obj) {
L.i(f6111k, "isEnterprisePayFail");
com.ainemo.android.preferences.p.K().g(com.xylink.net.manager.g.L(), false);
}
public void g(String str) {
if (getAIDLService() == null || getAIDLService() == null) {
return;
}
try {
showWaitDialog();
getAIDLService().w(str);
} catch (RemoteException e2) {
L.e(f6111k, e2);
}
}
private void h(String str) {
l.d dVar = new l.d();
String string = getString(R.string.string_input_short_name);
String string2 = getString(R.string.string_alter_enterprise_name);
String string3 = getString(R.string.string_input_company_name_tip);
String string4 = getString(R.string.string_short_name_not_empty);
String string5 = getString(R.string.enterprise_name_empty_tip);
if (this.f6118h.l()) {
if ("enterprise".equals(this.f6118h.d())) {
string = getString(R.string.string_input_short_name);
string2 = getString(R.string.string_alter_enterprise_name);
string3 = getString(R.string.string_input_company_name_tip);
string4 = getString(R.string.string_short_name_not_empty);
string5 = getString(R.string.enterprise_name_empty_tip);
} else if ("unit".equals(o.p0().c())) {
string = getString(R.string.string_input_unit_short_name);
string2 = getString(R.string.string_alter_unit_name);
string3 = getString(R.string.string_input_unit_name);
string4 = getString(R.string.string_short_unit_name_not_empty);
string5 = getString(R.string.unit_name_empty_tip);
}
}
if (str.equals("alterShortName")) {
this.f6115e = dVar.d(this.f6117g.Z2.getText().toString()).h(getString(R.string.prompt_for_change_d_name_title)).b(string).b(1).b(true).c(30).a();
} else if (str.equals("alterEnterpriseName")) {
this.f6115e = dVar.d(this.f6118h.g()).h(string2).b(string3).b(1).b(true).c(30).a();
}
this.f6115e.a(new c(str, string4, string5));
this.f6115e.setCancelable(false);
m a2 = getSupportFragmentManager().a();
a2.a(this.f6115e, "ChangeShortName");
a2.f();
}
public boolean d(String str) {
return str.matches("\\d+\\.{0,1}\\d*");
}
public void c(Object obj) {
L.i(f6111k, "alterShortNameFail: " + obj);
dismissWaitDialog();
com.xylink.common.widget.c.b.a(this, (int) R.string.string_rename_fail, 0);
}
public void f(String str) {
if (getAIDLService() != null) {
try {
showWaitDialog();
getAIDLService().k(this.f6118h.f(), str);
} catch (RemoteException e2) {
e2.printStackTrace();
}
}
}
private void b(boolean z) {
if (z) {
this.f6117g.P2.setText(getString(R.string.my_enterprise));
this.f6117g.J2.setText(getString(R.string.str_enterprise_abbreviation));
this.f6117g.Y2.setText(R.string.string_merge_other_enterprise_tip);
this.f6117g.V2.setText(getString(R.string.enterprise_name));
this.f6117g.R2.setText(getString(R.string.str_enterprise_cetifice));
return;
}
this.f6117g.P2.setText(getString(R.string.string_my_unit));
this.f6117g.J2.setText(getString(R.string.str_unit_abbreviation));
this.f6117g.Y2.setText(R.string.string_merge_other_unit_tip);
this.f6117g.V2.setText(getString(R.string.unit_name));
this.f6117g.R2.setText(getString(R.string.str_unit_cetifice));
}
private void a(String str, boolean z) {
if (getAIDLService() != null) {
try {
getAIDLService().a(str, z);
} catch (RemoteException e2) {
e2.printStackTrace();
}
}
}
public void c(Bundle bundle, Throwable th) {
dismissWaitDialog();
if (bundle != null) {
boolean z = bundle.getBoolean("isJSON");
String string = bundle.getString("data");
L.i(f6111k, "userQuitEnterpriseFail: " + string);
EnterpriseError enterpriseError = z ? (EnterpriseError) this.f6114d.fromJson(string, (Class<Object>) EnterpriseError.class) : null;
if (enterpriseError != null) {
if (enterpriseError.getErrorCode() == 3101) {
com.xylink.common.widget.c.b.a(this, (int) R.string.user_is_superadmin, 0);
} else {
com.xylink.common.widget.c.b.a(this, (int) R.string.quit_enterprise_fail, 0);
}
} else {
com.xylink.common.widget.c.b.a(this, (int) R.string.quit_enterprise_fail, 0);
}
}
if (th != null) {
L.i(f6111k, "userQuitEnterpriseFail: " + th.getMessage());
com.xylink.common.widget.c.b.a(this, (int) R.string.quit_enterprise_fail, 0);
}
}
public void a(RestResponse restResponse) {
dismissWaitDialog();
if (restResponse != null && restResponse.isSuccess()) {
this.f6118h.a(this.f6120j);
com.ainemo.android.preferences.g.f().d(com.xylink.net.manager.g.L(), this.f6120j);
}
com.xylink.common.widget.c.b.a(this, (int) R.string.alter_success_enterprise, 0);
}
public void a(Bundle bundle, Throwable th) {
dismissWaitDialog();
if (bundle != null) {
boolean z = bundle.getBoolean("isJSON");
String string = bundle.getString("data");
L.i(f6111k, "alterEnterpriseFail: " + string);
EnterpriseError enterpriseError = z ? (EnterpriseError) new Gson().fromJson(string, (Class<Object>) EnterpriseError.class) : null;
if (enterpriseError != null) {
if (enterpriseError.getErrorCode() == 46001) {
com.xylink.common.widget.c.b.a(this, (int) R.string.name_contain_space, 0);
} else if (enterpriseError.getErrorCode() == 46002) {
com.xylink.common.widget.c.b.a(this, (int) R.string.name_already_exit, 0);
} else if (enterpriseError.getErrorCode() == 46003) {
com.xylink.common.widget.c.b.a(this, (int) R.string.string_sample_name_tip, 0);
} else {
com.xylink.common.widget.c.b.a(this, (int) R.string.alter_fail_enterprise, 0);
}
} else {
com.xylink.common.widget.c.b.a(this, (int) R.string.alter_fail_enterprise, 0);
}
}
if (th != null) {
L.i(f6111k, "alterEnterpriseFail: " + th.getMessage());
com.xylink.common.widget.c.b.a(this, (int) R.string.alter_fail_enterprise, 0);
}
}
public void b(RestResponse restResponse) {
L.i(f6111k, "alterShortNameSuccess: " + restResponse);
dismissWaitDialog();
if (restResponse == null || !restResponse.isSuccess()) {
return;
}
this.f6118h.c(this.f6119i);
com.xylink.common.widget.c.b.a(this, (int) R.string.string_rename_success, 0);
}
public void c(RestResponse restResponse) {
if (restResponse == null || restResponse.getData() == null) {
return;
}
int i2 = 8;
if (restResponse.getData().isMergePrivilege()) {
this.f6117g.I2.setVisibility((com.ainemo.android.b.f5988k.equals(com.xylink.net.e.c.f()) || com.xylink.net.e.c.n.equals(com.xylink.net.e.c.f())) ? 0 : 0);
} else {
this.f6117g.I2.setVisibility(8);
}
}
public void b(int i2) {
if (this.f6118h.i()) {
this.f6117g.M2.setEnabled(false);
this.f6117g.M2.setClickable(false);
this.f6117g.K2.setVisibility(8);
this.f6117g.W2.setVisibility(8);
this.f6117g.a3.setVisibility(8);
}
if (i2 == 1) {
if (this.f6118h.p()) {
this.f6117g.a3.setVisibility(0);
if (!this.f6118h.i() && !this.f6118h.j()) {
this.f6117g.z2.setVisibility(0);
this.f6117g.M2.setEnabled(true);
this.f6117g.M2.setClickable(true);
} else {
this.f6117g.M2.setEnabled(false);
this.f6117g.M2.setClickable(false);
this.f6117g.z2.setVisibility(8);
}
this.f6117g.K2.setVisibility(0);
this.f6117g.Q2.setVisibility(0);
} else {
this.f6117g.M2.setEnabled(false);
this.f6117g.M2.setClickable(false);
this.f6117g.z2.setVisibility(8);
this.f6117g.K2.setVisibility(8);
this.f6117g.Q2.setVisibility(8);
}
this.f6117g.W2.setVisibility(8);
} else if (i2 == 2 || i2 == 3 || i2 == 4) {
this.f6117g.M2.setEnabled(false);
this.f6117g.M2.setClickable(false);
if (this.f6118h.p()) {
this.f6117g.a3.setVisibility(0);
this.f6117g.K2.setVisibility(0);
this.f6117g.Q2.setVisibility(0);
this.f6117g.W2.setVisibility(8);
}
} else if (i2 != 5) {
} else {
if (this.f6118h.x() == 1) {
this.f6117g.M2.setEnabled(false);
this.f6117g.M2.setClickable(false);
this.f6117g.a3.setVisibility(0);
this.f6117g.K2.setVisibility(8);
this.f6117g.W2.setVisibility(0);
} else if (this.f6118h.p()) {
this.f6117g.a3.setVisibility(0);
this.f6117g.K2.setVisibility(0);
this.f6117g.Q2.setVisibility(0);
this.f6117g.W2.setVisibility(8);
this.f6117g.M2.setEnabled(false);
this.f6117g.M2.setClickable(false);
}
}
}
public void a(EnterpriseInfo enterpriseInfo) {
L.i(f6111k, "EnterpriseInfo: " + enterpriseInfo.toString());
if (enterpriseInfo != null) {
a(enterpriseInfo.isSuperAdmin());
this.f6118h.c(enterpriseInfo.getShortName());
this.f6118h.b(enterpriseInfo.getUploadStatus());
this.f6118h.a(enterpriseInfo.getAuditStatus());
com.ainemo.android.preferences.g.f().d(com.xylink.net.manager.g.L(), enterpriseInfo.getEnterpriseName());
this.f6118h.a(enterpriseInfo.getEnterpriseName());
com.ainemo.android.preferences.g.f().b(com.xylink.net.manager.g.L(), enterpriseInfo.getAdminName());
this.f6118h.d(enterpriseInfo.getAdminName());
com.ainemo.android.preferences.g.f().g(com.xylink.net.manager.g.L(), String.valueOf(enterpriseInfo.isApplyToJoin()));
this.f6118h.a(enterpriseInfo.isApplyToJoin());
com.ainemo.android.preferences.g.f().g(com.xylink.net.manager.g.L(), String.valueOf(enterpriseInfo.isVerified()));
}
}
private void a(boolean z) {
L.i(f6111k, "superAdminSuccess :" + z);
com.ainemo.android.preferences.p.K().j(com.xylink.net.manager.g.L(), z);
if (this.f6118h.i() || this.f6118h.j()) {
this.f6117g.E2.setVisibility(8);
} else if (z) {
this.f6117g.E2.setVisibility(0);
this.f6117g.N2.setOnClickListener(this);
} else {
this.f6117g.E2.setVisibility(8);
}
}
public void a(Bundle bundle) {
q();
}
public void b(Bundle bundle, Throwable th) {
dismissWaitDialog();
if (bundle != null) {
boolean z = bundle.getBoolean("isJSON");
String string = bundle.getString("data");
L.i(f6111k, "logoutEnterpriseFail: " + string);
EnterpriseError enterpriseError = z ? (EnterpriseError) this.f6114d.fromJson(string, (Class<Object>) EnterpriseError.class) : null;
if (enterpriseError != null) {
if (enterpriseError.getErrorCode() == 12001) {
com.xylink.common.widget.c.b.a(this, (int) R.string.enterprise_no_exist, 0);
} else if (enterpriseError.getErrorCode() == 2016) {
com.xylink.common.widget.c.b.a(this, (int) R.string.enterprise_from_crm, 0);
} else if (enterpriseError.getErrorCode() == 48007) {
com.xylink.common.widget.c.b.a(this, (int) R.string.not_match_user_enterprise, 0);
} else if (enterpriseError.getErrorCode() == 43001) {
com.xylink.common.widget.c.b.a(this, (int) R.string.user_isnot_superadmin, 0);
} else if (enterpriseError.getErrorCode() == 2014) {
com.xylink.common.widget.c.b.a(this, (int) R.string.enterprise_has_pay_resource, 0);
} else if (enterpriseError.getErrorCode() == 2015) {
com.xylink.common.widget.c.b.a(this, (int) R.string.enterprise_has_extension, 0);
} else if (enterpriseError.getErrorCode() == 2017) {
com.xylink.common.widget.c.b.a(this, (int) R.string.enterprise_has_other_user, 0);
} else {
com.xylink.common.widget.c.b.a(this, (int) R.string.logout_enterprise_fail_tip, 0);
}
} else {
com.xylink.common.widget.c.b.a(this, (int) R.string.logout_enterprise_fail_tip, 0);
}
}
if (th != null) {
L.i(f6111k, "logoutEnterpriseFail: " + th.getMessage());
com.xylink.common.widget.c.b.a(this, (int) R.string.logout_enterprise_fail_tip, 0);
}
}
public void b(Bundle bundle) {
this.f6117g.I2.setVisibility(8);
}
}