OurPlay v5.5.9版本的 MD5 值为:d4e139798f4c2243a1145c8af5e21046
以下内容为反编译后的 SettingActivity.java 源代码,内容仅作参考
package com.excelliance.kxqp.gs.ui.setting;
import android.content.ComponentName;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.pm.PackageManager;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.os.Message;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import android.widget.Toast;
import androidx.fragment.app.DialogFragment;
import androidx.lifecycle.Observer;
import androidx.lifecycle.ViewModelProviders;
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
import com.alipay.sdk.widget.j;
import com.bytedance.sdk.open.aweme.common.constants.ParamKeyConstants;
import com.excean.bytedancebi.bean.BiEventDialogShow;
import com.excean.bytedancebi.bean.BiEventPageOpen;
import com.excean.ggspace.main.R;
import com.excean.view.dialog.ContainerDialog;
import com.excelliance.kxqp.SmtCntService;
import com.excelliance.kxqp.SmtServService;
import com.excelliance.kxqp.gs.base.GSBaseActivity;
import com.excelliance.kxqp.gs.base.b;
import com.excelliance.kxqp.gs.bean.ShareGameBean;
import com.excelliance.kxqp.gs.dialog.ad;
import com.excelliance.kxqp.gs.dialog.h;
import com.excelliance.kxqp.gs.receiver.ApkDownloadCompleteReceiver;
import com.excelliance.kxqp.gs.thpool.tp;
import com.excelliance.kxqp.gs.ui.CommonActivity;
import com.excelliance.kxqp.gs.ui.aboutus.AboutActivity;
import com.excelliance.kxqp.gs.ui.home.MainFragment;
import com.excelliance.kxqp.gs.ui.question.CommonWebViewActivity;
import com.excelliance.kxqp.gs.ui.question.WebNoVideoActivity;
import com.excelliance.kxqp.gs.ui.setting.b;
import com.excelliance.kxqp.gs.ui.share.core.config.SocializeMedia;
import com.excelliance.kxqp.gs.util.an;
import com.excelliance.kxqp.gs.util.ao;
import com.excelliance.kxqp.gs.util.aq;
import com.excelliance.kxqp.gs.util.az;
import com.excelliance.kxqp.gs.util.bs;
import com.excelliance.kxqp.gs.util.by;
import com.excelliance.kxqp.gs.util.bz;
import com.excelliance.kxqp.gs.util.cc;
import com.excelliance.kxqp.gs.util.e;
import com.excelliance.kxqp.gs.util.g;
import com.excelliance.kxqp.gs.util.w;
import com.excelliance.kxqp.gs.view.switchbutton.SwitchButton;
import com.excelliance.kxqp.sdk.StatisticsGS;
import com.tencent.open.SocialConstants;
public class SettingActivity extends GSBaseActivity<b.a> implements ad.b, b.InterfaceC0461b {
private View f11248a;
private TextView f11249b;
private h c;
private ApkDownloadCompleteReceiver d;
private ad e;
private SwitchButton f;
private SwitchButton g;
private SwitchButton h;
private SwitchButton i;
private SwitchButton j;
private SwitchButton k;
private h l;
private SettingViewModel m;
private View n;
private Handler o = new Handler(Looper.getMainLooper()) {
@Override
public void handleMessage(Message message) {
int i;
switch (message.what) {
case 0:
Toast.makeText(SettingActivity.this.mContext, w.e(SettingActivity.this.mContext, "net_unusable"), 0).show();
return;
case 1:
Bundle bundle = (Bundle) message.obj;
Message message2 = new Message();
message2.what = 10;
message2.obj = bundle;
String str = (String) bundle.get("serverVersionCode");
SettingActivity.this.a(8);
if (!TextUtils.isEmpty(str)) {
int a2 = g.a(SettingActivity.this.mContext).a();
try {
i = Integer.parseInt(str);
} catch (Exception e) {
e.printStackTrace();
i = 0;
}
Boolean a3 = g.a(SettingActivity.this.mContext).a(a2, i);
by.a(SettingActivity.this.mContext, "download_sp").a("versionCode_read", str);
by.a(SettingActivity.this.mContext, "download_sp").a("isNewVersion", a3.booleanValue());
if (bs.c() && bs.p(SettingActivity.this.mContext)) {
a3 = false;
SettingActivity.this.n.setVisibility(8);
}
if (a3.booleanValue()) {
SettingActivity.this.a(message2);
Intent intent = new Intent();
intent.setAction("HaveNewVersion");
intent.putExtra("msg", "msg");
intent.putExtra(ParamKeyConstants.WebViewConstants.QUERY_FROM, "about");
SettingActivity.this.mContext.sendBroadcast(intent);
return;
}
Toast.makeText(SettingActivity.this.mContext, w.e(SettingActivity.this.mContext, "now_is_new_version"), 0).show();
return;
}
Toast.makeText(SettingActivity.this.mContext, w.e(SettingActivity.this.mContext, "now_is_new_version"), 0).show();
return;
case 2:
SettingActivity.this.makeToast("share_sdk_share_no_info", 0);
return;
default:
return;
}
}
};
private boolean p;
@Override
public boolean customAnimation() {
return true;
}
@Override
public boolean deepStatus() {
return true;
}
@Override
public void initOther() {
super.initOther();
if (getIntent() != null) {
this.p = getIntent().getBooleanExtra("displayView", false);
}
this.m = (SettingViewModel) ViewModelProviders.of(this).get(SettingViewModel.class);
this.m.b().observe(this, new Observer<Integer>() {
@Override
public void onChanged(Integer num) {
az.d("SettingActivity", String.format("SettingActivity/onChanged:thread(%s) state(%s)", Thread.currentThread().getName(), num));
switch (num.intValue()) {
case 1:
if (SettingActivity.this.l == null) {
SettingActivity.this.l = new h(SettingActivity.this);
}
SettingActivity.this.l.a(SettingActivity.this.mContext.getString(R.string.gms_installing_now));
return;
case 2:
if (SettingActivity.this.l != null) {
SettingActivity.this.l.dismiss();
return;
}
return;
default:
return;
}
}
});
}
@Override
protected void initId() {
ao aoVar;
View view;
int i;
int i2;
ao a2 = ao.a(this.mContext);
this.f11249b = (TextView) a2.a("new_app_version", this.f11248a);
View a3 = a2.a(this.f11248a, "flow_switch", 0);
this.f = (SwitchButton) a2.a("flow_switch_btn", this.f11248a);
View a4 = a2.a(this.f11248a, "google_play_switch", 12);
this.i = (SwitchButton) a2.a("google_play_switch_btn", this.f11248a);
View a5 = a2.a(this.f11248a, "google_play_game_switch", 13);
this.j = (SwitchButton) a2.a("google_play_game_switch_btn", this.f11248a);
View a6 = a2.a(this.f11248a, "expense_switch", 10);
View a7 = a2.a(this.f11248a, "download_assistance", 9);
View a8 = a2.a(this.f11248a, "customization_service", 14);
View a9 = a2.a(this.f11248a, "permission", 15);
View a10 = a2.a(this.f11248a, "statement_pri", 16);
View a11 = a2.a(this.f11248a, "statement", 17);
View a12 = a2.a(this.f11248a, "personal_info_list", 19);
View a13 = a2.a(this.f11248a, "personal_info_download", 21);
View a14 = a2.a(this.f11248a, "third_part_sdk_list", 18);
View a15 = a2.a(this.f11248a, "permission_list", 20);
View a16 = a2.a(this.f11248a, "about_us", 2);
this.n = a2.a(this.f11248a, "btn_thanks_like", 1);
View a17 = a2.a(this.f11248a, "go_score", 3);
if (a17 != null) {
a17.setVisibility(8);
}
View a18 = a2.a(this.f11248a, "recommend_to_friends", 4);
if (MainFragment.f9555a) {
a18.setVisibility(8);
}
View a19 = a2.a(this.f11248a, "check_update", 5);
View a20 = a2.a(this.f11248a, j.j, 6);
View a21 = a2.a(this.f11248a, "basic_switcher", 7);
this.k = (SwitchButton) this.f11248a.findViewById(R.id.basic_functions_switch_btn);
View a22 = a2.a(this.f11248a, "notification_switch", 8);
View a23 = a2.a("notification_btn", this.f11248a);
if (a23 != null && (a23 instanceof SwitchButton)) {
this.g = (SwitchButton) a23;
}
if (a22 != null) {
a22.setOnClickListener(this);
}
if (aq.m() && aq.q() && !bs.p(getContext())) {
a6.setVisibility(0);
} else {
a6.setVisibility(8);
}
a2.a(this.f11248a, "data_flow_download_switch", 11).setOnClickListener(this);
this.h = (SwitchButton) a2.a("data_flow_download_switch_btn", this.f11248a);
this.h.setChecked(by.a(this.mContext, "sp_total_info").b("sp_key_data_flow_download_notice", true).booleanValue());
a6.setOnClickListener(this);
a3.setOnClickListener(this);
if (com.excelliance.kxqp.gs.util.b.bs(this.mContext)) {
boolean booleanValue = by.a(this.mContext, "sp_total_info").b("show_gp_switch", false).booleanValue();
aoVar = a2;
boolean booleanValue2 = by.a(this.mContext, "sp_total_info").b("show_gp_game_switch", false).booleanValue();
a4.setVisibility(0);
a5.setVisibility(0);
a4.setOnClickListener(this);
a5.setOnClickListener(this);
this.i.setChecked(booleanValue);
this.j.setChecked(booleanValue2);
} else {
aoVar = a2;
a4.setVisibility(8);
a5.setVisibility(8);
}
c();
a7.setOnClickListener(this);
a8.setOnClickListener(this);
a9.setOnClickListener(this);
a16.setOnClickListener(this);
this.n.setOnClickListener(this);
a17.setOnClickListener(this);
a18.setOnClickListener(this);
a19.setOnClickListener(this);
a20.setOnClickListener(this);
a10.setOnClickListener(this);
a11.setOnClickListener(this);
a12.setOnClickListener(this);
a13.setOnClickListener(this);
a14.setOnClickListener(this);
a15.setOnClickListener(this);
by.a(this.mContext, "switcher").b("switcher", "false");
if (a21 != null) {
view = a21;
view.setVisibility(8);
view.setOnClickListener(this);
this.k.setChecked(cc.c(this.mContext));
} else {
view = a21;
}
if (bs.c() && bs.p(this.mContext)) {
i = 8;
a6.setVisibility(8);
a3.setVisibility(8);
if (a22 != null) {
a22.setVisibility(8);
}
if (view != null) {
view.setVisibility(8);
}
a7.setVisibility(8);
a17.setVisibility(8);
a18.setVisibility(8);
} else {
i = 8;
}
if (bs.p(this.mContext)) {
a7.setVisibility(i);
i2 = 0;
} else {
i2 = 0;
a7.setVisibility(0);
}
ao aoVar2 = aoVar;
View a24 = aoVar2.a("ll_display_view", this.f11248a);
View a25 = aoVar2.a("ll_setting_view", this.f11248a);
TextView textView = (TextView) aoVar2.a("tv_title", this.f11248a);
if (com.excelliance.kxqp.gs.util.b.aW(this.mContext)) {
a24.setVisibility(this.p ? 0 : 8);
if (this.p) {
i2 = 8;
}
a25.setVisibility(i2);
textView.setText(w.e(this.mContext, this.p ? "display_view" : "account_setting"));
}
View findViewById = this.f11248a.findViewById(this.mContext.getResources().getIdentifier("setting_top", "id", getPackageName()));
if (com.excelliance.kxqp.gs.newappstore.b.c.a(this.mContext)) {
if (findViewById != null) {
findViewById.setBackgroundColor(com.excelliance.kxqp.gs.newappstore.b.c.f7694a);
}
textView.setBackgroundColor(com.excelliance.kxqp.gs.newappstore.b.c.f7694a);
}
if (com.excelliance.kxqp.gs.ui.home.b.a(this.mContext).d()) {
((TextView) this.f11248a.findViewById(R.id.tv_title_download_assistant_app)).setText(R.string.download_assistance32);
}
this.f11248a.findViewById(R.id.rl_reinstall_gsf).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view2) {
new ContainerDialog.a().a(SettingActivity.this.mContext.getString(R.string.title)).b(SettingActivity.this.mContext.getString(R.string.reinstall_some_google_apps_or_not)).d(SettingActivity.this.mContext.getString(R.string.cancel)).e(SettingActivity.this.mContext.getString(R.string.reinstal)).a(new ContainerDialog.b() {
@Override
public void a(DialogFragment dialogFragment) {
dialogFragment.dismiss();
}
}).b(new ContainerDialog.b() {
@Override
public void a(DialogFragment dialogFragment) {
SettingActivity.this.m.a();
dialogFragment.dismiss();
}
}).a().show(SettingActivity.this.getSupportFragmentManager(), "FixGoogleAppDialog");
com.excelliance.kxqp.gs.g.c.a().c(SettingActivity.this.mPageDes.firstPage, "重新安装谷歌套件");
}
});
aoVar2.a(this.f11248a, "v_display_setting", 22).setOnClickListener(this);
this.mPageDes.firstPage = "设置页面";
}
@Override
protected View getLayout() {
this.f11248a = LayoutInflater.from(this.mContext).inflate(R.layout.activity_setting, (ViewGroup) null);
return this.f11248a;
}
@Override
public b.a initPresenter() {
return new d(this.mContext);
}
@Override
public void onResume() {
super.onResume();
try {
boolean b2 = g.a(this.mContext).b(this.mContext);
if (this.f11249b != null) {
this.f11249b.setVisibility(b2 ? 0 : 8);
}
} catch (Exception e) {
e.printStackTrace();
}
BiEventPageOpen biEventPageOpen = new BiEventPageOpen();
biEventPageOpen.current_page = this.mPageDes.firstPage;
com.excelliance.kxqp.gs.g.c.a().a(biEventPageOpen);
}
@Override
public void singleClick(View view) {
switch (Integer.valueOf(view.getTag().toString()).intValue()) {
case 0:
boolean isChecked = this.f.isChecked();
this.f.setChecked(!isChecked);
a(Boolean.valueOf(!isChecked));
StatisticsGS.getInstance().uploadUserAction(this, 102, isChecked ? 2 : 1, 1);
return;
case 1:
Intent intent = new Intent(this.mContext, (Class<?>) CommonWebViewActivity.class);
intent.putExtra(SocialConstants.PARAM_URL, "https://h5.ourplay.com.cn/thanks/");
startActivity(intent);
overridePendingTransition();
com.excelliance.kxqp.gs.g.c.a().c(this.mPageDes.firstPage, "特别鸣谢");
return;
case 2:
StatisticsGS.getInstance().uploadUserAction(this, 35);
startActivity(new Intent(this, (Class<?>) AboutActivity.class));
overridePendingTransition();
com.excelliance.kxqp.gs.g.c.a().c(this.mPageDes.firstPage, "关于我们");
return;
case 3:
StatisticsGS.getInstance().uploadUserAction(this, 36);
PackageManager packageManager = getPackageManager();
Intent intent2 = new Intent("android.intent.action.VIEW");
intent2.setData(Uri.parse("market://details?id=" + getPackageName()));
if (packageManager.queryIntentActivities(intent2, 0).size() > 0) {
startActivity(intent2);
overridePendingTransition();
return;
} else {
Toast.makeText(this, w.e(this.mContext, "no_market"), 0).show();
return;
}
case 4:
StatisticsGS.getInstance().uploadUserAction(this, 100, 4, getPackageName());
this.e = new ad(this);
this.e.a(this);
this.e.a();
this.e.c();
com.excelliance.kxqp.gs.g.c.a().c(this.mPageDes.firstPage, "推荐给好友");
return;
case 5:
StatisticsGS.getInstance().uploadUserAction(this, 48);
b();
((b.a) this.mPresenter).c();
com.excelliance.kxqp.gs.g.c.a().c(this.mPageDes.firstPage, "版本更新");
return;
case 6:
finish();
return;
case 7:
boolean isChecked2 = this.k.isChecked();
this.k.setChecked(!isChecked2);
cc.a(this.mContext, "HIDE_FUNCTION_AREA", !isChecked2);
this.mContext.sendBroadcast(new Intent(this.mContext.getPackageName() + ".ACTION.REFRESH.FUNCTION.SWITCH"));
return;
case 8:
if (this.g != null) {
boolean isChecked3 = this.g.isChecked();
this.g.setChecked(!isChecked3);
by.a(this.mContext, "sp_total_info").a(".foreground.service.switcher", !isChecked3);
if (Build.VERSION.SDK_INT >= 24) {
Intent intent3 = new Intent(".aciont.stop.foreground.notification");
intent3.setClass(this.mContext, SmtServService.class);
intent3.putExtra("open", !isChecked3);
this.mContext.startService(intent3);
Intent intent4 = new Intent(".aciont.stop.foreground.notification");
intent4.setClass(this.mContext, SmtCntService.class);
intent4.putExtra("open", !isChecked3);
this.mContext.startService(intent4);
return;
}
return;
}
return;
case 9:
Intent intent5 = new Intent();
intent5.putExtra("page", 1);
int i = R.string.download_assistance;
if (com.excelliance.kxqp.gs.ui.home.b.a(this.mContext).d()) {
i = R.string.download_assistance32;
}
intent5.putExtra("title", this.mContext.getString(i));
intent5.setComponent(new ComponentName(this.mContext, (Class<?>) CommonActivity.class));
this.mContext.startActivity(intent5);
com.excelliance.kxqp.gs.g.c.a().c(this.mPageDes.firstPage, "32位OurPlay辅包下载");
return;
case 10:
startActivity(new Intent(this.mContext, (Class<?>) ExpenseSwitchActivity.class));
com.excelliance.kxqp.gs.g.c.a().c(this.mPageDes.firstPage, "更新管理");
return;
case 11:
boolean isChecked4 = this.h.isChecked();
this.h.setChecked(!isChecked4);
by.a(this.mContext, "sp_total_info").a("sp_key_data_flow_download_notice", !isChecked4);
com.excelliance.kxqp.gs.g.c.a().c(this.mPageDes.firstPage, "更新管理");
return;
case 12:
boolean isChecked5 = this.i.isChecked();
this.i.setChecked(!isChecked5);
by.a(this.mContext, "sp_total_info").a("show_gp_switch", !isChecked5);
return;
case 13:
boolean isChecked6 = this.j.isChecked();
this.j.setChecked(!isChecked6);
by.a(this.mContext, "sp_total_info").a("show_gp_game_switch", !isChecked6);
return;
case 14:
startActivity(new Intent(this, (Class<?>) CustomizationServiceActivity.class));
com.excelliance.kxqp.gs.g.c.a().c(this.mPageDes.firstPage, "个性化推荐");
return;
case 15:
startActivity(new Intent(this, (Class<?>) PermissionManagerActivity.class));
com.excelliance.kxqp.gs.g.c.a().c(this.mPageDes.firstPage, "隐私权限设置");
return;
case 16:
Intent intent6 = new Intent(this.mContext, (Class<?>) CommonWebViewActivity.class);
intent6.putExtra("title", w.e(this.mContext, "statement_pri"));
intent6.putExtra(SocialConstants.PARAM_URL, "https://h5.ourplay.com.cn/privacy-new/");
startActivity(intent6);
com.excelliance.kxqp.gs.g.c.a().c(this.mPageDes.firstPage, "隐私协议");
return;
case 17:
Intent intent7 = new Intent(this.mContext, (Class<?>) CommonWebViewActivity.class);
intent7.putExtra("title", w.e(this.mContext, "statement_user"));
intent7.putExtra(SocialConstants.PARAM_URL, "https://h5.ourplay.com.cn/html/agreement/index.html");
startActivity(intent7);
com.excelliance.kxqp.gs.g.c.a().c(this.mPageDes.firstPage, "用户服务协议");
return;
case 18:
WebNoVideoActivity.startActivity(this.mContext, "https://cdn.ourplay.com.cn/webhtml/sdk/index.html");
com.excelliance.kxqp.gs.g.c.a().c(this.mPageDes.firstPage, "第三方SDK列表");
return;
case 19:
Intent intent8 = new Intent(this.mContext, (Class<?>) CommonWebViewActivity.class);
intent8.putExtra("title", w.e(this.mContext, "personal_info_list"));
intent8.putExtra(SocialConstants.PARAM_URL, "https://h5.ourplay.com.cn/privacy-new/multi-privacy/in-collection/");
startActivity(intent8);
return;
case 20:
Intent intent9 = new Intent(this.mContext, (Class<?>) CommonWebViewActivity.class);
intent9.putExtra("title", w.e(this.mContext, "permission_list"));
intent9.putExtra(SocialConstants.PARAM_URL, "https://h5.ourplay.com.cn/privacy-new/multi-privacy/permission/");
startActivity(intent9);
return;
case 21:
startActivity(new Intent(this.mContext, (Class<?>) PersonalInfoDownActivity.class));
return;
case 22:
StatisticsGS.getInstance().uploadUserAction(this.mContext, 33);
Intent intent10 = new Intent(this.mContext, (Class<?>) SettingActivity.class);
intent10.putExtra("displayView", true);
startActivity(intent10);
overridePendingTransition();
com.excelliance.kxqp.gs.g.c.a().c(this.mPageDes.firstPage, "界面显示");
com.excelliance.kxqp.gs.g.c.a().c(this.mPageDes.firstPage, "界面显示");
return;
default:
return;
}
}
@Override
public void a(Bundle bundle) {
if (isFinishing()) {
return;
}
if (this.c != null) {
this.c.dismiss();
}
if (bundle == null) {
this.o.sendMessage(this.o.obtainMessage(0));
} else {
Message obtainMessage = this.o.obtainMessage(1);
obtainMessage.obj = bundle;
this.o.sendMessage(obtainMessage);
}
}
private void b() {
if (isFinishing()) {
return;
}
if (this.c == null) {
this.c = new h(this.mContext);
}
if (!this.c.isShowing()) {
this.c.a(w.e(this.mContext, "check_update"));
} else {
this.c.dismiss();
}
}
public void a(Message message) {
int i = message.what;
final boolean z = i == 10;
String str = i == 10 ? "dialog_update" : null;
Bundle bundle = (Bundle) message.obj;
String str2 = (String) bundle.get("serverVersionCode");
com.excelliance.kxqp.gs.dialog.g gVar = new com.excelliance.kxqp.gs.dialog.g(this.mContext, w.o(this.mContext, "theme_dialog_no_title2"), str);
gVar.a(new b.InterfaceC0157b() {
@Override
public void b(int i2, Message message2, int i3) {
}
@Override
public void a(int i2, Message message2, int i3) {
if (i2 == 10) {
Bundle bundle2 = (Bundle) message2.obj;
SettingActivity.this.a(bundle2.getString("apkUrl", ""), bundle2.getShort("b64") == 1);
bz.a().a(SettingActivity.this.mContext, 80000, "点击更新OurPlay");
}
}
});
gVar.setOnShowListener(new DialogInterface.OnShowListener() {
@Override
public void onShow(DialogInterface dialogInterface) {
if (z) {
bz.a().a(SettingActivity.this.mContext, 79000, "弹出更新OurPlay弹框");
}
}
});
if (gVar.isShowing()) {
return;
}
gVar.c(i);
gVar.a(message);
String str3 = "";
if (i == 10) {
gVar.d(true);
str3 = bundle.getString("content");
gVar.f(true);
}
gVar.show();
BiEventDialogShow biEventDialogShow = new BiEventDialogShow();
biEventDialogShow.dialog_name = str2 + "版本更新弹窗";
biEventDialogShow.current_page = "设置页面";
com.excean.bytedancebi.c.a.a().a(biEventDialogShow);
if (i == 10) {
if (com.excelliance.kxqp.gs.newappstore.b.c.a(this.mContext)) {
gVar.a(w.k(this.mContext, "update_pos_btn_bg_new_store"));
gVar.b(false);
}
gVar.a(str3);
gVar.f(true);
gVar.g(false);
gVar.a(bundle);
}
}
public void a(String str, boolean z) {
IntentFilter intentFilter = new IntentFilter();
intentFilter.addAction("android.intent.action.DOWNLOAD_COMPLETE");
this.d = new ApkDownloadCompleteReceiver(z ? com.excelliance.kxqp.gs.ui.home.b.a(this).e() : getPackageName());
registerReceiver(this.d, intentFilter);
LocalBroadcastManager.getInstance(this.mContext).registerReceiver(this.d, new IntentFilter(getContext().getPackageName() + ".download.notify.state"));
if (TextUtils.isEmpty(str)) {
return;
}
e.a(this.mContext, str, z);
}
public void a(int i) {
if (this.f11249b != null) {
this.f11249b.setVisibility(i);
}
}
@Override
public void a(int i, String str) {
if (this.e != null) {
this.e.b();
}
String packageName = this.mContext.getPackageName();
int i2 = 4;
if (i != 2) {
if (i != 4) {
if (i != 8) {
if (i != 16) {
if (i != 32) {
if (i == 64) {
i2 = 6;
((b.a) this.mPresenter).a(packageName, this.mContext, SocializeMedia.MORESHARE);
}
i2 = 0;
} else if (((b.a) this.mPresenter).b("com.sina.weibo")) {
i2 = 5;
((b.a) this.mPresenter).a(packageName, this.mContext, SocializeMedia.SINA);
} else {
makeToast("share_sdk_not_install_wb", 0);
i2 = 0;
}
} else if (((b.a) this.mPresenter).b("com.tencent.mobileqq") || ((b.a) this.mPresenter).b("com.tencent.tim")) {
((b.a) this.mPresenter).a(packageName, this.mContext, SocializeMedia.QQ);
} else {
makeToast("share_sdk_not_install_qq", 0);
i2 = 0;
}
} else if (((b.a) this.mPresenter).b("com.tencent.mobileqq") || ((b.a) this.mPresenter).b("com.tencent.tim")) {
i2 = 3;
((b.a) this.mPresenter).a(packageName, this.mContext, SocializeMedia.QZONE);
} else {
makeToast("share_sdk_not_install_qq", 0);
i2 = 0;
}
} else if (((b.a) this.mPresenter).b("com.tencent.mm")) {
((b.a) this.mPresenter).a(packageName, this.mContext, SocializeMedia.WEIXIN);
i2 = 2;
} else {
makeToast("share_sdk_not_install_wechat", 0);
i2 = 0;
}
} else if (((b.a) this.mPresenter).b("com.tencent.mm")) {
i2 = 1;
((b.a) this.mPresenter).a(packageName, this.mContext, SocializeMedia.WEIXIN_MONMENT);
} else {
makeToast("share_sdk_not_install_wechat", 0);
i2 = 0;
}
if (i2 != 0) {
StatisticsGS.getInstance().uploadUserAction(this.mContext, 101, i2, packageName);
}
}
@Override
public void a(ShareGameBean shareGameBean, SocializeMedia socializeMedia) {
if (shareGameBean == null || shareGameBean.beanIsNull()) {
this.o.sendMessage(this.o.obtainMessage(2));
} else {
((b.a) this.mPresenter).a(socializeMedia, shareGameBean);
}
}
@Override
public void onDestroy() {
super.onDestroy();
if (this.d != null) {
unregisterReceiver(this.d);
LocalBroadcastManager.getInstance(this.mContext).unregisterReceiver(this.d);
this.d = null;
}
if (this.e != null && this.e.d()) {
this.e.b();
}
if (this.mPresenter != 0) {
((b.a) this.mPresenter).b();
}
}
private void c() {
tp.c(new Runnable() {
@Override
public void run() {
final boolean z;
Object a2 = an.a("flowView", SettingActivity.this.mContext, (Class<?>) Boolean.class);
final Boolean b2 = by.a(SettingActivity.this.mContext, "sp_total_info").b(".foreground.service.switcher", false);
if (a2 == null) {
z = true;
} else {
z = (Boolean) a2;
}
tp.i(new Runnable() {
@Override
public void run() {
if (SettingActivity.this.isFinishing()) {
return;
}
if (SettingActivity.this.f != null) {
SettingActivity.this.f.setChecked(z.booleanValue());
}
if (SettingActivity.this.g != null) {
SettingActivity.this.g.setChecked(b2.booleanValue());
}
}
});
}
});
}
private void a(Boolean bool) {
an.a("flowView", bool, this.mContext);
}
}