* 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>
123 lines
5.1 KiB
Java
123 lines
5.1 KiB
Java
package com.google.android.material.internal;
|
|
|
|
import android.content.Context;
|
|
import android.graphics.PorterDuff;
|
|
import android.util.TypedValue;
|
|
import android.view.View;
|
|
import androidx.annotation.RestrictTo;
|
|
import androidx.core.view.ViewCompat;
|
|
import androidx.core.view.WindowInsetsCompat;
|
|
|
|
@RestrictTo
|
|
/* loaded from: classes3.dex */
|
|
public class ViewUtils {
|
|
|
|
/* renamed from: com.google.android.material.internal.ViewUtils$1, reason: invalid class name */
|
|
/* loaded from: classes3.dex */
|
|
class AnonymousClass1 implements OnApplyWindowInsetsListener {
|
|
@Override // com.google.android.material.internal.ViewUtils.OnApplyWindowInsetsListener
|
|
public final WindowInsetsCompat a(View view, WindowInsetsCompat windowInsetsCompat, RelativePadding relativePadding) {
|
|
view.getLayoutDirection();
|
|
view.setPaddingRelative(relativePadding.f11823a, relativePadding.b, relativePadding.f11824c, relativePadding.d);
|
|
return windowInsetsCompat;
|
|
}
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: package-private */
|
|
/* renamed from: com.google.android.material.internal.ViewUtils$3, reason: invalid class name */
|
|
/* loaded from: classes3.dex */
|
|
public class AnonymousClass3 implements View.OnAttachStateChangeListener {
|
|
@Override // android.view.View.OnAttachStateChangeListener
|
|
public final void onViewAttachedToWindow(View view) {
|
|
view.removeOnAttachStateChangeListener(this);
|
|
view.requestApplyInsets();
|
|
}
|
|
|
|
@Override // android.view.View.OnAttachStateChangeListener
|
|
public final void onViewDetachedFromWindow(View view) {
|
|
}
|
|
}
|
|
|
|
/* renamed from: com.google.android.material.internal.ViewUtils$4, reason: invalid class name */
|
|
/* loaded from: classes3.dex */
|
|
class AnonymousClass4 implements ViewOverlayImpl {
|
|
}
|
|
|
|
/* loaded from: classes3.dex */
|
|
public interface OnApplyWindowInsetsListener {
|
|
WindowInsetsCompat a(View view, WindowInsetsCompat windowInsetsCompat, RelativePadding relativePadding);
|
|
}
|
|
|
|
/* loaded from: classes3.dex */
|
|
public static class RelativePadding {
|
|
|
|
/* renamed from: a, reason: collision with root package name */
|
|
public int f11823a;
|
|
public int b;
|
|
|
|
/* renamed from: c, reason: collision with root package name */
|
|
public int f11824c;
|
|
public int d;
|
|
}
|
|
|
|
/* JADX WARN: Multi-variable type inference failed */
|
|
/* JADX WARN: Type inference failed for: r0v0, types: [com.google.android.material.internal.ViewUtils$RelativePadding, java.lang.Object] */
|
|
/* JADX WARN: Type inference failed for: r6v2, types: [java.lang.Object, android.view.View$OnAttachStateChangeListener] */
|
|
public static void a(View view, final OnApplyWindowInsetsListener onApplyWindowInsetsListener) {
|
|
int paddingStart = view.getPaddingStart();
|
|
int paddingTop = view.getPaddingTop();
|
|
int paddingEnd = view.getPaddingEnd();
|
|
int paddingBottom = view.getPaddingBottom();
|
|
final ?? obj = new Object();
|
|
obj.f11823a = paddingStart;
|
|
obj.b = paddingTop;
|
|
obj.f11824c = paddingEnd;
|
|
obj.d = paddingBottom;
|
|
ViewCompat.G(view, new androidx.core.view.OnApplyWindowInsetsListener() { // from class: com.google.android.material.internal.ViewUtils.2
|
|
/* JADX WARN: Multi-variable type inference failed */
|
|
/* JADX WARN: Type inference failed for: r0v0, types: [com.google.android.material.internal.ViewUtils$RelativePadding, java.lang.Object] */
|
|
@Override // androidx.core.view.OnApplyWindowInsetsListener
|
|
public final WindowInsetsCompat a(View view2, WindowInsetsCompat windowInsetsCompat) {
|
|
?? obj2 = new Object();
|
|
RelativePadding relativePadding = obj;
|
|
obj2.f11823a = relativePadding.f11823a;
|
|
obj2.b = relativePadding.b;
|
|
obj2.f11824c = relativePadding.f11824c;
|
|
obj2.d = relativePadding.d;
|
|
OnApplyWindowInsetsListener.this.a(view2, windowInsetsCompat, obj2);
|
|
return windowInsetsCompat;
|
|
}
|
|
});
|
|
if (view.isAttachedToWindow()) {
|
|
view.requestApplyInsets();
|
|
} else {
|
|
view.addOnAttachStateChangeListener(new Object());
|
|
}
|
|
}
|
|
|
|
public static float b(Context context, int i) {
|
|
return TypedValue.applyDimension(1, i, context.getResources().getDisplayMetrics());
|
|
}
|
|
|
|
public static PorterDuff.Mode c(int i, PorterDuff.Mode mode) {
|
|
if (i != 3) {
|
|
if (i != 5) {
|
|
if (i != 9) {
|
|
switch (i) {
|
|
case 14:
|
|
return PorterDuff.Mode.MULTIPLY;
|
|
case 15:
|
|
return PorterDuff.Mode.SCREEN;
|
|
case 16:
|
|
return PorterDuff.Mode.ADD;
|
|
default:
|
|
return mode;
|
|
}
|
|
}
|
|
return PorterDuff.Mode.SRC_ATOP;
|
|
}
|
|
return PorterDuff.Mode.SRC_IN;
|
|
}
|
|
return PorterDuff.Mode.SRC_OVER;
|
|
}
|
|
}
|