Files
rr3-apk/decompiled/sources/androidx/activity/ViewTreeOnBackPressedDispatcherOwner.java
Daniel Elliott f9d20bb3fc Add decompiled APK source code (JADX)
- 28,932 files
- Full Java source code
- Smali files
- Resources

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-18 14:52:23 -08:00

49 lines
2.3 KiB
Java

package androidx.activity;
import android.view.View;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.Intrinsics;
import kotlin.sequences.Sequence;
import kotlin.sequences.SequencesKt__SequencesKt;
import kotlin.sequences.SequencesKt___SequencesKt;
/* loaded from: classes.dex */
public final class ViewTreeOnBackPressedDispatcherOwner {
public static final void set(View view, OnBackPressedDispatcherOwner onBackPressedDispatcherOwner) {
Intrinsics.checkNotNullParameter(view, "<this>");
Intrinsics.checkNotNullParameter(onBackPressedDispatcherOwner, "onBackPressedDispatcherOwner");
view.setTag(R.id.view_tree_on_back_pressed_dispatcher_owner, onBackPressedDispatcherOwner);
}
public static final OnBackPressedDispatcherOwner get(View view) {
Sequence generateSequence;
Sequence mapNotNull;
Object firstOrNull;
Intrinsics.checkNotNullParameter(view, "<this>");
generateSequence = SequencesKt__SequencesKt.generateSequence(view, new Function1() { // from class: androidx.activity.ViewTreeOnBackPressedDispatcherOwner$findViewTreeOnBackPressedDispatcherOwner$1
@Override // kotlin.jvm.functions.Function1
public final View invoke(View it) {
Intrinsics.checkNotNullParameter(it, "it");
Object parent = it.getParent();
if (parent instanceof View) {
return (View) parent;
}
return null;
}
});
mapNotNull = SequencesKt___SequencesKt.mapNotNull(generateSequence, new Function1() { // from class: androidx.activity.ViewTreeOnBackPressedDispatcherOwner$findViewTreeOnBackPressedDispatcherOwner$2
@Override // kotlin.jvm.functions.Function1
public final OnBackPressedDispatcherOwner invoke(View it) {
Intrinsics.checkNotNullParameter(it, "it");
Object tag = it.getTag(R.id.view_tree_on_back_pressed_dispatcher_owner);
if (tag instanceof OnBackPressedDispatcherOwner) {
return (OnBackPressedDispatcherOwner) tag;
}
return null;
}
});
firstOrNull = SequencesKt___SequencesKt.firstOrNull(mapNotNull);
return (OnBackPressedDispatcherOwner) firstOrNull;
}
}