- Added realracing3-community.apk (71.57 MB) - Removed 32-bit support (armeabi-v7a) - Only includes arm64-v8a libraries - Decompiled source code included - Added README-community.md with analysis
147 lines
7.6 KiB
Java
147 lines
7.6 KiB
Java
package com.facebook.share.internal;
|
|
|
|
import android.annotation.SuppressLint;
|
|
import android.os.Bundle;
|
|
import com.facebook.internal.Utility;
|
|
import com.facebook.share.model.AppGroupCreationContent;
|
|
import com.facebook.share.model.GameRequestContent;
|
|
import com.facebook.share.model.ShareContent;
|
|
import com.facebook.share.model.ShareHashtag;
|
|
import com.facebook.share.model.ShareLinkContent;
|
|
import com.facebook.share.model.SharePhoto;
|
|
import com.facebook.share.model.SharePhotoContent;
|
|
import java.util.ArrayList;
|
|
import java.util.Iterator;
|
|
import java.util.List;
|
|
import java.util.Locale;
|
|
import kotlin.collections.CollectionsKt__CollectionsKt;
|
|
import kotlin.collections.CollectionsKt__IterablesKt;
|
|
import kotlin.jvm.internal.Intrinsics;
|
|
|
|
/* loaded from: classes2.dex */
|
|
public final class WebDialogParameters {
|
|
public static final WebDialogParameters INSTANCE = new WebDialogParameters();
|
|
|
|
private WebDialogParameters() {
|
|
}
|
|
|
|
public static final Bundle create(AppGroupCreationContent appGroupCreationContent) {
|
|
String obj;
|
|
Intrinsics.checkNotNullParameter(appGroupCreationContent, "appGroupCreationContent");
|
|
Bundle bundle = new Bundle();
|
|
Utility utility = Utility.INSTANCE;
|
|
Utility.putNonEmptyString(bundle, "name", appGroupCreationContent.getName());
|
|
Utility.putNonEmptyString(bundle, "description", appGroupCreationContent.getDescription());
|
|
AppGroupCreationContent.AppGroupPrivacy appGroupPrivacy = appGroupCreationContent.getAppGroupPrivacy();
|
|
String str = null;
|
|
if (appGroupPrivacy != null && (obj = appGroupPrivacy.toString()) != null) {
|
|
Locale ENGLISH = Locale.ENGLISH;
|
|
Intrinsics.checkNotNullExpressionValue(ENGLISH, "ENGLISH");
|
|
str = obj.toLowerCase(ENGLISH);
|
|
Intrinsics.checkNotNullExpressionValue(str, "(this as java.lang.String).toLowerCase(locale)");
|
|
}
|
|
Utility.putNonEmptyString(bundle, ShareConstants.WEB_DIALOG_PARAM_PRIVACY, str);
|
|
return bundle;
|
|
}
|
|
|
|
public static final Bundle create(GameRequestContent gameRequestContent) {
|
|
String obj;
|
|
String lowerCase;
|
|
String obj2;
|
|
Intrinsics.checkNotNullParameter(gameRequestContent, "gameRequestContent");
|
|
Bundle bundle = new Bundle();
|
|
Utility utility = Utility.INSTANCE;
|
|
Utility.putNonEmptyString(bundle, "message", gameRequestContent.getMessage());
|
|
Utility.putCommaSeparatedStringList(bundle, "to", gameRequestContent.getRecipients());
|
|
Utility.putNonEmptyString(bundle, "title", gameRequestContent.getTitle());
|
|
Utility.putNonEmptyString(bundle, "data", gameRequestContent.getData());
|
|
GameRequestContent.ActionType actionType = gameRequestContent.getActionType();
|
|
String str = null;
|
|
if (actionType == null || (obj = actionType.toString()) == null) {
|
|
lowerCase = null;
|
|
} else {
|
|
Locale ENGLISH = Locale.ENGLISH;
|
|
Intrinsics.checkNotNullExpressionValue(ENGLISH, "ENGLISH");
|
|
lowerCase = obj.toLowerCase(ENGLISH);
|
|
Intrinsics.checkNotNullExpressionValue(lowerCase, "(this as java.lang.String).toLowerCase(locale)");
|
|
}
|
|
Utility.putNonEmptyString(bundle, ShareConstants.WEB_DIALOG_PARAM_ACTION_TYPE, lowerCase);
|
|
Utility.putNonEmptyString(bundle, "object_id", gameRequestContent.getObjectId());
|
|
GameRequestContent.Filters filters = gameRequestContent.getFilters();
|
|
if (filters != null && (obj2 = filters.toString()) != null) {
|
|
Locale ENGLISH2 = Locale.ENGLISH;
|
|
Intrinsics.checkNotNullExpressionValue(ENGLISH2, "ENGLISH");
|
|
str = obj2.toLowerCase(ENGLISH2);
|
|
Intrinsics.checkNotNullExpressionValue(str, "(this as java.lang.String).toLowerCase(locale)");
|
|
}
|
|
Utility.putNonEmptyString(bundle, "filters", str);
|
|
Utility.putCommaSeparatedStringList(bundle, ShareConstants.WEB_DIALOG_PARAM_SUGGESTIONS, gameRequestContent.getSuggestions());
|
|
return bundle;
|
|
}
|
|
|
|
public static final Bundle create(ShareLinkContent shareLinkContent) {
|
|
Intrinsics.checkNotNullParameter(shareLinkContent, "shareLinkContent");
|
|
Bundle createBaseParameters = createBaseParameters(shareLinkContent);
|
|
Utility utility = Utility.INSTANCE;
|
|
Utility.putUri(createBaseParameters, ShareConstants.WEB_DIALOG_PARAM_HREF, shareLinkContent.getContentUrl());
|
|
Utility.putNonEmptyString(createBaseParameters, ShareConstants.WEB_DIALOG_PARAM_QUOTE, shareLinkContent.getQuote());
|
|
return createBaseParameters;
|
|
}
|
|
|
|
public static final Bundle create(SharePhotoContent sharePhotoContent) {
|
|
Intrinsics.checkNotNullParameter(sharePhotoContent, "sharePhotoContent");
|
|
Bundle createBaseParameters = createBaseParameters(sharePhotoContent);
|
|
List<SharePhoto> photos = sharePhotoContent.getPhotos();
|
|
if (photos == null) {
|
|
photos = CollectionsKt__CollectionsKt.emptyList();
|
|
}
|
|
List<SharePhoto> list = photos;
|
|
ArrayList arrayList = new ArrayList(CollectionsKt__IterablesKt.collectionSizeOrDefault(list, 10));
|
|
Iterator<T> it = list.iterator();
|
|
while (it.hasNext()) {
|
|
arrayList.add(String.valueOf(((SharePhoto) it.next()).getImageUrl()));
|
|
}
|
|
Object[] array = arrayList.toArray(new String[0]);
|
|
if (array == null) {
|
|
throw new NullPointerException("null cannot be cast to non-null type kotlin.Array<T>");
|
|
}
|
|
createBaseParameters.putStringArray("media", (String[]) array);
|
|
return createBaseParameters;
|
|
}
|
|
|
|
public static final Bundle createBaseParameters(ShareContent<?, ?> shareContent) {
|
|
Intrinsics.checkNotNullParameter(shareContent, "shareContent");
|
|
Bundle bundle = new Bundle();
|
|
Utility utility = Utility.INSTANCE;
|
|
ShareHashtag shareHashtag = shareContent.getShareHashtag();
|
|
Utility.putNonEmptyString(bundle, ShareConstants.WEB_DIALOG_PARAM_HASHTAG, shareHashtag == null ? null : shareHashtag.getHashtag());
|
|
return bundle;
|
|
}
|
|
|
|
@SuppressLint({"DeprecatedMethod"})
|
|
public static final Bundle createForFeed(ShareLinkContent shareLinkContent) {
|
|
Intrinsics.checkNotNullParameter(shareLinkContent, "shareLinkContent");
|
|
Bundle bundle = new Bundle();
|
|
Utility utility = Utility.INSTANCE;
|
|
Utility.putNonEmptyString(bundle, "link", Utility.getUriString(shareLinkContent.getContentUrl()));
|
|
Utility.putNonEmptyString(bundle, ShareConstants.WEB_DIALOG_PARAM_QUOTE, shareLinkContent.getQuote());
|
|
ShareHashtag shareHashtag = shareLinkContent.getShareHashtag();
|
|
Utility.putNonEmptyString(bundle, ShareConstants.WEB_DIALOG_PARAM_HASHTAG, shareHashtag == null ? null : shareHashtag.getHashtag());
|
|
return bundle;
|
|
}
|
|
|
|
public static final Bundle createForFeed(ShareFeedContent shareFeedContent) {
|
|
Intrinsics.checkNotNullParameter(shareFeedContent, "shareFeedContent");
|
|
Bundle bundle = new Bundle();
|
|
Utility utility = Utility.INSTANCE;
|
|
Utility.putNonEmptyString(bundle, "to", shareFeedContent.getToId());
|
|
Utility.putNonEmptyString(bundle, "link", shareFeedContent.getLink());
|
|
Utility.putNonEmptyString(bundle, "picture", shareFeedContent.getPicture());
|
|
Utility.putNonEmptyString(bundle, ShareConstants.FEED_SOURCE_PARAM, shareFeedContent.getMediaSource());
|
|
Utility.putNonEmptyString(bundle, "name", shareFeedContent.getLinkName());
|
|
Utility.putNonEmptyString(bundle, ShareConstants.FEED_CAPTION_PARAM, shareFeedContent.getLinkCaption());
|
|
Utility.putNonEmptyString(bundle, "description", shareFeedContent.getLinkDescription());
|
|
return bundle;
|
|
}
|
|
}
|