alexandroid/decompiled/jadx/sources/androidx/appcompat/widget/AppCompatTextClassifierHelper.java
KaKi87 a47fad5135 📦 Add decompiled Alexa 2.2.730155.0 (jadx, apktool, Hermes strings)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-07 00:04:16 +01:00

51 lines
1.8 KiB
Java

package androidx.appcompat.widget;
import android.view.textclassifier.TextClassificationManager;
import android.view.textclassifier.TextClassifier;
import android.widget.TextView;
import androidx.annotation.DoNotInline;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.RequiresApi;
import androidx.core.util.Preconditions;
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
/* loaded from: classes.dex */
final class AppCompatTextClassifierHelper {
@Nullable
private TextClassifier mTextClassifier;
@NonNull
private TextView mTextView;
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
@RequiresApi(26)
public static final class Api26Impl {
private Api26Impl() {
}
@NonNull
@DoNotInline
public static TextClassifier getTextClassifier(@NonNull TextView textView) {
TextClassificationManager textClassificationManager = (TextClassificationManager) textView.getContext().getSystemService(TextClassificationManager.class);
return textClassificationManager != null ? textClassificationManager.getTextClassifier() : TextClassifier.NO_OP;
}
}
public AppCompatTextClassifierHelper(@NonNull TextView textView) {
this.mTextView = (TextView) Preconditions.checkNotNull(textView);
}
@NonNull
@RequiresApi(api = 26)
public TextClassifier getTextClassifier() {
TextClassifier textClassifier = this.mTextClassifier;
return textClassifier == null ? Api26Impl.getTextClassifier(this.mTextView) : textClassifier;
}
@RequiresApi(api = 26)
public void setTextClassifier(@Nullable TextClassifier textClassifier) {
this.mTextClassifier = textClassifier;
}
}