granularity level: instruction

		.class public Lcom/google/firebase/messaging/MessagingAnalytics;
.super Ljava/lang/Object;
.source "MessagingAnalytics.java"


.field private static final DELIVERY_METRICS_EXPORT_TO_BIG_QUERY_PREF:Ljava/lang/String; = "export_to_big_query"
.field private static final FCM_PREFERENCES:Ljava/lang/String; = "com.google.firebase.messaging"
.field private static final MANIFEST_DELIVERY_METRICS_EXPORT_TO_BIG_QUERY_ENABLED:Ljava/lang/String; = "delivery_metrics_exported_to_big_query_enabled"
.field private static final REENGAGEMENT_MEDIUM:Ljava/lang/String; = "notification"
.field private static final REENGAGEMENT_SOURCE:Ljava/lang/String; = "Firebase"


.method public constructor <init>()V
	.locals 0

	invoke-direct/range {p0 .. p0}, Ljava/lang/Object;-><init>()V
	return-void
.end method

.method static deliveryMetricsExportToBigQueryEnabled()Z
	.locals 6

	const-string v0, "delivery_metrics_exported_to_big_query_enabled"
	const/4 v1, 0x0
	invoke-static {}, Lcom/google/firebase/FirebaseApp;->getInstance()Lcom/google/firebase/FirebaseApp;
	invoke-static {}, Lcom/google/firebase/FirebaseApp;->getInstance()Lcom/google/firebase/FirebaseApp;
	move-result-object v2
	invoke-virtual {v2}, Lcom/google/firebase/FirebaseApp;->getApplicationContext()Landroid/content/Context;
	move-result-object v2
	const-string v3, "com.google.firebase.messaging"
	invoke-virtual {v2, v3, v1}, Landroid/content/Context;->getSharedPreferences(Ljava/lang/String;I)Landroid/content/SharedPreferences;
	move-result-object v3
	const-string v4, "export_to_big_query"
	invoke-interface {v3, v4}, Landroid/content/SharedPreferences;->contains(Ljava/lang/String;)Z
	move-result v5
	:try_start_1
	invoke-virtual {v2}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;
	move-result-object v3
	if-eqz v3, :cond_1
	invoke-virtual {v2}, Landroid/content/Context;->getPackageName()Ljava/lang/String;
	move-result-object v2
	const/16 v4, 0x80
	invoke-virtual {v3, v2, v4}, Landroid/content/pm/PackageManager;->getApplicationInfo(Ljava/lang/String;I)Landroid/content/pm/ApplicationInfo;
	move-result-object v2
	if-eqz v2, :cond_1
	iget-object v3, v2, Landroid/content/pm/ApplicationInfo;->metaData:Landroid/os/Bundle;
	if-eqz v3, :cond_1
	iget-object v3, v2, Landroid/content/pm/ApplicationInfo;->metaData:Landroid/os/Bundle;
	invoke-virtual {v3, v0}, Landroid/os/Bundle;->containsKey(Ljava/lang/String;)Z
	move-result v3
	goto/32 :cond_1
	:try_end_1
	.catch Landroid/content/pm/PackageManager$NameNotFoundException; {:try_start_1 .. :try_end_1} :catch_0
	return v0
	:cond_1
	:catch_0
	return v1
.end method

.method static eventToProto(Lcom/google/firebase/messaging/reporting/MessagingClientEvent$Event;Landroid/content/Intent;)Lcom/google/firebase/messaging/reporting/MessagingClientEvent;
	.locals 4

	const/4 v0, 0x0
	return-object v0
.end method

.method static getCollapseKey(Landroid/os/Bundle;)Ljava/lang/String;
	.locals 1

	const/4 v0, 0x0
	return-object v0
.end method

.method static getComposerId(Landroid/os/Bundle;)Ljava/lang/String;
	.locals 1

	const-string v0, "google.c.a.c_id"
	invoke-virtual {p0, v0}, Landroid/os/Bundle;->getString(Ljava/lang/String;)Ljava/lang/String;
	move-result-object p0
	return-object p0
.end method

.method static getComposerLabel(Landroid/os/Bundle;)Ljava/lang/String;
	.locals 1

	const-string v0, "google.c.a.c_l"
	invoke-virtual {p0, v0}, Landroid/os/Bundle;->getString(Ljava/lang/String;)Ljava/lang/String;
	move-result-object p0
	return-object p0
.end method

.method static getInstanceId(Landroid/os/Bundle;)Ljava/lang/String;
	.locals 1

	const/4 v0, 0x0
	return-object v0
.end method

.method static getMessageChannel(Landroid/os/Bundle;)Ljava/lang/String;
	.locals 1

	const-string v0, "google.c.a.m_c"
	invoke-virtual {p0, v0}, Landroid/os/Bundle;->getString(Ljava/lang/String;)Ljava/lang/String;
	move-result-object p0
	return-object p0
.end method

.method static getMessageId(Landroid/os/Bundle;)Ljava/lang/String;
	.locals 1

	const/4 v0, 0x0
	return-object v0
.end method

.method static getMessageLabel(Landroid/os/Bundle;)Ljava/lang/String;
	.locals 1

	const-string v0, "google.c.a.m_l"
	invoke-virtual {p0, v0}, Landroid/os/Bundle;->getString(Ljava/lang/String;)Ljava/lang/String;
	move-result-object p0
	return-object p0
.end method

.method private static getMessagePriority(Ljava/lang/String;)I
	.locals 1

	const/4 v0, 0x0
	return v0
.end method

.method static getMessagePriorityForFirelog(Landroid/os/Bundle;)I
	.locals 1

	const/4 v0, 0x0
	return v0
.end method

.method static getMessageTime(Landroid/os/Bundle;)Ljava/lang/String;
	.locals 1

	const-string v0, "google.c.a.ts"
	invoke-virtual {p0, v0}, Landroid/os/Bundle;->getString(Ljava/lang/String;)Ljava/lang/String;
	move-result-object p0
	return-object p0
.end method

.method static getMessageTypeForFirelog(Landroid/os/Bundle;)Lcom/google/firebase/messaging/reporting/MessagingClientEvent$MessageType;
	.locals 0

	const/4 v0, 0x0
	return-object v0
.end method

.method static getMessageTypeForScion(Landroid/os/Bundle;)Ljava/lang/String;
	.locals 0

	if-eqz p0, :cond_0
	invoke-static {p0}, Lcom/google/firebase/messaging/NotificationParams;->isNotification(Landroid/os/Bundle;)Z
	move-result p0
	if-eqz p0, :cond_0
	const-string p0, "display"
	goto :goto_0
	:cond_0
	const-string p0, "data"
	:goto_0
	return-object p0
.end method

.method static getPackageName()Ljava/lang/String;
	.locals 1

	const/4 v0, 0x0
	return-object v0
.end method

.method static getPriority(Landroid/os/Bundle;)I
	.locals 2

	const/4 v0, 0x0
	return v0
.end method

.method static getProjectNumber(Landroid/os/Bundle;)J
	.locals 6

	const-wide v0, 0x0
	return-wide v0
.end method

.method static getTopic(Landroid/os/Bundle;)Ljava/lang/String;
	.locals 1

	const-string v0, "from"
	invoke-virtual {p0, v0}, Landroid/os/Bundle;->getString(Ljava/lang/String;)Ljava/lang/String;
	move-result-object p0
	if-eqz p0, :cond_0
	const-string v0, "/topics/"
	invoke-virtual {p0, v0}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z
	move-result v0
	if-eqz v0, :cond_0
	goto :goto_0
	:cond_0
	const/4 p0, 0x0
	:goto_0
	return-object p0
.end method

.method static getTtl(Landroid/os/Bundle;)I
	.locals 2

	const/4 v0, 0x0
	return v0
.end method

.method static getUseDeviceTime(Landroid/os/Bundle;)Ljava/lang/String;
	.locals 2

	const-string v0, "google.c.a.udt"
	invoke-virtual {p0, v0}, Landroid/os/Bundle;->containsKey(Ljava/lang/String;)Z
	move-result v1
	invoke-virtual {p0, v0}, Landroid/os/Bundle;->getString(Ljava/lang/String;)Ljava/lang/String;
	move-result-object p0
	return-object p0
.end method

.method private static isDirectBootMessage(Landroid/content/Intent;)Z
	.locals 1

	invoke-virtual {p0}, Landroid/content/Intent;->getAction()Ljava/lang/String;
	move-result-object p0
	const-string v0, "com.google.firebase.messaging.RECEIVE_DIRECT_BOOT"
	invoke-virtual {v0, p0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
	move-result p0
	return p0
.end method

.method public static logNotificationDismiss(Landroid/content/Intent;)V
	.locals 1

	invoke-virtual {p0}, Landroid/content/Intent;->getExtras()Landroid/os/Bundle;
	move-result-object p0
	const-string v0, "_nd"
	invoke-static {v0, p0}, Lcom/google/firebase/messaging/MessagingAnalytics;->logToScion(Ljava/lang/String;Landroid/os/Bundle;)V
	return-void
.end method

.method public static logNotificationForeground(Landroid/content/Intent;)V
	.locals 1

	invoke-virtual {p0}, Landroid/content/Intent;->getExtras()Landroid/os/Bundle;
	move-result-object p0
	const-string v0, "_nf"
	invoke-static {v0, p0}, Lcom/google/firebase/messaging/MessagingAnalytics;->logToScion(Ljava/lang/String;Landroid/os/Bundle;)V
	return-void
.end method

.method public static logNotificationOpen(Landroid/os/Bundle;)V
	.locals 1

	invoke-static {p0}, Lcom/google/firebase/messaging/MessagingAnalytics;->setUserPropertyIfRequired(Landroid/os/Bundle;)V
	const-string v0, "_no"
	invoke-static {v0, p0}, Lcom/google/firebase/messaging/MessagingAnalytics;->logToScion(Ljava/lang/String;Landroid/os/Bundle;)V
	return-void
.end method

.method public static logNotificationReceived(Landroid/content/Intent;)V
	.locals 2

	invoke-static {p0}, Lcom/google/firebase/messaging/MessagingAnalytics;->shouldUploadScionMetrics(Landroid/content/Intent;)Z
	move-result v0
	if-eqz v0, :cond_0
	invoke-virtual {p0}, Landroid/content/Intent;->getExtras()Landroid/os/Bundle;
	move-result-object v0
	const-string v1, "_nr"
	invoke-static {v1, v0}, Lcom/google/firebase/messaging/MessagingAnalytics;->logToScion(Ljava/lang/String;Landroid/os/Bundle;)V
	:cond_0
	invoke-static {p0}, Lcom/google/firebase/messaging/MessagingAnalytics;->shouldUploadFirelogAnalytics(Landroid/content/Intent;)Z
	move-result v0
	return-void
.end method

.method private static logToFirelog(Lcom/google/firebase/messaging/reporting/MessagingClientEvent$Event;Landroid/content/Intent;Lcom/google/android/datatransport/TransportFactory;)V
	.locals 4

	return-void
.end method

.method static logToScion(Ljava/lang/String;Landroid/os/Bundle;)V
	.locals 4

	const-string v0, "FirebaseMessaging"
	invoke-static {}, Lcom/google/firebase/FirebaseApp;->getInstance()Lcom/google/firebase/FirebaseApp;
	new-instance v1, Landroid/os/Bundle;
	invoke-direct {v1}, Landroid/os/Bundle;-><init>()V
	invoke-static {p1}, Lcom/google/firebase/messaging/MessagingAnalytics;->getComposerId(Landroid/os/Bundle;)Ljava/lang/String;
	move-result-object v2
	if-eqz v2, :cond_1
	const-string v3, "_nmid"
	invoke-virtual {v1, v3, v2}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V
	:cond_1
	invoke-static {p1}, Lcom/google/firebase/messaging/MessagingAnalytics;->getComposerLabel(Landroid/os/Bundle;)Ljava/lang/String;
	move-result-object v2
	if-eqz v2, :cond_2
	const-string v3, "_nmn"
	invoke-virtual {v1, v3, v2}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V
	:cond_2
	invoke-static {p1}, Lcom/google/firebase/messaging/MessagingAnalytics;->getMessageLabel(Landroid/os/Bundle;)Ljava/lang/String;
	move-result-object v2
	invoke-static {v2}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
	move-result v3
	invoke-static {p1}, Lcom/google/firebase/messaging/MessagingAnalytics;->getMessageChannel(Landroid/os/Bundle;)Ljava/lang/String;
	move-result-object v2
	invoke-static {v2}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
	move-result v3
	invoke-static {p1}, Lcom/google/firebase/messaging/MessagingAnalytics;->getTopic(Landroid/os/Bundle;)Ljava/lang/String;
	move-result-object v2
	if-eqz v2, :cond_5
	const-string v3, "_nt"
	invoke-virtual {v1, v3, v2}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V
	:cond_5
	invoke-static {p1}, Lcom/google/firebase/messaging/MessagingAnalytics;->getMessageTime(Landroid/os/Bundle;)Ljava/lang/String;
	move-result-object v2
	if-eqz v2, :cond_6
	const-string v3, "_nmt"
	invoke-static {v2}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I
	move-result v2
	invoke-virtual {v1, v3, v2}, Landroid/os/Bundle;->putInt(Ljava/lang/String;I)V
	:cond_6
	invoke-static {p1}, Lcom/google/firebase/messaging/MessagingAnalytics;->getUseDeviceTime(Landroid/os/Bundle;)Ljava/lang/String;
	move-result-object v2
	if-eqz v2, :cond_7
	const-string v3, "_ndt"
	invoke-static {v2}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I
	move-result v2
	invoke-virtual {v1, v3, v2}, Landroid/os/Bundle;->putInt(Ljava/lang/String;I)V
	:cond_7
	invoke-static {p1}, Lcom/google/firebase/messaging/MessagingAnalytics;->getMessageTypeForScion(Landroid/os/Bundle;)Ljava/lang/String;
	move-result-object p1
	const-string v2, "_nr"
	invoke-virtual {v2, p0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
	move-result v2
	if-nez v2, :cond_8
	const-string v2, "_nf"
	invoke-virtual {v2, p0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
	move-result v2
	if-eqz v2, :cond_9
	:cond_8
	const-string v2, "_nmc"
	invoke-virtual {v1, v2, p1}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V
	:cond_9
	const/4 p1, 0x3
	invoke-static {v0, p1}, Landroid/util/Log;->isLoggable(Ljava/lang/String;I)Z
	move-result p1
	invoke-static {}, Lcom/google/firebase/FirebaseApp;->getInstance()Lcom/google/firebase/FirebaseApp;
	move-result-object p1
	const-class v2, Lcom/google/firebase/analytics/connector/AnalyticsConnector;
	invoke-virtual {p1, v2}, Lcom/google/firebase/FirebaseApp;->get(Ljava/lang/Class;)Ljava/lang/Object;
	move-result-object p1
	check-cast p1, Lcom/google/firebase/analytics/connector/AnalyticsConnector;
	const-string p0, "Unable to log event: analytics library is missing"
	invoke-static {v0, p0}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I
	:goto_2
	return-void
.end method

.method static setDeliveryMetricsExportToBigQuery(Z)V
	.locals 3

	return-void
.end method

.method private static setUserPropertyIfRequired(Landroid/os/Bundle;)V
	.locals 5

	const-string v0, "google.c.a.tc"
	invoke-virtual {p0, v0}, Landroid/os/Bundle;->getString(Ljava/lang/String;)Ljava/lang/String;
	move-result-object v0
	const-string v1, "1"
	invoke-virtual {v1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
	move-result v0
	const/4 v1, 0x3
	const-string v2, "FirebaseMessaging"
	invoke-static {v2, v1}, Landroid/util/Log;->isLoggable(Ljava/lang/String;I)Z
	move-result p0
	:goto_0
	return-void
.end method

.method public static shouldUploadFirelogAnalytics(Landroid/content/Intent;)Z
	.locals 0

	invoke-static {p0}, Lcom/google/firebase/messaging/MessagingAnalytics;->isDirectBootMessage(Landroid/content/Intent;)Z
	move-result p0
	invoke-static {}, Lcom/google/firebase/messaging/MessagingAnalytics;->deliveryMetricsExportToBigQueryEnabled()Z
	move-result p0
	return p0
.end method

.method public static shouldUploadScionMetrics(Landroid/content/Intent;)Z
	.locals 1

	invoke-static {p0}, Lcom/google/firebase/messaging/MessagingAnalytics;->isDirectBootMessage(Landroid/content/Intent;)Z
	move-result v0
	invoke-virtual {p0}, Landroid/content/Intent;->getExtras()Landroid/os/Bundle;
	move-result-object p0
	invoke-static {p0}, Lcom/google/firebase/messaging/MessagingAnalytics;->shouldUploadScionMetrics(Landroid/os/Bundle;)Z
	move-result p0
	return p0
.end method

.method public static shouldUploadScionMetrics(Landroid/os/Bundle;)Z
	.locals 1

	if-nez p0, :cond_0
	const/4 p0, 0x0
	return p0
	:cond_0
	const-string v0, "google.c.a.e"
	invoke-virtual {p0, v0}, Landroid/os/Bundle;->getString(Ljava/lang/String;)Ljava/lang/String;
	move-result-object p0
	const-string v0, "1"
	invoke-virtual {v0, p0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
	move-result p0
	return p0
.end method