Files
rr3-apk/decompiled/sources/com/google/android/gms/auth/CookieUtil.java
Daniel Elliott f9d20bb3fc Add decompiled APK source code (JADX)
- 28,932 files
- Full Java source code
- Smali files
- Resources

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-18 14:52:23 -08:00

64 lines
1.8 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 com.ironsource.nb;
/* loaded from: classes2.dex */
public final class CookieUtil {
private CookieUtil() {
}
@NonNull
public static String getCookieUrl(@NonNull String str, @Nullable Boolean bool) {
Preconditions.checkNotEmpty(str);
return (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(nb.T);
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();
}
}