soul-browser/sources/java/androidx/appcompat/widget/AppCompatRadioButton.java
KaKi87 550ddb0413
Decompile and recreate Soul Browser v1.4.85 with APK CI builds (#1)
* 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>
2026-08-10 16:07:14 +02:00

281 lines
11 KiB
Java

package androidx.appcompat.widget;
import android.content.Context;
import android.content.res.ColorStateList;
import android.graphics.PorterDuff;
import android.graphics.drawable.Drawable;
import android.text.InputFilter;
import android.util.AttributeSet;
import android.view.inspector.PropertyMapper;
import android.view.inspector.PropertyReader;
import android.widget.RadioButton;
import androidx.annotation.DrawableRes;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.RequiresApi;
import androidx.annotation.RestrictTo;
import androidx.appcompat.R;
import androidx.appcompat.content.res.AppCompatResources;
import androidx.core.view.TintableBackgroundView;
import androidx.core.widget.TintableCompoundButton;
import androidx.core.widget.TintableCompoundDrawablesView;
/* loaded from: classes.dex */
public class AppCompatRadioButton extends RadioButton implements TintableCompoundButton, TintableBackgroundView, EmojiCompatConfigurationView, TintableCompoundDrawablesView {
/* renamed from: c, reason: collision with root package name */
public final AppCompatCompoundButtonHelper f258c;
public final AppCompatBackgroundHelper f;
public final AppCompatTextHelper g;
public AppCompatEmojiTextHelper h;
@RequiresApi
@RestrictTo
/* loaded from: classes.dex */
public final class InspectionCompanion implements android.view.inspector.InspectionCompanion {
/* renamed from: a, reason: collision with root package name */
public int f259a;
public int b;
/* renamed from: c, reason: collision with root package name */
public int f260c;
public int d;
public int e;
public int f;
public final void mapProperties(PropertyMapper propertyMapper) {
this.f259a = propertyMapper.mapObject("backgroundTint", R.attr.backgroundTint);
this.b = propertyMapper.mapObject("backgroundTintMode", R.attr.backgroundTintMode);
this.f260c = propertyMapper.mapObject("buttonTint", R.attr.buttonTint);
this.d = propertyMapper.mapObject("buttonTintMode", R.attr.buttonTintMode);
this.e = propertyMapper.mapObject("drawableTint", R.attr.drawableTint);
this.f = propertyMapper.mapObject("drawableTintMode", R.attr.drawableTintMode);
}
public final void readProperties(Object obj, PropertyReader propertyReader) {
AppCompatRadioButton appCompatRadioButton = (AppCompatRadioButton) obj;
propertyReader.readObject(this.f259a, appCompatRadioButton.getBackgroundTintList());
propertyReader.readObject(this.b, appCompatRadioButton.getBackgroundTintMode());
propertyReader.readObject(this.f260c, appCompatRadioButton.getButtonTintList());
propertyReader.readObject(this.d, appCompatRadioButton.getButtonTintMode());
propertyReader.readObject(this.e, appCompatRadioButton.getCompoundDrawableTintList());
propertyReader.readObject(this.f, appCompatRadioButton.getCompoundDrawableTintMode());
}
}
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public AppCompatRadioButton(Context context, AttributeSet attributeSet, int i) {
super(context, attributeSet, i);
TintContextWrapper.a(context);
ThemeUtils.a(getContext(), this);
AppCompatCompoundButtonHelper appCompatCompoundButtonHelper = new AppCompatCompoundButtonHelper(this);
this.f258c = appCompatCompoundButtonHelper;
appCompatCompoundButtonHelper.b(attributeSet, i);
AppCompatBackgroundHelper appCompatBackgroundHelper = new AppCompatBackgroundHelper(this);
this.f = appCompatBackgroundHelper;
appCompatBackgroundHelper.d(attributeSet, i);
AppCompatTextHelper appCompatTextHelper = new AppCompatTextHelper(this);
this.g = appCompatTextHelper;
appCompatTextHelper.f(attributeSet, i);
getEmojiTextViewHelper().a(attributeSet, i);
}
@NonNull
private AppCompatEmojiTextHelper getEmojiTextViewHelper() {
if (this.h == null) {
this.h = new AppCompatEmojiTextHelper(this);
}
return this.h;
}
@Override // android.widget.CompoundButton, android.widget.TextView, android.view.View
public final void drawableStateChanged() {
super.drawableStateChanged();
AppCompatBackgroundHelper appCompatBackgroundHelper = this.f;
if (appCompatBackgroundHelper != null) {
appCompatBackgroundHelper.a();
}
AppCompatTextHelper appCompatTextHelper = this.g;
if (appCompatTextHelper != null) {
appCompatTextHelper.b();
}
}
@Nullable
@RestrictTo
public ColorStateList getSupportBackgroundTintList() {
AppCompatBackgroundHelper appCompatBackgroundHelper = this.f;
if (appCompatBackgroundHelper != null) {
return appCompatBackgroundHelper.b();
}
return null;
}
@Nullable
@RestrictTo
public PorterDuff.Mode getSupportBackgroundTintMode() {
AppCompatBackgroundHelper appCompatBackgroundHelper = this.f;
if (appCompatBackgroundHelper != null) {
return appCompatBackgroundHelper.c();
}
return null;
}
@Override // androidx.core.widget.TintableCompoundButton
@Nullable
@RestrictTo
public ColorStateList getSupportButtonTintList() {
AppCompatCompoundButtonHelper appCompatCompoundButtonHelper = this.f258c;
if (appCompatCompoundButtonHelper != null) {
return appCompatCompoundButtonHelper.b;
}
return null;
}
@Nullable
@RestrictTo
public PorterDuff.Mode getSupportButtonTintMode() {
AppCompatCompoundButtonHelper appCompatCompoundButtonHelper = this.f258c;
if (appCompatCompoundButtonHelper != null) {
return appCompatCompoundButtonHelper.f234c;
}
return null;
}
@Nullable
@RestrictTo
public ColorStateList getSupportCompoundDrawablesTintList() {
return this.g.d();
}
@Nullable
@RestrictTo
public PorterDuff.Mode getSupportCompoundDrawablesTintMode() {
return this.g.e();
}
@Override // android.widget.TextView
public void setAllCaps(boolean z) {
super.setAllCaps(z);
getEmojiTextViewHelper().b(z);
}
@Override // android.view.View
public void setBackgroundDrawable(@Nullable Drawable drawable) {
super.setBackgroundDrawable(drawable);
AppCompatBackgroundHelper appCompatBackgroundHelper = this.f;
if (appCompatBackgroundHelper != null) {
appCompatBackgroundHelper.e();
}
}
@Override // android.view.View
public void setBackgroundResource(@DrawableRes int i) {
super.setBackgroundResource(i);
AppCompatBackgroundHelper appCompatBackgroundHelper = this.f;
if (appCompatBackgroundHelper != null) {
appCompatBackgroundHelper.f(i);
}
}
@Override // android.widget.CompoundButton
public void setButtonDrawable(Drawable drawable) {
super.setButtonDrawable(drawable);
AppCompatCompoundButtonHelper appCompatCompoundButtonHelper = this.f258c;
if (appCompatCompoundButtonHelper != null) {
if (appCompatCompoundButtonHelper.f) {
appCompatCompoundButtonHelper.f = false;
} else {
appCompatCompoundButtonHelper.f = true;
appCompatCompoundButtonHelper.a();
}
}
}
@Override // android.widget.TextView
public final void setCompoundDrawables(Drawable drawable, Drawable drawable2, Drawable drawable3, Drawable drawable4) {
super.setCompoundDrawables(drawable, drawable2, drawable3, drawable4);
AppCompatTextHelper appCompatTextHelper = this.g;
if (appCompatTextHelper != null) {
appCompatTextHelper.b();
}
}
@Override // android.widget.TextView
public final void setCompoundDrawablesRelative(Drawable drawable, Drawable drawable2, Drawable drawable3, Drawable drawable4) {
super.setCompoundDrawablesRelative(drawable, drawable2, drawable3, drawable4);
AppCompatTextHelper appCompatTextHelper = this.g;
if (appCompatTextHelper != null) {
appCompatTextHelper.b();
}
}
public void setEmojiCompatEnabled(boolean z) {
getEmojiTextViewHelper().c(z);
}
@Override // android.widget.TextView
public void setFilters(@NonNull InputFilter[] inputFilterArr) {
super.setFilters(getEmojiTextViewHelper().b.a(inputFilterArr));
}
@RestrictTo
public void setSupportBackgroundTintList(@Nullable ColorStateList colorStateList) {
AppCompatBackgroundHelper appCompatBackgroundHelper = this.f;
if (appCompatBackgroundHelper != null) {
appCompatBackgroundHelper.h(colorStateList);
}
}
@RestrictTo
public void setSupportBackgroundTintMode(@Nullable PorterDuff.Mode mode) {
AppCompatBackgroundHelper appCompatBackgroundHelper = this.f;
if (appCompatBackgroundHelper != null) {
appCompatBackgroundHelper.i(mode);
}
}
@Override // androidx.core.widget.TintableCompoundButton
@RestrictTo
public void setSupportButtonTintList(@Nullable ColorStateList colorStateList) {
AppCompatCompoundButtonHelper appCompatCompoundButtonHelper = this.f258c;
if (appCompatCompoundButtonHelper != null) {
appCompatCompoundButtonHelper.b = colorStateList;
appCompatCompoundButtonHelper.d = true;
appCompatCompoundButtonHelper.a();
}
}
@Override // androidx.core.widget.TintableCompoundButton
@RestrictTo
public void setSupportButtonTintMode(@Nullable PorterDuff.Mode mode) {
AppCompatCompoundButtonHelper appCompatCompoundButtonHelper = this.f258c;
if (appCompatCompoundButtonHelper != null) {
appCompatCompoundButtonHelper.f234c = mode;
appCompatCompoundButtonHelper.e = true;
appCompatCompoundButtonHelper.a();
}
}
@Override // androidx.core.widget.TintableCompoundDrawablesView
@RestrictTo
public void setSupportCompoundDrawablesTintList(@Nullable ColorStateList colorStateList) {
AppCompatTextHelper appCompatTextHelper = this.g;
appCompatTextHelper.k(colorStateList);
appCompatTextHelper.b();
}
@Override // androidx.core.widget.TintableCompoundDrawablesView
@RestrictTo
public void setSupportCompoundDrawablesTintMode(@Nullable PorterDuff.Mode mode) {
AppCompatTextHelper appCompatTextHelper = this.g;
appCompatTextHelper.l(mode);
appCompatTextHelper.b();
}
@Override // android.widget.CompoundButton
public void setButtonDrawable(@DrawableRes int i) {
setButtonDrawable(AppCompatResources.a(getContext(), i));
}
}