Picsart v24.6版本的 MD5 值为:21a61631d94e54da68d2ad9268b8b9d9

以下内容为反编译后的 d.java 源代码,内容仅作参考


package myobfuscated.um;

import android.content.Context;
import android.content.pm.PackageManager;
import android.graphics.Bitmap;
import android.net.Uri;
import com.applovin.sdk.AppLovinEventTypes;
import com.facebook.FacebookException;
import com.facebook.internal.l0;
import com.facebook.internal.m0;
import com.facebook.share.model.ShareCameraEffectContent;
import com.facebook.share.model.ShareContent;
import com.facebook.share.model.ShareLinkContent;
import com.facebook.share.model.ShareMedia;
import com.facebook.share.model.ShareMediaContent;
import com.facebook.share.model.SharePhoto;
import com.facebook.share.model.SharePhotoContent;
import com.facebook.share.model.ShareStoryContent;
import com.facebook.share.model.ShareVideo;
import com.facebook.share.model.ShareVideoContent;
import java.util.List;
import java.util.Locale;
import kotlin.jvm.internal.Intrinsics;
import myobfuscated.mn2.k;
import myobfuscated.oj.j;
import org.jetbrains.annotations.NotNull;
public final class d {
    @NotNull
    public static final C1536d a = new c();
    @NotNull
    public static final c b = new c();
    @NotNull
    public static final b c;

    public static final class a extends c {
        @Override
        public final void a(@NotNull ShareLinkContent linkContent) {
            Intrinsics.checkNotNullParameter(linkContent, "linkContent");
            if (!l0.y(linkContent.g)) {
                throw new FacebookException("Cannot share link content with quote using the share api");
            }
        }

        @Override
        public final void c(@NotNull ShareMediaContent mediaContent) {
            Intrinsics.checkNotNullParameter(mediaContent, "mediaContent");
            throw new FacebookException("Cannot share ShareMediaContent using the share api");
        }

        @Override
        public final void d(@NotNull SharePhoto photo) {
            Intrinsics.checkNotNullParameter(photo, "photo");
            C1536d c1536d = d.a;
            if (photo == null) {
                throw new FacebookException("Cannot share a null SharePhoto");
            }
            Uri uri = photo.c;
            Bitmap bitmap = photo.b;
            if (bitmap == null && uri == null) {
                throw new FacebookException("SharePhoto does not have a Bitmap or ImageUrl specified");
            }
            if (bitmap == null && l0.z(uri)) {
                throw new FacebookException("Cannot set the ImageUrl of a SharePhoto to the Uri of an image on the web when sharing SharePhotoContent");
            }
        }

        @Override
        public final void g(@NotNull ShareVideoContent videoContent) {
            Intrinsics.checkNotNullParameter(videoContent, "videoContent");
            if (!l0.y(videoContent.c)) {
                throw new FacebookException("Cannot share video content with place IDs using the share api");
            }
            List<String> list = videoContent.b;
            if (list != null && !list.isEmpty()) {
                throw new FacebookException("Cannot share video content with people IDs using the share api");
            }
            if (!l0.y(videoContent.e)) {
                throw new FacebookException("Cannot share video content with referrer URL using the share api");
            }
        }
    }

    public static final class b extends c {
        @Override
        public final void e(ShareStoryContent shareStoryContent) {
            d.a(shareStoryContent, this);
        }
    }

    public static class c {
        public static void f(ShareVideo shareVideo) {
            C1536d c1536d = d.a;
            if (shareVideo == null) {
                throw new FacebookException("Cannot share a null ShareVideo");
            }
            Uri uri = shareVideo.b;
            if (uri == null) {
                throw new FacebookException("ShareVideo does not have a LocalUrl specified");
            }
            if (!k.n(AppLovinEventTypes.USER_VIEWED_CONTENT, uri.getScheme(), true) && !k.n("file", uri.getScheme(), true)) {
                throw new FacebookException("ShareVideo must reference a video that is on the device");
            }
        }

        public void a(@NotNull ShareLinkContent linkContent) {
            Intrinsics.checkNotNullParameter(linkContent, "linkContent");
            C1536d c1536d = d.a;
            Uri uri = linkContent.a;
            if (uri != null && !l0.z(uri)) {
                throw new FacebookException("Content Url must be an http:// or https:// url");
            }
        }

        public final void b(@NotNull ShareMedia<?, ?> medium) {
            Intrinsics.checkNotNullParameter(medium, "medium");
            C1536d c1536d = d.a;
            Intrinsics.checkNotNullParameter(medium, "medium");
            Intrinsics.checkNotNullParameter(this, "validator");
            if (medium instanceof SharePhoto) {
                d((SharePhoto) medium);
            } else if (medium instanceof ShareVideo) {
                f((ShareVideo) medium);
            } else {
                throw new FacebookException(defpackage.e.o(new Object[]{medium.getClass().getSimpleName()}, 1, Locale.ROOT, "Invalid media type: %s", "java.lang.String.format(locale, format, *args)"));
            }
        }

        public void c(@NotNull ShareMediaContent mediaContent) {
            Intrinsics.checkNotNullParameter(mediaContent, "mediaContent");
            C1536d c1536d = d.a;
            List<ShareMedia<?, ?>> list = mediaContent.g;
            if (list == null || list.isEmpty()) {
                throw new FacebookException("Must specify at least one medium in ShareMediaContent.");
            }
            if (list.size() > 6) {
                throw new FacebookException(defpackage.e.o(new Object[]{6}, 1, Locale.ROOT, "Cannot add more than %d media.", "java.lang.String.format(locale, format, *args)"));
            }
            for (ShareMedia<?, ?> shareMedia : list) {
                b(shareMedia);
            }
        }

        public void d(@NotNull SharePhoto photo) {
            Intrinsics.checkNotNullParameter(photo, "photo");
            C1536d c1536d = d.a;
            if (photo == null) {
                throw new FacebookException("Cannot share a null SharePhoto");
            }
            Bitmap bitmap = photo.b;
            Uri uri = photo.c;
            if (bitmap == null && uri == null) {
                throw new FacebookException("SharePhoto does not have a Bitmap or ImageUrl specified");
            }
            if (bitmap == null && l0.z(uri)) {
                throw new FacebookException("Cannot set the ImageUrl of a SharePhoto to the Uri of an image on the web when sharing SharePhotoContent");
            }
            if (bitmap == null && l0.z(uri)) {
                return;
            }
            String str = m0.a;
            Context context = j.a();
            Intrinsics.checkNotNullParameter(context, "context");
            String b = j.b();
            PackageManager packageManager = context.getPackageManager();
            if (packageManager != null) {
                String l = Intrinsics.l(b, "com.facebook.app.FacebookContentProvider");
                if (packageManager.resolveContentProvider(l, 0) == null) {
                    throw new IllegalStateException(myobfuscated.ud0.d.b(new Object[]{l}, 1, "A ContentProvider for this app was not set up in the AndroidManifest.xml, please add %s as a provider to your AndroidManifest.xml file. See https://developers.facebook.com/docs/sharing/android for more info.", "java.lang.String.format(format, *args)").toString());
                }
            }
        }

        public void e(ShareStoryContent shareStoryContent) {
            d.a(shareStoryContent, this);
        }

        public void g(@NotNull ShareVideoContent videoContent) {
            Intrinsics.checkNotNullParameter(videoContent, "videoContent");
            C1536d c1536d = d.a;
            f(videoContent.j);
            SharePhoto sharePhoto = videoContent.i;
            if (sharePhoto != null) {
                d(sharePhoto);
            }
        }
    }

    public static final class C1536d extends c {
        @Override
        public final void c(@NotNull ShareMediaContent mediaContent) {
            Intrinsics.checkNotNullParameter(mediaContent, "mediaContent");
            throw new FacebookException("Cannot share ShareMediaContent via web sharing dialogs");
        }

        @Override
        public final void d(@NotNull SharePhoto photo) {
            Intrinsics.checkNotNullParameter(photo, "photo");
            C1536d c1536d = d.a;
            if (photo == null) {
                throw new FacebookException("Cannot share a null SharePhoto");
            }
            if (photo.b == null && photo.c == null) {
                throw new FacebookException("SharePhoto does not have a Bitmap or ImageUrl specified");
            }
        }

        @Override
        public final void g(@NotNull ShareVideoContent videoContent) {
            Intrinsics.checkNotNullParameter(videoContent, "videoContent");
            throw new FacebookException("Cannot share ShareVideoContent via web sharing dialogs");
        }
    }

    static {
        new c();
        c = new c();
    }

    public static final void a(ShareStoryContent shareStoryContent, c cVar) {
        SharePhoto sharePhoto = shareStoryContent.h;
        ShareMedia<?, ?> shareMedia = shareStoryContent.g;
        if (shareMedia == null && sharePhoto == null) {
            throw new FacebookException("Must pass the Facebook app a background asset, a sticker asset, or both");
        }
        if (shareMedia != null) {
            cVar.b(shareMedia);
        }
        if (sharePhoto != null) {
            cVar.d(sharePhoto);
        }
    }

    public static void b(ShareContent shareContent, c cVar) throws FacebookException {
        if (shareContent instanceof ShareLinkContent) {
            cVar.a((ShareLinkContent) shareContent);
        } else if (shareContent instanceof SharePhotoContent) {
            SharePhotoContent photoContent = (SharePhotoContent) shareContent;
            cVar.getClass();
            Intrinsics.checkNotNullParameter(photoContent, "photoContent");
            List<SharePhoto> list = photoContent.g;
            if (list == null || list.isEmpty()) {
                throw new FacebookException("Must specify at least one Photo in SharePhotoContent.");
            }
            if (list.size() > 6) {
                throw new FacebookException(defpackage.e.o(new Object[]{6}, 1, Locale.ROOT, "Cannot add more than %d photos.", "java.lang.String.format(locale, format, *args)"));
            }
            for (SharePhoto sharePhoto : list) {
                cVar.d(sharePhoto);
            }
        } else if (shareContent instanceof ShareVideoContent) {
            cVar.g((ShareVideoContent) shareContent);
        } else if (shareContent instanceof ShareMediaContent) {
            cVar.c((ShareMediaContent) shareContent);
        } else if (!(shareContent instanceof ShareCameraEffectContent)) {
            if (shareContent instanceof ShareStoryContent) {
                cVar.e((ShareStoryContent) shareContent);
            }
        } else {
            ShareCameraEffectContent cameraEffectContent = (ShareCameraEffectContent) shareContent;
            cVar.getClass();
            Intrinsics.checkNotNullParameter(cameraEffectContent, "cameraEffectContent");
            if (l0.y(cameraEffectContent.g)) {
                throw new FacebookException("Must specify a non-empty effectId");
            }
        }
    }
}