导航菜单

页面标题

页面副标题

CallApp v2.226 - InternalStoreWebpageActivity.java 源代码

正在查看: CallApp v2.226 应用的 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.q;
import com.fyber.inneractive.sdk.config.global.features.r;
import com.fyber.inneractive.sdk.external.InneractiveAdSpot;
import com.fyber.inneractive.sdk.external.InneractiveAdSpotManager;
import com.fyber.inneractive.sdk.flow.A;
import com.fyber.inneractive.sdk.flow.C0091v;
import com.fyber.inneractive.sdk.network.EnumC0119u;
import com.fyber.inneractive.sdk.util.AbstractC0226o;
import com.fyber.inneractive.sdk.util.IAlog;
import com.fyber.inneractive.sdk.web.U;
import com.fyber.inneractive.sdk.web.W;
import java.lang.ref.WeakReference;

public class InternalStoreWebpageActivity extends InneractiveBaseActivity {
    public static final String EXTRA_KEY_SPOT_ID = "spotId";
    public ViewGroup b;
    public W c;
    public q d = q.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);
    }

    @Override
    public void finish() {
        super.finish();
        W w = this.c;
        if (w != null) {
            w.C = false;
            U u = w.i;
            if (u != null) {
                A a = (A) u;
                IAlog.a("onInternalStoreWebpageDismissed callback called", new Object[0]);
                if (a.c != null) {
                    IAlog.a("%sCalling external interface onAdWillCloseInternalBrowser", IAlog.a(a));
                    a.c.onAdWillCloseInternalBrowser(a.a);
                }
            }
        }
    }

    @Override
    public void onBackPressed() {
        W w = this.c;
        if (w != null) {
            if (w.x) {
                return;
            }
            if (w.w) {
                w.d("navigateBack();");
                return;
            }
        }
        super.onBackPressed();
    }

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

    @Override
    public void onCreate(Bundle bundle) {
        InneractiveAdSpot spot;
        String stringExtra = getIntent().getStringExtra("spotId");
        if (TextUtils.isEmpty(stringExtra)) {
            IAlog.f("%sSpot id is empty", IAlog.a(this));
            spot = null;
        } else {
            spot = InneractiveAdSpotManager.get().getSpot(stringExtra);
        }
        if (spot == null || spot.getAdContent() == null) {
            super.onCreate(bundle);
            finish();
            return;
        }
        r rVar = (r) spot.getAdContent().c.a(r.class);
        q d = rVar != null ? rVar.d() : q.FullScreen;
        this.d = d;
        if (d == q.Modal) {
            WindowManager.LayoutParams attributes = getWindow().getAttributes();
            attributes.gravity = 83;
            attributes.height = (int) (AbstractC0226o.e() * 0.8f);
            attributes.width = AbstractC0226o.f();
            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.ia_layout_activity_internal_store_webpage);
        this.b = (ViewGroup) findViewById(com.fyber.inneractive.sdk.R.id.internal_store_content);
        W b = spot.getAdContent().b();
        this.c = b;
        if (b != null) {
            b.q = new WeakReference(this);
            W w = this.c;
            C0091v c0091v = w.h;
            if (c0091v != null) {
                c0091v.a(EnumC0119u.IGNITE_FLOW_STORE_PAGE_OPENED, w.B ? com.fyber.inneractive.sdk.ignite.m.TRUE_SINGLE_TAP : com.fyber.inneractive.sdk.ignite.m.SINGLE_TAP);
            }
            this.c.t.set(0);
        }
    }

    @Override
    public void onDestroy() {
        InneractiveAdSpot spot;
        W w;
        super.onDestroy();
        String stringExtra = getIntent().getStringExtra("spotId");
        if (TextUtils.isEmpty(stringExtra)) {
            IAlog.f("%sSpot id is empty", IAlog.a(this));
            spot = null;
        } else {
            spot = InneractiveAdSpotManager.get().getSpot(stringExtra);
        }
        if (spot == null || spot.getAdContent() == null || spot.getAdContent().d() || (w = this.c) == null) {
            return;
        }
        w.y = true;
        w.D = false;
        w.b.h.remove(w);
        w.i = null;
        IAlog.a("destroy internalStoreWebpageController", new Object[0]);
        this.c = null;
    }

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

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