package com.tencent.mm.plugin.lite.ui; import android.content.Context; import android.content.Intent; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.AdapterView; import android.widget.BaseAdapter; import android.widget.Button; import android.widget.LinearLayout; import android.widget.ListAdapter; import android.widget.ListView; import android.widget.TextView; import androidx.appcompat.app.AppCompatActivity; import com.tencent.kinda.framework.widget.tools.ConstantsKinda; import com.tencent.liteapp.report.WxaLiteAppStartReport; import com.tencent.liteapp.storage.WxaLiteAppBaselibInfo; import com.tencent.liteapp.storage.WxaLiteAppInfo; import com.tencent.mm.R; import com.tencent.mm.plugin.lite.LiteAppCenter; import com.tencent.mm.plugin.lite.g; import com.tencent.mm.plugin.lite.logic.m; import com.tencent.mm.sdk.platformtools.Log; import com.tencent.mm.sdk.platformtools.MMApplicationContext; import com.tencent.mm.ui.MMActivity; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import k52.n; import ku.f; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; import vt.d; import yz3.j; public class WxaLiteAppListUI extends MMActivity { /* renamed from: n reason: collision with root package name */ public static Map<String, String> f129486n = new a(); /* renamed from: e reason: collision with root package name */ public ListView f129487e; /* renamed from: f reason: collision with root package name */ public ListView f129488f; /* renamed from: g reason: collision with root package name */ public h f129489g; /* renamed from: h reason: collision with root package name */ public TextView f129490h; /* renamed from: i reason: collision with root package name */ public LinearLayout f129491i; /* renamed from: j reason: collision with root package name */ public WxaLiteAppView f129492j; public class a extends HashMap<String, String> { public a() { put("wxalited0d6cb88ac866bcdf3b738f1f3df8872", "游戏中心视频流"); put("wxalite57af7e6c7eea13b5e789762aecade923", "测试用例页面"); put("wxalitecce81f5fba338df4dd5f74df8229c600", "游戏中心攻略页"); put("wxalitea95723728764364c6f996b4bdab3af52", "游戏中心福利页"); put("TestFragment", "测试Fragment/View"); put("wxalite6249b65249893bb23a2d4347a17db5b9@pay", "roysun的测试liteapp"); } } public class b implements d.a { public b(WxaLiteAppListUI wxaLiteAppListUI) { } @Override // vt.d.a public void a(String str, List<? extends d.c> list, d.b bVar, int i15) { Map<String, String> map = WxaLiteAppListUI.f129486n; Log.i("MicroMsg.WxaLiteAppListUI", "gatsbyfanghahaha"); } @Override // vt.d.a public Map<String, Object> b() { return null; } } public class c implements View.OnClickListener { public class a implements f.a { public a(c cVar) { } @Override // ku.f.a public void a(View view) { Map<String, String> map = WxaLiteAppListUI.f129486n; Log.i("MicroMsg.WxaLiteAppListUI", "view-level liteapp open success"); } @Override // ku.f.a public void fail() { Map<String, String> map = WxaLiteAppListUI.f129486n; Log.e("MicroMsg.WxaLiteAppListUI", "view-level liteapp open failed"); } } public c() { } public void onClick(View view) { ArrayList arrayList = new ArrayList(); arrayList.add(view); Object[] array = arrayList.toArray(); arrayList.clear(); j30.a.b("com/tencent/mm/plugin/lite/ui/WxaLiteAppListUI$3", "android/view/View$OnClickListener", "onClick", "(Landroid/view/View;)V", this, array); Bundle bundle = new Bundle(); bundle.putString("minVersion", "1.0.1"); bundle.putString("appId", "wxalite6249b65249893bb23a2d4347a17db5b9@pay"); ((ku.f) j.c(ku.f.class)).r7(WxaLiteAppListUI.this.f129492j, bundle, true, true, null, new a(this)); j30.a.g(this, "com/tencent/mm/plugin/lite/ui/WxaLiteAppListUI$3", "android/view/View$OnClickListener", "onClick", "(Landroid/view/View;)V"); } } public class d implements AdapterView.OnItemClickListener { public class a extends HashMap<String, Object> { /* renamed from: com.tencent.mm.plugin.lite.ui.WxaLiteAppListUI$d$a$a reason: collision with other inner class name */ public class C1320a extends HashMap<String, Object> { public C1320a(a aVar) { put("key1", 1); put("key2", 2); } } public a(d dVar) { put("string", "native string"); put("int", 123); put("double", Double.valueOf(123.12d)); put("list", Arrays.asList(1, 2, 3, "abc")); put("map", new C1320a(this)); try { put("json", new JSONObject("{'int': 2, 'obj': {'string':'abc', 'double':123.12}}")); put("jsonarray", new JSONArray("[123, {'string':'abc', 'double':123.12}]")); } catch (JSONException unused) { } put("bool", Boolean.TRUE); put("null", null); } } public class b implements g.a { /* renamed from: a reason: collision with root package name */ public final /* synthetic */ com.tencent.mm.plugin.lite.g f129495a; public b(d dVar, com.tencent.mm.plugin.lite.g gVar) { this.f129495a = gVar; } @Override // com.tencent.mm.plugin.lite.g.a public boolean a(long j15, String str, Object obj, int i15) { if (str.equals("setData")) { HashMap hashMap = new HashMap(); hashMap.put("nativePointer", "setData from native"); this.f129495a.d(hashMap); } else if (str.equals("throwError")) { com.tencent.mm.plugin.lite.g gVar = this.f129495a; gVar.getClass(); ((HashSet) gVar.f129129a).remove(String.format("%d_%d", Long.valueOf(j15), Integer.valueOf(i15))); LiteAppCenter.storeSendResult(gVar.f129131c, j15, i15, "error", com.tencent.mm.plugin.lite.g.b("throwError from native", "{}")); } else { this.f129495a.c(j15, i15, "dispatch from native"); } return false; } } public class c implements f.h { public c(d dVar) { } @Override // ku.f.h public void fail() { Map<String, String> map = WxaLiteAppListUI.f129486n; Log.e("MicroMsg.WxaLiteAppListUI", "page-level liteapp open failed"); } @Override // ku.f.h public void success() { Map<String, String> map = WxaLiteAppListUI.f129486n; Log.i("MicroMsg.WxaLiteAppListUI", "page-level liteapp open success"); } } public d() { } @Override // android.widget.AdapterView.OnItemClickListener public void onItemClick(AdapterView<?> adapterView, View view, int i15, long j15) { ArrayList arrayList = new ArrayList(); arrayList.add(adapterView); arrayList.add(view); arrayList.add(Integer.valueOf(i15)); arrayList.add(Long.valueOf(j15)); Object[] array = arrayList.toArray(); arrayList.clear(); j30.a.b("com/tencent/mm/plugin/lite/ui/WxaLiteAppListUI$4", "android/widget/AdapterView$OnItemClickListener", "onItemClick", "(Landroid/widget/AdapterView;Landroid/view/View;IJ)V", this, array); WxaLiteAppInfo a15 = WxaLiteAppListUI.this.f129489g.getItem(i15); if (a15 != null) { Bundle bundle = new Bundle(); bundle.putString("appId", a15.f53018d); bundle.putString("minVersion", "1.0.1"); if (a15.f53018d.equals("TestFragment")) { Intent intent = new Intent(WxaLiteAppListUI.this.getContext(), WxaLiteAppTestFragmentUI.class); AppCompatActivity context = WxaLiteAppListUI.this.getContext(); k30.a aVar = new k30.a(); aVar.c(intent); j30.a.d(context, aVar.b(), "com/tencent/mm/plugin/lite/ui/WxaLiteAppListUI$4", "onItemClick", "(Landroid/widget/AdapterView;Landroid/view/View;IJ)V", "Undefined", "startActivity", "(Landroid/content/Intent;)V"); context.startActivity((Intent) aVar.a(0)); j30.a.e(context, "com/tencent/mm/plugin/lite/ui/WxaLiteAppListUI$4", "onItemClick", "(Landroid/widget/AdapterView;Landroid/view/View;IJ)V", "Undefined", "startActivity", "(Landroid/content/Intent;)V"); } else if (!LiteAppCenter.LITE_APP_BASE_LIB.equals(a15.f53018d)) { if (a15.f53018d.equals("wxalite9f49cc96fb30017059f65139fee9f535")) { bundle.putBoolean(ConstantsKinda.INTENT_LITEAPP_TRANSPARENT, true); } com.tencent.mm.plugin.lite.g gVar = new com.tencent.mm.plugin.lite.g(); gVar.d(new a(this)); gVar.f129132d = new b(this, gVar); ((ku.f) j.c(ku.f.class)).Rl0(MMApplicationContext.getContext(), bundle, true, true, gVar, new c(this)); } else { ak.a.makeText(WxaLiteAppListUI.this.getContext(), "Is Base Lib ", 0).show(); } } else { Map<String, String> map = WxaLiteAppListUI.f129486n; } j30.a.g(this, "com/tencent/mm/plugin/lite/ui/WxaLiteAppListUI$4", "android/widget/AdapterView$OnItemClickListener", "onItemClick", "(Landroid/widget/AdapterView;Landroid/view/View;IJ)V"); } } public class e implements AdapterView.OnItemLongClickListener { public e() { } @Override // android.widget.AdapterView.OnItemLongClickListener public boolean onItemLongClick(AdapterView<?> adapterView, View view, int i15, long j15) { WxaLiteAppInfo a15 = WxaLiteAppListUI.this.f129489g.getItem(i15); if (a15 == null) { Map<String, String> map = WxaLiteAppListUI.f129486n; } else if (a15.f53018d.equals("TestFragment")) { Intent intent = new Intent(WxaLiteAppListUI.this.getContext(), WxaLiteAppTestFragmentUI.class); AppCompatActivity context = WxaLiteAppListUI.this.getContext(); k30.a aVar = new k30.a(); aVar.c(intent); j30.a.d(context, aVar.b(), "com/tencent/mm/plugin/lite/ui/WxaLiteAppListUI$5", "onItemLongClick", "(Landroid/widget/AdapterView;Landroid/view/View;IJ)Z", "Undefined", "startActivity", "(Landroid/content/Intent;)V"); context.startActivity((Intent) aVar.a(0)); j30.a.e(context, "com/tencent/mm/plugin/lite/ui/WxaLiteAppListUI$5", "onItemLongClick", "(Landroid/widget/AdapterView;Landroid/view/View;IJ)Z", "Undefined", "startActivity", "(Landroid/content/Intent;)V"); return false; } else { Bundle bundle = new Bundle(); bundle.putString("appId", a15.f53018d); bundle.putBoolean("isHalfScreen", true); bundle.putDouble("heightPercent", 0.75d); if (!LiteAppCenter.LITE_APP_BASE_LIB.equals(a15.f53018d)) { ((ku.f) j.c(ku.f.class)).V40(MMApplicationContext.getContext(), bundle, true, false, null); } else { ak.a.makeText(WxaLiteAppListUI.this.getContext(), "Is Base Lib ", 0).show(); } } return false; } } public class f extends BaseAdapter { /* renamed from: d reason: collision with root package name */ public List<WxaLiteAppBaselibInfo> f129497d; public f(Context context) { Bundle bundle; m.j().getClass(); ArrayList arrayList = null; try { bundle = com.tencent.mm.plugin.lite.storage.j.a("getLiteAppBaselibList", null, null); } catch (Exception e15) { Log.printErrStackTrace("MicroMsg.LiteApp.LiteAppLogic", e15, "", new Object[0]); bundle = null; } if (bundle == null) { Log.i("MicroMsg.LiteApp.LiteAppLogic", "getLiteAppBaselibList bundle is null."); } else { bundle.setClassLoader(WxaLiteAppBaselibInfo.class.getClassLoader()); if (bundle.containsKey("LiteAppBaselibList")) { arrayList = bundle.getParcelableArrayList("LiteAppBaselibList"); } } this.f129497d = arrayList; } public int getCount() { List<WxaLiteAppBaselibInfo> list = this.f129497d; if (list == null) { return 0; } return list.size(); } public Object getItem(int i15) { List<WxaLiteAppBaselibInfo> list = this.f129497d; if (list == null || list.size() <= i15) { return null; } return this.f129497d.get(i15); } public long getItemId(int i15) { return (long) i15; } public View getView(int i15, View view, ViewGroup viewGroup) { g gVar; WxaLiteAppBaselibInfo wxaLiteAppBaselibInfo = this.f129497d.get(i15); if (view == null || view.getTag() == null) { view = LayoutInflater.from(WxaLiteAppListUI.this.getContext()).inflate(R.layout.bpy, (ViewGroup) null, false); gVar = new g(WxaLiteAppListUI.this, view); view.setTag(gVar); } else { gVar = (g) view.getTag(); } gVar.f129499a.setText("基础库 大版本号:" + wxaLiteAppBaselibInfo.f53008d); gVar.f129500b.setText(""); return view; } } public class g { /* renamed from: a reason: collision with root package name */ public TextView f129499a; /* renamed from: b reason: collision with root package name */ public TextView f129500b; public g(WxaLiteAppListUI wxaLiteAppListUI, View view) { this.f129499a = (TextView) view.findViewById(R.id.obc); this.f129500b = (TextView) view.findViewById(R.id.nq_); } } public class h extends BaseAdapter { /* renamed from: d reason: collision with root package name */ public List<WxaLiteAppInfo> f129501d = m.j().n(); public h(Context context) { WxaLiteAppInfo wxaLiteAppInfo = new WxaLiteAppInfo(); wxaLiteAppInfo.f53018d = "TestFragment"; List<WxaLiteAppInfo> list = this.f129501d; if (list != null) { list.add(wxaLiteAppInfo); List<WxaLiteAppInfo> list2 = this.f129501d; WxaLiteAppInfo wxaLiteAppInfo2 = new WxaLiteAppInfo(); wxaLiteAppInfo2.f53018d = "wxalite6249b65249893bb23a2d4347a17db5b9@pay"; list2.add(wxaLiteAppInfo2); } } /* renamed from: a */ public WxaLiteAppInfo getItem(int i15) { List<WxaLiteAppInfo> list = this.f129501d; if (list == null || list.size() <= i15) { return null; } return this.f129501d.get(i15); } public int getCount() { List<WxaLiteAppInfo> list = this.f129501d; if (list == null) { return 0; } return list.size(); } public long getItemId(int i15) { return (long) i15; } public View getView(int i15, View view, ViewGroup viewGroup) { g gVar; WxaLiteAppInfo wxaLiteAppInfo = this.f129501d.get(i15); if (view == null || view.getTag() == null) { view = LayoutInflater.from(WxaLiteAppListUI.this.getContext()).inflate(R.layout.bpy, (ViewGroup) null, false); gVar = new g(WxaLiteAppListUI.this, view); view.setTag(gVar); } else { gVar = (g) view.getTag(); } String str = wxaLiteAppInfo.f53018d; String str2 = wxaLiteAppInfo.f53023i; String str3 = wxaLiteAppInfo.f53022h; com.tencent.mm.plugin.lite.i.initLib(); String liteAppMinBaseLibMajorVersion = LiteAppCenter.getLiteAppMinBaseLibMajorVersion(str, str2, str3); if (liteAppMinBaseLibMajorVersion == null || liteAppMinBaseLibMajorVersion.length() == 0) { liteAppMinBaseLibMajorVersion = "undefined"; } if (((HashMap) WxaLiteAppListUI.f129486n).containsKey(wxaLiteAppInfo.f53018d)) { str = (String) ((HashMap) WxaLiteAppListUI.f129486n).get(wxaLiteAppInfo.f53018d); } gVar.f129499a.setText(str); TextView textView = gVar.f129500b; textView.setText("minBaselibMajorVersion: " + liteAppMinBaseLibMajorVersion); return view; } } public static class i implements com.tencent.mm.ipcinvoker.e<Bundle, Bundle> { private i() { } /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object, com.tencent.mm.ipcinvoker.g] */ @Override // com.tencent.mm.ipcinvoker.e public void invoke(Bundle bundle, com.tencent.mm.ipcinvoker.g<Bundle> gVar) { if (gVar != null) { gVar.a(null); } } } @Override // com.tencent.mm.ui.MMActivity public int getLayoutId() { return R.layout.bpz; } @Override // androidx.activity.ComponentActivity, androidx.core.app.ComponentActivity, androidx.appcompat.app.AppCompatActivity, androidx.fragment.app.FragmentActivity, com.tencent.mm.ui.component.UIComponentActivity, com.tencent.mm.ui.MMActivity, com.tencent.mm.hellhoundlib.activities.HellActivity, com.tencent.mm.ui.MMFragmentActivity public void onCreate(Bundle bundle) { super.onCreate(bundle); com.tencent.mm.plugin.lite.e.f129119a.a(7, new WxaLiteAppStartReport()); ((vt.d) j.c(vt.d.class)).VE(new d.e("wxalitec8a16f9bf80f65dffb97cdf7760c1142", "main", null), new b(this)); this.f129491i = (LinearLayout) findViewById(R.id.q1r); WxaLiteAppView wxaLiteAppView = (WxaLiteAppView) ((ku.f) j.c(ku.f.class)).jL(this, true, true, null); this.f129492j = wxaLiteAppView; this.f129491i.addView(wxaLiteAppView, 3); ((Button) findViewById(R.id.pua)).setOnClickListener(new c()); this.f129490h = (TextView) findViewById(R.id.afe); com.tencent.mm.plugin.lite.i.initLib(); String baseLibMajorVersion = LiteAppCenter.getBaseLibMajorVersion(); TextView textView = this.f129490h; textView.setText("基础库列表 当前基础库大版本:" + baseLibMajorVersion); ((TextView) findViewById(R.id.f362217vv)).setText("App列表"); this.f129487e = (ListView) findViewById(R.id.aff); this.f129487e.setAdapter((ListAdapter) new f(this)); n.f244713c.a().f244715a.c("http://wxsnsdy.tc.qq.com/105/20210/snsdyvideodownload?filekey=30280201010421301f0201690402534804102ca905ce620b1241b726bc41dcff44e00204012882540400&bizid=1023&hy=SH&fileparam=302c020101042530230204136ffd93020457e3c4ff02024ef202031e8d7f02030f42400204045a320a0201000400", 80); this.f129488f = (ListView) findViewById(R.id.f362218vw); h hVar = new h(this); this.f129489g = hVar; this.f129488f.setAdapter((ListAdapter) hVar); this.f129488f.setOnItemClickListener(new d()); this.f129488f.setOnItemLongClickListener(new e()); } @Override // androidx.fragment.app.FragmentActivity, com.tencent.mm.ui.component.UIComponentActivity, com.tencent.mm.ui.MMActivity, com.tencent.mm.hellhoundlib.activities.HellActivity, com.tencent.mm.ui.MMFragmentActivity public void onResume() { super.onResume(); com.tencent.mm.plugin.lite.i.initLib(); String baseLibMajorVersion = LiteAppCenter.getBaseLibMajorVersion(); TextView textView = this.f129490h; textView.setText("基础库列表 当前基础库大版本:" + baseLibMajorVersion); this.f129489g.notifyDataSetChanged(); } }