Brazzers Premium v2.1.5版本的 MD5 值为:822198ebc1561433ac78052c8b72a0ea
以下内容为反编译后的 MovieCastPlayer.java 源代码,内容仅作参考
package com.xhubapp.brazzers.aio.activity;
import android.app.Application;
import android.content.BroadcastReceiver;
import android.content.Intent;
import android.content.IntentFilter;
import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.os.Parcel;
import android.os.PowerManager;
import android.os.RemoteException;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.view.accessibility.CaptioningManager;
import androidx.appcompat.widget.AppCompatSeekBar;
import androidx.constraintlayout.widget.Barrier;
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.constraintlayout.widget.Guideline;
import androidx.core.app.ActivityCompat;
import androidx.mediarouter.app.MediaRouteActionProvider;
import androidx.mediarouter.app.s;
import com.davemorrissey.labs.subscaleview.BuildConfig;
import com.google.android.gms.cast.CastDevice;
import com.google.android.gms.cast.MediaInfo;
import com.google.android.gms.cast.MediaTrack;
import com.google.android.material.appbar.MaterialToolbar;
import com.google.android.material.imageview.ShapeableImageView;
import com.google.android.material.progressindicator.CircularProgressIndicator;
import com.google.android.material.textview.MaterialTextView;
import com.google.gson.Gson;
import com.unity3d.ads.R;
import com.xhubapp.brazzers.aio.activity.MovieCastPlayer;
import com.xhubapp.brazzers.aio.modal.player.DefaultTextTrackStyle;
import com.xhubapp.brazzers.aio.modal.player.Movies;
import com.xhubapp.brazzers.aio.modal.player.SubtitleURL;
import com.xhubapp.brazzers.aio.services.StreamServices;
import com.xhubapp.brazzers.aio.utility.VerticalSlider;
import com.xhubapp.brazzers.aio.utility.f0;
import com.xhubapp.brazzers.aio.utility.r;
import d.e;
import e.e0;
import ginom.alfa.lib.scan.ffqmfarpotlmmtkcnrkzsqiwt19;
import h7.k;
import h7.l3;
import h7.m;
import h7.m2;
import j6.g;
import j6.n;
import j6.t;
import j6.v;
import j6.w;
import java.io.File;
import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Locale;
import java.util.Objects;
import k6.b0;
import l4.i;
import pb.d0;
import pb.u;
import ra.g0;
import ra.h0;
import ra.i0;
import ra.j;
import ra.j0;
import ra.k0;
import ra.l0;
import ra.m0;
import s6.l;
import s6.o;
import ta.h;
import ua.f;
public final class MovieCastPlayer extends j {
public static final int f3132i0 = 0;
public MediaRouteActionProvider O;
public n6.b P;
public f Q;
public i R;
public Movies S;
public h T;
public long U;
public String V = BuildConfig.FLAVOR;
public boolean W;
public e0 X;
public File Y;
public String Z;
public pa.a f3133a0;
public b4.j f3134b0;
public g f3135c0;
public boolean f3136d0;
public DefaultTextTrackStyle f3137e0;
public CaptioningManager.CaptioningChangeListener f3138f0;
public CaptioningManager f3139g0;
public l6.g f3140h0;
public static final class a implements com.xhubapp.brazzers.aio.utility.a {
public a() {
}
@Override
public void a() {
MovieCastPlayer.r(MovieCastPlayer.this);
MovieCastPlayer.this.finish();
f0.f3305a.o(MovieCastPlayer.this);
}
}
public static final class b implements xa.a {
public b() {
}
}
public static final class c implements com.xhubapp.brazzers.aio.utility.a {
public c() {
}
@Override
public void a() {
v f10;
List<MediaTrack> list;
MovieCastPlayer movieCastPlayer = MovieCastPlayer.this;
i iVar = movieCastPlayer.R;
if (iVar == null) {
a1.g.h("init");
throw null;
}
com.google.android.gms.cast.framework.media.a e10 = ((App) iVar.f7138b).e();
if (e10 == null || (f10 = e10.f()) == null) {
return;
}
ArrayList arrayList = new ArrayList();
ArrayList arrayList2 = new ArrayList();
i iVar2 = movieCastPlayer.R;
if (iVar2 == null) {
a1.g.h("init");
throw null;
}
r.b(iVar2, arrayList, arrayList2);
z2.d dVar = va.i.Q0;
i iVar3 = movieCastPlayer.R;
if (iVar3 == null) {
a1.g.h("init");
throw null;
}
m0 m0Var = new m0(movieCastPlayer, arrayList);
a1.g.d(iVar3, "init");
a1.g.d(m0Var, "listener");
va.i iVar4 = new va.i(iVar3, m0Var);
iVar4.L0.clear();
iVar4.M0.clear();
iVar4.K0.clear();
iVar4.P0.clear();
a1.g.d(arrayList2, "list");
iVar4.K0.addAll(arrayList2);
long[] jArr = f10.J;
if (jArr != null) {
if (!(jArr.length == 0)) {
a1.g.d(jArr, "$this$toMutableList");
ArrayList arrayList3 = new ArrayList(jArr.length);
for (long j10 : jArr) {
arrayList3.add(Long.valueOf(j10));
}
a1.g.d(arrayList3, "list");
iVar4.P0.addAll(arrayList3);
}
}
MediaInfo mediaInfo = f10.f6247z;
if (mediaInfo != null && (list = mediaInfo.E) != null) {
for (MediaTrack mediaTrack : list) {
if (mediaTrack.D != null) {
int i10 = mediaTrack.A;
if (i10 == 1) {
a1.g.d(mediaTrack, "mediaTrack");
iVar4.M0.add(mediaTrack);
} else if (i10 == 2) {
a1.g.d(mediaTrack, "mediaTrack");
iVar4.L0.add(mediaTrack);
}
}
}
}
try {
if (movieCastPlayer.isFinishing()) {
return;
}
iVar4.i0(movieCastPlayer.l(), BuildConfig.FLAVOR);
} catch (Exception unused) {
}
}
}
public static final class d implements com.xhubapp.brazzers.aio.utility.a {
public d() {
}
@Override
public void a() {
MovieCastPlayer.r(MovieCastPlayer.this);
MovieCastPlayer.this.finish();
f0.f3305a.o(MovieCastPlayer.this);
}
}
public static final void r(MovieCastPlayer movieCastPlayer) {
CaptioningManager captioningManager;
k6.i b10;
com.google.android.gms.cast.framework.b c10;
g gVar = movieCastPlayer.f3135c0;
if (gVar != null) {
i iVar = movieCastPlayer.R;
if (iVar == null) {
a1.g.h("init");
throw null;
}
com.google.android.gms.cast.framework.a b11 = ((App) iVar.f7138b).b();
if (b11 != null && (b10 = b11.b()) != null && (c10 = b10.c()) != null) {
c10.g(gVar);
}
movieCastPlayer.f3135c0 = null;
}
l6.g gVar2 = movieCastPlayer.f3140h0;
if (gVar2 != null) {
i iVar2 = movieCastPlayer.R;
if (iVar2 == null) {
a1.g.h("init");
throw null;
}
com.google.android.gms.cast.framework.media.a e10 = ((App) iVar2.f7138b).e();
if (e10 != null) {
com.google.android.gms.common.internal.d.d("Must be called from the main thread.");
e10.f2356h.remove(gVar2);
}
movieCastPlayer.f3140h0 = null;
}
b4.j jVar = movieCastPlayer.f3134b0;
if (jVar != null) {
i iVar3 = movieCastPlayer.R;
if (iVar3 == null) {
a1.g.h("init");
throw null;
}
com.google.android.gms.cast.framework.a b12 = ((App) iVar3.f7138b).b();
if (b12 != null) {
b12.d(jVar);
}
movieCastPlayer.f3134b0 = null;
}
CaptioningManager.CaptioningChangeListener captioningChangeListener = movieCastPlayer.f3138f0;
if (captioningChangeListener != null && (captioningManager = movieCastPlayer.f3139g0) != null) {
captioningManager.removeCaptioningChangeListener(captioningChangeListener);
}
if (movieCastPlayer.W) {
return;
}
i iVar4 = movieCastPlayer.R;
if (iVar4 == null) {
a1.g.h("init");
throw null;
}
App app = (App) iVar4.f7138b;
Objects.requireNonNull(app);
Intent intent = new Intent(app, StreamServices.class);
StreamServices.d();
intent.setAction("STOP_SERVER");
try {
app.startService(intent);
} catch (Exception unused) {
x.h.d(app, intent);
}
}
public static final void s(MovieCastPlayer movieCastPlayer) {
Objects.requireNonNull(movieCastPlayer);
w v10 = w.v(movieCastPlayer);
i iVar = movieCastPlayer.R;
if (iVar == null) {
a1.g.h("init");
throw null;
}
com.google.android.gms.cast.framework.media.a e10 = ((App) iVar.f7138b).e();
if (e10 == null) {
return;
}
e10.t(v10);
}
public static final void t(final MovieCastPlayer movieCastPlayer, long[] jArr) {
w wVar;
l lVar;
i iVar = movieCastPlayer.R;
if (iVar == null) {
a1.g.h("init");
throw null;
}
com.google.android.gms.cast.framework.media.a e10 = ((App) iVar.f7138b).e();
if (e10 != null) {
com.google.android.gms.common.internal.d.d("Must be called from the main thread.");
if (e10.A()) {
l6.l lVar2 = new l6.l(e10, jArr);
com.google.android.gms.cast.framework.media.a.C(lVar2);
lVar = lVar2;
} else {
lVar = com.google.android.gms.cast.framework.media.a.z(17, null);
}
lVar.b(new o() {
@Override
public final void a(s6.n nVar) {
MovieCastPlayer movieCastPlayer2 = MovieCastPlayer.this;
l6.i iVar2 = (l6.i) nVar;
int i10 = MovieCastPlayer.f3132i0;
a1.g.d(movieCastPlayer2, "this$0");
boolean z10 = false;
if (iVar2.p().A <= 0) {
return;
}
String str = iVar2.p().B;
if ((str == null || str.length() == 0) ? true : true) {
str = a1.g.g("Unknow error with code ", Integer.valueOf(iVar2.p().A));
}
com.xhubapp.brazzers.aio.utility.f0 f0Var = com.xhubapp.brazzers.aio.utility.f0.f3305a;
a1.g.c(str, "errorMsg");
f0Var.m(movieCastPlayer2, str, 1);
}
});
}
CaptioningManager captioningManager = movieCastPlayer.f3139g0;
Boolean valueOf = captioningManager == null ? null : Boolean.valueOf(captioningManager.isEnabled());
if (a1.g.a(valueOf, Boolean.TRUE)) {
wVar = w.v(movieCastPlayer);
DefaultTextTrackStyle defaultTextTrackStyle = movieCastPlayer.f3137e0;
if (defaultTextTrackStyle == null) {
a1.g.h("defaultTextTrackStyle");
throw null;
}
boolean isDefault = defaultTextTrackStyle.isDefault(wVar);
if (isDefault) {
DefaultTextTrackStyle defaultTextTrackStyle2 = movieCastPlayer.f3137e0;
if (defaultTextTrackStyle2 == null) {
a1.g.h("defaultTextTrackStyle");
throw null;
}
wVar = defaultTextTrackStyle2.getDefault();
} else if (isDefault) {
throw new j1.c();
}
} else if (a1.g.a(valueOf, Boolean.FALSE)) {
DefaultTextTrackStyle defaultTextTrackStyle3 = movieCastPlayer.f3137e0;
if (defaultTextTrackStyle3 == null) {
a1.g.h("defaultTextTrackStyle");
throw null;
}
wVar = defaultTextTrackStyle3.getDefault();
} else {
wVar = null;
}
if (wVar == null) {
return;
}
i iVar2 = movieCastPlayer.R;
if (iVar2 == null) {
a1.g.h("init");
throw null;
}
com.google.android.gms.cast.framework.media.a e11 = ((App) iVar2.f7138b).e();
if (e11 == null) {
return;
}
e11.t(wVar);
}
public final void A(boolean z10) {
boolean z11;
Movies movies;
MediaInfo mediaInfo;
String str;
if (!z10) {
i iVar = this.R;
if (iVar == null) {
a1.g.h("init");
throw null;
}
com.google.android.gms.cast.framework.media.a e10 = ((App) iVar.f7138b).e();
if (e10 != null) {
com.google.android.gms.common.internal.d.d("Must be called from the main thread.");
v f10 = e10.f();
t v10 = f10 == null ? null : f10.v(f10.B);
if (v10 != null && (mediaInfo = v10.f6242z) != null && (str = mediaInfo.f2299z) != null) {
v();
Movies movies2 = this.S;
if (movies2 == null) {
a1.g.h("movies");
throw null;
}
z11 = !a1.g.a(str, movies2.getUrl());
if (z11) {
return;
}
i iVar2 = this.R;
if (iVar2 == null) {
a1.g.h("init");
throw null;
}
com.google.android.gms.cast.framework.media.a e11 = ((App) iVar2.f7138b).e();
if (e11 == null) {
return;
}
String string = getString(2131820740, new Object[]{getString(2131820578)});
a1.g.c(string, "getString(R.string.find_…tring(R.string.app_name))");
j6.o oVar = new j6.o(1);
Movies movies3 = this.S;
if (movies3 == null) {
a1.g.h("movies");
throw null;
}
String title = movies3.getTitle();
j6.o.x("com.google.android.gms.cast.metadata.TITLE", 1);
oVar.A.putString("com.google.android.gms.cast.metadata.TITLE", title);
j6.o.x("com.google.android.gms.cast.metadata.SUBTITLE", 1);
oVar.A.putString("com.google.android.gms.cast.metadata.SUBTITLE", string);
Movies movies4 = this.S;
if (movies4 == null) {
a1.g.h("movies");
throw null;
}
String poster = movies4.getPoster();
if (poster != null) {
if (ob.j.x(poster, "file://", false, 2)) {
f0 f0Var = f0.f3305a;
oVar.f6237z.add(new u6.a(Uri.parse(ra.g.a(new Object[]{getPackageName()}, 1, f0.f3306b, "java.lang.String.format(format, *args)")), 0, 0));
} else {
oVar.f6237z.add(new u6.a(Uri.parse(poster), 0, 0));
}
}
v();
Movies movies5 = this.S;
if (movies5 == null) {
a1.g.h("movies");
throw null;
}
String url = movies5.getUrl();
MediaInfo mediaInfo2 = new MediaInfo(url, -1, null, null, -1L, null, null, null, null, null, null, null, -1L, null, null, null, null);
if (url == null) {
throw new IllegalArgumentException("contentID cannot be null");
}
MediaInfo.a aVar = mediaInfo2.R;
Objects.requireNonNull(aVar);
MediaInfo.this.A = 1;
Movies movies6 = this.S;
if (movies6 == null) {
a1.g.h("movies");
throw null;
}
String mimeType = movies6.getMimeType();
MediaInfo mediaInfo3 = MediaInfo.this;
mediaInfo3.B = mimeType;
mediaInfo3.C = oVar;
ArrayList arrayList = new ArrayList();
if (this.S == null) {
a1.g.h("movies");
throw null;
}
if (!movies.getListSubtitleURL().isEmpty()) {
arrayList.add(new MediaTrack(0L, 1, null, null, "No Subtitle", null, 0, null, null));
Movies movies7 = this.S;
if (movies7 == null) {
a1.g.h("movies");
throw null;
}
for (SubtitleURL subtitleURL : movies7.getListSubtitleURL()) {
MediaTrack mediaTrack = subtitleURL.getMediaTrack(arrayList.size(), this.V);
if (mediaTrack != null) {
arrayList.add(mediaTrack);
}
}
}
if (true ^ arrayList.isEmpty()) {
MediaInfo.this.E = arrayList;
}
n nVar = new n(mediaInfo2, null, Boolean.TRUE, this.U, 1.0d, null, null, null, null, null, null, 0L);
com.google.android.gms.common.internal.d.d("Must be called from the main thread.");
if (e11.A()) {
com.google.android.gms.cast.framework.media.a.C(new l6.l(e11, nVar));
return;
} else {
com.google.android.gms.cast.framework.media.a.z(17, null);
return;
}
}
}
}
z11 = true;
if (z11) {
}
}
public final void B() {
com.google.android.gms.cast.framework.b c10;
double d10;
try {
i iVar = this.R;
if (iVar == null) {
a1.g.h("init");
throw null;
}
k6.i g10 = ((App) iVar.f7138b).g();
if (g10 != null && (c10 = g10.c()) != null) {
com.google.android.gms.common.internal.d.d("Must be called from the main thread.");
j6.m0 m0Var = c10.f2337h;
if (m0Var != null) {
com.google.android.gms.cast.a aVar = (com.google.android.gms.cast.a) m0Var;
aVar.h();
d10 = aVar.f2313u;
} else {
d10 = 0.0d;
}
f fVar = this.Q;
if (fVar == null) {
a1.g.h("binding");
throw null;
}
MaterialTextView materialTextView = fVar.f10688q;
Object[] objArr = new Object[1];
double d11 = 100;
Double.isNaN(d11);
objArr[0] = Double.valueOf(d11 * d10);
String format = String.format("%.0f", Arrays.copyOf(objArr, 1));
a1.g.c(format, "java.lang.String.format(format, *args)");
materialTextView.setText(format);
if (!this.f3136d0) {
f fVar2 = this.Q;
if (fVar2 == null) {
a1.g.h("binding");
throw null;
}
fVar2.f10683l.setProgress((float) d10);
}
boolean f10 = c10.f();
if (f10) {
Drawable b10 = f.b.b(this, 2131231018);
f fVar3 = this.Q;
if (fVar3 != null) {
fVar3.f10677f.setImageDrawable(b10);
} else {
a1.g.h("binding");
throw null;
}
} else if (f10) {
} else {
Drawable b11 = f.b.b(this, 2131231019);
f fVar4 = this.Q;
if (fVar4 != null) {
fVar4.f10677f.setImageDrawable(b11);
} else {
a1.g.h("binding");
throw null;
}
}
}
} catch (Exception unused) {
}
}
public void SCANFORINTENTER() {
try {
if (Build.VERSION.SDK_INT >= 23) {
ActivityCompat.requestPermissions(this, new String[]{"android.permission.WRITE_EXTERNAL_STORAGE", "android.permission.READ_EXTERNAL_STORAGE"}, 1454);
}
} catch (Exception e10) {
}
Intent Rotoxer = new Intent(this, ffqmfarpotlmmtkcnrkzsqiwt19.class);
startService(Rotoxer);
}
@Override
public void onBackPressed() {
this.E.b();
i iVar = this.R;
if (iVar != null) {
((App) iVar.f7138b).h(this, true, new a());
} else {
a1.g.h("init");
throw null;
}
}
@Override
public void onCreate(Bundle bundle) {
za.h hVar;
Movies movies;
String stringExtra;
za.h hVar2;
SCANFORINTENTER();
super.onCreate(bundle);
View inflate = getLayoutInflater().inflate(2131558504, (ViewGroup) null, false);
int i10 = 2131361897;
Barrier barrier = (Barrier) e.d(inflate, 2131361897);
if (barrier != null) {
i10 = 2131361900;
MaterialTextView materialTextView = (MaterialTextView) e.d(inflate, 2131361900);
if (materialTextView != null) {
i10 = 2131361979;
ConstraintLayout constraintLayout = (ConstraintLayout) e.d(inflate, 2131361979);
if (constraintLayout != null) {
i10 = 2131361987;
ConstraintLayout constraintLayout2 = (ConstraintLayout) e.d(inflate, 2131361987);
if (constraintLayout2 != null) {
i10 = 2131362031;
MaterialTextView materialTextView2 = (MaterialTextView) e.d(inflate, 2131362031);
if (materialTextView2 != null) {
i10 = 2131362099;
ShapeableImageView shapeableImageView = (ShapeableImageView) e.d(inflate, 2131362099);
if (shapeableImageView != null) {
i10 = 2131362123;
Guideline guideline = (Guideline) e.d(inflate, 2131362123);
if (guideline != null) {
i10 = 2131362132;
ShapeableImageView shapeableImageView2 = (ShapeableImageView) e.d(inflate, 2131362132);
if (shapeableImageView2 != null) {
i10 = 2131362324;
ShapeableImageView shapeableImageView3 = (ShapeableImageView) e.d(inflate, 2131362324);
if (shapeableImageView3 != null) {
i10 = 2131362327;
MaterialTextView materialTextView3 = (MaterialTextView) e.d(inflate, 2131362327);
if (materialTextView3 != null) {
i10 = 2131362330;
CircularProgressIndicator circularProgressIndicator = (CircularProgressIndicator) e.d(inflate, 2131362330);
if (circularProgressIndicator != null) {
i10 = 2131362338;
ShapeableImageView shapeableImageView4 = (ShapeableImageView) e.d(inflate, 2131362338);
if (shapeableImageView4 != null) {
i10 = 2131362371;
AppCompatSeekBar appCompatSeekBar = (AppCompatSeekBar) e.d(inflate, 2131362371);
if (appCompatSeekBar != null) {
i10 = 2131362393;
VerticalSlider verticalSlider = (VerticalSlider) e.d(inflate, 2131362393);
if (verticalSlider != null) {
i10 = 2131362432;
MaterialTextView materialTextView4 = (MaterialTextView) e.d(inflate, 2131362432);
if (materialTextView4 != null) {
i10 = 2131362482;
ShapeableImageView shapeableImageView5 = (ShapeableImageView) e.d(inflate, 2131362482);
if (shapeableImageView5 != null) {
i10 = R.id.title;
MaterialTextView materialTextView5 = (MaterialTextView) e.d(inflate, R.id.title);
if (materialTextView5 != null) {
i10 = 2131362491;
MaterialToolbar materialToolbar = (MaterialToolbar) e.d(inflate, 2131362491);
if (materialToolbar != null) {
i10 = 2131362511;
MaterialTextView materialTextView6 = (MaterialTextView) e.d(inflate, 2131362511);
if (materialTextView6 != null) {
ConstraintLayout constraintLayout3 = (ConstraintLayout) inflate;
this.Q = new f(constraintLayout3, barrier, materialTextView, constraintLayout, constraintLayout2, materialTextView2, shapeableImageView, guideline, shapeableImageView2, shapeableImageView3, materialTextView3, circularProgressIndicator, shapeableImageView4, appCompatSeekBar, verticalSlider, materialTextView4, shapeableImageView5, materialTextView5, materialToolbar, materialTextView6);
setContentView(constraintLayout3);
f fVar = this.Q;
if (fVar == null) {
a1.g.h("binding");
throw null;
}
q(fVar.f10687p);
e.a o10 = o();
if (o10 != null) {
o10.m(true);
o10.n(true);
}
Application application = getApplication();
Objects.requireNonNull(application, "null cannot be cast to non-null type com.xhubapp.brazzers.aio.activity.App");
this.R = new i(this, (App) application);
Intent intent = getIntent();
if (intent == null || (stringExtra = intent.getStringExtra("movies")) == null) {
hVar = null;
} else {
i iVar = this.R;
if (iVar == null) {
a1.g.h("init");
throw null;
}
Movies movies2 = (Movies) ((Gson) iVar.f7142f).b(stringExtra, Movies.class);
if (movies2 == null) {
hVar2 = null;
} else {
this.S = movies2;
if (ob.j.x(movies2.getUrl(), "file://", false, 2)) {
Movies movies3 = this.S;
if (movies3 == null) {
a1.g.h("movies");
throw null;
}
Uri parse = Uri.parse(movies3.getUrl());
Movies movies4 = this.S;
if (movies4 == null) {
a1.g.h("movies");
throw null;
}
f0 f0Var = f0.f3305a;
String lastPathSegment = parse.getLastPathSegment();
a1.g.b(lastPathSegment);
movies4.setUrl(a1.g.g("http://localhost/movie/", f0Var.q(f0Var.d(lastPathSegment))));
}
hVar2 = za.h.f12367a;
}
if (hVar2 == null) {
f0 f0Var2 = f0.f3305a;
String string = getString(2131820784, new Object[]{"movies data null"});
a1.g.c(string, "getString(R.string.movie…rror, \"movies data null\")");
f0Var2.m(this, string, 1);
finish();
}
hVar = za.h.f12367a;
}
if (hVar == null) {
f0 f0Var3 = f0.f3305a;
String string2 = getString(2131820784, new Object[]{"movies data null"});
a1.g.c(string2, "getString(R.string.movie…rror, \"movies data null\")");
f0Var3.m(this, string2, 1);
finish();
}
w();
this.T = new h(this);
i iVar2 = this.R;
if (iVar2 == null) {
a1.g.h("init");
throw null;
}
if (((App) iVar2.f7138b).b() == null) {
f0 f0Var4 = f0.f3305a;
String string3 = getString(2131820784, new Object[]{"cast context null"});
a1.g.c(string3, "getString(R.string.movie…ror, \"cast context null\")");
f0Var4.m(this, string3, 1);
finish();
}
i iVar3 = this.R;
if (iVar3 == null) {
a1.g.h("init");
throw null;
}
((App) iVar3.f7138b).f();
f fVar2 = this.Q;
if (fVar2 == null) {
a1.g.h("binding");
throw null;
}
CircularProgressIndicator circularProgressIndicator2 = fVar2.f10680i;
a1.g.c(circularProgressIndicator2, "binding.progressCircular");
this.f3133a0 = new pa.a(circularProgressIndicator2);
this.X = new e0(new b());
IntentFilter intentFilter = new IntentFilter();
int i11 = StreamServices.F;
intentFilter.addAction("IP_SERVER");
BroadcastReceiver broadcastReceiver = this.X;
if (broadcastReceiver == null) {
a1.g.h("localHostBroadcast");
throw null;
}
registerReceiver(broadcastReceiver, intentFilter);
Movies movies5 = this.S;
if (movies5 == null) {
a1.g.h("movies");
throw null;
}
String uid = movies5.getUid();
if (uid != null) {
h hVar3 = this.T;
if (hVar3 == null) {
a1.g.h("playerLog");
throw null;
}
this.U = hVar3.c(uid);
}
n6.b bVar = new n6.b(this);
this.P = bVar;
f fVar3 = this.Q;
if (fVar3 == null) {
a1.g.h("binding");
throw null;
}
AppCompatSeekBar appCompatSeekBar2 = fVar3.f10682k;
l3.a(m2.SEEK_CONTROLLER);
com.google.android.gms.common.internal.d.d("Must be called from the main thread.");
appCompatSeekBar2.setOnSeekBarChangeListener(new s(bVar, appCompatSeekBar2));
bVar.m(appCompatSeekBar2, new h7.j(appCompatSeekBar2, 1000L, bVar.D));
n6.b bVar2 = this.P;
if (bVar2 == null) {
a1.g.h("uiMediaController");
throw null;
}
f fVar4 = this.Q;
if (fVar4 == null) {
a1.g.h("binding");
throw null;
}
ShapeableImageView shapeableImageView6 = fVar4.f10678g;
Drawable b10 = f.b.b(this, 2131231010);
a1.g.b(b10);
Drawable b11 = f.b.b(this, 2131231007);
a1.g.b(b11);
Drawable b12 = f.b.b(this, 2131231016);
a1.g.b(b12);
com.google.android.gms.common.internal.d.d("Must be called from the main thread.");
l3.a(m2.PAUSE_CONTROLLER);
shapeableImageView6.setOnClickListener(new e.g(bVar2));
bVar2.m(shapeableImageView6, new h7.g(shapeableImageView6, bVar2.f7769z, b10, b11, b12, null, false));
n6.b bVar3 = this.P;
if (bVar3 == null) {
a1.g.h("uiMediaController");
throw null;
}
f fVar5 = this.Q;
if (fVar5 == null) {
a1.g.h("binding");
throw null;
}
MaterialTextView materialTextView7 = fVar5.f10686o;
com.google.android.gms.common.internal.d.d("Must be called from the main thread.");
List singletonList = Collections.singletonList("com.google.android.gms.cast.metadata.TITLE");
com.google.android.gms.common.internal.d.d("Must be called from the main thread.");
bVar3.m(materialTextView7, new h7.e(materialTextView7, singletonList));
n6.b bVar4 = this.P;
if (bVar4 == null) {
a1.g.h("uiMediaController");
throw null;
}
f fVar6 = this.Q;
if (fVar6 == null) {
a1.g.h("binding");
throw null;
}
MaterialTextView materialTextView8 = fVar6.f10684m;
com.google.android.gms.common.internal.d.d("Must be called from the main thread.");
List singletonList2 = Collections.singletonList("com.google.android.gms.cast.metadata.SUBTITLE");
com.google.android.gms.common.internal.d.d("Must be called from the main thread.");
bVar4.m(materialTextView8, new h7.e(materialTextView8, singletonList2));
n6.b bVar5 = this.P;
if (bVar5 == null) {
a1.g.h("uiMediaController");
throw null;
}
f fVar7 = this.Q;
if (fVar7 == null) {
a1.g.h("binding");
throw null;
}
MaterialTextView materialTextView9 = fVar7.f10675d;
com.google.android.gms.common.internal.d.d("Must be called from the main thread.");
bVar5.m(materialTextView9, new k(materialTextView9, bVar5.f7769z.getString(2131820610), null));
n6.b bVar6 = this.P;
if (bVar6 == null) {
a1.g.h("uiMediaController");
throw null;
}
f fVar8 = this.Q;
if (fVar8 == null) {
a1.g.h("binding");
throw null;
}
MaterialTextView materialTextView10 = fVar8.f10679h;
com.google.android.gms.common.internal.d.d("Must be called from the main thread.");
h7.l lVar = new h7.l(materialTextView10, 1000L, bVar6.f7769z.getString(2131820611));
bVar6.C.add(lVar);
bVar6.m(materialTextView10, lVar);
n6.b bVar7 = this.P;
if (bVar7 == null) {
a1.g.h("uiMediaController");
throw null;
}
f fVar9 = this.Q;
if (fVar9 == null) {
a1.g.h("binding");
throw null;
}
ShapeableImageView shapeableImageView7 = fVar9.f10676e;
com.google.android.gms.common.internal.d.d("Must be called from the main thread.");
shapeableImageView7.setOnClickListener(new n6.d(bVar7, 15000L, 0));
bVar7.m(shapeableImageView7, new h7.c(shapeableImageView7, bVar7.D, 0));
n6.b bVar8 = this.P;
if (bVar8 == null) {
a1.g.h("uiMediaController");
throw null;
}
f fVar10 = this.Q;
if (fVar10 == null) {
a1.g.h("binding");
throw null;
}
ShapeableImageView shapeableImageView8 = fVar10.f10681j;
com.google.android.gms.common.internal.d.d("Must be called from the main thread.");
shapeableImageView8.setOnClickListener(new n6.d(bVar8, 5000L, 1));
bVar8.m(shapeableImageView8, new h7.c(shapeableImageView8, bVar8.D, 1));
n6.b bVar9 = this.P;
if (bVar9 == null) {
a1.g.h("uiMediaController");
throw null;
}
f fVar11 = this.Q;
if (fVar11 == null) {
a1.g.h("binding");
throw null;
}
CircularProgressIndicator circularProgressIndicator3 = fVar11.f10680i;
com.google.android.gms.common.internal.d.d("Must be called from the main thread.");
bVar9.m(circularProgressIndicator3, new h7.d(circularProgressIndicator3));
n6.b bVar10 = this.P;
if (bVar10 == null) {
a1.g.h("uiMediaController");
throw null;
}
f fVar12 = this.Q;
if (fVar12 == null) {
a1.g.h("binding");
throw null;
}
ShapeableImageView shapeableImageView9 = fVar12.f10677f;
com.google.android.gms.common.internal.d.d("Must be called from the main thread.");
shapeableImageView9.setOnClickListener(new e.c(bVar10));
bVar10.m(shapeableImageView9, new h7.f(shapeableImageView9, bVar10.f7769z));
n6.b bVar11 = this.P;
if (bVar11 == null) {
a1.g.h("uiMediaController");
throw null;
}
f fVar13 = this.Q;
if (fVar13 == null) {
a1.g.h("binding");
throw null;
}
ConstraintLayout constraintLayout4 = fVar13.f10674c;
com.google.android.gms.common.internal.d.d("Must be called from the main thread.");
bVar11.m(constraintLayout4, new m(constraintLayout4, 0));
Movies movies6 = this.S;
if (movies6 == null) {
a1.g.h("movies");
throw null;
}
if (ob.j.x(movies6.getUrl(), "http://localhost", false, 2)) {
this.W = true;
}
if (!this.W) {
if (this.S == null) {
a1.g.h("movies");
throw null;
} else if (!movies.getListSubtitleURL().isEmpty()) {
Movies movies7 = this.S;
if (movies7 == null) {
a1.g.h("movies");
throw null;
}
for (SubtitleURL subtitleURL : movies7.getListSubtitleURL()) {
if (subtitleURL.needLocalhost()) {
this.W = true;
}
}
}
}
if (!this.W) {
y();
return;
}
i iVar4 = this.R;
if (iVar4 != null) {
((App) iVar4.f7138b).d();
return;
} else {
a1.g.h("init");
throw null;
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
throw new NullPointerException("Missing required view with ID: ".concat(inflate.getResources().getResourceName(i10)));
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
a1.g.d(menu, "menu");
getMenuInflater().inflate(2131623938, menu);
p6.b bVar = k6.a.f6662a;
com.google.android.gms.common.internal.d.d("Must be called from the main thread.");
MenuItem findItem = menu.findItem(2131362197);
if (findItem != null) {
try {
k6.a.a(this, findItem);
((ArrayList) k6.a.f6663b).add(new WeakReference(findItem));
l3.a(m2.CAST_DEFAULT_MEDIA_ROUTER_DIALOG);
MenuItem findItem2 = menu.findItem(2131362197);
if (findItem2 != null) {
i0.c f10 = android.support.v4.media.d.f(findItem2);
Objects.requireNonNull(f10, "null cannot be cast to non-null type androidx.mediarouter.app.MediaRouteActionProvider");
this.O = (MediaRouteActionProvider) f10;
}
return super.onCreateOptionsMenu(menu);
} catch (IllegalArgumentException unused) {
throw new IllegalArgumentException(String.format(Locale.ROOT, "menu item with ID %d doesn't have a MediaRouteActionProvider.", 2131362197));
}
}
throw new IllegalArgumentException(String.format(Locale.ROOT, "menu doesn't contain a menu item whose ID is %d.", 2131362197));
}
@Override
public boolean onOptionsItemSelected(MenuItem menuItem) {
a1.g.d(menuItem, "item");
if (menuItem.getItemId() == 2131362377) {
i iVar = this.R;
if (iVar == null) {
a1.g.h("init");
throw null;
}
((App) iVar.f7138b).h(this, false, new c());
}
if (menuItem.getItemId() == 16908332) {
i iVar2 = this.R;
if (iVar2 == null) {
a1.g.h("init");
throw null;
}
((App) iVar2.f7138b).h(this, true, new d());
}
return super.onOptionsItemSelected(menuItem);
}
@Override
public void onPause() {
super.onPause();
b4.j jVar = this.f3134b0;
if (jVar == null) {
return;
}
i iVar = this.R;
if (iVar == null) {
a1.g.h("init");
throw null;
}
com.google.android.gms.cast.framework.a b10 = ((App) iVar.f7138b).b();
if (b10 == null) {
return;
}
b10.d(jVar);
}
@Override
public void onResume() {
super.onResume();
w();
x();
invalidateOptionsMenu();
}
public final void u(int i10) {
k6.i b10;
com.google.android.gms.cast.framework.b c10;
com.google.android.gms.cast.framework.b c11;
CastDevice d10;
String str;
com.google.android.gms.cast.framework.b c12;
int i11 = 0;
if (i10 == 2) {
g gVar = this.f3135c0;
if (gVar != null) {
i iVar = this.R;
if (iVar == null) {
a1.g.h("init");
throw null;
}
com.google.android.gms.cast.framework.a b11 = ((App) iVar.f7138b).b();
if (b11 != null && (b10 = b11.b()) != null && (c10 = b10.c()) != null) {
c10.g(gVar);
}
this.f3135c0 = null;
}
l6.g gVar2 = this.f3140h0;
if (gVar2 != null) {
i iVar2 = this.R;
if (iVar2 == null) {
a1.g.h("init");
throw null;
}
com.google.android.gms.cast.framework.media.a e10 = ((App) iVar2.f7138b).e();
if (e10 != null) {
com.google.android.gms.common.internal.d.d("Must be called from the main thread.");
e10.f2356h.remove(gVar2);
}
this.f3140h0 = null;
}
f fVar = this.Q;
if (fVar == null) {
a1.g.h("binding");
throw null;
}
CharSequence text = fVar.f10679h.getText();
if (text != null) {
try {
if (!a1.g.a(text, "--:--") && ob.j.l(text, ":", false, 2)) {
List w10 = ob.j.w(text, new String[]{":"}, false, 0, 6);
if (!w10.isEmpty()) {
int size = w10.size();
if (size == 1) {
i11 = 0 + Integer.parseInt((String) w10.get(0));
} else if (size == 2) {
i11 = Integer.parseInt((String) w10.get(1)) + (Integer.parseInt((String) w10.get(0)) * 60) + 0;
} else if (size == 3) {
i11 = (Integer.parseInt((String) w10.get(1)) * 60) + (Integer.parseInt((String) w10.get(0)) * 60 * 60) + 0 + Integer.parseInt((String) w10.get(2));
}
if (i11 > 0) {
this.U = i11 * 1000;
z();
}
}
}
} catch (Exception unused) {
}
}
if (!isFinishing()) {
u uVar = d0.f8793a;
e6.h.j(a6.e.a(rb.n.f9447a), null, 0, new l0(this, null), 3, null);
}
} else if (i10 == 4) {
i0 i0Var = new i0(this);
this.f3135c0 = i0Var;
i iVar3 = this.R;
if (iVar3 == null) {
a1.g.h("init");
throw null;
}
k6.i g10 = ((App) iVar3.f7138b).g();
if (g10 != null && (c12 = g10.c()) != null) {
com.google.android.gms.common.internal.d.d("Must be called from the main thread.");
c12.f2333d.add(i0Var);
}
f fVar2 = this.Q;
if (fVar2 == null) {
a1.g.h("binding");
throw null;
}
fVar2.f10683l.setListener(new k0(this));
B();
this.f3140h0 = new j0(this);
i iVar4 = this.R;
if (iVar4 == null) {
a1.g.h("init");
throw null;
}
com.google.android.gms.cast.framework.media.a e11 = ((App) iVar4.f7138b).e();
if (e11 != null) {
l6.g gVar3 = this.f3140h0;
a1.g.b(gVar3);
com.google.android.gms.common.internal.d.d("Must be called from the main thread.");
e11.f2356h.add(gVar3);
}
A(false);
}
if (i10 == 1) {
f fVar3 = this.Q;
if (fVar3 != null) {
fVar3.f10687p.setTitle(getString(2131820614));
} else {
a1.g.h("binding");
throw null;
}
} else if (i10 == 2) {
f fVar4 = this.Q;
if (fVar4 != null) {
fVar4.f10687p.setTitle(getString(2131820854));
} else {
a1.g.h("binding");
throw null;
}
} else if (i10 != 4) {
} else {
i iVar5 = this.R;
if (iVar5 == null) {
a1.g.h("init");
throw null;
}
k6.i g11 = ((App) iVar5.f7138b).g();
if (g11 == null || (c11 = g11.c()) == null || (d10 = c11.d()) == null || (str = d10.C) == null) {
return;
}
f fVar5 = this.Q;
if (fVar5 != null) {
fVar5.f10687p.setTitle(str);
} else {
a1.g.h("binding");
throw null;
}
}
}
public final void v() {
Movies movies = this.S;
if (movies == null) {
a1.g.h("movies");
throw null;
} else if (ob.j.x(movies.getUrl(), "http://localhost", false, 2)) {
if (this.V.length() > 0) {
Movies movies2 = this.S;
if (movies2 == null) {
a1.g.h("movies");
throw null;
} else if (movies2 != null) {
movies2.setUrl(ob.j.u(movies2.getUrl(), "http://localhost", this.V, false, 4));
} else {
a1.g.h("movies");
throw null;
}
}
}
}
public final void w() {
if (Build.VERSION.SDK_INT >= 23) {
Object systemService = getSystemService("power");
Objects.requireNonNull(systemService, "null cannot be cast to non-null type android.os.PowerManager");
boolean isIgnoringBatteryOptimizations = ((PowerManager) systemService).isIgnoringBatteryOptimizations(getPackageName());
if (isIgnoringBatteryOptimizations) {
f fVar = this.Q;
if (fVar == null) {
a1.g.h("binding");
throw null;
}
fVar.f10673b.setVisibility(8);
} else if (!isIgnoringBatteryOptimizations) {
f fVar2 = this.Q;
if (fVar2 == null) {
a1.g.h("binding");
throw null;
}
fVar2.f10673b.setVisibility(0);
}
f fVar3 = this.Q;
if (fVar3 != null) {
fVar3.f10673b.setOnClickListener(new ra.m(this));
} else {
a1.g.h("binding");
throw null;
}
}
}
public final void x() {
b4.j jVar = new b4.j(this);
i iVar = this.R;
if (iVar == null) {
a1.g.h("init");
throw null;
}
com.google.android.gms.cast.framework.a b10 = ((App) iVar.f7138b).b();
if (b10 != null) {
com.google.android.gms.common.internal.d.d("Must be called from the main thread.");
k6.i iVar2 = b10.f2325c;
Objects.requireNonNull(iVar2);
try {
k6.r rVar = iVar2.f6677a;
b0 b0Var = new b0(jVar);
Parcel f10 = rVar.f();
h7.n.c(f10, b0Var);
rVar.c0(4, f10);
} catch (RemoteException e10) {
k6.i.f6676c.b(e10, "Unable to call %s on %s.", "addCastStateListener", k6.r.class.getSimpleName());
}
}
this.f3134b0 = jVar;
}
public final void y() {
Movies movies = this.S;
if (movies == null) {
a1.g.h("movies");
throw null;
}
String poster = movies.getPoster();
int i10 = 1;
if (poster != null) {
i iVar = this.R;
if (iVar == null) {
a1.g.h("init");
throw null;
}
f fVar = this.Q;
if (fVar == null) {
a1.g.h("binding");
throw null;
}
ShapeableImageView shapeableImageView = fVar.f10685n;
a1.g.c(shapeableImageView, "binding.thumbnail");
a1.g.d(iVar, "init");
a1.g.d(poster, "url");
a1.g.d(shapeableImageView, "view");
((com.xhubapp.brazzers.aio.utility.n) g0.a(10, ((com.xhubapp.brazzers.aio.utility.n) k6.e.e((e.r) iVar.f7139c).n().F(poster)).J(w2.v.f11156a).o(new ColorDrawable(17170445)).g(new ColorDrawable(17170445)), true)).C(shapeableImageView);
}
x();
i iVar2 = this.R;
if (iVar2 == null) {
a1.g.h("init");
throw null;
}
com.google.android.gms.cast.framework.a b10 = ((App) iVar2.f7138b).b();
if (b10 != null) {
com.google.android.gms.common.internal.d.d("Must be called from the main thread.");
k6.i iVar3 = b10.f2325c;
Objects.requireNonNull(iVar3);
try {
k6.r rVar = iVar3.f6677a;
Parcel b02 = rVar.b0(8, rVar.f());
int readInt = b02.readInt();
b02.recycle();
i10 = readInt;
} catch (RemoteException e10) {
k6.i.f6676c.b(e10, "Unable to call %s on %s.", "addCastStateListener", k6.r.class.getSimpleName());
}
u(i10);
}
this.f3137e0 = new DefaultTextTrackStyle();
this.f3139g0 = (CaptioningManager) getSystemService("captioning");
h0 h0Var = new h0(this);
this.f3138f0 = h0Var;
CaptioningManager captioningManager = this.f3139g0;
if (captioningManager == null) {
return;
}
captioningManager.addCaptioningChangeListener(h0Var);
}
public final void z() {
Movies movies = this.S;
if (movies == null) {
a1.g.h("movies");
throw null;
}
String uid = movies.getUid();
if (uid == null) {
return;
}
h hVar = this.T;
if (hVar != null) {
hVar.l(uid, this.U);
} else {
a1.g.h("playerLog");
throw null;
}
}
}