- Added realracing3-community.apk (71.57 MB) - Removed 32-bit support (armeabi-v7a) - Only includes arm64-v8a libraries - Decompiled source code included - Added README-community.md with analysis
116 lines
4.2 KiB
Java
116 lines
4.2 KiB
Java
package com.vungle.ads;
|
|
|
|
import android.content.Context;
|
|
import android.util.AttributeSet;
|
|
import android.view.ViewGroup;
|
|
import android.view.ViewParent;
|
|
import android.widget.FrameLayout;
|
|
import android.widget.ImageView;
|
|
import com.vungle.ads.NativeAd;
|
|
import com.vungle.ads.internal.util.ViewUtility;
|
|
import kotlin.jvm.internal.DefaultConstructorMarker;
|
|
import kotlin.jvm.internal.Intrinsics;
|
|
|
|
/* loaded from: classes4.dex */
|
|
public final class NativeAdOptionsView extends FrameLayout {
|
|
private static final int AD_OPTIONS_VIEW_SIZE = 20;
|
|
public static final Companion Companion = new Companion(null);
|
|
private ImageView icon;
|
|
|
|
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
|
public NativeAdOptionsView(Context context) {
|
|
super(context);
|
|
Intrinsics.checkNotNullParameter(context, "context");
|
|
initView(context);
|
|
}
|
|
|
|
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
|
public NativeAdOptionsView(Context context, AttributeSet attributeSet) {
|
|
super(context, attributeSet);
|
|
Intrinsics.checkNotNullParameter(context, "context");
|
|
initView(context);
|
|
}
|
|
|
|
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
|
public NativeAdOptionsView(Context context, AttributeSet attributeSet, int i) {
|
|
super(context, attributeSet, i);
|
|
Intrinsics.checkNotNullParameter(context, "context");
|
|
initView(context);
|
|
}
|
|
|
|
private final void initView(Context context) {
|
|
this.icon = new ImageView(context);
|
|
int dpToPixels = ViewUtility.INSTANCE.dpToPixels(context, 20);
|
|
FrameLayout.LayoutParams layoutParams = new FrameLayout.LayoutParams(dpToPixels, dpToPixels);
|
|
ImageView imageView = this.icon;
|
|
ImageView imageView2 = null;
|
|
if (imageView == null) {
|
|
Intrinsics.throwUninitializedPropertyAccessException("icon");
|
|
imageView = null;
|
|
}
|
|
imageView.setLayoutParams(layoutParams);
|
|
ImageView imageView3 = this.icon;
|
|
if (imageView3 == null) {
|
|
Intrinsics.throwUninitializedPropertyAccessException("icon");
|
|
} else {
|
|
imageView2 = imageView3;
|
|
}
|
|
addView(imageView2);
|
|
}
|
|
|
|
public final ImageView getPrivacyIcon$vungle_ads_release() {
|
|
ImageView imageView = this.icon;
|
|
if (imageView != null) {
|
|
return imageView;
|
|
}
|
|
Intrinsics.throwUninitializedPropertyAccessException("icon");
|
|
return null;
|
|
}
|
|
|
|
public final void renderTo(FrameLayout rootView, @NativeAd.AdOptionsPosition int i) {
|
|
Intrinsics.checkNotNullParameter(rootView, "rootView");
|
|
if (getParent() != null) {
|
|
ViewParent parent = getParent();
|
|
Intrinsics.checkNotNull(parent, "null cannot be cast to non-null type android.view.ViewGroup");
|
|
((ViewGroup) parent).removeView(this);
|
|
}
|
|
rootView.addView(this);
|
|
ViewUtility viewUtility = ViewUtility.INSTANCE;
|
|
Context context = getContext();
|
|
Intrinsics.checkNotNullExpressionValue(context, "context");
|
|
int dpToPixels = viewUtility.dpToPixels(context, 20);
|
|
FrameLayout.LayoutParams layoutParams = new FrameLayout.LayoutParams(dpToPixels, dpToPixels);
|
|
if (i == 0) {
|
|
layoutParams.gravity = 8388659;
|
|
} else if (i == 1) {
|
|
layoutParams.gravity = 8388661;
|
|
} else if (i == 2) {
|
|
layoutParams.gravity = 8388691;
|
|
} else if (i != 3) {
|
|
layoutParams.gravity = 8388661;
|
|
} else {
|
|
layoutParams.gravity = 8388693;
|
|
}
|
|
setLayoutParams(layoutParams);
|
|
rootView.requestLayout();
|
|
}
|
|
|
|
public final void destroy() {
|
|
removeAllViews();
|
|
if (getParent() != null) {
|
|
ViewParent parent = getParent();
|
|
Intrinsics.checkNotNull(parent, "null cannot be cast to non-null type android.view.ViewGroup");
|
|
((ViewGroup) parent).removeView(this);
|
|
}
|
|
}
|
|
|
|
public static final class Companion {
|
|
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
|
|
this();
|
|
}
|
|
|
|
private Companion() {
|
|
}
|
|
}
|
|
}
|