* 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>
132 lines
4.8 KiB
Java
132 lines
4.8 KiB
Java
package org.jsoup.nodes;
|
|
|
|
import com.google.api.client.http.HttpMethods;
|
|
import java.util.ArrayList;
|
|
import java.util.List;
|
|
import org.jsoup.Connection;
|
|
import org.jsoup.Jsoup;
|
|
import org.jsoup.helper.HttpConnection;
|
|
import org.jsoup.helper.Validate;
|
|
import org.jsoup.internal.SharedConstants;
|
|
import org.jsoup.internal.StringUtil;
|
|
import org.jsoup.parser.Tag;
|
|
import org.jsoup.select.Elements;
|
|
import org.jsoup.select.Evaluator;
|
|
import org.jsoup.select.Selector;
|
|
|
|
/* loaded from: classes4.dex */
|
|
public class FormElement extends Element {
|
|
public static final Evaluator p = Selector.evaluatorOf(StringUtil.join(SharedConstants.FormSubmitTags, ", "));
|
|
public final Elements o;
|
|
|
|
public FormElement(Tag tag, String str, Attributes attributes) {
|
|
super(tag, str, attributes);
|
|
this.o = new Elements();
|
|
}
|
|
|
|
public FormElement addElement(Element element) {
|
|
this.o.add(element);
|
|
return this;
|
|
}
|
|
|
|
/* JADX WARN: Multi-variable type inference failed */
|
|
public Elements elements() {
|
|
Elements select = select(p);
|
|
Elements elements = this.o;
|
|
int size = elements.size();
|
|
int i = 0;
|
|
while (i < size) {
|
|
T t = elements.get(i);
|
|
i++;
|
|
Element element = (Element) t;
|
|
if (element.ownerDocument() != null && !select.contains(element)) {
|
|
select.add(element);
|
|
}
|
|
}
|
|
return select;
|
|
}
|
|
|
|
/* JADX WARN: Multi-variable type inference failed */
|
|
public List<Connection.KeyVal> formData() {
|
|
Element selectFirst;
|
|
String str;
|
|
ArrayList arrayList = new ArrayList();
|
|
Elements elements = elements();
|
|
int size = elements.size();
|
|
int i = 0;
|
|
while (i < size) {
|
|
T t = elements.get(i);
|
|
i++;
|
|
Element element = (Element) t;
|
|
if (element.tag().isFormSubmittable() && !element.hasAttr("disabled")) {
|
|
String attr = element.attr("name");
|
|
if (attr.length() != 0) {
|
|
String attr2 = element.attr("type");
|
|
if (!attr2.equalsIgnoreCase("button") && !attr2.equalsIgnoreCase("image")) {
|
|
if (element.nameIs("select")) {
|
|
Elements select = element.select("option[selected]");
|
|
int size2 = select.size();
|
|
boolean z = false;
|
|
int i2 = 0;
|
|
while (i2 < size2) {
|
|
T t2 = select.get(i2);
|
|
i2++;
|
|
arrayList.add(HttpConnection.KeyVal.create(attr, ((Element) t2).val()));
|
|
z = true;
|
|
}
|
|
if (!z && (selectFirst = element.selectFirst("option")) != null) {
|
|
arrayList.add(HttpConnection.KeyVal.create(attr, selectFirst.val()));
|
|
}
|
|
} else if (!"checkbox".equalsIgnoreCase(attr2) && !"radio".equalsIgnoreCase(attr2)) {
|
|
arrayList.add(HttpConnection.KeyVal.create(attr, element.val()));
|
|
} else if (element.hasAttr("checked")) {
|
|
if (element.val().length() > 0) {
|
|
str = element.val();
|
|
} else {
|
|
str = "on";
|
|
}
|
|
arrayList.add(HttpConnection.KeyVal.create(attr, str));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return arrayList;
|
|
}
|
|
|
|
@Override // org.jsoup.nodes.Node
|
|
public final void q(Node node) {
|
|
super.q(node);
|
|
this.o.remove(node);
|
|
}
|
|
|
|
public Connection submit() {
|
|
String baseUri;
|
|
Connection.Method method;
|
|
Connection newSession;
|
|
if (hasAttr("action")) {
|
|
baseUri = absUrl("action");
|
|
} else {
|
|
baseUri = baseUri();
|
|
}
|
|
Validate.notEmpty(baseUri, "Could not determine a form action URL for submit. Ensure you set a base URI when parsing.");
|
|
if (attr("method").equalsIgnoreCase(HttpMethods.POST)) {
|
|
method = Connection.Method.POST;
|
|
} else {
|
|
method = Connection.Method.GET;
|
|
}
|
|
Document ownerDocument = ownerDocument();
|
|
if (ownerDocument != null) {
|
|
newSession = ownerDocument.connection().newRequest();
|
|
} else {
|
|
newSession = Jsoup.newSession();
|
|
}
|
|
return newSession.url(baseUri).data(formData()).method(method);
|
|
}
|
|
|
|
@Override // org.jsoup.nodes.Element, org.jsoup.nodes.Node
|
|
/* renamed from: clone */
|
|
public FormElement mo1499clone() {
|
|
return (FormElement) super.mo1499clone();
|
|
}
|
|
}
|