FLIX VISION v2.8.2版本的 MD5 值为:4d33b143293b36f23ce5a6a5834e6993
以下内容为反编译后的 c.java 源代码,内容仅作参考
package l0;
import android.app.FragmentManager;
import android.content.ClipData;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.graphics.Canvas;
import android.os.Build;
import android.os.Bundle;
import android.util.Log;
import android.view.MenuItem;
import android.view.View;
import android.view.inputmethod.InputContentInfo;
import android.widget.AutoCompleteTextView;
import android.widget.Toast;
import androidx.appcompat.widget.Toolbar;
import androidx.leanback.widget.f0;
import androidx.leanback.widget.m0;
import b3.c;
import c3.j;
import com.google.android.gms.tasks.Continuation;
import com.google.android.gms.tasks.Task;
import com.google.firebase.encoders.EncodingException;
import com.google.gson.q;
import com.loopj.android.http.AsyncHttpClient;
import cz.msebera.android.httpclient.HttpHost;
import cz.msebera.android.httpclient.HttpStatus;
import e7.a0;
import e7.p0;
import e8.n;
import flix.com.vision.App;
import flix.com.vision.R;
import flix.com.vision.activities.FilterActivity;
import flix.com.vision.activities.MainActivity;
import flix.com.vision.activities.UserTorrentsActivity;
import flix.com.vision.activities.leanback.FilterActivityLeanBack;
import flix.com.vision.activities.leanback.fragment.TVListFragmentMain;
import flix.com.vision.activities.player.AdultVideoPlayerActivity;
import flix.com.vision.activities.player.PlayerActivityLiveTV;
import flix.com.vision.api.alldebrid.AllDebridApiKeyEntryActivity;
import flix.com.vision.api.premiumize.PremApiKeyEntryActivity;
import flix.com.vision.models.Movie;
import flix.com.vision.utils.JsonUtils;
import i0.c;
import i0.d0;
import i5.a;
import j0.c;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.net.ConnectException;
import java.net.HttpURLConnection;
import java.net.URL;
import java.net.UnknownHostException;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.ExecutorService;
import java.util.zip.GZIPInputStream;
import java.util.zip.GZIPOutputStream;
import k3.h;
import l0.d;
import l3.o;
import l3.r;
import m3.a;
import q7.c;
import rb.k;
import rb.m;
import rc.f;
import u7.a;
import xb.i;
import xb.l;
public final class c implements d.c, i3.a, a.InterfaceC0214a, o.a, a.InterfaceC0182a, c.b, a.InterfaceC0265a, Continuation, a3.d, f, androidx.leanback.widget.c, Toolbar.h {
public final int f16054b;
public final Object f16055g;
public c(Object obj, int i10) {
this.f16054b = i10;
this.f16055g = obj;
}
public final boolean a(e eVar, int i10, Bundle bundle) {
View view = (View) this.f16055g;
if (Build.VERSION.SDK_INT >= 25 && (i10 & 1) != 0) {
try {
eVar.requestPermission();
InputContentInfo inputContentInfo = (InputContentInfo) eVar.unwrap();
bundle = bundle == null ? new Bundle() : new Bundle(bundle);
bundle.putParcelable("androidx.core.view.extra.INPUT_CONTENT_INFO", inputContentInfo);
} catch (Exception e10) {
Log.w("InputConnectionCompat", "Can't insert content from IME; requestPermission() failed", e10);
return false;
}
}
return d0.performReceiveContent(view, new c.a(new ClipData(eVar.getDescription(), new ClipData.Item(eVar.getContentUri())), 2).setLinkUri(eVar.getLinkUri()).setExtras(bundle).build()) == null;
}
@Override
public final void accept(Object obj) {
int i10 = this.f16054b;
Object obj2 = this.f16055g;
switch (i10) {
case 16:
FilterActivity filterActivity = (FilterActivity) obj2;
ArrayList<Movie> parseListMovie = JsonUtils.parseListMovie((com.google.gson.o) obj, filterActivity.E);
int size = parseListMovie.size();
ArrayList<Movie> arrayList = filterActivity.L;
if (size > 0 && filterActivity.R) {
arrayList.clear();
filterActivity.R = false;
} else if (parseListMovie.size() == 0) {
Toast.makeText(filterActivity.getBaseContext(), "No more result", 0).show();
filterActivity.V.setupMoreListener(null, 20);
filterActivity.f11753b0.notifyDataSetChanged();
return;
}
arrayList.addAll(App.getInstance().filterList(parseListMovie));
if (arrayList.size() > parseListMovie.size()) {
filterActivity.f11753b0.notifyItemRangeChanged(arrayList.size() - 1, parseListMovie.size());
} else {
filterActivity.f11753b0.notifyDataSetChanged();
}
if (parseListMovie.size() <= 0 || arrayList.size() != 0) {
return;
}
int i11 = filterActivity.f11755d0 + 1;
filterActivity.f11755d0 = i11;
filterActivity.d(i11);
return;
case 17:
MainActivity mainActivity = (MainActivity) obj2;
int i12 = MainActivity.f11782p0;
mainActivity.getClass();
ArrayList<String> parseSuggestions = JsonUtils.parseSuggestions((com.google.gson.o) obj);
mainActivity.T.clearSuggestions();
mainActivity.T.addSuggestions(parseSuggestions);
return;
case 18:
int i13 = UserTorrentsActivity.P;
return;
case 19:
FilterActivityLeanBack filterActivityLeanBack = (FilterActivityLeanBack) obj2;
ArrayList<Movie> parseListMovie2 = JsonUtils.parseListMovie((com.google.gson.o) obj, filterActivityLeanBack.E);
int size2 = parseListMovie2.size();
ArrayList<Movie> arrayList2 = filterActivityLeanBack.L;
if (size2 > 0 && filterActivityLeanBack.R) {
arrayList2.clear();
filterActivityLeanBack.R = false;
} else if (parseListMovie2.size() == 0) {
Toast.makeText(filterActivityLeanBack.getBaseContext(), "No more result", 0).show();
filterActivityLeanBack.V.setupMoreListener(null, 20);
filterActivityLeanBack.f11919b0.notifyDataSetChanged();
return;
}
arrayList2.addAll(App.getInstance().filterList(parseListMovie2));
if (arrayList2.size() > parseListMovie2.size()) {
filterActivityLeanBack.f11919b0.notifyItemRangeChanged(arrayList2.size() - 1, parseListMovie2.size());
} else {
filterActivityLeanBack.f11919b0.notifyDataSetChanged();
}
if (parseListMovie2.size() <= 0 || arrayList2.size() != 0) {
return;
}
int i14 = filterActivityLeanBack.f11921d0 + 1;
filterActivityLeanBack.f11921d0 = i14;
filterActivityLeanBack.d(i14);
return;
case 20:
case 21:
case 22:
default:
l lVar = (l) obj2;
com.google.gson.o oVar = (com.google.gson.o) obj;
if (lVar.f19849k) {
return;
}
q asJsonObject = oVar.getAsJsonObject();
String asString = asJsonObject.get("id").getAsString();
String asString2 = asJsonObject.get("uri").getAsString();
if (asString2 != null && asString2.contains(HttpHost.DEFAULT_SCHEME_NAME)) {
lVar.b(asString2, asString);
return;
} else {
if (asString == null || asString.length() <= 0) {
return;
}
lVar.b("https://api.real-debrid.com/rest/1.0/torrents/info/".concat(asString), asString);
return;
}
case 23:
int i15 = AllDebridApiKeyEntryActivity.J;
la.d dVar = ((AllDebridApiKeyEntryActivity) obj2).I;
if (dVar != null) {
try {
dVar.dismiss();
return;
} catch (Exception unused) {
return;
}
}
return;
case 24:
int i16 = PremApiKeyEntryActivity.J;
la.d dVar2 = ((PremApiKeyEntryActivity) obj2).I;
if (dVar2 != null) {
try {
dVar2.dismiss();
return;
} catch (Exception unused2) {
return;
}
}
return;
case 25:
k kVar = (k) obj2;
kVar.getClass();
String asString3 = ((com.google.gson.o) obj).getAsJsonObject().get("link").getAsString();
if (asString3 == null || asString3.length() <= 0 || asString3.contains("rabbitstream") || asString3.contains("dokicloud")) {
return;
}
ib.o oVar2 = new ib.o();
oVar2.f13840w = true;
oVar2.f13837t = kVar.checkLinkLabel(asString3);
oVar2.f13838u = asString3;
kVar.addLink(oVar2);
return;
case 26:
m mVar = (m) obj2;
mVar.getClass();
String asString4 = ((com.google.gson.o) obj).getAsJsonObject().get("link").getAsString();
if (asString4 == null || asString4.length() <= 0 || asString4.contains("rabbitstream") || asString4.contains("dokicloud")) {
return;
}
ib.o oVar3 = new ib.o();
oVar3.f13840w = true;
oVar3.f13837t = mVar.checkLinkLabel(asString4);
oVar3.f13838u = asString4;
mVar.addLink(oVar3);
return;
case 27:
xb.f fVar = (xb.f) obj2;
com.google.gson.o oVar4 = (com.google.gson.o) obj;
if (fVar.f19828k) {
return;
}
q asJsonObject2 = oVar4.getAsJsonObject();
String asString5 = asJsonObject2.get("id").getAsString();
String asString6 = asJsonObject2.get("uri").getAsString();
if (asString6 != null && asString6.contains(HttpHost.DEFAULT_SCHEME_NAME)) {
fVar.b(asString6, asString5);
return;
} else {
if (asString5 == null || asString5.length() <= 0) {
return;
}
fVar.b("https://api.real-debrid.com/rest/1.0/torrents/info/".concat(asString5), asString5);
return;
}
case 28:
i iVar = (i) obj2;
com.google.gson.o oVar5 = (com.google.gson.o) obj;
if (iVar.f19837h) {
return;
}
q asJsonObject3 = oVar5.getAsJsonObject();
String asString7 = asJsonObject3.get("id").getAsString();
String asString8 = asJsonObject3.get("uri").getAsString();
if (asString8 != null && asString8.contains(HttpHost.DEFAULT_SCHEME_NAME)) {
iVar.b(asString8, asString7);
return;
} else {
if (asString7 == null || asString7.length() <= 0) {
return;
}
iVar.b("https://api.real-debrid.com/rest/1.0/torrents/info/".concat(asString7), asString7);
return;
}
}
}
@Override
public final Object apply(Object obj) {
int i10 = this.f16054b;
Object obj2 = this.f16055g;
switch (i10) {
case 1:
b3.c cVar = (b3.c) obj2;
c.a aVar = (c.a) obj;
cVar.getClass();
h3.a.i("CctTransportBackend", "Making request to: %s", aVar.f4246a);
HttpURLConnection httpURLConnection = (HttpURLConnection) aVar.f4246a.openConnection();
httpURLConnection.setConnectTimeout(30000);
httpURLConnection.setReadTimeout(cVar.f4245g);
httpURLConnection.setDoOutput(true);
httpURLConnection.setInstanceFollowRedirects(false);
httpURLConnection.setRequestMethod("POST");
httpURLConnection.setRequestProperty("User-Agent", String.format("datatransport/%s android/", "3.1.9"));
httpURLConnection.setRequestProperty("Content-Encoding", AsyncHttpClient.ENCODING_GZIP);
httpURLConnection.setRequestProperty("Content-Type", "application/json");
httpURLConnection.setRequestProperty("Accept-Encoding", AsyncHttpClient.ENCODING_GZIP);
String str = aVar.f4248c;
if (str != null) {
httpURLConnection.setRequestProperty("X-Goog-Api-Key", str);
}
try {
OutputStream outputStream = httpURLConnection.getOutputStream();
try {
GZIPOutputStream gZIPOutputStream = new GZIPOutputStream(outputStream);
try {
((c.a) cVar.f4239a).encode(aVar.f4247b, new BufferedWriter(new OutputStreamWriter(gZIPOutputStream)));
gZIPOutputStream.close();
if (outputStream != null) {
outputStream.close();
}
int responseCode = httpURLConnection.getResponseCode();
h3.a.i("CctTransportBackend", "Status Code: %d", Integer.valueOf(responseCode));
h3.a.d("CctTransportBackend", "Content-Type: %s", httpURLConnection.getHeaderField("Content-Type"));
h3.a.d("CctTransportBackend", "Content-Encoding: %s", httpURLConnection.getHeaderField("Content-Encoding"));
if (responseCode == 302 || responseCode == 301 || responseCode == 307) {
return new c.b(responseCode, new URL(httpURLConnection.getHeaderField("Location")), 0L);
}
if (responseCode != 200) {
return new c.b(responseCode, null, 0L);
}
InputStream inputStream = httpURLConnection.getInputStream();
try {
InputStream gZIPInputStream = AsyncHttpClient.ENCODING_GZIP.equals(httpURLConnection.getHeaderField("Content-Encoding")) ? new GZIPInputStream(inputStream) : inputStream;
try {
c.b bVar = new c.b(responseCode, null, j.fromJson(new BufferedReader(new InputStreamReader(gZIPInputStream))).getNextRequestWaitMillis());
if (gZIPInputStream != null) {
gZIPInputStream.close();
}
if (inputStream != null) {
inputStream.close();
}
return bVar;
} finally {
}
} catch (Throwable th) {
if (inputStream != null) {
try {
inputStream.close();
} catch (Throwable th2) {
th.addSuppressed(th2);
}
}
throw th;
}
} finally {
}
} catch (Throwable th3) {
if (outputStream != null) {
try {
outputStream.close();
} catch (Throwable th4) {
th3.addSuppressed(th4);
}
}
throw th3;
}
} catch (EncodingException e10) {
e = e10;
h3.a.e("CctTransportBackend", "Couldn't encode request, returning with 400", e);
return new c.b(HttpStatus.SC_BAD_REQUEST, null, 0L);
} catch (ConnectException e11) {
e = e11;
h3.a.e("CctTransportBackend", "Couldn't open connection, returning with 500", e);
return new c.b(500, null, 0L);
} catch (UnknownHostException e12) {
e = e12;
h3.a.e("CctTransportBackend", "Couldn't open connection, returning with 500", e);
return new c.b(500, null, 0L);
} catch (IOException e13) {
e = e13;
h3.a.e("CctTransportBackend", "Couldn't encode request, returning with 400", e);
return new c.b(HttpStatus.SC_BAD_REQUEST, null, 0L);
}
case 8:
Map map = (Map) obj2;
Cursor cursor = (Cursor) obj;
a3.b bVar2 = o.f16089k;
while (cursor.moveToNext()) {
long j10 = cursor.getLong(0);
Set set = (Set) map.get(Long.valueOf(j10));
if (set == null) {
set = new HashSet();
map.put(Long.valueOf(j10), set);
}
set.add(new o.b(cursor.getString(1), cursor.getString(2)));
}
return null;
default:
int i11 = e8.e.f11250b;
((e8.e) obj2).getClass();
String encode = ((c.a) n.f11270a.getSESSION_EVENT_ENCODER$com_google_firebase_firebase_sessions()).encode((e8.m) obj);
vd.i.checkNotNullExpressionValue(encode, "SessionEvents.SESSION_EVENT_ENCODER.encode(value)");
Log.d("EventGDTLogger", "Session Event: " + encode);
byte[] bytes = encode.getBytes(ee.c.f11328b);
vd.i.checkNotNullExpressionValue(bytes, "this as java.lang.String).getBytes(charset)");
return bytes;
}
}
public final void b(f0.a aVar, Object obj, m0.b bVar, Object obj2) {
flix.com.vision.activities.leanback.fragment.a aVar2 = ((TVListFragmentMain) this.f16055g).G0;
if (aVar2 != null) {
if (obj instanceof Movie) {
aVar2.onMovieClicked((Movie) obj);
} else if (obj instanceof mb.a) {
aVar2.onNetworkClicked((mb.a) obj);
}
}
}
public final void c(boolean z10) {
i6.k kVar = (i6.k) this.f16055g;
AutoCompleteTextView autoCompleteTextView = kVar.f13645h;
if (autoCompleteTextView != null) {
if (autoCompleteTextView.getInputType() != 0) {
return;
}
d0.setImportantForAccessibility(kVar.f13659d, z10 ? 2 : 1);
}
}
public final Object d() {
int i10 = this.f16054b;
Object obj = this.f16055g;
switch (i10) {
case 6:
return ((r) obj).getWritableDatabase();
default:
a3.b bVar = o.f16089k;
((SQLiteDatabase) obj).beginTransaction();
return null;
}
}
public final void e(Canvas canvas) {
super/*android.widget.FrameLayout*/.dispatchDraw(canvas);
}
@Override
public final Object execute() {
int i10 = this.f16054b;
Object obj = this.f16055g;
switch (i10) {
case 2:
return Integer.valueOf(((l3.d) obj).cleanUp());
case 3:
((h) obj).f15596i.resetClientMetrics();
return null;
case 4:
return ((l3.c) obj).loadClientMetrics();
default:
k3.j jVar = (k3.j) obj;
Iterator<d3.o> it = jVar.f15607b.loadActiveContexts().iterator();
while (it.hasNext()) {
jVar.f15608c.schedule(it.next(), 1);
}
return null;
}
}
@Override
public final void handle(u7.b bVar) {
int i10 = this.f16054b;
Object obj = this.f16055g;
switch (i10) {
case 11:
b7.b bVar2 = (b7.b) obj;
bVar2.getClass();
b7.e.getLogger().d("Crashlytics native component now available.");
bVar2.f4278b.set((b7.a) bVar.get());
return;
default:
((c8.a) bVar.get()).registerRolloutsStateSubscriber("firebase", (b7.c) obj);
b7.e.getLogger().d("Registering RemoteConfig Rollouts subscriber");
return;
}
}
@Override
public final boolean onMenuItemClick(MenuItem menuItem) {
int i10 = this.f16054b;
Object obj = this.f16055g;
switch (i10) {
case 21:
AdultVideoPlayerActivity adultVideoPlayerActivity = (AdultVideoPlayerActivity) obj;
int i11 = AdultVideoPlayerActivity.U;
adultVideoPlayerActivity.getClass();
if (menuItem.getItemId() == R.id.action_related_videos) {
try {
adultVideoPlayerActivity.G.scrollToPosition(0);
} catch (Exception e10) {
e10.printStackTrace();
}
if (adultVideoPlayerActivity.F.getVisibility() == 0) {
adultVideoPlayerActivity.g();
} else {
adultVideoPlayerActivity.h();
}
}
if (menuItem.getItemId() == R.id.aspect_ratio_button) {
adultVideoPlayerActivity.L.setScaleType();
}
return true;
default:
PlayerActivityLiveTV playerActivityLiveTV = (PlayerActivityLiveTV) obj;
int i12 = PlayerActivityLiveTV.T;
playerActivityLiveTV.getClass();
if (menuItem.getItemId() == R.id.action_episodes) {
try {
playerActivityLiveTV.I.scrollToPosition(playerActivityLiveTV.L);
} catch (Exception e11) {
e11.printStackTrace();
}
playerActivityLiveTV.H.setVisibility(0);
playerActivityLiveTV.H.startAnimation(playerActivityLiveTV.J);
playerActivityLiveTV.I.requestFocus();
} else if (menuItem.getItemId() == R.id.action_close) {
if (playerActivityLiveTV.H.getVisibility() == 0) {
playerActivityLiveTV.H.startAnimation(playerActivityLiveTV.K);
playerActivityLiveTV.H.setVisibility(8);
return true;
}
FragmentManager fragmentManager = playerActivityLiveTV.getFragmentManager();
la.d newInstance = la.d.newInstance(playerActivityLiveTV, true);
newInstance.setTitle("Exit");
newInstance.setMessage("Do you really want to stop playback and exit ?");
newInstance.setButton1("CANCEL", new aa.c());
newInstance.setButton2("YES", new aa.d(playerActivityLiveTV));
try {
newInstance.show(fragmentManager, "");
} catch (Exception e12) {
e12.printStackTrace();
}
}
return false;
}
}
@Override
public final Object then(Task task) {
boolean z10;
int i10 = this.f16054b;
Object obj = this.f16055g;
switch (i10) {
case 13:
((e7.m0) obj).getClass();
if (task.isSuccessful()) {
a0 a0Var = (a0) task.getResult();
b7.e.getLogger().d("Crashlytics report successfully enqueued to DataTransport: " + a0Var.getSessionId());
File reportFile = a0Var.getReportFile();
if (reportFile.delete()) {
b7.e.getLogger().d("Deleted report file: " + reportFile.getPath());
} else {
b7.e.getLogger().w("Crashlytics could not delete report file: " + reportFile.getPath());
}
z10 = true;
} else {
b7.e.getLogger().w("Crashlytics report could not be enqueued to DataTransport", task.getException());
z10 = false;
}
return Boolean.valueOf(z10);
default:
ExecutorService executorService = p0.f11134a;
((CountDownLatch) obj).countDown();
return null;
}
}
}