discord-jadx/app/src/main/java/androidx/activity/result/ActivityResultCallerLaunche...

56 lines
2.3 KiB
Java

package androidx.activity.result;
import androidx.activity.result.contract.ActivityResultContract;
import androidx.core.app.ActivityOptionsCompat;
import d0.g;
import d0.z.d.m;
import kotlin.Lazy;
import kotlin.Unit;
/* compiled from: ActivityResultCaller.kt */
public final class ActivityResultCallerLauncher<I, O> extends ActivityResultLauncher<Unit> {
private final ActivityResultContract<I, O> callerContract;
private final I input;
private final ActivityResultLauncher<I> launcher;
private final Lazy resultContract$delegate = g.lazy(new ActivityResultCallerLauncher$resultContract$2(this));
public ActivityResultCallerLauncher(ActivityResultLauncher<I> activityResultLauncher, ActivityResultContract<I, O> activityResultContract, I i) {
m.checkNotNullParameter(activityResultLauncher, "launcher");
m.checkNotNullParameter(activityResultContract, "callerContract");
this.launcher = activityResultLauncher;
this.callerContract = activityResultContract;
this.input = i;
}
public final ActivityResultContract<I, O> getCallerContract() {
return this.callerContract;
}
/* Return type fixed from 'androidx.activity.result.contract.ActivityResultContract<kotlin.Unit, O>' to match base method */
/* JADX DEBUG: Type inference failed for r0v0. Raw type applied. Possible types: androidx.activity.result.contract.ActivityResultContract<kotlin.Unit, O>, androidx.activity.result.contract.ActivityResultContract<kotlin.Unit, ?> */
@Override // androidx.activity.result.ActivityResultLauncher
public ActivityResultContract<Unit, ?> getContract() {
return (ActivityResultContract<Unit, O>) getResultContract();
}
public final I getInput() {
return this.input;
}
public final ActivityResultLauncher<I> getLauncher() {
return this.launcher;
}
public final ActivityResultContract<Unit, O> getResultContract() {
return (ActivityResultContract) this.resultContract$delegate.getValue();
}
public void launch(Unit unit, ActivityOptionsCompat activityOptionsCompat) {
this.launcher.launch(this.input, activityOptionsCompat);
}
@Override // androidx.activity.result.ActivityResultLauncher
public void unregister() {
this.launcher.unregister();
}
}