导航菜单

页面标题

页面副标题

Fancy Optimizer v4.6.3 - InternalStoreWebpageActivity.java 源代码

正在查看: Fancy Optimizer v4.6.3 应用的 InternalStoreWebpageActivity.java JAVA 源代码文件

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


package com.fyber.inneractive.sdk.activities;

import android.R;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.content.res.Configuration;
import android.graphics.drawable.ColorDrawable;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.ViewGroup;
import android.view.WindowManager;
import androidx.annotation.NonNull;
import com.fyber.inneractive.sdk.config.global.features.k;
import com.fyber.inneractive.sdk.external.InneractiveAdSpot;
import com.fyber.inneractive.sdk.external.InneractiveAdSpotManager;
import com.fyber.inneractive.sdk.flow.j;
import com.fyber.inneractive.sdk.flow.l;
import com.fyber.inneractive.sdk.ignite.j;
import com.fyber.inneractive.sdk.network.p;
import com.fyber.inneractive.sdk.util.IAlog;
import com.fyber.inneractive.sdk.util.n;
import com.fyber.inneractive.sdk.web.o;
import java.lang.ref.WeakReference;
import java.util.Locale;

public class InternalStoreWebpageActivity extends Activity {
    public static final String EXTRA_KEY_SPOT_ID = "spotId";
    public ViewGroup a;
    public o b;
    public k.a c = k.a.FullScreen;

    public static void startActivity(Context context, String str) {
        Intent intent = new Intent(context, (Class<?>) InternalStoreWebpageActivity.class);
        intent.putExtra("spotId", str);
        if (!(context instanceof Activity)) {
            intent.setFlags(268435456);
        }
        context.startActivity(intent);
    }

    public final InneractiveAdSpot a() {
        String stringExtra = getIntent().getStringExtra("spotId");
        if (!TextUtils.isEmpty(stringExtra)) {
            return InneractiveAdSpotManager.get().getSpot(stringExtra);
        }
        IAlog.e("%sSpot id is empty", IAlog.a(this));
        return null;
    }

    @Override
    public void finish() {
        super.finish();
        o oVar = this.b;
        if (oVar != null) {
            oVar.C = false;
            o.g gVar = oVar.i;
            if (gVar != null) {
                IAlog.a("onInternalStoreWebpageDismissed callback called", new Object[0]);
                ((l) gVar).E();
            }
        }
    }

    @Override
    public void onBackPressed() {
        o oVar = this.b;
        if (oVar != null) {
            boolean z10 = true;
            if (!oVar.f385x) {
                if (oVar.w) {
                    oVar.f("navigateBack();");
                } else {
                    z10 = false;
                }
            }
            if (z10) {
                return;
            }
        }
        super.onBackPressed();
    }

    @Override
    public void onConfigurationChanged(@NonNull Configuration configuration) {
        super.onConfigurationChanged(configuration);
        WindowManager.LayoutParams attributes = getWindow().getAttributes();
        if (attributes.width == n.e() || this.c != k.a.Modal) {
            return;
        }
        attributes.gravity = 83;
        attributes.height = (int) (n.d() * 0.8f);
        attributes.width = n.e();
        getWindow().setAttributes(attributes);
    }

    @Override
    public void onCreate(Bundle bundle) {
        k.a aVar;
        InneractiveAdSpot a = a();
        if (a == null || a.getAdContent() == null) {
            super.onCreate(bundle);
            finish();
            return;
        }
        k kVar = (k) a.getAdContent().c.a(k.class);
        if (kVar != null) {
            String a10 = kVar.a("presentation_mode", (String) null);
            if (a10 != null) {
                k.a[] values = k.a.values();
                int length = values.length;
                for (int i = 0; i < length; i++) {
                    aVar = values[i];
                    Locale locale = Locale.US;
                    if (a10.toLowerCase(locale).equals(aVar.a.toLowerCase(locale))) {
                        break;
                    }
                }
            }
            aVar = k.a.FullScreen;
        } else {
            aVar = k.a.FullScreen;
        }
        this.c = aVar;
        if (aVar == k.a.Modal) {
            WindowManager.LayoutParams attributes = getWindow().getAttributes();
            attributes.gravity = 83;
            attributes.height = (int) (n.d() * 0.8f);
            attributes.width = n.e();
            attributes.dimAmount = 0.3f;
            getWindow().setAttributes(attributes);
            getWindow().getDecorView().setBackgroundColor(0);
            getWindow().addFlags(514);
            getWindow().setBackgroundDrawable(new ColorDrawable(0));
        } else {
            setTheme(R.style.Theme.NoTitleBar.Fullscreen);
        }
        super.onCreate(bundle);
        setContentView(com.fyber.inneractive.sdk.R.layout.activity_internal_store_webpage);
        this.a = (ViewGroup) findViewById(com.fyber.inneractive.sdk.R.id.internal_store_content);
        o c = a.getAdContent().c();
        this.b = c;
        if (c != null) {
            c.q = new WeakReference<>(this);
            o oVar = this.b;
            j jVar = oVar.h;
            if (jVar != null) {
                ((j.a) jVar).a(p.IGNITE_FLOW_STORE_PAGE_OPENED, oVar.B ? com.fyber.inneractive.sdk.ignite.k.TRUE_SINGLE_TAP : com.fyber.inneractive.sdk.ignite.k.SINGLE_TAP);
            }
            this.b.t.set(0);
        }
    }

    @Override
    public void onDestroy() {
        o oVar;
        super.onDestroy();
        InneractiveAdSpot a = a();
        if (a == null || a.getAdContent() == null || a.getAdContent().e() || (oVar = this.b) == null) {
            return;
        }
        oVar.a();
        this.b = null;
    }

    @Override
    public void onPause() {
        super.onPause();
        ViewGroup viewGroup = this.a;
        if (viewGroup != null) {
            viewGroup.removeAllViews();
        }
    }

    @Override
    public void onResume() {
        super.onResume();
        o oVar = this.b;
        if (oVar != null) {
            this.a.addView(oVar.a, new ViewGroup.LayoutParams(-1, -1));
        }
    }
}