* 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>
215 lines
7.2 KiB
Java
215 lines
7.2 KiB
Java
package androidx.emoji2.viewsintegration;
|
|
|
|
import android.text.InputFilter;
|
|
import android.text.method.PasswordTransformationMethod;
|
|
import android.text.method.TransformationMethod;
|
|
import android.util.SparseArray;
|
|
import android.widget.TextView;
|
|
import androidx.annotation.RequiresApi;
|
|
import androidx.emoji2.text.EmojiCompat;
|
|
|
|
/* loaded from: classes.dex */
|
|
public final class EmojiTextViewHelper {
|
|
|
|
/* renamed from: a, reason: collision with root package name */
|
|
public final HelperInternal f1051a;
|
|
|
|
/* loaded from: classes.dex */
|
|
public static class HelperInternal {
|
|
public InputFilter[] a(InputFilter[] inputFilterArr) {
|
|
return inputFilterArr;
|
|
}
|
|
|
|
public void b(boolean z) {
|
|
}
|
|
|
|
public void c(boolean z) {
|
|
}
|
|
|
|
public TransformationMethod d(TransformationMethod transformationMethod) {
|
|
return null;
|
|
}
|
|
}
|
|
|
|
@RequiresApi
|
|
/* loaded from: classes.dex */
|
|
public static class HelperInternal19 extends HelperInternal {
|
|
|
|
/* renamed from: a, reason: collision with root package name */
|
|
public final TextView f1052a;
|
|
public final EmojiInputFilter b;
|
|
|
|
/* renamed from: c, reason: collision with root package name */
|
|
public boolean f1053c = true;
|
|
|
|
public HelperInternal19(TextView textView) {
|
|
this.f1052a = textView;
|
|
this.b = new EmojiInputFilter(textView);
|
|
}
|
|
|
|
@Override // androidx.emoji2.viewsintegration.EmojiTextViewHelper.HelperInternal
|
|
public final InputFilter[] a(InputFilter[] inputFilterArr) {
|
|
if (!this.f1053c) {
|
|
SparseArray sparseArray = new SparseArray(1);
|
|
for (int i = 0; i < inputFilterArr.length; i++) {
|
|
InputFilter inputFilter = inputFilterArr[i];
|
|
if (inputFilter instanceof EmojiInputFilter) {
|
|
sparseArray.put(i, inputFilter);
|
|
}
|
|
}
|
|
if (sparseArray.size() == 0) {
|
|
return inputFilterArr;
|
|
}
|
|
int length = inputFilterArr.length;
|
|
InputFilter[] inputFilterArr2 = new InputFilter[inputFilterArr.length - sparseArray.size()];
|
|
int i2 = 0;
|
|
for (int i3 = 0; i3 < length; i3++) {
|
|
if (sparseArray.indexOfKey(i3) < 0) {
|
|
inputFilterArr2[i2] = inputFilterArr[i3];
|
|
i2++;
|
|
}
|
|
}
|
|
return inputFilterArr2;
|
|
}
|
|
int length2 = inputFilterArr.length;
|
|
int i4 = 0;
|
|
while (true) {
|
|
EmojiInputFilter emojiInputFilter = this.b;
|
|
if (i4 < length2) {
|
|
if (inputFilterArr[i4] == emojiInputFilter) {
|
|
return inputFilterArr;
|
|
}
|
|
i4++;
|
|
} else {
|
|
InputFilter[] inputFilterArr3 = new InputFilter[inputFilterArr.length + 1];
|
|
System.arraycopy(inputFilterArr, 0, inputFilterArr3, 0, length2);
|
|
inputFilterArr3[length2] = emojiInputFilter;
|
|
return inputFilterArr3;
|
|
}
|
|
}
|
|
}
|
|
|
|
@Override // androidx.emoji2.viewsintegration.EmojiTextViewHelper.HelperInternal
|
|
public final void b(boolean z) {
|
|
if (z) {
|
|
TextView textView = this.f1052a;
|
|
textView.setTransformationMethod(d(textView.getTransformationMethod()));
|
|
}
|
|
}
|
|
|
|
@Override // androidx.emoji2.viewsintegration.EmojiTextViewHelper.HelperInternal
|
|
public final void c(boolean z) {
|
|
this.f1053c = z;
|
|
TextView textView = this.f1052a;
|
|
textView.setTransformationMethod(d(textView.getTransformationMethod()));
|
|
textView.setFilters(a(textView.getFilters()));
|
|
}
|
|
|
|
@Override // androidx.emoji2.viewsintegration.EmojiTextViewHelper.HelperInternal
|
|
public final TransformationMethod d(TransformationMethod transformationMethod) {
|
|
if (this.f1053c) {
|
|
if (transformationMethod instanceof EmojiTransformationMethod) {
|
|
return transformationMethod;
|
|
}
|
|
if (transformationMethod instanceof PasswordTransformationMethod) {
|
|
return transformationMethod;
|
|
}
|
|
return new EmojiTransformationMethod(transformationMethod);
|
|
}
|
|
if (transformationMethod instanceof EmojiTransformationMethod) {
|
|
return ((EmojiTransformationMethod) transformationMethod).f1057c;
|
|
}
|
|
return transformationMethod;
|
|
}
|
|
}
|
|
|
|
@RequiresApi
|
|
/* loaded from: classes.dex */
|
|
public static class SkippingHelper19 extends HelperInternal {
|
|
|
|
/* renamed from: a, reason: collision with root package name */
|
|
public final HelperInternal19 f1054a;
|
|
|
|
public SkippingHelper19(TextView textView) {
|
|
this.f1054a = new HelperInternal19(textView);
|
|
}
|
|
|
|
@Override // androidx.emoji2.viewsintegration.EmojiTextViewHelper.HelperInternal
|
|
public final InputFilter[] a(InputFilter[] inputFilterArr) {
|
|
boolean z;
|
|
if (EmojiCompat.k != null) {
|
|
z = true;
|
|
} else {
|
|
z = false;
|
|
}
|
|
if (!z) {
|
|
return inputFilterArr;
|
|
}
|
|
return this.f1054a.a(inputFilterArr);
|
|
}
|
|
|
|
@Override // androidx.emoji2.viewsintegration.EmojiTextViewHelper.HelperInternal
|
|
public final void b(boolean z) {
|
|
boolean z2;
|
|
if (EmojiCompat.k != null) {
|
|
z2 = true;
|
|
} else {
|
|
z2 = false;
|
|
}
|
|
if (!z2) {
|
|
return;
|
|
}
|
|
this.f1054a.b(z);
|
|
}
|
|
|
|
@Override // androidx.emoji2.viewsintegration.EmojiTextViewHelper.HelperInternal
|
|
public final void c(boolean z) {
|
|
boolean z2;
|
|
HelperInternal19 helperInternal19 = this.f1054a;
|
|
if (EmojiCompat.k != null) {
|
|
z2 = true;
|
|
} else {
|
|
z2 = false;
|
|
}
|
|
if (!z2) {
|
|
helperInternal19.f1053c = z;
|
|
} else {
|
|
helperInternal19.c(z);
|
|
}
|
|
}
|
|
|
|
@Override // androidx.emoji2.viewsintegration.EmojiTextViewHelper.HelperInternal
|
|
public final TransformationMethod d(TransformationMethod transformationMethod) {
|
|
boolean z;
|
|
if (EmojiCompat.k != null) {
|
|
z = true;
|
|
} else {
|
|
z = false;
|
|
}
|
|
if (!z) {
|
|
return null;
|
|
}
|
|
return this.f1054a.d(null);
|
|
}
|
|
}
|
|
|
|
public EmojiTextViewHelper(TextView textView) {
|
|
this.f1051a = new SkippingHelper19(textView);
|
|
}
|
|
|
|
public final InputFilter[] a(InputFilter[] inputFilterArr) {
|
|
return this.f1051a.a(inputFilterArr);
|
|
}
|
|
|
|
public final void b(boolean z) {
|
|
this.f1051a.b(z);
|
|
}
|
|
|
|
public final void c(boolean z) {
|
|
this.f1051a.c(z);
|
|
}
|
|
|
|
public final TransformationMethod d() {
|
|
return this.f1051a.d(null);
|
|
}
|
|
}
|