what-the-bank/sources/com/google/android/libraries/places/internal/zzeb.java

47 lines
2.3 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package com.google.android.libraries.places.internal;
import android.text.TextUtils;
import com.google.android.libraries.places.api.model.TypeFilter;
import com.google.android.libraries.places.api.net.FindAutocompletePredictionsRequest;
import com.huawei.hms.support.hianalytics.HiAnalyticsConstant;
import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
/* loaded from: classes2.dex */
final class zzeb extends zzek {
/* JADX INFO: Access modifiers changed from: package-private */
public zzeb(FindAutocompletePredictionsRequest findAutocompletePredictionsRequest, Locale locale, String str, boolean z, zzgf zzgfVar) {
super(findAutocompletePredictionsRequest, locale, str, false, zzgfVar);
}
@Override // com.google.android.libraries.places.internal.zzek
public final Map zzf() {
String zza;
HashMap hashMap = new HashMap();
FindAutocompletePredictionsRequest findAutocompletePredictionsRequest = (FindAutocompletePredictionsRequest) zzb();
TypeFilter typeFilter = findAutocompletePredictionsRequest.getTypeFilter();
List<String> typesFilter = findAutocompletePredictionsRequest.getTypesFilter();
String query = findAutocompletePredictionsRequest.getQuery();
zzg(hashMap, "input", query == null ? null : query.replaceFirst("^\\s+", "").replaceFirst("\\s+$", " "), null);
if (!typesFilter.isEmpty()) {
zza = TextUtils.join(HiAnalyticsConstant.REPORT_VAL_SEPARATOR, typesFilter);
} else {
zza = typeFilter != null ? zzfe.zza(typeFilter) : null;
}
zzg(hashMap, "types", zza, null);
zzg(hashMap, "sessiontoken", findAutocompletePredictionsRequest.getSessionToken(), null);
zzg(hashMap, "origin", zzfc.zzd(findAutocompletePredictionsRequest.getOrigin()), null);
zzg(hashMap, "locationbias", zzfc.zze(findAutocompletePredictionsRequest.getLocationBias()), null);
zzg(hashMap, "locationrestriction", zzfc.zzf(findAutocompletePredictionsRequest.getLocationRestriction()), null);
zzg(hashMap, "components", zzfc.zzb(findAutocompletePredictionsRequest.getCountries()), null);
return hashMap;
}
@Override // com.google.android.libraries.places.internal.zzek
protected final String zze() {
return "autocomplete/json";
}
}