MyRecorder v1.01.90.0219版本的 MD5 值为:c361f51174a0bf833abfa72929caf8d3

以下内容为反编译后的 OfferWallActivity.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.os.Message;
import android.webkit.JavascriptInterface;
import android.webkit.WebChromeClient;
import android.webkit.WebView;
import com.fyber.b;
import com.fyber.fairbid.g9;
import com.fyber.fairbid.h;
import com.fyber.fairbid.nk;
import com.fyber.fairbid.vm;
import com.fyber.fairbid.y5;
import java.util.Collections;
public class OfferWallActivity extends Activity {
    public WebView f19025a;
    public boolean f19026b;
    public ProgressDialog f19027c;
    public String f19028d;
    public String f19029e;
    public h f19030f;
    public Handler f19031g;

    public class a extends WebChromeClient {
        public a() {
        }

        @Override
        public final void onProgressChanged(WebView webView, int i10) {
            ProgressDialog progressDialog;
            if (i10 > 50 && (progressDialog = OfferWallActivity.this.f19027c) != null) {
                progressDialog.dismiss();
                OfferWallActivity.this.f19027c = null;
            }
            super.onProgressChanged(webView, i10);
        }
    }

    public class b implements Handler.Callback {
        public b() {
        }

        @Override
        public final boolean handleMessage(Message message) {
            int i10 = message.what;
            if (i10 != 2020) {
                if (i10 != 2023) {
                    return false;
                }
                OfferWallActivity.this.f19031g.removeMessages(2020);
            }
            OfferWallActivity.super.onBackPressed();
            return true;
        }
    }

    public void b() {
        Intent intent = getIntent();
        if (!(com.fyber.b.a().f19060d != y5.f22192d)) {
            SharedPreferences preferences = getPreferences(0);
            String string = preferences.getString("app.id.key", "");
            com.fyber.b.c(string, this).e(preferences.getString("user.id.key", "")).d(preferences.getString("security.token.key", "")).b();
            getPreferences(0).edit().clear().apply();
        }
        this.f19026b = intent.getBooleanExtra("EXTRA_SHOULD_CLOSE_ON_REDIRECT_KEY", c());
        this.f19028d = intent.getStringExtra("EXTRA_URL");
        this.f19029e = intent.getStringExtra("EXTRA_USER_SEGMENTS");
    }

    public boolean c() {
        return false;
    }

    @Override
    public void onBackPressed() {
        WebView webView = this.f19025a;
        this.f19031g.sendEmptyMessageDelayed(2020, 1000L);
        webView.evaluateJavascript(String.format("javascript:%stry{navigateBack();}catch(js){FyberSDK.shouldHandleBackButton(true);}", ""), null);
    }

    @Override
    public void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        if (!g9.b()) {
            setResult(-20);
            finish();
            return;
        }
        getWindow().requestFeature(1);
        ProgressDialog progressDialog = new ProgressDialog(this);
        this.f19027c = progressDialog;
        progressDialog.setOwnerActivity(this);
        this.f19027c.setIndeterminate(true);
        this.f19027c.setMessage(nk.a(b.a.EnumC0252a.f19050f));
        this.f19027c.show();
        b();
        WebView webView = new WebView(getApplicationContext());
        this.f19025a = webView;
        webView.setScrollBarStyle(0);
        this.f19025a.addJavascriptInterface(this, "FyberSDK");
        setContentView(this.f19025a);
        vm.b(this.f19025a);
        vm.a(this.f19025a.getSettings());
        vm.a(this.f19025a);
        h hVar = new h(this, this.f19026b);
        this.f19030f = hVar;
        this.f19025a.setWebViewClient(hVar);
        this.f19025a.setWebChromeClient(new a());
        this.f19031g = new Handler(Looper.getMainLooper(), new b());
    }

    @Override
    public void onDestroy() {
        this.f19025a.loadUrl("about:null");
        this.f19025a.destroy();
        this.f19031g.removeMessages(2020);
        this.f19031g.removeMessages(2023);
        super.onDestroy();
    }

    @Override
    public void onPause() {
        ProgressDialog progressDialog = this.f19027c;
        if (progressDialog != null) {
            progressDialog.dismiss();
            this.f19027c = null;
        }
        y5 y5Var = com.fyber.b.a().f19060d;
        getPreferences(0).edit().putString("app.id.key", y5Var.f22193a).putString("user.id.key", y5Var.f22194b).putString("security.token.key", y5Var.f22195c).apply();
        super.onPause();
    }

    @Override
    public void onResume() {
        super.onResume();
        try {
            f8.b.b("OfferWallActivity", "Offer Wall request url: " + this.f19028d);
            this.f19025a.loadUrl(this.f19028d, Collections.singletonMap("X-User-Data", this.f19029e));
        } catch (RuntimeException e10) {
            f8.b.d("OfferWallActivity", "An exception occurred when launching the Offer Wall", e10);
            this.f19030f.a(e10.getMessage());
        }
    }

    @JavascriptInterface
    public void shouldHandleBackButton(boolean z7) {
        this.f19031g.removeMessages(2020);
        if (z7) {
            this.f19031g.sendEmptyMessage(2023);
        }
    }
}