31 lines
1.4 KiB
Java
31 lines
1.4 KiB
Java
package com.discord.utilities.analytics;
|
|
|
|
import com.discord.api.activity.Activity;
|
|
import com.discord.utilities.collections.CollectionExtensionsKt;
|
|
import com.discord.utilities.presence.ActivityUtilsKt;
|
|
import d0.o;
|
|
import d0.t.h0;
|
|
import j0.k.b;
|
|
import java.util.Map;
|
|
import kotlin.Pair;
|
|
/* compiled from: AnalyticsTracker.kt */
|
|
public final class AnalyticsTracker$getGameProperties$2<T, R> implements b<Activity, Map<String, Object>> {
|
|
public static final AnalyticsTracker$getGameProperties$2 INSTANCE = new AnalyticsTracker$getGameProperties$2();
|
|
|
|
/* JADX DEBUG: Can't convert new array creation: APUT found in different block: 0x0013: APUT
|
|
(r0v1 kotlin.Pair[])
|
|
(0 ??[int, short, byte, char])
|
|
(wrap: kotlin.Pair : 0x000e: INVOKE (r2v1 kotlin.Pair) = ("game_platform"), (r2v0 com.discord.api.activity.ActivityPlatform) type: STATIC call: d0.o.to(java.lang.Object, java.lang.Object):kotlin.Pair)
|
|
*/
|
|
public final Map<String, Object> call(Activity activity) {
|
|
Pair[] pairArr = new Pair[3];
|
|
Long l = null;
|
|
pairArr[0] = o.to("game_platform", activity != null ? ActivityUtilsKt.getGamePlatform(activity) : null);
|
|
pairArr[1] = o.to("game_name", activity != null ? activity.h() : null);
|
|
if (activity != null) {
|
|
l = activity.a();
|
|
}
|
|
pairArr[2] = o.to("game_id", l);
|
|
return CollectionExtensionsKt.filterNonNullValues(h0.mapOf(pairArr));
|
|
}
|
|
}
|