alexandroid/decompiled/jadx/sources/com/google/firebase/FirebaseOptions.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

175 lines
6.8 KiB
Java

package com.google.firebase;
import android.content.Context;
import android.text.TextUtils;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.google.android.gms.common.annotation.KeepForSdk;
import com.google.android.gms.common.internal.Objects;
import com.google.android.gms.common.internal.Preconditions;
import com.google.android.gms.common.internal.StringResourceValueReader;
import com.google.android.gms.common.util.Strings;
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
/* loaded from: classes8.dex */
public final class FirebaseOptions {
private static final String API_KEY_RESOURCE_NAME = "google_api_key";
private static final String APP_ID_RESOURCE_NAME = "google_app_id";
private static final String DATABASE_URL_RESOURCE_NAME = "firebase_database_url";
private static final String GA_TRACKING_ID_RESOURCE_NAME = "ga_trackingId";
private static final String GCM_SENDER_ID_RESOURCE_NAME = "gcm_defaultSenderId";
private static final String PROJECT_ID_RESOURCE_NAME = "project_id";
private static final String STORAGE_BUCKET_RESOURCE_NAME = "google_storage_bucket";
private final String apiKey;
private final String applicationId;
private final String databaseUrl;
private final String gaTrackingId;
private final String gcmSenderId;
private final String projectId;
private final String storageBucket;
private FirebaseOptions(@NonNull String str, @NonNull String str2, @Nullable String str3, @Nullable String str4, @Nullable String str5, @Nullable String str6, @Nullable String str7) {
Preconditions.checkState(!Strings.isEmptyOrWhitespace(str), "ApplicationId must be set.");
this.applicationId = str;
this.apiKey = str2;
this.databaseUrl = str3;
this.gaTrackingId = str4;
this.gcmSenderId = str5;
this.storageBucket = str6;
this.projectId = str7;
}
@Nullable
public static FirebaseOptions fromResource(@NonNull Context context) {
StringResourceValueReader stringResourceValueReader = new StringResourceValueReader(context);
String string = stringResourceValueReader.getString(APP_ID_RESOURCE_NAME);
if (TextUtils.isEmpty(string)) {
return null;
}
return new FirebaseOptions(string, stringResourceValueReader.getString(API_KEY_RESOURCE_NAME), stringResourceValueReader.getString(DATABASE_URL_RESOURCE_NAME), stringResourceValueReader.getString(GA_TRACKING_ID_RESOURCE_NAME), stringResourceValueReader.getString(GCM_SENDER_ID_RESOURCE_NAME), stringResourceValueReader.getString(STORAGE_BUCKET_RESOURCE_NAME), stringResourceValueReader.getString(PROJECT_ID_RESOURCE_NAME));
}
public boolean equals(Object obj) {
if (!(obj instanceof FirebaseOptions)) {
return false;
}
FirebaseOptions firebaseOptions = (FirebaseOptions) obj;
return Objects.equal(this.applicationId, firebaseOptions.applicationId) && Objects.equal(this.apiKey, firebaseOptions.apiKey) && Objects.equal(this.databaseUrl, firebaseOptions.databaseUrl) && Objects.equal(this.gaTrackingId, firebaseOptions.gaTrackingId) && Objects.equal(this.gcmSenderId, firebaseOptions.gcmSenderId) && Objects.equal(this.storageBucket, firebaseOptions.storageBucket) && Objects.equal(this.projectId, firebaseOptions.projectId);
}
@NonNull
public String getApiKey() {
return this.apiKey;
}
@NonNull
public String getApplicationId() {
return this.applicationId;
}
@Nullable
public String getDatabaseUrl() {
return this.databaseUrl;
}
@Nullable
@KeepForSdk
public String getGaTrackingId() {
return this.gaTrackingId;
}
@Nullable
public String getGcmSenderId() {
return this.gcmSenderId;
}
@Nullable
public String getProjectId() {
return this.projectId;
}
@Nullable
public String getStorageBucket() {
return this.storageBucket;
}
public int hashCode() {
return Objects.hashCode(this.applicationId, this.apiKey, this.databaseUrl, this.gaTrackingId, this.gcmSenderId, this.storageBucket, this.projectId);
}
public String toString() {
return Objects.toStringHelper(this).add("applicationId", this.applicationId).add("apiKey", this.apiKey).add("databaseUrl", this.databaseUrl).add("gcmSenderId", this.gcmSenderId).add("storageBucket", this.storageBucket).add("projectId", this.projectId).toString();
}
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
public static final class Builder {
private String apiKey;
private String applicationId;
private String databaseUrl;
private String gaTrackingId;
private String gcmSenderId;
private String projectId;
private String storageBucket;
public Builder(@NonNull FirebaseOptions firebaseOptions) {
this.applicationId = firebaseOptions.applicationId;
this.apiKey = firebaseOptions.apiKey;
this.databaseUrl = firebaseOptions.databaseUrl;
this.gaTrackingId = firebaseOptions.gaTrackingId;
this.gcmSenderId = firebaseOptions.gcmSenderId;
this.storageBucket = firebaseOptions.storageBucket;
this.projectId = firebaseOptions.projectId;
}
@NonNull
public FirebaseOptions build() {
return new FirebaseOptions(this.applicationId, this.apiKey, this.databaseUrl, this.gaTrackingId, this.gcmSenderId, this.storageBucket, this.projectId);
}
@NonNull
public Builder setApiKey(@NonNull String str) {
this.apiKey = Preconditions.checkNotEmpty(str, "ApiKey must be set.");
return this;
}
@NonNull
public Builder setApplicationId(@NonNull String str) {
this.applicationId = Preconditions.checkNotEmpty(str, "ApplicationId must be set.");
return this;
}
@NonNull
public Builder setDatabaseUrl(@Nullable String str) {
this.databaseUrl = str;
return this;
}
@NonNull
@KeepForSdk
public Builder setGaTrackingId(@Nullable String str) {
this.gaTrackingId = str;
return this;
}
@NonNull
public Builder setGcmSenderId(@Nullable String str) {
this.gcmSenderId = str;
return this;
}
@NonNull
public Builder setProjectId(@Nullable String str) {
this.projectId = str;
return this;
}
@NonNull
public Builder setStorageBucket(@Nullable String str) {
this.storageBucket = str;
return this;
}
public Builder() {
}
}
}