granularity level: instruction

		.class public final Lcom/google/android/datatransport/cct/CCTDestination;
.super Ljava/lang/Object;
.source "CCTDestination.java"
.implements Lcom/google/android/datatransport/runtime/EncodedDestination;


.field private static final DEFAULT_API_KEY:Ljava/lang/String;
.field static final DEFAULT_END_POINT:Ljava/lang/String;
.field static final DESTINATION_NAME:Ljava/lang/String; = "cct"
.field private static final EXTRAS_DELIMITER:Ljava/lang/String; = "\\"
.field private static final EXTRAS_VERSION_MARKER:Ljava/lang/String; = "1$"
.field public static final INSTANCE:Lcom/google/android/datatransport/cct/CCTDestination;
.field static final LEGACY_END_POINT:Ljava/lang/String;
.field public static final LEGACY_INSTANCE:Lcom/google/android/datatransport/cct/CCTDestination;
.field private static final SUPPORTED_ENCODINGS:Ljava/util/Set;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/Set<",
"Lcom/google/android/datatransport/Encoding;",
">;"
}
.end annotation
.end field
.field private final apiKey:Ljava/lang/String;
.field private final endPoint:Ljava/lang/String;


.method static constructor <clinit>()V
	.locals 7

	const-string v0, "hts/frbslgiggolai.o/0clgbthfra=snpoo"
	const-string v1, "tp:/ieaeogn.ogepscmvc/o/ac?omtjo_rt3"
	invoke-static {v0, v1}, Lcom/google/android/datatransport/cct/StringMerger;->mergeStrings(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
	move-result-object v0
	sput-object v0, Lcom/google/android/datatransport/cct/CCTDestination;->DEFAULT_END_POINT:Ljava/lang/String;
	const-string v1, "hts/frbslgigp.ogepscmv/ieo/eaybtho"
	const-string v2, "tp:/ieaeogn-agolai.o/1frlglgc/aclg"
	invoke-static {v1, v2}, Lcom/google/android/datatransport/cct/StringMerger;->mergeStrings(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
	move-result-object v1
	sput-object v1, Lcom/google/android/datatransport/cct/CCTDestination;->LEGACY_END_POINT:Ljava/lang/String;
	const-string v2, "AzSCki82AwsLzKd5O8zo"
	const-string v3, "IayckHiZRO1EFl1aGoK"
	invoke-static {v2, v3}, Lcom/google/android/datatransport/cct/StringMerger;->mergeStrings(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
	move-result-object v2
	sput-object v2, Lcom/google/android/datatransport/cct/CCTDestination;->DEFAULT_API_KEY:Ljava/lang/String;
	new-instance v3, Ljava/util/HashSet;
	const/4 v4, 0x2
	new-array v4, v4, [Lcom/google/android/datatransport/Encoding;
	const-string v5, "proto"
	invoke-static {v5}, Lcom/google/android/datatransport/Encoding;->of(Ljava/lang/String;)Lcom/google/android/datatransport/Encoding;
	move-result-object v5
	const/4 v6, 0x0
	aput-object v5, v4, v6
	const-string v5, "json"
	invoke-static {v5}, Lcom/google/android/datatransport/Encoding;->of(Ljava/lang/String;)Lcom/google/android/datatransport/Encoding;
	move-result-object v5
	const/4 v6, 0x1
	aput-object v5, v4, v6
	invoke-static {v4}, Ljava/util/Arrays;->asList([Ljava/lang/Object;)Ljava/util/List;
	move-result-object v4
	invoke-direct {v3, v4}, Ljava/util/HashSet;-><init>(Ljava/util/Collection;)V
	invoke-static {v3}, Ljava/util/Collections;->unmodifiableSet(Ljava/util/Set;)Ljava/util/Set;
	move-result-object v3
	sput-object v3, Lcom/google/android/datatransport/cct/CCTDestination;->SUPPORTED_ENCODINGS:Ljava/util/Set;
	new-instance v3, Lcom/google/android/datatransport/cct/CCTDestination;
	const/4 v4, 0x0
	invoke-direct {v3, v0, v4}, Lcom/google/android/datatransport/cct/CCTDestination;-><init>(Ljava/lang/String;Ljava/lang/String;)V
	sput-object v3, Lcom/google/android/datatransport/cct/CCTDestination;->INSTANCE:Lcom/google/android/datatransport/cct/CCTDestination;
	new-instance v0, Lcom/google/android/datatransport/cct/CCTDestination;
	invoke-direct {v0, v1, v2}, Lcom/google/android/datatransport/cct/CCTDestination;-><init>(Ljava/lang/String;Ljava/lang/String;)V
	sput-object v0, Lcom/google/android/datatransport/cct/CCTDestination;->LEGACY_INSTANCE:Lcom/google/android/datatransport/cct/CCTDestination;
	return-void
.end method

.method public constructor <init>(Ljava/lang/String;Ljava/lang/String;)V
	.locals 0

	invoke-direct {p0}, Ljava/lang/Object;-><init>()V
	iput-object p1, p0, Lcom/google/android/datatransport/cct/CCTDestination;->endPoint:Ljava/lang/String;
	iput-object p2, p0, Lcom/google/android/datatransport/cct/CCTDestination;->apiKey:Ljava/lang/String;
	return-void
.end method

.method static decodeExtras([B)Ljava/lang/String;
	.locals 2

	new-instance v0, Ljava/lang/String;
	const-string v1, "UTF-8"
	invoke-static {v1}, Ljava/nio/charset/Charset;->forName(Ljava/lang/String;)Ljava/nio/charset/Charset;
	move-result-object v1
	invoke-direct {v0, p0, v1}, Ljava/lang/String;-><init>([BLjava/nio/charset/Charset;)V
	return-object v0
.end method

.method static encodeString(Ljava/lang/String;)[B
	.locals 1

	const-string v0, "UTF-8"
	invoke-static {v0}, Ljava/nio/charset/Charset;->forName(Ljava/lang/String;)Ljava/nio/charset/Charset;
	move-result-object v0
	invoke-virtual {p0, v0}, Ljava/lang/String;->getBytes(Ljava/nio/charset/Charset;)[B
	move-result-object p0
	return-object p0
.end method

.method public static fromByteArray([B)Lcom/google/android/datatransport/cct/CCTDestination;
	.locals 3

	new-instance v0, Ljava/lang/String;
	const-string v1, "UTF-8"
	invoke-static {v1}, Ljava/nio/charset/Charset;->forName(Ljava/lang/String;)Ljava/nio/charset/Charset;
	move-result-object v1
	invoke-direct {v0, p0, v1}, Ljava/lang/String;-><init>([BLjava/nio/charset/Charset;)V
	const-string p0, "1$"
	invoke-virtual {v0, p0}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z
	move-result p0
	if-eqz p0, :cond_3
	const/4 p0, 0x2
	invoke-virtual {v0, p0}, Ljava/lang/String;->substring(I)Ljava/lang/String;
	move-result-object v0
	const-string v1, "\\"
	invoke-static {v1}, Ljava/util/regex/Pattern;->quote(Ljava/lang/String;)Ljava/lang/String;
	move-result-object v1
	invoke-virtual {v0, v1, p0}, Ljava/lang/String;->split(Ljava/lang/String;I)[Ljava/lang/String;
	move-result-object v0
	array-length v1, v0
	if-ne v1, p0, :cond_2
	const/4 p0, 0x0
	aget-object p0, v0, p0
	invoke-virtual {p0}, Ljava/lang/String;->isEmpty()Z
	move-result v1
	if-nez v1, :cond_1
	const/4 v1, 0x1
	aget-object v0, v0, v1
	new-instance v1, Lcom/google/android/datatransport/cct/CCTDestination;
	invoke-virtual {v0}, Ljava/lang/String;->isEmpty()Z
	move-result v2
	if-eqz v2, :cond_0
	const/4 v0, 0x0
	:cond_0
	invoke-direct {v1, p0, v0}, Lcom/google/android/datatransport/cct/CCTDestination;-><init>(Ljava/lang/String;Ljava/lang/String;)V
	return-object v1
	:cond_1
	new-instance p0, Ljava/lang/IllegalArgumentException;
	const-string v0, "Missing endpoint in CCTDestination extras"
	invoke-direct {p0, v0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
	throw p0
	:cond_2
	new-instance p0, Ljava/lang/IllegalArgumentException;
	const-string v0, "Extra is not a valid encoded LegacyFlgDestination"
	invoke-direct {p0, v0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
	throw p0
	:cond_3
	new-instance p0, Ljava/lang/IllegalArgumentException;
	const-string v0, "Version marker missing from extras"
	invoke-direct {p0, v0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
	throw p0
.end method

.method public asByteArray()[B
	.locals 4

	iget-object v0, p0, Lcom/google/android/datatransport/cct/CCTDestination;->apiKey:Ljava/lang/String;
	if-nez v0, :cond_0
	iget-object v1, p0, Lcom/google/android/datatransport/cct/CCTDestination;->endPoint:Ljava/lang/String;
	if-nez v1, :cond_0
	const/4 v0, 0x0
	return-object v0
	:cond_0
	const/4 v1, 0x4
	new-array v1, v1, [Ljava/lang/Object;
	const/4 v2, 0x0
	const-string v3, "1$"
	aput-object v3, v1, v2
	const/4 v2, 0x1
	iget-object v3, p0, Lcom/google/android/datatransport/cct/CCTDestination;->endPoint:Ljava/lang/String;
	aput-object v3, v1, v2
	const/4 v2, 0x2
	const-string v3, "\\"
	aput-object v3, v1, v2
	const/4 v2, 0x3
	if-nez v0, :cond_1
	const-string v0, ""
	:cond_1
	aput-object v0, v1, v2
	const-string v0, "%s%s%s%s"
	invoke-static {v0, v1}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
	move-result-object v0
	const-string v1, "UTF-8"
	invoke-static {v1}, Ljava/nio/charset/Charset;->forName(Ljava/lang/String;)Ljava/nio/charset/Charset;
	move-result-object v1
	invoke-virtual {v0, v1}, Ljava/lang/String;->getBytes(Ljava/nio/charset/Charset;)[B
	move-result-object v0
	return-object v0
.end method

.method public getAPIKey()Ljava/lang/String;
	.locals 1

	iget-object v0, p0, Lcom/google/android/datatransport/cct/CCTDestination;->apiKey:Ljava/lang/String;
	return-object v0
.end method

.method public getEndPoint()Ljava/lang/String;
	.locals 1

	iget-object v0, p0, Lcom/google/android/datatransport/cct/CCTDestination;->endPoint:Ljava/lang/String;
	return-object v0
.end method

.method public getExtras()[B
	.locals 1

	invoke-virtual {p0}, Lcom/google/android/datatransport/cct/CCTDestination;->asByteArray()[B
	move-result-object v0
	return-object v0
.end method

.method public getName()Ljava/lang/String;
	.locals 1

	const-string v0, "cct"
	return-object v0
.end method

.method public getSupportedEncodings()Ljava/util/Set;
	.locals 1
	.annotation system Ldalvik/annotation/Signature;
	value = {
	"()",
	"Ljava/util/Set<",
	"Lcom/google/android/datatransport/Encoding;",
	">;"
	}
	.end annotation

	sget-object v0, Lcom/google/android/datatransport/cct/CCTDestination;->SUPPORTED_ENCODINGS:Ljava/util/Set;
	return-object v0
.end method