alexandroid/decompiled/jadx/sources/com/google/android/gms/auth/CookieUtil.java
KaKi87 a47fad5135 📦 Add decompiled Alexa 2.2.730155.0 (jadx, apktool, Hermes strings)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-07 00:04:16 +01:00

64 lines
2 KiB
Java

package com.google.android.gms.auth;
import android.text.TextUtils;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.google.android.gms.common.internal.Preconditions;
import defpackage.a$$ExternalSyntheticOutline0;
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
/* loaded from: classes7.dex */
public final class CookieUtil {
private CookieUtil() {
}
@NonNull
public static String getCookieUrl(@NonNull String str, @Nullable Boolean bool) {
Preconditions.checkNotEmpty(str);
return a$$ExternalSyntheticOutline0.m$1(true != zza(bool) ? "http" : "https", "://", str);
}
@NonNull
public static String getCookieValue(@Nullable String str, @Nullable String str2, @Nullable String str3, @Nullable String str4, @Nullable Boolean bool, @Nullable Boolean bool2, @Nullable Long l) {
if (str == null) {
str = "";
}
StringBuilder sb = new StringBuilder(str);
sb.append('=');
if (!TextUtils.isEmpty(str2)) {
sb.append(str2);
}
if (zza(bool)) {
sb.append(";HttpOnly");
}
if (zza(bool2)) {
sb.append(";Secure");
}
if (!TextUtils.isEmpty(str3)) {
sb.append(";Domain=");
sb.append(str3);
}
if (!TextUtils.isEmpty(str4)) {
sb.append(";Path=");
sb.append(str4);
}
if (l != null && l.longValue() > 0) {
sb.append(";Max-Age=");
sb.append(l);
}
if (!TextUtils.isEmpty(null)) {
sb.append(";Priority=null");
}
if (!TextUtils.isEmpty(null)) {
sb.append(";SameSite=null");
}
if (zza(null)) {
sb.append(";SameParty");
}
return sb.toString();
}
private static boolean zza(@Nullable Boolean bool) {
return bool != null && bool.booleanValue();
}
}