导航菜单

页面标题

页面副标题

Spermatid Pro v6.4.3 - c$1.java 源代码

正在查看: Spermatid Pro v6.4.3 应用的 c$1.java JAVA 源代码文件

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


package com.octopus.ad.internal.nativead;

import android.content.Context;
import android.graphics.Bitmap;
import android.text.TextUtils;
import android.util.Log;
import android.view.View;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.TextView;
import com.octopus.ad.Octopus;
import com.octopus.ad.internal.m;
import com.octopus.ad.internal.utilities.ImageManager;
import com.octopus.ad.internal.utilities.UrlUtil;
import com.octopus.ad.internal.utilities.ViewUtil;
import java.util.ArrayList;

public class c$1 implements Runnable {
    public final View a;
    public final float b;

    public final ImageView f1717c;

    public final ImageView f1718d;
    public final TextView e;
    public final ImageView f;
    public final TextView g;
    public final TextView h;
    public final FrameLayout i;
    public final WebView j;
    public final ImageView k;
    public final FrameLayout l;

    public final c f1719m;

    public c$1(c cVar, View view, float f, ImageView imageView, ImageView imageView2, TextView textView, ImageView imageView3, TextView textView2, TextView textView3, FrameLayout frameLayout, WebView webView, ImageView imageView4, FrameLayout frameLayout2) {
        this.f1719m = cVar;
        this.a = view;
        this.b = f;
        this.f1717c = imageView;
        this.f1718d = imageView2;
        this.e = textView;
        this.f = imageView3;
        this.g = textView2;
        this.h = textView3;
        this.i = frameLayout;
        this.j = webView;
        this.k = imageView4;
        this.l = frameLayout2;
    }

    @Override
    public void run() {
        if (c.a(this.f1719m) == null) {
            return;
        }
        if (c.b(this.f1719m) <= 0) {
            c.a(this.f1719m, this.a.getWidth());
            if (c.b(this.f1719m) <= 0) {
                c.a(this.f1719m, ViewUtil.getScreenWidth(this.a.getContext()));
                this.a.getLayoutParams().width = c.b(this.f1719m);
            }
            this.a.getLayoutParams().height = (int) (c.b(this.f1719m) / this.b);
        }
        Log.i("native_size", "adWidth:" + c.b(this.f1719m) + "  adHeight:" + this.a.getLayoutParams().height);
        int px2dip = ViewUtil.px2dip(c.a(this.f1719m).getContext(), (float) c.b(this.f1719m));
        float f = px2dip > 0 ? px2dip / 360.0f : 1.0f;
        float f2 = f <= 1.0f ? f : 1.0f;
        ArrayList arrayList = new ArrayList();
        arrayList.add(this.f1717c);
        arrayList.add(this.f1718d);
        arrayList.add(this.e);
        arrayList.add(this.f);
        arrayList.add(this.g);
        arrayList.add(this.h);
        arrayList.add(c.c(this.f1719m));
        c.a(this.f1719m, arrayList, f2);
        if (c.d(this.f1719m) != null) {
            c cVar = this.f1719m;
            c.a(cVar, ViewUtil.createComplianceView(c.a(cVar).getContext(), c.d(this.f1719m), f2, true));
            if (c.e(this.f1719m) == 3 || c.e(this.f1719m) == 4) {
                c.f(this.f1719m).post(new 1(this));
            }
        }
        if (this.f1719m.isVideo()) {
            c.g(this.f1719m).setVisibility(0);
            if (!this.f1719m.getVideoUrls().isEmpty()) {
                this.i.setBackgroundColor(-16777216);
                c.h(this.f1719m);
            }
        } else if (!TextUtils.isEmpty(c.i(this.f1719m)) || (c.j(this.f1719m) != null && c.j(this.f1719m).K())) {
            if (c.k(this.f1719m) != null) {
                c.k(this.f1719m).add(this.j);
            }
            this.k.setVisibility(8);
            this.j.setVisibility(0);
            this.j.getSettings().setAllowFileAccess(true);
            this.j.setWebViewClient(new WebViewClient() {
                @Override
                public void onPageFinished(WebView webView, String str) {
                    super.onPageFinished(webView, str);
                    c.c(c$1.this.f1719m).setVisibility(8);
                }
            });
            this.j.loadDataWithBaseURL(m.a().m(), c.j(this.f1719m).K() ? "<!DOCTYPE html><html lang='en'>  <head>    <meta charset='UTF-8'>    <meta name='viewport' content='width=device-width, initial-scale=1.0'>    <style>      html, body { width: 100%; height: 100%; margin: 0; padding: 0 }      .material-wrap        { overflow: hidden; position: relative; height: 100%; background-repeat:          no-repeat; background-position: center center; background-size: cover }          .filter-shadow { content: ''; position: absolute; z-index: 2; top: -3%;          left: -3%; right: -3%; bottom: -3%; background: inherit; filter: blur(3px)        }      .material-wrap .black-shadow { position: absolute; z-index: 3; top:        0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, .05) }      .material-wrap      .material { position: absolute; z-index: 3; top: 0; left: 0; width: 100%;        height: 100%; background-repeat: no-repeat; background-position: center        center; background-size: contain }    </style>  </head>  <body>    <div class='material-wrap' style=\"background-image: url('__IMAGE_SRC_PATH__')\">      <div class='filter-shadow'>      </div>      <div class='black-shadow'>      </div>      <div class='material' style=\"background-image: url('__IMAGE_SRC_PATH__')\">      </div>    </div>  </body></html>".replace("__IMAGE_SRC_PATH__", ImageManager.with((Context) null).load(this.f1719m.getImageUrl()).getImagePath()) : c.i(this.f1719m), "text/html", "UTF-8", null);
        } else if (!TextUtils.isEmpty(this.f1719m.getImageUrl())) {
            ImageManager.with((Context) null).getBitmap(this.f1719m.getImageUrl(), new ImageManager.BitmapLoadedListener() {
                public void onBitmapLoadFailed() {
                    if (c.l(c$1.this.f1719m) != null) {
                        c.l(c$1.this.f1719m).onAdRenderFailed(80101);
                    }
                }

                public void onBitmapLoaded(Bitmap bitmap) {
                    c$1.this.k.setImageBitmap(bitmap);
                    c.c(c$1.this.f1719m).setVisibility(8);
                }
            });
        }
        c.a(this.f1719m, this.l);
        c.a(this.f1719m, this.i);
        this.f1719m.d();
        if (c.j(this.f1719m) != null) {
            this.h.setOnClickListener(new 4(this, UrlUtil.replaceFeedBackUrl("https://www.adintl.cn/sdkFeedback.html?slotId=${SLOT_ID}&sdkVersion=${SDK_VERSION}&deviceId=${DEVICE_ID}", c.j(this.f1719m).b(), Octopus.getOaid(c.m(this.f1719m)))));
        }
    }
}