soul-browser/sources/java/com/google/android/material/navigation/NavigationBarView.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

441 lines
11 KiB
Java

package com.google.android.material.navigation;
import android.content.res.ColorStateList;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.os.Parcel;
import android.os.Parcelable;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.ViewGroup;
import android.widget.FrameLayout;
import androidx.annotation.DimenRes;
import androidx.annotation.Dimension;
import androidx.annotation.DrawableRes;
import androidx.annotation.IdRes;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.Px;
import androidx.annotation.RestrictTo;
import androidx.annotation.StyleRes;
import androidx.appcompat.view.menu.MenuBuilder;
import androidx.appcompat.view.menu.MenuView;
import androidx.customview.view.AbsSavedState;
import com.google.android.material.shape.MaterialShapeUtils;
import com.google.android.material.shape.ShapeAppearanceModel;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
/* loaded from: classes3.dex */
public abstract class NavigationBarView extends FrameLayout {
/* renamed from: c, reason: collision with root package name */
public OnItemSelectedListener f11847c;
public OnItemReselectedListener f;
/* renamed from: com.google.android.material.navigation.NavigationBarView$1, reason: invalid class name */
/* loaded from: classes3.dex */
class AnonymousClass1 implements MenuBuilder.Callback {
@Override // androidx.appcompat.view.menu.MenuBuilder.Callback
public final boolean a(MenuBuilder menuBuilder, MenuItem menuItem) {
throw null;
}
@Override // androidx.appcompat.view.menu.MenuBuilder.Callback
public final void b(MenuBuilder menuBuilder) {
}
}
@Retention(RetentionPolicy.SOURCE)
@RestrictTo
/* loaded from: classes3.dex */
public @interface ItemGravity {
}
@Retention(RetentionPolicy.SOURCE)
@RestrictTo
/* loaded from: classes3.dex */
public @interface ItemIconGravity {
}
@Retention(RetentionPolicy.SOURCE)
@RestrictTo
/* loaded from: classes3.dex */
public @interface LabelVisibility {
}
/* loaded from: classes3.dex */
public interface OnItemReselectedListener {
}
/* loaded from: classes3.dex */
public interface OnItemSelectedListener {
}
/* loaded from: classes3.dex */
public static class SavedState extends AbsSavedState {
public static final Parcelable.Creator<SavedState> CREATOR = new Object();
public Bundle g;
/* renamed from: com.google.android.material.navigation.NavigationBarView$SavedState$1, reason: invalid class name */
/* loaded from: classes3.dex */
public class AnonymousClass1 implements Parcelable.ClassLoaderCreator<SavedState> {
@Override // android.os.Parcelable.ClassLoaderCreator
public final SavedState createFromParcel(Parcel parcel, ClassLoader classLoader) {
return new SavedState(parcel, classLoader);
}
@Override // android.os.Parcelable.Creator
public final Object[] newArray(int i) {
return new SavedState[i];
}
@Override // android.os.Parcelable.Creator
public final Object createFromParcel(Parcel parcel) {
return new SavedState(parcel, null);
}
}
public SavedState(Parcel parcel, ClassLoader classLoader) {
super(parcel, classLoader);
this.g = parcel.readBundle(classLoader == null ? getClass().getClassLoader() : classLoader);
}
@Override // androidx.customview.view.AbsSavedState, android.os.Parcelable
public final void writeToParcel(Parcel parcel, int i) {
super.writeToParcel(parcel, i);
parcel.writeBundle(this.g);
}
}
private MenuInflater getMenuInflater() {
return null;
}
private void setMeasureBottomPaddingFromLabelBaseline(boolean z) {
throw null;
}
@Px
public int getActiveIndicatorLabelPadding() {
throw null;
}
@RestrictTo
public int getCollapsedMaxItemCount() {
return getMaxItemCount();
}
@StyleRes
public int getHorizontalItemTextAppearanceActive() {
throw null;
}
@StyleRes
public int getHorizontalItemTextAppearanceInactive() {
throw null;
}
@Px
public int getIconLabelHorizontalSpacing() {
throw null;
}
@Nullable
public ColorStateList getItemActiveIndicatorColor() {
throw null;
}
@Px
public int getItemActiveIndicatorExpandedHeight() {
throw null;
}
@Px
public int getItemActiveIndicatorExpandedMarginHorizontal() {
throw null;
}
@Px
public int getItemActiveIndicatorExpandedWidth() {
throw null;
}
@Px
public int getItemActiveIndicatorHeight() {
throw null;
}
@Px
public int getItemActiveIndicatorMarginHorizontal() {
throw null;
}
@Nullable
public ShapeAppearanceModel getItemActiveIndicatorShapeAppearance() {
throw null;
}
@Px
public int getItemActiveIndicatorWidth() {
throw null;
}
@Nullable
public Drawable getItemBackground() {
throw null;
}
@DrawableRes
@Deprecated
public int getItemBackgroundResource() {
throw null;
}
public int getItemGravity() {
throw null;
}
public int getItemIconGravity() {
throw null;
}
@Dimension
public int getItemIconSize() {
throw null;
}
@Nullable
public ColorStateList getItemIconTintList() {
throw null;
}
@Px
public int getItemPaddingBottom() {
throw null;
}
@Px
public int getItemPaddingTop() {
throw null;
}
@Nullable
public ColorStateList getItemRippleColor() {
throw null;
}
@StyleRes
public int getItemTextAppearanceActive() {
throw null;
}
@StyleRes
public int getItemTextAppearanceInactive() {
throw null;
}
@Nullable
public ColorStateList getItemTextColor() {
throw null;
}
public int getLabelVisibilityMode() {
throw null;
}
public abstract int getMaxItemCount();
@NonNull
public Menu getMenu() {
return null;
}
@NonNull
@RestrictTo
public MenuView getMenuView() {
return null;
}
@NonNull
public ViewGroup getMenuViewGroup() {
return null;
}
@NonNull
@RestrictTo
public NavigationBarPresenter getPresenter() {
return null;
}
public boolean getScaleLabelTextWithFont() {
throw null;
}
@IdRes
public int getSelectedItemId() {
throw null;
}
@Override // android.view.ViewGroup, android.view.View
public final void onAttachedToWindow() {
super.onAttachedToWindow();
MaterialShapeUtils.d(this);
}
@Override // android.view.View
public final void onRestoreInstanceState(Parcelable parcelable) {
if (!(parcelable instanceof SavedState)) {
super.onRestoreInstanceState(parcelable);
} else {
super.onRestoreInstanceState(((SavedState) parcelable).f936c);
throw null;
}
}
/* JADX WARN: Type inference failed for: r1v0, types: [com.google.android.material.navigation.NavigationBarView$SavedState, androidx.customview.view.AbsSavedState] */
@Override // android.view.View
public final Parcelable onSaveInstanceState() {
new AbsSavedState(super.onSaveInstanceState()).g = new Bundle();
throw null;
}
public void setActiveIndicatorLabelPadding(@Px int i) {
throw null;
}
@Override // android.view.View
public void setElevation(float f) {
super.setElevation(f);
MaterialShapeUtils.b(this, f);
}
public void setHorizontalItemTextAppearanceActive(@StyleRes int i) {
throw null;
}
public void setHorizontalItemTextAppearanceInactive(@StyleRes int i) {
throw null;
}
public void setIconLabelHorizontalSpacing(@Px int i) {
throw null;
}
public void setItemActiveIndicatorColor(@Nullable ColorStateList colorStateList) {
throw null;
}
public void setItemActiveIndicatorEnabled(boolean z) {
throw null;
}
public void setItemActiveIndicatorExpandedHeight(@Px int i) {
throw null;
}
public void setItemActiveIndicatorExpandedMarginHorizontal(@Px int i) {
throw null;
}
public void setItemActiveIndicatorExpandedWidth(@Px int i) {
throw null;
}
public void setItemActiveIndicatorHeight(@Px int i) {
throw null;
}
public void setItemActiveIndicatorMarginHorizontal(@Px int i) {
throw null;
}
public void setItemActiveIndicatorShapeAppearance(@Nullable ShapeAppearanceModel shapeAppearanceModel) {
throw null;
}
public void setItemActiveIndicatorWidth(@Px int i) {
throw null;
}
public void setItemBackground(@Nullable Drawable drawable) {
throw null;
}
public void setItemBackgroundResource(@DrawableRes int i) {
throw null;
}
public void setItemGravity(int i) {
throw null;
}
public void setItemIconGravity(int i) {
throw null;
}
public void setItemIconSize(@Dimension int i) {
throw null;
}
public void setItemIconSizeRes(@DimenRes int i) {
setItemIconSize(getResources().getDimensionPixelSize(i));
}
public void setItemIconTintList(@Nullable ColorStateList colorStateList) {
throw null;
}
public void setItemPaddingBottom(@Px int i) {
throw null;
}
public void setItemPaddingTop(@Px int i) {
throw null;
}
public void setItemRippleColor(@Nullable ColorStateList colorStateList) {
throw null;
}
public void setItemTextAppearanceActive(@StyleRes int i) {
throw null;
}
public void setItemTextAppearanceActiveBoldEnabled(boolean z) {
throw null;
}
public void setItemTextAppearanceInactive(@StyleRes int i) {
throw null;
}
public void setItemTextColor(@Nullable ColorStateList colorStateList) {
throw null;
}
public void setLabelFontScalingEnabled(boolean z) {
throw null;
}
public void setLabelMaxLines(int i) {
throw null;
}
public void setLabelVisibilityMode(int i) {
throw null;
}
public void setOnItemReselectedListener(@Nullable OnItemReselectedListener onItemReselectedListener) {
this.f = onItemReselectedListener;
}
public void setOnItemSelectedListener(@Nullable OnItemSelectedListener onItemSelectedListener) {
this.f11847c = onItemSelectedListener;
}
public void setSelectedItemId(@IdRes int i) {
throw null;
}
}