* 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>
302 lines
12 KiB
Java
302 lines
12 KiB
Java
package com.google.android.material.textfield;
|
|
|
|
import android.animation.Animator;
|
|
import android.animation.AnimatorListenerAdapter;
|
|
import android.animation.AnimatorSet;
|
|
import android.animation.ObjectAnimator;
|
|
import android.animation.TimeInterpolator;
|
|
import android.content.Context;
|
|
import android.content.res.ColorStateList;
|
|
import android.graphics.Typeface;
|
|
import android.text.TextUtils;
|
|
import android.util.Property;
|
|
import android.view.View;
|
|
import android.view.animation.LinearInterpolator;
|
|
import android.widget.EditText;
|
|
import android.widget.FrameLayout;
|
|
import android.widget.LinearLayout;
|
|
import android.widget.TextView;
|
|
import androidx.appcompat.widget.AppCompatTextView;
|
|
import com.google.android.gms.ads.RequestConfiguration;
|
|
import com.google.android.material.R;
|
|
import com.google.android.material.animation.AnimationUtils;
|
|
import com.google.android.material.animation.AnimatorSetCompat;
|
|
import com.google.android.material.motion.MotionUtils;
|
|
import com.google.android.material.resources.MaterialResources;
|
|
import java.util.ArrayList;
|
|
|
|
/* JADX INFO: Access modifiers changed from: package-private */
|
|
/* loaded from: classes3.dex */
|
|
public final class IndicatorViewController {
|
|
public ColorStateList A;
|
|
public Typeface B;
|
|
|
|
/* renamed from: a, reason: collision with root package name */
|
|
public final int f11970a;
|
|
public final int b;
|
|
|
|
/* renamed from: c, reason: collision with root package name */
|
|
public final int f11971c;
|
|
public final TimeInterpolator d;
|
|
public final TimeInterpolator e;
|
|
public final TimeInterpolator f;
|
|
public final Context g;
|
|
public final TextInputLayout h;
|
|
public LinearLayout i;
|
|
public int j;
|
|
public FrameLayout k;
|
|
public AnimatorSet l;
|
|
public final float m;
|
|
public int n;
|
|
public int o;
|
|
public CharSequence p;
|
|
public boolean q;
|
|
public AppCompatTextView r;
|
|
public CharSequence s;
|
|
public int t;
|
|
public int u;
|
|
public ColorStateList v;
|
|
public CharSequence w;
|
|
public boolean x;
|
|
public AppCompatTextView y;
|
|
public int z;
|
|
|
|
public IndicatorViewController(TextInputLayout textInputLayout) {
|
|
Context context = textInputLayout.getContext();
|
|
this.g = context;
|
|
this.h = textInputLayout;
|
|
this.m = context.getResources().getDimensionPixelSize(R.dimen.design_textinput_caption_translate_y);
|
|
this.f11970a = MotionUtils.c(context, R.attr.motionDurationShort4, 217);
|
|
this.b = MotionUtils.c(context, R.attr.motionDurationMedium4, 167);
|
|
this.f11971c = MotionUtils.c(context, R.attr.motionDurationShort4, 167);
|
|
this.d = MotionUtils.d(context, R.attr.motionEasingEmphasizedDecelerateInterpolator, AnimationUtils.d);
|
|
int i = R.attr.motionEasingEmphasizedDecelerateInterpolator;
|
|
LinearInterpolator linearInterpolator = AnimationUtils.f11631a;
|
|
this.e = MotionUtils.d(context, i, linearInterpolator);
|
|
this.f = MotionUtils.d(context, R.attr.motionEasingLinearInterpolator, linearInterpolator);
|
|
}
|
|
|
|
public final void a(AppCompatTextView appCompatTextView, int i) {
|
|
if (this.i == null && this.k == null) {
|
|
Context context = this.g;
|
|
LinearLayout linearLayout = new LinearLayout(context);
|
|
this.i = linearLayout;
|
|
linearLayout.setOrientation(0);
|
|
LinearLayout linearLayout2 = this.i;
|
|
TextInputLayout textInputLayout = this.h;
|
|
textInputLayout.addView(linearLayout2, -1, -2);
|
|
this.k = new FrameLayout(context);
|
|
this.i.addView(this.k, new LinearLayout.LayoutParams(0, -2, 1.0f));
|
|
if (textInputLayout.getEditText() != null) {
|
|
b();
|
|
}
|
|
}
|
|
if (i != 0 && i != 1) {
|
|
this.i.addView(appCompatTextView, new LinearLayout.LayoutParams(-2, -2));
|
|
} else {
|
|
this.k.setVisibility(0);
|
|
this.k.addView(appCompatTextView);
|
|
}
|
|
this.i.setVisibility(0);
|
|
this.j++;
|
|
}
|
|
|
|
public final void b() {
|
|
if (this.i != null) {
|
|
TextInputLayout textInputLayout = this.h;
|
|
if (textInputLayout.getEditText() != null) {
|
|
EditText editText = textInputLayout.getEditText();
|
|
Context context = this.g;
|
|
boolean e = MaterialResources.e(context);
|
|
LinearLayout linearLayout = this.i;
|
|
int i = R.dimen.material_helper_text_font_1_3_padding_horizontal;
|
|
int paddingStart = editText.getPaddingStart();
|
|
if (e) {
|
|
paddingStart = context.getResources().getDimensionPixelSize(i);
|
|
}
|
|
int i2 = R.dimen.material_helper_text_font_1_3_padding_top;
|
|
int dimensionPixelSize = context.getResources().getDimensionPixelSize(R.dimen.material_helper_text_default_padding_top);
|
|
if (e) {
|
|
dimensionPixelSize = context.getResources().getDimensionPixelSize(i2);
|
|
}
|
|
int i3 = R.dimen.material_helper_text_font_1_3_padding_horizontal;
|
|
int paddingEnd = editText.getPaddingEnd();
|
|
if (e) {
|
|
paddingEnd = context.getResources().getDimensionPixelSize(i3);
|
|
}
|
|
linearLayout.setPaddingRelative(paddingStart, dimensionPixelSize, paddingEnd, 0);
|
|
}
|
|
}
|
|
}
|
|
|
|
public final void c() {
|
|
AnimatorSet animatorSet = this.l;
|
|
if (animatorSet != null) {
|
|
animatorSet.cancel();
|
|
}
|
|
}
|
|
|
|
public final void d(ArrayList arrayList, boolean z, AppCompatTextView appCompatTextView, int i, int i2, int i3) {
|
|
boolean z2;
|
|
float f;
|
|
long j;
|
|
TimeInterpolator timeInterpolator;
|
|
if (appCompatTextView != null && z) {
|
|
if (i == i3 || i == i2) {
|
|
if (i3 == i) {
|
|
z2 = true;
|
|
} else {
|
|
z2 = false;
|
|
}
|
|
if (z2) {
|
|
f = 1.0f;
|
|
} else {
|
|
f = 0.0f;
|
|
}
|
|
ObjectAnimator ofFloat = ObjectAnimator.ofFloat(appCompatTextView, (Property<AppCompatTextView, Float>) View.ALPHA, f);
|
|
int i4 = this.f11971c;
|
|
if (z2) {
|
|
j = this.b;
|
|
} else {
|
|
j = i4;
|
|
}
|
|
ofFloat.setDuration(j);
|
|
if (z2) {
|
|
timeInterpolator = this.e;
|
|
} else {
|
|
timeInterpolator = this.f;
|
|
}
|
|
ofFloat.setInterpolator(timeInterpolator);
|
|
if (i == i3 && i2 != 0) {
|
|
ofFloat.setStartDelay(i4);
|
|
}
|
|
arrayList.add(ofFloat);
|
|
if (i3 == i && i2 != 0) {
|
|
ObjectAnimator ofFloat2 = ObjectAnimator.ofFloat(appCompatTextView, (Property<AppCompatTextView, Float>) View.TRANSLATION_Y, -this.m, 0.0f);
|
|
ofFloat2.setDuration(this.f11970a);
|
|
ofFloat2.setInterpolator(this.d);
|
|
ofFloat2.setStartDelay(i4);
|
|
arrayList.add(ofFloat2);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
public final TextView e(int i) {
|
|
if (i != 1) {
|
|
if (i != 2) {
|
|
return null;
|
|
}
|
|
return this.y;
|
|
}
|
|
return this.r;
|
|
}
|
|
|
|
public final void f() {
|
|
this.p = null;
|
|
c();
|
|
if (this.n == 1) {
|
|
if (this.x && !TextUtils.isEmpty(this.w)) {
|
|
this.o = 2;
|
|
} else {
|
|
this.o = 0;
|
|
}
|
|
}
|
|
i(this.n, this.o, h(this.r, RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED));
|
|
}
|
|
|
|
public final void g(AppCompatTextView appCompatTextView, int i) {
|
|
FrameLayout frameLayout;
|
|
LinearLayout linearLayout = this.i;
|
|
if (linearLayout != null) {
|
|
if ((i == 0 || i == 1) && (frameLayout = this.k) != null) {
|
|
frameLayout.removeView(appCompatTextView);
|
|
} else {
|
|
linearLayout.removeView(appCompatTextView);
|
|
}
|
|
int i2 = this.j - 1;
|
|
this.j = i2;
|
|
LinearLayout linearLayout2 = this.i;
|
|
if (i2 == 0) {
|
|
linearLayout2.setVisibility(8);
|
|
}
|
|
}
|
|
}
|
|
|
|
public final boolean h(AppCompatTextView appCompatTextView, CharSequence charSequence) {
|
|
TextInputLayout textInputLayout = this.h;
|
|
if (textInputLayout.isLaidOut() && textInputLayout.isEnabled()) {
|
|
if (this.o != this.n || appCompatTextView == null || !TextUtils.equals(appCompatTextView.getText(), charSequence)) {
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
public final void i(final int i, final int i2, boolean z) {
|
|
TextView e;
|
|
TextView e2;
|
|
if (i == i2) {
|
|
return;
|
|
}
|
|
if (z) {
|
|
AnimatorSet animatorSet = new AnimatorSet();
|
|
this.l = animatorSet;
|
|
ArrayList arrayList = new ArrayList();
|
|
d(arrayList, this.x, this.y, 2, i, i2);
|
|
d(arrayList, this.q, this.r, 1, i, i2);
|
|
AnimatorSetCompat.a(animatorSet, arrayList);
|
|
final TextView e3 = e(i);
|
|
final TextView e4 = e(i2);
|
|
animatorSet.addListener(new AnimatorListenerAdapter() { // from class: com.google.android.material.textfield.IndicatorViewController.1
|
|
@Override // android.animation.AnimatorListenerAdapter, android.animation.Animator.AnimatorListener
|
|
public final void onAnimationEnd(Animator animator) {
|
|
AppCompatTextView appCompatTextView;
|
|
int i3 = i2;
|
|
IndicatorViewController indicatorViewController = IndicatorViewController.this;
|
|
indicatorViewController.n = i3;
|
|
indicatorViewController.l = null;
|
|
TextView textView = e3;
|
|
if (textView != null) {
|
|
textView.setVisibility(4);
|
|
if (i == 1 && (appCompatTextView = indicatorViewController.r) != null) {
|
|
appCompatTextView.setText((CharSequence) null);
|
|
}
|
|
}
|
|
TextView textView2 = e4;
|
|
if (textView2 != null) {
|
|
textView2.setTranslationY(0.0f);
|
|
textView2.setAlpha(1.0f);
|
|
}
|
|
}
|
|
|
|
@Override // android.animation.AnimatorListenerAdapter, android.animation.Animator.AnimatorListener
|
|
public final void onAnimationStart(Animator animator) {
|
|
TextView textView = e4;
|
|
if (textView != null) {
|
|
textView.setVisibility(0);
|
|
textView.setAlpha(0.0f);
|
|
}
|
|
}
|
|
});
|
|
animatorSet.start();
|
|
} else if (i != i2) {
|
|
if (i2 != 0 && (e2 = e(i2)) != null) {
|
|
e2.setVisibility(0);
|
|
e2.setAlpha(1.0f);
|
|
}
|
|
if (i != 0 && (e = e(i)) != null) {
|
|
e.setVisibility(4);
|
|
if (i == 1) {
|
|
e.setText((CharSequence) null);
|
|
}
|
|
}
|
|
this.n = i2;
|
|
}
|
|
TextInputLayout textInputLayout = this.h;
|
|
textInputLayout.t();
|
|
textInputLayout.w(z, false);
|
|
textInputLayout.z();
|
|
}
|
|
}
|