package e.g.a.a0.b; import android.content.Context; import android.os.Bundle; import android.util.DisplayMetrics; import android.view.Display; import android.view.View; import android.view.ViewGroup; import android.view.Window; import android.view.WindowManager; import android.widget.FrameLayout; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.RecyclerView; import com.apkpure.aegon.R; import com.apkpure.aegon.app.newcard.model.AppCardData; import com.apkpure.aegon.application.AegonApplication; import com.apkpure.aegon.application.RealApplicationLike; import com.tencent.trpcprotocol.projecta.dynamic_popup_svr.dynamic_popup_svr.nano.InstallAppsArr; import e.f.a.e.c; import e.g.a.h0.b.h; import e.g.a.i0.a1; import e.g.a.i0.p1; import e.h.a.q.g; import e.w.e.a.b.t.b.a; import java.util.LinkedHashMap; import java.util.List; import java.util.Objects; import o.s.c.j; public final class o extends a { /* renamed from: k reason: collision with root package name */ public static final /* synthetic */ int f4824k = 0; public final List<InstallAppsArr> b; public View c; public ImageView d; /* renamed from: e reason: collision with root package name */ public TextView f4825e; /* renamed from: f reason: collision with root package name */ public RecyclerView f4826f; /* renamed from: g reason: collision with root package name */ public ImageView f4827g; /* renamed from: h reason: collision with root package name */ public LinearLayoutManager f4828h; /* renamed from: i reason: collision with root package name */ public l f4829i; /* renamed from: j reason: collision with root package name */ public final String f4830j = "https://image.winudf.com/v2/user/admin/YWRtaW5fYjc1YzdiOTM0NDk1OTJjMDkzZjdkMjdjNDM2ZDVmYzAucG5nXzE2NTc2MDY4Njk2Mjk/image.png?fakeurl=1"; /* JADX INFO: super call moved to the top of the method (can break code semantics) */ public o(Context context, List<InstallAppsArr> list) { super(context, R.style.arg_RES_2131886391); j.e(context, "context"); j.e(list, "installAppCategoryArray"); this.b = list; setContentView(R.layout.arg_RES_2131493233); setOnDismissListener(g.b); } public final void a(boolean z, int i2) { ImageView imageView; int i3; if (z) { imageView = this.f4827g; if (imageView != null) { i3 = R.drawable.arg_RES_2131231569; } else { j.n("selectAllIcon"); throw null; } } else { imageView = this.f4827g; if (imageView != null) { i3 = R.drawable.arg_RES_2131231570; } else { j.n("selectAllIcon"); throw null; } } imageView.setImageResource(i3); if (i2 > 0) { TextView textView = this.f4825e; if (textView != null) { textView.setText(getContext().getString(R.string.arg_RES_2131821675) + " (" + i2 + ' ' + getContext().getString(R.string.arg_RES_2131821674) + ')'); return; } j.n("recommendAppsDownloadButton"); throw null; } TextView textView2 = this.f4825e; if (textView2 != null) { textView2.setText(R.string.arg_RES_2131821672); } else { j.n("recommendAppsDownloadButton"); throw null; } } public void onCreate(Bundle bundle) { WindowManager.LayoutParams layoutParams; WindowManager windowManager; super.onCreate(bundle); Window window = getWindow(); Display defaultDisplay = (window == null || (windowManager = window.getWindowManager()) == null) ? null : windowManager.getDefaultDisplay(); DisplayMetrics displayMetrics = new DisplayMetrics(); if (defaultDisplay != null) { defaultDisplay.getRealMetrics(displayMetrics); } int identifier = getContext().getResources().getIdentifier("status_bar_height", "dimen", "android"); int dimensionPixelSize = identifier > 0 ? getContext().getResources().getDimensionPixelSize(identifier) : p1.a(getContext(), 24.0f); Window window2 = getWindow(); if (window2 != null) { window2.addFlags(67108864); } Window window3 = getWindow(); if (window3 != null) { Window window4 = getWindow(); if (window4 == null || (layoutParams = window4.getAttributes()) == null) { layoutParams = null; } else { layoutParams.width = getContext().getResources().getDisplayMetrics().widthPixels; layoutParams.height = getContext().getResources().getDisplayMetrics().heightPixels; View findViewById = findViewById(R.id.arg_RES_2131298327); j.b(findViewById, "findViewById(id)"); LinearLayout linearLayout = (LinearLayout) findViewById; ViewGroup.LayoutParams layoutParams2 = linearLayout.getLayoutParams(); Objects.requireNonNull(layoutParams2, "null cannot be cast to non-null type android.widget.FrameLayout.LayoutParams"); FrameLayout.LayoutParams layoutParams3 = (FrameLayout.LayoutParams) layoutParams2; double d2 = (double) displayMetrics.heightPixels; Double.isNaN(d2); layoutParams3.topMargin = ((int) (d2 * 0.14d)) - dimensionPixelSize; linearLayout.setLayoutParams(layoutParams3); } window3.setAttributes(layoutParams); } Window window5 = getWindow(); if (window5 != null) { window5.setDimAmount(0.5f); } m mVar = m.f4817a; String str = m.f4822i ? "page_essential_softwares" : "wake_up_pop"; h.x(this, str, str, null); getContext(); this.f4828h = new LinearLayoutManager(1, false); this.f4829i = new l(this.b); View findViewById2 = findViewById(R.id.arg_RES_2131298327); j.b(findViewById2, "findViewById(id)"); LinkedHashMap linkedHashMap = new LinkedHashMap(); linkedHashMap.put(AppCardData.KEY_SCENE, Long.valueOf(m.f4822i ? 2144 : 2162)); h.s(findViewById2, AppCardData.KEY_SCENE, linkedHashMap, false); View findViewById3 = findViewById(R.id.arg_RES_2131298420); j.b(findViewById3, "findViewById(id)"); this.f4827g = (ImageView) findViewById3; View findViewById4 = findViewById(R.id.arg_RES_2131298219); j.b(findViewById4, "findViewById(id)"); RecyclerView recyclerView = (RecyclerView) findViewById4; this.f4826f = recyclerView; LinearLayoutManager linearLayoutManager = this.f4828h; if (linearLayoutManager != null) { recyclerView.setLayoutManager(linearLayoutManager); RecyclerView recyclerView2 = this.f4826f; if (recyclerView2 != null) { l lVar = this.f4829i; if (lVar != null) { recyclerView2.setAdapter(lVar); View findViewById5 = findViewById(R.id.arg_RES_2131298220); j.b(findViewById5, "findViewById(id)"); this.c = findViewById5; View findViewById6 = findViewById(R.id.arg_RES_2131298646); j.d(findViewById6, "findViewById(R.id.title_bg)"); ImageView imageView = (ImageView) findViewById6; this.d = imageView; ViewGroup.LayoutParams layoutParams4 = imageView.getLayoutParams(); layoutParams4.width = a1.b(getContext()); layoutParams4.height = (int) (((float) a1.b(getContext())) * 0.2222f); int i2 = AegonApplication.f1165e; Context context = RealApplicationLike.getContext(); String str2 = this.f4830j; ImageView imageView2 = this.d; if (imageView2 != null) { c.Y(context, str2, imageView2, new g()); View view = this.c; if (view != null) { h.t(view, "close_button", false); View view2 = this.c; if (view2 != null) { view2.setOnClickListener(new d(this)); View findViewById7 = findViewById(R.id.arg_RES_2131298195); j.b(findViewById7, "findViewById(id)"); TextView textView = (TextView) findViewById7; this.f4825e = textView; h.t(textView, "all_install_button", false); TextView textView2 = this.f4825e; if (textView2 != null) { textView2.setOnClickListener(new f(this)); View findViewById8 = findViewById(R.id.arg_RES_2131298421); j.b(findViewById8, "findViewById(id)"); ((LinearLayout) findViewById8).setOnClickListener(new e(this)); setCanceledOnTouchOutside(false); setOnCancelListener(h.b); a(mVar.b(), m.f4819f.size()); if (!m.f4822i) { View findViewById9 = findViewById(R.id.arg_RES_2131298222); j.b(findViewById9, "findViewById(id)"); ((TextView) findViewById9).setText(getContext().getText(R.string.arg_RES_2131821677)); return; } return; } j.n("recommendAppsDownloadButton"); throw null; } j.n("closeIcon"); throw null; } j.n("closeIcon"); throw null; } j.n("titleImage"); throw null; } j.n("adapter"); throw null; } j.n("listRecycleView"); throw null; } j.n("layoutManager"); throw null; } }