CCIPTV PRO v3.0.9.1版本的 MD5 值为:e78d4d980447be4a9f823314f45bbf03
以下内容为反编译后的 ViewDetailsActivity.java 源代码,内容仅作参考
package boxbr.apksrebrand.smarters.view.activity;
import android.animation.ObjectAnimator;
import android.annotation.SuppressLint;
import android.app.ProgressDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.SharedPreferences;
import android.graphics.Bitmap;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.os.Bundle;
import android.util.Log;
import android.util.TypedValue;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.Window;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.PopupWindow;
import android.widget.ProgressBar;
import android.widget.RatingBar;
import android.widget.RelativeLayout;
import android.widget.ScrollView;
import android.widget.TextView;
import android.widget.Toast;
import androidx.appcompat.widget.ActionMenuView;
import androidx.appcompat.widget.Toolbar;
import androidx.core.widget.NestedScrollView;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import boxbr.apksrebrand.smarters.miscelleneious.chromecastfeature.ExpandedControlsActivity;
import boxbr.apksrebrand.smarters.model.callback.SearchTMDBMoviesCallback;
import boxbr.apksrebrand.smarters.model.callback.TMDBCastsCallback;
import boxbr.apksrebrand.smarters.model.callback.TMDBGenreCallback;
import boxbr.apksrebrand.smarters.model.callback.TMDBPersonInfoCallback;
import boxbr.apksrebrand.smarters.model.callback.TMDBTrailerCallback;
import boxbr.apksrebrand.smarters.model.callback.VodInfoCallback;
import boxbr.apksrebrand.smarters.model.pojo.ExternalPlayerModelClass;
import boxbr.apksrebrand.smarters.model.pojo.TMDBCastsPojo;
import boxbr.apksrebrand.smarters.model.pojo.TMDBCrewPojo;
import boxbr.apksrebrand.smarters.view.adapter.CastAdapter;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import com.google.android.material.appbar.AppBarLayout;
import com.iptvsmarters.cciptv.R;
import d.a.k.b;
import d.a.p.g0;
import f.i.b.c0;
import f.i.b.t;
import f.i.b.x;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Locale;
import java.util.Random;
import java.util.concurrent.TimeUnit;
import me.zhanghai.android.materialprogressbar.SingleCircularProgressDrawable;
import org.joda.time.chrono.BasicChronology;
import tv.danmaku.ijk.media.player.IjkMediaPlayer;
public class ViewDetailsActivity extends d.a.k.c implements View.OnClickListener, f.j.a.k.f.l, f.j.a.k.f.i {
public static String a0;
public static String b0;
public f.j.a.i.p.a G;
public PopupWindow H;
public Button I;
public String J;
public DateFormat K;
public TextView L;
public Menu M;
public Button P;
public f.f.a.d.d.u.d Q;
public f.j.a.j.e S;
public f.j.a.i.p.j T;
public CastAdapter U;
@BindView
public AppBarLayout appbarToolbar;
@BindView
public ImageView ivFavourite;
@BindView
public ImageView ivMovieImage;
@BindView
public ImageView iv_back_button;
@BindView
public LinearLayout llCastBox;
@BindView
public LinearLayout llCastBoxInfo;
@BindView
public LinearLayout llDirectorBox;
@BindView
public LinearLayout llDirectorBoxInfo;
@BindView
public LinearLayout llDurationBox;
@BindView
public LinearLayout llDurationBoxInfo;
@BindView
public LinearLayout llGenreBox;
@BindView
public LinearLayout llGenreBoxInfo;
@BindView
public LinearLayout llMovieInfoBox;
@BindView
public LinearLayout llReleasedBox;
@BindView
public LinearLayout llReleasedBoxInfo;
@BindView
public LinearLayout ll_play_button_main_layout;
@BindView
public LinearLayout ll_watch_trailer;
@BindView
public LinearLayout ll_watch_trailer_button_main_layout;
@BindView
public ImageView logo;
@BindView
public NestedScrollView nestedScrollView;
@BindView
public ProgressBar pb_button_recent_watch;
public String r;
@BindView
public RatingBar ratingBar;
@BindView
public RelativeLayout rlAccountInfo;
@BindView
public RelativeLayout rlTransparent;
@BindView
public RecyclerView rvCast;
public String s;
@BindView
public ScrollView scrollView;
public SimpleDateFormat t;
@BindView
public Toolbar toolbar;
@BindView
public TextView tvCast;
@BindView
public TextView tvCastInfo;
@BindView
public TextView tvDirector;
@BindView
public TextView tvDirectorInfo;
@BindView
public TextView tvMovieDuration;
@BindView
public TextView tvMovieDurationInfo;
@BindView
public TextView tvMovieGenere;
@BindView
public TextView tvMovieInfo;
@BindView
public TextView tvMovieName;
@BindView
public TextView tvPlay;
@BindView
public TextView tvReadMore;
@BindView
public TextView tvReleaseDate;
@BindView
public TextView tvReleaseDateInfo;
@BindView
public TextView tvWatchTrailer;
@BindView
public TextView tv_genre_info;
public Date u;
public ProgressDialog w;
public SharedPreferences x;
public SharedPreferences y;
public f.j.a.j.i z;
public Context v = this;
public String A = "";
public String B = "";
public String C = "";
public String D = "";
public int E = -1;
public String F = "";
public String N = "";
public Boolean O = Boolean.TRUE;
public String R = "";
public String V = "mobile";
public int W = 0;
public boolean X = false;
public int Y = 0;
public String Z = "";
public class a implements DialogInterface.OnClickListener {
public a(ViewDetailsActivity viewDetailsActivity) {
}
@Override
public void onClick(DialogInterface dialogInterface, int i2) {
}
}
public class b implements DialogInterface.OnClickListener {
public b(ViewDetailsActivity viewDetailsActivity) {
}
@Override
public void onClick(DialogInterface dialogInterface, int i2) {
dialogInterface.cancel();
}
}
public class c implements c0 {
public c() {
}
@Override
public void a(Drawable drawable) {
Log.d("TAG", "FAILED");
}
@Override
public void b(Drawable drawable) {
Log.d("TAG", "Prepare Load");
}
@Override
public void c(Bitmap bitmap, t.e eVar) {
ViewDetailsActivity.this.appbarToolbar.setBackground(new BitmapDrawable(ViewDetailsActivity.this.v.getResources(), bitmap));
ViewDetailsActivity viewDetailsActivity = ViewDetailsActivity.this;
viewDetailsActivity.rlTransparent.setBackgroundColor(viewDetailsActivity.getResources().getColor(R.color.trasparent_black_2));
ViewDetailsActivity viewDetailsActivity2 = ViewDetailsActivity.this;
viewDetailsActivity2.toolbar.setBackgroundColor(viewDetailsActivity2.getResources().getColor(R.color.trasparent_black_2));
}
}
public class d implements f.i.b.e {
public d() {
}
@Override
public void a() {
ViewDetailsActivity.this.ivMovieImage.setBackgroundResource(R.drawable.noposter);
}
@Override
public void b() {
}
}
public class e implements c0 {
public e() {
}
@Override
public void a(Drawable drawable) {
Log.d("TAG", "FAILED");
}
@Override
public void b(Drawable drawable) {
Log.d("TAG", "Prepare Load");
}
@Override
public void c(Bitmap bitmap, t.e eVar) {
ViewDetailsActivity.this.appbarToolbar.setBackground(new BitmapDrawable(ViewDetailsActivity.this.v.getResources(), bitmap));
ViewDetailsActivity viewDetailsActivity = ViewDetailsActivity.this;
viewDetailsActivity.rlTransparent.setBackgroundColor(viewDetailsActivity.getResources().getColor(R.color.trasparent_black_2));
ViewDetailsActivity viewDetailsActivity2 = ViewDetailsActivity.this;
viewDetailsActivity2.toolbar.setBackgroundColor(viewDetailsActivity2.getResources().getColor(R.color.trasparent_black_2));
}
}
public class f implements g0.d {
public final ArrayList a;
public final String b;
public f(ArrayList arrayList, String str) {
this.a = arrayList;
this.b = str;
}
@Override
public boolean onMenuItemClick(MenuItem menuItem) {
try {
if (ViewDetailsActivity.this.O.booleanValue() && this.a != null && this.a.size() > 0) {
for (int i2 = 0; i2 < this.a.size(); i2++) {
if (menuItem.getItemId() == i2) {
if (menuItem.getItemId() == 0) {
f.j.a.h.i.e.V(ViewDetailsActivity.this.v, this.b, ViewDetailsActivity.this.E, ViewDetailsActivity.this.B, ViewDetailsActivity.this.C, ViewDetailsActivity.this.D, ViewDetailsActivity.this.A, "", ViewDetailsActivity.this.W);
} else {
String E = f.j.a.h.i.e.E(ViewDetailsActivity.this.v, ViewDetailsActivity.this.E, ViewDetailsActivity.this.C, "movie");
Intent intent = new Intent(ViewDetailsActivity.this.v, PlayExternalPlayerActivity.class);
intent.putExtra(IjkMediaPlayer.OnNativeInvokeListener.ARG_URL, E);
intent.putExtra("app_name", ((ExternalPlayerModelClass) this.a.get(i2)).a());
intent.putExtra("packagename", ((ExternalPlayerModelClass) this.a.get(i2)).b());
ViewDetailsActivity.this.v.startActivity(intent);
}
}
}
}
} catch (Exception unused) {
}
return false;
}
}
public class g implements g0.c {
public g(ViewDetailsActivity viewDetailsActivity) {
}
@Override
public void a(g0 g0Var) {
}
}
public class h implements View.OnClickListener {
public h() {
}
@Override
public void onClick(View view) {
ViewDetailsActivity.this.H.dismiss();
}
}
public class i implements View.OnClickListener {
public i() {
}
@Override
public void onClick(View view) {
ViewDetailsActivity.this.H.dismiss();
}
}
public class j implements View.OnClickListener {
public j() {
}
@Override
public void onClick(View view) {
ViewDetailsActivity.this.H.dismiss();
}
}
public class k implements View.OnClickListener {
public k() {
}
@Override
public void onClick(View view) {
f.j.a.h.i.e.a(ViewDetailsActivity.this.v);
}
}
public class l implements View.OnClickListener {
public l() {
}
@Override
public void onClick(View view) {
ViewDetailsActivity.this.onBackPressed();
}
}
public class m implements View.OnClickListener {
public final Context b;
public m(Context context) {
this.b = context;
}
@Override
public void onClick(View view) {
if (ViewDetailsActivity.this.G.g(ViewDetailsActivity.this.E, ViewDetailsActivity.this.F, "vod", f.j.a.i.p.l.z(this.b)).size() > 0) {
ViewDetailsActivity.this.h1();
} else {
ViewDetailsActivity.this.a1();
}
}
}
public class n implements DialogInterface.OnClickListener {
public n(ViewDetailsActivity viewDetailsActivity) {
}
@Override
public void onClick(DialogInterface dialogInterface, int i2) {
dialogInterface.dismiss();
}
}
public class o implements DialogInterface.OnClickListener {
public o() {
}
@Override
public void onClick(DialogInterface dialogInterface, int i2) {
f.j.a.h.i.e.N(ViewDetailsActivity.this.v);
}
}
public class p implements DialogInterface.OnClickListener {
public p() {
}
@Override
public void onClick(DialogInterface dialogInterface, int i2) {
f.j.a.h.i.e.M(ViewDetailsActivity.this.v);
}
}
public class q implements DialogInterface.OnClickListener {
public q(ViewDetailsActivity viewDetailsActivity) {
}
@Override
public void onClick(DialogInterface dialogInterface, int i2) {
dialogInterface.cancel();
}
}
public class r implements View.OnFocusChangeListener {
public final View b;
public r(View view) {
this.b = view;
}
public final void a(float f2) {
ObjectAnimator ofFloat = ObjectAnimator.ofFloat(this.b, "scaleX", f2);
ofFloat.setDuration(150L);
ofFloat.start();
}
public final void b(float f2) {
ObjectAnimator ofFloat = ObjectAnimator.ofFloat(this.b, "scaleY", f2);
ofFloat.setDuration(150L);
ofFloat.start();
}
@Override
@SuppressLint({"ResourceType"})
public void onFocusChange(View view, boolean z) {
float f2;
int i2;
LinearLayout linearLayout;
if (z) {
f2 = z ? 1.05f : 1.0f;
Log.e("id is", "" + this.b.getTag());
View view2 = this.b;
if (view2 == null || view2.getTag() == null) {
return;
}
boolean equals = this.b.getTag().equals("1");
i2 = R.drawable.blue_btn_effect;
if (equals) {
a(f2);
b(f2);
linearLayout = ViewDetailsActivity.this.ll_play_button_main_layout;
} else if (this.b.getTag().equals("2")) {
a(f2);
b(f2);
this.b.setBackgroundResource(R.drawable.blue_btn_effect);
return;
} else if (!this.b.getTag().equals("5")) {
if (!this.b.getTag().equals("8")) {
a(1.15f);
b(1.15f);
return;
}
a(f2);
b(f2);
ViewDetailsActivity.this.P.setBackgroundResource(R.drawable.back_btn_effect);
return;
} else {
a(f2);
b(f2);
linearLayout = ViewDetailsActivity.this.ll_watch_trailer_button_main_layout;
}
} else if (z) {
return;
} else {
f2 = z ? 1.09f : 1.0f;
a(f2);
b(f2);
View view3 = this.b;
if (view3 == null || view3.getTag() == null) {
return;
}
boolean equals2 = this.b.getTag().equals("1");
i2 = R.drawable.rounded_edge_2;
if (!equals2) {
if (this.b.getTag().equals("3")) {
this.b.setBackgroundResource(R.drawable.black_button_dark);
return;
}
if (!this.b.getTag().equals("5")) {
if (this.b.getTag() == null || !this.b.getTag().equals("8")) {
return;
}
ViewDetailsActivity.this.P.setBackgroundResource(R.drawable.black_button_dark);
return;
}
linearLayout = ViewDetailsActivity.this.ll_watch_trailer_button_main_layout;
}
linearLayout = ViewDetailsActivity.this.ll_play_button_main_layout;
}
linearLayout.setBackgroundResource(i2);
}
}
public static long c1(SimpleDateFormat simpleDateFormat, String str, String str2) {
try {
return TimeUnit.DAYS.convert(simpleDateFormat.parse(str2).getTime() - simpleDateFormat.parse(str).getTime(), TimeUnit.MILLISECONDS);
} catch (Exception e2) {
e2.printStackTrace();
return 0L;
}
}
public static String d1(Context context) {
return String.valueOf(context.getApplicationInfo().loadLabel(context.getPackageManager()));
}
@Override
public void J(TMDBCastsCallback tMDBCastsCallback) {
String str = "";
if (tMDBCastsCallback != null) {
try {
if (tMDBCastsCallback.a() != null && tMDBCastsCallback.a().size() > 0) {
List<TMDBCastsPojo> a2 = tMDBCastsCallback.a();
if (a2 == null) {
if (this.llCastBox != null) {
this.llCastBox.setVisibility(0);
}
if (this.llCastBoxInfo != null) {
this.llCastBoxInfo.setVisibility(0);
}
if (this.tvReadMore != null) {
this.tvReadMore.setVisibility(8);
}
if (this.tvCastInfo != null) {
this.tvCastInfo.setText("N/A");
}
if (tMDBCastsCallback != null) {
}
if (this.llDirectorBox != null) {
}
if (this.llDirectorBoxInfo != null) {
}
if (this.tvDirectorInfo == null) {
}
this.tvDirectorInfo.setText("N/A");
}
String str2 = "";
for (int i2 = 0; i2 < a2.size(); i2++) {
str2 = str2 + a2.get(i2).b() + " / ";
}
String substring = str2.substring(0, str2.lastIndexOf(47));
this.J = substring;
if (this.llCastBox == null || this.llCastBoxInfo == null || this.tvCastInfo == null || substring.isEmpty()) {
if (this.llCastBox != null) {
this.llCastBox.setVisibility(0);
}
if (this.llCastBoxInfo != null) {
this.llCastBoxInfo.setVisibility(0);
}
if (this.tvReadMore != null) {
this.tvReadMore.setVisibility(8);
}
} else {
this.llCastBox.setVisibility(0);
this.llCastBoxInfo.setVisibility(0);
if (substring.length() > 150) {
this.tvCastInfo.setText(substring);
this.tvReadMore.setVisibility(0);
} else {
this.tvCastInfo.setText(substring);
this.tvReadMore.setVisibility(8);
}
}
if (tMDBCastsCallback != null || tMDBCastsCallback.b() == null || tMDBCastsCallback.b().size() <= 0) {
if (this.llDirectorBox != null) {
this.llDirectorBox.setVisibility(0);
}
if (this.llDirectorBoxInfo != null) {
this.llDirectorBoxInfo.setVisibility(0);
}
if (this.tvDirectorInfo == null) {
return;
}
} else {
List<TMDBCrewPojo> b2 = tMDBCastsCallback.b();
if (b2 != null) {
int i3 = 0;
while (true) {
if (i3 >= b2.size()) {
break;
} else if (b2.get(i3).a().equals("Director")) {
str = b2.get(i3).b();
break;
} else {
i3++;
}
}
if (this.tvDirectorInfo != null && this.llDirectorBoxInfo != null && this.llDirectorBox != null && str != null && !str.isEmpty() && !str.equals("n/A")) {
this.llDirectorBox.setVisibility(0);
this.llDirectorBoxInfo.setVisibility(0);
this.tvDirectorInfo.setText(str);
return;
}
if (this.llDirectorBox != null) {
this.llDirectorBox.setVisibility(0);
}
if (this.llDirectorBoxInfo != null) {
this.llDirectorBoxInfo.setVisibility(0);
}
if (this.tvDirectorInfo == null) {
return;
}
} else {
if (this.llDirectorBox != null) {
this.llDirectorBox.setVisibility(0);
}
if (this.llDirectorBoxInfo != null) {
this.llDirectorBoxInfo.setVisibility(0);
}
if (this.tvDirectorInfo == null) {
return;
}
}
}
this.tvDirectorInfo.setText("N/A");
}
} catch (Exception unused) {
return;
}
}
if (this.llCastBox != null) {
this.llCastBox.setVisibility(0);
}
if (this.llCastBoxInfo != null) {
this.llCastBoxInfo.setVisibility(0);
}
if (this.tvReadMore != null) {
this.tvReadMore.setVisibility(8);
}
if (this.tvCastInfo != null) {
this.tvCastInfo.setText("N/A");
}
if (tMDBCastsCallback != null) {
}
if (this.llDirectorBox != null) {
}
if (this.llDirectorBoxInfo != null) {
}
if (this.tvDirectorInfo == null) {
}
this.tvDirectorInfo.setText("N/A");
}
@Override
public void W(SearchTMDBMoviesCallback searchTMDBMoviesCallback) {
StringBuilder sb;
TextView textView;
if (searchTMDBMoviesCallback != null) {
try {
if (searchTMDBMoviesCallback.b() != null && searchTMDBMoviesCallback.b().equals(1) && searchTMDBMoviesCallback.a() != null && searchTMDBMoviesCallback.a().get(0) != null) {
int intValue = searchTMDBMoviesCallback.a().get(0).b().intValue();
this.S.b(intValue);
this.S.d(intValue);
this.S.g(intValue);
String e2 = searchTMDBMoviesCallback.a().get(0).e();
Double g2 = searchTMDBMoviesCallback.a().get(0).g();
String d2 = searchTMDBMoviesCallback.a().get(0).d();
String a2 = searchTMDBMoviesCallback.a().get(0).a();
if (new f.j.a.k.d.a.a(this.v).w().equals(f.j.a.h.i.a.i0)) {
sb = new StringBuilder();
sb.append("https://image.tmdb.org/t/p/w1280/");
sb.append(a2);
} else {
sb = new StringBuilder();
sb.append("https://image.tmdb.org/t/p/w500/");
sb.append(a2);
}
this.Z = sb.toString();
if (this.appbarToolbar != null && a2 != null && this.v != null) {
t.q(this.v).l(this.Z).i(new e());
}
if (this.llReleasedBox == null || this.llReleasedBoxInfo == null || this.tvReleaseDateInfo == null || e2 == null || e2.isEmpty() || e2.equals("n/A")) {
if (this.llReleasedBox != null) {
this.llReleasedBox.setVisibility(0);
}
if (this.llReleasedBoxInfo != null) {
this.llReleasedBoxInfo.setVisibility(0);
}
if (this.tvReleaseDateInfo != null) {
this.tvReleaseDateInfo.setText("N/A");
}
} else {
this.llReleasedBox.setVisibility(0);
this.llReleasedBoxInfo.setVisibility(0);
this.tvReleaseDateInfo.setText(e2);
}
if (this.ratingBar != null && g2 != null && !g2.equals("n/A")) {
this.ratingBar.setVisibility(0);
try {
this.ratingBar.setRating(Float.parseFloat(String.valueOf(g2)) / 2.0f);
} catch (NumberFormatException unused) {
this.ratingBar.setRating(SingleCircularProgressDrawable.START_ANGLE_MAX_NORMAL);
}
}
if (this.tvMovieInfo != null && d2 != null && !d2.isEmpty() && !d2.equals("n/A")) {
this.tvMovieInfo.setText(d2);
return;
} else if (this.tvMovieInfo != null) {
textView = this.tvMovieInfo;
textView.setVisibility(8);
} else {
return;
}
}
} catch (Exception unused2) {
return;
}
}
if (this.A != null && this.tvMovieName != null) {
this.tvMovieName.setText(this.A);
}
if (this.llDurationBox != null) {
this.llDurationBox.setVisibility(0);
}
if (this.llDurationBoxInfo != null) {
this.llDurationBoxInfo.setVisibility(0);
}
if (this.tvMovieDurationInfo != null) {
this.tvMovieDurationInfo.setText("N/A");
}
if (this.tvCastInfo != null) {
this.tvCastInfo.setText("N/A");
}
if (this.tvDirectorInfo != null) {
this.tvDirectorInfo.setText("N/A");
}
if (this.tvReleaseDateInfo != null) {
this.tvReleaseDateInfo.setText("N/A");
}
if (this.tv_genre_info != null) {
this.tv_genre_info.setText("N/A");
}
if (this.tvReadMore != null) {
textView = this.tvReadMore;
textView.setVisibility(8);
}
}
@Override
public void Y(String str) {
try {
this.J = "";
Context context = this.v;
if (this.A != null && this.tvMovieName != null) {
this.tvMovieName.setText(this.A);
}
if (this.llReleasedBox != null && this.llReleasedBoxInfo != null) {
TextView textView = this.tvReleaseDateInfo;
}
if (this.llReleasedBox != null) {
this.llReleasedBox.setVisibility(0);
}
if (this.llReleasedBoxInfo != null) {
this.llReleasedBoxInfo.setVisibility(0);
}
if (this.tvReleaseDateInfo != null) {
this.tvReleaseDateInfo.setText("N/A");
}
if (this.tvDirectorInfo != null && this.llDirectorBoxInfo != null) {
LinearLayout linearLayout = this.llDirectorBox;
}
if (this.llDirectorBox != null) {
this.llDirectorBox.setVisibility(0);
}
if (this.llDirectorBoxInfo != null) {
this.llDirectorBoxInfo.setVisibility(0);
}
if (this.tvDirectorInfo != null) {
this.tvDirectorInfo.setText("N/A");
}
if (this.llCastBox != null && this.llCastBoxInfo != null) {
TextView textView2 = this.tvCastInfo;
}
if (this.llCastBox != null) {
this.llCastBox.setVisibility(0);
}
if (this.llCastBoxInfo != null) {
this.llCastBoxInfo.setVisibility(0);
}
if (this.tvReadMore != null) {
this.tvReadMore.setVisibility(8);
}
if (this.tvCastInfo != null) {
this.tvCastInfo.setText("N/A");
}
RatingBar ratingBar = this.ratingBar;
TextView textView3 = this.tvMovieInfo;
if (this.tvMovieInfo != null) {
this.tvMovieInfo.setVisibility(8);
}
if (this.llGenreBox != null && this.llGenreBoxInfo != null) {
TextView textView4 = this.tv_genre_info;
}
if (this.llGenreBox != null) {
this.llGenreBox.setVisibility(0);
}
if (this.llGenreBoxInfo != null) {
this.llGenreBoxInfo.setVisibility(0);
}
if (this.tv_genre_info != null) {
this.tv_genre_info.setText("N/A");
}
if (this.llDurationBox == null || this.llDurationBoxInfo == null || this.tvMovieDurationInfo == null) {
if (this.llDurationBox != null) {
this.llDurationBox.setVisibility(0);
}
if (this.llDurationBoxInfo != null) {
this.llDurationBoxInfo.setVisibility(0);
}
if (this.tvMovieDurationInfo != null) {
this.tvMovieDurationInfo.setText("N/A");
return;
}
return;
}
this.llDurationBox.setVisibility(0);
this.llDurationBoxInfo.setVisibility(0);
float f2 = 0;
int i2 = (int) (f2 / 3600.0f);
try {
int round = Math.round((f2 % 3600.0f) / 60.0f);
if (i2 == 0) {
this.tvMovieDurationInfo.setText(round + com.facebook.internal.m.a);
} else {
this.tvMovieDurationInfo.setText(i2 + "h " + round + com.facebook.internal.m.a);
}
} catch (Exception unused) {
this.tvMovieDurationInfo.setText(0);
}
} catch (Exception unused2) {
}
}
@Override
public void a() {
}
public final void a1() {
f.j.a.i.b bVar = new f.j.a.i.b();
bVar.f(this.F);
bVar.j(this.E);
bVar.h(this.A);
bVar.i(this.D);
bVar.l(f.j.a.i.p.l.z(this.v));
this.G.a(bVar, "vod");
if (Build.VERSION.SDK_INT <= 21) {
this.ivFavourite.setImageResource(R.drawable.fav_heart_red);
}
if (Build.VERSION.SDK_INT >= 21) {
this.ivFavourite.setImageDrawable(this.v.getResources().getDrawable(R.drawable.fav_heart_red, null));
}
}
@Override
public void b() {
}
public final void b1() {
Window window = getWindow();
if (Build.VERSION.SDK_INT >= 19) {
window.clearFlags(67108864);
}
if (Build.VERSION.SDK_INT >= 21) {
window.addFlags(Integer.MIN_VALUE);
}
if (Build.VERSION.SDK_INT >= 21) {
window.setStatusBarColor(d.h.i.b.d(this, R.color.colorPrimaryDark));
}
}
@Override
public boolean dispatchKeyEvent(KeyEvent keyEvent) {
int keyCode = keyEvent.getKeyCode();
return keyCode == 82 ? keyEvent.getAction() == 0 ? onKeyDown(keyCode, keyEvent) : onKeyUp(keyCode, keyEvent) : super.dispatchKeyEvent(keyEvent);
}
@Override
public void e(String str) {
try {
if (this.w == null || !this.w.isShowing()) {
return;
}
this.w.dismiss();
Toast.makeText(this, this.v.getResources().getString(R.string.something_wrong), 1).show();
} catch (Exception unused) {
}
}
@SuppressLint({"InlinedApi"})
public void e1() {
getWindow().getDecorView().setSystemUiVisibility(5894);
}
public final void f1() {
new f.j.a.i.p.e(this.v);
this.G = new f.j.a.i.p.a(this.v);
this.T = new f.j.a.i.p.j(this.v);
this.tvPlay.requestFocus();
this.tvPlay.setFocusable(true);
TextView textView = this.tvMovieName;
if (textView != null) {
textView.setSelected(true);
}
ProgressDialog progressDialog = new ProgressDialog(this);
this.w = progressDialog;
progressDialog.setCanceledOnTouchOutside(false);
this.w.setMessage(this.v.getResources().getString(R.string.please_wait));
this.w.show();
SharedPreferences sharedPreferences = getSharedPreferences("loginPrefs", 0);
this.x = sharedPreferences;
String string = sharedPreferences.getString("username", "");
String string2 = this.x.getString("password", "");
if (string.isEmpty() || string2.isEmpty()) {
startActivity(new Intent(this, LoginActivity.class));
overridePendingTransition(R.anim.fade_out, R.anim.fade_in);
} else {
j1(this.v, string, string2);
}
this.logo.setOnClickListener(new k());
this.iv_back_button.setOnClickListener(new l());
}
@Override
public void g(VodInfoCallback vodInfoCallback) {
TextView textView;
int i2;
try {
if (this.w != null && this.w.isShowing()) {
this.w.dismiss();
}
if (vodInfoCallback == null || vodInfoCallback.a() == null) {
if (this.A != null && this.tvMovieName != null) {
this.tvMovieName.setText(this.A);
}
if (this.llDurationBox != null) {
this.llDurationBox.setVisibility(0);
}
if (this.llDurationBoxInfo != null) {
this.llDurationBoxInfo.setVisibility(0);
}
if (this.tvMovieDurationInfo != null) {
this.tvMovieDurationInfo.setText("N/A");
}
if (this.tvCastInfo != null) {
this.tvCastInfo.setText("N/A");
}
if (this.tvDirectorInfo != null) {
this.tvDirectorInfo.setText("N/A");
}
if (this.tvReleaseDateInfo != null) {
this.tvReleaseDateInfo.setText("N/A");
}
if (this.tv_genre_info != null) {
this.tv_genre_info.setText("N/A");
}
if (this.tvReadMore != null) {
this.tvReadMore.setVisibility(8);
}
if (this.tvCastInfo == null) {
return;
}
textView = this.tvCastInfo;
} else {
String f2 = vodInfoCallback.a().f();
String c2 = vodInfoCallback.a().c();
String b2 = vodInfoCallback.a().b();
this.J = b2;
String i3 = vodInfoCallback.a().i();
String h2 = vodInfoCallback.a().h();
String g2 = vodInfoCallback.a().g();
String e2 = vodInfoCallback.a().e();
this.W = vodInfoCallback.a().d().intValue();
try {
i2 = Integer.parseInt(vodInfoCallback.a().j());
} catch (Exception unused) {
i2 = 0;
}
if (i2 != 0) {
this.S.c(i2);
}
List<String> a2 = vodInfoCallback.a().a();
if (this.appbarToolbar != null && a2 != null && a2.size() > 0) {
this.Z = a2.get(new Random().nextInt(a2.size()));
if (this.v != null) {
t.q(this.v).l(this.Z).i(new c());
}
}
if (vodInfoCallback.a().k() == null || vodInfoCallback.a().k().isEmpty()) {
if (this.tvWatchTrailer != null) {
this.tvWatchTrailer.setVisibility(8);
}
if (this.ll_watch_trailer != null) {
this.ll_watch_trailer.setVisibility(8);
}
int intValue = vodInfoCallback.a().d().intValue();
if (this.v != null || f2 == null || f2.isEmpty()) {
this.ivMovieImage.setBackgroundResource(R.drawable.noposter);
} else {
x l2 = t.q(this.v).l(f2);
l2.j(R.drawable.rounded_edge_3);
l2.h(this.ivMovieImage, new d());
}
if (this.A != null && this.tvMovieName != null) {
this.tvMovieName.setText(this.A);
}
if (this.llReleasedBox != null || this.llReleasedBoxInfo == null || this.tvReleaseDateInfo == null || i3 == null || i3.isEmpty() || i3.equals("n/A")) {
if (this.llReleasedBox != null) {
this.llReleasedBox.setVisibility(0);
}
if (this.llReleasedBoxInfo != null) {
this.llReleasedBoxInfo.setVisibility(0);
}
if (this.tvReleaseDateInfo != null) {
this.tvReleaseDateInfo.setText("N/A");
}
} else {
this.llReleasedBox.setVisibility(0);
this.llReleasedBoxInfo.setVisibility(0);
this.tvReleaseDateInfo.setText(i3);
}
if (this.tvDirectorInfo != null || this.llDirectorBoxInfo == null || this.llDirectorBox == null || c2 == null || c2.isEmpty() || c2.equals("n/A")) {
if (this.llDirectorBox != null) {
this.llDirectorBox.setVisibility(0);
}
if (this.llDirectorBoxInfo != null) {
this.llDirectorBoxInfo.setVisibility(0);
}
if (this.tvDirectorInfo != null) {
this.tvDirectorInfo.setText("N/A");
}
} else {
this.llDirectorBox.setVisibility(0);
this.llDirectorBoxInfo.setVisibility(0);
this.tvDirectorInfo.setText(c2);
}
if (this.llCastBox != null || this.llCastBoxInfo == null || this.tvCastInfo == null || b2 == null || b2.isEmpty()) {
if (this.llCastBox != null) {
this.llCastBox.setVisibility(0);
}
if (this.llCastBoxInfo != null) {
this.llCastBoxInfo.setVisibility(0);
}
if (this.tvReadMore != null) {
this.tvReadMore.setVisibility(8);
}
if (this.tvCastInfo != null) {
this.tvCastInfo.setText("N/A");
}
} else {
this.llCastBox.setVisibility(0);
this.llCastBoxInfo.setVisibility(0);
if (b2.length() > 150) {
this.tvCastInfo.setText(b2);
this.tvReadMore.setVisibility(0);
} else {
this.tvCastInfo.setText(b2);
this.tvReadMore.setVisibility(8);
}
}
if (this.ratingBar != null && h2 != null && !h2.isEmpty() && !h2.equals("n/A")) {
this.ratingBar.setVisibility(0);
try {
this.ratingBar.setRating(Float.parseFloat(h2) / 2.0f);
} catch (NumberFormatException unused2) {
this.ratingBar.setRating(SingleCircularProgressDrawable.START_ANGLE_MAX_NORMAL);
}
}
if (this.tvMovieInfo == null && g2 != null && !g2.isEmpty() && !g2.equals("n/A")) {
this.tvMovieInfo.setText(g2);
} else if (this.tvMovieInfo != null) {
this.tvMovieInfo.setVisibility(8);
}
if (this.llGenreBox != null || this.llGenreBoxInfo == null || this.tv_genre_info == null || e2 == null || e2.isEmpty()) {
if (this.llGenreBox != null) {
this.llGenreBox.setVisibility(0);
}
if (this.llGenreBoxInfo != null) {
this.llGenreBoxInfo.setVisibility(0);
}
if (this.tv_genre_info != null) {
this.tv_genre_info.setText("N/A");
}
} else {
this.llGenreBox.setVisibility(0);
this.llGenreBoxInfo.setVisibility(0);
if (e2.length() > 40) {
}
this.tv_genre_info.setText(e2);
}
if (this.llDurationBox == null && this.llDurationBoxInfo != null && this.tvMovieDurationInfo != null) {
this.llDurationBox.setVisibility(0);
this.llDurationBoxInfo.setVisibility(0);
float f3 = intValue;
int i4 = (int) (f3 / 3600.0f);
try {
int round = Math.round((f3 % 3600.0f) / 60.0f);
if (i4 == 0) {
this.tvMovieDurationInfo.setText(round + com.facebook.internal.m.a);
} else {
this.tvMovieDurationInfo.setText(i4 + "h " + round + com.facebook.internal.m.a);
}
return;
} catch (Exception unused3) {
this.tvMovieDurationInfo.setText(intValue);
return;
}
}
if (this.llDurationBox != null) {
this.llDurationBox.setVisibility(0);
}
if (this.llDurationBoxInfo != null) {
this.llDurationBoxInfo.setVisibility(0);
}
if (this.tvMovieDurationInfo != null) {
return;
}
textView = this.tvMovieDurationInfo;
} else {
String k2 = vodInfoCallback.a().k();
this.N = k2;
if (k2 != null && !k2.isEmpty()) {
if (this.tvWatchTrailer != null) {
this.tvWatchTrailer.setVisibility(0);
}
if (this.ll_watch_trailer != null) {
this.ll_watch_trailer.setVisibility(0);
}
} else if (this.tvWatchTrailer != null) {
this.tvWatchTrailer.setVisibility(8);
}
int intValue2 = vodInfoCallback.a().d().intValue();
if (this.v != null) {
}
this.ivMovieImage.setBackgroundResource(R.drawable.noposter);
if (this.A != null) {
this.tvMovieName.setText(this.A);
}
if (this.llReleasedBox != null) {
}
if (this.llReleasedBox != null) {
}
if (this.llReleasedBoxInfo != null) {
}
if (this.tvReleaseDateInfo != null) {
}
if (this.tvDirectorInfo != null) {
}
if (this.llDirectorBox != null) {
}
if (this.llDirectorBoxInfo != null) {
}
if (this.tvDirectorInfo != null) {
}
if (this.llCastBox != null) {
}
if (this.llCastBox != null) {
}
if (this.llCastBoxInfo != null) {
}
if (this.tvReadMore != null) {
}
if (this.tvCastInfo != null) {
}
if (this.ratingBar != null) {
this.ratingBar.setVisibility(0);
this.ratingBar.setRating(Float.parseFloat(h2) / 2.0f);
}
if (this.tvMovieInfo == null) {
}
if (this.tvMovieInfo != null) {
}
if (this.llGenreBox != null) {
}
if (this.llGenreBox != null) {
}
if (this.llGenreBoxInfo != null) {
}
if (this.tv_genre_info != null) {
}
if (this.llDurationBox == null) {
}
if (this.llDurationBox != null) {
}
if (this.llDurationBoxInfo != null) {
}
if (this.tvMovieDurationInfo != null) {
}
}
}
textView.setText("N/A");
} catch (Exception unused4) {
}
}
public final void g1(ViewDetailsActivity viewDetailsActivity) {
View inflate = ((LayoutInflater) viewDetailsActivity.getSystemService("layout_inflater")).inflate(R.layout.layout_movie_trailer, (RelativeLayout) viewDetailsActivity.findViewById(R.id.rl_password_verification));
PopupWindow popupWindow = new PopupWindow(viewDetailsActivity);
this.H = popupWindow;
popupWindow.setContentView(inflate);
this.H.setWidth(-1);
this.H.setHeight(-1);
this.H.setFocusable(true);
this.H.setBackgroundDrawable(new BitmapDrawable());
this.H.showAtLocation(inflate, 17, 0, 0);
this.P = (Button) inflate.findViewById(R.id.bt_save_password);
this.I = (Button) inflate.findViewById(R.id.bt_close);
Button button = this.P;
if (button != null) {
button.setOnFocusChangeListener(new r(button));
}
Button button2 = this.I;
if (button2 != null) {
button2.setOnFocusChangeListener(new r(button2));
}
this.I.setOnClickListener(new h());
this.P.setOnClickListener(new i());
}
@Override
public void h(TMDBTrailerCallback tMDBTrailerCallback) {
if (tMDBTrailerCallback != null) {
try {
if (tMDBTrailerCallback.a() == null || tMDBTrailerCallback.a().size() <= 0) {
return;
}
for (int i2 = 0; i2 < tMDBTrailerCallback.a().size(); i2++) {
if (tMDBTrailerCallback.a().get(i2).b().equals("Trailer")) {
this.N = tMDBTrailerCallback.a().get(i2).a();
return;
}
}
} catch (Exception unused) {
}
}
}
public final void h1() {
this.G.z(this.E, this.F, "vod", this.A, f.j.a.i.p.l.z(this.v));
if (Build.VERSION.SDK_INT <= 21) {
this.ivFavourite.setImageResource(R.drawable.fav_heart_white);
}
if (Build.VERSION.SDK_INT >= 21) {
this.ivFavourite.setImageDrawable(this.v.getResources().getDrawable(R.drawable.fav_heart_white, null));
}
}
@Override
public void i0(TMDBCastsCallback tMDBCastsCallback) {
if (tMDBCastsCallback != null) {
try {
if (tMDBCastsCallback.a() != null && tMDBCastsCallback.a().size() > 0) {
this.rvCast.setLayoutManager(new LinearLayoutManager(this, 0, false));
this.rvCast.setItemAnimator(new d.w.d.c());
CastAdapter castAdapter = new CastAdapter(tMDBCastsCallback.a(), this.v, true, this.Z);
this.U = castAdapter;
this.rvCast.setAdapter(castAdapter);
this.rvCast.setVisibility(0);
}
} catch (Exception unused) {
return;
}
}
this.rvCast.setVisibility(8);
}
public final void i1(ViewDetailsActivity viewDetailsActivity) {
View inflate = ((LayoutInflater) viewDetailsActivity.getSystemService("layout_inflater")).inflate(R.layout.layout_cast_details, (RelativeLayout) viewDetailsActivity.findViewById(R.id.rl_password_verification));
TextView textView = (TextView) inflate.findViewById(R.id.tv_casts_info_popup);
this.L = textView;
textView.setText(this.J);
PopupWindow popupWindow = new PopupWindow(viewDetailsActivity);
this.H = popupWindow;
popupWindow.setContentView(inflate);
this.H.setWidth(-1);
this.H.setHeight(-1);
this.H.setFocusable(true);
this.H.showAtLocation(inflate, 17, 0, 0);
Button button = (Button) inflate.findViewById(R.id.bt_close);
this.I = button;
if (button != null) {
button.setOnFocusChangeListener(new r(button));
}
this.I.setOnClickListener(new j());
}
public final void j1(Context context, String str, String str2) {
int i2;
this.z = new f.j.a.j.i(this, context);
this.S = new f.j.a.j.e(this, context);
Intent intent = getIntent();
if (intent != null) {
try {
this.E = Integer.parseInt(intent.getStringExtra(f.j.a.h.i.a.s));
} catch (NumberFormatException unused) {
this.E = -1;
}
this.A = intent.getStringExtra("movie");
intent.getStringExtra("selectedPlayer");
this.B = intent.getStringExtra("streamType");
this.C = intent.getStringExtra("containerExtension");
this.F = intent.getStringExtra("categoryID");
this.D = intent.getStringExtra("num");
this.R = intent.getStringExtra("movie_icon");
f.j.a.i.o.b().k(this.R);
k1();
TextView textView = this.tvPlay;
if (textView != null) {
textView.requestFocus();
this.tvPlay.setFocusable(true);
}
if (this.G.g(this.E, this.F, "vod", f.j.a.i.p.l.z(context)).size() > 0) {
int i3 = Build.VERSION.SDK_INT;
i2 = R.drawable.fav_heart_red;
if (i3 <= 21) {
this.ivFavourite.setImageResource(R.drawable.fav_heart_red);
}
} else {
int i4 = Build.VERSION.SDK_INT;
i2 = R.drawable.fav_heart_white;
if (i4 <= 21) {
this.ivFavourite.setImageResource(R.drawable.fav_heart_white);
}
}
ImageView imageView = this.ivFavourite;
if (imageView != null) {
imageView.setOnFocusChangeListener(new r(imageView));
this.ivFavourite.setOnClickListener(new m(context));
}
int i5 = this.E;
if (i5 == -1 || i5 == 0) {
return;
}
this.z.b(str, str2, i5);
}
}
public void k1() {
ProgressBar progressBar;
int i2;
int i3;
int i4;
ArrayList<f.j.a.i.f> N = this.T.N(this.E);
if (N == null || N.size() <= 0) {
progressBar = this.pb_button_recent_watch;
if (progressBar == null) {
return;
}
} else {
TextView textView = this.tvPlay;
if (textView == null) {
return;
}
textView.setText(getResources().getString(R.string.resume));
String valueOf = String.valueOf(N.get(0).M());
String valueOf2 = String.valueOf(N.get(0).L());
if (this.pb_button_recent_watch == null) {
return;
}
try {
int R = f.j.a.h.i.e.R(valueOf);
i2 = Math.round(R / 1000.0f);
try {
this.Y = R;
i3 = f.j.a.h.i.e.R(valueOf2);
} catch (Exception unused) {
i3 = 0;
i4 = Math.round((i2 / i3) * 100.0f);
if (i4 == 0) {
}
}
} catch (Exception unused2) {
i2 = 0;
}
try {
i4 = Math.round((i2 / i3) * 100.0f);
} catch (Exception unused3) {
i4 = 0;
}
if (i4 == 0) {
this.pb_button_recent_watch.setProgress(i4);
this.pb_button_recent_watch.setVisibility(0);
return;
} else if (this.pb_button_recent_watch.getVisibility() != 0) {
return;
} else {
this.pb_button_recent_watch.setProgress(i4);
progressBar = this.pb_button_recent_watch;
}
}
progressBar.setVisibility(8);
}
@Override
public void onBackPressed() {
super.onBackPressed();
f.j.a.h.i.a.M = true;
overridePendingTransition(R.anim.fade_out, R.anim.fade_in);
}
@Override
public void onClick(View view) {
if (view.getId() != R.id.tv_header_title) {
return;
}
startActivity(new Intent(this, NewDashboardActivity.class));
}
@Override
public void onCreate(Bundle bundle) {
int i2;
this.v = this;
super.onCreate(bundle);
e1();
if (new f.j.a.k.d.a.a(this.v).w().equals(f.j.a.h.i.a.i0)) {
this.V = "tv";
i2 = R.layout.activity_view_details_tv;
} else {
this.V = "mobile";
i2 = R.layout.activity_view_details;
}
setContentView(i2);
ButterKnife.a(this);
overridePendingTransition(R.anim.fade_out, R.anim.fade_in);
this.X = true;
AppBarLayout appBarLayout = this.appbarToolbar;
if (appBarLayout != null) {
appBarLayout.setBackground(getResources().getDrawable(R.drawable.dashboard_background));
}
b1();
this.u = new Date();
TextView textView = this.tvPlay;
if (textView != null) {
textView.setOnFocusChangeListener(new r(textView));
}
a0 = d1(this.v);
this.K = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss", Locale.US);
TextView textView2 = this.tvReadMore;
if (textView2 != null) {
textView2.setOnFocusChangeListener(new r(textView2));
}
this.s = f.j.a.h.i.e.m0(f.j.a.k.d.c.a.e.d());
b0 = getApplicationContext().getPackageName();
TextView textView3 = this.tvWatchTrailer;
if (textView3 != null) {
textView3.setOnFocusChangeListener(new r(textView3));
}
this.r = f.j.a.h.i.e.m0(f.j.a.k.d.c.a.a.a());
this.t = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss", Locale.US);
getWindow().setFlags(BasicChronology.CACHE_SIZE, BasicChronology.CACHE_SIZE);
K0((Toolbar) findViewById(R.id.toolbar));
f1();
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
super.onCreateOptionsMenu(menu);
this.toolbar.x(R.menu.menu_text_icon);
this.M = menu;
menu.getItem(1).getSubMenu().findItem(R.id.empty);
if (f.j.a.i.p.l.f(this.v).equals("api")) {
menu.getItem(1).getSubMenu().findItem(R.id.menu_load_channels_vod).setVisible(false);
}
TypedValue typedValue = new TypedValue();
if (getTheme().resolveAttribute(16843499, typedValue, true)) {
TypedValue.complexToDimensionPixelSize(typedValue.data, getResources().getDisplayMetrics());
}
for (int i2 = 0; i2 < this.toolbar.getChildCount(); i2++) {
if (this.toolbar.getChildAt(i2) instanceof ActionMenuView) {
((Toolbar.e) this.toolbar.getChildAt(i2).getLayoutParams()).a = 16;
}
}
return true;
}
@Override
public boolean onKeyUp(int i2, KeyEvent keyEvent) {
if (i2 != 82) {
return super.onKeyUp(i2, keyEvent);
}
Menu menu = this.M;
if (menu != null) {
menu.performIdentifierAction(R.id.empty, 0);
return true;
}
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem menuItem) {
Context context;
int itemId = menuItem.getItemId();
if (itemId == R.id.nav_home) {
startActivity(new Intent(this, NewDashboardActivity.class));
finish();
}
if (itemId == R.id.nav_settings) {
startActivity(new Intent(this, SettingsActivity.class));
}
if (itemId == R.id.action_logout && (context = this.v) != null) {
b.a aVar = new b.a(context, R.style.AlertDialogCustom);
aVar.q(getResources().getString(R.string.logout_title));
aVar.h(getResources().getString(R.string.logout_message));
aVar.n(getResources().getString(R.string.yes), new o());
aVar.j(getResources().getString(R.string.no), new n(this));
aVar.s();
}
if (itemId == R.id.menu_load_channels_vod) {
b.a aVar2 = new b.a(this);
aVar2.q(this.v.getResources().getString(R.string.confirm_to_refresh));
aVar2.h(this.v.getResources().getString(R.string.do_you_want_toproceed));
aVar2.f(R.drawable.questionmark);
aVar2.n(this.v.getResources().getString(R.string.yes), new p());
aVar2.j(this.v.getResources().getString(R.string.no), new q(this));
aVar2.s();
}
if (itemId == R.id.menu_load_tv_guide) {
b.a aVar3 = new b.a(this);
aVar3.q(this.v.getResources().getString(R.string.confirm_to_refresh));
aVar3.h(this.v.getResources().getString(R.string.do_you_want_toproceed));
aVar3.f(R.drawable.questionmark);
aVar3.n(this.v.getResources().getString(R.string.yes), new a(this));
aVar3.j(this.v.getResources().getString(R.string.no), new b(this));
aVar3.s();
}
return super.onOptionsItemSelected(menuItem);
}
@Override
public void onResume() {
e1();
super.onResume();
f.j.a.h.i.e.f(this.v);
if (!this.X) {
k1();
}
this.X = false;
getWindow().setFlags(BasicChronology.CACHE_SIZE, BasicChronology.CACHE_SIZE);
}
@OnClick
public void onViewClicked(View view) {
String str;
String str2;
switch (view.getId()) {
case R.id.iv_movie_image:
case R.id.tv_play:
SharedPreferences sharedPreferences = this.v.getSharedPreferences("selectedPlayer", 0);
this.y = sharedPreferences;
String str3 = "";
String string = sharedPreferences.getString("selectedPlayer", "");
SimpleDateFormat simpleDateFormat = this.t;
if (c1(simpleDateFormat, simpleDateFormat.format(new Date(f.j.a.k.d.c.a.f.a(this.v))), this.K.format(this.u)) >= f.j.a.k.d.c.a.d.p() && (str = this.r) != null && this.s != null && (!a0.equals(str) || (this.r != null && (str2 = this.s) != null && !b0.equals(str2)))) {
this.O = Boolean.FALSE;
}
if (this.O.booleanValue()) {
try {
if (this.V.equals("mobile")) {
try {
this.Q = f.f.a.d.d.u.b.f(this.v).d().d();
} catch (Exception unused) {
}
}
if (this.Q != null && this.Q.c()) {
String E = f.j.a.h.i.e.E(this.v, this.E, this.C, "movie");
if (this.Q != null && this.Q.p() != null && this.Q.p().j() != null && this.Q.p().j().z() != null) {
str3 = this.Q.p().j().z();
}
if (str3.equals(E)) {
this.v.startActivity(new Intent(this.v, ExpandedControlsActivity.class));
return;
} else {
f.j.a.h.h.a.d(this.Y, true, f.j.a.h.h.a.a(this.A, "", "", 0, E, "videos/mp4", this.R, "", null), this.Q, this.v);
return;
}
}
new ArrayList();
ArrayList arrayList = new ArrayList();
g0 g0Var = new g0(this, view);
g0Var.c().inflate(R.menu.menu_players_hp, g0Var.b());
ArrayList<ExternalPlayerModelClass> p2 = new f.j.a.i.p.c(this.v).p();
if (p2 != null) {
try {
if (p2.size() > 0) {
g0Var.b().add(0, 0, 0, this.v.getResources().getString(R.string.nav_play));
ExternalPlayerModelClass externalPlayerModelClass = new ExternalPlayerModelClass();
externalPlayerModelClass.e(0);
externalPlayerModelClass.d(this.v.getResources().getString(R.string.play_with));
arrayList.add(externalPlayerModelClass);
int i2 = 0;
while (i2 < p2.size()) {
Menu b2 = g0Var.b();
int i3 = i2 + 1;
b2.add(0, i3, 0, this.v.getResources().getString(R.string.play_with) + " " + p2.get(i2).a());
arrayList.add(p2.get(i2));
i2 = i3;
}
g0Var.f(new f(arrayList, string));
g0Var.e(new g(this));
g0Var.g();
return;
}
} catch (Exception unused2) {
return;
}
}
f.j.a.h.i.e.V(this.v, string, this.E, this.B, this.C, this.D, this.A, "", this.W);
return;
} catch (Exception unused3) {
f.j.a.h.i.e.V(this.v, string, this.E, this.B, this.C, this.D, this.A, "", this.W);
return;
}
}
return;
case R.id.tv_readmore:
i1(this);
return;
case R.id.tv_watch_trailer:
String str4 = this.N;
if (str4 == null || str4.isEmpty()) {
g1(this);
return;
} else {
startActivity(new Intent(this, YouTubePlayerActivity.class).putExtra("you_tube_trailer", this.N));
return;
}
default:
return;
}
}
@Override
public void onWindowFocusChanged(boolean z) {
super.onWindowFocusChanged(z);
e1();
}
@Override
@SuppressLint({"SetTextI18n"})
public void v(TMDBGenreCallback tMDBGenreCallback) {
if (tMDBGenreCallback != null) {
try {
if (tMDBGenreCallback.a() != null && tMDBGenreCallback.a().size() > 0) {
String str = "";
for (int i2 = 0; i2 < tMDBGenreCallback.a().size(); i2++) {
str = str + ((f.f.d.w.g) tMDBGenreCallback.a().get(i2)).get("name").toString() + " / ";
}
String substring = str.substring(0, str.lastIndexOf(47));
if (this.llGenreBox == null || this.llGenreBoxInfo == null || this.tv_genre_info == null || substring.isEmpty()) {
if (this.llGenreBox != null) {
this.llGenreBox.setVisibility(0);
}
if (this.llGenreBoxInfo != null) {
this.llGenreBoxInfo.setVisibility(0);
}
} else {
this.llGenreBox.setVisibility(0);
this.llGenreBoxInfo.setVisibility(0);
if (substring.length() > 40) {
}
this.tv_genre_info.setText(substring);
}
if (tMDBGenreCallback != null || tMDBGenreCallback.b() == null) {
}
try {
int round = (int) Math.round(((Double) tMDBGenreCallback.b()).doubleValue() * 60.0d);
if (this.llDurationBox == null || this.llDurationBoxInfo == null || this.tvMovieDurationInfo == null) {
if (this.llDurationBox != null) {
this.llDurationBox.setVisibility(0);
}
if (this.llDurationBoxInfo != null) {
this.llDurationBoxInfo.setVisibility(0);
}
if (this.tvMovieDurationInfo != null) {
this.tvMovieDurationInfo.setText("N/A");
return;
}
return;
}
this.llDurationBox.setVisibility(0);
this.llDurationBoxInfo.setVisibility(0);
this.tvMovieDurationInfo.setText(round);
float f2 = round;
int i3 = (int) (f2 / 3600.0f);
try {
int round2 = Math.round((f2 % 3600.0f) / 60.0f);
if (i3 == 0) {
this.tvMovieDurationInfo.setText(round2 + com.facebook.internal.m.a);
} else {
this.tvMovieDurationInfo.setText(i3 + "h " + round2 + com.facebook.internal.m.a);
}
return;
} catch (Exception unused) {
this.tvMovieDurationInfo.setText(round);
return;
}
} catch (Exception unused2) {
if (this.llDurationBox != null) {
this.llDurationBox.setVisibility(0);
}
if (this.llDurationBoxInfo != null) {
this.llDurationBoxInfo.setVisibility(0);
}
if (this.tvMovieDurationInfo != null) {
this.tvMovieDurationInfo.setText("N/A");
return;
}
return;
}
}
} catch (Exception unused3) {
return;
}
}
if (this.llGenreBox != null) {
this.llGenreBox.setVisibility(0);
}
if (this.llGenreBoxInfo != null) {
this.llGenreBoxInfo.setVisibility(0);
}
if (this.tv_genre_info != null) {
this.tv_genre_info.setText("N/A");
}
if (tMDBGenreCallback != null) {
}
}
@Override
public void z(TMDBPersonInfoCallback tMDBPersonInfoCallback) {
}
}