TikTok.apk(点击下载) / C37190Ej5.java


package X;

import android.content.Context;
import android.content.pm.PackageManager;
import android.graphics.Bitmap;
import android.net.Uri;
import com.bytedance.covode.number.Covode;
import com.facebook.m;
import com.facebook.share.model.ShareMedia;
import com.facebook.share.model.ShareMediaContent;
import com.facebook.share.model.ShareOpenGraphContent;
import com.facebook.share.model.SharePhoto;
import com.facebook.share.model.ShareStoryContent;
import com.facebook.share.model.ShareVideoContent;
import java.util.List;
import java.util.Locale;

/* renamed from: X.Ej5  reason: case insensitive filesystem */
public class C37190Ej5 {
    public boolean LIZ;

    static {
        Covode.recordClassIndex(35611);
    }

    public C37190Ej5() {
    }

    public /* synthetic */ C37190Ej5(byte b) {
        this();
    }

    public void LIZ(ShareMediaContent shareMediaContent) {
        List<ShareMedia> list = shareMediaContent.LIZ;
        if (list == null || list.isEmpty()) {
            throw new C36932Eev("Must specify at least one medium in ShareMediaContent.");
        } else if (list.size() <= 6) {
            for (ShareMedia shareMedia : list) {
                C37191Ej6.LIZ(shareMedia, this);
            }
        } else {
            throw new C36932Eev(AnonymousClass0EJ.LIZ(Locale.ROOT, "Cannot add more than %d media.", new Object[]{6}));
        }
    }

    public final void LIZ(ShareOpenGraphContent shareOpenGraphContent) {
        this.LIZ = true;
        C37191Ej6.LIZ(shareOpenGraphContent, this);
    }

    public void LIZ(SharePhoto sharePhoto) {
        C37191Ej6.LIZ(sharePhoto);
        Bitmap bitmap = sharePhoto.LIZIZ;
        Uri uri = sharePhoto.LIZJ;
        if (bitmap == null && C37072EhB.LIZIZ(uri) && !this.LIZ) {
            throw new C36932Eev("Cannot set the ImageUrl of a SharePhoto to the Uri of an image on the web when sharing SharePhotoContent");
        } else if (sharePhoto.LIZIZ != null || !C37072EhB.LIZIZ(sharePhoto.LIZJ)) {
            C37077EhG.LIZ();
            Context context = m.LJI;
            C37077EhG.LIZ((Object) context, "context");
            String LIZIZ = C37077EhG.LIZIZ();
            PackageManager packageManager = context.getPackageManager();
            if (packageManager != null) {
                String concat = "com.facebook.app.FacebookContentProvider".concat(String.valueOf(LIZIZ));
                if (packageManager.resolveContentProvider(concat, 0) == null) {
                    throw new IllegalStateException(AnonymousClass0EJ.LIZ("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.", new Object[]{concat}));
                }
            }
        }
    }

    public void LIZ(ShareStoryContent shareStoryContent) {
        C37191Ej6.LIZ(shareStoryContent, this);
    }

    public void LIZ(ShareVideoContent shareVideoContent) {
        C37191Ej6.LIZ(shareVideoContent.LIZLLL);
        SharePhoto sharePhoto = shareVideoContent.LIZJ;
        if (sharePhoto != null) {
            LIZ(sharePhoto);
        }
    }
}