Rabbit-R1/android (non root)/java/sources/androidx/compose/ui/platform/AndroidComposeView.java

2153 lines
138 KiB
Java
Raw Normal View History

2024-05-21 21:08:36 +00:00
package androidx.compose.ui.platform;
import android.content.Context;
import android.content.res.Configuration;
import android.graphics.Canvas;
import android.graphics.Rect;
import android.os.SystemClock;
import android.os.Trace;
import android.util.Log;
import android.util.SparseArray;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewParent;
import android.view.ViewStructure;
import android.view.ViewTreeObserver;
import android.view.accessibility.AccessibilityNodeInfo;
import android.view.animation.AnimationUtils;
import android.view.autofill.AutofillValue;
import android.view.inputmethod.EditorInfo;
import android.view.inputmethod.InputConnection;
import androidx.compose.runtime.MutableState;
import androidx.compose.runtime.SnapshotStateKt;
import androidx.compose.runtime.SnapshotStateKt__SnapshotStateKt;
import androidx.compose.runtime.State;
import androidx.compose.runtime.collection.MutableVector;
import androidx.compose.ui.Modifier;
import androidx.compose.ui.autofill.AndroidAutofill;
import androidx.compose.ui.autofill.AndroidAutofill_androidKt;
import androidx.compose.ui.autofill.Autofill;
import androidx.compose.ui.autofill.AutofillCallback;
import androidx.compose.ui.autofill.AutofillTree;
import androidx.compose.ui.focus.FocusDirection;
import androidx.compose.ui.focus.FocusOwner;
import androidx.compose.ui.focus.FocusOwnerImpl;
import androidx.compose.ui.geometry.Offset;
import androidx.compose.ui.geometry.OffsetKt;
import androidx.compose.ui.graphics.CanvasHolder;
import androidx.compose.ui.graphics.Matrix;
import androidx.compose.ui.hapticfeedback.HapticFeedback;
import androidx.compose.ui.hapticfeedback.PlatformHapticFeedback;
import androidx.compose.ui.input.InputMode;
import androidx.compose.ui.input.InputModeManager;
import androidx.compose.ui.input.InputModeManagerImpl;
import androidx.compose.ui.input.key.Key;
import androidx.compose.ui.input.key.KeyEvent;
import androidx.compose.ui.input.key.KeyEventType;
import androidx.compose.ui.input.key.KeyEvent_androidKt;
import androidx.compose.ui.input.key.KeyInputModifierKt;
import androidx.compose.ui.input.pointer.MotionEventAdapter;
import androidx.compose.ui.input.pointer.PointerIcon;
import androidx.compose.ui.input.pointer.PointerIconService;
import androidx.compose.ui.input.pointer.PointerInputEvent;
import androidx.compose.ui.input.pointer.PointerInputEventData;
import androidx.compose.ui.input.pointer.PointerInputEventProcessor;
import androidx.compose.ui.input.pointer.PointerInputEventProcessorKt;
import androidx.compose.ui.input.pointer.PointerKeyboardModifiers;
import androidx.compose.ui.input.pointer.PositionCalculator;
import androidx.compose.ui.input.pointer.ProcessResult;
import androidx.compose.ui.input.rotary.RotaryInputModifierKt;
import androidx.compose.ui.input.rotary.RotaryScrollEvent;
import androidx.compose.ui.layout.RootMeasurePolicy;
import androidx.compose.ui.modifier.ModifierLocalManager;
import androidx.compose.ui.node.LayoutNode;
import androidx.compose.ui.node.LayoutNodeDrawScope;
import androidx.compose.ui.node.MeasureAndLayoutDelegate;
import androidx.compose.ui.node.OwnedLayer;
import androidx.compose.ui.node.Owner;
import androidx.compose.ui.node.OwnerSnapshotObserver;
import androidx.compose.ui.node.RootForTest;
import androidx.compose.ui.platform.AndroidComposeView;
import androidx.compose.ui.semantics.EmptySemanticsElement;
import androidx.compose.ui.semantics.SemanticsOwner;
import androidx.compose.ui.text.font.Font;
import androidx.compose.ui.text.font.FontFamily;
import androidx.compose.ui.text.font.FontFamilyResolver_androidKt;
import androidx.compose.ui.text.input.AndroidTextInputServicePlugin;
import androidx.compose.ui.text.input.PlatformTextInput;
import androidx.compose.ui.text.input.PlatformTextInputAdapter;
import androidx.compose.ui.text.input.PlatformTextInputPlugin;
import androidx.compose.ui.text.input.PlatformTextInputPluginRegistryImpl;
import androidx.compose.ui.text.input.TextInputService;
import androidx.compose.ui.unit.AndroidDensity_androidKt;
import androidx.compose.ui.unit.Constraints;
import androidx.compose.ui.unit.Density;
import androidx.compose.ui.unit.IntOffset;
import androidx.compose.ui.unit.IntOffsetKt;
import androidx.compose.ui.unit.LayoutDirection;
import androidx.compose.ui.viewinterop.AndroidViewHolder;
import androidx.core.app.NotificationCompat;
import androidx.core.view.AccessibilityDelegateCompat;
import androidx.core.view.ViewCompat;
import androidx.core.view.ViewConfigurationCompat;
import androidx.lifecycle.DefaultLifecycleObserver;
import androidx.lifecycle.Lifecycle;
import androidx.lifecycle.LifecycleOwner;
import androidx.lifecycle.ViewTreeLifecycleOwner;
import androidx.media3.exoplayer.upstream.CmcdHeadersFactory;
import androidx.savedstate.SavedStateRegistryOwner;
import androidx.savedstate.ViewTreeSavedStateRegistryOwner;
import io.flutter.embedding.android.KeyboardMap;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import kotlin.Deprecated;
import kotlin.Metadata;
import kotlin.ReplaceWith;
import kotlin.ULong;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.CoroutineContext;
import kotlin.coroutines.intrinsics.IntrinsicsKt;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.TypeIntrinsics;
import kotlin.math.MathKt;
/* compiled from: AndroidComposeView.android.kt */
@Metadata(d1 = {"\u0000Î\u0004\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\b\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u0002\n\u0002\b\u0007\n\u0002\u0010\b\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0010!\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0007\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0010\u000b\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0007\n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\t\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0007\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\b\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0010\u0015\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0007\n\u0002\u0018\u0002\n\u0002\b\b\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000e\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0010\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u000b\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u001f\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0013\n\u0002\u0018\u0002\n\u0002\b\u0007\n\u0002\u0018\u0002\n\u0002\b\u000f\n\u0002\u0018\u0002\n\u0002\b\u001d*\u0002¥\u0001\b\u0001\u0018\u0000 \u0098\u00032\u00020\u00012\u00020\u00022\u00020\u00032\u00020\u00042\u00020\u0005:\u0004\u0098\u0003\u0099\u0003B\u0015\u0012\u0006\u0010\u0006\u001a\u00020\u0007\u0012\u0006\u0010\b\u001a\u00020\\u0006\u0002\u0010\nJ\u001b\u0010ï\u0001\u001a\u0002062\b\u0010Ô\u0001\u001a\u00030ð\u00012\b\u0010ñ\u0001\u001a\u00030¨\u0001J&\u0010ò\u0001\u001a\u0002062\u0007\u0010ó\u0001\u001a\u00020>2\b\u0010ô\u0001\u001a\u00030õ\u00012\b\u0010ö\u0001\u001a\u00030÷\u0001H\u0002J\u0019\u0010%\u001a\u0002062\u000f\u0010ø\u0001\u001a\n\u0012\u0005\u0012\u00030ú\u00010ù\u0001H\u0016J\t\u0010û\u0001\u001a\u00020[H\u0002J\u0013\u0010ü\u0001\u001a\u000206H\u0086@ø\u0001\u0000¢\u0006\u0003\u0010ý\u0001J!\u0010þ\u0001\u001a\u00020t2\u0007\u0010ÿ\u0001\u001a\u00020tH\u0016ø\u0001\u0001ø\u0001\u0000¢\u0006\u0006\b\u0080\u0002\u0010\u0081\u0002J!\u0010\u0082\u0002\u001a\u00020t2\u0007\u0010\u0083\u0002\u001a\u00020tH\u0016ø\u0001\u0001ø\u0001\u0000¢\u0006\u0006\b\u0084\u0002\u0010\u0081\u0002J\u0012\u0010\u0085\u0002\u001a\u00020[2\u0007\u0010\u0086\u0002\u001a\u00020>H\u0016J\u0012\u0010\u0087\u0002\u001a\u00020[2\u0007\u0010\u0086\u0002\u001a\u00020>H\u0016J\u0012\u0010\u0088\u0002\u001a\u0002062\u0007\u0010\u0089\u0002\u001a\u00020\u0001H\u0002J%\u0010\u008a\u0002\u001a\u00030\u008b\u00022\u0007\u0010\u008c\u0002\u001a\u00020>H\u0002ø\u0001\u
/* loaded from: classes.dex */
public final class AndroidComposeView extends ViewGroup implements Owner, ViewRootForTest, PositionCalculator, DefaultLifecycleObserver {
/* renamed from: Companion, reason: from kotlin metadata */
public static final Companion INSTANCE = new Companion(null);
private static final String FocusTag = "Compose Focus";
private static final int MaximumLayerCacheSize = 10;
private static Method getBooleanMethod;
private static Class<?> systemPropertiesClass;
private AndroidViewsHandler _androidViewsHandler;
private final AndroidAutofill _autofill;
private final InputModeManagerImpl _inputModeManager;
/* renamed from: _viewTreeOwners$delegate, reason: from kotlin metadata */
private final MutableState _viewTreeOwners;
private final WindowInfoImpl _windowInfo;
private final AndroidComposeViewAccessibilityDelegateCompat accessibilityDelegate;
private final AndroidAccessibilityManager accessibilityManager;
private final AutofillTree autofillTree;
private final CanvasHolder canvasHolder;
private final AndroidClipboardManager clipboardManager;
private Function1<? super Configuration, Unit> configurationChangeObserver;
private final CoroutineContext coroutineContext;
private int currentFontWeightAdjustment;
private Density density;
private final List<OwnedLayer> dirtyLayers;
private final MutableVector<Function0<Unit>> endApplyChangesListeners;
private final FocusOwner focusOwner;
/* renamed from: fontFamilyResolver$delegate, reason: from kotlin metadata */
private final MutableState fontFamilyResolver;
private final Font.ResourceLoader fontLoader;
private boolean forceUseMatrixCache;
private final ViewTreeObserver.OnGlobalLayoutListener globalLayoutListener;
private long globalPosition;
private final HapticFeedback hapticFeedBack;
private boolean hoverExitReceived;
private boolean isDrawingContent;
private boolean isRenderNodeCompatible;
private final Modifier keyInputModifier;
private boolean keyboardModifiersRequireUpdate;
private long lastDownPointerPosition;
private long lastMatrixRecalculationAnimationTime;
private final WeakCache<OwnedLayer> layerCache;
/* renamed from: layoutDirection$delegate, reason: from kotlin metadata */
private final MutableState layoutDirection;
private final CalculateMatrixToWindow matrixToWindow;
private final MeasureAndLayoutDelegate measureAndLayoutDelegate;
private final ModifierLocalManager modifierLocalManager;
private final MotionEventAdapter motionEventAdapter;
private boolean observationClearRequested;
private Constraints onMeasureConstraints;
private Function1<? super ViewTreeOwners, Unit> onViewTreeOwnersAvailable;
private final PlatformTextInputPluginRegistryImpl platformTextInputPluginRegistry;
private final PointerIconService pointerIconService;
private final PointerInputEventProcessor pointerInputEventProcessor;
private List<OwnedLayer> postponedDirtyLayers;
private MotionEvent previousMotionEvent;
private long relayoutTime;
private final Function0<Unit> resendMotionEventOnLayout;
private final AndroidComposeView$resendMotionEventRunnable$1 resendMotionEventRunnable;
private final LayoutNode root;
private final RootForTest rootForTest;
private final Modifier rotaryInputModifier;
private final ViewTreeObserver.OnScrollChangedListener scrollChangedListener;
private final EmptySemanticsElement semanticsModifier;
private final SemanticsOwner semanticsOwner;
private final Runnable sendHoverExitEvent;
private final LayoutNodeDrawScope sharedDrawScope;
private boolean showLayoutBounds;
private final OwnerSnapshotObserver snapshotObserver;
private boolean superclassInitComplete;
private final TextInputService textInputService;
private final TextToolbar textToolbar;
private final int[] tmpPositionArray;
private final ViewTreeObserver.OnTouchModeChangeListener touchModeChangeListener;
private final ViewConfiguration viewConfiguration;
private DrawChildContainer viewLayersContainer;
private final float[] viewToWindowMatrix;
/* renamed from: viewTreeOwners$delegate, reason: from kotlin metadata */
private final State viewTreeOwners;
private boolean wasMeasuredWithMultipleConstraints;
private long windowPosition;
private final float[] windowToViewMatrix;
private final boolean autofillSupported() {
return true;
}
private final View findViewByAccessibilityIdRootedAtCurrentView(int accessibilityId, View currentView) {
return null;
}
@Deprecated(message = "fontLoader is deprecated, use fontFamilyResolver", replaceWith = @ReplaceWith(expression = "fontFamilyResolver", imports = {}))
public static /* synthetic */ void getFontLoader$annotations() {
}
public static /* synthetic */ void getLastMatrixRecalculationAnimationTime$ui_release$annotations() {
}
public static /* synthetic */ void getShowLayoutBounds$annotations() {
}
@Override // androidx.compose.ui.node.Owner
public AndroidAccessibilityManager getAccessibilityManager() {
return this.accessibilityManager;
}
@Override // androidx.compose.ui.node.Owner
public AutofillTree getAutofillTree() {
return this.autofillTree;
}
@Override // androidx.compose.ui.node.Owner
public AndroidClipboardManager getClipboardManager() {
return this.clipboardManager;
}
public final Function1<Configuration, Unit> getConfigurationChangeObserver() {
return this.configurationChangeObserver;
}
@Override // androidx.compose.ui.node.Owner
public CoroutineContext getCoroutineContext() {
return this.coroutineContext;
}
@Override // androidx.compose.ui.node.Owner, androidx.compose.ui.node.RootForTest
public Density getDensity() {
return this.density;
}
@Override // androidx.compose.ui.node.Owner
public FocusOwner getFocusOwner() {
return this.focusOwner;
}
@Override // androidx.compose.ui.node.Owner
public Font.ResourceLoader getFontLoader() {
return this.fontLoader;
}
@Override // androidx.compose.ui.node.Owner
public HapticFeedback getHapticFeedBack() {
return this.hapticFeedBack;
}
/* renamed from: getLastMatrixRecalculationAnimationTime$ui_release, reason: from getter */
public final long getLastMatrixRecalculationAnimationTime() {
return this.lastMatrixRecalculationAnimationTime;
}
@Override // androidx.compose.ui.node.Owner
public ModifierLocalManager getModifierLocalManager() {
return this.modifierLocalManager;
}
@Override // androidx.compose.ui.node.Owner
public PlatformTextInputPluginRegistryImpl getPlatformTextInputPluginRegistry() {
return this.platformTextInputPluginRegistry;
}
@Override // androidx.compose.ui.node.Owner
public PointerIconService getPointerIconService() {
return this.pointerIconService;
}
@Override // androidx.compose.ui.node.Owner
public LayoutNode getRoot() {
return this.root;
}
@Override // androidx.compose.ui.node.Owner
public RootForTest getRootForTest() {
return this.rootForTest;
}
@Override // androidx.compose.ui.node.RootForTest
public SemanticsOwner getSemanticsOwner() {
return this.semanticsOwner;
}
@Override // androidx.compose.ui.node.Owner
public LayoutNodeDrawScope getSharedDrawScope() {
return this.sharedDrawScope;
}
@Override // androidx.compose.ui.node.Owner
public boolean getShowLayoutBounds() {
return this.showLayoutBounds;
}
@Override // androidx.compose.ui.node.Owner
public OwnerSnapshotObserver getSnapshotObserver() {
return this.snapshotObserver;
}
@Override // androidx.compose.ui.node.Owner, androidx.compose.ui.node.RootForTest
public TextInputService getTextInputService() {
return this.textInputService;
}
@Override // androidx.compose.ui.node.Owner
public TextToolbar getTextToolbar() {
return this.textToolbar;
}
@Override // androidx.compose.ui.node.Owner
public ViewConfiguration getViewConfiguration() {
return this.viewConfiguration;
}
@Override // androidx.compose.ui.node.Owner
public void onAttach(LayoutNode node) {
Intrinsics.checkNotNullParameter(node, "node");
}
@Override // android.view.View
protected void onDraw(Canvas canvas) {
Intrinsics.checkNotNullParameter(canvas, "canvas");
}
public final void requestClearInvalidObservations() {
this.observationClearRequested = true;
}
public final void setConfigurationChangeObserver(Function1<? super Configuration, Unit> function1) {
Intrinsics.checkNotNullParameter(function1, "<set-?>");
this.configurationChangeObserver = function1;
}
public final void setLastMatrixRecalculationAnimationTime$ui_release(long j) {
this.lastMatrixRecalculationAnimationTime = j;
}
@Override // androidx.compose.ui.node.Owner
public void setShowLayoutBounds(boolean z) {
this.showLayoutBounds = z;
}
@Override // android.view.ViewGroup
public boolean shouldDelayChildPressedState() {
return false;
}
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
/* JADX WARN: Multi-variable type inference failed */
/* JADX WARN: Type inference failed for: r9v13, types: [androidx.compose.ui.platform.AndroidComposeView$resendMotionEventRunnable$1] */
public AndroidComposeView(Context context, CoroutineContext coroutineContext) {
super(context);
MutableState mutableStateOf$default;
MutableState mutableStateOf$default2;
Intrinsics.checkNotNullParameter(context, "context");
Intrinsics.checkNotNullParameter(coroutineContext, "coroutineContext");
this.lastDownPointerPosition = Offset.INSTANCE.m2415getUnspecifiedF1C5BW0();
this.superclassInitComplete = true;
this.sharedDrawScope = new LayoutNodeDrawScope(null, 1, 0 == true ? 1 : 0);
this.density = AndroidDensity_androidKt.Density(context);
EmptySemanticsElement emptySemanticsElement = EmptySemanticsElement.INSTANCE;
this.semanticsModifier = emptySemanticsElement;
this.focusOwner = new FocusOwnerImpl(new Function1<Function0<? extends Unit>, Unit>() { // from class: androidx.compose.ui.platform.AndroidComposeView$focusOwner$1
/* JADX INFO: Access modifiers changed from: package-private */
{
super(1);
}
@Override // kotlin.jvm.functions.Function1
public /* bridge */ /* synthetic */ Unit invoke(Function0<? extends Unit> function0) {
invoke2((Function0<Unit>) function0);
return Unit.INSTANCE;
}
/* renamed from: invoke, reason: avoid collision after fix types in other method */
public final void invoke2(Function0<Unit> it) {
Intrinsics.checkNotNullParameter(it, "it");
AndroidComposeView.this.registerOnEndApplyChangesListener(it);
}
});
this._windowInfo = new WindowInfoImpl();
Modifier onKeyEvent = KeyInputModifierKt.onKeyEvent(Modifier.INSTANCE, new Function1<KeyEvent, Boolean>() { // from class: androidx.compose.ui.platform.AndroidComposeView$keyInputModifier$1
/* JADX INFO: Access modifiers changed from: package-private */
{
super(1);
}
@Override // kotlin.jvm.functions.Function1
public /* bridge */ /* synthetic */ Boolean invoke(KeyEvent keyEvent) {
return m4171invokeZmokQxo(keyEvent.m3614unboximpl());
}
/* renamed from: invoke-ZmokQxo, reason: not valid java name */
public final Boolean m4171invokeZmokQxo(android.view.KeyEvent it) {
Intrinsics.checkNotNullParameter(it, "it");
FocusDirection mo4145getFocusDirectionP8AzH3I = AndroidComposeView.this.mo4145getFocusDirectionP8AzH3I(it);
if (mo4145getFocusDirectionP8AzH3I == null || !KeyEventType.m3618equalsimpl0(KeyEvent_androidKt.m3626getTypeZmokQxo(it), KeyEventType.INSTANCE.m3622getKeyDownCS__XNY())) {
return false;
}
return Boolean.valueOf(AndroidComposeView.this.getFocusOwner().mo2337moveFocus3ESFkO8(mo4145getFocusDirectionP8AzH3I.getValue()));
}
});
this.keyInputModifier = onKeyEvent;
Modifier onRotaryScrollEvent = RotaryInputModifierKt.onRotaryScrollEvent(Modifier.INSTANCE, new Function1<RotaryScrollEvent, Boolean>() { // from class: androidx.compose.ui.platform.AndroidComposeView$rotaryInputModifier$1
@Override // kotlin.jvm.functions.Function1
public final Boolean invoke(RotaryScrollEvent it) {
Intrinsics.checkNotNullParameter(it, "it");
return false;
}
});
this.rotaryInputModifier = onRotaryScrollEvent;
this.canvasHolder = new CanvasHolder();
LayoutNode layoutNode = new LayoutNode(false, 0, 3, null);
layoutNode.setMeasurePolicy(RootMeasurePolicy.INSTANCE);
layoutNode.setDensity(getDensity());
layoutNode.setModifier(Modifier.INSTANCE.then(emptySemanticsElement).then(onRotaryScrollEvent).then(getFocusOwner().getModifier()).then(onKeyEvent));
this.root = layoutNode;
this.rootForTest = this;
this.semanticsOwner = new SemanticsOwner(getRoot());
AndroidComposeViewAccessibilityDelegateCompat androidComposeViewAccessibilityDelegateCompat = new AndroidComposeViewAccessibilityDelegateCompat(this);
this.accessibilityDelegate = androidComposeViewAccessibilityDelegateCompat;
this.autofillTree = new AutofillTree();
this.dirtyLayers = new ArrayList();
this.motionEventAdapter = new MotionEventAdapter();
this.pointerInputEventProcessor = new PointerInputEventProcessor(getRoot());
this.configurationChangeObserver = new Function1<Configuration, Unit>() { // from class: androidx.compose.ui.platform.AndroidComposeView$configurationChangeObserver$1
/* renamed from: invoke, reason: avoid collision after fix types in other method */
public final void invoke2(Configuration it) {
Intrinsics.checkNotNullParameter(it, "it");
}
@Override // kotlin.jvm.functions.Function1
public /* bridge */ /* synthetic */ Unit invoke(Configuration configuration) {
invoke2(configuration);
return Unit.INSTANCE;
}
};
this._autofill = autofillSupported() ? new AndroidAutofill(this, getAutofillTree()) : null;
this.clipboardManager = new AndroidClipboardManager(context);
this.accessibilityManager = new AndroidAccessibilityManager(context);
this.snapshotObserver = new OwnerSnapshotObserver(new AndroidComposeView$snapshotObserver$1(this));
this.measureAndLayoutDelegate = new MeasureAndLayoutDelegate(getRoot());
android.view.ViewConfiguration viewConfiguration = android.view.ViewConfiguration.get(context);
Intrinsics.checkNotNullExpressionValue(viewConfiguration, "get(context)");
this.viewConfiguration = new AndroidViewConfiguration(viewConfiguration);
this.globalPosition = IntOffsetKt.IntOffset(Integer.MAX_VALUE, Integer.MAX_VALUE);
this.tmpPositionArray = new int[]{0, 0};
this.viewToWindowMatrix = Matrix.m2864constructorimpl$default(null, 1, null);
this.windowToViewMatrix = Matrix.m2864constructorimpl$default(null, 1, null);
this.lastMatrixRecalculationAnimationTime = -1L;
this.windowPosition = Offset.INSTANCE.m2414getInfiniteF1C5BW0();
this.isRenderNodeCompatible = true;
mutableStateOf$default = SnapshotStateKt__SnapshotStateKt.mutableStateOf$default(null, null, 2, null);
this._viewTreeOwners = mutableStateOf$default;
this.viewTreeOwners = SnapshotStateKt.derivedStateOf(new Function0<ViewTreeOwners>() { // from class: androidx.compose.ui.platform.AndroidComposeView$viewTreeOwners$2
/* JADX INFO: Access modifiers changed from: package-private */
{
super(0);
}
/* JADX WARN: Can't rename method to resolve collision */
@Override // kotlin.jvm.functions.Function0
public final AndroidComposeView.ViewTreeOwners invoke() {
AndroidComposeView.ViewTreeOwners viewTreeOwners;
viewTreeOwners = AndroidComposeView.this.get_viewTreeOwners();
return viewTreeOwners;
}
});
this.globalLayoutListener = new ViewTreeObserver.OnGlobalLayoutListener() { // from class: androidx.compose.ui.platform.AndroidComposeView$$ExternalSyntheticLambda0
@Override // android.view.ViewTreeObserver.OnGlobalLayoutListener
public final void onGlobalLayout() {
AndroidComposeView.globalLayoutListener$lambda$1(AndroidComposeView.this);
}
};
this.scrollChangedListener = new ViewTreeObserver.OnScrollChangedListener() { // from class: androidx.compose.ui.platform.AndroidComposeView$$ExternalSyntheticLambda1
@Override // android.view.ViewTreeObserver.OnScrollChangedListener
public final void onScrollChanged() {
AndroidComposeView.scrollChangedListener$lambda$2(AndroidComposeView.this);
}
};
this.touchModeChangeListener = new ViewTreeObserver.OnTouchModeChangeListener() { // from class: androidx.compose.ui.platform.AndroidComposeView$$ExternalSyntheticLambda2
@Override // android.view.ViewTreeObserver.OnTouchModeChangeListener
public final void onTouchModeChanged(boolean z) {
AndroidComposeView.touchModeChangeListener$lambda$3(AndroidComposeView.this, z);
}
};
this.platformTextInputPluginRegistry = new PlatformTextInputPluginRegistryImpl(new Function2<PlatformTextInputPlugin<?>, PlatformTextInput, PlatformTextInputAdapter>() { // from class: androidx.compose.ui.platform.AndroidComposeView$platformTextInputPluginRegistry$1
/* JADX INFO: Access modifiers changed from: package-private */
{
super(2);
}
/* JADX WARN: Type inference failed for: r1v3, types: [androidx.compose.ui.text.input.PlatformTextInputAdapter] */
@Override // kotlin.jvm.functions.Function2
public final PlatformTextInputAdapter invoke(PlatformTextInputPlugin<?> factory, PlatformTextInput platformTextInput) {
Intrinsics.checkNotNullParameter(factory, "factory");
Intrinsics.checkNotNullParameter(platformTextInput, "platformTextInput");
return factory.createAdapter(platformTextInput, AndroidComposeView.this);
}
});
this.textInputService = ((AndroidTextInputServicePlugin.Adapter) getPlatformTextInputPluginRegistry().getOrCreateAdapter(AndroidTextInputServicePlugin.INSTANCE).getAdapter()).getService();
this.fontLoader = new AndroidFontResourceLoader(context);
this.fontFamilyResolver = SnapshotStateKt.mutableStateOf(FontFamilyResolver_androidKt.createFontFamilyResolver(context), SnapshotStateKt.referentialEqualityPolicy());
Configuration configuration = context.getResources().getConfiguration();
Intrinsics.checkNotNullExpressionValue(configuration, "context.resources.configuration");
this.currentFontWeightAdjustment = getFontWeightAdjustmentCompat(configuration);
Configuration configuration2 = context.getResources().getConfiguration();
Intrinsics.checkNotNullExpressionValue(configuration2, "context.resources.configuration");
mutableStateOf$default2 = SnapshotStateKt__SnapshotStateKt.mutableStateOf$default(AndroidComposeView_androidKt.getLocaleLayoutDirection(configuration2), null, 2, null);
this.layoutDirection = mutableStateOf$default2;
AndroidComposeView androidComposeView = this;
this.hapticFeedBack = new PlatformHapticFeedback(androidComposeView);
this._inputModeManager = new InputModeManagerImpl(isInTouchMode() ? InputMode.INSTANCE.m3308getTouchaOaMEAU() : InputMode.INSTANCE.m3307getKeyboardaOaMEAU(), new Function1<InputMode, Boolean>() { // from class: androidx.compose.ui.platform.AndroidComposeView$_inputModeManager$1
/* JADX INFO: Access modifiers changed from: package-private */
{
super(1);
}
@Override // kotlin.jvm.functions.Function1
public /* bridge */ /* synthetic */ Boolean invoke(InputMode inputMode) {
return m4170invokeiuPiT84(inputMode.getValue());
}
/* renamed from: invoke-iuPiT84, reason: not valid java name */
public final Boolean m4170invokeiuPiT84(int i) {
boolean requestFocusFromTouch;
if (InputMode.m3303equalsimpl0(i, InputMode.INSTANCE.m3308getTouchaOaMEAU())) {
requestFocusFromTouch = AndroidComposeView.this.isInTouchMode();
} else {
requestFocusFromTouch = InputMode.m3303equalsimpl0(i, InputMode.INSTANCE.m3307getKeyboardaOaMEAU()) ? AndroidComposeView.this.isInTouchMode() ? AndroidComposeView.this.requestFocusFromTouch() : true : false;
}
return Boolean.valueOf(requestFocusFromTouch);
}
}, null);
AndroidComposeView androidComposeView2 = this;
this.modifierLocalManager = new ModifierLocalManager(androidComposeView2);
this.textToolbar = new AndroidTextToolbar(androidComposeView);
this.coroutineContext = coroutineContext;
this.layerCache = new WeakCache<>();
this.endApplyChangesListeners = new MutableVector<>(new Function0[16], 0);
this.resendMotionEventRunnable = new Runnable() { // from class: androidx.compose.ui.platform.AndroidComposeView$resendMotionEventRunnable$1
@Override // java.lang.Runnable
public void run() {
MotionEvent motionEvent;
long j;
AndroidComposeView.this.removeCallbacks(this);
motionEvent = AndroidComposeView.this.previousMotionEvent;
if (motionEvent != null) {
boolean z = motionEvent.getToolType(0) == 3;
int actionMasked = motionEvent.getActionMasked();
if (z) {
if (actionMasked == 10 || actionMasked == 1) {
return;
}
} else if (actionMasked == 1) {
return;
}
int i = 7;
if (actionMasked != 7 && actionMasked != 9) {
i = 2;
}
AndroidComposeView androidComposeView3 = AndroidComposeView.this;
j = androidComposeView3.relayoutTime;
androidComposeView3.sendSimulatedEvent(motionEvent, i, j, false);
}
}
};
this.sendHoverExitEvent = new Runnable() { // from class: androidx.compose.ui.platform.AndroidComposeView$$ExternalSyntheticLambda3
@Override // java.lang.Runnable
public final void run() {
AndroidComposeView.sendHoverExitEvent$lambda$5(AndroidComposeView.this);
}
};
this.resendMotionEventOnLayout = new Function0<Unit>() { // from class: androidx.compose.ui.platform.AndroidComposeView$resendMotionEventOnLayout$1
/* JADX INFO: Access modifiers changed from: package-private */
{
super(0);
}
@Override // kotlin.jvm.functions.Function0
public /* bridge */ /* synthetic */ Unit invoke() {
invoke2();
return Unit.INSTANCE;
}
/* renamed from: invoke, reason: avoid collision after fix types in other method */
public final void invoke2() {
MotionEvent motionEvent;
AndroidComposeView$resendMotionEventRunnable$1 androidComposeView$resendMotionEventRunnable$1;
motionEvent = AndroidComposeView.this.previousMotionEvent;
if (motionEvent != null) {
int actionMasked = motionEvent.getActionMasked();
if (actionMasked == 7 || actionMasked == 9) {
AndroidComposeView.this.relayoutTime = SystemClock.uptimeMillis();
AndroidComposeView androidComposeView3 = AndroidComposeView.this;
androidComposeView$resendMotionEventRunnable$1 = androidComposeView3.resendMotionEventRunnable;
androidComposeView3.post(androidComposeView$resendMotionEventRunnable$1);
}
}
}
};
this.matrixToWindow = new CalculateMatrixToWindowApi29();
setWillNotDraw(false);
setFocusable(true);
AndroidComposeViewVerificationHelperMethodsO.INSTANCE.focusable(androidComposeView, 1, false);
setFocusableInTouchMode(true);
setClipChildren(false);
ViewCompat.setAccessibilityDelegate(androidComposeView, androidComposeViewAccessibilityDelegateCompat);
Function1<ViewRootForTest, Unit> onViewCreatedCallback = ViewRootForTest.INSTANCE.getOnViewCreatedCallback();
if (onViewCreatedCallback != null) {
onViewCreatedCallback.invoke(this);
}
getRoot().attach$ui_release(androidComposeView2);
AndroidComposeViewForceDarkModeQ.INSTANCE.disallowForceDark(androidComposeView);
this.pointerIconService = new PointerIconService() { // from class: androidx.compose.ui.platform.AndroidComposeView$pointerIconService$1
private PointerIcon currentIcon = PointerIcon.INSTANCE.getDefault();
@Override // androidx.compose.ui.input.pointer.PointerIconService
/* renamed from: getIcon, reason: from getter */
public PointerIcon getCurrentIcon() {
return this.currentIcon;
}
@Override // androidx.compose.ui.input.pointer.PointerIconService
public void setIcon(PointerIcon value) {
if (value == null) {
value = PointerIcon.INSTANCE.getDefault();
}
this.currentIcon = value;
AndroidComposeViewVerificationHelperMethodsN.INSTANCE.setPointerIcon(AndroidComposeView.this, this.currentIcon);
}
};
}
@Override // androidx.compose.ui.platform.ViewRootForTest
public View getView() {
return this;
}
@Override // androidx.compose.ui.node.Owner
public WindowInfo getWindowInfo() {
return this._windowInfo;
}
@Override // androidx.compose.ui.node.Owner
public Autofill getAutofill() {
return this._autofill;
}
public final AndroidViewsHandler getAndroidViewsHandler$ui_release() {
if (this._androidViewsHandler == null) {
Context context = getContext();
Intrinsics.checkNotNullExpressionValue(context, "context");
AndroidViewsHandler androidViewsHandler = new AndroidViewsHandler(context);
this._androidViewsHandler = androidViewsHandler;
addView(androidViewsHandler);
}
AndroidViewsHandler androidViewsHandler2 = this._androidViewsHandler;
Intrinsics.checkNotNull(androidViewsHandler2);
return androidViewsHandler2;
}
@Override // androidx.compose.ui.node.Owner
public long getMeasureIteration() {
return this.measureAndLayoutDelegate.getMeasureIteration();
}
@Override // androidx.compose.ui.platform.ViewRootForTest
public boolean getHasPendingMeasureOrLayout() {
return this.measureAndLayoutDelegate.getHasPendingMeasureOrLayout();
}
/* JADX INFO: Access modifiers changed from: private */
/* JADX WARN: Multi-variable type inference failed */
public final ViewTreeOwners get_viewTreeOwners() {
return (ViewTreeOwners) this._viewTreeOwners.getValue();
}
/* JADX INFO: Access modifiers changed from: private */
public static final void globalLayoutListener$lambda$1(AndroidComposeView this$0) {
Intrinsics.checkNotNullParameter(this$0, "this$0");
this$0.updatePositionCacheAndDispatch();
}
/* JADX INFO: Access modifiers changed from: private */
public static final void scrollChangedListener$lambda$2(AndroidComposeView this$0) {
Intrinsics.checkNotNullParameter(this$0, "this$0");
this$0.updatePositionCacheAndDispatch();
}
/* JADX INFO: Access modifiers changed from: private */
public static final void touchModeChangeListener$lambda$3(AndroidComposeView this$0, boolean z) {
Intrinsics.checkNotNullParameter(this$0, "this$0");
this$0._inputModeManager.m3311setInputModeiuPiT84(z ? InputMode.INSTANCE.m3308getTouchaOaMEAU() : InputMode.INSTANCE.m3307getKeyboardaOaMEAU());
}
@Override // androidx.compose.ui.node.Owner
public FontFamily.Resolver getFontFamilyResolver() {
return (FontFamily.Resolver) this.fontFamilyResolver.getValue();
}
private final int getFontWeightAdjustmentCompat(Configuration configuration) {
return configuration.fontWeightAdjustment;
}
/* JADX WARN: Multi-variable type inference failed */
@Override // android.view.View, android.view.ViewParent, androidx.compose.ui.node.Owner
public LayoutDirection getLayoutDirection() {
return (LayoutDirection) this.layoutDirection.getValue();
}
@Override // androidx.compose.ui.node.Owner
public InputModeManager getInputModeManager() {
return this._inputModeManager;
}
/* JADX INFO: Access modifiers changed from: private */
public static final void sendHoverExitEvent$lambda$5(AndroidComposeView this$0) {
Intrinsics.checkNotNullParameter(this$0, "this$0");
this$0.hoverExitReceived = false;
MotionEvent motionEvent = this$0.previousMotionEvent;
Intrinsics.checkNotNull(motionEvent);
if (motionEvent.getActionMasked() != 10) {
throw new IllegalStateException("The ACTION_HOVER_EXIT event was not cleared.".toString());
}
this$0.m4169sendMotionEvent8iAsVTc(motionEvent);
}
@Override // android.view.View
public void getFocusedRect(Rect rect) {
Unit unit;
Intrinsics.checkNotNullParameter(rect, "rect");
androidx.compose.ui.geometry.Rect focusRect = getFocusOwner().getFocusRect();
if (focusRect != null) {
rect.left = MathKt.roundToInt(focusRect.getLeft());
rect.top = MathKt.roundToInt(focusRect.getTop());
rect.right = MathKt.roundToInt(focusRect.getRight());
rect.bottom = MathKt.roundToInt(focusRect.getBottom());
unit = Unit.INSTANCE;
} else {
unit = null;
}
if (unit == null) {
super.getFocusedRect(rect);
}
}
@Override // androidx.lifecycle.DefaultLifecycleObserver
public void onResume(LifecycleOwner owner) {
Intrinsics.checkNotNullParameter(owner, "owner");
setShowLayoutBounds(INSTANCE.getIsShowingLayoutBounds());
}
@Override // android.view.View
protected void onFocusChanged(boolean gainFocus, int direction, Rect previouslyFocusedRect) {
super.onFocusChanged(gainFocus, direction, previouslyFocusedRect);
Log.d(FocusTag, "Owner FocusChanged(" + gainFocus + ')');
FocusOwner focusOwner = getFocusOwner();
if (gainFocus) {
focusOwner.takeFocus();
} else {
focusOwner.releaseFocus();
}
}
@Override // android.view.View
public void onWindowFocusChanged(boolean hasWindowFocus) {
boolean isShowingLayoutBounds;
this._windowInfo.setWindowFocused(hasWindowFocus);
this.keyboardModifiersRequireUpdate = true;
super.onWindowFocusChanged(hasWindowFocus);
if (!hasWindowFocus || getShowLayoutBounds() == (isShowingLayoutBounds = INSTANCE.getIsShowingLayoutBounds())) {
return;
}
setShowLayoutBounds(isShowingLayoutBounds);
invalidateDescendants();
}
@Override // androidx.compose.ui.node.RootForTest
/* renamed from: sendKeyEvent-ZmokQxo */
public boolean mo4147sendKeyEventZmokQxo(android.view.KeyEvent keyEvent) {
Intrinsics.checkNotNullParameter(keyEvent, "keyEvent");
return getFocusOwner().mo2338dispatchInterceptedSoftKeyboardEventZmokQxo(keyEvent) || getFocusOwner().mo2339dispatchKeyEventZmokQxo(keyEvent);
}
@Override // android.view.ViewGroup, android.view.View
public boolean dispatchKeyEvent(android.view.KeyEvent event) {
Intrinsics.checkNotNullParameter(event, "event");
if (isFocused()) {
this._windowInfo.m4238setKeyboardModifiers5xRPYO0(PointerKeyboardModifiers.m3820constructorimpl(event.getMetaState()));
return getFocusOwner().mo2339dispatchKeyEventZmokQxo(KeyEvent.m3609constructorimpl(event)) || super.dispatchKeyEvent(event);
}
return super.dispatchKeyEvent(event);
}
@Override // android.view.ViewGroup, android.view.View
public boolean dispatchKeyEventPreIme(android.view.KeyEvent event) {
Intrinsics.checkNotNullParameter(event, "event");
return (isFocused() && getFocusOwner().mo2338dispatchInterceptedSoftKeyboardEventZmokQxo(KeyEvent.m3609constructorimpl(event))) || super.dispatchKeyEventPreIme(event);
}
@Override // androidx.compose.ui.node.Owner
public void onDetach(LayoutNode node) {
Intrinsics.checkNotNullParameter(node, "node");
this.measureAndLayoutDelegate.onNodeDetached(node);
requestClearInvalidObservations();
}
@Override // androidx.compose.ui.node.Owner
public void onEndApplyChanges() {
if (this.observationClearRequested) {
getSnapshotObserver().clearInvalidObservations$ui_release();
this.observationClearRequested = false;
}
AndroidViewsHandler androidViewsHandler = this._androidViewsHandler;
if (androidViewsHandler != null) {
clearChildInvalidObservations(androidViewsHandler);
}
while (this.endApplyChangesListeners.isNotEmpty()) {
int size = this.endApplyChangesListeners.getSize();
for (int i = 0; i < size; i++) {
Function0<Unit> function0 = this.endApplyChangesListeners.getContent()[i];
this.endApplyChangesListeners.set(i, null);
if (function0 != null) {
function0.invoke();
}
}
this.endApplyChangesListeners.removeRange(0, size);
}
}
@Override // androidx.compose.ui.node.Owner
public void registerOnEndApplyChangesListener(Function0<Unit> listener) {
Intrinsics.checkNotNullParameter(listener, "listener");
if (this.endApplyChangesListeners.contains(listener)) {
return;
}
this.endApplyChangesListeners.add(listener);
}
private final void clearChildInvalidObservations(ViewGroup viewGroup) {
int childCount = viewGroup.getChildCount();
for (int i = 0; i < childCount; i++) {
View childAt = viewGroup.getChildAt(i);
if (childAt instanceof AndroidComposeView) {
((AndroidComposeView) childAt).onEndApplyChanges();
} else if (childAt instanceof ViewGroup) {
clearChildInvalidObservations((ViewGroup) childAt);
}
}
}
/* JADX INFO: Access modifiers changed from: private */
public final void addExtraDataToAccessibilityNodeInfoHelper(int virtualViewId, AccessibilityNodeInfo info, String extraDataKey) {
Integer num;
if (Intrinsics.areEqual(extraDataKey, this.accessibilityDelegate.getEXTRA_DATA_TEST_TRAVERSALBEFORE_VAL())) {
Integer num2 = this.accessibilityDelegate.getIdToBeforeMap$ui_release().get(Integer.valueOf(virtualViewId));
if (num2 != null) {
info.getExtras().putInt(extraDataKey, num2.intValue());
return;
}
return;
}
if (!Intrinsics.areEqual(extraDataKey, this.accessibilityDelegate.getEXTRA_DATA_TEST_TRAVERSALAFTER_VAL()) || (num = this.accessibilityDelegate.getIdToAfterMap$ui_release().get(Integer.valueOf(virtualViewId))) == null) {
return;
}
info.getExtras().putInt(extraDataKey, num.intValue());
}
public final void addAndroidView(AndroidViewHolder view, final LayoutNode layoutNode) {
Intrinsics.checkNotNullParameter(view, "view");
Intrinsics.checkNotNullParameter(layoutNode, "layoutNode");
getAndroidViewsHandler$ui_release().getHolderToLayoutNode().put(view, layoutNode);
AndroidViewHolder androidViewHolder = view;
getAndroidViewsHandler$ui_release().addView(androidViewHolder);
getAndroidViewsHandler$ui_release().getLayoutNodeToHolder().put(layoutNode, view);
ViewCompat.setImportantForAccessibility(androidViewHolder, 1);
ViewCompat.setAccessibilityDelegate(androidViewHolder, new AccessibilityDelegateCompat() { // from class: androidx.compose.ui.platform.AndroidComposeView$addAndroidView$1
/* JADX WARN: Code restructure failed: missing block: B:6:0x0037, code lost:
if (r7.intValue() == r2.getSemanticsOwner().getUnmergedRootSemanticsNode().getId()) goto L9;
*/
@Override // androidx.core.view.AccessibilityDelegateCompat
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public void onInitializeAccessibilityNodeInfo(android.view.View r7, androidx.core.view.accessibility.AccessibilityNodeInfoCompat r8) {
/*
r6 = this;
java.lang.String r0 = "host"
kotlin.jvm.internal.Intrinsics.checkNotNullParameter(r7, r0)
java.lang.String r0 = "info"
kotlin.jvm.internal.Intrinsics.checkNotNullParameter(r8, r0)
super.onInitializeAccessibilityNodeInfo(r7, r8)
androidx.compose.ui.node.LayoutNode r7 = androidx.compose.ui.node.LayoutNode.this
androidx.compose.ui.platform.AndroidComposeView$addAndroidView$1$onInitializeAccessibilityNodeInfo$parentId$1 r0 = new kotlin.jvm.functions.Function1<androidx.compose.ui.node.LayoutNode, java.lang.Boolean>() { // from class: androidx.compose.ui.platform.AndroidComposeView$addAndroidView$1$onInitializeAccessibilityNodeInfo$parentId$1
static {
/*
androidx.compose.ui.platform.AndroidComposeView$addAndroidView$1$onInitializeAccessibilityNodeInfo$parentId$1 r0 = new androidx.compose.ui.platform.AndroidComposeView$addAndroidView$1$onInitializeAccessibilityNodeInfo$parentId$1
r0.<init>()
// error: 0x0005: SPUT (r0 I:androidx.compose.ui.platform.AndroidComposeView$addAndroidView$1$onInitializeAccessibilityNodeInfo$parentId$1) androidx.compose.ui.platform.AndroidComposeView$addAndroidView$1$onInitializeAccessibilityNodeInfo$parentId$1.INSTANCE androidx.compose.ui.platform.AndroidComposeView$addAndroidView$1$onInitializeAccessibilityNodeInfo$parentId$1
return
*/
throw new UnsupportedOperationException("Method not decompiled: androidx.compose.ui.platform.AndroidComposeView$addAndroidView$1$onInitializeAccessibilityNodeInfo$parentId$1.<clinit>():void");
}
{
/*
r1 = this;
r0 = 1
r1.<init>(r0)
return
*/
throw new UnsupportedOperationException("Method not decompiled: androidx.compose.ui.platform.AndroidComposeView$addAndroidView$1$onInitializeAccessibilityNodeInfo$parentId$1.<init>():void");
}
@Override // kotlin.jvm.functions.Function1
public final java.lang.Boolean invoke(androidx.compose.ui.node.LayoutNode r1) {
/*
r0 = this;
java.lang.String r0 = "it"
kotlin.jvm.internal.Intrinsics.checkNotNullParameter(r1, r0)
androidx.compose.ui.node.NodeChain r0 = r1.getNodes()
r1 = 8
int r1 = androidx.compose.ui.node.NodeKind.m4091constructorimpl(r1)
boolean r0 = r0.m4054hasH91voCI$ui_release(r1)
java.lang.Boolean r0 = java.lang.Boolean.valueOf(r0)
return r0
*/
throw new UnsupportedOperationException("Method not decompiled: androidx.compose.ui.platform.AndroidComposeView$addAndroidView$1$onInitializeAccessibilityNodeInfo$parentId$1.invoke(androidx.compose.ui.node.LayoutNode):java.lang.Boolean");
}
@Override // kotlin.jvm.functions.Function1
public /* bridge */ /* synthetic */ java.lang.Boolean invoke(androidx.compose.ui.node.LayoutNode r1) {
/*
r0 = this;
androidx.compose.ui.node.LayoutNode r1 = (androidx.compose.ui.node.LayoutNode) r1
java.lang.Boolean r0 = r0.invoke(r1)
return r0
*/
throw new UnsupportedOperationException("Method not decompiled: androidx.compose.ui.platform.AndroidComposeView$addAndroidView$1$onInitializeAccessibilityNodeInfo$parentId$1.invoke(java.lang.Object):java.lang.Object");
}
}
kotlin.jvm.functions.Function1 r0 = (kotlin.jvm.functions.Function1) r0
androidx.compose.ui.node.LayoutNode r7 = androidx.compose.ui.semantics.SemanticsNodeKt.findClosestParentNode(r7, r0)
if (r7 == 0) goto L22
int r7 = r7.getSemanticsId()
java.lang.Integer r7 = java.lang.Integer.valueOf(r7)
goto L23
L22:
r7 = 0
L23:
if (r7 == 0) goto L39
androidx.compose.ui.platform.AndroidComposeView r0 = r2
androidx.compose.ui.semantics.SemanticsOwner r0 = r0.getSemanticsOwner()
androidx.compose.ui.semantics.SemanticsNode r0 = r0.getUnmergedRootSemanticsNode()
int r0 = r0.getId()
int r1 = r7.intValue()
if (r1 != r0) goto L3e
L39:
r7 = -1
java.lang.Integer r7 = java.lang.Integer.valueOf(r7)
L3e:
androidx.compose.ui.platform.AndroidComposeView r0 = r3
android.view.View r0 = (android.view.View) r0
int r7 = r7.intValue()
r8.setParent(r0, r7)
androidx.compose.ui.node.LayoutNode r7 = androidx.compose.ui.node.LayoutNode.this
int r7 = r7.getSemanticsId()
androidx.compose.ui.platform.AndroidComposeView r0 = r2
androidx.compose.ui.platform.AndroidComposeViewAccessibilityDelegateCompat r0 = androidx.compose.ui.platform.AndroidComposeView.access$getAccessibilityDelegate$p(r0)
java.util.HashMap r0 = r0.getIdToBeforeMap$ui_release()
java.lang.Integer r1 = java.lang.Integer.valueOf(r7)
java.lang.Object r0 = r0.get(r1)
java.lang.Integer r0 = (java.lang.Integer) r0
java.lang.String r1 = "info.unwrap()"
if (r0 == 0) goto L9b
androidx.compose.ui.platform.AndroidComposeView r2 = r2
androidx.compose.ui.platform.AndroidComposeView r3 = r3
r4 = r0
java.lang.Number r4 = (java.lang.Number) r4
int r4 = r4.intValue()
androidx.compose.ui.platform.AndroidViewsHandler r5 = r2.getAndroidViewsHandler$ui_release()
int r0 = r0.intValue()
android.view.View r0 = androidx.compose.ui.platform.AndroidComposeViewAccessibilityDelegateCompat_androidKt.semanticsIdToView(r5, r0)
if (r0 == 0) goto L84
r8.setTraversalBefore(r0)
goto L89
L84:
android.view.View r3 = (android.view.View) r3
r8.setTraversalBefore(r3, r4)
L89:
android.view.accessibility.AccessibilityNodeInfo r0 = r8.unwrap()
kotlin.jvm.internal.Intrinsics.checkNotNullExpressionValue(r0, r1)
androidx.compose.ui.platform.AndroidComposeViewAccessibilityDelegateCompat r3 = androidx.compose.ui.platform.AndroidComposeView.access$getAccessibilityDelegate$p(r2)
java.lang.String r3 = r3.getEXTRA_DATA_TEST_TRAVERSALBEFORE_VAL()
androidx.compose.ui.platform.AndroidComposeView.access$addExtraDataToAccessibilityNodeInfoHelper(r2, r7, r0, r3)
L9b:
androidx.compose.ui.platform.AndroidComposeView r0 = r2
androidx.compose.ui.platform.AndroidComposeViewAccessibilityDelegateCompat r0 = androidx.compose.ui.platform.AndroidComposeView.access$getAccessibilityDelegate$p(r0)
java.util.HashMap r0 = r0.getIdToAfterMap$ui_release()
java.lang.Integer r2 = java.lang.Integer.valueOf(r7)
java.lang.Object r0 = r0.get(r2)
java.lang.Integer r0 = (java.lang.Integer) r0
if (r0 == 0) goto Le5
androidx.compose.ui.platform.AndroidComposeView r2 = r2
androidx.compose.ui.platform.AndroidComposeView r6 = r3
r3 = r0
java.lang.Number r3 = (java.lang.Number) r3
int r3 = r3.intValue()
androidx.compose.ui.platform.AndroidViewsHandler r4 = r2.getAndroidViewsHandler$ui_release()
int r0 = r0.intValue()
android.view.View r0 = androidx.compose.ui.platform.AndroidComposeViewAccessibilityDelegateCompat_androidKt.semanticsIdToView(r4, r0)
if (r0 == 0) goto Lce
r8.setTraversalAfter(r0)
goto Ld3
Lce:
android.view.View r6 = (android.view.View) r6
r8.setTraversalAfter(r6, r3)
Ld3:
android.view.accessibility.AccessibilityNodeInfo r6 = r8.unwrap()
kotlin.jvm.internal.Intrinsics.checkNotNullExpressionValue(r6, r1)
androidx.compose.ui.platform.AndroidComposeViewAccessibilityDelegateCompat r8 = androidx.compose.ui.platform.AndroidComposeView.access$getAccessibilityDelegate$p(r2)
java.lang.String r8 = r8.getEXTRA_DATA_TEST_TRAVERSALAFTER_VAL()
androidx.compose.ui.platform.AndroidComposeView.access$addExtraDataToAccessibilityNodeInfoHelper(r2, r7, r6, r8)
Le5:
return
*/
throw new UnsupportedOperationException("Method not decompiled: androidx.compose.ui.platform.AndroidComposeView$addAndroidView$1.onInitializeAccessibilityNodeInfo(android.view.View, androidx.core.view.accessibility.AccessibilityNodeInfoCompat):void");
}
});
}
public final void removeAndroidView(final AndroidViewHolder view) {
Intrinsics.checkNotNullParameter(view, "view");
registerOnEndApplyChangesListener(new Function0<Unit>() { // from class: androidx.compose.ui.platform.AndroidComposeView$removeAndroidView$1
/* JADX INFO: Access modifiers changed from: package-private */
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
{
super(0);
}
@Override // kotlin.jvm.functions.Function0
public /* bridge */ /* synthetic */ Unit invoke() {
invoke2();
return Unit.INSTANCE;
}
/* renamed from: invoke, reason: avoid collision after fix types in other method */
public final void invoke2() {
AndroidComposeView.this.getAndroidViewsHandler$ui_release().removeViewInLayout(view);
HashMap<LayoutNode, AndroidViewHolder> layoutNodeToHolder = AndroidComposeView.this.getAndroidViewsHandler$ui_release().getLayoutNodeToHolder();
TypeIntrinsics.asMutableMap(layoutNodeToHolder).remove(AndroidComposeView.this.getAndroidViewsHandler$ui_release().getHolderToLayoutNode().remove(view));
ViewCompat.setImportantForAccessibility(view, 0);
}
});
}
public final void drawAndroidView(AndroidViewHolder view, Canvas canvas) {
Intrinsics.checkNotNullParameter(view, "view");
Intrinsics.checkNotNullParameter(canvas, "canvas");
getAndroidViewsHandler$ui_release().drawView(view, canvas);
}
static /* synthetic */ void scheduleMeasureAndLayout$default(AndroidComposeView androidComposeView, LayoutNode layoutNode, int i, Object obj) {
if ((i & 1) != 0) {
layoutNode = null;
}
androidComposeView.scheduleMeasureAndLayout(layoutNode);
}
private final void scheduleMeasureAndLayout(LayoutNode nodeToRemeasure) {
if (isLayoutRequested() || !isAttachedToWindow()) {
return;
}
if (nodeToRemeasure != null) {
while (nodeToRemeasure != null && nodeToRemeasure.getMeasuredByParent$ui_release() == LayoutNode.UsageByParent.InMeasureBlock && childSizeCanAffectParentSize(nodeToRemeasure)) {
nodeToRemeasure = nodeToRemeasure.getParent$ui_release();
}
if (nodeToRemeasure == getRoot()) {
requestLayout();
return;
}
}
if (getWidth() == 0 || getHeight() == 0) {
requestLayout();
} else {
invalidate();
}
}
private final boolean childSizeCanAffectParentSize(LayoutNode layoutNode) {
LayoutNode parent$ui_release;
return this.wasMeasuredWithMultipleConstraints || !((parent$ui_release = layoutNode.getParent$ui_release()) == null || parent$ui_release.getHasFixedInnerContentConstraints$ui_release());
}
@Override // androidx.compose.ui.node.Owner
public void measureAndLayout(boolean sendPointerUpdate) {
Function0<Unit> function0;
if (this.measureAndLayoutDelegate.getHasPendingMeasureOrLayout() || this.measureAndLayoutDelegate.getHasPendingOnPositionedCallbacks()) {
Trace.beginSection("AndroidOwner:measureAndLayout");
if (sendPointerUpdate) {
try {
function0 = this.resendMotionEventOnLayout;
} catch (Throwable th) {
Trace.endSection();
throw th;
}
} else {
function0 = null;
}
if (this.measureAndLayoutDelegate.measureAndLayout(function0)) {
requestLayout();
}
MeasureAndLayoutDelegate.dispatchOnPositionedCallbacks$default(this.measureAndLayoutDelegate, false, 1, null);
Unit unit = Unit.INSTANCE;
Trace.endSection();
}
}
@Override // androidx.compose.ui.node.Owner
public void forceMeasureTheSubtree(LayoutNode layoutNode, boolean affectsLookahead) {
Intrinsics.checkNotNullParameter(layoutNode, "layoutNode");
this.measureAndLayoutDelegate.forceMeasureTheSubtree(layoutNode, affectsLookahead);
}
@Override // androidx.compose.ui.node.Owner
public void onRequestMeasure(LayoutNode layoutNode, boolean affectsLookahead, boolean forceRequest, boolean scheduleMeasureAndLayout) {
Intrinsics.checkNotNullParameter(layoutNode, "layoutNode");
if (affectsLookahead) {
if (this.measureAndLayoutDelegate.requestLookaheadRemeasure(layoutNode, forceRequest) && scheduleMeasureAndLayout) {
scheduleMeasureAndLayout(layoutNode);
return;
}
return;
}
if (this.measureAndLayoutDelegate.requestRemeasure(layoutNode, forceRequest) && scheduleMeasureAndLayout) {
scheduleMeasureAndLayout(layoutNode);
}
}
@Override // androidx.compose.ui.node.Owner
public void onRequestRelayout(LayoutNode layoutNode, boolean affectsLookahead, boolean forceRequest) {
Intrinsics.checkNotNullParameter(layoutNode, "layoutNode");
if (affectsLookahead) {
if (this.measureAndLayoutDelegate.requestLookaheadRelayout(layoutNode, forceRequest)) {
scheduleMeasureAndLayout$default(this, null, 1, null);
}
} else if (this.measureAndLayoutDelegate.requestRelayout(layoutNode, forceRequest)) {
scheduleMeasureAndLayout$default(this, null, 1, null);
}
}
@Override // androidx.compose.ui.node.Owner
public void requestOnPositionedCallback(LayoutNode layoutNode) {
Intrinsics.checkNotNullParameter(layoutNode, "layoutNode");
this.measureAndLayoutDelegate.requestOnPositionedCallback(layoutNode);
scheduleMeasureAndLayout$default(this, null, 1, null);
}
@Override // androidx.compose.ui.node.RootForTest
public void measureAndLayoutForTest() {
Owner.measureAndLayout$default(this, false, 1, null);
}
/* renamed from: component1-VKZWuLQ, reason: not valid java name */
private final int m4164component1VKZWuLQ(long j) {
return (int) ULong.m5872constructorimpl(j >>> 32);
}
/* renamed from: component2-VKZWuLQ, reason: not valid java name */
private final int m4165component2VKZWuLQ(long j) {
return (int) ULong.m5872constructorimpl(j & KeyboardMap.kValueMask);
}
/* renamed from: pack-ZIaKswc, reason: not valid java name */
private final long m4168packZIaKswc(int a, int b) {
return ULong.m5872constructorimpl(ULong.m5872constructorimpl(ULong.m5872constructorimpl(a) << 32) | ULong.m5872constructorimpl(b));
}
/* renamed from: convertMeasureSpec-I7RO_PI, reason: not valid java name */
private final long m4166convertMeasureSpecI7RO_PI(int measureSpec) {
int mode = View.MeasureSpec.getMode(measureSpec);
int size = View.MeasureSpec.getSize(measureSpec);
if (mode == Integer.MIN_VALUE) {
return m4168packZIaKswc(0, size);
}
if (mode == 0) {
return m4168packZIaKswc(0, Integer.MAX_VALUE);
}
if (mode == 1073741824) {
return m4168packZIaKswc(size, size);
}
throw new IllegalStateException();
}
@Override // android.view.ViewGroup, android.view.View
protected void onLayout(boolean changed, int l, int t, int r, int b) {
this.measureAndLayoutDelegate.measureAndLayout(this.resendMotionEventOnLayout);
this.onMeasureConstraints = null;
updatePositionCacheAndDispatch();
if (this._androidViewsHandler != null) {
getAndroidViewsHandler$ui_release().layout(0, 0, r - l, b - t);
}
}
private final void updatePositionCacheAndDispatch() {
getLocationOnScreen(this.tmpPositionArray);
long j = this.globalPosition;
int m4993component1impl = IntOffset.m4993component1impl(j);
int m4994component2impl = IntOffset.m4994component2impl(j);
int[] iArr = this.tmpPositionArray;
boolean z = false;
int i = iArr[0];
if (m4993component1impl != i || m4994component2impl != iArr[1]) {
this.globalPosition = IntOffsetKt.IntOffset(i, iArr[1]);
if (m4993component1impl != Integer.MAX_VALUE && m4994component2impl != Integer.MAX_VALUE) {
getRoot().getLayoutDelegate().getMeasurePassDelegate().notifyChildrenUsingCoordinatesWhilePlacing();
z = true;
}
}
this.measureAndLayoutDelegate.dispatchOnPositionedCallbacks(z);
}
@Override // androidx.compose.ui.node.Owner
public OwnedLayer createLayer(Function1<? super androidx.compose.ui.graphics.Canvas, Unit> drawBlock, Function0<Unit> invalidateParentLayer) {
ViewLayerContainer viewLayerContainer;
Intrinsics.checkNotNullParameter(drawBlock, "drawBlock");
Intrinsics.checkNotNullParameter(invalidateParentLayer, "invalidateParentLayer");
OwnedLayer pop = this.layerCache.pop();
if (pop != null) {
pop.reuseLayer(drawBlock, invalidateParentLayer);
return pop;
}
if (isHardwareAccelerated() && this.isRenderNodeCompatible) {
try {
return new RenderNodeLayer(this, drawBlock, invalidateParentLayer);
} catch (Throwable unused) {
this.isRenderNodeCompatible = false;
}
}
if (this.viewLayersContainer == null) {
if (!ViewLayer.INSTANCE.getHasRetrievedMethod()) {
ViewLayer.INSTANCE.updateDisplayList(new View(getContext()));
}
if (ViewLayer.INSTANCE.getShouldUseDispatchDraw()) {
Context context = getContext();
Intrinsics.checkNotNullExpressionValue(context, "context");
viewLayerContainer = new DrawChildContainer(context);
} else {
Context context2 = getContext();
Intrinsics.checkNotNullExpressionValue(context2, "context");
viewLayerContainer = new ViewLayerContainer(context2);
}
this.viewLayersContainer = viewLayerContainer;
addView(viewLayerContainer);
}
DrawChildContainer drawChildContainer = this.viewLayersContainer;
Intrinsics.checkNotNull(drawChildContainer);
return new ViewLayer(this, drawChildContainer, drawBlock, invalidateParentLayer);
}
public final boolean recycle$ui_release(OwnedLayer layer) {
Intrinsics.checkNotNullParameter(layer, "layer");
if (this.viewLayersContainer != null) {
ViewLayer.INSTANCE.getShouldUseDispatchDraw();
}
this.layerCache.push(layer);
return true;
}
@Override // androidx.compose.ui.node.Owner
public void onSemanticsChange() {
this.accessibilityDelegate.onSemanticsChange$ui_release();
}
@Override // androidx.compose.ui.node.Owner
public void onLayoutChange(LayoutNode layoutNode) {
Intrinsics.checkNotNullParameter(layoutNode, "layoutNode");
this.accessibilityDelegate.onLayoutChange$ui_release(layoutNode);
}
@Override // androidx.compose.ui.node.Owner
public void registerOnLayoutCompletedListener(Owner.OnLayoutCompletedListener listener) {
Intrinsics.checkNotNullParameter(listener, "listener");
this.measureAndLayoutDelegate.registerOnLayoutCompletedListener(listener);
scheduleMeasureAndLayout$default(this, null, 1, null);
}
@Override // androidx.compose.ui.node.Owner
/* renamed from: getFocusDirection-P8AzH3I */
public FocusDirection mo4145getFocusDirectionP8AzH3I(android.view.KeyEvent keyEvent) {
Intrinsics.checkNotNullParameter(keyEvent, "keyEvent");
long m3625getKeyZmokQxo = KeyEvent_androidKt.m3625getKeyZmokQxo(keyEvent);
if (Key.m3317equalsimpl0(m3625getKeyZmokQxo, Key.INSTANCE.m3553getTabEK5gGoQ())) {
return FocusDirection.m2316boximpl(KeyEvent_androidKt.m3631isShiftPressedZmokQxo(keyEvent) ? FocusDirection.INSTANCE.m2334getPreviousdhqQ8s() : FocusDirection.INSTANCE.m2332getNextdhqQ8s());
}
if (Key.m3317equalsimpl0(m3625getKeyZmokQxo, Key.INSTANCE.m3394getDirectionRightEK5gGoQ())) {
return FocusDirection.m2316boximpl(FocusDirection.INSTANCE.m2335getRightdhqQ8s());
}
if (Key.m3317equalsimpl0(m3625getKeyZmokQxo, Key.INSTANCE.m3393getDirectionLeftEK5gGoQ())) {
return FocusDirection.m2316boximpl(FocusDirection.INSTANCE.m2331getLeftdhqQ8s());
}
if (Key.m3317equalsimpl0(m3625getKeyZmokQxo, Key.INSTANCE.m3395getDirectionUpEK5gGoQ())) {
return FocusDirection.m2316boximpl(FocusDirection.INSTANCE.m2336getUpdhqQ8s());
}
if (Key.m3317equalsimpl0(m3625getKeyZmokQxo, Key.INSTANCE.m3390getDirectionDownEK5gGoQ())) {
return FocusDirection.m2316boximpl(FocusDirection.INSTANCE.m2327getDowndhqQ8s());
}
if (Key.m3317equalsimpl0(m3625getKeyZmokQxo, Key.INSTANCE.m3389getDirectionCenterEK5gGoQ()) || Key.m3317equalsimpl0(m3625getKeyZmokQxo, Key.INSTANCE.m3403getEnterEK5gGoQ()) || Key.m3317equalsimpl0(m3625getKeyZmokQxo, Key.INSTANCE.m3495getNumPadEnterEK5gGoQ())) {
return FocusDirection.m2316boximpl(FocusDirection.INSTANCE.m2328getEnterdhqQ8s());
}
if (Key.m3317equalsimpl0(m3625getKeyZmokQxo, Key.INSTANCE.m3332getBackEK5gGoQ()) || Key.m3317equalsimpl0(m3625getKeyZmokQxo, Key.INSTANCE.m3406getEscapeEK5gGoQ())) {
return FocusDirection.m2316boximpl(FocusDirection.INSTANCE.m2329getExitdhqQ8s());
}
return null;
}
@Override // android.view.ViewGroup, android.view.View
protected void dispatchDraw(Canvas canvas) {
Intrinsics.checkNotNullParameter(canvas, "canvas");
if (!isAttachedToWindow()) {
invalidateLayers(getRoot());
}
Owner.measureAndLayout$default(this, false, 1, null);
this.isDrawingContent = true;
CanvasHolder canvasHolder = this.canvasHolder;
Canvas internalCanvas = canvasHolder.getAndroidCanvas().getInternalCanvas();
canvasHolder.getAndroidCanvas().setInternalCanvas(canvas);
getRoot().draw$ui_release(canvasHolder.getAndroidCanvas());
canvasHolder.getAndroidCanvas().setInternalCanvas(internalCanvas);
if (!this.dirtyLayers.isEmpty()) {
int size = this.dirtyLayers.size();
for (int i = 0; i < size; i++) {
this.dirtyLayers.get(i).updateDisplayList();
}
}
if (ViewLayer.INSTANCE.getShouldUseDispatchDraw()) {
int save = canvas.save();
canvas.clipRect(0.0f, 0.0f, 0.0f, 0.0f);
super.dispatchDraw(canvas);
canvas.restoreToCount(save);
}
this.dirtyLayers.clear();
this.isDrawingContent = false;
List<OwnedLayer> list = this.postponedDirtyLayers;
if (list != null) {
Intrinsics.checkNotNull(list);
this.dirtyLayers.addAll(list);
list.clear();
}
}
public final void notifyLayerIsDirty$ui_release(OwnedLayer layer, boolean isDirty) {
Intrinsics.checkNotNullParameter(layer, "layer");
if (!isDirty) {
if (this.isDrawingContent) {
return;
}
this.dirtyLayers.remove(layer);
List<OwnedLayer> list = this.postponedDirtyLayers;
if (list != null) {
list.remove(layer);
return;
}
return;
}
if (!this.isDrawingContent) {
this.dirtyLayers.add(layer);
return;
}
ArrayList arrayList = this.postponedDirtyLayers;
if (arrayList == null) {
arrayList = new ArrayList();
this.postponedDirtyLayers = arrayList;
}
arrayList.add(layer);
}
public final void setOnViewTreeOwnersAvailable(Function1<? super ViewTreeOwners, Unit> callback) {
Intrinsics.checkNotNullParameter(callback, "callback");
ViewTreeOwners viewTreeOwners = getViewTreeOwners();
if (viewTreeOwners != null) {
callback.invoke(viewTreeOwners);
}
if (isAttachedToWindow()) {
return;
}
this.onViewTreeOwnersAvailable = callback;
}
public final Object boundsUpdatesEventLoop(Continuation<? super Unit> continuation) {
Object boundsUpdatesEventLoop = this.accessibilityDelegate.boundsUpdatesEventLoop(continuation);
return boundsUpdatesEventLoop == IntrinsicsKt.getCOROUTINE_SUSPENDED() ? boundsUpdatesEventLoop : Unit.INSTANCE;
}
private final void invalidateLayoutNodeMeasurement(LayoutNode node) {
int i = 0;
MeasureAndLayoutDelegate.requestRemeasure$default(this.measureAndLayoutDelegate, node, false, 2, null);
MutableVector<LayoutNode> mutableVector = node.get_children$ui_release();
int size = mutableVector.getSize();
if (size > 0) {
LayoutNode[] content = mutableVector.getContent();
do {
invalidateLayoutNodeMeasurement(content[i]);
i++;
} while (i < size);
}
}
private final void invalidateLayers(LayoutNode node) {
node.invalidateLayers$ui_release();
MutableVector<LayoutNode> mutableVector = node.get_children$ui_release();
int size = mutableVector.getSize();
if (size > 0) {
LayoutNode[] content = mutableVector.getContent();
int i = 0;
do {
invalidateLayers(content[i]);
i++;
} while (i < size);
}
}
@Override // androidx.compose.ui.platform.ViewRootForTest
public void invalidateDescendants() {
invalidateLayers(getRoot());
}
@Override // android.view.ViewGroup, android.view.View
protected void onAttachedToWindow() {
LifecycleOwner lifecycleOwner;
Lifecycle lifecycle;
AndroidAutofill androidAutofill;
super.onAttachedToWindow();
invalidateLayoutNodeMeasurement(getRoot());
invalidateLayers(getRoot());
getSnapshotObserver().startObserving$ui_release();
if (autofillSupported() && (androidAutofill = this._autofill) != null) {
AutofillCallback.INSTANCE.register(androidAutofill);
}
AndroidComposeView androidComposeView = this;
LifecycleOwner lifecycleOwner2 = ViewTreeLifecycleOwner.get(androidComposeView);
SavedStateRegistryOwner savedStateRegistryOwner = ViewTreeSavedStateRegistryOwner.get(androidComposeView);
ViewTreeOwners viewTreeOwners = getViewTreeOwners();
if (viewTreeOwners == null || (lifecycleOwner2 != null && savedStateRegistryOwner != null && (lifecycleOwner2 != viewTreeOwners.getLifecycleOwner() || savedStateRegistryOwner != viewTreeOwners.getLifecycleOwner()))) {
if (lifecycleOwner2 == null) {
throw new IllegalStateException("Composed into the View which doesn't propagate ViewTreeLifecycleOwner!");
}
if (savedStateRegistryOwner == null) {
throw new IllegalStateException("Composed into the View which doesn't propagateViewTreeSavedStateRegistryOwner!");
}
if (viewTreeOwners != null && (lifecycleOwner = viewTreeOwners.getLifecycleOwner()) != null && (lifecycle = lifecycleOwner.getLifecycle()) != null) {
lifecycle.removeObserver(this);
}
lifecycleOwner2.getLifecycle().addObserver(this);
ViewTreeOwners viewTreeOwners2 = new ViewTreeOwners(lifecycleOwner2, savedStateRegistryOwner);
set_viewTreeOwners(viewTreeOwners2);
Function1<? super ViewTreeOwners, Unit> function1 = this.onViewTreeOwnersAvailable;
if (function1 != null) {
function1.invoke(viewTreeOwners2);
}
this.onViewTreeOwnersAvailable = null;
}
this._inputModeManager.m3311setInputModeiuPiT84(isInTouchMode() ? InputMode.INSTANCE.m3308getTouchaOaMEAU() : InputMode.INSTANCE.m3307getKeyboardaOaMEAU());
ViewTreeOwners viewTreeOwners3 = getViewTreeOwners();
Intrinsics.checkNotNull(viewTreeOwners3);
viewTreeOwners3.getLifecycleOwner().getLifecycle().addObserver(this);
getViewTreeObserver().addOnGlobalLayoutListener(this.globalLayoutListener);
getViewTreeObserver().addOnScrollChangedListener(this.scrollChangedListener);
getViewTreeObserver().addOnTouchModeChangeListener(this.touchModeChangeListener);
}
@Override // android.view.ViewGroup, android.view.View
protected void onDetachedFromWindow() {
AndroidAutofill androidAutofill;
LifecycleOwner lifecycleOwner;
Lifecycle lifecycle;
super.onDetachedFromWindow();
getSnapshotObserver().stopObserving$ui_release();
ViewTreeOwners viewTreeOwners = getViewTreeOwners();
if (viewTreeOwners != null && (lifecycleOwner = viewTreeOwners.getLifecycleOwner()) != null && (lifecycle = lifecycleOwner.getLifecycle()) != null) {
lifecycle.removeObserver(this);
}
if (autofillSupported() && (androidAutofill = this._autofill) != null) {
AutofillCallback.INSTANCE.unregister(androidAutofill);
}
getViewTreeObserver().removeOnGlobalLayoutListener(this.globalLayoutListener);
getViewTreeObserver().removeOnScrollChangedListener(this.scrollChangedListener);
getViewTreeObserver().removeOnTouchModeChangeListener(this.touchModeChangeListener);
}
@Override // android.view.View
public void onProvideAutofillVirtualStructure(ViewStructure structure, int flags) {
AndroidAutofill androidAutofill;
if (!autofillSupported() || structure == null || (androidAutofill = this._autofill) == null) {
return;
}
AndroidAutofill_androidKt.populateViewStructure(androidAutofill, structure);
}
@Override // android.view.View
public void autofill(SparseArray<AutofillValue> values) {
AndroidAutofill androidAutofill;
Intrinsics.checkNotNullParameter(values, "values");
if (!autofillSupported() || (androidAutofill = this._autofill) == null) {
return;
}
AndroidAutofill_androidKt.performAutofill(androidAutofill, values);
}
@Override // android.view.View
public boolean dispatchGenericMotionEvent(MotionEvent event) {
Intrinsics.checkNotNullParameter(event, "event");
if (event.getActionMasked() == 8) {
if (event.isFromSource(4194304)) {
return handleRotaryEvent(event);
}
if (isBadMotionEvent(event) || !isAttachedToWindow()) {
return super.dispatchGenericMotionEvent(event);
}
return ProcessResult.m3845getDispatchedToAPointerInputModifierimpl(m4167handleMotionEvent8iAsVTc(event));
}
return super.dispatchGenericMotionEvent(event);
}
@Override // android.view.ViewGroup, android.view.View
public boolean dispatchTouchEvent(MotionEvent motionEvent) {
Intrinsics.checkNotNullParameter(motionEvent, "motionEvent");
if (this.hoverExitReceived) {
removeCallbacks(this.sendHoverExitEvent);
MotionEvent motionEvent2 = this.previousMotionEvent;
Intrinsics.checkNotNull(motionEvent2);
if (motionEvent.getActionMasked() != 0 || hasChangedDevices(motionEvent, motionEvent2)) {
this.sendHoverExitEvent.run();
} else {
this.hoverExitReceived = false;
}
}
if (isBadMotionEvent(motionEvent) || !isAttachedToWindow()) {
return false;
}
if (motionEvent.getActionMasked() == 2 && !isPositionChanged(motionEvent)) {
return false;
}
int m4167handleMotionEvent8iAsVTc = m4167handleMotionEvent8iAsVTc(motionEvent);
if (ProcessResult.m3844getAnyMovementConsumedimpl(m4167handleMotionEvent8iAsVTc)) {
getParent().requestDisallowInterceptTouchEvent(true);
}
return ProcessResult.m3845getDispatchedToAPointerInputModifierimpl(m4167handleMotionEvent8iAsVTc);
}
private final boolean handleRotaryEvent(MotionEvent event) {
android.view.ViewConfiguration viewConfiguration = android.view.ViewConfiguration.get(getContext());
float f = -event.getAxisValue(26);
return getFocusOwner().dispatchRotaryEvent(new RotaryScrollEvent(ViewConfigurationCompat.getScaledVerticalScrollFactor(viewConfiguration, getContext()) * f, f * ViewConfigurationCompat.getScaledHorizontalScrollFactor(viewConfiguration, getContext()), event.getEventTime()));
}
/* renamed from: handleMotionEvent-8iAsVTc, reason: not valid java name */
private final int m4167handleMotionEvent8iAsVTc(MotionEvent motionEvent) {
removeCallbacks(this.resendMotionEventRunnable);
try {
recalculateWindowPosition(motionEvent);
boolean z = true;
this.forceUseMatrixCache = true;
measureAndLayout(false);
Trace.beginSection("AndroidOwner:onTouch");
try {
int actionMasked = motionEvent.getActionMasked();
MotionEvent motionEvent2 = this.previousMotionEvent;
boolean z2 = motionEvent2 != null && motionEvent2.getToolType(0) == 3;
if (motionEvent2 != null && hasChangedDevices(motionEvent, motionEvent2)) {
if (isDevicePressEvent(motionEvent2)) {
this.pointerInputEventProcessor.processCancel();
} else if (motionEvent2.getActionMasked() != 10 && z2) {
sendSimulatedEvent$default(this, motionEvent2, 10, motionEvent2.getEventTime(), false, 8, null);
}
}
if (motionEvent.getToolType(0) != 3) {
z = false;
}
if (!z2 && z && actionMasked != 3 && actionMasked != 9 && isInBounds(motionEvent)) {
sendSimulatedEvent$default(this, motionEvent, 9, motionEvent.getEventTime(), false, 8, null);
}
if (motionEvent2 != null) {
motionEvent2.recycle();
}
this.previousMotionEvent = MotionEvent.obtainNoHistory(motionEvent);
return m4169sendMotionEvent8iAsVTc(motionEvent);
} finally {
Trace.endSection();
}
} finally {
this.forceUseMatrixCache = false;
}
}
private final boolean hasChangedDevices(MotionEvent event, MotionEvent lastEvent) {
return (lastEvent.getSource() == event.getSource() && lastEvent.getToolType(0) == event.getToolType(0)) ? false : true;
}
private final boolean isDevicePressEvent(MotionEvent event) {
int actionMasked;
return event.getButtonState() != 0 || (actionMasked = event.getActionMasked()) == 0 || actionMasked == 2 || actionMasked == 6;
}
/* renamed from: sendMotionEvent-8iAsVTc, reason: not valid java name */
private final int m4169sendMotionEvent8iAsVTc(MotionEvent motionEvent) {
PointerInputEventData pointerInputEventData;
if (this.keyboardModifiersRequireUpdate) {
this.keyboardModifiersRequireUpdate = false;
this._windowInfo.m4238setKeyboardModifiers5xRPYO0(PointerKeyboardModifiers.m3820constructorimpl(motionEvent.getMetaState()));
}
AndroidComposeView androidComposeView = this;
PointerInputEvent convertToPointerInputEvent$ui_release = this.motionEventAdapter.convertToPointerInputEvent$ui_release(motionEvent, androidComposeView);
if (convertToPointerInputEvent$ui_release != null) {
List<PointerInputEventData> pointers = convertToPointerInputEvent$ui_release.getPointers();
int size = pointers.size() - 1;
if (size >= 0) {
while (true) {
int i = size - 1;
pointerInputEventData = pointers.get(size);
if (pointerInputEventData.getDown()) {
break;
}
if (i < 0) {
break;
}
size = i;
}
}
pointerInputEventData = null;
PointerInputEventData pointerInputEventData2 = pointerInputEventData;
if (pointerInputEventData2 != null) {
this.lastDownPointerPosition = pointerInputEventData2.m3772getPositionF1C5BW0();
}
int m3777processBIzXfog = this.pointerInputEventProcessor.m3777processBIzXfog(convertToPointerInputEvent$ui_release, androidComposeView, isInBounds(motionEvent));
int actionMasked = motionEvent.getActionMasked();
if ((actionMasked != 0 && actionMasked != 5) || ProcessResult.m3845getDispatchedToAPointerInputModifierimpl(m3777processBIzXfog)) {
return m3777processBIzXfog;
}
this.motionEventAdapter.endStream(motionEvent.getPointerId(motionEvent.getActionIndex()));
return m3777processBIzXfog;
}
this.pointerInputEventProcessor.processCancel();
return PointerInputEventProcessorKt.ProcessResult(false, false);
}
static /* synthetic */ void sendSimulatedEvent$default(AndroidComposeView androidComposeView, MotionEvent motionEvent, int i, long j, boolean z, int i2, Object obj) {
if ((i2 & 8) != 0) {
z = true;
}
androidComposeView.sendSimulatedEvent(motionEvent, i, j, z);
}
/* JADX INFO: Access modifiers changed from: private */
public final void sendSimulatedEvent(MotionEvent motionEvent, int action, long eventTime, boolean forceHover) {
int actionMasked = motionEvent.getActionMasked();
int i = -1;
if (actionMasked != 1) {
if (actionMasked == 6) {
i = motionEvent.getActionIndex();
}
} else if (action != 9 && action != 10) {
i = 0;
}
int pointerCount = motionEvent.getPointerCount() - (i >= 0 ? 1 : 0);
if (pointerCount == 0) {
return;
}
MotionEvent.PointerProperties[] pointerPropertiesArr = new MotionEvent.PointerProperties[pointerCount];
for (int i2 = 0; i2 < pointerCount; i2++) {
pointerPropertiesArr[i2] = new MotionEvent.PointerProperties();
}
MotionEvent.PointerCoords[] pointerCoordsArr = new MotionEvent.PointerCoords[pointerCount];
for (int i3 = 0; i3 < pointerCount; i3++) {
pointerCoordsArr[i3] = new MotionEvent.PointerCoords();
}
int i4 = 0;
while (i4 < pointerCount) {
int i5 = ((i < 0 || i4 < i) ? 0 : 1) + i4;
motionEvent.getPointerProperties(i5, pointerPropertiesArr[i4]);
MotionEvent.PointerCoords pointerCoords = pointerCoordsArr[i4];
motionEvent.getPointerCoords(i5, pointerCoords);
long mo3838localToScreenMKHz9U = mo3838localToScreenMKHz9U(OffsetKt.Offset(pointerCoords.x, pointerCoords.y));
pointerCoords.x = Offset.m2400getXimpl(mo3838localToScreenMKHz9U);
pointerCoords.y = Offset.m2401getYimpl(mo3838localToScreenMKHz9U);
i4++;
}
MotionEvent event = MotionEvent.obtain(motionEvent.getDownTime() == motionEvent.getEventTime() ? eventTime : motionEvent.getDownTime(), eventTime, action, pointerCount, pointerPropertiesArr, pointerCoordsArr, motionEvent.getMetaState(), forceHover ? 0 : motionEvent.getButtonState(), motionEvent.getXPrecision(), motionEvent.getYPrecision(), motionEvent.getDeviceId(), motionEvent.getEdgeFlags(), motionEvent.getSource(), motionEvent.getFlags());
MotionEventAdapter motionEventAdapter = this.motionEventAdapter;
Intrinsics.checkNotNullExpressionValue(event, "event");
AndroidComposeView androidComposeView = this;
PointerInputEvent convertToPointerInputEvent$ui_release = motionEventAdapter.convertToPointerInputEvent$ui_release(event, androidComposeView);
Intrinsics.checkNotNull(convertToPointerInputEvent$ui_release);
this.pointerInputEventProcessor.m3777processBIzXfog(convertToPointerInputEvent$ui_release, androidComposeView, true);
event.recycle();
}
@Override // android.view.View
public boolean canScrollHorizontally(int direction) {
return this.accessibilityDelegate.m4174canScroll0AR0LA0$ui_release(false, direction, this.lastDownPointerPosition);
}
@Override // android.view.View
public boolean canScrollVertically(int direction) {
return this.accessibilityDelegate.m4174canScroll0AR0LA0$ui_release(true, direction, this.lastDownPointerPosition);
}
private final boolean isInBounds(MotionEvent motionEvent) {
float x = motionEvent.getX();
float y = motionEvent.getY();
return 0.0f <= x && x <= ((float) getWidth()) && 0.0f <= y && y <= ((float) getHeight());
}
@Override // androidx.compose.ui.input.pointer.PositionCalculator
/* renamed from: localToScreen-MK-Hz9U */
public long mo3838localToScreenMKHz9U(long localPosition) {
recalculateWindowPosition();
long m2870mapMKHz9U = Matrix.m2870mapMKHz9U(this.viewToWindowMatrix, localPosition);
return OffsetKt.Offset(Offset.m2400getXimpl(m2870mapMKHz9U) + Offset.m2400getXimpl(this.windowPosition), Offset.m2401getYimpl(m2870mapMKHz9U) + Offset.m2401getYimpl(this.windowPosition));
}
@Override // androidx.compose.ui.input.pointer.PositionCalculator
/* renamed from: screenToLocal-MK-Hz9U */
public long mo3839screenToLocalMKHz9U(long positionOnScreen) {
recalculateWindowPosition();
return Matrix.m2870mapMKHz9U(this.windowToViewMatrix, OffsetKt.Offset(Offset.m2400getXimpl(positionOnScreen) - Offset.m2400getXimpl(this.windowPosition), Offset.m2401getYimpl(positionOnScreen) - Offset.m2401getYimpl(this.windowPosition)));
}
private final void recalculateWindowPosition() {
if (this.forceUseMatrixCache) {
return;
}
long currentAnimationTimeMillis = AnimationUtils.currentAnimationTimeMillis();
if (currentAnimationTimeMillis != this.lastMatrixRecalculationAnimationTime) {
this.lastMatrixRecalculationAnimationTime = currentAnimationTimeMillis;
recalculateWindowViewTransforms();
ViewParent parent = getParent();
AndroidComposeView androidComposeView = this;
while (parent instanceof ViewGroup) {
androidComposeView = (View) parent;
parent = ((ViewGroup) androidComposeView).getParent();
}
androidComposeView.getLocationOnScreen(this.tmpPositionArray);
int[] iArr = this.tmpPositionArray;
float f = iArr[0];
float f2 = iArr[1];
androidComposeView.getLocationInWindow(iArr);
int[] iArr2 = this.tmpPositionArray;
this.windowPosition = OffsetKt.Offset(f - iArr2[0], f2 - iArr2[1]);
}
}
private final void recalculateWindowPosition(MotionEvent motionEvent) {
this.lastMatrixRecalculationAnimationTime = AnimationUtils.currentAnimationTimeMillis();
recalculateWindowViewTransforms();
long m2870mapMKHz9U = Matrix.m2870mapMKHz9U(this.viewToWindowMatrix, OffsetKt.Offset(motionEvent.getX(), motionEvent.getY()));
this.windowPosition = OffsetKt.Offset(motionEvent.getRawX() - Offset.m2400getXimpl(m2870mapMKHz9U), motionEvent.getRawY() - Offset.m2401getYimpl(m2870mapMKHz9U));
}
private final void recalculateWindowViewTransforms() {
this.matrixToWindow.mo4181calculateMatrixToWindowEL8BTi8(this, this.viewToWindowMatrix);
InvertMatrixKt.m4205invertToJiSxe2E(this.viewToWindowMatrix, this.windowToViewMatrix);
}
@Override // android.view.View
public boolean onCheckIsTextEditor() {
return getPlatformTextInputPluginRegistry().getFocusedAdapter() != null;
}
@Override // android.view.View
public InputConnection onCreateInputConnection(EditorInfo outAttrs) {
Intrinsics.checkNotNullParameter(outAttrs, "outAttrs");
PlatformTextInputAdapter focusedAdapter = getPlatformTextInputPluginRegistry().getFocusedAdapter();
if (focusedAdapter != null) {
return focusedAdapter.createInputConnection(outAttrs);
}
return null;
}
@Override // androidx.compose.ui.node.Owner
/* renamed from: calculateLocalPosition-MK-Hz9U */
public long mo4143calculateLocalPositionMKHz9U(long positionInWindow) {
recalculateWindowPosition();
return Matrix.m2870mapMKHz9U(this.windowToViewMatrix, positionInWindow);
}
@Override // androidx.compose.ui.node.Owner
/* renamed from: calculatePositionInWindow-MK-Hz9U */
public long mo4144calculatePositionInWindowMKHz9U(long localPosition) {
recalculateWindowPosition();
return Matrix.m2870mapMKHz9U(this.viewToWindowMatrix, localPosition);
}
@Override // android.view.View
protected void onConfigurationChanged(Configuration newConfig) {
Intrinsics.checkNotNullParameter(newConfig, "newConfig");
super.onConfigurationChanged(newConfig);
Context context = getContext();
Intrinsics.checkNotNullExpressionValue(context, "context");
this.density = AndroidDensity_androidKt.Density(context);
if (getFontWeightAdjustmentCompat(newConfig) != this.currentFontWeightAdjustment) {
this.currentFontWeightAdjustment = getFontWeightAdjustmentCompat(newConfig);
Context context2 = getContext();
Intrinsics.checkNotNullExpressionValue(context2, "context");
setFontFamilyResolver(FontFamilyResolver_androidKt.createFontFamilyResolver(context2));
}
this.configurationChangeObserver.invoke(newConfig);
}
@Override // android.view.View
public void onRtlPropertiesChanged(int layoutDirection) {
LayoutDirection layoutDirectionFromInt;
if (this.superclassInitComplete) {
layoutDirectionFromInt = AndroidComposeView_androidKt.layoutDirectionFromInt(layoutDirection);
setLayoutDirection(layoutDirectionFromInt);
getFocusOwner().setLayoutDirection(layoutDirectionFromInt);
}
}
@Override // android.view.ViewGroup, android.view.View
public boolean dispatchHoverEvent(MotionEvent event) {
Intrinsics.checkNotNullParameter(event, "event");
if (this.hoverExitReceived) {
removeCallbacks(this.sendHoverExitEvent);
this.sendHoverExitEvent.run();
}
if (isBadMotionEvent(event) || !isAttachedToWindow()) {
return false;
}
this.accessibilityDelegate.dispatchHoverEvent(event);
int actionMasked = event.getActionMasked();
if (actionMasked != 7) {
if (actionMasked == 10 && isInBounds(event)) {
if (event.getToolType(0) != 3) {
MotionEvent motionEvent = this.previousMotionEvent;
if (motionEvent != null) {
motionEvent.recycle();
}
this.previousMotionEvent = MotionEvent.obtainNoHistory(event);
this.hoverExitReceived = true;
post(this.sendHoverExitEvent);
return false;
}
if (event.getButtonState() != 0) {
return false;
}
}
} else if (!isPositionChanged(event)) {
return false;
}
return ProcessResult.m3845getDispatchedToAPointerInputModifierimpl(m4167handleMotionEvent8iAsVTc(event));
}
/* JADX WARN: Removed duplicated region for block: B:19:0x0047 */
/* JADX WARN: Removed duplicated region for block: B:33:0x007c A[LOOP:0: B:20:0x004c->B:33:0x007c, LOOP_END] */
/* JADX WARN: Removed duplicated region for block: B:34:0x007f A[EDGE_INSN: B:34:0x007f->B:37:0x007f BREAK A[LOOP:0: B:20:0x004c->B:33:0x007c], SYNTHETIC] */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
private final boolean isBadMotionEvent(android.view.MotionEvent r6) {
/*
r5 = this;
float r5 = r6.getX()
boolean r0 = java.lang.Float.isInfinite(r5)
r1 = 0
r2 = 1
if (r0 != 0) goto L44
boolean r5 = java.lang.Float.isNaN(r5)
if (r5 != 0) goto L44
float r5 = r6.getY()
boolean r0 = java.lang.Float.isInfinite(r5)
if (r0 != 0) goto L44
boolean r5 = java.lang.Float.isNaN(r5)
if (r5 != 0) goto L44
float r5 = r6.getRawX()
boolean r0 = java.lang.Float.isInfinite(r5)
if (r0 != 0) goto L44
boolean r5 = java.lang.Float.isNaN(r5)
if (r5 != 0) goto L44
float r5 = r6.getRawY()
boolean r0 = java.lang.Float.isInfinite(r5)
if (r0 != 0) goto L44
boolean r5 = java.lang.Float.isNaN(r5)
if (r5 != 0) goto L44
r5 = r1
goto L45
L44:
r5 = r2
L45:
if (r5 != 0) goto L7f
int r0 = r6.getPointerCount()
r3 = r2
L4c:
if (r3 >= r0) goto L7f
float r5 = r6.getX(r3)
boolean r4 = java.lang.Float.isInfinite(r5)
if (r4 != 0) goto L79
boolean r5 = java.lang.Float.isNaN(r5)
if (r5 != 0) goto L79
float r5 = r6.getY(r3)
boolean r4 = java.lang.Float.isInfinite(r5)
if (r4 != 0) goto L79
boolean r5 = java.lang.Float.isNaN(r5)
if (r5 != 0) goto L79
androidx.compose.ui.platform.MotionEventVerifierApi29 r5 = androidx.compose.ui.platform.MotionEventVerifierApi29.INSTANCE
boolean r5 = r5.isValidMotionEvent(r6, r3)
if (r5 != 0) goto L77
goto L79
L77:
r5 = r1
goto L7a
L79:
r5 = r2
L7a:
if (r5 != 0) goto L7f
int r3 = r3 + 1
goto L4c
L7f:
return r5
*/
throw new UnsupportedOperationException("Method not decompiled: androidx.compose.ui.platform.AndroidComposeView.isBadMotionEvent(android.view.MotionEvent):boolean");
}
private final boolean isPositionChanged(MotionEvent event) {
MotionEvent motionEvent;
return (event.getPointerCount() == 1 && (motionEvent = this.previousMotionEvent) != null && motionEvent.getPointerCount() == event.getPointerCount() && event.getRawX() == motionEvent.getRawX() && event.getRawY() == motionEvent.getRawY()) ? false : true;
}
public final View findViewByAccessibilityIdTraversal(int accessibilityId) {
try {
Method declaredMethod = View.class.getDeclaredMethod("findViewByAccessibilityIdTraversal", Integer.TYPE);
declaredMethod.setAccessible(true);
Object invoke = declaredMethod.invoke(this, Integer.valueOf(accessibilityId));
if (invoke instanceof View) {
return (View) invoke;
}
return null;
} catch (NoSuchMethodException unused) {
return null;
}
}
@Override // androidx.compose.ui.platform.ViewRootForTest
public boolean isLifecycleInResumedState() {
LifecycleOwner lifecycleOwner;
Lifecycle lifecycle;
ViewTreeOwners viewTreeOwners = getViewTreeOwners();
return ((viewTreeOwners == null || (lifecycleOwner = viewTreeOwners.getLifecycleOwner()) == null || (lifecycle = lifecycleOwner.getLifecycle()) == null) ? null : lifecycle.getState()) == Lifecycle.State.RESUMED;
}
/* compiled from: AndroidComposeView.android.kt */
@Metadata(d1 = {"\u0000*\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0010\u000e\n\u0000\n\u0002\u0010\b\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000b\n\u0000\b\u0086\u0003\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002J\b\u0010\u000b\u001a\u00020\fH\u0003R\u000e\u0010\u0003\u001a\u00020\u0004X\u0082T¢\u0006\u0002\n\u0000R\u000e\u0010\u0005\u001a\u00020\u0006X\u0082T¢\u0006\u0002\n\u0000R\u0010\u0010\u0007\u001a\u0004\u0018\u00010\bX\u0082\u000e¢\u0006\u0002\n\u0000R\u0014\u0010\t\u001a\b\u0012\u0002\b\u0003\u0018\u00010\nX\u0082\u000e¢\u0006\u0002\n\u0000¨\u0006\r"}, d2 = {"Landroidx/compose/ui/platform/AndroidComposeView$Companion;", "", "()V", "FocusTag", "", "MaximumLayerCacheSize", "", "getBooleanMethod", "Ljava/lang/reflect/Method;", "systemPropertiesClass", "Ljava/lang/Class;", "getIsShowingLayoutBounds", "", "ui_release"}, k = 1, mv = {1, 8, 0}, xi = 48)
/* loaded from: classes.dex */
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
private Companion() {
}
/* JADX INFO: Access modifiers changed from: private */
public final boolean getIsShowingLayoutBounds() {
try {
if (AndroidComposeView.systemPropertiesClass == null) {
AndroidComposeView.systemPropertiesClass = Class.forName("android.os.SystemProperties");
Class cls = AndroidComposeView.systemPropertiesClass;
AndroidComposeView.getBooleanMethod = cls != null ? cls.getDeclaredMethod("getBoolean", String.class, Boolean.TYPE) : null;
}
Method method = AndroidComposeView.getBooleanMethod;
Object invoke = method != null ? method.invoke(null, "debug.layout", false) : null;
Boolean bool = invoke instanceof Boolean ? (Boolean) invoke : null;
if (bool != null) {
return bool.booleanValue();
}
return false;
} catch (Exception unused) {
return false;
}
}
}
/* compiled from: AndroidComposeView.android.kt */
@Metadata(d1 = {"\u0000\u0018\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0006\b\u0007\u0018\u00002\u00020\u0001B\u0015\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u0012\u0006\u0010\u0004\u001a\u00020\u0005¢\u0006\u0002\u0010\u0006R\u0011\u0010\u0002\u001a\u00020\u0003¢\u0006\b\n\u0000\u001a\u0004\b\u0007\u0010\bR\u0011\u0010\u0004\u001a\u00020\u0005¢\u0006\b\n\u0000\u001a\u0004\b\t\u0010\\u0006\u000b"}, d2 = {"Landroidx/compose/ui/platform/AndroidComposeView$ViewTreeOwners;", "", "lifecycleOwner", "Landroidx/lifecycle/LifecycleOwner;", "savedStateRegistryOwner", "Landroidx/savedstate/SavedStateRegistryOwner;", "(Landroidx/lifecycle/LifecycleOwner;Landroidx/savedstate/SavedStateRegistryOwner;)V", "getLifecycleOwner", "()Landroidx/lifecycle/LifecycleOwner;", "getSavedStateRegistryOwner", "()Landroidx/savedstate/SavedStateRegistryOwner;", "ui_release"}, k = 1, mv = {1, 8, 0}, xi = 48)
/* loaded from: classes.dex */
public static final class ViewTreeOwners {
public static final int $stable = 8;
private final LifecycleOwner lifecycleOwner;
private final SavedStateRegistryOwner savedStateRegistryOwner;
public final LifecycleOwner getLifecycleOwner() {
return this.lifecycleOwner;
}
public final SavedStateRegistryOwner getSavedStateRegistryOwner() {
return this.savedStateRegistryOwner;
}
public ViewTreeOwners(LifecycleOwner lifecycleOwner, SavedStateRegistryOwner savedStateRegistryOwner) {
Intrinsics.checkNotNullParameter(lifecycleOwner, "lifecycleOwner");
Intrinsics.checkNotNullParameter(savedStateRegistryOwner, "savedStateRegistryOwner");
this.lifecycleOwner = lifecycleOwner;
this.savedStateRegistryOwner = savedStateRegistryOwner;
}
}
private final void set_viewTreeOwners(ViewTreeOwners viewTreeOwners) {
this._viewTreeOwners.setValue(viewTreeOwners);
}
public final ViewTreeOwners getViewTreeOwners() {
return (ViewTreeOwners) this.viewTreeOwners.getValue();
}
private void setFontFamilyResolver(FontFamily.Resolver resolver) {
this.fontFamilyResolver.setValue(resolver);
}
private void setLayoutDirection(LayoutDirection layoutDirection) {
this.layoutDirection.setValue(layoutDirection);
}
@Override // androidx.compose.ui.node.Owner
/* renamed from: measureAndLayout-0kLqBqw */
public void mo4146measureAndLayout0kLqBqw(LayoutNode layoutNode, long constraints) {
Intrinsics.checkNotNullParameter(layoutNode, "layoutNode");
Trace.beginSection("AndroidOwner:measureAndLayout");
try {
this.measureAndLayoutDelegate.m4047measureAndLayout0kLqBqw(layoutNode, constraints);
if (!this.measureAndLayoutDelegate.getHasPendingMeasureOrLayout()) {
MeasureAndLayoutDelegate.dispatchOnPositionedCallbacks$default(this.measureAndLayoutDelegate, false, 1, null);
}
Unit unit = Unit.INSTANCE;
} finally {
Trace.endSection();
}
}
/* JADX WARN: Code restructure failed: missing block: B:21:0x0058, code lost:
if (androidx.compose.ui.unit.Constraints.m4832equalsimpl0(r0.getValue(), r8) == false) goto L13;
*/
@Override // android.view.View
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
protected void onMeasure(int r8, int r9) {
/*
r7 = this;
java.lang.String r0 = "AndroidOwner:onMeasure"
android.os.Trace.beginSection(r0)
boolean r0 = r7.isAttachedToWindow() // Catch: java.lang.Throwable -> La5
if (r0 != 0) goto L12
androidx.compose.ui.node.LayoutNode r0 = r7.getRoot() // Catch: java.lang.Throwable -> La5
r7.invalidateLayoutNodeMeasurement(r0) // Catch: java.lang.Throwable -> La5
L12:
long r0 = r7.m4166convertMeasureSpecI7RO_PI(r8) // Catch: java.lang.Throwable -> La5
r8 = 32
long r2 = r0 >>> r8
long r2 = kotlin.ULong.m5872constructorimpl(r2) // Catch: java.lang.Throwable -> La5
int r2 = (int) r2 // Catch: java.lang.Throwable -> La5
r3 = 4294967295(0xffffffff, double:2.1219957905E-314)
long r0 = r0 & r3
long r0 = kotlin.ULong.m5872constructorimpl(r0) // Catch: java.lang.Throwable -> La5
int r0 = (int) r0 // Catch: java.lang.Throwable -> La5
long r5 = r7.m4166convertMeasureSpecI7RO_PI(r9) // Catch: java.lang.Throwable -> La5
long r8 = r5 >>> r8
long r8 = kotlin.ULong.m5872constructorimpl(r8) // Catch: java.lang.Throwable -> La5
int r8 = (int) r8 // Catch: java.lang.Throwable -> La5
long r3 = r3 & r5
long r3 = kotlin.ULong.m5872constructorimpl(r3) // Catch: java.lang.Throwable -> La5
int r9 = (int) r3 // Catch: java.lang.Throwable -> La5
long r8 = androidx.compose.ui.unit.ConstraintsKt.Constraints(r2, r0, r8, r9) // Catch: java.lang.Throwable -> La5
androidx.compose.ui.unit.Constraints r0 = r7.onMeasureConstraints // Catch: java.lang.Throwable -> La5
if (r0 != 0) goto L4d
androidx.compose.ui.unit.Constraints r0 = androidx.compose.ui.unit.Constraints.m4827boximpl(r8) // Catch: java.lang.Throwable -> La5
r7.onMeasureConstraints = r0 // Catch: java.lang.Throwable -> La5
r0 = 0
r7.wasMeasuredWithMultipleConstraints = r0 // Catch: java.lang.Throwable -> La5
goto L5d
L4d:
if (r0 != 0) goto L50
goto L5a
L50:
long r0 = r0.getValue() // Catch: java.lang.Throwable -> La5
boolean r0 = androidx.compose.ui.unit.Constraints.m4832equalsimpl0(r0, r8) // Catch: java.lang.Throwable -> La5
if (r0 != 0) goto L5d
L5a:
r0 = 1
r7.wasMeasuredWithMultipleConstraints = r0 // Catch: java.lang.Throwable -> La5
L5d:
androidx.compose.ui.node.MeasureAndLayoutDelegate r0 = r7.measureAndLayoutDelegate // Catch: java.lang.Throwable -> La5
r0.m4048updateRootConstraintsBRTryo0(r8) // Catch: java.lang.Throwable -> La5
androidx.compose.ui.node.MeasureAndLayoutDelegate r8 = r7.measureAndLayoutDelegate // Catch: java.lang.Throwable -> La5
r8.measureOnly() // Catch: java.lang.Throwable -> La5
androidx.compose.ui.node.LayoutNode r8 = r7.getRoot() // Catch: java.lang.Throwable -> La5
int r8 = r8.getWidth() // Catch: java.lang.Throwable -> La5
androidx.compose.ui.node.LayoutNode r9 = r7.getRoot() // Catch: java.lang.Throwable -> La5
int r9 = r9.getHeight() // Catch: java.lang.Throwable -> La5
r7.setMeasuredDimension(r8, r9) // Catch: java.lang.Throwable -> La5
androidx.compose.ui.platform.AndroidViewsHandler r8 = r7._androidViewsHandler // Catch: java.lang.Throwable -> La5
if (r8 == 0) goto L9f
androidx.compose.ui.platform.AndroidViewsHandler r8 = r7.getAndroidViewsHandler$ui_release() // Catch: java.lang.Throwable -> La5
androidx.compose.ui.node.LayoutNode r9 = r7.getRoot() // Catch: java.lang.Throwable -> La5
int r9 = r9.getWidth() // Catch: java.lang.Throwable -> La5
r0 = 1073741824(0x40000000, float:2.0)
int r9 = android.view.View.MeasureSpec.makeMeasureSpec(r9, r0) // Catch: java.lang.Throwable -> La5
androidx.compose.ui.node.LayoutNode r7 = r7.getRoot() // Catch: java.lang.Throwable -> La5
int r7 = r7.getHeight() // Catch: java.lang.Throwable -> La5
int r7 = android.view.View.MeasureSpec.makeMeasureSpec(r7, r0) // Catch: java.lang.Throwable -> La5
r8.measure(r9, r7) // Catch: java.lang.Throwable -> La5
L9f:
kotlin.Unit r7 = kotlin.Unit.INSTANCE // Catch: java.lang.Throwable -> La5
android.os.Trace.endSection()
return
La5:
r7 = move-exception
android.os.Trace.endSection()
throw r7
*/
throw new UnsupportedOperationException("Method not decompiled: androidx.compose.ui.platform.AndroidComposeView.onMeasure(int, int):void");
}
}