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

124 lines
6.8 KiB
Java

package androidx.compose.ui.platform;
import android.content.Context;
import android.util.AttributeSet;
import androidx.compose.runtime.Composable;
import androidx.compose.runtime.ComposableInferredTarget;
import androidx.compose.runtime.Composer;
import androidx.compose.runtime.ComposerKt;
import androidx.compose.runtime.MutableState;
import androidx.compose.runtime.RecomposeScopeImplKt;
import androidx.compose.runtime.ScopeUpdateScope;
import androidx.compose.runtime.SnapshotStateKt__SnapshotStateKt;
import androidx.compose.runtime.internal.StabilityInferred;
import kotlin.Metadata;
import kotlin.Unit;
import kotlin.jvm.JvmOverloads;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.internal.DefaultConstructorMarker;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
@StabilityInferred(parameters = 0)
@Metadata(d1 = {"\u0000@\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\b\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000b\n\u0002\b\b\n\u0002\u0010\r\n\u0002\b\u0003\b\u0007\u0018\u00002\u00020\u0001B'\b\u0007\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u0012\n\b\u0002\u0010\u0004\u001a\u0004\u0018\u00010\u0005\u0012\b\b\u0002\u0010\u0006\u001a\u00020\u0007¢\u0006\u0004\b\b\u0010\tJ\r\u0010\u0016\u001a\u00020\rH\u0017¢\u0006\u0002\u0010\u0017J\b\u0010\u0018\u001a\u00020\u0019H\u0016J\u001e\u0010\u001a\u001a\u00020\r2\u0011\u0010\n\u001a\r\u0012\u0004\u0012\u00020\r0\f¢\u0006\u0002\b\u000e¢\u0006\u0002\u0010\u001bR!\u0010\n\u001a\u0015\u0012\u0011\u0012\u000f\u0012\u0004\u0012\u00020\r\u0018\u00010\f¢\u0006\u0002\b\u000e0\u000bX\u0082\u0004¢\u0006\u0002\n\u0000R$\u0010\u0011\u001a\u00020\u00102\u0006\u0010\u000f\u001a\u00020\u0010@RX\u0094\u000e¢\u0006\u000e\n\u0000\u0012\u0004\b\u0012\u0010\u0013\u001a\u0004\b\u0014\u0010\u0015¨\u0006\u001c"}, d2 = {"Landroidx/compose/ui/platform/ComposeView;", "Landroidx/compose/ui/platform/AbstractComposeView;", "context", "Landroid/content/Context;", "attrs", "Landroid/util/AttributeSet;", "defStyleAttr", "", "<init>", "(Landroid/content/Context;Landroid/util/AttributeSet;I)V", "content", "Landroidx/compose/runtime/MutableState;", "Lkotlin/Function0;", "", "Landroidx/compose/runtime/Composable;", "value", "", "shouldCreateCompositionOnAttachedToWindow", "getShouldCreateCompositionOnAttachedToWindow$annotations", "()V", "getShouldCreateCompositionOnAttachedToWindow", "()Z", "Content", "(Landroidx/compose/runtime/Composer;I)V", "getAccessibilityClassName", "", "setContent", "(Lkotlin/jvm/functions/Function2;)V", "ui_release"}, k = 1, mv = {2, 0, 0}, xi = 48)
/* loaded from: classes13.dex */
public final class ComposeView extends AbstractComposeView {
public static final int $stable = 8;
@NotNull
private final MutableState<Function2<Composer, Integer, Unit>> content;
private boolean shouldCreateCompositionOnAttachedToWindow;
public /* synthetic */ ComposeView(Context context, AttributeSet attributeSet, int i, int i2, DefaultConstructorMarker defaultConstructorMarker) {
this(context, (i2 & 2) != 0 ? null : attributeSet, (i2 & 4) != 0 ? 0 : i);
}
@Override // androidx.compose.ui.platform.AbstractComposeView
@Composable
public void Content(@Nullable Composer composer, final int i) {
int i2;
Composer startRestartGroup = composer.startRestartGroup(420213850);
if ((i & 6) == 0) {
i2 = (startRestartGroup.changedInstance(this) ? 4 : 2) | i;
} else {
i2 = i;
}
if (startRestartGroup.shouldExecute((i2 & 3) != 2, i2 & 1)) {
if (ComposerKt.isTraceInProgress()) {
ComposerKt.traceEventStart(420213850, i2, -1, "androidx.compose.ui.platform.ComposeView.Content (ComposeView.android.kt:429)");
}
Function2<Composer, Integer, Unit> value = this.content.getValue();
if (value == null) {
startRestartGroup.startReplaceGroup(-1238798753);
} else {
startRestartGroup.startReplaceGroup(98586082);
value.invoke(startRestartGroup, 0);
}
startRestartGroup.endReplaceGroup();
if (ComposerKt.isTraceInProgress()) {
ComposerKt.traceEventEnd();
}
} else {
startRestartGroup.skipToGroupEnd();
}
ScopeUpdateScope endRestartGroup = startRestartGroup.endRestartGroup();
if (endRestartGroup != null) {
endRestartGroup.updateScope(new Function2<Composer, Integer, Unit>() { // from class: androidx.compose.ui.platform.ComposeView$Content$1
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
{
super(2);
}
@Override // kotlin.jvm.functions.Function2
public /* bridge */ /* synthetic */ Unit invoke(Composer composer2, Integer num) {
invoke(composer2, num.intValue());
return Unit.INSTANCE;
}
public final void invoke(Composer composer2, int i3) {
ComposeView.this.Content(composer2, RecomposeScopeImplKt.updateChangedFlags(i | 1));
}
});
}
}
@Override // android.view.ViewGroup, android.view.View
@NotNull
public CharSequence getAccessibilityClassName() {
return "androidx.compose.ui.platform.ComposeView";
}
@Override // androidx.compose.ui.platform.AbstractComposeView
public boolean getShouldCreateCompositionOnAttachedToWindow() {
return this.shouldCreateCompositionOnAttachedToWindow;
}
@ComposableInferredTarget(scheme = "[0[0]]")
public final void setContent(@NotNull Function2<? super Composer, ? super Integer, Unit> content) {
this.shouldCreateCompositionOnAttachedToWindow = true;
this.content.setValue(content);
if (isAttachedToWindow()) {
createComposition();
}
}
@JvmOverloads
public ComposeView(@NotNull Context context, @Nullable AttributeSet attributeSet) {
this(context, attributeSet, 0, 4, null);
}
public static /* synthetic */ void getShouldCreateCompositionOnAttachedToWindow$annotations() {
}
@JvmOverloads
public ComposeView(@NotNull Context context) {
this(context, null, 0, 6, null);
}
@JvmOverloads
public ComposeView(@NotNull Context context, @Nullable AttributeSet attributeSet, int i) {
super(context, attributeSet, i);
this.content = SnapshotStateKt__SnapshotStateKt.mutableStateOf$default(null, null, 2, null);
}
}