影视仓 v5.0.24版本的 MD5 值为:620341689ccdc375a3b86527e140060e
以下内容为反编译后的 SearchActivity.java 源代码,内容仅作参考
package com.github.tvbox.osc.ui.activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.EditText;
import android.widget.TextView;
import androidx.lifecycle.ViewModelProvider;
import com.androidx.cb;
import com.androidx.ck;
import com.androidx.cu;
import com.androidx.e00;
import com.androidx.et;
import com.androidx.gw0;
import com.androidx.i;
import com.androidx.jm0;
import com.androidx.jr0;
import com.androidx.kr0;
import com.androidx.lr0;
import com.androidx.lt0;
import com.androidx.mr;
import com.androidx.mr0;
import com.androidx.oO0O00oO;
import com.androidx.or;
import com.androidx.qr0;
import com.androidx.t;
import com.androidx.y0;
import com.androidx.y21;
import com.androidx.yq;
import com.github.tvbox.osc.R$id;
import com.github.tvbox.osc.R$layout;
import com.github.tvbox.osc.base.BaseActivity;
import com.github.tvbox.osc.ui.tv.widget.SearchKeyboard;
import com.owen.tvrecyclerview.widget.TvRecyclerView;
import com.owen.tvrecyclerview.widget.V7FlowLayoutManager;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
public class SearchActivity extends BaseActivity {
public static Boolean OooOo;
public static Boolean OooOoO0;
public TvRecyclerView OooO;
public EditText OooOO0;
public TextView OooOO0O;
public TextView OooOO0o;
public cu OooOOO;
public SearchKeyboard OooOOO0;
public TextView OooOOOO;
public TvRecyclerView OooOOoo;
public View OooOo0;
public oO0O00oO OooOo00;
public String OooOo0O;
public HashMap OooOOOo = null;
public qr0 OooOOo0 = null;
public List OooOOo = new ArrayList();
public final ArrayList OooOo0o = new ArrayList();
public static void OooO(SearchActivity searchActivity, String str) {
searchActivity.getClass();
((yq) ((yq) new yq("https://suggest.video.iqiyi.com/").params("if", "mobile", new boolean[0])).params(y0.KEY, str, new boolean[0])).execute(new jr0(searchActivity, 1));
new yq("https://tv.aiseet.atianqi.com/i-tvbin/qtv_video/search/get_search_smart_box?format=json&page_num=0&page_size=50&key=".concat(str)).execute(new mr0(searchActivity));
}
public static LinkedHashMap OooOO0(SearchActivity searchActivity, LinkedHashMap linkedHashMap) {
searchActivity.getClass();
ArrayList arrayList = new ArrayList(linkedHashMap.entrySet());
Collections.sort(arrayList, new jm0(searchActivity, 4));
LinkedHashMap linkedHashMap2 = new LinkedHashMap();
Iterator it = arrayList.iterator();
while (it.hasNext()) {
Map.Entry entry = (Map.Entry) it.next();
linkedHashMap2.put((String) entry.getKey(), (ArrayList) entry.getValue());
}
return linkedHashMap2;
}
public static void OooOO0O(SearchActivity searchActivity, ArrayList arrayList) {
ArrayList arrayList2 = searchActivity.OooOo0o;
if (arrayList2.isEmpty()) {
arrayList2.addAll(arrayList);
searchActivity.OooOOO.OooOOO(arrayList2);
return;
}
Iterator it = arrayList.iterator();
while (it.hasNext()) {
String str = (String) it.next();
if (!arrayList2.contains(str)) {
arrayList2.add(str);
}
}
searchActivity.OooOOO.OooOOO(new ArrayList(arrayList2));
arrayList2.clear();
}
@Override
public final int OooO0O0() {
return R$layout.activity_search;
}
public final void OooOO0o(Intent intent) {
this.OooOOOo = mr.OooOOo();
if (intent != null && intent.hasExtra("title")) {
OooOOO0(intent.getStringExtra("title"));
}
((yq) ((yq) new yq("https://api.web.360kan.com/v1/rank?cat=7&callback=__jp0").headers("referer", "https://www.360kan.com/rank/index?from=siteslibsubpage")).headers("user_agent", y21.OooO0Oo())).execute(new jr0(this, 0));
}
public final void OooOOO0(String str) {
this.OooOo0O = str.replaceAll("[pP][gG]\\d+", "");
ArrayList OooOo0o = or.OooOo0o(String.class, "SEARCH_HISTORY");
if (OooOo0o.size() > 20) {
OooOo0o.remove(OooOo0o.size() - 1);
}
if (!OooOo0o.contains(this.OooOo0O)) {
OooOo0o.add(0, this.OooOo0O);
}
i.OoooOO0("SEARCH_HISTORY", OooOo0o);
Intent intent = new Intent(this, FastSearchActivity.class);
Bundle bundle = new Bundle();
bundle.putString("title", this.OooOo0O);
intent.putExtras(bundle);
mr.OooOoo0(intent);
}
@Override
public final void init() {
Boolean bool = Boolean.FALSE;
OooOo = bool;
getWindow().addFlags(131072);
this.OooOO0 = (EditText) findViewById(R$id.etSearch);
this.OooOO0O = (TextView) findViewById(R$id.tvSearch);
this.OooOOOO = (TextView) findViewById(R$id.tvSearchCheckboxBtn);
this.OooOO0o = (TextView) findViewById(R$id.tvClear);
this.OooOOO0 = (SearchKeyboard) findViewById(R$id.keyBoardRoot);
TextView textView = (TextView) findViewById(R$id.history_title);
findViewById(R$id.clear_history).setOnClickListener(new et(this, 2));
this.OooOO0.addTextChangedListener(new lt0(this, 2));
this.OooOOoo = (TvRecyclerView) findViewById(R$id.mGridView);
this.OooOo0 = findViewById(R$id.history_container);
TvRecyclerView tvRecyclerView = (TvRecyclerView) findViewById(R$id.mGridViewWord);
this.OooO = tvRecyclerView;
tvRecyclerView.setHasFixedSize(true);
this.OooO.setLayoutManager(new V7FlowLayoutManager(this));
cu cuVar = new cu(new ArrayList());
this.OooOOO = cuVar;
this.OooO.setAdapter(cuVar);
this.OooOOO.setOnItemClickListener(new kr0(this));
this.OooOO0O.setOnClickListener(new lr0(this, 0));
this.OooOO0o.setOnClickListener(new lr0(this, 1));
this.OooOO0.setOnClickListener(new lr0(this, 2));
this.OooOOO0.setOnSearchKeyListener(new kr0(this));
this.OooOOOO.setOnClickListener(new lr0(this, 3));
gw0 gw0Var = (gw0) new ViewModelProvider(this).get(gw0.class);
OooOO0o(getIntent());
OooOo = Boolean.TRUE;
OooOoO0 = bool;
}
@Override
public final void onDestroy() {
super.onDestroy();
ck.OooO0O0().OooOO0O(this);
}
@Override
public final void onNewIntent(Intent intent) {
super.onNewIntent(intent);
OooOO0o(intent);
OooOo = Boolean.TRUE;
OooOoO0 = Boolean.FALSE;
}
@Override
public final void onResume() {
super.onResume();
if (OooOo.booleanValue()) {
this.OooOO0O.requestFocus();
this.OooOO0O.requestFocusFromTouch();
} else if (!OooOoO0.booleanValue()) {
this.OooOO0.requestFocus();
this.OooOO0.requestFocusFromTouch();
}
this.OooOOoo.setLayoutManager(new V7FlowLayoutManager(this));
oO0O00oO oo0o00oo = new oO0O00oO(7);
this.OooOo00 = oo0o00oo;
this.OooOOoo.setAdapter(oo0o00oo);
ArrayList OooOo0o = or.OooOo0o(String.class, "SEARCH_HISTORY");
if (t.OooOOO0(OooOo0o)) {
this.OooOo0.setVisibility(8);
return;
}
this.OooOo0.setVisibility(0);
this.OooOo00.OooOOO(OooOo0o);
this.OooOo00.setOnItemClickListener(new cb(16, this, OooOo0o));
this.OooOo00.setOnItemLongClickListener(new e00(this, 10));
}
}