Rabbit-R1/switch port/java/sources/androidx/activity/PipHintTrackerKt.java
2024-05-21 17:08:36 -04:00

38 lines
2.2 KiB
Java

package androidx.activity;
import android.app.Activity;
import android.graphics.Rect;
import android.view.View;
import kotlin.Metadata;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.intrinsics.IntrinsicsKt;
import kotlinx.coroutines.flow.FlowCollector;
import kotlinx.coroutines.flow.FlowKt;
/* compiled from: PipHintTracker.kt */
@Metadata(d1 = {"\u0000\u0014\n\u0000\n\u0002\u0010\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\u001a\u001d\u0010\u0000\u001a\u00020\u0001*\u00020\u00022\u0006\u0010\u0003\u001a\u00020\u0004H\u0087@ø\u0001\u0000¢\u0006\u0002\u0010\u0005\u0082\u0002\u0004\n\u0002\b\u0019¨\u0006\u0006"}, d2 = {"trackPipAnimationHintView", "", "Landroid/app/Activity;", "view", "Landroid/view/View;", "(Landroid/app/Activity;Landroid/view/View;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", "activity-ktx_release"}, k = 2, mv = {1, 8, 0}, xi = 48)
/* loaded from: classes.dex */
public final class PipHintTrackerKt {
/* JADX INFO: Access modifiers changed from: private */
public static final Rect trackPipAnimationHintView$positionInWindow(View view) {
Rect rect = new Rect();
view.getGlobalVisibleRect(rect);
return rect;
}
public static final Object trackPipAnimationHintView(final Activity activity, View view, Continuation<? super Unit> continuation) {
Object collect = FlowKt.callbackFlow(new PipHintTrackerKt$trackPipAnimationHintView$flow$1(view, null)).collect(new FlowCollector() { // from class: androidx.activity.PipHintTrackerKt$trackPipAnimationHintView$2
@Override // kotlinx.coroutines.flow.FlowCollector
public /* bridge */ /* synthetic */ Object emit(Object obj, Continuation continuation2) {
return emit((Rect) obj, (Continuation<? super Unit>) continuation2);
}
public final Object emit(Rect rect, Continuation<? super Unit> continuation2) {
Api26Impl.INSTANCE.setPipParamsSourceRectHint(activity, rect);
return Unit.INSTANCE;
}
}, continuation);
return collect == IntrinsicsKt.getCOROUTINE_SUSPENDED() ? collect : Unit.INSTANCE;
}
}