正在查看: Moneyman v2.316.0.0 应用的 BotFaqDetailsActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Moneyman v2.316.0.0 应用的 BotFaqDetailsActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.freshchat.consumer.sdk.activity;
import android.content.Context;
import android.content.Intent;
import android.content.res.Configuration;
import android.net.Uri;
import android.os.Bundle;
import android.view.KeyEvent;
import android.view.View;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.webkit.WebViewClient;
import android.widget.RelativeLayout;
import android.widget.TextView;
import android.widget.Toast;
import com.freshchat.consumer.sdk.R;
import com.freshchat.consumer.sdk.activity.ds;
import com.freshchat.consumer.sdk.beans.fragment.CallbackButtonFragment;
import com.freshchat.consumer.sdk.beans.fragment.MessageFragment;
import com.freshchat.consumer.sdk.service.Status;
import java.util.List;
public class BotFaqDetailsActivity extends ct<com.freshchat.consumer.sdk.l.d> implements ds.b {
private ds ap;
private TextView av;
private TextView ay;
private View f18831n;
private boolean f18832x = false;
private final WebViewClient f18830C = new p(this);
private void M() {
b(((com.freshchat.consumer.sdk.l.d) this.eZ).kS());
}
private void N() {
Toast.makeText(this, R.string.freshchat_faq_failed_to_load, 0).show();
finish();
}
private void n() {
Animation loadAnimation = AnimationUtils.loadAnimation(this, R.anim.freshchat_slide_up);
this.f18831n.bringToFront();
this.f18831n.startAnimation(loadAnimation);
com.freshchat.consumer.sdk.b.o.c(this.f18831n);
}
private void o() {
if (com.freshchat.consumer.sdk.b.o.l(this.f18831n)) {
this.f18831n.startAnimation(AnimationUtils.loadAnimation(this, R.anim.freshchat_slide_down));
com.freshchat.consumer.sdk.b.o.d(this.f18831n);
}
}
private void p() {
if (getSupportActionBar() != null) {
getSupportActionBar().f();
}
}
private void q() {
if (getSupportActionBar() != null) {
getSupportActionBar().v();
}
}
private void r() {
this.ap.postDelayed(new r(this), 500L);
}
@Override
public String[] J() {
return new String[]{"com.freshchat.consumer.sdk.actions.BotFAQFetched"};
}
@Override
public void K() {
com.freshchat.consumer.sdk.l.d dVar = new com.freshchat.consumer.sdk.l.d(a());
this.eZ = dVar;
if (dVar.g(getIntent().getExtras())) {
((com.freshchat.consumer.sdk.l.d) this.eZ).h(getIntent());
} else {
N();
}
}
@Override
public String L() {
return ((com.freshchat.consumer.sdk.l.d) this.eZ).kT();
}
@Override
public void O() {
M();
}
@Override
public String P() {
return ((com.freshchat.consumer.sdk.l.d) this.eZ).P();
}
@Override
public View Q() {
return this.ap;
}
@Override
public void R() {
String kX = ((com.freshchat.consumer.sdk.l.d) this.eZ).kX();
if (com.freshchat.consumer.sdk.util.ds.c(kX)) {
b(Status.COMPLETE);
} else if (com.freshchat.consumer.sdk.util.ds.A(kX, "SKIP_ARTICLE_DISPLAY")) {
Uri parse = Uri.parse(((com.freshchat.consumer.sdk.l.d) this.eZ).kW());
Bundle bundle = new Bundle();
bundle.putBoolean("LAUNCHED_FROM_FAQ", true);
com.freshchat.consumer.sdk.util.ae.a(a(), parse, bundle);
finish();
} else {
this.ap.loadDataWithBaseURL(null, kX, "text/html", "utf-8", null);
f(this.ap);
}
List<MessageFragment> h3 = ((com.freshchat.consumer.sdk.l.d) this.eZ).h();
if (com.freshchat.consumer.sdk.util.w.a(h3)) {
CallbackButtonFragment callbackButtonFragment = (CallbackButtonFragment) h3.get(0);
this.av.setText(callbackButtonFragment.getLabel());
this.av.setOnClickListener(new n(this, callbackButtonFragment));
if (com.freshchat.consumer.sdk.util.w.b(h3) <= 1) {
com.freshchat.consumer.sdk.b.o.d(this.ay);
return;
}
CallbackButtonFragment callbackButtonFragment2 = (CallbackButtonFragment) h3.get(1);
this.ay.setText(callbackButtonFragment2.getLabel());
this.ay.setOnClickListener(new o(this, callbackButtonFragment2));
}
}
@Override
public String[] b() {
return new String[]{"com.freshchat.consumer.sdk.actions.TokenWaitTimeout"};
}
@Override
public void j() {
n();
}
@Override
public void k() {
o();
}
@Override
public void l() {
p();
this.f18832x = true;
this.f18831n.setVisibility(8);
}
@Override
public void m() {
q();
r();
this.f18832x = false;
}
@Override
public void onConfigurationChanged(Configuration configuration) {
super.onConfigurationChanged(configuration);
if (this.f18832x) {
return;
}
r();
}
@Override
public void onCreate(Bundle bundle) {
super.onCreate(bundle);
setContentView(R.layout.freshchat_activity_bot_faq_details);
w();
if (bundle != null) {
this.ap.restoreState(bundle);
}
((com.freshchat.consumer.sdk.l.d) this.eZ).kU();
M();
}
@Override
public void onDestroy() {
super.onDestroy();
ds dsVar = this.ap;
if (dsVar != null) {
dsVar.destroy();
}
}
@Override
public boolean onKeyDown(int i5, KeyEvent keyEvent) {
if (i5 != 4 || !this.ap.cz()) {
return super.onKeyDown(i5, keyEvent);
}
this.ap.cA();
return true;
}
@Override
public void onPause() {
super.onPause();
if (com.freshchat.consumer.sdk.util.dz.kw() && com.freshchat.consumer.sdk.util.dz.kj()) {
this.ap.onPause();
}
}
@Override
public void onResume() {
super.onResume();
if (com.freshchat.consumer.sdk.util.dz.kw() && com.freshchat.consumer.sdk.util.dz.kj()) {
this.ap.onResume();
}
}
@Override
public void onStart() {
super.onStart();
if (com.freshchat.consumer.sdk.util.dz.kr()) {
this.ap.onResume();
}
}
@Override
public void onStop() {
super.onStop();
if (com.freshchat.consumer.sdk.util.dz.kr()) {
this.ap.onPause();
}
this.ap.stopLoading();
}
@Override
public void w() {
super.w();
RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(-1, -1);
layoutParams.addRule(10, -1);
ds dsVar = new ds(this);
this.ap = dsVar;
dsVar.setVisibility(8);
this.ap.setWebViewClient(this.f18830C);
this.ap.a(this, 85);
this.f18831n = findViewById(R.id.freshchat_voting_view);
this.av = (TextView) findViewById(R.id.freshchat_upvote);
this.ay = (TextView) findViewById(R.id.freshchat_downvote);
((RelativeLayout) findViewById(R.id.freshchat_bot_faq_root_layout)).addView(this.ap.getLayout(), layoutParams);
}
@Override
public void a(Context context, Intent intent) {
if ("com.freshchat.consumer.sdk.actions.BotFAQFetched".equals(intent.getAction())) {
b(((com.freshchat.consumer.sdk.l.d) this.eZ).h(intent.getExtras()));
} else if ("android.net.conn.CONNECTIVITY_CHANGE".equals(intent.getAction())) {
b(((com.freshchat.consumer.sdk.l.d) this.eZ).kP());
}
}
public void a(CallbackButtonFragment callbackButtonFragment) {
((com.freshchat.consumer.sdk.l.d) this.eZ).c(callbackButtonFragment);
com.freshchat.consumer.sdk.b.o.a(a(), R.string.freshchat_bot_faq_feedback_success);
finish();
}
}