FLIX VISION v2.8.2版本的 MD5 值为:4c8f04d6db90386313134c0796491235
以下内容为反编译后的 AdultVideosSearchActivity.java 源代码,内容仅作参考
package flix.com.vision.activities.adult;
import android.animation.ArgbEvaluator;
import android.animation.ValueAnimator;
import android.app.FragmentManager;
import android.content.Intent;
import android.content.res.AssetManager;
import android.graphics.Typeface;
import android.os.Bundle;
import android.os.Handler;
import android.util.DisplayMetrics;
import android.view.ContextThemeWrapper;
import android.view.Menu;
import android.view.MenuItem;
import android.widget.RelativeLayout;
import android.widget.Toast;
import androidx.appcompat.app.d;
import androidx.appcompat.widget.Toolbar;
import ba.e;
import com.malinskiy.superrecyclerview.SuperRecyclerView;
import flix.com.vision.App;
import flix.com.vision.R;
import flix.com.vision.activities.player.AdultVideoPlayerActivity;
import flix.com.vision.helpers.CenterGridLayoutManager;
import flix.com.vision.materialsearchview.MaterialSearchView;
import flix.com.vision.tv.Constant;
import hb.b;
import hb.c;
import java.util.ArrayList;
import java.util.Locale;
import la.d;
import org.apache.commons.lang3.StringUtils;
import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe;
import org.greenrobot.eventbus.ThreadMode;
import v9.w;
import v9.x;
import w9.h;
import w9.i;
public class AdultVideosSearchActivity extends x9.a implements c, n8.a, hb.a, b {
public static final int S = 0;
public RelativeLayout D;
public Toolbar E;
public MaterialSearchView F;
public SuperRecyclerView I;
public e J;
public String K;
public int Q;
public d R;
public final ArrayList<jb.b> G = new ArrayList<>();
public final ArrayList<jb.c> H = new ArrayList<>();
public String L = "https://www.xvideos.com/?k=";
public int M = 0;
public String N = "";
public int O = 0;
public boolean P = false;
public class a {
public boolean f11915a;
public ArrayList<jb.c> f11916b;
public a(AdultVideosSearchActivity adultVideosSearchActivity) {
}
}
@Override
public void OnStreamResolvedSuccess(ArrayList<jb.b> arrayList) {
d dVar = this.R;
if (dVar != null) {
try {
dVar.dismiss();
} catch (Exception unused) {
}
}
ArrayList<jb.b> arrayList2 = this.G;
arrayList2.clear();
arrayList2.addAll(arrayList);
a aVar = new a(this);
aVar.f11915a = true;
EventBus.getDefault().post(aVar);
}
@Override
public void OnVideoListSuccess(ArrayList<jb.c> arrayList) {
d dVar = this.R;
if (dVar != null) {
try {
dVar.dismiss();
} catch (Exception unused) {
}
}
a aVar = new a(this);
aVar.f11916b = arrayList;
aVar.f11915a = false;
EventBus.getDefault().post(aVar);
}
public final void d(String str) {
Intent intent = new Intent(this, (Class<?>) AdultVideoPlayerActivity.class);
intent.putExtra("url", str);
ArrayList<jb.c> arrayList = this.H;
intent.putExtra("videoUrl", arrayList.get(this.O).f15476b);
intent.putExtra("title", arrayList.get(this.O).f15475a);
intent.putExtra("image_url", arrayList.get(this.O).f15477c);
startActivity(intent);
}
public void getVideos(int i10) {
this.K = this.L + this.N.replace(StringUtils.SPACE, "+") + "&p=" + i10;
new pb.d(this, this).process(this.K, i10);
}
@Override
public void onBackPressed() {
if (this.F.isOpen()) {
this.F.closeSearch();
return;
}
if (this.P) {
this.P = false;
super.onBackPressed();
finish();
return;
}
if (this.H.size() < 200) {
this.I.getRecyclerView().smoothScrollToPosition(0);
} else {
this.I.getRecyclerView().scrollToPosition(0);
}
this.P = true;
this.I.clearFocus();
this.E.requestFocus();
Toast.makeText(getBaseContext(), "Press Back again to Exit", 0).show();
new Handler().postDelayed(new h(this, 2), 2000L);
}
@Override
public void onCreate(Bundle bundle) {
super.onCreate(bundle);
EventBus.getDefault().register(this);
this.L = "https://www.xvideos.com/?k=";
AssetManager assets = getAssets();
String str = Constant.f12431b;
Typeface.createFromAsset(assets, "fonts/pproduct_sans_rregular.ttf");
new p2.a();
setContentView(R.layout.activity_adult_search);
this.J = new e(this, this, this.H);
MaterialSearchView materialSearchView = (MaterialSearchView) findViewById(R.id.search_view);
this.F = materialSearchView;
materialSearchView.setShouldKeepHistory(false);
this.F.setTintAlpha(1);
this.F.setHint("Search for any adult video...");
this.F.setOnQueryTextListener(new i(this));
this.D = (RelativeLayout) findViewById(R.id.activity_player);
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
this.E = toolbar;
setSupportActionBar(toolbar);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
getSupportActionBar().setTitle("Adult Video Search");
SuperRecyclerView superRecyclerView = (SuperRecyclerView) findViewById(R.id.recyclerview_categories);
this.I = superRecyclerView;
superRecyclerView.setAdapter(this.J);
DisplayMetrics a5 = o.a.a(getWindowManager().getDefaultDisplay());
this.I.setLayoutManager(new CenterGridLayoutManager(this, Math.round((a5.widthPixels / getResources().getDisplayMetrics().density) / 130)));
this.I.addItemDecoration(new gb.d(5));
this.I.setupMoreListener(this, 28);
setBackgroundColor();
new Handler().postDelayed(new h(this, 1), 500L);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.adult_search_menu, menu);
return true;
}
@Subscribe(threadMode = ThreadMode.MAIN)
public void onMessageEvent(a aVar) {
ArrayList<jb.c> arrayList = this.H;
int size = arrayList.size();
ArrayList<jb.c> arrayList2 = aVar.f11916b;
if (arrayList2 != null && arrayList2.size() > 0) {
arrayList.addAll(aVar.f11916b);
this.J.notifyItemRangeInserted(size, aVar.f11916b.size());
return;
}
if (aVar.f11915a) {
ArrayList<jb.b> arrayList3 = this.G;
if (App.getInstance().f11732q.getBoolean("pref_adult_zone_always_play_best", true) && arrayList3.size() > 0) {
playAdultLink(arrayList3.get(0).f15474g);
return;
}
ArrayList arrayList4 = new ArrayList();
for (int i10 = 0; i10 < arrayList3.size(); i10++) {
arrayList4.add(arrayList3.get(i10).f15473b.toUpperCase(Locale.ROOT));
}
CharSequence[] charSequenceArr = (CharSequence[]) arrayList4.toArray(new CharSequence[arrayList4.size()]);
d.a aVar2 = new d.a(new ContextThemeWrapper(this, R.style.AlertDialogCustom));
aVar2.setSingleChoiceItems(charSequenceArr, -1, new w(this, arrayList3, 5));
aVar2.setOnDismissListener(new x(7));
aVar2.show();
}
}
@Override
public void onMoreAsked(int i10, int i11, int i12) {
new Handler().postDelayed(new h(this, 0), 200L);
}
@Override
public boolean onOptionsItemSelected(MenuItem menuItem) {
if (menuItem.getItemId() == R.id.action_search) {
this.F.openSearch();
}
return super.onOptionsItemSelected(menuItem);
}
@Override
public void onResume() {
super.onResume();
}
@Override
public void openAdultVideo(int i10) {
this.O = i10;
FragmentManager fragmentManager = getFragmentManager();
la.d newInstance = la.d.newInstance(this, false);
this.R = newInstance;
newInstance.setloading();
try {
this.R.show(fragmentManager, "");
} catch (Exception e10) {
e10.printStackTrace();
}
new pb.b(this, this).process(this.H.get(i10).f15476b);
}
public void playAdultLink(String str) {
int i10 = App.getInstance().f11732q.getInt("pref_adult_zone_player", 0);
if (i10 <= 0) {
d(str);
return;
}
try {
if (i10 == 1) {
gb.h.PlayMXPlayer(this, null, str, null, null, -1);
} else if (i10 == 2) {
gb.h.PlayVLC(this, null, str, null, null, -1);
} else if (i10 != 3) {
} else {
gb.h.PlayXPlayer(this, null, str);
}
} catch (Exception unused) {
Toast.makeText(getBaseContext(), "Failed to load external Player, Make sure it is installed", 1).show();
d(str);
}
}
public void setBackgroundColor() {
this.Q = 2505092;
ValueAnimator ofObject = ValueAnimator.ofObject(new ArgbEvaluator(), Integer.valueOf(this.Q), 0);
ofObject.setDuration(2000L);
ofObject.addUpdateListener(new y5.a(this, 15));
ofObject.start();
this.Q = 0;
}
}