导航菜单

页面标题

页面副标题

SpeedCash v6.5.1482 - DetailPromoActivity.java 源代码

正在查看: SpeedCash v6.5.1482 应用的 DetailPromoActivity.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package com.bm.sc.kotlin.ui.inbox;

import android.net.http.SslError;
import android.os.Bundle;
import android.view.View;
import android.webkit.SslErrorHandler;
import android.webkit.WebResourceError;
import android.webkit.WebResourceRequest;
import android.webkit.WebResourceResponse;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.TextView;
import com.bm.sc.bebasbayar.R;
import com.bm.sc.bebasbayar.helper.Affinity;
import com.bm.sc.bebasbayar.ui.BaseActivity;
import com.bm.sc.kotlin.ui.inbox.list.InfoPromoEntity;
import com.bm.sc.util.android.JSInterface;
import kotlin.Metadata;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

@Metadata(d1 = {"\u00006\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0010\b\n\u0000\n\u0002\u0010\u000b\n\u0000\n\u0002\u0010\u000e\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0006\u0018\u00002\u00020\u0001B\u0007¢\u0006\u0004\b\u0014\u0010\u0015J\u0012\u0010\u0005\u001a\u00020\u00042\b\u0010\u0003\u001a\u0004\u0018\u00010\u0002H\u0014J\b\u0010\u0007\u001a\u00020\u0006H\u0014J\b\u0010\t\u001a\u00020\bH\u0016J\b\u0010\u000b\u001a\u00020\nH\u0014R\u0016\u0010\u000f\u001a\u00020\f8\u0002@\u0002X\u0082.¢\u0006\u0006\n\u0004\b\r\u0010\u000eR\u0016\u0010\u0013\u001a\u00020\u00108\u0002@\u0002X\u0082.¢\u0006\u0006\n\u0004\b\u0011\u0010\u0012¨\u0006\u0016"}, d2 = {"Lcom/bm/sc/kotlin/ui/inbox/DetailPromoActivity;", "Lcom/bm/sc/bebasbayar/ui/BaseActivity;", "Landroid/os/Bundle;", "savedInstanceState", "", "onCreate", "", "getLayoutResource", "", "isEligibleForFavorit", "", "getWikiNameSpace", "Landroid/widget/TextView;", "c", "Landroid/widget/TextView;", "tvLabel", "Landroid/webkit/WebView;", "d", "Landroid/webkit/WebView;", "wv_dashboard", "<init>", "()V", "app_release"}, k = 1, mv = {1, 8, 0})
@SourceDebugExtension({"SMAP\nDetailPromoActivity.kt\nKotlin\n*S Kotlin\n*F\n+ 1 DetailPromoActivity.kt\ncom/bm/sc/kotlin/ui/inbox/DetailPromoActivity\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n*L\n1#1,86:1\n1#2:87\n*E\n"})
public final class DetailPromoActivity extends BaseActivity {

    public TextView tvLabel;

    public WebView wv_dashboard;

    @Override
    public int getLayoutResource() {
        return R.layout.activity_detail_promo;
    }

    @Override
    @NotNull
    public String getWikiNameSpace() {
        String classSimpleName = getClassSimpleName();
        Intrinsics.checkNotNullExpressionValue(classSimpleName, "classSimpleName");
        return classSimpleName;
    }

    @Override
    public boolean isEligibleForFavorit() {
        return false;
    }

    @Override
    public void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        View findViewById = findViewById(R.id.tv_label);
        Intrinsics.checkNotNullExpressionValue(findViewById, "findViewById(R.id.tv_label)");
        this.tvLabel = (TextView) findViewById;
        View findViewById2 = findViewById(R.id.wv_promo);
        Intrinsics.checkNotNullExpressionValue(findViewById2, "findViewById(R.id.wv_promo)");
        this.wv_dashboard = (WebView) findViewById2;
        Bundle extras = getIntent().getExtras();
        WebView webView = null;
        InfoPromoEntity infoPromoEntity = extras != null ? (InfoPromoEntity) extras.getParcelable("info_promo_key") : null;
        WebViewClient webViewClient = new WebViewClient() {
            @Override
            public void onReceivedError(@NotNull WebView view, @NotNull WebResourceRequest request, @NotNull WebResourceError error) {
                WebView webView2;
                Intrinsics.checkNotNullParameter(view, "view");
                Intrinsics.checkNotNullParameter(request, "request");
                Intrinsics.checkNotNullParameter(error, "error");
                super.onReceivedError(view, request, error);
                webView2 = DetailPromoActivity.this.wv_dashboard;
                if (webView2 == null) {
                    Intrinsics.throwUninitializedPropertyAccessException("wv_dashboard");
                    webView2 = null;
                }
                webView2.setVisibility(8);
            }

            @Override
            public void onReceivedHttpError(@NotNull WebView view, @NotNull WebResourceRequest request, @NotNull WebResourceResponse errorResponse) {
                WebView webView2;
                Intrinsics.checkNotNullParameter(view, "view");
                Intrinsics.checkNotNullParameter(request, "request");
                Intrinsics.checkNotNullParameter(errorResponse, "errorResponse");
                super.onReceivedHttpError(view, request, errorResponse);
                if (errorResponse.getStatusCode() != 200) {
                    webView2 = DetailPromoActivity.this.wv_dashboard;
                    if (webView2 == null) {
                        Intrinsics.throwUninitializedPropertyAccessException("wv_dashboard");
                        webView2 = null;
                    }
                    webView2.setVisibility(8);
                }
            }

            @Override
            public void onReceivedSslError(@NotNull WebView view, @NotNull SslErrorHandler handler, @NotNull SslError error) {
                Intrinsics.checkNotNullParameter(view, "view");
                Intrinsics.checkNotNullParameter(handler, "handler");
                Intrinsics.checkNotNullParameter(error, "error");
                Affinity.confirmInsecureSSL(DetailPromoActivity.this, handler, error);
            }
        };
        if (infoPromoEntity != null) {
            TextView textView = this.tvLabel;
            if (textView == null) {
                Intrinsics.throwUninitializedPropertyAccessException("tvLabel");
                textView = null;
            }
            textView.setText(infoPromoEntity.getSubject());
            WebView webView2 = this.wv_dashboard;
            if (webView2 == null) {
                Intrinsics.throwUninitializedPropertyAccessException("wv_dashboard");
                webView2 = null;
            }
            webView2.addJavascriptInterface(new JSInterface.BBJSInterface(this), "AjakTeman");
            WebView webView3 = this.wv_dashboard;
            if (webView3 == null) {
                Intrinsics.throwUninitializedPropertyAccessException("wv_dashboard");
                webView3 = null;
            }
            webView3.setVisibility(0);
            WebView webView4 = this.wv_dashboard;
            if (webView4 == null) {
                Intrinsics.throwUninitializedPropertyAccessException("wv_dashboard");
                webView4 = null;
            }
            webView4.setInitialScale(1);
            WebView webView5 = this.wv_dashboard;
            if (webView5 == null) {
                Intrinsics.throwUninitializedPropertyAccessException("wv_dashboard");
                webView5 = null;
            }
            webView5.getSettings().setLoadWithOverviewMode(true);
            WebView webView6 = this.wv_dashboard;
            if (webView6 == null) {
                Intrinsics.throwUninitializedPropertyAccessException("wv_dashboard");
                webView6 = null;
            }
            webView6.getSettings().setUseWideViewPort(true);
            WebView webView7 = this.wv_dashboard;
            if (webView7 == null) {
                Intrinsics.throwUninitializedPropertyAccessException("wv_dashboard");
                webView7 = null;
            }
            webView7.getSettings().setJavaScriptEnabled(true);
            WebView webView8 = this.wv_dashboard;
            if (webView8 == null) {
                Intrinsics.throwUninitializedPropertyAccessException("wv_dashboard");
                webView8 = null;
            }
            webView8.getSettings().setDatabaseEnabled(true);
            WebView webView9 = this.wv_dashboard;
            if (webView9 == null) {
                Intrinsics.throwUninitializedPropertyAccessException("wv_dashboard");
                webView9 = null;
            }
            webView9.getSettings().setDomStorageEnabled(true);
            WebView webView10 = this.wv_dashboard;
            if (webView10 == null) {
                Intrinsics.throwUninitializedPropertyAccessException("wv_dashboard");
                webView10 = null;
            }
            webView10.getSettings().setJavaScriptCanOpenWindowsAutomatically(true);
            WebView webView11 = this.wv_dashboard;
            if (webView11 == null) {
                Intrinsics.throwUninitializedPropertyAccessException("wv_dashboard");
                webView11 = null;
            }
            webView11.getSettings().setSupportZoom(true);
            WebView webView12 = this.wv_dashboard;
            if (webView12 == null) {
                Intrinsics.throwUninitializedPropertyAccessException("wv_dashboard");
                webView12 = null;
            }
            webView12.getSettings().setBuiltInZoomControls(false);
            WebView webView13 = this.wv_dashboard;
            if (webView13 == null) {
                Intrinsics.throwUninitializedPropertyAccessException("wv_dashboard");
                webView13 = null;
            }
            webView13.getSettings().setGeolocationEnabled(true);
            WebView webView14 = this.wv_dashboard;
            if (webView14 == null) {
                Intrinsics.throwUninitializedPropertyAccessException("wv_dashboard");
                webView14 = null;
            }
            webView14.setWebViewClient(webViewClient);
            String gcm_page_url = infoPromoEntity.getGcm_page_url();
            if (gcm_page_url != null) {
                WebView webView15 = this.wv_dashboard;
                if (webView15 == null) {
                    Intrinsics.throwUninitializedPropertyAccessException("wv_dashboard");
                } else {
                    webView = webView15;
                }
                webView.loadUrl(gcm_page_url);
            }
        }
    }
}