package androidx.core.view;

import android.view.ContentInfo;
import android.view.View;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import java.util.Objects;

/* JADX INFO: loaded from: classes.dex */
public abstract class p1 {
    @Nullable
    public static String[] getReceiveContentMimeTypes(@NonNull View view) {
        return view.getReceiveContentMimeTypes();
    }

    @Nullable
    public static m performReceiveContent(@NonNull View view, @NonNull m mVar) {
        ContentInfo wrapped = mVar.f1785a.getWrapped();
        Objects.requireNonNull(wrapped);
        ContentInfo contentInfoL = androidx.core.app.t0.l(wrapped);
        ContentInfo contentInfoPerformReceiveContent = view.performReceiveContent(contentInfoL);
        if (contentInfoPerformReceiveContent == null) {
            return null;
        }
        return contentInfoPerformReceiveContent == contentInfoL ? mVar : new m(new j(contentInfoPerformReceiveContent));
    }

    public static void setOnReceiveContentListener(@NonNull View view, @Nullable String[] strArr, @Nullable m0 m0Var) {
        if (m0Var == null) {
            view.setOnReceiveContentListener(strArr, null);
        } else {
            view.setOnReceiveContentListener(strArr, new q1(m0Var));
        }
    }
}
