* 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>
805 lines
29 KiB
Java
805 lines
29 KiB
Java
package androidx.appcompat.widget;
|
|
|
|
import android.annotation.SuppressLint;
|
|
import android.content.Context;
|
|
import android.content.res.ColorStateList;
|
|
import android.graphics.PorterDuff;
|
|
import android.graphics.Typeface;
|
|
import android.graphics.drawable.Drawable;
|
|
import android.os.Build;
|
|
import android.text.InputFilter;
|
|
import android.text.TextDirectionHeuristic;
|
|
import android.text.TextDirectionHeuristics;
|
|
import android.util.AttributeSet;
|
|
import android.view.ActionMode;
|
|
import android.view.inputmethod.EditorInfo;
|
|
import android.view.inputmethod.InputConnection;
|
|
import android.view.inputmethod.InputMethodManager;
|
|
import android.view.inspector.PropertyMapper;
|
|
import android.view.inspector.PropertyReader;
|
|
import android.view.textclassifier.TextClassifier;
|
|
import android.widget.TextView;
|
|
import androidx.annotation.DrawableRes;
|
|
import androidx.annotation.IntRange;
|
|
import androidx.annotation.NonNull;
|
|
import androidx.annotation.Nullable;
|
|
import androidx.annotation.Px;
|
|
import androidx.annotation.RequiresApi;
|
|
import androidx.annotation.RestrictTo;
|
|
import androidx.annotation.UiThread;
|
|
import androidx.appcompat.R;
|
|
import androidx.appcompat.content.res.AppCompatResources;
|
|
import androidx.appcompat.widget.AppCompatTextClassifierHelper;
|
|
import androidx.core.graphics.TypefaceCompat;
|
|
import androidx.core.graphics.TypefaceCompatBaseImpl;
|
|
import androidx.core.text.PrecomputedTextCompat;
|
|
import androidx.core.view.TintableBackgroundView;
|
|
import androidx.core.view.inputmethod.EditorInfoCompat;
|
|
import androidx.core.widget.AutoSizeableTextView;
|
|
import androidx.core.widget.TextViewCompat;
|
|
import androidx.core.widget.TintableCompoundDrawablesView;
|
|
import java.util.concurrent.ExecutionException;
|
|
import java.util.concurrent.Future;
|
|
import java.util.function.IntFunction;
|
|
|
|
/* loaded from: classes.dex */
|
|
public class AppCompatTextView extends TextView implements TintableBackgroundView, TintableCompoundDrawablesView, AutoSizeableTextView, EmojiCompatConfigurationView {
|
|
|
|
/* renamed from: c, reason: collision with root package name */
|
|
public final AppCompatBackgroundHelper f278c;
|
|
public final AppCompatTextHelper f;
|
|
public final AppCompatTextClassifierHelper g;
|
|
public AppCompatEmojiTextHelper h;
|
|
public boolean i;
|
|
public SuperCallerApi26 j;
|
|
public Future k;
|
|
|
|
@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 f279a;
|
|
public int b;
|
|
|
|
/* renamed from: c, reason: collision with root package name */
|
|
public int f280c;
|
|
public int d;
|
|
public int e;
|
|
public int f;
|
|
public int g;
|
|
public int h;
|
|
|
|
/* renamed from: androidx.appcompat.widget.AppCompatTextView$InspectionCompanion$1, reason: invalid class name */
|
|
/* loaded from: classes.dex */
|
|
class AnonymousClass1 implements IntFunction<String> {
|
|
@Override // java.util.function.IntFunction
|
|
public final String apply(int i) {
|
|
if (i != 0) {
|
|
if (i != 1) {
|
|
return String.valueOf(i);
|
|
}
|
|
return "uniform";
|
|
}
|
|
return "none";
|
|
}
|
|
}
|
|
|
|
/* JADX WARN: Multi-variable type inference failed */
|
|
/* JADX WARN: Type inference failed for: r1v3, types: [java.lang.Object, java.util.function.IntFunction] */
|
|
public final void mapProperties(PropertyMapper propertyMapper) {
|
|
this.f279a = propertyMapper.mapInt("autoSizeMaxTextSize", R.attr.autoSizeMaxTextSize);
|
|
this.b = propertyMapper.mapInt("autoSizeMinTextSize", R.attr.autoSizeMinTextSize);
|
|
this.f280c = propertyMapper.mapInt("autoSizeStepGranularity", R.attr.autoSizeStepGranularity);
|
|
this.d = propertyMapper.mapIntEnum("autoSizeTextType", R.attr.autoSizeTextType, new Object());
|
|
this.e = propertyMapper.mapObject("backgroundTint", R.attr.backgroundTint);
|
|
this.f = propertyMapper.mapObject("backgroundTintMode", R.attr.backgroundTintMode);
|
|
this.g = propertyMapper.mapObject("drawableTint", R.attr.drawableTint);
|
|
this.h = propertyMapper.mapObject("drawableTintMode", R.attr.drawableTintMode);
|
|
}
|
|
|
|
public final void readProperties(Object obj, PropertyReader propertyReader) {
|
|
AppCompatTextView appCompatTextView = (AppCompatTextView) obj;
|
|
propertyReader.readInt(this.f279a, appCompatTextView.getAutoSizeMaxTextSize());
|
|
propertyReader.readInt(this.b, appCompatTextView.getAutoSizeMinTextSize());
|
|
propertyReader.readInt(this.f280c, appCompatTextView.getAutoSizeStepGranularity());
|
|
propertyReader.readIntEnum(this.d, appCompatTextView.getAutoSizeTextType());
|
|
propertyReader.readObject(this.e, appCompatTextView.getBackgroundTintList());
|
|
propertyReader.readObject(this.f, appCompatTextView.getBackgroundTintMode());
|
|
propertyReader.readObject(this.g, appCompatTextView.getCompoundDrawableTintList());
|
|
propertyReader.readObject(this.h, appCompatTextView.getCompoundDrawableTintMode());
|
|
}
|
|
}
|
|
|
|
/* loaded from: classes.dex */
|
|
public interface SuperCaller {
|
|
void a(int[] iArr, int i);
|
|
|
|
int[] b();
|
|
|
|
TextClassifier c();
|
|
|
|
int d();
|
|
|
|
void e(TextClassifier textClassifier);
|
|
|
|
void f(int i);
|
|
|
|
void g(int i, int i2, int i3, int i4);
|
|
|
|
int h();
|
|
|
|
int i();
|
|
|
|
void j(int i);
|
|
|
|
int k();
|
|
|
|
void l(int i);
|
|
|
|
void m(int i, float f);
|
|
}
|
|
|
|
@RequiresApi
|
|
/* loaded from: classes.dex */
|
|
public class SuperCallerApi26 implements SuperCaller {
|
|
public SuperCallerApi26() {
|
|
}
|
|
|
|
@Override // androidx.appcompat.widget.AppCompatTextView.SuperCaller
|
|
public final void a(int[] iArr, int i) {
|
|
AppCompatTextView.super.setAutoSizeTextTypeUniformWithPresetSizes(iArr, i);
|
|
}
|
|
|
|
@Override // androidx.appcompat.widget.AppCompatTextView.SuperCaller
|
|
public final int[] b() {
|
|
return AppCompatTextView.super.getAutoSizeTextAvailableSizes();
|
|
}
|
|
|
|
@Override // androidx.appcompat.widget.AppCompatTextView.SuperCaller
|
|
public final TextClassifier c() {
|
|
return AppCompatTextView.super.getTextClassifier();
|
|
}
|
|
|
|
@Override // androidx.appcompat.widget.AppCompatTextView.SuperCaller
|
|
public final int d() {
|
|
return AppCompatTextView.super.getAutoSizeMaxTextSize();
|
|
}
|
|
|
|
@Override // androidx.appcompat.widget.AppCompatTextView.SuperCaller
|
|
public final void e(TextClassifier textClassifier) {
|
|
AppCompatTextView.super.setTextClassifier(textClassifier);
|
|
}
|
|
|
|
@Override // androidx.appcompat.widget.AppCompatTextView.SuperCaller
|
|
public void f(int i) {
|
|
}
|
|
|
|
@Override // androidx.appcompat.widget.AppCompatTextView.SuperCaller
|
|
public final void g(int i, int i2, int i3, int i4) {
|
|
AppCompatTextView.super.setAutoSizeTextTypeUniformWithConfiguration(i, i2, i3, i4);
|
|
}
|
|
|
|
@Override // androidx.appcompat.widget.AppCompatTextView.SuperCaller
|
|
public final int h() {
|
|
return AppCompatTextView.super.getAutoSizeTextType();
|
|
}
|
|
|
|
@Override // androidx.appcompat.widget.AppCompatTextView.SuperCaller
|
|
public final int i() {
|
|
return AppCompatTextView.super.getAutoSizeMinTextSize();
|
|
}
|
|
|
|
@Override // androidx.appcompat.widget.AppCompatTextView.SuperCaller
|
|
public void j(int i) {
|
|
}
|
|
|
|
@Override // androidx.appcompat.widget.AppCompatTextView.SuperCaller
|
|
public final int k() {
|
|
return AppCompatTextView.super.getAutoSizeStepGranularity();
|
|
}
|
|
|
|
@Override // androidx.appcompat.widget.AppCompatTextView.SuperCaller
|
|
public final void l(int i) {
|
|
AppCompatTextView.super.setAutoSizeTextTypeWithDefaults(i);
|
|
}
|
|
|
|
@Override // androidx.appcompat.widget.AppCompatTextView.SuperCaller
|
|
public void m(int i, float f) {
|
|
}
|
|
}
|
|
|
|
@RequiresApi
|
|
/* loaded from: classes.dex */
|
|
public class SuperCallerApi28 extends SuperCallerApi26 {
|
|
public SuperCallerApi28() {
|
|
super();
|
|
}
|
|
|
|
@Override // androidx.appcompat.widget.AppCompatTextView.SuperCallerApi26, androidx.appcompat.widget.AppCompatTextView.SuperCaller
|
|
public final void f(int i) {
|
|
AppCompatTextView.super.setLastBaselineToBottomHeight(i);
|
|
}
|
|
|
|
@Override // androidx.appcompat.widget.AppCompatTextView.SuperCallerApi26, androidx.appcompat.widget.AppCompatTextView.SuperCaller
|
|
public final void j(int i) {
|
|
AppCompatTextView.super.setFirstBaselineToTopHeight(i);
|
|
}
|
|
}
|
|
|
|
@RequiresApi
|
|
/* loaded from: classes.dex */
|
|
public class SuperCallerApi34 extends SuperCallerApi28 {
|
|
public SuperCallerApi34() {
|
|
super();
|
|
}
|
|
|
|
@Override // androidx.appcompat.widget.AppCompatTextView.SuperCallerApi26, androidx.appcompat.widget.AppCompatTextView.SuperCaller
|
|
public final void m(int i, float f) {
|
|
AppCompatTextView.super.setLineHeight(i, f);
|
|
}
|
|
}
|
|
|
|
public AppCompatTextView(Context context, AttributeSet attributeSet) {
|
|
this(context, attributeSet, android.R.attr.textViewStyle);
|
|
}
|
|
|
|
@NonNull
|
|
private AppCompatEmojiTextHelper getEmojiTextViewHelper() {
|
|
if (this.h == null) {
|
|
this.h = new AppCompatEmojiTextHelper(this);
|
|
}
|
|
return this.h;
|
|
}
|
|
|
|
@Override // android.widget.TextView, android.view.View
|
|
public final void drawableStateChanged() {
|
|
super.drawableStateChanged();
|
|
AppCompatBackgroundHelper appCompatBackgroundHelper = this.f278c;
|
|
if (appCompatBackgroundHelper != null) {
|
|
appCompatBackgroundHelper.a();
|
|
}
|
|
AppCompatTextHelper appCompatTextHelper = this.f;
|
|
if (appCompatTextHelper != null) {
|
|
appCompatTextHelper.b();
|
|
}
|
|
}
|
|
|
|
@Override // android.widget.TextView
|
|
@RestrictTo
|
|
public int getAutoSizeMaxTextSize() {
|
|
if (ViewUtils.f352c) {
|
|
return getSuperCaller().d();
|
|
}
|
|
AppCompatTextHelper appCompatTextHelper = this.f;
|
|
if (appCompatTextHelper != null) {
|
|
return Math.round(appCompatTextHelper.i.e);
|
|
}
|
|
return -1;
|
|
}
|
|
|
|
@Override // android.widget.TextView
|
|
@RestrictTo
|
|
public int getAutoSizeMinTextSize() {
|
|
if (ViewUtils.f352c) {
|
|
return getSuperCaller().i();
|
|
}
|
|
AppCompatTextHelper appCompatTextHelper = this.f;
|
|
if (appCompatTextHelper != null) {
|
|
return Math.round(appCompatTextHelper.i.d);
|
|
}
|
|
return -1;
|
|
}
|
|
|
|
@Override // android.widget.TextView
|
|
@RestrictTo
|
|
public int getAutoSizeStepGranularity() {
|
|
if (ViewUtils.f352c) {
|
|
return getSuperCaller().k();
|
|
}
|
|
AppCompatTextHelper appCompatTextHelper = this.f;
|
|
if (appCompatTextHelper != null) {
|
|
return Math.round(appCompatTextHelper.i.f284c);
|
|
}
|
|
return -1;
|
|
}
|
|
|
|
@Override // android.widget.TextView
|
|
@RestrictTo
|
|
public int[] getAutoSizeTextAvailableSizes() {
|
|
if (ViewUtils.f352c) {
|
|
return getSuperCaller().b();
|
|
}
|
|
AppCompatTextHelper appCompatTextHelper = this.f;
|
|
if (appCompatTextHelper != null) {
|
|
return appCompatTextHelper.i.f;
|
|
}
|
|
return new int[0];
|
|
}
|
|
|
|
@Override // android.widget.TextView
|
|
@SuppressLint({"WrongConstant"})
|
|
@RestrictTo
|
|
public int getAutoSizeTextType() {
|
|
if (ViewUtils.f352c) {
|
|
if (getSuperCaller().h() == 1) {
|
|
return 1;
|
|
}
|
|
return 0;
|
|
}
|
|
AppCompatTextHelper appCompatTextHelper = this.f;
|
|
if (appCompatTextHelper != null) {
|
|
return appCompatTextHelper.i.f283a;
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
@Override // android.widget.TextView
|
|
@Nullable
|
|
public ActionMode.Callback getCustomSelectionActionModeCallback() {
|
|
return TextViewCompat.g(super.getCustomSelectionActionModeCallback());
|
|
}
|
|
|
|
@Override // android.widget.TextView
|
|
public int getFirstBaselineToTopHeight() {
|
|
return getPaddingTop() - getPaint().getFontMetricsInt().top;
|
|
}
|
|
|
|
@Override // android.widget.TextView
|
|
public int getLastBaselineToBottomHeight() {
|
|
return getPaddingBottom() + getPaint().getFontMetricsInt().bottom;
|
|
}
|
|
|
|
@RequiresApi
|
|
@UiThread
|
|
public SuperCaller getSuperCaller() {
|
|
if (this.j == null) {
|
|
int i = Build.VERSION.SDK_INT;
|
|
if (i >= 34) {
|
|
this.j = new SuperCallerApi34();
|
|
} else if (i >= 28) {
|
|
this.j = new SuperCallerApi28();
|
|
} else if (i >= 26) {
|
|
this.j = new SuperCallerApi26();
|
|
}
|
|
}
|
|
return this.j;
|
|
}
|
|
|
|
@Nullable
|
|
@RestrictTo
|
|
public ColorStateList getSupportBackgroundTintList() {
|
|
AppCompatBackgroundHelper appCompatBackgroundHelper = this.f278c;
|
|
if (appCompatBackgroundHelper != null) {
|
|
return appCompatBackgroundHelper.b();
|
|
}
|
|
return null;
|
|
}
|
|
|
|
@Nullable
|
|
@RestrictTo
|
|
public PorterDuff.Mode getSupportBackgroundTintMode() {
|
|
AppCompatBackgroundHelper appCompatBackgroundHelper = this.f278c;
|
|
if (appCompatBackgroundHelper != null) {
|
|
return appCompatBackgroundHelper.c();
|
|
}
|
|
return null;
|
|
}
|
|
|
|
@Nullable
|
|
@RestrictTo
|
|
public ColorStateList getSupportCompoundDrawablesTintList() {
|
|
return this.f.d();
|
|
}
|
|
|
|
@Nullable
|
|
@RestrictTo
|
|
public PorterDuff.Mode getSupportCompoundDrawablesTintMode() {
|
|
return this.f.e();
|
|
}
|
|
|
|
@Override // android.widget.TextView
|
|
public CharSequence getText() {
|
|
Future future = this.k;
|
|
if (future != null) {
|
|
try {
|
|
this.k = null;
|
|
TextViewCompat.f(this, (PrecomputedTextCompat) future.get());
|
|
} catch (InterruptedException | ExecutionException unused) {
|
|
}
|
|
}
|
|
return super.getText();
|
|
}
|
|
|
|
@Override // android.widget.TextView
|
|
@NonNull
|
|
@RequiresApi
|
|
public TextClassifier getTextClassifier() {
|
|
AppCompatTextClassifierHelper appCompatTextClassifierHelper;
|
|
if (Build.VERSION.SDK_INT < 28 && (appCompatTextClassifierHelper = this.g) != null) {
|
|
TextClassifier textClassifier = appCompatTextClassifierHelper.b;
|
|
if (textClassifier == null) {
|
|
return AppCompatTextClassifierHelper.Api26Impl.a(appCompatTextClassifierHelper.f272a);
|
|
}
|
|
return textClassifier;
|
|
}
|
|
return getSuperCaller().c();
|
|
}
|
|
|
|
@NonNull
|
|
public PrecomputedTextCompat.Params getTextMetricsParamsCompat() {
|
|
return TextViewCompat.a(this);
|
|
}
|
|
|
|
@Override // android.widget.TextView, android.view.View
|
|
public final InputConnection onCreateInputConnection(EditorInfo editorInfo) {
|
|
InputConnection onCreateInputConnection = super.onCreateInputConnection(editorInfo);
|
|
this.f.getClass();
|
|
if (Build.VERSION.SDK_INT < 30 && onCreateInputConnection != null) {
|
|
EditorInfoCompat.c(editorInfo, getText());
|
|
}
|
|
AppCompatHintHelper.a(onCreateInputConnection, editorInfo, this);
|
|
return onCreateInputConnection;
|
|
}
|
|
|
|
@Override // android.view.View
|
|
public void onDetachedFromWindow() {
|
|
super.onDetachedFromWindow();
|
|
int i = Build.VERSION.SDK_INT;
|
|
if (i >= 30 && i < 33 && onCheckIsTextEditor()) {
|
|
((InputMethodManager) getContext().getSystemService("input_method")).isActive(this);
|
|
}
|
|
}
|
|
|
|
@Override // android.widget.TextView, android.view.View
|
|
public final void onLayout(boolean z, int i, int i2, int i3, int i4) {
|
|
super.onLayout(z, i, i2, i3, i4);
|
|
AppCompatTextHelper appCompatTextHelper = this.f;
|
|
if (appCompatTextHelper != null && !ViewUtils.f352c) {
|
|
appCompatTextHelper.i.a();
|
|
}
|
|
}
|
|
|
|
@Override // android.widget.TextView, android.view.View
|
|
public void onMeasure(int i, int i2) {
|
|
Future future = this.k;
|
|
if (future != null) {
|
|
try {
|
|
this.k = null;
|
|
TextViewCompat.f(this, (PrecomputedTextCompat) future.get());
|
|
} catch (InterruptedException | ExecutionException unused) {
|
|
}
|
|
}
|
|
super.onMeasure(i, i2);
|
|
}
|
|
|
|
@Override // android.widget.TextView
|
|
public final void onTextChanged(CharSequence charSequence, int i, int i2, int i3) {
|
|
super.onTextChanged(charSequence, i, i2, i3);
|
|
AppCompatTextHelper appCompatTextHelper = this.f;
|
|
if (appCompatTextHelper != null) {
|
|
AppCompatTextViewAutoSizeHelper appCompatTextViewAutoSizeHelper = appCompatTextHelper.i;
|
|
if (!ViewUtils.f352c && appCompatTextViewAutoSizeHelper.f()) {
|
|
appCompatTextViewAutoSizeHelper.a();
|
|
}
|
|
}
|
|
}
|
|
|
|
@Override // android.widget.TextView
|
|
public void setAllCaps(boolean z) {
|
|
super.setAllCaps(z);
|
|
getEmojiTextViewHelper().b(z);
|
|
}
|
|
|
|
@Override // android.widget.TextView
|
|
public final void setAutoSizeTextTypeUniformWithConfiguration(int i, int i2, int i3, int i4) {
|
|
if (ViewUtils.f352c) {
|
|
getSuperCaller().g(i, i2, i3, i4);
|
|
return;
|
|
}
|
|
AppCompatTextHelper appCompatTextHelper = this.f;
|
|
if (appCompatTextHelper != null) {
|
|
appCompatTextHelper.h(i, i2, i3, i4);
|
|
}
|
|
}
|
|
|
|
@Override // android.widget.TextView
|
|
public final void setAutoSizeTextTypeUniformWithPresetSizes(int[] iArr, int i) {
|
|
if (ViewUtils.f352c) {
|
|
getSuperCaller().a(iArr, i);
|
|
return;
|
|
}
|
|
AppCompatTextHelper appCompatTextHelper = this.f;
|
|
if (appCompatTextHelper != null) {
|
|
appCompatTextHelper.i(iArr, i);
|
|
}
|
|
}
|
|
|
|
@Override // android.widget.TextView
|
|
@RestrictTo
|
|
public void setAutoSizeTextTypeWithDefaults(int i) {
|
|
if (ViewUtils.f352c) {
|
|
getSuperCaller().l(i);
|
|
return;
|
|
}
|
|
AppCompatTextHelper appCompatTextHelper = this.f;
|
|
if (appCompatTextHelper != null) {
|
|
appCompatTextHelper.j(i);
|
|
}
|
|
}
|
|
|
|
@Override // android.view.View
|
|
public void setBackgroundDrawable(@Nullable Drawable drawable) {
|
|
super.setBackgroundDrawable(drawable);
|
|
AppCompatBackgroundHelper appCompatBackgroundHelper = this.f278c;
|
|
if (appCompatBackgroundHelper != null) {
|
|
appCompatBackgroundHelper.e();
|
|
}
|
|
}
|
|
|
|
@Override // android.view.View
|
|
public void setBackgroundResource(@DrawableRes int i) {
|
|
super.setBackgroundResource(i);
|
|
AppCompatBackgroundHelper appCompatBackgroundHelper = this.f278c;
|
|
if (appCompatBackgroundHelper != null) {
|
|
appCompatBackgroundHelper.f(i);
|
|
}
|
|
}
|
|
|
|
@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.f;
|
|
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.f;
|
|
if (appCompatTextHelper != null) {
|
|
appCompatTextHelper.b();
|
|
}
|
|
}
|
|
|
|
@Override // android.widget.TextView
|
|
public final void setCompoundDrawablesRelativeWithIntrinsicBounds(Drawable drawable, Drawable drawable2, Drawable drawable3, Drawable drawable4) {
|
|
super.setCompoundDrawablesRelativeWithIntrinsicBounds(drawable, drawable2, drawable3, drawable4);
|
|
AppCompatTextHelper appCompatTextHelper = this.f;
|
|
if (appCompatTextHelper != null) {
|
|
appCompatTextHelper.b();
|
|
}
|
|
}
|
|
|
|
@Override // android.widget.TextView
|
|
public final void setCompoundDrawablesWithIntrinsicBounds(Drawable drawable, Drawable drawable2, Drawable drawable3, Drawable drawable4) {
|
|
super.setCompoundDrawablesWithIntrinsicBounds(drawable, drawable2, drawable3, drawable4);
|
|
AppCompatTextHelper appCompatTextHelper = this.f;
|
|
if (appCompatTextHelper != null) {
|
|
appCompatTextHelper.b();
|
|
}
|
|
}
|
|
|
|
@Override // android.widget.TextView
|
|
public void setCustomSelectionActionModeCallback(@Nullable ActionMode.Callback callback) {
|
|
super.setCustomSelectionActionModeCallback(TextViewCompat.h(callback, this));
|
|
}
|
|
|
|
public void setEmojiCompatEnabled(boolean z) {
|
|
getEmojiTextViewHelper().c(z);
|
|
}
|
|
|
|
@Override // android.widget.TextView
|
|
public void setFilters(@NonNull InputFilter[] inputFilterArr) {
|
|
super.setFilters(getEmojiTextViewHelper().b.a(inputFilterArr));
|
|
}
|
|
|
|
@Override // android.widget.TextView
|
|
public void setFirstBaselineToTopHeight(@IntRange @Px int i) {
|
|
if (Build.VERSION.SDK_INT >= 28) {
|
|
getSuperCaller().j(i);
|
|
} else {
|
|
TextViewCompat.b(this, i);
|
|
}
|
|
}
|
|
|
|
@Override // android.widget.TextView
|
|
public void setLastBaselineToBottomHeight(@IntRange @Px int i) {
|
|
if (Build.VERSION.SDK_INT >= 28) {
|
|
getSuperCaller().f(i);
|
|
} else {
|
|
TextViewCompat.c(this, i);
|
|
}
|
|
}
|
|
|
|
@Override // android.widget.TextView
|
|
public void setLineHeight(@IntRange @Px int i) {
|
|
TextViewCompat.d(this, i);
|
|
}
|
|
|
|
public void setPrecomputedText(@NonNull PrecomputedTextCompat precomputedTextCompat) {
|
|
TextViewCompat.f(this, precomputedTextCompat);
|
|
}
|
|
|
|
@RestrictTo
|
|
public void setSupportBackgroundTintList(@Nullable ColorStateList colorStateList) {
|
|
AppCompatBackgroundHelper appCompatBackgroundHelper = this.f278c;
|
|
if (appCompatBackgroundHelper != null) {
|
|
appCompatBackgroundHelper.h(colorStateList);
|
|
}
|
|
}
|
|
|
|
@RestrictTo
|
|
public void setSupportBackgroundTintMode(@Nullable PorterDuff.Mode mode) {
|
|
AppCompatBackgroundHelper appCompatBackgroundHelper = this.f278c;
|
|
if (appCompatBackgroundHelper != null) {
|
|
appCompatBackgroundHelper.i(mode);
|
|
}
|
|
}
|
|
|
|
@Override // androidx.core.widget.TintableCompoundDrawablesView
|
|
@RestrictTo
|
|
public void setSupportCompoundDrawablesTintList(@Nullable ColorStateList colorStateList) {
|
|
AppCompatTextHelper appCompatTextHelper = this.f;
|
|
appCompatTextHelper.k(colorStateList);
|
|
appCompatTextHelper.b();
|
|
}
|
|
|
|
@Override // androidx.core.widget.TintableCompoundDrawablesView
|
|
@RestrictTo
|
|
public void setSupportCompoundDrawablesTintMode(@Nullable PorterDuff.Mode mode) {
|
|
AppCompatTextHelper appCompatTextHelper = this.f;
|
|
appCompatTextHelper.l(mode);
|
|
appCompatTextHelper.b();
|
|
}
|
|
|
|
@Override // android.widget.TextView
|
|
public void setTextAppearance(Context context, int i) {
|
|
super.setTextAppearance(context, i);
|
|
AppCompatTextHelper appCompatTextHelper = this.f;
|
|
if (appCompatTextHelper != null) {
|
|
appCompatTextHelper.g(context, i);
|
|
}
|
|
}
|
|
|
|
@Override // android.widget.TextView
|
|
@RequiresApi
|
|
public void setTextClassifier(@Nullable TextClassifier textClassifier) {
|
|
AppCompatTextClassifierHelper appCompatTextClassifierHelper;
|
|
if (Build.VERSION.SDK_INT < 28 && (appCompatTextClassifierHelper = this.g) != null) {
|
|
appCompatTextClassifierHelper.b = textClassifier;
|
|
} else {
|
|
getSuperCaller().e(textClassifier);
|
|
}
|
|
}
|
|
|
|
public void setTextFuture(@Nullable Future<PrecomputedTextCompat> future) {
|
|
this.k = future;
|
|
if (future != null) {
|
|
requestLayout();
|
|
}
|
|
}
|
|
|
|
public void setTextMetricsParamsCompat(@NonNull PrecomputedTextCompat.Params params) {
|
|
TextDirectionHeuristic textDirectionHeuristic;
|
|
TextDirectionHeuristic textDirectionHeuristic2 = params.b;
|
|
TextDirectionHeuristic textDirectionHeuristic3 = TextDirectionHeuristics.FIRSTSTRONG_RTL;
|
|
int i = 1;
|
|
if (textDirectionHeuristic2 != textDirectionHeuristic3 && textDirectionHeuristic2 != (textDirectionHeuristic = TextDirectionHeuristics.FIRSTSTRONG_LTR)) {
|
|
if (textDirectionHeuristic2 == TextDirectionHeuristics.ANYRTL_LTR) {
|
|
i = 2;
|
|
} else if (textDirectionHeuristic2 == TextDirectionHeuristics.LTR) {
|
|
i = 3;
|
|
} else if (textDirectionHeuristic2 == TextDirectionHeuristics.RTL) {
|
|
i = 4;
|
|
} else if (textDirectionHeuristic2 == TextDirectionHeuristics.LOCALE) {
|
|
i = 5;
|
|
} else if (textDirectionHeuristic2 == textDirectionHeuristic) {
|
|
i = 6;
|
|
} else if (textDirectionHeuristic2 == textDirectionHeuristic3) {
|
|
i = 7;
|
|
}
|
|
}
|
|
setTextDirection(i);
|
|
getPaint().set(params.f747a);
|
|
setBreakStrategy(params.f748c);
|
|
setHyphenationFrequency(params.d);
|
|
}
|
|
|
|
@Override // android.widget.TextView
|
|
public final void setTextSize(int i, float f) {
|
|
boolean z = ViewUtils.f352c;
|
|
if (z) {
|
|
super.setTextSize(i, f);
|
|
return;
|
|
}
|
|
AppCompatTextHelper appCompatTextHelper = this.f;
|
|
if (appCompatTextHelper != null) {
|
|
AppCompatTextViewAutoSizeHelper appCompatTextViewAutoSizeHelper = appCompatTextHelper.i;
|
|
if (!z && !appCompatTextViewAutoSizeHelper.f()) {
|
|
appCompatTextViewAutoSizeHelper.g(f, i);
|
|
}
|
|
}
|
|
}
|
|
|
|
@Override // android.widget.TextView
|
|
public final void setTypeface(Typeface typeface, int i) {
|
|
Typeface typeface2;
|
|
if (this.i) {
|
|
return;
|
|
}
|
|
if (typeface != null && i > 0) {
|
|
Context context = getContext();
|
|
TypefaceCompatBaseImpl typefaceCompatBaseImpl = TypefaceCompat.f686a;
|
|
if (context != null) {
|
|
typeface2 = Typeface.create(typeface, i);
|
|
} else {
|
|
throw new IllegalArgumentException("Context cannot be null");
|
|
}
|
|
} else {
|
|
typeface2 = null;
|
|
}
|
|
this.i = true;
|
|
if (typeface2 != null) {
|
|
typeface = typeface2;
|
|
}
|
|
try {
|
|
super.setTypeface(typeface, i);
|
|
} finally {
|
|
this.i = false;
|
|
}
|
|
}
|
|
|
|
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
|
/* JADX WARN: Type inference failed for: r1v6, types: [androidx.appcompat.widget.AppCompatTextClassifierHelper, java.lang.Object] */
|
|
public AppCompatTextView(Context context, AttributeSet attributeSet, int i) {
|
|
super(context, attributeSet, i);
|
|
TintContextWrapper.a(context);
|
|
this.i = false;
|
|
this.j = null;
|
|
ThemeUtils.a(getContext(), this);
|
|
AppCompatBackgroundHelper appCompatBackgroundHelper = new AppCompatBackgroundHelper(this);
|
|
this.f278c = appCompatBackgroundHelper;
|
|
appCompatBackgroundHelper.d(attributeSet, i);
|
|
AppCompatTextHelper appCompatTextHelper = new AppCompatTextHelper(this);
|
|
this.f = appCompatTextHelper;
|
|
appCompatTextHelper.f(attributeSet, i);
|
|
appCompatTextHelper.b();
|
|
?? obj = new Object();
|
|
obj.f272a = this;
|
|
this.g = obj;
|
|
getEmojiTextViewHelper().a(attributeSet, i);
|
|
}
|
|
|
|
@Override // android.widget.TextView
|
|
public final void setLineHeight(int i, float f) {
|
|
if (Build.VERSION.SDK_INT >= 34) {
|
|
getSuperCaller().m(i, f);
|
|
} else {
|
|
TextViewCompat.e(this, i, f);
|
|
}
|
|
}
|
|
|
|
@Override // android.widget.TextView
|
|
public final void setCompoundDrawablesRelativeWithIntrinsicBounds(int i, int i2, int i3, int i4) {
|
|
Context context = getContext();
|
|
setCompoundDrawablesRelativeWithIntrinsicBounds(i != 0 ? AppCompatResources.a(context, i) : null, i2 != 0 ? AppCompatResources.a(context, i2) : null, i3 != 0 ? AppCompatResources.a(context, i3) : null, i4 != 0 ? AppCompatResources.a(context, i4) : null);
|
|
AppCompatTextHelper appCompatTextHelper = this.f;
|
|
if (appCompatTextHelper != null) {
|
|
appCompatTextHelper.b();
|
|
}
|
|
}
|
|
|
|
@Override // android.widget.TextView
|
|
public final void setCompoundDrawablesWithIntrinsicBounds(int i, int i2, int i3, int i4) {
|
|
Context context = getContext();
|
|
setCompoundDrawablesWithIntrinsicBounds(i != 0 ? AppCompatResources.a(context, i) : null, i2 != 0 ? AppCompatResources.a(context, i2) : null, i3 != 0 ? AppCompatResources.a(context, i3) : null, i4 != 0 ? AppCompatResources.a(context, i4) : null);
|
|
AppCompatTextHelper appCompatTextHelper = this.f;
|
|
if (appCompatTextHelper != null) {
|
|
appCompatTextHelper.b();
|
|
}
|
|
}
|
|
}
|