* Decompile and recreate Soul Browser v1.4.85 with APK CI builds Co-authored-by: KaKi87 <KaKi87@pm.me> * Fix CI build: include bundled google.jks and remove PR trigger The apktool build failed in CI because app/unknown/.../google.jks was excluded by the *.jks gitignore rule. Whitelist app-bundled JKS files and commit the missing resource. Also remove the redundant pull_request workflow trigger. Co-authored-by: KaKi87 <KaKi87@pm.me> * Change package ID to com.github.kaki87.soulbrowser Rename the application ID so the rebuilt APK can be installed alongside the original Soul Browser from Google Play. - Update AndroidManifest package, permissions, providers, and actions - Update R class references in smali (com/github/kaki87/soulbrowser/R) - Update shortcuts.xml targetPackage - Rename app label to "Soul Rebuild" for easy identification Co-authored-by: KaKi87 <KaKi87@pm.me> * Fix install compatibility: remove split APK metadata and bundle native libs The rebuilt APK still declared requiredSplitTypes and Play Store split metadata, causing Android to reject standalone installs as incompatible. - Remove requiredSplitTypes and split-related manifest meta-data - Merge native libs from all ABI splits with uncompressed storage - Page-align before signing for extractNativeLibs=false - Add .so to apktool doNotCompress list Co-authored-by: KaKi87 <KaKi87@pm.me> * Fix install failure: use apksigner v2/v3 and bundle arm64 native libs Target SDK 36 requires APK Signature Scheme v2+, but jarsigner only produces v1 signatures, causing Android to reject the install. - Sign with apksigner (v1+v2+v3) instead of jarsigner - Add arm64-v8a native libraries from universal Soul Browser 1.4.79 - Set extractNativeLibs=true for reliable sideload installs - Commit stable debug keystore for consistent signatures across builds Co-authored-by: KaKi87 <KaKi87@pm.me> * Add committed debug keystore for consistent APK signatures Co-authored-by: KaKi87 <KaKi87@pm.me> * Fix startup crash: use original classes2.dex desugar libraries Apktool recompiles smali_classes2 into a broken classes2.dex, causing ClassNotFoundException for j$.com.android.tools.r8.a at ML Kit init. Inject the original classes2.dex (Java 8+ desugar libs) after apktool build instead of using the recompiled version. Co-authored-by: KaKi87 <KaKi87@pm.me> * Fix missing drawable resources from density split APKs The base APK is an app bundle module; density-specific drawables like seek_thumb_nor_b live in config.xhdpi.apk and were missing after rebuild, causing Resources$NotFoundException at runtime. - Merge non-9-patch resources from split APKs before apktool build - Sync public.xml IDs from R smali only when backing files exist - Add 713 density-specific resource IDs to public.xml Co-authored-by: KaKi87 <KaKi87@pm.me> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com>
167 lines
6 KiB
Java
167 lines
6 KiB
Java
package com.mycompany.app.view;
|
|
|
|
import android.content.Context;
|
|
import android.graphics.drawable.BitmapDrawable;
|
|
import android.text.TextUtils;
|
|
import android.view.View;
|
|
import android.view.ViewGroup;
|
|
import android.widget.LinearLayout;
|
|
import androidx.appcompat.widget.AppCompatTextView;
|
|
import androidx.recyclerview.widget.RecyclerView;
|
|
import com.mycompany.app.main.MainApp;
|
|
import com.mycompany.app.pref.PrefZtwo;
|
|
import com.mycompany.app.soulbrowser.R;
|
|
import com.mycompany.app.view.MyLinkView;
|
|
import java.util.ArrayList;
|
|
|
|
/* loaded from: classes3.dex */
|
|
public class MyEngineAdapter extends RecyclerView.Adapter<ListHolder> {
|
|
public ArrayList d;
|
|
public boolean e;
|
|
public int f;
|
|
public int g;
|
|
public MyLinkView.MainLinkListener h;
|
|
|
|
/* loaded from: classes3.dex */
|
|
public static class EngineItem {
|
|
|
|
/* renamed from: a, reason: collision with root package name */
|
|
public int f18692a;
|
|
public int b;
|
|
|
|
/* renamed from: c, reason: collision with root package name */
|
|
public BitmapDrawable f18693c;
|
|
public int d;
|
|
public String e;
|
|
}
|
|
|
|
/* loaded from: classes3.dex */
|
|
public static class ListHolder extends RecyclerView.ViewHolder {
|
|
public View u;
|
|
public AppCompatTextView v;
|
|
public View w;
|
|
}
|
|
|
|
@Override // androidx.recyclerview.widget.RecyclerView.Adapter
|
|
public final int d() {
|
|
ArrayList arrayList = this.d;
|
|
if (arrayList == null) {
|
|
return 0;
|
|
}
|
|
return arrayList.size();
|
|
}
|
|
|
|
@Override // androidx.recyclerview.widget.RecyclerView.Adapter
|
|
public final long e(int i) {
|
|
if (v(i) == null) {
|
|
return -1L;
|
|
}
|
|
return r3.f18692a;
|
|
}
|
|
|
|
@Override // androidx.recyclerview.widget.RecyclerView.Adapter
|
|
public final void n(RecyclerView.ViewHolder viewHolder, int i) {
|
|
EngineItem v;
|
|
ListHolder listHolder = (ListHolder) viewHolder;
|
|
boolean z = this.e;
|
|
View view = listHolder.f1589a;
|
|
if (view == null || (v = v(i)) == null) {
|
|
return;
|
|
}
|
|
view.setTag(listHolder);
|
|
view.setOnClickListener(new View.OnClickListener() { // from class: com.mycompany.app.view.MyEngineAdapter.1
|
|
@Override // android.view.View.OnClickListener
|
|
public final void onClick(View view2) {
|
|
Object tag;
|
|
EngineItem v2;
|
|
MyEngineAdapter myEngineAdapter = MyEngineAdapter.this;
|
|
if (myEngineAdapter.h == null || (tag = view2.getTag()) == null || !(tag instanceof ListHolder) || (v2 = myEngineAdapter.v(((ListHolder) tag).c())) == null) {
|
|
return;
|
|
}
|
|
myEngineAdapter.h.a(view2, v2.f18692a);
|
|
}
|
|
});
|
|
BitmapDrawable bitmapDrawable = v.f18693c;
|
|
if (bitmapDrawable != null) {
|
|
listHolder.u.setBackground(bitmapDrawable);
|
|
listHolder.u.setVisibility(0);
|
|
listHolder.v.setPaddingRelative(MainApp.E1, 0, 0, 0);
|
|
} else {
|
|
int i2 = v.b;
|
|
if (i2 != 0) {
|
|
listHolder.u.setBackgroundResource(i2);
|
|
listHolder.u.setVisibility(0);
|
|
listHolder.v.setPaddingRelative(MainApp.E1, 0, 0, 0);
|
|
} else {
|
|
listHolder.u.setVisibility(8);
|
|
listHolder.v.setPaddingRelative(0, 0, 0, 0);
|
|
}
|
|
}
|
|
if (v.f18692a == PrefZtwo.j) {
|
|
if (z) {
|
|
listHolder.w.setBackgroundResource(R.drawable.outline_check_dark_24);
|
|
} else {
|
|
listHolder.w.setBackgroundResource(R.drawable.outline_check_black_24);
|
|
}
|
|
listHolder.w.setVisibility(0);
|
|
} else {
|
|
listHolder.w.setVisibility(8);
|
|
}
|
|
int i3 = v.d;
|
|
if (i3 != 0) {
|
|
listHolder.v.setText(i3);
|
|
} else if (!TextUtils.isEmpty(v.e)) {
|
|
listHolder.v.setText(v.e);
|
|
} else {
|
|
listHolder.v.setText((CharSequence) null);
|
|
}
|
|
if (z) {
|
|
view.setBackgroundResource(R.drawable.selector_normal_dark);
|
|
listHolder.v.setTextColor(-328966);
|
|
} else {
|
|
view.setBackgroundResource(R.drawable.selector_normal);
|
|
listHolder.v.setTextColor(-16777216);
|
|
}
|
|
}
|
|
|
|
/* JADX WARN: Type inference failed for: r7v3, types: [androidx.recyclerview.widget.RecyclerView$ViewHolder, com.mycompany.app.view.MyEngineAdapter$ListHolder] */
|
|
@Override // androidx.recyclerview.widget.RecyclerView.Adapter
|
|
public final RecyclerView.ViewHolder o(ViewGroup viewGroup, int i) {
|
|
Context context = viewGroup.getContext();
|
|
if (context == null) {
|
|
return null;
|
|
}
|
|
int i2 = this.g;
|
|
LinearLayout linearLayout = new LinearLayout(context);
|
|
int i3 = MainApp.E1;
|
|
linearLayout.setPadding(i3, 0, i3, 0);
|
|
linearLayout.setGravity(16);
|
|
linearLayout.setBaselineAligned(false);
|
|
linearLayout.setOrientation(0);
|
|
linearLayout.setLayoutParams(new ViewGroup.LayoutParams(-1, this.f));
|
|
View view = new View(context);
|
|
linearLayout.addView(view, i2, i2);
|
|
AppCompatTextView appCompatTextView = new AppCompatTextView(context, null);
|
|
appCompatTextView.setMaxLines(2);
|
|
appCompatTextView.setTextSize(1, 16.0f);
|
|
LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(0, -2);
|
|
layoutParams.weight = 1.0f;
|
|
linearLayout.addView(appCompatTextView, layoutParams);
|
|
View view2 = new View(context);
|
|
view2.setVisibility(8);
|
|
linearLayout.addView(view2, i2, i2);
|
|
?? viewHolder = new RecyclerView.ViewHolder(linearLayout);
|
|
viewHolder.u = view;
|
|
viewHolder.v = appCompatTextView;
|
|
viewHolder.w = view2;
|
|
return viewHolder;
|
|
}
|
|
|
|
public final EngineItem v(int i) {
|
|
ArrayList arrayList = this.d;
|
|
if (arrayList != null && i >= 0 && i < arrayList.size()) {
|
|
return (EngineItem) this.d.get(i);
|
|
}
|
|
return null;
|
|
}
|
|
}
|