mirror of
https://github.com/Pinball3D/Rabbit-R1.git
synced 2024-12-26 17:12:31 -06:00
62 lines
3.8 KiB
Java
62 lines
3.8 KiB
Java
package androidx.activity.compose;
|
|
|
|
import androidx.activity.result.ActivityResultCallback;
|
|
import androidx.activity.result.ActivityResultRegistry;
|
|
import androidx.activity.result.contract.ActivityResultContract;
|
|
import androidx.compose.runtime.DisposableEffectResult;
|
|
import androidx.compose.runtime.DisposableEffectScope;
|
|
import androidx.compose.runtime.State;
|
|
import kotlin.Metadata;
|
|
import kotlin.Unit;
|
|
import kotlin.jvm.functions.Function1;
|
|
import kotlin.jvm.internal.Lambda;
|
|
|
|
/* compiled from: ActivityResultRegistry.kt */
|
|
@Metadata(d1 = {"\u0000\u0010\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\u0010\u0000\u001a\u00020\u0001\"\u0004\b\u0000\u0010\u0002\"\u0004\b\u0001\u0010\u0003*\u00020\u0004H\n¢\u0006\u0002\b\u0005"}, d2 = {"<anonymous>", "Landroidx/compose/runtime/DisposableEffectResult;", "I", "O", "Landroidx/compose/runtime/DisposableEffectScope;", "invoke"}, k = 3, mv = {1, 8, 0}, xi = 48)
|
|
/* loaded from: classes.dex */
|
|
final class ActivityResultRegistryKt$rememberLauncherForActivityResult$1 extends Lambda implements Function1<DisposableEffectScope, DisposableEffectResult> {
|
|
final /* synthetic */ ActivityResultRegistry $activityResultRegistry;
|
|
final /* synthetic */ ActivityResultContract<I, O> $contract;
|
|
final /* synthetic */ State<Function1<O, Unit>> $currentOnResult;
|
|
final /* synthetic */ String $key;
|
|
final /* synthetic */ ActivityResultLauncherHolder<I> $realLauncher;
|
|
|
|
/* 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 */
|
|
public ActivityResultRegistryKt$rememberLauncherForActivityResult$1(ActivityResultLauncherHolder<I> activityResultLauncherHolder, ActivityResultRegistry activityResultRegistry, String str, ActivityResultContract<I, O> activityResultContract, State<? extends Function1<? super O, Unit>> state) {
|
|
super(1);
|
|
this.$realLauncher = activityResultLauncherHolder;
|
|
this.$activityResultRegistry = activityResultRegistry;
|
|
this.$key = str;
|
|
this.$contract = activityResultContract;
|
|
this.$currentOnResult = state;
|
|
}
|
|
|
|
@Override // kotlin.jvm.functions.Function1
|
|
public final DisposableEffectResult invoke(DisposableEffectScope disposableEffectScope) {
|
|
ActivityResultLauncherHolder<I> activityResultLauncherHolder = this.$realLauncher;
|
|
ActivityResultRegistry activityResultRegistry = this.$activityResultRegistry;
|
|
String str = this.$key;
|
|
Object obj = this.$contract;
|
|
final State<Function1<O, Unit>> state = this.$currentOnResult;
|
|
activityResultLauncherHolder.setLauncher(activityResultRegistry.register(str, obj, new ActivityResultCallback() { // from class: androidx.activity.compose.ActivityResultRegistryKt$rememberLauncherForActivityResult$1$$ExternalSyntheticLambda0
|
|
@Override // androidx.activity.result.ActivityResultCallback
|
|
public final void onActivityResult(Object obj2) {
|
|
ActivityResultRegistryKt$rememberLauncherForActivityResult$1.invoke$lambda$0(State.this, obj2);
|
|
}
|
|
}));
|
|
final ActivityResultLauncherHolder<I> activityResultLauncherHolder2 = this.$realLauncher;
|
|
return new DisposableEffectResult() { // from class: androidx.activity.compose.ActivityResultRegistryKt$rememberLauncherForActivityResult$1$invoke$$inlined$onDispose$1
|
|
@Override // androidx.compose.runtime.DisposableEffectResult
|
|
public void dispose() {
|
|
ActivityResultLauncherHolder.this.unregister();
|
|
}
|
|
};
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: private */
|
|
public static final void invoke$lambda$0(State state, Object obj) {
|
|
((Function1) state.getValue()).invoke(obj);
|
|
}
|
|
}
|