正在查看: CallApp v2.226 应用的 OfferWallActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: CallApp v2.226 应用的 OfferWallActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.fyber.ads.ofw;
import android.app.Activity;
import android.app.ProgressDialog;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.webkit.JavascriptInterface;
import android.webkit.WebView;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fyber.b;
import com.fyber.c;
import com.fyber.fairbid.cd;
import com.fyber.fairbid.d8;
import com.fyber.fairbid.e8;
import com.fyber.fairbid.gm;
import com.fyber.fairbid.hm;
import com.fyber.fairbid.j;
import com.fyber.fairbid.ut;
import com.fyber.fairbid.yw;
public class OfferWallActivity extends Activity {
public WebView a;
public boolean b;
public ProgressDialog c;
public String d;
public j e;
public Handler f;
@Override
public final void onBackPressed() {
WebView webView = this.a;
this.f.sendEmptyMessageDelayed(2020, 1000L);
webView.evaluateJavascript("javascript:try{navigateBack();}catch(js){FyberSDK.shouldHandleBackButton(true);}", null);
}
@Override
public final void onCreate(Bundle bundle) {
super.onCreate(bundle);
if (!cd.b()) {
setResult(-20);
finish();
return;
}
getWindow().requestFeature(1);
ProgressDialog progressDialog = new ProgressDialog(this);
this.c = progressDialog;
progressDialog.setOwnerActivity(this);
this.c.setIndeterminate(true);
this.c.setMessage(ut.a(b.a.EnumC0011a.LOADING_OFFERWALL));
this.c.show();
Intent intent = getIntent();
if (b.a().d == e8.d) {
SharedPreferences preferences = getPreferences(0);
String string = preferences.getString("app.id.key", JsonProperty.USE_DEFAULT_NAME);
String string2 = preferences.getString("user.id.key", JsonProperty.USE_DEFAULT_NAME);
String string3 = preferences.getString("security.token.key", JsonProperty.USE_DEFAULT_NAME);
b c = b.c(string, this);
boolean z = c.c.get();
c cVar = c.b;
if (!z && cg.c.a(string2)) {
cVar.e.b = string2;
}
if (!c.c.get()) {
d8 d8Var = cVar.e;
d8Var.getClass();
d8Var.c = string3 != null ? string3.trim() : null;
}
c.b();
getPreferences(0).edit().clear().apply();
}
this.b = intent.getBooleanExtra("EXTRA_SHOULD_CLOSE_ON_REDIRECT_KEY", false);
this.d = intent.getStringExtra("EXTRA_URL");
WebView webView = new WebView(getApplicationContext());
this.a = webView;
webView.setScrollBarStyle(0);
this.a.addJavascriptInterface(this, "FyberSDK");
setContentView(this.a);
yw.b(this.a);
yw.a(this.a.getSettings());
yw.a(this.a);
j jVar = new j(this, this.b);
this.e = jVar;
this.a.setWebViewClient(jVar);
this.a.setWebChromeClient(new gm(this));
this.f = new Handler(Looper.getMainLooper(), new hm(this));
}
@Override
public final void onDestroy() {
this.a.loadUrl("about:null");
this.a.destroy();
this.f.removeMessages(2020);
this.f.removeMessages(2023);
super.onDestroy();
}
@Override
public final void onPause() {
ProgressDialog progressDialog = this.c;
if (progressDialog != null) {
progressDialog.dismiss();
this.c = null;
}
e8 e8Var = b.a().d;
getPreferences(0).edit().putString("app.id.key", e8Var.a).putString("user.id.key", e8Var.b).putString("security.token.key", e8Var.c).apply();
super.onPause();
}
@Override
public final void onResume() {
super.onResume();
try {
cg.b.b("OfferWallActivity", "Offer Wall request url: " + this.d);
this.a.loadUrl(this.d);
} catch (RuntimeException e) {
cg.b.d("OfferWallActivity", "An exception occurred when launching the Offer Wall", e);
this.e.a(e.getMessage());
}
}
@JavascriptInterface
public void shouldHandleBackButton(boolean z) {
this.f.removeMessages(2020);
if (z) {
this.f.sendEmptyMessage(2023);
}
}
}