正在查看: FileWipe Pro v3.0.0 应用的 InneractiveFullscreenAdActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: FileWipe Pro v3.0.0 应用的 InneractiveFullscreenAdActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.fyber.inneractive.sdk.activities;
import android.R;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.os.Build;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.View;
import android.view.ViewGroup;
import androidx.core.app.NotificationCompat;
import com.fyber.inneractive.sdk.config.enums.Orientation;
import com.fyber.inneractive.sdk.config.r0;
import com.fyber.inneractive.sdk.config.t0;
import com.fyber.inneractive.sdk.external.InneractiveAdSpot;
import com.fyber.inneractive.sdk.external.InneractiveAdSpotManager;
import com.fyber.inneractive.sdk.external.InneractiveUnitController;
import com.fyber.inneractive.sdk.flow.a0;
import com.fyber.inneractive.sdk.flow.n0;
import com.fyber.inneractive.sdk.network.z;
import com.fyber.inneractive.sdk.renderers.s;
import com.fyber.inneractive.sdk.ui.CloseButtonConfiguration;
import com.fyber.inneractive.sdk.ui.CloseButtonFlowManager;
import com.fyber.inneractive.sdk.util.IAlog;
import com.fyber.inneractive.sdk.util.r;
public class InneractiveFullscreenAdActivity extends InneractiveBaseActivity implements com.fyber.inneractive.sdk.interfaces.e {
public static final String EXTRA_KEY_SPOT_ID = "spotId";
public ViewGroup f5157b;
public InneractiveAdSpot f5158c;
public com.fyber.inneractive.sdk.interfaces.f f5159d;
public CloseButtonFlowManager f5164i;
public int f5160e = 0;
public int f5161f = 0;
public int f5162g = 0;
public boolean f5163h = false;
protected final Runnable mHideNavigationBarTask = new c(this);
public interface FullScreenRendererProvider {
com.fyber.inneractive.sdk.interfaces.f getFullscreenRenderer();
}
public interface OnInneractiveFullscreenAdDestroyListener {
void onActivityDestroyed(InneractiveFullscreenAdActivity inneractiveFullscreenAdActivity);
}
public void cancelHideNavigationBarTask() {
getWindow().getDecorView().setOnSystemUiVisibilityChangeListener(null);
r.f8624b.removeCallbacks(this.mHideNavigationBarTask);
}
@Override
public void destroy() {
if (isFinishing() || this.f5157b == null) {
return;
}
finish();
}
@Override
public void disableCloseButton() {
CloseButtonFlowManager closeButtonFlowManager = this.f5164i;
closeButtonFlowManager.f8528c.setVisibility(8);
closeButtonFlowManager.f8526a.setVisibility(8);
}
@Override
public void dismissAd(boolean z3) {
this.f5163h = z3;
cancelHideNavigationBarTask();
com.fyber.inneractive.sdk.interfaces.f fVar = this.f5159d;
if (fVar != null) {
fVar.b(z3);
}
}
@Override
public View getCloseButton() {
return this.f5164i.f8530e;
}
@Override
public ViewGroup getLayout() {
return this.f5157b;
}
public void hideNavigationBar() {
View decorView = getWindow().getDecorView();
if ((decorView.getSystemUiVisibility() & 2) == 0) {
decorView.setSystemUiVisibility(2818);
}
decorView.setOnSystemUiVisibilityChangeListener(new d(this));
}
public void initWindowFeatures(com.fyber.inneractive.sdk.interfaces.f fVar) {
requestWindowFeature(1);
getWindow().addFlags(1024);
getWindow().addFlags(NotificationCompat.FLAG_HIGH_PRIORITY);
if (Build.VERSION.SDK_INT >= 28) {
getWindow().addFlags(2);
}
if (fVar != 0 && (((a0) fVar) instanceof s)) {
setTheme(R.style.Theme.NoTitleBar.Fullscreen);
requestWindowFeature(67108864);
requestWindowFeature(134217728);
requestWindowFeature(Integer.MIN_VALUE);
}
hideNavigationBar();
t0 t0Var = ((r0) this.f5158c.getAdContent().f5957d).f5469f;
if (t0Var != null) {
Orientation orientation = t0Var.f5525e;
setActivityOrientation(orientation.allowOrientationChange, orientation);
}
}
@Override
public boolean isCloseButtonDisplay() {
return this.f5164i.f8529d.getVisibility() == 0;
}
@Override
public void onBackPressed() {
com.fyber.inneractive.sdk.interfaces.f fVar = this.f5159d;
if (fVar == null || !fVar.t()) {
super.onBackPressed();
}
}
@Override
public void onConfigurationChanged(Configuration configuration) {
super.onConfigurationChanged(configuration);
com.fyber.inneractive.sdk.interfaces.f fVar = this.f5159d;
if (fVar != null) {
int i10 = configuration.orientation;
if (i10 != this.f5160e) {
this.f5160e = i10;
fVar.a();
return;
}
int i11 = this.f5161f;
int i12 = configuration.screenHeightDp;
if (i11 == i12 && this.f5162g == configuration.screenWidthDp) {
return;
}
this.f5161f = i12;
this.f5162g = configuration.screenWidthDp;
fVar.a();
}
}
@Override
public void onCreate(Bundle bundle) {
String stringExtra = getIntent().getStringExtra("spotId");
InneractiveAdSpot inneractiveAdSpot = null;
if (TextUtils.isEmpty(stringExtra)) {
IAlog.f("%sSpot id must be provided as an extra before calling createActivity with InneractiveInterstitialAdActivty", IAlog.a(this));
} else {
InneractiveAdSpot spot = InneractiveAdSpotManager.get().getSpot(stringExtra);
if (spot == null) {
IAlog.b("%sSpot id %s cannot be found in spot manager!", IAlog.a(this), stringExtra);
}
if (spot != null && spot.getAdContent() == null) {
IAlog.a("%sSpot does not have a content. Cannot start activity", IAlog.a(this));
}
if (spot != null && spot.getAdContent() != null) {
inneractiveAdSpot = spot;
}
}
this.f5158c = inneractiveAdSpot;
if (inneractiveAdSpot == null || inneractiveAdSpot.getAdContent() == null || this.f5158c.getAdContent().f5957d == null) {
super.onCreate(bundle);
finish();
return;
}
InneractiveUnitController selectedUnitController = this.f5158c.getSelectedUnitController();
if (selectedUnitController == null || !(selectedUnitController instanceof FullScreenRendererProvider)) {
IAlog.f("%sno appropriate unit controller found for full screen ad. Aborting", IAlog.a(this));
super.onCreate(bundle);
finish();
return;
}
com.fyber.inneractive.sdk.interfaces.f fullscreenRenderer = ((FullScreenRendererProvider) selectedUnitController).getFullscreenRenderer();
this.f5159d = fullscreenRenderer;
initWindowFeatures(fullscreenRenderer);
super.onCreate(bundle);
IAlog.a("%sInterstitial for spot id %s created", IAlog.a(this), this.f5158c.getLocalUniqueId());
this.f5160e = getResources().getConfiguration().orientation;
this.f5161f = getResources().getConfiguration().screenHeightDp;
this.f5162g = getResources().getConfiguration().screenWidthDp;
if (this.f5159d == null) {
IAlog.f("Interstitial Activity: Could not find an appropriate full screen ad renderer for content!", new Object[0]);
finish();
return;
}
try {
setContentView(com.fyber.inneractive.sdk.R.layout.ia_layout_fullscreen_activity);
this.f5157b = (ViewGroup) findViewById(com.fyber.inneractive.sdk.R.id.ia_ad_content);
this.f5164i = new CloseButtonFlowManager(this);
((n0) this.f5159d).initialize(this.f5158c);
try {
this.f5159d.a(this, this);
this.f5159d.b(this.f5164i);
this.f5158c.getAdContent().f5958e = true;
} catch (Resources.NotFoundException e4) {
IAlog.f("Interstitial Activity: %s", e4.getMessage());
finish();
} catch (InneractiveUnitController.AdDisplayError e6) {
IAlog.f("Interstitial Activity: %s", e6.getMessage());
finish();
}
} catch (Throwable th) {
z.a(th, this.f5158c.getAdContent().f5954a, this.f5158c.getAdContent().c());
finish();
}
}
@Override
public void onDestroy() {
ViewGroup viewGroup = this.f5157b;
if (viewGroup != null) {
viewGroup.removeAllViews();
this.f5157b = null;
}
InneractiveAdSpot inneractiveAdSpot = this.f5158c;
InneractiveUnitController selectedUnitController = inneractiveAdSpot == null ? null : inneractiveAdSpot.getSelectedUnitController();
if (selectedUnitController != null && (selectedUnitController instanceof OnInneractiveFullscreenAdDestroyListener)) {
((OnInneractiveFullscreenAdDestroyListener) selectedUnitController).onActivityDestroyed(this);
}
com.fyber.inneractive.sdk.interfaces.f fVar = this.f5159d;
if (fVar != null) {
fVar.a(this.f5164i);
this.f5159d.k();
this.f5159d.destroy();
this.f5159d = null;
}
super.onDestroy();
InneractiveAdSpot inneractiveAdSpot2 = this.f5158c;
if (inneractiveAdSpot2 != null) {
inneractiveAdSpot2.destroy();
}
}
@Override
public void onPause() {
super.onPause();
if (!isFinishing()) {
com.fyber.inneractive.sdk.interfaces.f fVar = this.f5159d;
if (fVar != null) {
fVar.r();
return;
}
return;
}
com.fyber.inneractive.sdk.interfaces.f fVar2 = this.f5159d;
if (fVar2 != null) {
fVar2.a(this.f5164i);
this.f5159d.k();
this.f5159d.destroy();
this.f5159d = null;
}
}
@Override
public void onResume() {
super.onResume();
com.fyber.inneractive.sdk.interfaces.f fVar = this.f5159d;
if (fVar != null) {
fVar.m();
}
}
@Override
public void onWindowFocusChanged(boolean z3) {
super.onWindowFocusChanged(z3);
if (!z3) {
com.fyber.inneractive.sdk.interfaces.f fVar = this.f5159d;
if (fVar != null) {
fVar.r();
return;
}
return;
}
hideNavigationBar();
com.fyber.inneractive.sdk.interfaces.f fVar2 = this.f5159d;
if (fVar2 != null) {
fVar2.m();
}
}
@Override
public void secondEndCardWasDisplayed() {
this.f5164i.f8531f = true;
}
@Override
public void setActivityOrientation(boolean z3, Orientation orientation) {
if (z3 && orientation.equals(Orientation.USER)) {
setRequestedOrientation(13);
return;
}
if (z3 && orientation.equals(Orientation.NONE)) {
setRequestedOrientation(getRequestedOrientation());
return;
}
if (orientation.equals(Orientation.LANDSCAPE)) {
setRequestedOrientation(6);
return;
}
if (orientation.equals(Orientation.PORTRAIT)) {
setRequestedOrientation(7);
return;
}
int i10 = getResources().getConfiguration().orientation;
if (i10 == 1) {
setRequestedOrientation(7);
} else if (i10 == 2) {
setRequestedOrientation(6);
}
}
@Override
public void showCloseButton(boolean z3, int i10, int i11) {
CloseButtonConfiguration closeButtonConfiguration = this.f5164i.f8532g;
closeButtonConfiguration.f8521c = z3;
closeButtonConfiguration.f8522d = i10;
closeButtonConfiguration.f8523e = i11;
closeButtonConfiguration.f8520b = true;
closeButtonConfiguration.f8519a = false;
closeButtonConfiguration.f8525g.a(closeButtonConfiguration);
}
@Override
public void showCloseCountdown() {
CloseButtonFlowManager closeButtonFlowManager = this.f5164i;
closeButtonFlowManager.f8527b.setBackgroundResource(com.fyber.inneractive.sdk.R.drawable.ia_round_overlay_bg);
CloseButtonConfiguration closeButtonConfiguration = closeButtonFlowManager.f8532g;
closeButtonConfiguration.f8519a = true;
closeButtonConfiguration.f8520b = false;
closeButtonConfiguration.f8525g.a(closeButtonConfiguration);
}
@Override
public void updateCloseCountdown(int i10) {
CloseButtonFlowManager closeButtonFlowManager = this.f5164i;
if (i10 > 0) {
closeButtonFlowManager.f8527b.setText(Integer.toString(i10));
} else {
closeButtonFlowManager.getClass();
}
}
@Override
public boolean wasDismissedByUser() {
return this.f5163h;
}
}