Rabbit-R1/android (non root)/java/sources/androidx/compose/ui/window/AndroidDialog_androidKt.java
2024-05-21 17:08:36 -04:00

242 lines
15 KiB
Java

package androidx.compose.ui.window;
import androidx.compose.runtime.Applier;
import androidx.compose.runtime.ComposablesKt;
import androidx.compose.runtime.Composer;
import androidx.compose.runtime.ComposerKt;
import androidx.compose.runtime.CompositionLocalMap;
import androidx.compose.runtime.RecomposeScopeImplKt;
import androidx.compose.runtime.ScopeUpdateScope;
import androidx.compose.runtime.SkippableUpdater;
import androidx.compose.runtime.State;
import androidx.compose.runtime.Updater;
import androidx.compose.ui.Modifier;
import androidx.compose.ui.layout.LayoutKt;
import androidx.compose.ui.layout.Measurable;
import androidx.compose.ui.layout.MeasurePolicy;
import androidx.compose.ui.layout.MeasureResult;
import androidx.compose.ui.layout.MeasureScope;
import androidx.compose.ui.layout.Placeable;
import androidx.compose.ui.node.ComposeUiNode;
import androidx.compose.ui.unit.Constraints;
import java.util.ArrayList;
import java.util.List;
import kotlin.Metadata;
import kotlin.Unit;
import kotlin.collections.CollectionsKt;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.functions.Function3;
import kotlin.jvm.internal.Intrinsics;
/* compiled from: AndroidDialog.android.kt */
@Metadata(d1 = {"\u0000$\n\u0000\n\u0002\u0010\u0002\n\u0000\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\u0002\b\u0003\u001a8\u0010\u0000\u001a\u00020\u00012\f\u0010\u0002\u001a\b\u0012\u0004\u0012\u00020\u00010\u00032\b\b\u0002\u0010\u0004\u001a\u00020\u00052\u0011\u0010\u0006\u001a\r\u0012\u0004\u0012\u00020\u00010\u0003¢\u0006\u0002\b\u0007H\u0007¢\u0006\u0002\u0010\b\u001a*\u0010\t\u001a\u00020\u00012\b\b\u0002\u0010\n\u001a\u00020\u000b2\u0011\u0010\u0006\u001a\r\u0012\u0004\u0012\u00020\u00010\u0003¢\u0006\u0002\b\u0007H\u0003¢\u0006\u0002\u0010\\u0006\\u0006\u0015\u0010\u000e\u001a\r\u0012\u0004\u0012\u00020\u00010\u0003¢\u0006\u0002\b\u0007X\u008a\u0084\u0002"}, d2 = {"Dialog", "", "onDismissRequest", "Lkotlin/Function0;", "properties", "Landroidx/compose/ui/window/DialogProperties;", "content", "Landroidx/compose/runtime/Composable;", "(Lkotlin/jvm/functions/Function0;Landroidx/compose/ui/window/DialogProperties;Lkotlin/jvm/functions/Function2;Landroidx/compose/runtime/Composer;II)V", "DialogLayout", "modifier", "Landroidx/compose/ui/Modifier;", "(Landroidx/compose/ui/Modifier;Lkotlin/jvm/functions/Function2;Landroidx/compose/runtime/Composer;II)V", "ui_release", "currentContent"}, k = 2, mv = {1, 8, 0}, xi = 48)
/* loaded from: classes.dex */
public final class AndroidDialog_androidKt {
/* JADX WARN: Removed duplicated region for block: B:10:0x0055 */
/* JADX WARN: Removed duplicated region for block: B:18:0x017e */
/* JADX WARN: Removed duplicated region for block: B:21:? A[RETURN, SYNTHETIC] */
/* JADX WARN: Removed duplicated region for block: B:23:0x007e */
/* JADX WARN: Removed duplicated region for block: B:26:0x0092 */
/* JADX WARN: Removed duplicated region for block: B:34:0x0173 */
/* JADX WARN: Removed duplicated region for block: B:37:0x008b */
/* JADX WARN: Removed duplicated region for block: B:38:0x0058 */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public static final void Dialog(final kotlin.jvm.functions.Function0<kotlin.Unit> r19, androidx.compose.ui.window.DialogProperties r20, final kotlin.jvm.functions.Function2<? super androidx.compose.runtime.Composer, ? super java.lang.Integer, kotlin.Unit> r21, androidx.compose.runtime.Composer r22, final int r23, final int r24) {
/*
Method dump skipped, instructions count: 402
To view this dump add '--comments-level debug' option
*/
throw new UnsupportedOperationException("Method not decompiled: androidx.compose.ui.window.AndroidDialog_androidKt.Dialog(kotlin.jvm.functions.Function0, androidx.compose.ui.window.DialogProperties, kotlin.jvm.functions.Function2, androidx.compose.runtime.Composer, int, int):void");
}
/* JADX INFO: Access modifiers changed from: private */
public static final void DialogLayout(final Modifier modifier, final Function2<? super Composer, ? super Integer, Unit> function2, Composer composer, final int i, final int i2) {
int i3;
Composer startRestartGroup = composer.startRestartGroup(-1177876616);
ComposerKt.sourceInformation(startRestartGroup, "C(DialogLayout)P(1)453@17860L455:AndroidDialog.android.kt#2oxthz");
int i4 = i2 & 1;
if (i4 != 0) {
i3 = i | 6;
} else if ((i & 14) == 0) {
i3 = (startRestartGroup.changed(modifier) ? 4 : 2) | i;
} else {
i3 = i;
}
if ((i2 & 2) != 0) {
i3 |= 48;
} else if ((i & 112) == 0) {
i3 |= startRestartGroup.changedInstance(function2) ? 32 : 16;
}
if ((i3 & 91) != 18 || !startRestartGroup.getSkipping()) {
if (i4 != 0) {
modifier = Modifier.INSTANCE;
}
if (ComposerKt.isTraceInProgress()) {
ComposerKt.traceEventStart(-1177876616, i3, -1, "androidx.compose.ui.window.DialogLayout (AndroidDialog.android.kt:449)");
}
AndroidDialog_androidKt$DialogLayout$1 androidDialog_androidKt$DialogLayout$1 = new MeasurePolicy() { // from class: androidx.compose.ui.window.AndroidDialog_androidKt$DialogLayout$1
/* JADX WARN: Multi-variable type inference failed */
/* JADX WARN: Type inference failed for: r12v15, types: [java.lang.Object] */
/* JADX WARN: Type inference failed for: r12v16 */
/* JADX WARN: Type inference failed for: r12v18 */
/* JADX WARN: Type inference failed for: r12v19 */
/* JADX WARN: Type inference failed for: r12v24 */
@Override // androidx.compose.ui.layout.MeasurePolicy
/* renamed from: measure-3p2s80s */
public final MeasureResult mo21measure3p2s80s(MeasureScope Layout, List<? extends Measurable> measurables, long j) {
Object obj;
Intrinsics.checkNotNullParameter(Layout, "$this$Layout");
Intrinsics.checkNotNullParameter(measurables, "measurables");
ArrayList arrayList = new ArrayList(measurables.size());
int size = measurables.size();
for (int i5 = 0; i5 < size; i5++) {
arrayList.add(measurables.get(i5).mo3876measureBRTryo0(j));
}
final ArrayList arrayList2 = arrayList;
Placeable placeable = null;
int i6 = 1;
if (arrayList2.isEmpty()) {
obj = null;
} else {
obj = arrayList2.get(0);
int width = ((Placeable) obj).getWidth();
int lastIndex = CollectionsKt.getLastIndex(arrayList2);
if (1 <= lastIndex) {
int i7 = 1;
while (true) {
Object obj2 = arrayList2.get(i7);
int width2 = ((Placeable) obj2).getWidth();
if (width < width2) {
obj = obj2;
width = width2;
}
if (i7 == lastIndex) {
break;
}
i7++;
}
}
}
Placeable placeable2 = (Placeable) obj;
int width3 = placeable2 != null ? placeable2.getWidth() : Constraints.m4841getMinWidthimpl(j);
if (!arrayList2.isEmpty()) {
?? r12 = arrayList2.get(0);
int height = ((Placeable) r12).getHeight();
int lastIndex2 = CollectionsKt.getLastIndex(arrayList2);
boolean z = r12;
if (1 <= lastIndex2) {
while (true) {
Object obj3 = arrayList2.get(i6);
int height2 = ((Placeable) obj3).getHeight();
r12 = z;
if (height < height2) {
r12 = obj3;
height = height2;
}
if (i6 == lastIndex2) {
break;
}
i6++;
z = r12;
}
}
placeable = r12;
}
Placeable placeable3 = placeable;
return MeasureScope.layout$default(Layout, width3, placeable3 != null ? placeable3.getHeight() : Constraints.m4840getMinHeightimpl(j), null, new Function1<Placeable.PlacementScope, Unit>() { // from class: androidx.compose.ui.window.AndroidDialog_androidKt$DialogLayout$1$measure$1
/* JADX INFO: Access modifiers changed from: package-private */
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
/* JADX WARN: Multi-variable type inference failed */
{
super(1);
}
@Override // kotlin.jvm.functions.Function1
public /* bridge */ /* synthetic */ Unit invoke(Placeable.PlacementScope placementScope) {
invoke2(placementScope);
return Unit.INSTANCE;
}
/* renamed from: invoke, reason: avoid collision after fix types in other method */
public final void invoke2(Placeable.PlacementScope layout) {
Intrinsics.checkNotNullParameter(layout, "$this$layout");
List<Placeable> list = arrayList2;
int size2 = list.size();
for (int i8 = 0; i8 < size2; i8++) {
Placeable.PlacementScope.placeRelative$default(layout, list.get(i8), 0, 0, 0.0f, 4, null);
}
}
}, 4, null);
}
};
int i5 = ((i3 >> 3) & 14) | ((i3 << 3) & 112);
startRestartGroup.startReplaceableGroup(-1323940314);
ComposerKt.sourceInformation(startRestartGroup, "CC(Layout)P(!1,2)77@3132L23,79@3222L420:Layout.kt#80mrfh");
int currentCompositeKeyHash = ComposablesKt.getCurrentCompositeKeyHash(startRestartGroup, 0);
CompositionLocalMap currentCompositionLocalMap = startRestartGroup.getCurrentCompositionLocalMap();
Function0<ComposeUiNode> constructor = ComposeUiNode.INSTANCE.getConstructor();
Function3<SkippableUpdater<ComposeUiNode>, Composer, Integer, Unit> modifierMaterializerOf = LayoutKt.modifierMaterializerOf(modifier);
int i6 = ((i5 << 9) & 7168) | 6;
if (!(startRestartGroup.getApplier() instanceof Applier)) {
ComposablesKt.invalidApplier();
}
startRestartGroup.startReusableNode();
if (startRestartGroup.getInserting()) {
startRestartGroup.createNode(constructor);
} else {
startRestartGroup.useNode();
}
Composer m2273constructorimpl = Updater.m2273constructorimpl(startRestartGroup);
Updater.m2280setimpl(m2273constructorimpl, androidDialog_androidKt$DialogLayout$1, ComposeUiNode.INSTANCE.getSetMeasurePolicy());
Updater.m2280setimpl(m2273constructorimpl, currentCompositionLocalMap, ComposeUiNode.INSTANCE.getSetResolvedCompositionLocals());
Function2<ComposeUiNode, Integer, Unit> setCompositeKeyHash = ComposeUiNode.INSTANCE.getSetCompositeKeyHash();
if (m2273constructorimpl.getInserting() || !Intrinsics.areEqual(m2273constructorimpl.rememberedValue(), Integer.valueOf(currentCompositeKeyHash))) {
m2273constructorimpl.updateRememberedValue(Integer.valueOf(currentCompositeKeyHash));
m2273constructorimpl.apply(Integer.valueOf(currentCompositeKeyHash), setCompositeKeyHash);
}
modifierMaterializerOf.invoke(SkippableUpdater.m2264boximpl(SkippableUpdater.m2265constructorimpl(startRestartGroup)), startRestartGroup, Integer.valueOf((i6 >> 3) & 112));
startRestartGroup.startReplaceableGroup(2058660585);
function2.invoke(startRestartGroup, Integer.valueOf((i6 >> 9) & 14));
startRestartGroup.endReplaceableGroup();
startRestartGroup.endNode();
startRestartGroup.endReplaceableGroup();
if (ComposerKt.isTraceInProgress()) {
ComposerKt.traceEventEnd();
}
} else {
startRestartGroup.skipToGroupEnd();
}
ScopeUpdateScope endRestartGroup = startRestartGroup.endRestartGroup();
if (endRestartGroup == null) {
return;
}
endRestartGroup.updateScope(new Function2<Composer, Integer, Unit>() { // from class: androidx.compose.ui.window.AndroidDialog_androidKt$DialogLayout$2
/* JADX INFO: Access modifiers changed from: package-private */
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
/* JADX WARN: Multi-variable type inference failed */
{
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 i7) {
AndroidDialog_androidKt.DialogLayout(Modifier.this, function2, composer2, RecomposeScopeImplKt.updateChangedFlags(i | 1), i2);
}
});
}
/* JADX INFO: Access modifiers changed from: private */
public static final Function2<Composer, Integer, Unit> Dialog$lambda$0(State<? extends Function2<? super Composer, ? super Integer, Unit>> state) {
return (Function2) state.getValue();
}
}