* 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>
122 lines
5.4 KiB
Java
122 lines
5.4 KiB
Java
package androidx.appcompat.widget;
|
|
|
|
import android.R;
|
|
import android.graphics.Bitmap;
|
|
import android.graphics.BitmapShader;
|
|
import android.graphics.Shader;
|
|
import android.graphics.drawable.AnimationDrawable;
|
|
import android.graphics.drawable.BitmapDrawable;
|
|
import android.graphics.drawable.ClipDrawable;
|
|
import android.graphics.drawable.Drawable;
|
|
import android.graphics.drawable.LayerDrawable;
|
|
import android.graphics.drawable.ShapeDrawable;
|
|
import android.graphics.drawable.shapes.RoundRectShape;
|
|
import android.util.AttributeSet;
|
|
import android.widget.AbsSeekBar;
|
|
import androidx.annotation.RequiresApi;
|
|
import androidx.core.graphics.drawable.WrappedDrawable;
|
|
|
|
/* loaded from: classes.dex */
|
|
class AppCompatProgressBarHelper {
|
|
|
|
/* renamed from: c, reason: collision with root package name */
|
|
public static final int[] f256c = {R.attr.indeterminateDrawable, R.attr.progressDrawable};
|
|
|
|
/* renamed from: a, reason: collision with root package name */
|
|
public final AbsSeekBar f257a;
|
|
public Bitmap b;
|
|
|
|
@RequiresApi
|
|
/* loaded from: classes.dex */
|
|
public static class Api23Impl {
|
|
}
|
|
|
|
public AppCompatProgressBarHelper(AbsSeekBar absSeekBar) {
|
|
this.f257a = absSeekBar;
|
|
}
|
|
|
|
public void a(AttributeSet attributeSet, int i) {
|
|
AbsSeekBar absSeekBar = this.f257a;
|
|
TintTypedArray e = TintTypedArray.e(absSeekBar.getContext(), attributeSet, f256c, i);
|
|
Drawable c2 = e.c(0);
|
|
if (c2 != null) {
|
|
if (c2 instanceof AnimationDrawable) {
|
|
AnimationDrawable animationDrawable = (AnimationDrawable) c2;
|
|
int numberOfFrames = animationDrawable.getNumberOfFrames();
|
|
AnimationDrawable animationDrawable2 = new AnimationDrawable();
|
|
animationDrawable2.setOneShot(animationDrawable.isOneShot());
|
|
for (int i2 = 0; i2 < numberOfFrames; i2++) {
|
|
Drawable b = b(animationDrawable.getFrame(i2), true);
|
|
b.setLevel(10000);
|
|
animationDrawable2.addFrame(b, animationDrawable.getDuration(i2));
|
|
}
|
|
animationDrawable2.setLevel(10000);
|
|
c2 = animationDrawable2;
|
|
}
|
|
absSeekBar.setIndeterminateDrawable(c2);
|
|
}
|
|
Drawable c3 = e.c(1);
|
|
if (c3 != null) {
|
|
absSeekBar.setProgressDrawable(b(c3, false));
|
|
}
|
|
e.f();
|
|
}
|
|
|
|
/* JADX WARN: Multi-variable type inference failed */
|
|
public final Drawable b(Drawable drawable, boolean z) {
|
|
boolean z2;
|
|
if (drawable instanceof WrappedDrawable) {
|
|
WrappedDrawable wrappedDrawable = (WrappedDrawable) drawable;
|
|
Drawable b = wrappedDrawable.b();
|
|
if (b != null) {
|
|
wrappedDrawable.a(b(b, z));
|
|
return drawable;
|
|
}
|
|
} else {
|
|
if (drawable instanceof LayerDrawable) {
|
|
LayerDrawable layerDrawable = (LayerDrawable) drawable;
|
|
int numberOfLayers = layerDrawable.getNumberOfLayers();
|
|
Drawable[] drawableArr = new Drawable[numberOfLayers];
|
|
for (int i = 0; i < numberOfLayers; i++) {
|
|
int id = layerDrawable.getId(i);
|
|
Drawable drawable2 = layerDrawable.getDrawable(i);
|
|
if (id != 16908301 && id != 16908303) {
|
|
z2 = false;
|
|
} else {
|
|
z2 = true;
|
|
}
|
|
drawableArr[i] = b(drawable2, z2);
|
|
}
|
|
LayerDrawable layerDrawable2 = new LayerDrawable(drawableArr);
|
|
for (int i2 = 0; i2 < numberOfLayers; i2++) {
|
|
layerDrawable2.setId(i2, layerDrawable.getId(i2));
|
|
layerDrawable2.setLayerGravity(i2, layerDrawable.getLayerGravity(i2));
|
|
layerDrawable2.setLayerWidth(i2, layerDrawable.getLayerWidth(i2));
|
|
layerDrawable2.setLayerHeight(i2, layerDrawable.getLayerHeight(i2));
|
|
layerDrawable2.setLayerInsetLeft(i2, layerDrawable.getLayerInsetLeft(i2));
|
|
layerDrawable2.setLayerInsetRight(i2, layerDrawable.getLayerInsetRight(i2));
|
|
layerDrawable2.setLayerInsetTop(i2, layerDrawable.getLayerInsetTop(i2));
|
|
layerDrawable2.setLayerInsetBottom(i2, layerDrawable.getLayerInsetBottom(i2));
|
|
layerDrawable2.setLayerInsetStart(i2, layerDrawable.getLayerInsetStart(i2));
|
|
layerDrawable2.setLayerInsetEnd(i2, layerDrawable.getLayerInsetEnd(i2));
|
|
}
|
|
return layerDrawable2;
|
|
}
|
|
if (drawable instanceof BitmapDrawable) {
|
|
BitmapDrawable bitmapDrawable = (BitmapDrawable) drawable;
|
|
Bitmap bitmap = bitmapDrawable.getBitmap();
|
|
if (this.b == null) {
|
|
this.b = bitmap;
|
|
}
|
|
ShapeDrawable shapeDrawable = new ShapeDrawable(new RoundRectShape(new float[]{5.0f, 5.0f, 5.0f, 5.0f, 5.0f, 5.0f, 5.0f, 5.0f}, null, null));
|
|
shapeDrawable.getPaint().setShader(new BitmapShader(bitmap, Shader.TileMode.REPEAT, Shader.TileMode.CLAMP));
|
|
shapeDrawable.getPaint().setColorFilter(bitmapDrawable.getPaint().getColorFilter());
|
|
if (z) {
|
|
return new ClipDrawable(shapeDrawable, 3, 1);
|
|
}
|
|
return shapeDrawable;
|
|
}
|
|
}
|
|
return drawable;
|
|
}
|
|
}
|