Files
rr3-apk/decompiled-community/sources/com/facebook/ads/ExtraHints.java
Daniel Elliott c080f0d97f Add Discord community version (64-bit only)
- 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
2026-02-18 15:48:36 -08:00

176 lines
4.9 KiB
Java

package com.facebook.ads;
import android.text.TextUtils;
import androidx.annotation.Keep;
import androidx.annotation.Nullable;
import com.facebook.share.internal.ShareConstants;
import csdk.gluads.Consts;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import org.json.JSONException;
import org.json.JSONObject;
@Keep
@Deprecated
/* loaded from: classes2.dex */
public class ExtraHints {
private static final String HINTS_JSON_KEY = "hints";
private static final int KEYWORDS_MAX_COUNT = 5;
private static final String KEYWORD_SEPARATOR = ";";
private final String mHintsSerialized;
@Nullable
private final String mMediationData;
public String getHints() {
return this.mHintsSerialized;
}
@Nullable
public String getMediationData() {
return this.mMediationData;
}
private ExtraHints(HashMap<HintType, String> hashMap, @Nullable String str) {
this.mMediationData = str;
JSONObject jSONObject = new JSONObject();
JSONObject jSONObject2 = new JSONObject();
for (Map.Entry<HintType, String> entry : hashMap.entrySet()) {
try {
jSONObject2.put(entry.getKey().mKey, entry.getValue());
} catch (JSONException unused) {
}
}
try {
jSONObject.put(HINTS_JSON_KEY, jSONObject2);
} catch (JSONException unused2) {
}
this.mHintsSerialized = jSONObject.toString();
}
public enum HintType {
KEYWORDS(Consts.EXTRA_KEYWORDS),
CONTENT_URL(ShareConstants.STORY_DEEP_LINK_URL),
EXTRA_DATA("extra_data");
private String mKey;
HintType(String str) {
this.mKey = str;
}
}
@Keep
@Deprecated
public enum Keyword {
ACCESSORIES("accessories"),
ART_HISTORY("art_history"),
AUTOMOTIVE("automotive"),
BEAUTY("beauty"),
BIOLOGY("biology"),
BOARD_GAMES("board_games"),
BUSINESS_SOFTWARE("business_software"),
BUYING_SELLING_HOMES("buying_selling_homes"),
CATS("cats"),
CELEBRITIES("celebrities"),
CLOTHING("clothing"),
COMIC_BOOKS("comic_books"),
DESKTOP_VIDEO("desktop_video"),
DOGS("dogs"),
EDUCATION("education"),
EMAIL("email"),
ENTERTAINMENT("entertainment"),
FAMILY_PARENTING("family_parenting"),
FASHION("fashion"),
FINE_ART("fine_art"),
FOOD_DRINK("food_drink"),
FRENCH_CUISINE("french_cuisine"),
GOVERNMENT("government"),
HEALTH_FITNESS("health_fitness"),
HOBBIES("hobbies"),
HOME_GARDEN("home_garden"),
HUMOR("humor"),
INTERNET_TECHNOLOGY("internet_technology"),
LARGE_ANIMALS("large_animals"),
LAW("law"),
LEGAL_ISSUES("legal_issues"),
LITERATURE("literature"),
MARKETING("marketing"),
MOVIES("movies"),
MUSIC("music"),
NEWS("news"),
PERSONAL_FINANCE("personal_finance"),
PETS("pets"),
PHOTOGRAPHY("photography"),
POLITICS("politics"),
REAL_ESTATE("real_estate"),
ROLEPLAYING_GAMES("roleplaying_games"),
SCIENCE("science"),
SHOPPING("shopping"),
SOCIETY("society"),
SPORTS("sports"),
TECHNOLOGY("technology"),
TELEVISION("television"),
TRAVEL("travel"),
VIDEO_COMPUTER_GAMES("video_computer_games");
private String mKeyword;
Keyword(String str) {
this.mKeyword = str;
}
}
@Keep
@Deprecated
public static class Builder {
private HashMap<HintType, String> mHints = new HashMap<>();
private String mMediationData;
@Deprecated
public Builder keywords(List<Keyword> list) {
return this;
}
public Builder extraData(String str) {
if (str == null) {
return this;
}
this.mHints.put(HintType.EXTRA_DATA, str);
return this;
}
public Builder contentUrl(String str) {
if (str == null) {
return this;
}
this.mHints.put(HintType.CONTENT_URL, str);
return this;
}
public Builder mediationData(String str) {
if (TextUtils.isEmpty(str)) {
return this;
}
this.mMediationData = str;
return this;
}
public ExtraHints build() {
return new ExtraHints(this.mHints, this.mMediationData);
}
}
private static String join(List<String> list) {
StringBuilder sb = new StringBuilder();
Iterator<String> it = list.iterator();
while (it.hasNext()) {
sb.append(it.next());
sb.append(KEYWORD_SEPARATOR);
}
return sb.toString();
}
}