正在查看: MedEd v5.3.6 应用的 NeetPgPlayerActionFragment.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: MedEd v5.3.6 应用的 NeetPgPlayerActionFragment.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.penpencil.physicswallah.feature.player.ui.actions;
import android.content.Context;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import androidx.databinding.DataBinderMapperImpl;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.lifecycle.H;
import androidx.lifecycle.I;
import androidx.paging.L;
import com.google.gson.Gson;
import com.penpencil.network.localfile.database.entity.DownloadEntity;
import com.penpencil.network.response.BatchTopicContentData;
import com.penpencil.network.response.BatchTopicContentResponse;
import com.penpencil.network.response.GetVideoStatsData;
import com.penpencil.network.response.GetVideoStatsResponse;
import com.penpencil.physicswallah.feature.player.ui.actions.NeetPgPlayerActionFragment;
import com.penpencil.physicswallah.feature.player.ui.actions.NeetPgPlayerActionFragment.i;
import com.penpencil.physicswallah.feature.player.ui.models.VideoDownloadModal;
import com.penpencil.player.manager.offline.DRMVideoDownloadService;
import defpackage.AbstractC0304dR0;
import defpackage.C0373fS1;
import defpackage.C0544kS1;
import defpackage.C0578lS1;
import defpackage.C0614mS1;
import defpackage.C0644nN1;
import defpackage.C0650nS1;
import defpackage.C0683oS1;
import defpackage.C0714pS1;
import defpackage.C0750qS1;
import defpackage.C0777rS1;
import defpackage.C0801sS1;
import defpackage.C0829tS1;
import defpackage.C0858uS1;
import defpackage.C0895vS1;
import defpackage.C0976xS1;
import defpackage.OM1;
import defpackage.bf2;
import defpackage.kT1;
import defpackage.p02;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import kotlin.Metadata;
import kotlin.Unit;
import kotlin.coroutines.CoroutineContext;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.internal.Intrinsics;
@Metadata
public final class NeetPgPlayerActionFragment extends AbstractC0304dR0<nC0> {
public static final int y = 0;
public jV1 r;
public kT1 s;
public C0644nN1 t;
public hI u;
public Boolean v;
public final H w;
public final H x;
public class a extends RE0 implements Function1<LayoutInflater, nC0> {
public static final a i = new a();
public a() {
super(1, nC0.class, "inflate", "inflate(Landroid/view/LayoutInflater;)Lcom/penpencil/physicswallah/databinding/FragmentNeetPgPlayerActionBinding;", 0);
}
public final Object invoke(Object obj) {
LayoutInflater layoutInflater = (LayoutInflater) obj;
Intrinsics.checkNotNullParameter(layoutInflater, "p0");
int i2 = nC0.P;
DataBinderMapperImpl dataBinderMapperImpl = a00.a;
return Hs3.p(layoutInflater, 2131558731, (ViewGroup) null, (Object) null);
}
}
public static final class b implements b02, OE0 {
public final Function1 a;
public b(r rVar) {
Intrinsics.checkNotNullParameter(rVar, "function");
this.a = rVar;
}
public final void a(Object obj) {
this.a.invoke(obj);
}
public final FE0<?> b() {
return this.a;
}
public final boolean equals(Object obj) {
if ((obj instanceof b02) && (obj instanceof OE0)) {
return Intrinsics.b(b(), ((OE0) obj).b());
}
return false;
}
public final int hashCode() {
return b().hashCode();
}
}
public static final class c extends Ob1 implements Function0<Qt3> {
public final Fragment a;
public c(Fragment fragment) {
super(0);
this.a = fragment;
}
public final Object invoke() {
return this.a.requireActivity().getViewModelStore();
}
}
public static final class d extends Ob1 implements Function0<SW> {
public final Fragment a;
public d(Fragment fragment) {
super(0);
this.a = fragment;
}
public final Object invoke() {
return this.a.requireActivity().getDefaultViewModelCreationExtras();
}
}
public static final class e extends Ob1 implements Function0<I.c> {
public final Fragment a;
public e(Fragment fragment) {
super(0);
this.a = fragment;
}
public final Object invoke() {
return this.a.requireActivity().getDefaultViewModelProviderFactory();
}
}
public static final class f extends Ob1 implements Function0<Qt3> {
public final Fragment a;
public f(Fragment fragment) {
super(0);
this.a = fragment;
}
public final Object invoke() {
return this.a.requireActivity().getViewModelStore();
}
}
public static final class g extends Ob1 implements Function0<SW> {
public final Fragment a;
public g(Fragment fragment) {
super(0);
this.a = fragment;
}
public final Object invoke() {
return this.a.requireActivity().getDefaultViewModelCreationExtras();
}
}
public static final class h extends Ob1 implements Function0<I.c> {
public final Fragment a;
public h(Fragment fragment) {
super(0);
this.a = fragment;
}
public final Object invoke() {
return this.a.requireActivity().getDefaultViewModelProviderFactory();
}
}
@A30(c = "com.penpencil.physicswallah.feature.player.ui.actions.NeetPgPlayerActionFragment$videoDownloadStarted$1$1", f = "NeetPgPlayerActionFragment.kt", l = {618}, m = "invokeSuspend")
public static final class i extends KZ2 implements Function2<jV, iT<? super Unit>, Object> {
public int b;
public final DownloadEntity d;
public final VideoDownloadModal e;
public i(DownloadEntity downloadEntity, VideoDownloadModal videoDownloadModal, iT<? super i> iTVar) {
super(2, iTVar);
this.d = downloadEntity;
this.e = videoDownloadModal;
}
public final iT<Unit> create(Object obj, iT<?> iTVar) {
return NeetPgPlayerActionFragment.this.new i(this.d, this.e, iTVar);
}
public final Object invokeSuspend(Object obj) {
kV kVVar = kV.a;
int i = this.b;
if (i == 0) {
Oz2.b(obj);
this.b = 1;
if (V70.b(100L, this) == kVVar) {
return kVVar;
}
} else {
if (i != 1) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
Oz2.b(obj);
}
int i2 = NeetPgPlayerActionFragment.y;
NeetPgPlayerActionFragment neetPgPlayerActionFragment = NeetPgPlayerActionFragment.this;
bf2 m1 = neetPgPlayerActionFragment.m1();
jV1 jv1 = neetPgPlayerActionFragment.r;
if (jv1 == null) {
Intrinsics.n("networkManager");
throw null;
}
String A = jv1.c().A();
Intrinsics.checkNotNullExpressionValue(A, "getUserId(...)");
m1.l0 = Cp3.b(this.d, A, true);
neetPgPlayerActionFragment.m1().getClass();
bf2 m12 = neetPgPlayerActionFragment.m1();
VideoDownloadModal videoDownloadModal = this.e;
m12.E(videoDownloadModal);
if (videoDownloadModal.isNonZipDownload()) {
DRMVideoDownloadService.a aVar = DRMVideoDownloadService.m;
Context requireContext = neetPgPlayerActionFragment.requireContext();
Intrinsics.checkNotNullExpressionValue(requireContext, "requireContext(...)");
md0 b = aVar.b(requireContext);
if (b != null) {
b.e.add(neetPgPlayerActionFragment);
}
} else {
rt0 rt0Var = rt0.y;
a.a().n(neetPgPlayerActionFragment.m1().t().getVideoId(), neetPgPlayerActionFragment);
}
return Unit.a;
}
public final Object u(Object obj, Object obj2) {
return create((jV) obj, (iT) obj2).invokeSuspend(Unit.a);
}
}
public NeetPgPlayerActionFragment() {
super(a.i);
this.w = new H(wv2.a(yI1.class), new c(this), new e(this), new d(this));
this.x = new H(wv2.a(CN1.class), new f(this), new h(this), new g(this));
}
public static final void p1(NeetPgPlayerActionFragment neetPgPlayerActionFragment, It3 it3) {
if (neetPgPlayerActionFragment.isAdded()) {
FragmentManager childFragmentManager = neetPgPlayerActionFragment.getChildFragmentManager();
childFragmentManager.getClass();
androidx.fragment.app.a aVar = new androidx.fragment.app.a(childFragmentManager);
aVar.g(2131362872, it3, (String) null);
aVar.j(true);
}
}
public final void T0(VideoDownloadModal videoDownloadModal) {
Intrinsics.checkNotNullParameter(videoDownloadModal, "videoDownloadModal");
m1().l0 = null;
m1().getClass();
if (videoDownloadModal.isNonZipDownload()) {
DRMVideoDownloadService.a aVar = DRMVideoDownloadService.m;
Context requireContext = requireContext();
Intrinsics.checkNotNullExpressionValue(requireContext, "requireContext(...)");
md0 b2 = aVar.b(requireContext);
if (b2 != null) {
b2.c(this);
}
} else {
rt0 rt0Var = rt0.y;
a.a().E(m1().t().getVideoId(), this);
}
m1().E(videoDownloadModal);
}
public final void X0(VideoDownloadModal videoDownloadModal) {
Intrinsics.checkNotNullParameter(videoDownloadModal, "videoDownloadModal");
m1().E(videoDownloadModal);
}
public final void Z(final VideoDownloadModal videoDownloadModal) {
Intrinsics.checkNotNullParameter(videoDownloadModal, "videoDownloadModal");
lH1 e2 = l1().e(m1().t().getVideoId(), getViewLifecycleOwner());
Th1 viewLifecycleOwner = getViewLifecycleOwner();
Intrinsics.checkNotNullExpressionValue(viewLifecycleOwner, "getViewLifecycleOwner(...)");
final int i2 = 1;
HA3.n(e2, viewLifecycleOwner, new b02() {
public final void a(Object obj) {
int i3 = i2;
Object obj2 = videoDownloadModal;
Object obj3 = this;
switch (i3) {
case 0:
final Rs rs = (Rs) obj3;
final L.b bVar = (L.b) obj2;
BatchTopicContentResponse batchTopicContentResponse = (BatchTopicContentResponse) obj;
UP2 up2 = rs.j;
if (batchTopicContentResponse != null) {
if (!batchTopicContentResponse.getSuccess()) {
up2.a();
break;
} else {
if (rs.k == null) {
rs.k = new C0812sz("");
}
rs.k.d(Long.valueOf(System.currentTimeMillis()));
if (!batchTopicContentResponse.getData().isEmpty()) {
rs.k.c(new Gson().l(batchTopicContentResponse));
}
jV1 jv1 = rs.i;
jv1.c().H("https://meded-api.penpencil.coep_programId_batch_topic_content_" + rs.d + "_" + rs.e + "_" + rs.c + "_" + rs.f + "_" + rs.g, new Gson().l(rs.k));
boolean isEmpty = TextUtils.isEmpty(rs.k.a());
HashMap<Integer, List<BatchTopicContentData>> hashMap = rs.l;
if (!isEmpty) {
hashMap.put(rs.c, ((BatchTopicContentResponse) new Gson().d(BatchTopicContentResponse.class, rs.k.a())).getData());
}
if (hashMap.get(rs.c) == null) {
hashMap.put(rs.c, new ArrayList());
}
ArrayList arrayList = new ArrayList();
Iterator<BatchTopicContentData> it = hashMap.get(rs.c).iterator();
while (it.hasNext()) {
arrayList.add(it.next().get_id());
}
if (!arrayList.isEmpty()) {
Lp3 f2 = jv1.f();
jv1.c().A();
f2.b(arrayList).f(rs.h, new b02() {
public final void a(Object obj4) {
GetVideoStatsResponse getVideoStatsResponse = (GetVideoStatsResponse) obj4;
Rs rs2 = Rs.this;
rs2.j.a();
HashMap<Integer, List<BatchTopicContentData>> hashMap2 = rs2.l;
L.b bVar2 = bVar;
if (getVideoStatsResponse == null) {
bVar2.a(hashMap2.get(rs2.c), rs2.h(rs2.c.intValue(), hashMap2.get(rs2.c)));
return;
}
if (!getVideoStatsResponse.getSuccess()) {
bVar2.a(hashMap2.get(rs2.c), rs2.h(rs2.c.intValue(), hashMap2.get(rs2.c)));
return;
}
if (getVideoStatsResponse.getData().isEmpty()) {
bVar2.a(hashMap2.get(rs2.c), rs2.h(rs2.c.intValue(), hashMap2.get(rs2.c)));
return;
}
List<BatchTopicContentData> list = hashMap2.get(rs2.c);
for (int i4 = 0; i4 < list.size(); i4++) {
String str = list.get(i4).get_id();
Iterator it2 = getVideoStatsResponse.getData().iterator();
while (true) {
if (it2.hasNext()) {
GetVideoStatsData getVideoStatsData = (GetVideoStatsData) it2.next();
if (getVideoStatsData.getTypeId().equals(str)) {
list.get(i4).setVideoStats(getVideoStatsData);
break;
}
list.get(i4).setVideoStats((GetVideoStatsData) null);
}
}
}
hashMap2.put(rs2.c, list);
bVar2.a(hashMap2.get(rs2.c), rs2.h(rs2.c.intValue(), hashMap2.get(rs2.c)));
}
});
break;
} else {
bVar.a(hashMap.get(rs.c), rs.h(rs.c.intValue(), hashMap.get(rs.c)));
break;
}
}
} else {
up2.a();
break;
}
default:
NeetPgPlayerActionFragment neetPgPlayerActionFragment = (NeetPgPlayerActionFragment) obj3;
VideoDownloadModal videoDownloadModal2 = (VideoDownloadModal) obj2;
DownloadEntity downloadEntity = (DownloadEntity) obj;
int i4 = NeetPgPlayerActionFragment.y;
Intrinsics.checkNotNullParameter(neetPgPlayerActionFragment, "this$0");
Intrinsics.checkNotNullParameter(videoDownloadModal2, "$videoDownloadModal");
Gh1 e1 = neetPgPlayerActionFragment.e1();
if (e1 != null) {
Lx.q(e1, (CoroutineContext) null, (mV) null, neetPgPlayerActionFragment.new i(downloadEntity, videoDownloadModal2, null), 3);
break;
}
break;
}
}
});
}
public final void i1(Ur3 ur3) {
nC0 nc0 = (nC0) ur3;
Intrinsics.checkNotNullParameter(nc0, "<this>");
nc0.x(getViewLifecycleOwner());
nc0.G(m1());
nc0.A(this);
nc0.E(Boolean.TRUE);
Boolean bool = Boolean.FALSE;
nc0.B(bool);
nc0.D(bool);
nc0.F(bool);
}
public final void k1(Ur3 ur3) {
final nC0 nc0 = (nC0) ur3;
Intrinsics.checkNotNullParameter(nc0, "<this>");
nc0.s.setOnClickListener(new Fq3(nc0, 2, this));
nc0.u.setOnClickListener(new OM1(nc0, 3, this));
nc0.t.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
int i2 = NeetPgPlayerActionFragment.y;
nC0 nc02 = nc0;
Intrinsics.checkNotNullParameter(nc02, "$this_handleTab");
NeetPgPlayerActionFragment neetPgPlayerActionFragment = this;
Intrinsics.checkNotNullParameter(neetPgPlayerActionFragment, "this$0");
Boolean bool = Boolean.FALSE;
nc02.B(bool);
nc02.E(bool);
nc02.D(Boolean.TRUE);
nc02.F(bool);
Gh1 e1 = neetPgPlayerActionFragment.e1();
if (e1 != null) {
Lx.q(e1, (CoroutineContext) null, (mV) null, new hS1(neetPgPlayerActionFragment, null), 3);
}
}
});
nc0.v.setOnClickListener(new Tq3(nc0, 1, this));
nc0.w.setOnClickListener(new p02(this, 2));
Gh1 e1 = e1();
if (e1 != null) {
Lx.q(e1, (CoroutineContext) null, (mV) null, new C0373fS1(this, null), 3);
}
Gh1 e12 = e1();
if (e12 != null) {
Lx.q(e12, (CoroutineContext) null, (mV) null, new com.penpencil.physicswallah.feature.player.ui.actions.a(this, null), 3);
}
Gh1 e13 = e1();
if (e13 != null) {
Lx.q(e13, (CoroutineContext) null, (mV) null, new com.penpencil.physicswallah.feature.player.ui.actions.b(this, null), 3);
}
Lx.q(HA3.k(this), (CoroutineContext) null, (mV) null, new C0714pS1(this, null), 3);
Lx.q(HA3.k(this), (CoroutineContext) null, (mV) null, new C0750qS1(this, nc0, null), 3);
Gh1 e14 = e1();
if (e14 != null) {
Lx.q(e14, (CoroutineContext) null, (mV) null, new C0777rS1(this, nc0, null), 3);
}
Gh1 e15 = e1();
if (e15 != null) {
Lx.q(e15, (CoroutineContext) null, (mV) null, new C0801sS1(this, null), 3);
}
Gh1 e16 = e1();
if (e16 != null) {
Lx.q(e16, (CoroutineContext) null, (mV) null, new C0829tS1(this, null), 3);
}
Gh1 e17 = e1();
if (e17 != null) {
Lx.q(e17, (CoroutineContext) null, (mV) null, new C0858uS1(this, null), 3);
}
Gh1 e18 = e1();
if (e18 != null) {
Lx.q(e18, (CoroutineContext) null, (mV) null, new C0895vS1(this, null), 3);
}
Gh1 e19 = e1();
if (e19 != null) {
Lx.q(e19, (CoroutineContext) null, (mV) null, new C0544kS1(this, nc0, null), 3);
}
Gh1 e110 = e1();
if (e110 != null) {
Lx.q(e110, (CoroutineContext) null, (mV) null, new C0578lS1(this, nc0, null), 3);
}
Gh1 e111 = e1();
if (e111 != null) {
Lx.q(e111, (CoroutineContext) null, (mV) null, new C0614mS1(this, null), 3);
}
Gh1 e112 = e1();
if (e112 != null) {
Lx.q(e112, yb0.c, (mV) null, new C0976xS1(this, null), 2);
}
Gh1 e113 = e1();
if (e113 != null) {
Lx.q(e113, (CoroutineContext) null, (mV) null, new C0650nS1(this, nc0, null), 3);
}
Gh1 e114 = e1();
if (e114 != null) {
Lx.q(e114, (CoroutineContext) null, (mV) null, new C0683oS1(this, null), 3);
}
this.x.b().L.f(getViewLifecycleOwner(), new b(new r(this, 4)));
}
public final void onDestroyView() {
super.onDestroyView();
sd0 sd0Var = m1().l0;
if (sd0Var != null) {
if (Intrinsics.b(sd0Var.n, Boolean.FALSE)) {
rt0 rt0Var = rt0.y;
a.a().E(m1().t().getVideoId(), this);
return;
}
}
DRMVideoDownloadService.a aVar = DRMVideoDownloadService.m;
Context requireContext = requireContext();
Intrinsics.checkNotNullExpressionValue(requireContext, "requireContext(...)");
md0 b2 = aVar.b(requireContext);
if (b2 != null) {
b2.c(this);
}
}
public final void onStart() {
super/*androidx.fragment.app.Fragment*/.onStart();
sd0 sd0Var = m1().l0;
if ((sd0Var != null ? sd0Var.h() : null) == b.b) {
sd0 sd0Var2 = m1().l0;
if (sd0Var2 != null) {
if (Intrinsics.b(sd0Var2.n, Boolean.FALSE)) {
rt0 rt0Var = rt0.y;
a.a().n(m1().t().getVideoId(), this);
return;
}
}
DRMVideoDownloadService.a aVar = DRMVideoDownloadService.m;
Context requireContext = requireContext();
Intrinsics.checkNotNullExpressionValue(requireContext, "requireContext(...)");
md0 b2 = aVar.b(requireContext);
if (b2 != null) {
b2.e.add(this);
}
n1();
}
}
public final kT1 q1() {
kT1 kt1 = this.s;
if (kt1 != null) {
return kt1;
}
Intrinsics.n("neetVideoEvents");
throw null;
}
}