Initial version -- added millennium read funcionality

This commit is contained in:
Pablo
2026-03-09 22:05:28 +01:00
commit 77c2ded482
2770 changed files with 141927 additions and 0 deletions
@@ -0,0 +1,9 @@
package com.google.maps.android;
/* JADX INFO: loaded from: classes2.dex */
public final class BuildConfig {
public static final String BUILD_TYPE = "release";
public static final boolean DEBUG = false;
public static final String LIBRARY_PACKAGE_NAME = "com.google.maps.android";
public static final String TRAVIS = "null";
}
@@ -0,0 +1,57 @@
package com.google.maps.android;
/* JADX INFO: loaded from: classes2.dex */
class MathUtil {
static final double EARTH_RADIUS = 6371009.0d;
static double clamp(double d, double d2, double d3) {
return d < d2 ? d2 : d > d3 ? d3 : d;
}
static double mod(double d, double d2) {
return ((d % d2) + d2) % d2;
}
MathUtil() {
}
static double wrap(double d, double d2, double d3) {
return (d < d2 || d >= d3) ? mod(d - d2, d3 - d2) + d2 : d;
}
static double mercator(double d) {
return Math.log(Math.tan((d * 0.5d) + 0.7853981633974483d));
}
static double inverseMercator(double d) {
return (Math.atan(Math.exp(d)) * 2.0d) - 1.5707963267948966d;
}
static double hav(double d) {
double dSin = Math.sin(d * 0.5d);
return dSin * dSin;
}
static double arcHav(double d) {
return Math.asin(Math.sqrt(d)) * 2.0d;
}
static double sinFromHav(double d) {
return Math.sqrt(d * (1.0d - d)) * 2.0d;
}
static double havFromSin(double d) {
double d2 = d * d;
return (d2 / (Math.sqrt(1.0d - d2) + 1.0d)) * 0.5d;
}
static double sinSumFromHav(double d, double d2) {
double dSqrt = Math.sqrt((1.0d - d) * d);
double dSqrt2 = Math.sqrt((1.0d - d2) * d2);
return ((dSqrt + dSqrt2) - (((dSqrt * d2) + (dSqrt2 * d)) * 2.0d)) * 2.0d;
}
static double havDistance(double d, double d2, double d3) {
return hav(d - d2) + (hav(d3) * Math.cos(d) * Math.cos(d2));
}
}
@@ -0,0 +1,382 @@
package com.google.maps.android;
import com.google.android.gms.maps.model.LatLng;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Stack;
/* JADX INFO: loaded from: classes2.dex */
public class PolyUtil {
public static final double DEFAULT_TOLERANCE = 0.1d;
private PolyUtil() {
}
private static double tanLatGC(double d, double d2, double d3, double d4) {
return ((Math.tan(d) * Math.sin(d3 - d4)) + (Math.tan(d2) * Math.sin(d4))) / Math.sin(d3);
}
private static double mercatorLatRhumb(double d, double d2, double d3, double d4) {
return ((MathUtil.mercator(d) * (d3 - d4)) + (MathUtil.mercator(d2) * d4)) / d3;
}
private static boolean intersects(double d, double d2, double d3, double d4, double d5, boolean z) {
if ((d5 >= 0.0d && d5 >= d3) || ((d5 < 0.0d && d5 < d3) || d4 <= -1.5707963267948966d || d <= -1.5707963267948966d || d2 <= -1.5707963267948966d || d >= 1.5707963267948966d || d2 >= 1.5707963267948966d || d3 <= -3.141592653589793d)) {
return false;
}
double d6 = (((d3 - d5) * d) + (d2 * d5)) / d3;
if (d >= 0.0d && d2 >= 0.0d && d4 < d6) {
return false;
}
if ((d <= 0.0d && d2 <= 0.0d && d4 >= d6) || d4 >= 1.5707963267948966d) {
return true;
}
if (z) {
if (Math.tan(d4) < tanLatGC(d, d2, d3, d5)) {
return false;
}
} else if (MathUtil.mercator(d4) < mercatorLatRhumb(d, d2, d3, d5)) {
return false;
}
return true;
}
public static boolean containsLocation(LatLng latLng, List<LatLng> list, boolean z) {
return containsLocation(latLng.latitude, latLng.longitude, list, z);
}
public static boolean containsLocation(double d, double d2, List<LatLng> list, boolean z) {
int size = list.size();
if (size == 0) {
return false;
}
double radians = Math.toRadians(d);
double radians2 = Math.toRadians(d2);
LatLng latLng = list.get(size - 1);
double radians3 = Math.toRadians(latLng.latitude);
double radians4 = Math.toRadians(latLng.longitude);
int i = 0;
double d3 = radians3;
for (LatLng latLng2 : list) {
double dWrap = MathUtil.wrap(radians2 - radians4, -3.141592653589793d, 3.141592653589793d);
if (radians == d3 && dWrap == 0.0d) {
return true;
}
double radians5 = Math.toRadians(latLng2.latitude);
double radians6 = Math.toRadians(latLng2.longitude);
if (intersects(d3, radians5, MathUtil.wrap(radians6 - radians4, -3.141592653589793d, 3.141592653589793d), radians, dWrap, z)) {
i++;
}
d3 = radians5;
radians4 = radians6;
}
return (i & 1) != 0;
}
public static boolean isLocationOnEdge(LatLng latLng, List<LatLng> list, boolean z, double d) {
return isLocationOnEdgeOrPath(latLng, list, true, z, d);
}
public static boolean isLocationOnEdge(LatLng latLng, List<LatLng> list, boolean z) {
return isLocationOnEdge(latLng, list, z, 0.1d);
}
public static boolean isLocationOnPath(LatLng latLng, List<LatLng> list, boolean z, double d) {
return isLocationOnEdgeOrPath(latLng, list, false, z, d);
}
public static boolean isLocationOnPath(LatLng latLng, List<LatLng> list, boolean z) {
return isLocationOnPath(latLng, list, z, 0.1d);
}
private static boolean isLocationOnEdgeOrPath(LatLng latLng, List<LatLng> list, boolean z, boolean z2, double d) {
return locationIndexOnEdgeOrPath(latLng, list, z, z2, d) >= 0;
}
public static int locationIndexOnPath(LatLng latLng, List<LatLng> list, boolean z, double d) {
return locationIndexOnEdgeOrPath(latLng, list, false, z, d);
}
public static int locationIndexOnPath(LatLng latLng, List<LatLng> list, boolean z) {
return locationIndexOnPath(latLng, list, z, 0.1d);
}
public static int locationIndexOnEdgeOrPath(LatLng latLng, List<LatLng> list, boolean z, boolean z2, double d) {
List<LatLng> list2;
int i;
double d2;
int size = list.size();
int i2 = -1;
if (size == 0) {
return -1;
}
double d3 = d / 6371009.0d;
double dHav = MathUtil.hav(d3);
double radians = Math.toRadians(latLng.latitude);
double radians2 = Math.toRadians(latLng.longitude);
if (z) {
i = size - 1;
list2 = list;
} else {
list2 = list;
i = 0;
}
LatLng latLng2 = list2.get(i);
double radians3 = Math.toRadians(latLng2.latitude);
double radians4 = Math.toRadians(latLng2.longitude);
if (z2) {
int i3 = 0;
double d4 = radians3;
double d5 = radians4;
for (LatLng latLng3 : list) {
double radians5 = Math.toRadians(latLng3.latitude);
double radians6 = Math.toRadians(latLng3.longitude);
if (isOnSegmentGC(d4, d5, radians5, radians6, radians, radians2, dHav)) {
return Math.max(0, i3 - 1);
}
i3++;
d4 = radians5;
d5 = radians6;
}
} else {
double d6 = radians - d3;
double d7 = radians + d3;
double dMercator = MathUtil.mercator(radians3);
double dMercator2 = MathUtil.mercator(radians);
Iterator<LatLng> it = list.iterator();
int i4 = 0;
while (it.hasNext()) {
LatLng next = it.next();
Iterator<LatLng> it2 = it;
double radians7 = Math.toRadians(next.latitude);
double dMercator3 = MathUtil.mercator(radians7);
double d8 = dMercator2;
double radians8 = Math.toRadians(next.longitude);
if (Math.max(radians3, radians7) < d6 || Math.min(radians3, radians7) > d7) {
d2 = radians7;
} else {
double dWrap = MathUtil.wrap(radians8 - radians4, -3.141592653589793d, 3.141592653589793d);
double dWrap2 = MathUtil.wrap(radians2 - radians4, -3.141592653589793d, 3.141592653589793d);
d2 = radians7;
double[] dArr = {dWrap2, dWrap2 + 6.283185307179586d, dWrap2 - 6.283185307179586d};
for (int i5 = 0; i5 < 3; i5++) {
double d9 = dArr[i5];
double d10 = dMercator3 - dMercator;
double d11 = (dWrap * dWrap) + (d10 * d10);
double dClamp = d11 > 0.0d ? MathUtil.clamp(((d9 * dWrap) + ((d8 - dMercator) * d10)) / d11, 0.0d, 1.0d) : 0.0d;
if (MathUtil.havDistance(radians, MathUtil.inverseMercator(dMercator + (dClamp * d10)), d9 - (dClamp * dWrap)) < dHav) {
return Math.max(0, i4 - 1);
}
}
}
i4++;
radians4 = radians8;
it = it2;
dMercator = dMercator3;
dMercator2 = d8;
radians3 = d2;
i2 = -1;
}
}
return i2;
}
private static double sinDeltaBearing(double d, double d2, double d3, double d4, double d5, double d6) {
double dSin = Math.sin(d);
double dCos = Math.cos(d3);
double dCos2 = Math.cos(d5);
double d7 = d6 - d2;
double d8 = d4 - d2;
double dSin2 = Math.sin(d7) * dCos2;
double dSin3 = Math.sin(d8) * dCos;
double d9 = dSin * 2.0d;
double dSin4 = Math.sin(d5 - d) + (dCos2 * d9 * MathUtil.hav(d7));
double dSin5 = Math.sin(d3 - d) + (d9 * dCos * MathUtil.hav(d8));
double d10 = ((dSin2 * dSin2) + (dSin4 * dSin4)) * ((dSin3 * dSin3) + (dSin5 * dSin5));
if (d10 <= 0.0d) {
return 1.0d;
}
return ((dSin2 * dSin5) - (dSin4 * dSin3)) / Math.sqrt(d10);
}
private static boolean isOnSegmentGC(double d, double d2, double d3, double d4, double d5, double d6, double d7) {
double dHavDistance = MathUtil.havDistance(d, d5, d2 - d6);
if (dHavDistance <= d7) {
return true;
}
double dHavDistance2 = MathUtil.havDistance(d3, d5, d4 - d6);
if (dHavDistance2 <= d7) {
return true;
}
double dHavFromSin = MathUtil.havFromSin(MathUtil.sinFromHav(dHavDistance) * sinDeltaBearing(d, d2, d3, d4, d5, d6));
if (dHavFromSin > d7) {
return false;
}
double dHavDistance3 = MathUtil.havDistance(d, d3, d2 - d4);
double d8 = ((1.0d - (dHavDistance3 * 2.0d)) * dHavFromSin) + dHavDistance3;
if (dHavDistance > d8 || dHavDistance2 > d8) {
return false;
}
if (dHavDistance3 < 0.74d) {
return true;
}
double d9 = 1.0d - (2.0d * dHavFromSin);
return MathUtil.sinSumFromHav((dHavDistance - dHavFromSin) / d9, (dHavDistance2 - dHavFromSin) / d9) > 0.0d;
}
public static List<LatLng> simplify(List<LatLng> list, double d) {
LatLng latLng;
int size = list.size();
if (size < 1) {
throw new IllegalArgumentException("Polyline must have at least 1 point");
}
double d2 = 0.0d;
if (d <= 0.0d) {
throw new IllegalArgumentException("Tolerance must be greater than zero");
}
boolean zIsClosedPolygon = isClosedPolygon(list);
if (zIsClosedPolygon) {
latLng = list.get(list.size() - 1);
list.remove(list.size() - 1);
list.add(new LatLng(latLng.latitude + 1.0E-11d, latLng.longitude + 1.0E-11d));
} else {
latLng = null;
}
Stack stack = new Stack();
double[] dArr = new double[size];
int i = 0;
dArr[0] = 1.0d;
int i2 = size - 1;
dArr[i2] = 1.0d;
if (size > 2) {
stack.push(new int[]{0, i2});
int i3 = 0;
while (stack.size() > 0) {
int[] iArr = (int[]) stack.pop();
double d3 = d2;
for (int i4 = iArr[0] + 1; i4 < iArr[1]; i4++) {
double dDistanceToLine = distanceToLine(list.get(i4), list.get(iArr[0]), list.get(iArr[1]));
if (dDistanceToLine > d3) {
d3 = dDistanceToLine;
i3 = i4;
}
}
if (d3 > d) {
dArr[i3] = d3;
stack.push(new int[]{iArr[0], i3});
stack.push(new int[]{i3, iArr[1]});
}
d2 = 0.0d;
}
}
if (zIsClosedPolygon) {
list.remove(list.size() - 1);
list.add(latLng);
}
ArrayList arrayList = new ArrayList();
for (LatLng latLng2 : list) {
if (dArr[i] != 0.0d) {
arrayList.add(latLng2);
}
i++;
}
return arrayList;
}
public static boolean isClosedPolygon(List<LatLng> list) {
return list.get(0).equals(list.get(list.size() - 1));
}
public static double distanceToLine(LatLng latLng, LatLng latLng2, LatLng latLng3) {
if (latLng2.equals(latLng3)) {
return SphericalUtil.computeDistanceBetween(latLng3, latLng);
}
double radians = Math.toRadians(latLng.latitude);
double radians2 = Math.toRadians(latLng.longitude);
double radians3 = Math.toRadians(latLng2.latitude);
double radians4 = Math.toRadians(latLng2.longitude);
double radians5 = Math.toRadians(latLng3.latitude);
double radians6 = Math.toRadians(latLng3.longitude);
double dCos = Math.cos(radians3);
double d = radians5 - radians3;
double d2 = (radians6 - radians4) * dCos;
double d3 = (((radians - radians3) * d) + (((radians2 - radians4) * dCos) * d2)) / ((d * d) + (d2 * d2));
if (d3 <= 0.0d) {
return SphericalUtil.computeDistanceBetween(latLng, latLng2);
}
if (d3 >= 1.0d) {
return SphericalUtil.computeDistanceBetween(latLng, latLng3);
}
return SphericalUtil.computeDistanceBetween(latLng, new LatLng(latLng2.latitude + ((latLng3.latitude - latLng2.latitude) * d3), latLng2.longitude + (d3 * (latLng3.longitude - latLng2.longitude))));
}
public static List<LatLng> decode(String str) {
int i;
int i2;
int length = str.length();
ArrayList arrayList = new ArrayList();
int i3 = 0;
int i4 = 0;
int i5 = 0;
while (i3 < length) {
int i6 = 1;
int i7 = 0;
int i8 = 1;
while (true) {
i = i3 + 1;
int iCharAt = str.charAt(i3) - '@';
i8 += iCharAt << i7;
i7 += 5;
if (iCharAt < 31) {
break;
}
i3 = i;
}
int i9 = ((i8 & 1) != 0 ? ~(i8 >> 1) : i8 >> 1) + i4;
int i10 = 0;
while (true) {
i2 = i + 1;
int iCharAt2 = str.charAt(i) - '@';
i6 += iCharAt2 << i10;
i10 += 5;
if (iCharAt2 < 31) {
break;
}
i = i2;
}
i5 += (i6 & 1) != 0 ? ~(i6 >> 1) : i6 >> 1;
arrayList.add(new LatLng(((double) i9) * 1.0E-5d, ((double) i5) * 1.0E-5d));
i4 = i9;
i3 = i2;
}
return arrayList;
}
public static String encode(List<LatLng> list) {
StringBuffer stringBuffer = new StringBuffer();
long j = 0;
long j2 = 0;
for (LatLng latLng : list) {
long jRound = Math.round(latLng.latitude * 100000.0d);
long jRound2 = Math.round(latLng.longitude * 100000.0d);
encode(jRound - j, stringBuffer);
encode(jRound2 - j2, stringBuffer);
j = jRound;
j2 = jRound2;
}
return stringBuffer.toString();
}
private static void encode(long j, StringBuffer stringBuffer) {
long j2 = j << 1;
if (j < 0) {
j2 = ~j2;
}
while (j2 >= 32) {
stringBuffer.append(Character.toChars((int) ((32 | (31 & j2)) + 63)));
j2 >>= 5;
}
stringBuffer.append(Character.toChars((int) (j2 + 63)));
}
}
@@ -0,0 +1,43 @@
package com.google.maps.android;
/* JADX INFO: loaded from: classes2.dex */
public final class R {
public static final class drawable {
public static int amu_bubble_mask = 0x7f070050;
public static int amu_bubble_shadow = 0x7f070051;
private drawable() {
}
}
public static final class id {
public static int amu_text = 0x7f08003f;
public static int webview = 0x7f0800ca;
public static int window = 0x7f0800cc;
private id() {
}
}
public static final class layout {
public static int amu_info_window = 0x7f0b001c;
public static int amu_text_bubble = 0x7f0b001d;
public static int amu_webview = 0x7f0b001e;
private layout() {
}
}
public static final class style {
public static int amu_Bubble_TextAppearance_Dark = 0x7f0e0162;
public static int amu_Bubble_TextAppearance_Light = 0x7f0e0163;
public static int amu_ClusterIcon_TextAppearance = 0x7f0e0164;
private style() {
}
}
private R() {
}
}
@@ -0,0 +1,53 @@
package com.google.maps.android;
import androidx.core.app.NotificationCompat;
import kotlin.Metadata;
import kotlin.jvm.internal.Intrinsics;
/* JADX INFO: compiled from: StreetViewUtil.kt */
/* JADX INFO: loaded from: classes2.dex */
@Metadata(d1 = {"\u0000&\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0010\u000b\n\u0002\b\u0002\n\u0002\u0010\b\n\u0000\n\u0002\u0010\u000e\n\u0000\b\u0086\b\u0018\u00002\u00020\u0001B\r\u0012\u0006\u0010\u0002\u001a\u00020\u0003¢\u0006\u0002\u0010\u0004J\t\u0010\u0007\u001a\u00020\u0003HÆ\u0003J\u0013\u0010\b\u001a\u00020\u00002\b\b\u0002\u0010\u0002\u001a\u00020\u0003HÆ\u0001J\u0013\u0010\t\u001a\u00020\n2\b\u0010\u000b\u001a\u0004\u0018\u00010\u0001HÖ\u0003J\t\u0010\f\u001a\u00020\rHÖ\u0001J\t\u0010\u000e\u001a\u00020\u000fHÖ\u0001R\u0011\u0010\u0002\u001a\u00020\u0003¢\u0006\b\n\u0000\u001a\u0004\b\u0005\u0010\u0006¨\u0006\u0010"}, d2 = {"Lcom/google/maps/android/ResponseStreetView;", "", NotificationCompat.CATEGORY_STATUS, "Lcom/google/maps/android/Status;", "(Lcom/google/maps/android/Status;)V", "getStatus", "()Lcom/google/maps/android/Status;", "component1", "copy", "equals", "", "other", "hashCode", "", "toString", "", "library_release"}, k = 1, mv = {1, 7, 1}, xi = 48)
public final /* data */ class ResponseStreetView {
private final Status status;
public static /* synthetic */ ResponseStreetView copy$default(ResponseStreetView responseStreetView, Status status, int i, Object obj) {
if ((i & 1) != 0) {
status = responseStreetView.status;
}
return responseStreetView.copy(status);
}
/* JADX INFO: renamed from: component1, reason: from getter */
public final Status getStatus() {
return this.status;
}
public final ResponseStreetView copy(Status status) {
Intrinsics.checkNotNullParameter(status, "status");
return new ResponseStreetView(status);
}
public boolean equals(Object other) {
if (this == other) {
return true;
}
return (other instanceof ResponseStreetView) && this.status == ((ResponseStreetView) other).status;
}
public int hashCode() {
return this.status.hashCode();
}
public String toString() {
return "ResponseStreetView(status=" + this.status + ')';
}
public ResponseStreetView(Status status) {
Intrinsics.checkNotNullParameter(status, "status");
this.status = status;
}
public final Status getStatus() {
return this.status;
}
}
@@ -0,0 +1,141 @@
package com.google.maps.android;
import com.google.android.gms.maps.model.LatLng;
import java.util.List;
/* JADX INFO: loaded from: classes2.dex */
public class SphericalUtil {
private SphericalUtil() {
}
public static double computeHeading(LatLng latLng, LatLng latLng2) {
double radians = Math.toRadians(latLng.latitude);
double radians2 = Math.toRadians(latLng.longitude);
double radians3 = Math.toRadians(latLng2.latitude);
double radians4 = Math.toRadians(latLng2.longitude) - radians2;
return MathUtil.wrap(Math.toDegrees(Math.atan2(Math.sin(radians4) * Math.cos(radians3), (Math.cos(radians) * Math.sin(radians3)) - ((Math.sin(radians) * Math.cos(radians3)) * Math.cos(radians4)))), -180.0d, 180.0d);
}
public static LatLng computeOffset(LatLng latLng, double d, double d2) {
double d3 = d / 6371009.0d;
double radians = Math.toRadians(d2);
double radians2 = Math.toRadians(latLng.latitude);
double radians3 = Math.toRadians(latLng.longitude);
double dCos = Math.cos(d3);
double dSin = Math.sin(d3);
double dSin2 = Math.sin(radians2);
double dCos2 = dSin * Math.cos(radians2);
double dCos3 = (dCos * dSin2) + (Math.cos(radians) * dCos2);
return new LatLng(Math.toDegrees(Math.asin(dCos3)), Math.toDegrees(radians3 + Math.atan2(dCos2 * Math.sin(radians), dCos - (dSin2 * dCos3))));
}
public static LatLng computeOffsetOrigin(LatLng latLng, double d, double d2) {
double radians = Math.toRadians(d2);
double d3 = d / 6371009.0d;
double dCos = Math.cos(d3);
double dSin = Math.sin(d3) * Math.cos(radians);
double dSin2 = Math.sin(d3) * Math.sin(radians);
double dSin3 = Math.sin(Math.toRadians(latLng.latitude));
double d4 = dCos * dCos;
double d5 = dSin * dSin;
double d6 = ((d5 * d4) + (d4 * d4)) - ((d4 * dSin3) * dSin3);
if (d6 < 0.0d) {
return null;
}
double d7 = dSin * dSin3;
double d8 = d4 + d5;
double dSqrt = (d7 + Math.sqrt(d6)) / d8;
double d9 = (dSin3 - (dSin * dSqrt)) / dCos;
double dAtan2 = Math.atan2(d9, dSqrt);
if (dAtan2 < -1.5707963267948966d || dAtan2 > 1.5707963267948966d) {
dAtan2 = Math.atan2(d9, (d7 - Math.sqrt(d6)) / d8);
}
if (dAtan2 < -1.5707963267948966d || dAtan2 > 1.5707963267948966d) {
return null;
}
return new LatLng(Math.toDegrees(dAtan2), Math.toDegrees(Math.toRadians(latLng.longitude) - Math.atan2(dSin2, (dCos * Math.cos(dAtan2)) - (dSin * Math.sin(dAtan2)))));
}
public static LatLng interpolate(LatLng latLng, LatLng latLng2, double d) {
double radians = Math.toRadians(latLng.latitude);
double radians2 = Math.toRadians(latLng.longitude);
double radians3 = Math.toRadians(latLng2.latitude);
double radians4 = Math.toRadians(latLng2.longitude);
double dCos = Math.cos(radians);
double dCos2 = Math.cos(radians3);
double dComputeAngleBetween = computeAngleBetween(latLng, latLng2);
double dSin = Math.sin(dComputeAngleBetween);
if (dSin < 1.0E-6d) {
return new LatLng(latLng.latitude + ((latLng2.latitude - latLng.latitude) * d), latLng.longitude + (d * (latLng2.longitude - latLng.longitude)));
}
double dSin2 = Math.sin((1.0d - d) * dComputeAngleBetween) / dSin;
double dSin3 = Math.sin(dComputeAngleBetween * d) / dSin;
double d2 = dCos * dSin2;
double d3 = dCos2 * dSin3;
double dCos3 = (Math.cos(radians2) * d2) + (Math.cos(radians4) * d3);
double dSin4 = (d2 * Math.sin(radians2)) + (d3 * Math.sin(radians4));
return new LatLng(Math.toDegrees(Math.atan2((dSin2 * Math.sin(radians)) + (Math.sin(radians3) * dSin3), Math.sqrt((dCos3 * dCos3) + (dSin4 * dSin4)))), Math.toDegrees(Math.atan2(dSin4, dCos3)));
}
private static double distanceRadians(double d, double d2, double d3, double d4) {
return MathUtil.arcHav(MathUtil.havDistance(d, d3, d2 - d4));
}
static double computeAngleBetween(LatLng latLng, LatLng latLng2) {
return distanceRadians(Math.toRadians(latLng.latitude), Math.toRadians(latLng.longitude), Math.toRadians(latLng2.latitude), Math.toRadians(latLng2.longitude));
}
public static double computeDistanceBetween(LatLng latLng, LatLng latLng2) {
return computeAngleBetween(latLng, latLng2) * 6371009.0d;
}
public static double computeLength(List<LatLng> list) {
double dDistanceRadians = 0.0d;
if (list.size() < 2) {
return 0.0d;
}
LatLng latLng = null;
for (LatLng latLng2 : list) {
if (latLng != null) {
dDistanceRadians += distanceRadians(Math.toRadians(latLng.latitude), Math.toRadians(latLng.longitude), Math.toRadians(latLng2.latitude), Math.toRadians(latLng2.longitude));
}
latLng = latLng2;
}
return dDistanceRadians * 6371009.0d;
}
public static double computeArea(List<LatLng> list) {
return Math.abs(computeSignedArea(list));
}
public static double computeSignedArea(List<LatLng> list) {
return computeSignedArea(list, 6371009.0d);
}
static double computeSignedArea(List<LatLng> list, double d) {
int size = list.size();
double dPolarTriangleArea = 0.0d;
if (size < 3) {
return 0.0d;
}
LatLng latLng = list.get(size - 1);
double dTan = Math.tan((1.5707963267948966d - Math.toRadians(latLng.latitude)) / 2.0d);
double radians = Math.toRadians(latLng.longitude);
double d2 = dTan;
double d3 = radians;
for (LatLng latLng2 : list) {
double dTan2 = Math.tan((1.5707963267948966d - Math.toRadians(latLng2.latitude)) / 2.0d);
double radians2 = Math.toRadians(latLng2.longitude);
dPolarTriangleArea += polarTriangleArea(dTan2, radians2, d2, d3);
d2 = dTan2;
d3 = radians2;
}
return dPolarTriangleArea * d * d;
}
private static double polarTriangleArea(double d, double d2, double d3, double d4) {
double d5 = d2 - d4;
double d6 = d * d3;
return Math.atan2(Math.sin(d5) * d6, (d6 * Math.cos(d5)) + 1.0d) * 2.0d;
}
}
@@ -0,0 +1,16 @@
package com.google.maps.android;
import kotlin.Metadata;
/* JADX INFO: compiled from: StreetViewUtil.kt */
/* JADX INFO: loaded from: classes2.dex */
@Metadata(d1 = {"\u0000\f\n\u0002\u0018\u0002\n\u0002\u0010\u0010\n\u0002\b\t\b\u0086\u0001\u0018\u00002\b\u0012\u0004\u0012\u00020\u00000\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002j\u0002\b\u0003j\u0002\b\u0004j\u0002\b\u0005j\u0002\b\u0006j\u0002\b\u0007j\u0002\b\bj\u0002\b\\u0006\n"}, d2 = {"Lcom/google/maps/android/Status;", "", "(Ljava/lang/String;I)V", "OK", "ZERO_RESULTS", "NOT_FOUND", "REQUEST_DENIED", "OVER_QUERY_LIMIT", "INVALID_REQUEST", "UNKNOWN_ERROR", "library_release"}, k = 1, mv = {1, 7, 1}, xi = 48)
public enum Status {
OK,
ZERO_RESULTS,
NOT_FOUND,
REQUEST_DENIED,
OVER_QUERY_LIMIT,
INVALID_REQUEST,
UNKNOWN_ERROR
}
@@ -0,0 +1,80 @@
package com.google.maps.android;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
import java.net.URLConnection;
import kotlin.Metadata;
import kotlin.ResultKt;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.intrinsics.IntrinsicsKt;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.coroutines.jvm.internal.SuspendLambda;
import kotlin.io.CloseableKt;
import kotlin.io.TextStreamsKt;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.internal.Intrinsics;
import kotlinx.coroutines.CoroutineScope;
/* JADX INFO: compiled from: StreetViewUtil.kt */
/* JADX INFO: loaded from: classes2.dex */
@Metadata(d1 = {"\u0000\n\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\u0010\u0000\u001a\u00020\u0001*\u00020\u0002H\u008a@"}, d2 = {"<anonymous>", "Lcom/google/maps/android/Status;", "Lkotlinx/coroutines/CoroutineScope;"}, k = 3, mv = {1, 7, 1}, xi = 48)
@DebugMetadata(c = "com.google.maps.android.StreetViewUtils$Companion$fetchStreetViewData$2", f = "StreetViewUtil.kt", i = {}, l = {}, m = "invokeSuspend", n = {}, s = {})
final class StreetViewUtils$Companion$fetchStreetViewData$2 extends SuspendLambda implements Function2<CoroutineScope, Continuation<? super Status>, Object> {
final /* synthetic */ String $urlString;
int label;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
StreetViewUtils$Companion$fetchStreetViewData$2(String str, Continuation<? super StreetViewUtils$Companion$fetchStreetViewData$2> continuation) {
super(2, continuation);
this.$urlString = str;
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Continuation<Unit> create(Object obj, Continuation<?> continuation) {
return new StreetViewUtils$Companion$fetchStreetViewData$2(this.$urlString, continuation);
}
@Override // kotlin.jvm.functions.Function2
public final Object invoke(CoroutineScope coroutineScope, Continuation<? super Status> continuation) {
return ((StreetViewUtils$Companion$fetchStreetViewData$2) create(coroutineScope, continuation)).invokeSuspend(Unit.INSTANCE);
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) throws Throwable {
IntrinsicsKt.getCOROUTINE_SUSPENDED();
if (this.label != 0) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
ResultKt.throwOnFailure(obj);
try {
URLConnection uRLConnectionOpenConnection = new URL(this.$urlString).openConnection();
Intrinsics.checkNotNull(uRLConnectionOpenConnection, "null cannot be cast to non-null type java.net.HttpURLConnection");
HttpURLConnection httpURLConnection = (HttpURLConnection) uRLConnectionOpenConnection;
httpURLConnection.setRequestMethod("GET");
int responseCode = httpURLConnection.getResponseCode();
if (responseCode == 200) {
InputStream inputStream = httpURLConnection.getInputStream();
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(inputStream));
BufferedReader bufferedReader2 = bufferedReader;
try {
String text = TextStreamsKt.readText(bufferedReader2);
CloseableKt.closeFinally(bufferedReader2, null);
bufferedReader.close();
inputStream.close();
return StreetViewUtils.INSTANCE.deserializeResponse(text).getStatus();
} finally {
}
} else {
throw new IOException("HTTP Error: " + responseCode);
}
} catch (IOException e) {
e.printStackTrace();
throw new IOException("Network error: " + e.getMessage());
}
}
}
@@ -0,0 +1,43 @@
package com.google.maps.android;
import androidx.core.app.NotificationCompat;
import com.google.android.gms.maps.model.LatLng;
import kotlin.Metadata;
import kotlin.coroutines.Continuation;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlinx.coroutines.BuildersKt;
import kotlinx.coroutines.Dispatchers;
import kotlinx.serialization.json.internal.AbstractJsonLexerKt;
import org.json.JSONObject;
/* JADX INFO: compiled from: StreetViewUtil.kt */
/* JADX INFO: loaded from: classes2.dex */
@Metadata(d1 = {"\u0000\f\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0003\u0018\u0000 \u00032\u00020\u0001:\u0001\u0003B\u0005¢\u0006\u0002\u0010\u0002¨\u0006\u0004"}, d2 = {"Lcom/google/maps/android/StreetViewUtils;", "", "()V", "Companion", "library_release"}, k = 1, mv = {1, 7, 1}, xi = 48)
public final class StreetViewUtils {
/* JADX INFO: renamed from: Companion, reason: from kotlin metadata */
public static final Companion INSTANCE = new Companion(null);
/* JADX INFO: compiled from: StreetViewUtil.kt */
@Metadata(d1 = {"\u0000&\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000e\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\b\u0086\u0003\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002J\u0010\u0010\u0003\u001a\u00020\u00042\u0006\u0010\u0005\u001a\u00020\u0006H\u0002J!\u0010\u0007\u001a\u00020\b2\u0006\u0010\t\u001a\u00020\n2\u0006\u0010\u000b\u001a\u00020\u0006H\u0086@ø\u0001\u0000¢\u0006\u0002\u0010\f\u0082\u0002\u0004\n\u0002\b\u0019¨\u0006\r"}, d2 = {"Lcom/google/maps/android/StreetViewUtils$Companion;", "", "()V", "deserializeResponse", "Lcom/google/maps/android/ResponseStreetView;", "responseString", "", "fetchStreetViewData", "Lcom/google/maps/android/Status;", "latLng", "Lcom/google/android/gms/maps/model/LatLng;", "apiKey", "(Lcom/google/android/gms/maps/model/LatLng;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", "library_release"}, k = 1, mv = {1, 7, 1}, xi = 48)
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
private Companion() {
}
public final Object fetchStreetViewData(LatLng latLng, String str, Continuation<? super Status> continuation) {
return BuildersKt.withContext(Dispatchers.getIO(), new StreetViewUtils$Companion$fetchStreetViewData$2("https://maps.googleapis.com/maps/api/streetview/metadata?location=" + latLng.latitude + AbstractJsonLexerKt.COMMA + latLng.longitude + "&key=" + str, null), continuation);
}
/* JADX INFO: Access modifiers changed from: private */
public final ResponseStreetView deserializeResponse(String responseString) {
String statusString = new JSONObject(responseString).optString(NotificationCompat.CATEGORY_STATUS);
Intrinsics.checkNotNullExpressionValue(statusString, "statusString");
return new ResponseStreetView(Status.valueOf(statusString));
}
}
}
@@ -0,0 +1,14 @@
package com.google.maps.android.clustering;
import com.google.android.gms.maps.model.LatLng;
import com.google.maps.android.clustering.ClusterItem;
import java.util.Collection;
/* JADX INFO: loaded from: classes2.dex */
public interface Cluster<T extends ClusterItem> {
Collection<T> getItems();
LatLng getPosition();
int getSize();
}
@@ -0,0 +1,14 @@
package com.google.maps.android.clustering;
import com.google.android.gms.maps.model.LatLng;
/* JADX INFO: loaded from: classes2.dex */
public interface ClusterItem {
LatLng getPosition();
String getSnippet();
String getTitle();
Float getZIndex();
}
@@ -0,0 +1,307 @@
package com.google.maps.android.clustering;
import android.content.Context;
import android.os.AsyncTask;
import com.google.android.gms.maps.GoogleMap;
import com.google.android.gms.maps.model.CameraPosition;
import com.google.android.gms.maps.model.Marker;
import com.google.maps.android.clustering.ClusterItem;
import com.google.maps.android.clustering.algo.Algorithm;
import com.google.maps.android.clustering.algo.NonHierarchicalDistanceBasedAlgorithm;
import com.google.maps.android.clustering.algo.PreCachingAlgorithmDecorator;
import com.google.maps.android.clustering.algo.ScreenBasedAlgorithm;
import com.google.maps.android.clustering.algo.ScreenBasedAlgorithmAdapter;
import com.google.maps.android.clustering.view.ClusterRenderer;
import com.google.maps.android.clustering.view.DefaultClusterRenderer;
import com.google.maps.android.collections.MarkerManager;
import java.util.Collection;
import java.util.Set;
import java.util.concurrent.locks.ReadWriteLock;
import java.util.concurrent.locks.ReentrantReadWriteLock;
/* JADX INFO: loaded from: classes2.dex */
public class ClusterManager<T extends ClusterItem> implements GoogleMap.OnCameraIdleListener, GoogleMap.OnMarkerClickListener, GoogleMap.OnInfoWindowClickListener {
private ScreenBasedAlgorithm<T> mAlgorithm;
private final MarkerManager.Collection mClusterMarkers;
private ClusterManager<T>.ClusterTask mClusterTask;
private final ReadWriteLock mClusterTaskLock;
private GoogleMap mMap;
private final MarkerManager mMarkerManager;
private final MarkerManager.Collection mMarkers;
private OnClusterClickListener<T> mOnClusterClickListener;
private OnClusterInfoWindowClickListener<T> mOnClusterInfoWindowClickListener;
private OnClusterInfoWindowLongClickListener<T> mOnClusterInfoWindowLongClickListener;
private OnClusterItemClickListener<T> mOnClusterItemClickListener;
private OnClusterItemInfoWindowClickListener<T> mOnClusterItemInfoWindowClickListener;
private OnClusterItemInfoWindowLongClickListener<T> mOnClusterItemInfoWindowLongClickListener;
private CameraPosition mPreviousCameraPosition;
private ClusterRenderer<T> mRenderer;
public interface OnClusterClickListener<T extends ClusterItem> {
boolean onClusterClick(Cluster<T> cluster);
}
public interface OnClusterInfoWindowClickListener<T extends ClusterItem> {
void onClusterInfoWindowClick(Cluster<T> cluster);
}
public interface OnClusterInfoWindowLongClickListener<T extends ClusterItem> {
void onClusterInfoWindowLongClick(Cluster<T> cluster);
}
public interface OnClusterItemClickListener<T extends ClusterItem> {
boolean onClusterItemClick(T t);
}
public interface OnClusterItemInfoWindowClickListener<T extends ClusterItem> {
void onClusterItemInfoWindowClick(T t);
}
public interface OnClusterItemInfoWindowLongClickListener<T extends ClusterItem> {
void onClusterItemInfoWindowLongClick(T t);
}
public ClusterManager(Context context, GoogleMap googleMap) {
this(context, googleMap, new MarkerManager(googleMap));
}
public ClusterManager(Context context, GoogleMap googleMap, MarkerManager markerManager) {
this.mClusterTaskLock = new ReentrantReadWriteLock();
this.mMap = googleMap;
this.mMarkerManager = markerManager;
this.mClusterMarkers = markerManager.newCollection();
this.mMarkers = markerManager.newCollection();
this.mRenderer = new DefaultClusterRenderer(context, googleMap, this);
this.mAlgorithm = new ScreenBasedAlgorithmAdapter(new PreCachingAlgorithmDecorator(new NonHierarchicalDistanceBasedAlgorithm()));
this.mClusterTask = new ClusterTask();
this.mRenderer.onAdd();
}
public MarkerManager.Collection getMarkerCollection() {
return this.mMarkers;
}
public MarkerManager.Collection getClusterMarkerCollection() {
return this.mClusterMarkers;
}
public MarkerManager getMarkerManager() {
return this.mMarkerManager;
}
public void setRenderer(ClusterRenderer<T> clusterRenderer) {
this.mRenderer.setOnClusterClickListener(null);
this.mRenderer.setOnClusterItemClickListener(null);
this.mClusterMarkers.clear();
this.mMarkers.clear();
this.mRenderer.onRemove();
this.mRenderer = clusterRenderer;
clusterRenderer.onAdd();
this.mRenderer.setOnClusterClickListener(this.mOnClusterClickListener);
this.mRenderer.setOnClusterInfoWindowClickListener(this.mOnClusterInfoWindowClickListener);
this.mRenderer.setOnClusterInfoWindowLongClickListener(this.mOnClusterInfoWindowLongClickListener);
this.mRenderer.setOnClusterItemClickListener(this.mOnClusterItemClickListener);
this.mRenderer.setOnClusterItemInfoWindowClickListener(this.mOnClusterItemInfoWindowClickListener);
this.mRenderer.setOnClusterItemInfoWindowLongClickListener(this.mOnClusterItemInfoWindowLongClickListener);
cluster();
}
public void setAlgorithm(Algorithm<T> algorithm) {
if (algorithm instanceof ScreenBasedAlgorithm) {
setAlgorithm((ScreenBasedAlgorithm) algorithm);
} else {
setAlgorithm((ScreenBasedAlgorithm) new ScreenBasedAlgorithmAdapter(algorithm));
}
}
public void setAlgorithm(ScreenBasedAlgorithm<T> screenBasedAlgorithm) {
screenBasedAlgorithm.lock();
try {
Algorithm<T> algorithm = getAlgorithm();
this.mAlgorithm = screenBasedAlgorithm;
if (algorithm != null) {
algorithm.lock();
try {
screenBasedAlgorithm.addItems(algorithm.getItems());
algorithm.unlock();
} catch (Throwable th) {
algorithm.unlock();
throw th;
}
}
screenBasedAlgorithm.unlock();
if (this.mAlgorithm.shouldReclusterOnMapMovement()) {
this.mAlgorithm.onCameraChange(this.mMap.getCameraPosition());
}
cluster();
} catch (Throwable th2) {
screenBasedAlgorithm.unlock();
throw th2;
}
}
public void setAnimation(boolean z) {
this.mRenderer.setAnimation(z);
}
public ClusterRenderer<T> getRenderer() {
return this.mRenderer;
}
public Algorithm<T> getAlgorithm() {
return this.mAlgorithm;
}
public void clearItems() {
Algorithm<T> algorithm = getAlgorithm();
algorithm.lock();
try {
algorithm.clearItems();
} finally {
algorithm.unlock();
}
}
public boolean addItems(Collection<T> collection) {
Algorithm<T> algorithm = getAlgorithm();
algorithm.lock();
try {
return algorithm.addItems(collection);
} finally {
algorithm.unlock();
}
}
public boolean addItem(T t) {
Algorithm<T> algorithm = getAlgorithm();
algorithm.lock();
try {
return algorithm.addItem(t);
} finally {
algorithm.unlock();
}
}
public boolean removeItems(Collection<T> collection) {
Algorithm<T> algorithm = getAlgorithm();
algorithm.lock();
try {
return algorithm.removeItems(collection);
} finally {
algorithm.unlock();
}
}
public boolean removeItem(T t) {
Algorithm<T> algorithm = getAlgorithm();
algorithm.lock();
try {
return algorithm.removeItem(t);
} finally {
algorithm.unlock();
}
}
public boolean updateItem(T t) {
Algorithm<T> algorithm = getAlgorithm();
algorithm.lock();
try {
return algorithm.updateItem(t);
} finally {
algorithm.unlock();
}
}
public void cluster() {
this.mClusterTaskLock.writeLock().lock();
try {
this.mClusterTask.cancel(true);
ClusterManager<T>.ClusterTask clusterTask = new ClusterTask();
this.mClusterTask = clusterTask;
clusterTask.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, Float.valueOf(this.mMap.getCameraPosition().zoom));
} finally {
this.mClusterTaskLock.writeLock().unlock();
}
}
@Override // com.google.android.gms.maps.GoogleMap.OnCameraIdleListener
public void onCameraIdle() {
ClusterRenderer<T> clusterRenderer = this.mRenderer;
if (clusterRenderer instanceof GoogleMap.OnCameraIdleListener) {
((GoogleMap.OnCameraIdleListener) clusterRenderer).onCameraIdle();
}
this.mAlgorithm.onCameraChange(this.mMap.getCameraPosition());
if (this.mAlgorithm.shouldReclusterOnMapMovement()) {
cluster();
return;
}
CameraPosition cameraPosition = this.mPreviousCameraPosition;
if (cameraPosition == null || cameraPosition.zoom != this.mMap.getCameraPosition().zoom) {
this.mPreviousCameraPosition = this.mMap.getCameraPosition();
cluster();
}
}
@Override // com.google.android.gms.maps.GoogleMap.OnMarkerClickListener
public boolean onMarkerClick(Marker marker) {
return getMarkerManager().onMarkerClick(marker);
}
@Override // com.google.android.gms.maps.GoogleMap.OnInfoWindowClickListener
public void onInfoWindowClick(Marker marker) {
getMarkerManager().onInfoWindowClick(marker);
}
private class ClusterTask extends AsyncTask<Float, Void, Set<? extends Cluster<T>>> {
private ClusterTask() {
}
/* JADX INFO: Access modifiers changed from: protected */
@Override // android.os.AsyncTask
public Set<? extends Cluster<T>> doInBackground(Float... fArr) {
Algorithm<T> algorithm = ClusterManager.this.getAlgorithm();
algorithm.lock();
try {
return algorithm.getClusters(fArr[0].floatValue());
} finally {
algorithm.unlock();
}
}
/* JADX INFO: Access modifiers changed from: protected */
@Override // android.os.AsyncTask
public void onPostExecute(Set<? extends Cluster<T>> set) {
ClusterManager.this.mRenderer.onClustersChanged(set);
}
}
public void setOnClusterClickListener(OnClusterClickListener<T> onClusterClickListener) {
this.mOnClusterClickListener = onClusterClickListener;
this.mRenderer.setOnClusterClickListener(onClusterClickListener);
}
public void setOnClusterInfoWindowClickListener(OnClusterInfoWindowClickListener<T> onClusterInfoWindowClickListener) {
this.mOnClusterInfoWindowClickListener = onClusterInfoWindowClickListener;
this.mRenderer.setOnClusterInfoWindowClickListener(onClusterInfoWindowClickListener);
}
public void setOnClusterInfoWindowLongClickListener(OnClusterInfoWindowLongClickListener<T> onClusterInfoWindowLongClickListener) {
this.mOnClusterInfoWindowLongClickListener = onClusterInfoWindowLongClickListener;
this.mRenderer.setOnClusterInfoWindowLongClickListener(onClusterInfoWindowLongClickListener);
}
public void setOnClusterItemClickListener(OnClusterItemClickListener<T> onClusterItemClickListener) {
this.mOnClusterItemClickListener = onClusterItemClickListener;
this.mRenderer.setOnClusterItemClickListener(onClusterItemClickListener);
}
public void setOnClusterItemInfoWindowClickListener(OnClusterItemInfoWindowClickListener<T> onClusterItemInfoWindowClickListener) {
this.mOnClusterItemInfoWindowClickListener = onClusterItemInfoWindowClickListener;
this.mRenderer.setOnClusterItemInfoWindowClickListener(onClusterItemInfoWindowClickListener);
}
public void setOnClusterItemInfoWindowLongClickListener(OnClusterItemInfoWindowLongClickListener<T> onClusterItemInfoWindowLongClickListener) {
this.mOnClusterItemInfoWindowLongClickListener = onClusterItemInfoWindowLongClickListener;
this.mRenderer.setOnClusterItemInfoWindowLongClickListener(onClusterItemInfoWindowLongClickListener);
}
}
@@ -0,0 +1,20 @@
package com.google.maps.android.clustering.algo;
import com.google.maps.android.clustering.ClusterItem;
import java.util.concurrent.locks.ReadWriteLock;
import java.util.concurrent.locks.ReentrantReadWriteLock;
/* JADX INFO: loaded from: classes2.dex */
public abstract class AbstractAlgorithm<T extends ClusterItem> implements Algorithm<T> {
private final ReadWriteLock mLock = new ReentrantReadWriteLock();
@Override // com.google.maps.android.clustering.algo.Algorithm
public void lock() {
this.mLock.writeLock().lock();
}
@Override // com.google.maps.android.clustering.algo.Algorithm
public void unlock() {
this.mLock.writeLock().unlock();
}
}
@@ -0,0 +1,33 @@
package com.google.maps.android.clustering.algo;
import com.google.maps.android.clustering.Cluster;
import com.google.maps.android.clustering.ClusterItem;
import java.util.Collection;
import java.util.Set;
/* JADX INFO: loaded from: classes2.dex */
public interface Algorithm<T extends ClusterItem> {
boolean addItem(T t);
boolean addItems(Collection<T> collection);
void clearItems();
Set<? extends Cluster<T>> getClusters(float f);
Collection<T> getItems();
int getMaxDistanceBetweenClusteredItems();
void lock();
boolean removeItem(T t);
boolean removeItems(Collection<T> collection);
void setMaxDistanceBetweenClusteredItems(int i);
void unlock();
boolean updateItem(T t);
}
@@ -0,0 +1,101 @@
package com.google.maps.android.clustering.algo;
import androidx.collection.LongSparseArray;
import com.google.maps.android.clustering.Cluster;
import com.google.maps.android.clustering.ClusterItem;
import com.google.maps.android.projection.Point;
import com.google.maps.android.projection.SphericalMercatorProjection;
import java.util.Collection;
import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
/* JADX INFO: loaded from: classes2.dex */
public class GridBasedAlgorithm<T extends ClusterItem> extends AbstractAlgorithm<T> {
private static final int DEFAULT_GRID_SIZE = 100;
private int mGridSize = 100;
private final Set<T> mItems = Collections.synchronizedSet(new HashSet());
@Override // com.google.maps.android.clustering.algo.Algorithm
public boolean addItem(T t) {
return this.mItems.add(t);
}
@Override // com.google.maps.android.clustering.algo.Algorithm
public boolean addItems(Collection<T> collection) {
return this.mItems.addAll(collection);
}
@Override // com.google.maps.android.clustering.algo.Algorithm
public void clearItems() {
this.mItems.clear();
}
@Override // com.google.maps.android.clustering.algo.Algorithm
public boolean removeItem(T t) {
return this.mItems.remove(t);
}
@Override // com.google.maps.android.clustering.algo.Algorithm
public boolean removeItems(Collection<T> collection) {
return this.mItems.removeAll(collection);
}
@Override // com.google.maps.android.clustering.algo.Algorithm
public boolean updateItem(T t) {
boolean zRemoveItem;
synchronized (this.mItems) {
zRemoveItem = removeItem(t);
if (zRemoveItem) {
zRemoveItem = addItem(t);
}
}
return zRemoveItem;
}
@Override // com.google.maps.android.clustering.algo.Algorithm
public void setMaxDistanceBetweenClusteredItems(int i) {
this.mGridSize = i;
}
@Override // com.google.maps.android.clustering.algo.Algorithm
public int getMaxDistanceBetweenClusteredItems() {
return this.mGridSize;
}
@Override // com.google.maps.android.clustering.algo.Algorithm
public Set<? extends Cluster<T>> getClusters(float f) {
long j;
long jCeil = (long) Math.ceil((Math.pow(2.0d, f) * 256.0d) / ((double) this.mGridSize));
SphericalMercatorProjection sphericalMercatorProjection = new SphericalMercatorProjection(jCeil);
HashSet hashSet = new HashSet();
LongSparseArray longSparseArray = new LongSparseArray();
synchronized (this.mItems) {
for (T t : this.mItems) {
Point point = sphericalMercatorProjection.toPoint(t.getPosition());
long coord = getCoord(jCeil, point.x, point.y);
StaticCluster staticCluster = (StaticCluster) longSparseArray.get(coord);
if (staticCluster == null) {
j = jCeil;
staticCluster = new StaticCluster(sphericalMercatorProjection.toLatLng(new com.google.maps.android.geometry.Point(Math.floor(point.x) + 0.5d, Math.floor(point.y) + 0.5d)));
longSparseArray.put(coord, staticCluster);
hashSet.add(staticCluster);
} else {
j = jCeil;
}
staticCluster.add(t);
jCeil = j;
}
}
return hashSet;
}
@Override // com.google.maps.android.clustering.algo.Algorithm
public Collection<T> getItems() {
return this.mItems;
}
private static long getCoord(long j, double d, double d2) {
return (long) ((j * Math.floor(d)) + Math.floor(d2));
}
}
@@ -0,0 +1,227 @@
package com.google.maps.android.clustering.algo;
import com.google.android.gms.maps.model.LatLng;
import com.google.maps.android.clustering.Cluster;
import com.google.maps.android.clustering.ClusterItem;
import com.google.maps.android.geometry.Bounds;
import com.google.maps.android.geometry.Point;
import com.google.maps.android.projection.SphericalMercatorProjection;
import com.google.maps.android.quadtree.PointQuadTree;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedHashSet;
import java.util.Set;
/* JADX INFO: loaded from: classes2.dex */
public class NonHierarchicalDistanceBasedAlgorithm<T extends ClusterItem> extends AbstractAlgorithm<T> {
private static final int DEFAULT_MAX_DISTANCE_AT_ZOOM = 100;
private static final SphericalMercatorProjection PROJECTION = new SphericalMercatorProjection(1.0d);
private int mMaxDistance = 100;
private final Collection<QuadItem<T>> mItems = new LinkedHashSet();
private final PointQuadTree<QuadItem<T>> mQuadTree = new PointQuadTree<>(0.0d, 1.0d, 0.0d, 1.0d);
@Override // com.google.maps.android.clustering.algo.Algorithm
public boolean addItem(T t) {
boolean zAdd;
QuadItem<T> quadItem = new QuadItem<>(t);
synchronized (this.mQuadTree) {
zAdd = this.mItems.add(quadItem);
if (zAdd) {
this.mQuadTree.add(quadItem);
}
}
return zAdd;
}
@Override // com.google.maps.android.clustering.algo.Algorithm
public boolean addItems(Collection<T> collection) {
Iterator<T> it = collection.iterator();
boolean z = false;
while (it.hasNext()) {
if (addItem(it.next())) {
z = true;
}
}
return z;
}
@Override // com.google.maps.android.clustering.algo.Algorithm
public void clearItems() {
synchronized (this.mQuadTree) {
this.mItems.clear();
this.mQuadTree.clear();
}
}
@Override // com.google.maps.android.clustering.algo.Algorithm
public boolean removeItem(T t) {
boolean zRemove;
QuadItem quadItem = new QuadItem(t);
synchronized (this.mQuadTree) {
zRemove = this.mItems.remove(quadItem);
if (zRemove) {
this.mQuadTree.remove(quadItem);
}
}
return zRemove;
}
@Override // com.google.maps.android.clustering.algo.Algorithm
public boolean removeItems(Collection<T> collection) {
boolean z;
synchronized (this.mQuadTree) {
Iterator<T> it = collection.iterator();
z = false;
while (it.hasNext()) {
QuadItem quadItem = new QuadItem(it.next());
if (this.mItems.remove(quadItem)) {
this.mQuadTree.remove(quadItem);
z = true;
}
}
}
return z;
}
@Override // com.google.maps.android.clustering.algo.Algorithm
public boolean updateItem(T t) {
boolean zRemoveItem;
synchronized (this.mQuadTree) {
zRemoveItem = removeItem(t);
if (zRemoveItem) {
zRemoveItem = addItem(t);
}
}
return zRemoveItem;
}
/* JADX WARN: Multi-variable type inference failed */
@Override // com.google.maps.android.clustering.algo.Algorithm
public Set<? extends Cluster<T>> getClusters(float f) {
double dPow = (((double) this.mMaxDistance) / Math.pow(2.0d, (int) f)) / 256.0d;
HashSet hashSet = new HashSet();
HashSet hashSet2 = new HashSet();
HashMap map = new HashMap();
HashMap map2 = new HashMap();
synchronized (this.mQuadTree) {
Iterator<QuadItem<T>> it = getClusteringItems(this.mQuadTree, f).iterator();
while (it.hasNext()) {
QuadItem<T> next = it.next();
if (!hashSet.contains(next)) {
Collection<T> collectionSearch = this.mQuadTree.search(createBoundsFromSpan(next.getPoint(), dPow));
if (collectionSearch.size() == 1) {
hashSet2.add(next);
hashSet.add(next);
map.put(next, Double.valueOf(0.0d));
} else {
StaticCluster staticCluster = new StaticCluster(((QuadItem) next).mClusterItem.getPosition());
hashSet2.add(staticCluster);
for (T t : collectionSearch) {
Double d = (Double) map.get(t);
Iterator<QuadItem<T>> it2 = it;
double dDistanceSquared = distanceSquared(t.getPoint(), next.getPoint());
if (d == null) {
map.put(t, Double.valueOf(dDistanceSquared));
staticCluster.add(t.mClusterItem);
map2.put(t, staticCluster);
} else if (d.doubleValue() >= dDistanceSquared) {
((StaticCluster) map2.get(t)).remove(t.mClusterItem);
map.put(t, Double.valueOf(dDistanceSquared));
staticCluster.add(t.mClusterItem);
map2.put(t, staticCluster);
}
it = it2;
}
hashSet.addAll(collectionSearch);
it = it;
}
}
}
}
return hashSet2;
}
protected Collection<QuadItem<T>> getClusteringItems(PointQuadTree<QuadItem<T>> pointQuadTree, float f) {
return this.mItems;
}
@Override // com.google.maps.android.clustering.algo.Algorithm
public Collection<T> getItems() {
LinkedHashSet linkedHashSet = new LinkedHashSet();
synchronized (this.mQuadTree) {
Iterator<QuadItem<T>> it = this.mItems.iterator();
while (it.hasNext()) {
linkedHashSet.add(((QuadItem) it.next()).mClusterItem);
}
}
return linkedHashSet;
}
@Override // com.google.maps.android.clustering.algo.Algorithm
public void setMaxDistanceBetweenClusteredItems(int i) {
this.mMaxDistance = i;
}
@Override // com.google.maps.android.clustering.algo.Algorithm
public int getMaxDistanceBetweenClusteredItems() {
return this.mMaxDistance;
}
private double distanceSquared(Point point, Point point2) {
return ((point.x - point2.x) * (point.x - point2.x)) + ((point.y - point2.y) * (point.y - point2.y));
}
private Bounds createBoundsFromSpan(Point point, double d) {
double d2 = d / 2.0d;
return new Bounds(point.x - d2, point.x + d2, point.y - d2, point.y + d2);
}
protected static class QuadItem<T extends ClusterItem> implements PointQuadTree.Item, Cluster<T> {
private final T mClusterItem;
private final Point mPoint;
private final LatLng mPosition;
private Set<T> singletonSet;
@Override // com.google.maps.android.clustering.Cluster
public int getSize() {
return 1;
}
private QuadItem(T t) {
this.mClusterItem = t;
LatLng position = t.getPosition();
this.mPosition = position;
this.mPoint = NonHierarchicalDistanceBasedAlgorithm.PROJECTION.toPoint(position);
this.singletonSet = Collections.singleton(t);
}
@Override // com.google.maps.android.quadtree.PointQuadTree.Item
public Point getPoint() {
return this.mPoint;
}
@Override // com.google.maps.android.clustering.Cluster
public LatLng getPosition() {
return this.mPosition;
}
@Override // com.google.maps.android.clustering.Cluster
public Set<T> getItems() {
return this.singletonSet;
}
public int hashCode() {
return this.mClusterItem.hashCode();
}
public boolean equals(Object obj) {
if (obj instanceof QuadItem) {
return ((QuadItem) obj).mClusterItem.equals(this.mClusterItem);
}
return false;
}
}
}
@@ -0,0 +1,68 @@
package com.google.maps.android.clustering.algo;
import com.google.android.gms.maps.model.CameraPosition;
import com.google.android.gms.maps.model.LatLng;
import com.google.maps.android.clustering.ClusterItem;
import com.google.maps.android.clustering.algo.NonHierarchicalDistanceBasedAlgorithm;
import com.google.maps.android.geometry.Bounds;
import com.google.maps.android.projection.Point;
import com.google.maps.android.projection.SphericalMercatorProjection;
import com.google.maps.android.quadtree.PointQuadTree;
import java.util.ArrayList;
import java.util.Collection;
/* JADX INFO: loaded from: classes2.dex */
public class NonHierarchicalViewBasedAlgorithm<T extends ClusterItem> extends NonHierarchicalDistanceBasedAlgorithm<T> implements ScreenBasedAlgorithm<T> {
private static final SphericalMercatorProjection PROJECTION = new SphericalMercatorProjection(1.0d);
private LatLng mMapCenter;
private int mViewHeight;
private int mViewWidth;
@Override // com.google.maps.android.clustering.algo.ScreenBasedAlgorithm
public boolean shouldReclusterOnMapMovement() {
return true;
}
public NonHierarchicalViewBasedAlgorithm(int i, int i2) {
this.mViewWidth = i;
this.mViewHeight = i2;
}
@Override // com.google.maps.android.clustering.algo.ScreenBasedAlgorithm
public void onCameraChange(CameraPosition cameraPosition) {
this.mMapCenter = cameraPosition.target;
}
@Override // com.google.maps.android.clustering.algo.NonHierarchicalDistanceBasedAlgorithm
protected Collection<NonHierarchicalDistanceBasedAlgorithm.QuadItem<T>> getClusteringItems(PointQuadTree<NonHierarchicalDistanceBasedAlgorithm.QuadItem<T>> pointQuadTree, float f) {
Bounds visibleBounds = getVisibleBounds(f);
ArrayList arrayList = new ArrayList();
if (visibleBounds.minX < 0.0d) {
arrayList.addAll(pointQuadTree.search(new Bounds(visibleBounds.minX + 1.0d, 1.0d, visibleBounds.minY, visibleBounds.maxY)));
visibleBounds = new Bounds(0.0d, visibleBounds.maxX, visibleBounds.minY, visibleBounds.maxY);
}
if (visibleBounds.maxX > 1.0d) {
arrayList.addAll(pointQuadTree.search(new Bounds(0.0d, visibleBounds.maxX - 1.0d, visibleBounds.minY, visibleBounds.maxY)));
visibleBounds = new Bounds(visibleBounds.minX, 1.0d, visibleBounds.minY, visibleBounds.maxY);
}
arrayList.addAll(pointQuadTree.search(visibleBounds));
return arrayList;
}
public void updateViewSize(int i, int i2) {
this.mViewWidth = i;
this.mViewHeight = i2;
}
private Bounds getVisibleBounds(float f) {
LatLng latLng = this.mMapCenter;
if (latLng == null) {
return new Bounds(0.0d, 0.0d, 0.0d, 0.0d);
}
Point point = PROJECTION.toPoint(latLng);
double d = f;
double dPow = ((((double) this.mViewWidth) / Math.pow(2.0d, d)) / 256.0d) / 2.0d;
double dPow2 = ((((double) this.mViewHeight) / Math.pow(2.0d, d)) / 256.0d) / 2.0d;
return new Bounds(point.x - dPow, point.x + dPow, point.y - dPow2, point.y + dPow2);
}
}
@@ -0,0 +1,143 @@
package com.google.maps.android.clustering.algo;
import androidx.collection.LruCache;
import com.google.maps.android.clustering.Cluster;
import com.google.maps.android.clustering.ClusterItem;
import java.util.Collection;
import java.util.Set;
import java.util.concurrent.Executor;
import java.util.concurrent.Executors;
import java.util.concurrent.locks.ReadWriteLock;
import java.util.concurrent.locks.ReentrantReadWriteLock;
/* JADX INFO: loaded from: classes2.dex */
public class PreCachingAlgorithmDecorator<T extends ClusterItem> extends AbstractAlgorithm<T> {
private final Algorithm<T> mAlgorithm;
private final LruCache<Integer, Set<? extends Cluster<T>>> mCache = new LruCache<>(5);
private final ReadWriteLock mCacheLock = new ReentrantReadWriteLock();
private final Executor mExecutor = Executors.newCachedThreadPool();
public PreCachingAlgorithmDecorator(Algorithm<T> algorithm) {
this.mAlgorithm = algorithm;
}
@Override // com.google.maps.android.clustering.algo.Algorithm
public boolean addItem(T t) {
boolean zAddItem = this.mAlgorithm.addItem(t);
if (zAddItem) {
clearCache();
}
return zAddItem;
}
@Override // com.google.maps.android.clustering.algo.Algorithm
public boolean addItems(Collection<T> collection) {
boolean zAddItems = this.mAlgorithm.addItems(collection);
if (zAddItems) {
clearCache();
}
return zAddItems;
}
@Override // com.google.maps.android.clustering.algo.Algorithm
public void clearItems() {
this.mAlgorithm.clearItems();
clearCache();
}
@Override // com.google.maps.android.clustering.algo.Algorithm
public boolean removeItem(T t) {
boolean zRemoveItem = this.mAlgorithm.removeItem(t);
if (zRemoveItem) {
clearCache();
}
return zRemoveItem;
}
@Override // com.google.maps.android.clustering.algo.Algorithm
public boolean removeItems(Collection<T> collection) {
boolean zRemoveItems = this.mAlgorithm.removeItems(collection);
if (zRemoveItems) {
clearCache();
}
return zRemoveItems;
}
@Override // com.google.maps.android.clustering.algo.Algorithm
public boolean updateItem(T t) {
boolean zUpdateItem = this.mAlgorithm.updateItem(t);
if (zUpdateItem) {
clearCache();
}
return zUpdateItem;
}
private void clearCache() {
this.mCache.evictAll();
}
@Override // com.google.maps.android.clustering.algo.Algorithm
public Set<? extends Cluster<T>> getClusters(float f) {
int i = (int) f;
Set<? extends Cluster<T>> clustersInternal = getClustersInternal(i);
int i2 = i + 1;
if (this.mCache.get(Integer.valueOf(i2)) == null) {
this.mExecutor.execute(new PrecacheRunnable(i2));
}
int i3 = i - 1;
if (this.mCache.get(Integer.valueOf(i3)) == null) {
this.mExecutor.execute(new PrecacheRunnable(i3));
}
return clustersInternal;
}
@Override // com.google.maps.android.clustering.algo.Algorithm
public Collection<T> getItems() {
return this.mAlgorithm.getItems();
}
@Override // com.google.maps.android.clustering.algo.Algorithm
public void setMaxDistanceBetweenClusteredItems(int i) {
this.mAlgorithm.setMaxDistanceBetweenClusteredItems(i);
clearCache();
}
@Override // com.google.maps.android.clustering.algo.Algorithm
public int getMaxDistanceBetweenClusteredItems() {
return this.mAlgorithm.getMaxDistanceBetweenClusteredItems();
}
/* JADX INFO: Access modifiers changed from: private */
public Set<? extends Cluster<T>> getClustersInternal(int i) {
this.mCacheLock.readLock().lock();
Set<? extends Cluster<T>> clusters = this.mCache.get(Integer.valueOf(i));
this.mCacheLock.readLock().unlock();
if (clusters == null) {
this.mCacheLock.writeLock().lock();
clusters = this.mCache.get(Integer.valueOf(i));
if (clusters == null) {
clusters = this.mAlgorithm.getClusters(i);
this.mCache.put(Integer.valueOf(i), clusters);
}
this.mCacheLock.writeLock().unlock();
}
return clusters;
}
private class PrecacheRunnable implements Runnable {
private final int mZoom;
public PrecacheRunnable(int i) {
this.mZoom = i;
}
@Override // java.lang.Runnable
public void run() {
try {
Thread.sleep((long) ((Math.random() * 500.0d) + 500.0d));
} catch (InterruptedException unused) {
}
PreCachingAlgorithmDecorator.this.getClustersInternal(this.mZoom);
}
}
}
@@ -0,0 +1,11 @@
package com.google.maps.android.clustering.algo;
import com.google.android.gms.maps.model.CameraPosition;
import com.google.maps.android.clustering.ClusterItem;
/* JADX INFO: loaded from: classes2.dex */
public interface ScreenBasedAlgorithm<T extends ClusterItem> extends Algorithm<T> {
void onCameraChange(CameraPosition cameraPosition);
boolean shouldReclusterOnMapMovement();
}
@@ -0,0 +1,75 @@
package com.google.maps.android.clustering.algo;
import com.google.android.gms.maps.model.CameraPosition;
import com.google.maps.android.clustering.Cluster;
import com.google.maps.android.clustering.ClusterItem;
import java.util.Collection;
import java.util.Set;
/* JADX INFO: loaded from: classes2.dex */
public class ScreenBasedAlgorithmAdapter<T extends ClusterItem> extends AbstractAlgorithm<T> implements ScreenBasedAlgorithm<T> {
private Algorithm<T> mAlgorithm;
@Override // com.google.maps.android.clustering.algo.ScreenBasedAlgorithm
public void onCameraChange(CameraPosition cameraPosition) {
}
@Override // com.google.maps.android.clustering.algo.ScreenBasedAlgorithm
public boolean shouldReclusterOnMapMovement() {
return false;
}
public ScreenBasedAlgorithmAdapter(Algorithm<T> algorithm) {
this.mAlgorithm = algorithm;
}
@Override // com.google.maps.android.clustering.algo.Algorithm
public boolean addItem(T t) {
return this.mAlgorithm.addItem(t);
}
@Override // com.google.maps.android.clustering.algo.Algorithm
public boolean addItems(Collection<T> collection) {
return this.mAlgorithm.addItems(collection);
}
@Override // com.google.maps.android.clustering.algo.Algorithm
public void clearItems() {
this.mAlgorithm.clearItems();
}
@Override // com.google.maps.android.clustering.algo.Algorithm
public boolean removeItem(T t) {
return this.mAlgorithm.removeItem(t);
}
@Override // com.google.maps.android.clustering.algo.Algorithm
public boolean removeItems(Collection<T> collection) {
return this.mAlgorithm.removeItems(collection);
}
@Override // com.google.maps.android.clustering.algo.Algorithm
public boolean updateItem(T t) {
return this.mAlgorithm.updateItem(t);
}
@Override // com.google.maps.android.clustering.algo.Algorithm
public Set<? extends Cluster<T>> getClusters(float f) {
return this.mAlgorithm.getClusters(f);
}
@Override // com.google.maps.android.clustering.algo.Algorithm
public Collection<T> getItems() {
return this.mAlgorithm.getItems();
}
@Override // com.google.maps.android.clustering.algo.Algorithm
public void setMaxDistanceBetweenClusteredItems(int i) {
this.mAlgorithm.setMaxDistanceBetweenClusteredItems(i);
}
@Override // com.google.maps.android.clustering.algo.Algorithm
public int getMaxDistanceBetweenClusteredItems() {
return this.mAlgorithm.getMaxDistanceBetweenClusteredItems();
}
}
@@ -0,0 +1,57 @@
package com.google.maps.android.clustering.algo;
import com.google.android.gms.maps.model.LatLng;
import com.google.maps.android.clustering.Cluster;
import com.google.maps.android.clustering.ClusterItem;
import java.util.Collection;
import java.util.LinkedHashSet;
import kotlinx.serialization.json.internal.AbstractJsonLexerKt;
/* JADX INFO: loaded from: classes2.dex */
public class StaticCluster<T extends ClusterItem> implements Cluster<T> {
private final LatLng mCenter;
private final Collection<T> mItems = new LinkedHashSet();
public StaticCluster(LatLng latLng) {
this.mCenter = latLng;
}
public boolean add(T t) {
return this.mItems.add(t);
}
@Override // com.google.maps.android.clustering.Cluster
public LatLng getPosition() {
return this.mCenter;
}
public boolean remove(T t) {
return this.mItems.remove(t);
}
@Override // com.google.maps.android.clustering.Cluster
public Collection<T> getItems() {
return this.mItems;
}
@Override // com.google.maps.android.clustering.Cluster
public int getSize() {
return this.mItems.size();
}
public String toString() {
return "StaticCluster{mCenter=" + this.mCenter + ", mItems.size=" + this.mItems.size() + AbstractJsonLexerKt.END_OBJ;
}
public int hashCode() {
return this.mCenter.hashCode() + this.mItems.hashCode();
}
public boolean equals(Object obj) {
if (!(obj instanceof StaticCluster)) {
return false;
}
StaticCluster staticCluster = (StaticCluster) obj;
return staticCluster.mCenter.equals(this.mCenter) && staticCluster.mItems.equals(this.mItems);
}
}
@@ -0,0 +1,35 @@
package com.google.maps.android.clustering.view;
import com.google.maps.android.clustering.Cluster;
import com.google.maps.android.clustering.ClusterItem;
import com.google.maps.android.clustering.ClusterManager;
import java.util.Set;
/* JADX INFO: loaded from: classes2.dex */
public interface ClusterRenderer<T extends ClusterItem> {
int getClusterTextAppearance(int i);
int getColor(int i);
void onAdd();
void onClustersChanged(Set<? extends Cluster<T>> set);
void onRemove();
void setAnimation(boolean z);
void setAnimationDuration(long j);
void setOnClusterClickListener(ClusterManager.OnClusterClickListener<T> onClusterClickListener);
void setOnClusterInfoWindowClickListener(ClusterManager.OnClusterInfoWindowClickListener<T> onClusterInfoWindowClickListener);
void setOnClusterInfoWindowLongClickListener(ClusterManager.OnClusterInfoWindowLongClickListener<T> onClusterInfoWindowLongClickListener);
void setOnClusterItemClickListener(ClusterManager.OnClusterItemClickListener<T> onClusterItemClickListener);
void setOnClusterItemInfoWindowClickListener(ClusterManager.OnClusterItemInfoWindowClickListener<T> onClusterItemInfoWindowClickListener);
void setOnClusterItemInfoWindowLongClickListener(ClusterManager.OnClusterItemInfoWindowLongClickListener<T> onClusterItemInfoWindowLongClickListener);
}
@@ -0,0 +1,919 @@
package com.google.maps.android.clustering.view;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.TimeInterpolator;
import android.animation.ValueAnimator;
import android.content.Context;
import android.graphics.Color;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.LayerDrawable;
import android.graphics.drawable.ShapeDrawable;
import android.graphics.drawable.shapes.OvalShape;
import android.os.Handler;
import android.os.Looper;
import android.os.Message;
import android.os.MessageQueue;
import android.util.SparseArray;
import android.view.ViewGroup;
import android.view.animation.DecelerateInterpolator;
import androidx.compose.runtime.ComposerKt;
import com.google.android.gms.maps.GoogleMap;
import com.google.android.gms.maps.Projection;
import com.google.android.gms.maps.model.AdvancedMarker;
import com.google.android.gms.maps.model.AdvancedMarkerOptions;
import com.google.android.gms.maps.model.BitmapDescriptor;
import com.google.android.gms.maps.model.BitmapDescriptorFactory;
import com.google.android.gms.maps.model.LatLng;
import com.google.android.gms.maps.model.LatLngBounds;
import com.google.android.gms.maps.model.Marker;
import com.google.maps.android.R;
import com.google.maps.android.clustering.Cluster;
import com.google.maps.android.clustering.ClusterItem;
import com.google.maps.android.clustering.ClusterManager;
import com.google.maps.android.collections.MarkerManager;
import com.google.maps.android.geometry.Point;
import com.google.maps.android.projection.SphericalMercatorProjection;
import com.google.maps.android.ui.IconGenerator;
import com.google.maps.android.ui.SquareTextView;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Queue;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.Executor;
import java.util.concurrent.Executors;
import java.util.concurrent.locks.Condition;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;
/* JADX INFO: loaded from: classes2.dex */
public class DefaultAdvancedMarkersClusterRenderer<T extends ClusterItem> implements ClusterRenderer<T> {
private ClusterManager.OnClusterClickListener<T> mClickListener;
private final ClusterManager<T> mClusterManager;
private MarkerCache<Cluster<T>> mClusterMarkerCache;
private Set<? extends Cluster<T>> mClusters;
private ShapeDrawable mColoredCircleBackground;
private final float mDensity;
private final IconGenerator mIconGenerator;
private ClusterManager.OnClusterInfoWindowClickListener<T> mInfoWindowClickListener;
private ClusterManager.OnClusterInfoWindowLongClickListener<T> mInfoWindowLongClickListener;
private ClusterManager.OnClusterItemClickListener<T> mItemClickListener;
private ClusterManager.OnClusterItemInfoWindowClickListener<T> mItemInfoWindowClickListener;
private ClusterManager.OnClusterItemInfoWindowLongClickListener<T> mItemInfoWindowLongClickListener;
private final GoogleMap mMap;
private MarkerCache<T> mMarkerCache;
private final DefaultAdvancedMarkersClusterRenderer<T>.ViewModifier mViewModifier;
private float mZoom;
private static final int[] BUCKETS = {10, 20, 50, 100, ComposerKt.invocationKey, 500, 1000};
private static final TimeInterpolator ANIMATION_INTERP = new DecelerateInterpolator();
private final Executor mExecutor = Executors.newSingleThreadExecutor();
private Set<MarkerWithPosition> mMarkers = Collections.newSetFromMap(new ConcurrentHashMap());
private SparseArray<BitmapDescriptor> mIcons = new SparseArray<>();
private int mMinClusterSize = 4;
private boolean mAnimate = true;
private long mAnimationDurationMs = 300;
protected void onClusterItemRendered(T t, Marker marker) {
}
protected void onClusterRendered(Cluster<T> cluster, Marker marker) {
}
public DefaultAdvancedMarkersClusterRenderer(Context context, GoogleMap googleMap, ClusterManager<T> clusterManager) {
this.mMarkerCache = new MarkerCache<>();
this.mClusterMarkerCache = new MarkerCache<>();
this.mViewModifier = new ViewModifier();
this.mMap = googleMap;
this.mDensity = context.getResources().getDisplayMetrics().density;
IconGenerator iconGenerator = new IconGenerator(context);
this.mIconGenerator = iconGenerator;
iconGenerator.setContentView(makeSquareTextView(context));
iconGenerator.setTextAppearance(R.style.amu_ClusterIcon_TextAppearance);
iconGenerator.setBackground(makeClusterBackground());
this.mClusterManager = clusterManager;
}
@Override // com.google.maps.android.clustering.view.ClusterRenderer
public void onAdd() {
this.mClusterManager.getMarkerCollection().setOnMarkerClickListener(new GoogleMap.OnMarkerClickListener() { // from class: com.google.maps.android.clustering.view.DefaultAdvancedMarkersClusterRenderer.1
/* JADX WARN: Multi-variable type inference failed */
@Override // com.google.android.gms.maps.GoogleMap.OnMarkerClickListener
public boolean onMarkerClick(Marker marker) {
return DefaultAdvancedMarkersClusterRenderer.this.mItemClickListener != null && DefaultAdvancedMarkersClusterRenderer.this.mItemClickListener.onClusterItemClick((ClusterItem) DefaultAdvancedMarkersClusterRenderer.this.mMarkerCache.get(marker));
}
});
this.mClusterManager.getMarkerCollection().setOnInfoWindowClickListener(new GoogleMap.OnInfoWindowClickListener() { // from class: com.google.maps.android.clustering.view.DefaultAdvancedMarkersClusterRenderer.2
/* JADX WARN: Multi-variable type inference failed */
@Override // com.google.android.gms.maps.GoogleMap.OnInfoWindowClickListener
public void onInfoWindowClick(Marker marker) {
if (DefaultAdvancedMarkersClusterRenderer.this.mItemInfoWindowClickListener != null) {
DefaultAdvancedMarkersClusterRenderer.this.mItemInfoWindowClickListener.onClusterItemInfoWindowClick((ClusterItem) DefaultAdvancedMarkersClusterRenderer.this.mMarkerCache.get(marker));
}
}
});
this.mClusterManager.getMarkerCollection().setOnInfoWindowLongClickListener(new GoogleMap.OnInfoWindowLongClickListener() { // from class: com.google.maps.android.clustering.view.DefaultAdvancedMarkersClusterRenderer$$ExternalSyntheticLambda0
@Override // com.google.android.gms.maps.GoogleMap.OnInfoWindowLongClickListener
public final void onInfoWindowLongClick(Marker marker) {
this.f$0.m7754xfde6dfc5(marker);
}
});
this.mClusterManager.getClusterMarkerCollection().setOnMarkerClickListener(new GoogleMap.OnMarkerClickListener() { // from class: com.google.maps.android.clustering.view.DefaultAdvancedMarkersClusterRenderer$$ExternalSyntheticLambda1
@Override // com.google.android.gms.maps.GoogleMap.OnMarkerClickListener
public final boolean onMarkerClick(Marker marker) {
return this.f$0.m7755x50fc206(marker);
}
});
this.mClusterManager.getClusterMarkerCollection().setOnInfoWindowClickListener(new GoogleMap.OnInfoWindowClickListener() { // from class: com.google.maps.android.clustering.view.DefaultAdvancedMarkersClusterRenderer$$ExternalSyntheticLambda2
@Override // com.google.android.gms.maps.GoogleMap.OnInfoWindowClickListener
public final void onInfoWindowClick(Marker marker) {
this.f$0.m7756xc38a447(marker);
}
});
this.mClusterManager.getClusterMarkerCollection().setOnInfoWindowLongClickListener(new GoogleMap.OnInfoWindowLongClickListener() { // from class: com.google.maps.android.clustering.view.DefaultAdvancedMarkersClusterRenderer$$ExternalSyntheticLambda3
@Override // com.google.android.gms.maps.GoogleMap.OnInfoWindowLongClickListener
public final void onInfoWindowLongClick(Marker marker) {
this.f$0.m7757x13618688(marker);
}
});
}
/* JADX INFO: renamed from: lambda$onAdd$0$com-google-maps-android-clustering-view-DefaultAdvancedMarkersClusterRenderer, reason: not valid java name */
/* synthetic */ void m7754xfde6dfc5(Marker marker) {
ClusterManager.OnClusterItemInfoWindowLongClickListener<T> onClusterItemInfoWindowLongClickListener = this.mItemInfoWindowLongClickListener;
if (onClusterItemInfoWindowLongClickListener != null) {
onClusterItemInfoWindowLongClickListener.onClusterItemInfoWindowLongClick(this.mMarkerCache.get(marker));
}
}
/* JADX INFO: renamed from: lambda$onAdd$1$com-google-maps-android-clustering-view-DefaultAdvancedMarkersClusterRenderer, reason: not valid java name */
/* synthetic */ boolean m7755x50fc206(Marker marker) {
ClusterManager.OnClusterClickListener<T> onClusterClickListener = this.mClickListener;
return onClusterClickListener != null && onClusterClickListener.onClusterClick(this.mClusterMarkerCache.get(marker));
}
/* JADX INFO: renamed from: lambda$onAdd$2$com-google-maps-android-clustering-view-DefaultAdvancedMarkersClusterRenderer, reason: not valid java name */
/* synthetic */ void m7756xc38a447(Marker marker) {
ClusterManager.OnClusterInfoWindowClickListener<T> onClusterInfoWindowClickListener = this.mInfoWindowClickListener;
if (onClusterInfoWindowClickListener != null) {
onClusterInfoWindowClickListener.onClusterInfoWindowClick(this.mClusterMarkerCache.get(marker));
}
}
/* JADX INFO: renamed from: lambda$onAdd$3$com-google-maps-android-clustering-view-DefaultAdvancedMarkersClusterRenderer, reason: not valid java name */
/* synthetic */ void m7757x13618688(Marker marker) {
ClusterManager.OnClusterInfoWindowLongClickListener<T> onClusterInfoWindowLongClickListener = this.mInfoWindowLongClickListener;
if (onClusterInfoWindowLongClickListener != null) {
onClusterInfoWindowLongClickListener.onClusterInfoWindowLongClick(this.mClusterMarkerCache.get(marker));
}
}
@Override // com.google.maps.android.clustering.view.ClusterRenderer
public void onRemove() {
this.mClusterManager.getMarkerCollection().setOnMarkerClickListener(null);
this.mClusterManager.getMarkerCollection().setOnInfoWindowClickListener(null);
this.mClusterManager.getMarkerCollection().setOnInfoWindowLongClickListener(null);
this.mClusterManager.getClusterMarkerCollection().setOnMarkerClickListener(null);
this.mClusterManager.getClusterMarkerCollection().setOnInfoWindowClickListener(null);
this.mClusterManager.getClusterMarkerCollection().setOnInfoWindowLongClickListener(null);
}
private LayerDrawable makeClusterBackground() {
this.mColoredCircleBackground = new ShapeDrawable(new OvalShape());
ShapeDrawable shapeDrawable = new ShapeDrawable(new OvalShape());
shapeDrawable.getPaint().setColor(-2130706433);
LayerDrawable layerDrawable = new LayerDrawable(new Drawable[]{shapeDrawable, this.mColoredCircleBackground});
int i = (int) (this.mDensity * 3.0f);
layerDrawable.setLayerInset(1, i, i, i, i);
return layerDrawable;
}
private SquareTextView makeSquareTextView(Context context) {
SquareTextView squareTextView = new SquareTextView(context);
squareTextView.setLayoutParams(new ViewGroup.LayoutParams(-2, -2));
squareTextView.setId(R.id.amu_text);
int i = (int) (this.mDensity * 12.0f);
squareTextView.setPadding(i, i, i, i);
return squareTextView;
}
@Override // com.google.maps.android.clustering.view.ClusterRenderer
public int getColor(int i) {
float fMin = 300.0f - Math.min(i, 300.0f);
return Color.HSVToColor(new float[]{((fMin * fMin) / 90000.0f) * 220.0f, 1.0f, 0.6f});
}
@Override // com.google.maps.android.clustering.view.ClusterRenderer
public int getClusterTextAppearance(int i) {
return R.style.amu_ClusterIcon_TextAppearance;
}
protected String getClusterText(int i) {
if (i < BUCKETS[0]) {
return String.valueOf(i);
}
return i + org.slf4j.Marker.ANY_NON_NULL_MARKER;
}
protected int getBucket(Cluster<T> cluster) {
int size = cluster.getSize();
int i = 0;
if (size <= BUCKETS[0]) {
return size;
}
while (true) {
int[] iArr = BUCKETS;
if (i < iArr.length - 1) {
int i2 = i + 1;
if (size < iArr[i2]) {
return iArr[i];
}
i = i2;
} else {
return iArr[iArr.length - 1];
}
}
}
public int getMinClusterSize() {
return this.mMinClusterSize;
}
public void setMinClusterSize(int i) {
this.mMinClusterSize = i;
}
/* JADX INFO: Access modifiers changed from: private */
class ViewModifier extends Handler {
private static final int RUN_TASK = 0;
private static final int TASK_FINISHED = 1;
private DefaultAdvancedMarkersClusterRenderer<T>.RenderTask mNextClusters;
private boolean mViewModificationInProgress;
private ViewModifier() {
this.mViewModificationInProgress = false;
this.mNextClusters = null;
}
@Override // android.os.Handler
public void handleMessage(Message message) {
DefaultAdvancedMarkersClusterRenderer<T>.RenderTask renderTask;
if (message.what == 1) {
this.mViewModificationInProgress = false;
if (this.mNextClusters != null) {
sendEmptyMessage(0);
return;
}
return;
}
removeMessages(0);
if (this.mViewModificationInProgress || this.mNextClusters == null) {
return;
}
Projection projection = DefaultAdvancedMarkersClusterRenderer.this.mMap.getProjection();
synchronized (this) {
renderTask = this.mNextClusters;
this.mNextClusters = null;
this.mViewModificationInProgress = true;
}
renderTask.setCallback(new Runnable() { // from class: com.google.maps.android.clustering.view.DefaultAdvancedMarkersClusterRenderer$ViewModifier$$ExternalSyntheticLambda0
@Override // java.lang.Runnable
public final void run() {
this.f$0.m7758x1c4a00de();
}
});
renderTask.setProjection(projection);
renderTask.setMapZoom(DefaultAdvancedMarkersClusterRenderer.this.mMap.getCameraPosition().zoom);
DefaultAdvancedMarkersClusterRenderer.this.mExecutor.execute(renderTask);
}
/* JADX INFO: renamed from: lambda$handleMessage$0$com-google-maps-android-clustering-view-DefaultAdvancedMarkersClusterRenderer$ViewModifier, reason: not valid java name */
/* synthetic */ void m7758x1c4a00de() {
sendEmptyMessage(1);
}
public void queue(Set<? extends Cluster<T>> set) {
synchronized (this) {
this.mNextClusters = new RenderTask(set);
}
sendEmptyMessage(0);
}
}
protected boolean shouldRenderAsCluster(Cluster<T> cluster) {
return cluster.getSize() >= this.mMinClusterSize;
}
protected boolean shouldRender(Set<? extends Cluster<T>> set, Set<? extends Cluster<T>> set2) {
return !set2.equals(set);
}
private class RenderTask implements Runnable {
final Set<? extends Cluster<T>> clusters;
private Runnable mCallback;
private float mMapZoom;
private Projection mProjection;
private SphericalMercatorProjection mSphericalMercatorProjection;
private RenderTask(Set<? extends Cluster<T>> set) {
this.clusters = set;
}
public void setCallback(Runnable runnable) {
this.mCallback = runnable;
}
public void setProjection(Projection projection) {
this.mProjection = projection;
}
public void setMapZoom(float f) {
this.mMapZoom = f;
this.mSphericalMercatorProjection = new SphericalMercatorProjection(Math.pow(2.0d, Math.min(f, DefaultAdvancedMarkersClusterRenderer.this.mZoom)) * 256.0d);
}
@Override // java.lang.Runnable
public void run() {
LatLngBounds latLngBoundsBuild;
ArrayList arrayList;
DefaultAdvancedMarkersClusterRenderer defaultAdvancedMarkersClusterRenderer = DefaultAdvancedMarkersClusterRenderer.this;
if (!defaultAdvancedMarkersClusterRenderer.shouldRender(defaultAdvancedMarkersClusterRenderer.immutableOf(defaultAdvancedMarkersClusterRenderer.mClusters), DefaultAdvancedMarkersClusterRenderer.this.immutableOf(this.clusters))) {
this.mCallback.run();
return;
}
ArrayList arrayList2 = null;
MarkerModifier markerModifier = new MarkerModifier();
float f = this.mMapZoom;
boolean z = f > DefaultAdvancedMarkersClusterRenderer.this.mZoom;
float f2 = f - DefaultAdvancedMarkersClusterRenderer.this.mZoom;
Set<MarkerWithPosition> set = DefaultAdvancedMarkersClusterRenderer.this.mMarkers;
try {
latLngBoundsBuild = this.mProjection.getVisibleRegion().latLngBounds;
} catch (Exception e) {
e.printStackTrace();
latLngBoundsBuild = LatLngBounds.builder().include(new LatLng(0.0d, 0.0d)).build();
}
if (DefaultAdvancedMarkersClusterRenderer.this.mClusters == null || !DefaultAdvancedMarkersClusterRenderer.this.mAnimate) {
arrayList = null;
} else {
arrayList = new ArrayList();
for (Cluster<T> cluster : DefaultAdvancedMarkersClusterRenderer.this.mClusters) {
if (DefaultAdvancedMarkersClusterRenderer.this.shouldRenderAsCluster(cluster) && latLngBoundsBuild.contains(cluster.getPosition())) {
arrayList.add(this.mSphericalMercatorProjection.toPoint(cluster.getPosition()));
}
}
}
Set setNewSetFromMap = Collections.newSetFromMap(new ConcurrentHashMap());
for (Cluster<T> cluster2 : this.clusters) {
boolean zContains = latLngBoundsBuild.contains(cluster2.getPosition());
if (z && zContains && DefaultAdvancedMarkersClusterRenderer.this.mAnimate) {
Point pointFindClosestCluster = DefaultAdvancedMarkersClusterRenderer.this.findClosestCluster(arrayList, this.mSphericalMercatorProjection.toPoint(cluster2.getPosition()));
if (pointFindClosestCluster != null) {
markerModifier.add(true, new CreateMarkerTask(cluster2, setNewSetFromMap, this.mSphericalMercatorProjection.toLatLng(pointFindClosestCluster)));
} else {
markerModifier.add(true, new CreateMarkerTask(cluster2, setNewSetFromMap, null));
}
} else {
markerModifier.add(zContains, new CreateMarkerTask(cluster2, setNewSetFromMap, null));
}
}
markerModifier.waitUntilFree();
set.removeAll(setNewSetFromMap);
if (DefaultAdvancedMarkersClusterRenderer.this.mAnimate) {
arrayList2 = new ArrayList();
for (Cluster<T> cluster3 : this.clusters) {
if (DefaultAdvancedMarkersClusterRenderer.this.shouldRenderAsCluster(cluster3) && latLngBoundsBuild.contains(cluster3.getPosition())) {
arrayList2.add(this.mSphericalMercatorProjection.toPoint(cluster3.getPosition()));
}
}
}
for (MarkerWithPosition markerWithPosition : set) {
boolean zContains2 = latLngBoundsBuild.contains(markerWithPosition.position);
if (!z && f2 > -3.0f && zContains2 && DefaultAdvancedMarkersClusterRenderer.this.mAnimate) {
Point pointFindClosestCluster2 = DefaultAdvancedMarkersClusterRenderer.this.findClosestCluster(arrayList2, this.mSphericalMercatorProjection.toPoint(markerWithPosition.position));
if (pointFindClosestCluster2 != null) {
markerModifier.animateThenRemove(markerWithPosition, markerWithPosition.position, this.mSphericalMercatorProjection.toLatLng(pointFindClosestCluster2));
} else {
markerModifier.remove(true, markerWithPosition.marker);
}
} else {
markerModifier.remove(zContains2, markerWithPosition.marker);
}
}
markerModifier.waitUntilFree();
DefaultAdvancedMarkersClusterRenderer.this.mMarkers = setNewSetFromMap;
DefaultAdvancedMarkersClusterRenderer.this.mClusters = this.clusters;
DefaultAdvancedMarkersClusterRenderer.this.mZoom = f;
this.mCallback.run();
}
}
@Override // com.google.maps.android.clustering.view.ClusterRenderer
public void onClustersChanged(Set<? extends Cluster<T>> set) {
this.mViewModifier.queue(set);
}
@Override // com.google.maps.android.clustering.view.ClusterRenderer
public void setOnClusterClickListener(ClusterManager.OnClusterClickListener<T> onClusterClickListener) {
this.mClickListener = onClusterClickListener;
}
@Override // com.google.maps.android.clustering.view.ClusterRenderer
public void setOnClusterInfoWindowClickListener(ClusterManager.OnClusterInfoWindowClickListener<T> onClusterInfoWindowClickListener) {
this.mInfoWindowClickListener = onClusterInfoWindowClickListener;
}
@Override // com.google.maps.android.clustering.view.ClusterRenderer
public void setOnClusterInfoWindowLongClickListener(ClusterManager.OnClusterInfoWindowLongClickListener<T> onClusterInfoWindowLongClickListener) {
this.mInfoWindowLongClickListener = onClusterInfoWindowLongClickListener;
}
@Override // com.google.maps.android.clustering.view.ClusterRenderer
public void setOnClusterItemClickListener(ClusterManager.OnClusterItemClickListener<T> onClusterItemClickListener) {
this.mItemClickListener = onClusterItemClickListener;
}
@Override // com.google.maps.android.clustering.view.ClusterRenderer
public void setOnClusterItemInfoWindowClickListener(ClusterManager.OnClusterItemInfoWindowClickListener<T> onClusterItemInfoWindowClickListener) {
this.mItemInfoWindowClickListener = onClusterItemInfoWindowClickListener;
}
@Override // com.google.maps.android.clustering.view.ClusterRenderer
public void setOnClusterItemInfoWindowLongClickListener(ClusterManager.OnClusterItemInfoWindowLongClickListener<T> onClusterItemInfoWindowLongClickListener) {
this.mItemInfoWindowLongClickListener = onClusterItemInfoWindowLongClickListener;
}
@Override // com.google.maps.android.clustering.view.ClusterRenderer
public void setAnimation(boolean z) {
this.mAnimate = z;
}
@Override // com.google.maps.android.clustering.view.ClusterRenderer
public void setAnimationDuration(long j) {
this.mAnimationDurationMs = j;
}
/* JADX INFO: Access modifiers changed from: private */
public Set<? extends Cluster<T>> immutableOf(Set<? extends Cluster<T>> set) {
return set != null ? Collections.unmodifiableSet(set) : Collections.emptySet();
}
private static double distanceSquared(Point point, Point point2) {
return ((point.x - point2.x) * (point.x - point2.x)) + ((point.y - point2.y) * (point.y - point2.y));
}
/* JADX INFO: Access modifiers changed from: private */
public Point findClosestCluster(List<Point> list, Point point) {
Point point2 = null;
if (list != null && !list.isEmpty()) {
int maxDistanceBetweenClusteredItems = this.mClusterManager.getAlgorithm().getMaxDistanceBetweenClusteredItems();
double d = maxDistanceBetweenClusteredItems * maxDistanceBetweenClusteredItems;
for (Point point3 : list) {
double dDistanceSquared = distanceSquared(point3, point);
if (dDistanceSquared < d) {
point2 = point3;
d = dDistanceSquared;
}
}
}
return point2;
}
private class MarkerModifier extends Handler implements MessageQueue.IdleHandler {
private static final int BLANK = 0;
private final Condition busyCondition;
private final Lock lock;
private Queue<DefaultAdvancedMarkersClusterRenderer<T>.AnimationTask> mAnimationTasks;
private Queue<DefaultAdvancedMarkersClusterRenderer<T>.CreateMarkerTask> mCreateMarkerTasks;
private boolean mListenerAdded;
private Queue<DefaultAdvancedMarkersClusterRenderer<T>.CreateMarkerTask> mOnScreenCreateMarkerTasks;
private Queue<Marker> mOnScreenRemoveMarkerTasks;
private Queue<Marker> mRemoveMarkerTasks;
private MarkerModifier() {
super(Looper.getMainLooper());
ReentrantLock reentrantLock = new ReentrantLock();
this.lock = reentrantLock;
this.busyCondition = reentrantLock.newCondition();
this.mCreateMarkerTasks = new LinkedList();
this.mOnScreenCreateMarkerTasks = new LinkedList();
this.mRemoveMarkerTasks = new LinkedList();
this.mOnScreenRemoveMarkerTasks = new LinkedList();
this.mAnimationTasks = new LinkedList();
}
public void add(boolean z, DefaultAdvancedMarkersClusterRenderer<T>.CreateMarkerTask createMarkerTask) {
this.lock.lock();
sendEmptyMessage(0);
if (z) {
this.mOnScreenCreateMarkerTasks.add(createMarkerTask);
} else {
this.mCreateMarkerTasks.add(createMarkerTask);
}
this.lock.unlock();
}
public void remove(boolean z, Marker marker) {
this.lock.lock();
sendEmptyMessage(0);
if (z) {
this.mOnScreenRemoveMarkerTasks.add(marker);
} else {
this.mRemoveMarkerTasks.add(marker);
}
this.lock.unlock();
}
public void animate(MarkerWithPosition markerWithPosition, LatLng latLng, LatLng latLng2) {
this.lock.lock();
this.mAnimationTasks.add(new AnimationTask(markerWithPosition, latLng, latLng2));
this.lock.unlock();
}
public void animateThenRemove(MarkerWithPosition markerWithPosition, LatLng latLng, LatLng latLng2) {
this.lock.lock();
DefaultAdvancedMarkersClusterRenderer<T>.AnimationTask animationTask = new AnimationTask(markerWithPosition, latLng, latLng2);
animationTask.removeOnAnimationComplete(DefaultAdvancedMarkersClusterRenderer.this.mClusterManager.getMarkerManager());
this.mAnimationTasks.add(animationTask);
this.lock.unlock();
}
@Override // android.os.Handler
public void handleMessage(Message message) {
if (!this.mListenerAdded) {
Looper.myQueue().addIdleHandler(this);
this.mListenerAdded = true;
}
removeMessages(0);
this.lock.lock();
for (int i = 0; i < 10; i++) {
try {
performNextTask();
} finally {
this.lock.unlock();
}
}
if (!isBusy()) {
this.mListenerAdded = false;
Looper.myQueue().removeIdleHandler(this);
this.busyCondition.signalAll();
} else {
sendEmptyMessageDelayed(0, 10L);
}
}
private void performNextTask() {
if (!this.mOnScreenRemoveMarkerTasks.isEmpty()) {
removeMarker(this.mOnScreenRemoveMarkerTasks.poll());
return;
}
if (!this.mAnimationTasks.isEmpty()) {
this.mAnimationTasks.poll().perform();
return;
}
if (this.mOnScreenCreateMarkerTasks.isEmpty()) {
if (this.mCreateMarkerTasks.isEmpty()) {
if (this.mRemoveMarkerTasks.isEmpty()) {
return;
}
removeMarker(this.mRemoveMarkerTasks.poll());
return;
}
this.mCreateMarkerTasks.poll().perform(this);
return;
}
this.mOnScreenCreateMarkerTasks.poll().perform(this);
}
private void removeMarker(Marker marker) {
DefaultAdvancedMarkersClusterRenderer.this.mMarkerCache.remove(marker);
DefaultAdvancedMarkersClusterRenderer.this.mClusterMarkerCache.remove(marker);
DefaultAdvancedMarkersClusterRenderer.this.mClusterManager.getMarkerManager().remove(marker);
}
/* JADX WARN: Removed duplicated region for block: B:14:0x0030 */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct code enable 'Show inconsistent code' option in preferences
*/
public boolean isBusy() {
/*
r2 = this;
java.util.concurrent.locks.Lock r0 = r2.lock // Catch: java.lang.Throwable -> L37
r0.lock() // Catch: java.lang.Throwable -> L37
java.util.Queue<com.google.maps.android.clustering.view.DefaultAdvancedMarkersClusterRenderer<T>$CreateMarkerTask> r0 = r2.mCreateMarkerTasks // Catch: java.lang.Throwable -> L37
boolean r0 = r0.isEmpty() // Catch: java.lang.Throwable -> L37
if (r0 == 0) goto L30
java.util.Queue<com.google.maps.android.clustering.view.DefaultAdvancedMarkersClusterRenderer<T>$CreateMarkerTask> r0 = r2.mOnScreenCreateMarkerTasks // Catch: java.lang.Throwable -> L37
boolean r0 = r0.isEmpty() // Catch: java.lang.Throwable -> L37
if (r0 == 0) goto L30
java.util.Queue<com.google.android.gms.maps.model.Marker> r0 = r2.mOnScreenRemoveMarkerTasks // Catch: java.lang.Throwable -> L37
boolean r0 = r0.isEmpty() // Catch: java.lang.Throwable -> L37
if (r0 == 0) goto L30
java.util.Queue<com.google.android.gms.maps.model.Marker> r0 = r2.mRemoveMarkerTasks // Catch: java.lang.Throwable -> L37
boolean r0 = r0.isEmpty() // Catch: java.lang.Throwable -> L37
if (r0 == 0) goto L30
java.util.Queue<com.google.maps.android.clustering.view.DefaultAdvancedMarkersClusterRenderer<T>$AnimationTask> r0 = r2.mAnimationTasks // Catch: java.lang.Throwable -> L37
boolean r0 = r0.isEmpty() // Catch: java.lang.Throwable -> L37
if (r0 != 0) goto L2e
goto L30
L2e:
r0 = 0
goto L31
L30:
r0 = 1
L31:
java.util.concurrent.locks.Lock r1 = r2.lock
r1.unlock()
return r0
L37:
r0 = move-exception
java.util.concurrent.locks.Lock r1 = r2.lock
r1.unlock()
throw r0
*/
throw new UnsupportedOperationException("Method not decompiled: com.google.maps.android.clustering.view.DefaultAdvancedMarkersClusterRenderer.MarkerModifier.isBusy():boolean");
}
public void waitUntilFree() {
while (isBusy()) {
sendEmptyMessage(0);
this.lock.lock();
try {
try {
if (isBusy()) {
this.busyCondition.await();
}
} catch (InterruptedException e) {
throw new RuntimeException(e);
}
} finally {
this.lock.unlock();
}
}
}
@Override // android.os.MessageQueue.IdleHandler
public boolean queueIdle() {
sendEmptyMessage(0);
return true;
}
}
private static class MarkerCache<T> {
private Map<T, Marker> mCache;
private Map<Marker, T> mCacheReverse;
private MarkerCache() {
this.mCache = new HashMap();
this.mCacheReverse = new HashMap();
}
public Marker get(T t) {
return this.mCache.get(t);
}
public T get(Marker marker) {
return this.mCacheReverse.get(marker);
}
public void put(T t, Marker marker) {
this.mCache.put(t, marker);
this.mCacheReverse.put(marker, t);
}
public void remove(Marker marker) {
T t = this.mCacheReverse.get(marker);
this.mCacheReverse.remove(marker);
this.mCache.remove(t);
}
}
protected void onBeforeClusterItemRendered(T t, AdvancedMarkerOptions advancedMarkerOptions) {
if (t.getTitle() != null && t.getSnippet() != null) {
advancedMarkerOptions.title(t.getTitle());
advancedMarkerOptions.snippet(t.getSnippet());
} else if (t.getTitle() != null) {
advancedMarkerOptions.title(t.getTitle());
} else if (t.getSnippet() != null) {
advancedMarkerOptions.title(t.getSnippet());
}
}
protected void onClusterItemUpdated(T t, Marker marker) {
boolean z = true;
boolean z2 = false;
if (t.getTitle() != null && t.getSnippet() != null) {
if (!t.getTitle().equals(marker.getTitle())) {
marker.setTitle(t.getTitle());
z2 = true;
}
if (!t.getSnippet().equals(marker.getSnippet())) {
marker.setSnippet(t.getSnippet());
z2 = true;
}
} else {
if (t.getSnippet() != null && !t.getSnippet().equals(marker.getTitle())) {
marker.setTitle(t.getSnippet());
} else if (t.getTitle() != null && !t.getTitle().equals(marker.getTitle())) {
marker.setTitle(t.getTitle());
}
z2 = true;
}
if (marker.getPosition().equals(t.getPosition())) {
z = z2;
} else {
marker.setPosition(t.getPosition());
if (t.getZIndex() != null) {
marker.setZIndex(t.getZIndex().floatValue());
}
}
if (z && marker.isInfoWindowShown()) {
marker.showInfoWindow();
}
}
protected void onBeforeClusterRendered(Cluster<T> cluster, AdvancedMarkerOptions advancedMarkerOptions) {
advancedMarkerOptions.icon(getDescriptorForCluster(cluster));
}
protected BitmapDescriptor getDescriptorForCluster(Cluster<T> cluster) {
int bucket = getBucket(cluster);
BitmapDescriptor bitmapDescriptor = this.mIcons.get(bucket);
if (bitmapDescriptor != null) {
return bitmapDescriptor;
}
this.mColoredCircleBackground.getPaint().setColor(getColor(bucket));
this.mIconGenerator.setTextAppearance(getClusterTextAppearance(bucket));
BitmapDescriptor bitmapDescriptorFromBitmap = BitmapDescriptorFactory.fromBitmap(this.mIconGenerator.makeIcon(getClusterText(bucket)));
this.mIcons.put(bucket, bitmapDescriptorFromBitmap);
return bitmapDescriptorFromBitmap;
}
protected void onClusterUpdated(Cluster<T> cluster, AdvancedMarker advancedMarker) {
advancedMarker.setIcon(getDescriptorForCluster(cluster));
}
public Marker getMarker(T t) {
return this.mMarkerCache.get(t);
}
public T getClusterItem(Marker marker) {
return this.mMarkerCache.get(marker);
}
public Marker getMarker(Cluster<T> cluster) {
return this.mClusterMarkerCache.get(cluster);
}
public Cluster<T> getCluster(Marker marker) {
return this.mClusterMarkerCache.get(marker);
}
private class CreateMarkerTask {
private final LatLng animateFrom;
private final Cluster<T> cluster;
private final Set<MarkerWithPosition> newMarkers;
public CreateMarkerTask(Cluster<T> cluster, Set<MarkerWithPosition> set, LatLng latLng) {
this.cluster = cluster;
this.newMarkers = set;
this.animateFrom = latLng;
}
/* JADX INFO: Access modifiers changed from: private */
public void perform(DefaultAdvancedMarkersClusterRenderer<T>.MarkerModifier markerModifier) {
MarkerWithPosition markerWithPosition;
MarkerWithPosition markerWithPosition2;
if (DefaultAdvancedMarkersClusterRenderer.this.shouldRenderAsCluster(this.cluster)) {
AdvancedMarker advancedMarker = (AdvancedMarker) DefaultAdvancedMarkersClusterRenderer.this.mClusterMarkerCache.get(this.cluster);
if (advancedMarker == null) {
AdvancedMarkerOptions advancedMarkerOptions = new AdvancedMarkerOptions();
LatLng position = this.animateFrom;
if (position == null) {
position = this.cluster.getPosition();
}
AdvancedMarkerOptions advancedMarkerOptionsPosition = advancedMarkerOptions.position(position);
DefaultAdvancedMarkersClusterRenderer.this.onBeforeClusterRendered(this.cluster, advancedMarkerOptionsPosition);
advancedMarker = (AdvancedMarker) DefaultAdvancedMarkersClusterRenderer.this.mClusterManager.getClusterMarkerCollection().addMarker(advancedMarkerOptionsPosition);
DefaultAdvancedMarkersClusterRenderer.this.mClusterMarkerCache.put(this.cluster, advancedMarker);
markerWithPosition = new MarkerWithPosition(advancedMarker);
LatLng latLng = this.animateFrom;
if (latLng != null) {
markerModifier.animate(markerWithPosition, latLng, this.cluster.getPosition());
}
} else {
markerWithPosition = new MarkerWithPosition(advancedMarker);
DefaultAdvancedMarkersClusterRenderer.this.onClusterUpdated(this.cluster, advancedMarker);
}
DefaultAdvancedMarkersClusterRenderer.this.onClusterRendered(this.cluster, advancedMarker);
this.newMarkers.add(markerWithPosition);
return;
}
for (T t : this.cluster.getItems()) {
AdvancedMarker advancedMarker2 = (AdvancedMarker) DefaultAdvancedMarkersClusterRenderer.this.mMarkerCache.get(t);
if (advancedMarker2 == null) {
AdvancedMarkerOptions advancedMarkerOptions2 = new AdvancedMarkerOptions();
LatLng latLng2 = this.animateFrom;
if (latLng2 != null) {
advancedMarkerOptions2.position(latLng2);
} else {
advancedMarkerOptions2.position(t.getPosition());
if (t.getZIndex() != null) {
advancedMarkerOptions2.zIndex(t.getZIndex().floatValue());
}
}
DefaultAdvancedMarkersClusterRenderer.this.onBeforeClusterItemRendered(t, advancedMarkerOptions2);
advancedMarker2 = (AdvancedMarker) DefaultAdvancedMarkersClusterRenderer.this.mClusterManager.getMarkerCollection().addMarker(advancedMarkerOptions2);
markerWithPosition2 = new MarkerWithPosition(advancedMarker2);
DefaultAdvancedMarkersClusterRenderer.this.mMarkerCache.put(t, advancedMarker2);
LatLng latLng3 = this.animateFrom;
if (latLng3 != null) {
markerModifier.animate(markerWithPosition2, latLng3, t.getPosition());
}
} else {
markerWithPosition2 = new MarkerWithPosition(advancedMarker2);
DefaultAdvancedMarkersClusterRenderer.this.onClusterItemUpdated(t, advancedMarker2);
}
DefaultAdvancedMarkersClusterRenderer.this.onClusterItemRendered(t, advancedMarker2);
this.newMarkers.add(markerWithPosition2);
}
}
}
private static class MarkerWithPosition {
private final Marker marker;
private LatLng position;
private MarkerWithPosition(Marker marker) {
this.marker = marker;
this.position = marker.getPosition();
}
public boolean equals(Object obj) {
if (obj instanceof MarkerWithPosition) {
return this.marker.equals(((MarkerWithPosition) obj).marker);
}
return false;
}
public int hashCode() {
return this.marker.hashCode();
}
}
private class AnimationTask extends AnimatorListenerAdapter implements ValueAnimator.AnimatorUpdateListener {
private final LatLng from;
private MarkerManager mMarkerManager;
private boolean mRemoveOnComplete;
private final Marker marker;
private final MarkerWithPosition markerWithPosition;
private final LatLng to;
private AnimationTask(MarkerWithPosition markerWithPosition, LatLng latLng, LatLng latLng2) {
this.markerWithPosition = markerWithPosition;
this.marker = markerWithPosition.marker;
this.from = latLng;
this.to = latLng2;
}
public void perform() {
ValueAnimator valueAnimatorOfFloat = ValueAnimator.ofFloat(0.0f, 1.0f);
valueAnimatorOfFloat.setInterpolator(DefaultAdvancedMarkersClusterRenderer.ANIMATION_INTERP);
valueAnimatorOfFloat.setDuration(DefaultAdvancedMarkersClusterRenderer.this.mAnimationDurationMs);
valueAnimatorOfFloat.addUpdateListener(this);
valueAnimatorOfFloat.addListener(this);
valueAnimatorOfFloat.start();
}
@Override // android.animation.AnimatorListenerAdapter, android.animation.Animator.AnimatorListener
public void onAnimationEnd(Animator animator) {
if (this.mRemoveOnComplete) {
DefaultAdvancedMarkersClusterRenderer.this.mMarkerCache.remove(this.marker);
DefaultAdvancedMarkersClusterRenderer.this.mClusterMarkerCache.remove(this.marker);
this.mMarkerManager.remove(this.marker);
}
this.markerWithPosition.position = this.to;
}
public void removeOnAnimationComplete(MarkerManager markerManager) {
this.mMarkerManager = markerManager;
this.mRemoveOnComplete = true;
}
@Override // android.animation.ValueAnimator.AnimatorUpdateListener
public void onAnimationUpdate(ValueAnimator valueAnimator) {
double animatedFraction = valueAnimator.getAnimatedFraction();
double d = ((this.to.latitude - this.from.latitude) * animatedFraction) + this.from.latitude;
double dSignum = this.to.longitude - this.from.longitude;
if (Math.abs(dSignum) > 180.0d) {
dSignum -= Math.signum(dSignum) * 360.0d;
}
this.marker.setPosition(new LatLng(d, (dSignum * animatedFraction) + this.from.longitude));
}
}
}
@@ -0,0 +1,921 @@
package com.google.maps.android.clustering.view;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.TimeInterpolator;
import android.animation.ValueAnimator;
import android.content.Context;
import android.graphics.Color;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.LayerDrawable;
import android.graphics.drawable.ShapeDrawable;
import android.graphics.drawable.shapes.OvalShape;
import android.os.Handler;
import android.os.Looper;
import android.os.Message;
import android.os.MessageQueue;
import android.util.SparseArray;
import android.view.ViewGroup;
import android.view.animation.DecelerateInterpolator;
import androidx.compose.runtime.ComposerKt;
import com.google.android.gms.maps.GoogleMap;
import com.google.android.gms.maps.Projection;
import com.google.android.gms.maps.model.BitmapDescriptor;
import com.google.android.gms.maps.model.BitmapDescriptorFactory;
import com.google.android.gms.maps.model.LatLng;
import com.google.android.gms.maps.model.LatLngBounds;
import com.google.android.gms.maps.model.Marker;
import com.google.android.gms.maps.model.MarkerOptions;
import com.google.maps.android.R;
import com.google.maps.android.clustering.Cluster;
import com.google.maps.android.clustering.ClusterItem;
import com.google.maps.android.clustering.ClusterManager;
import com.google.maps.android.collections.MarkerManager;
import com.google.maps.android.geometry.Point;
import com.google.maps.android.projection.SphericalMercatorProjection;
import com.google.maps.android.ui.IconGenerator;
import com.google.maps.android.ui.SquareTextView;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Queue;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.Executor;
import java.util.concurrent.Executors;
import java.util.concurrent.locks.Condition;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;
/* JADX INFO: loaded from: classes2.dex */
public class DefaultClusterRenderer<T extends ClusterItem> implements ClusterRenderer<T> {
private ClusterManager.OnClusterClickListener<T> mClickListener;
private final ClusterManager<T> mClusterManager;
private MarkerCache<Cluster<T>> mClusterMarkerCache;
private Set<? extends Cluster<T>> mClusters;
private ShapeDrawable mColoredCircleBackground;
private final float mDensity;
private final IconGenerator mIconGenerator;
private ClusterManager.OnClusterInfoWindowClickListener<T> mInfoWindowClickListener;
private ClusterManager.OnClusterInfoWindowLongClickListener<T> mInfoWindowLongClickListener;
private ClusterManager.OnClusterItemClickListener<T> mItemClickListener;
private ClusterManager.OnClusterItemInfoWindowClickListener<T> mItemInfoWindowClickListener;
private ClusterManager.OnClusterItemInfoWindowLongClickListener<T> mItemInfoWindowLongClickListener;
private final GoogleMap mMap;
private MarkerCache<T> mMarkerCache;
private final DefaultClusterRenderer<T>.ViewModifier mViewModifier;
private float mZoom;
private static final int[] BUCKETS = {10, 20, 50, 100, ComposerKt.invocationKey, 500, 1000};
private static final TimeInterpolator ANIMATION_INTERP = new DecelerateInterpolator();
private final Executor mExecutor = Executors.newSingleThreadExecutor();
private Set<MarkerWithPosition> mMarkers = Collections.newSetFromMap(new ConcurrentHashMap());
private SparseArray<BitmapDescriptor> mIcons = new SparseArray<>();
private int mMinClusterSize = 4;
private boolean mAnimate = true;
private long mAnimationDurationMs = 300;
protected void onClusterItemRendered(T t, Marker marker) {
}
protected void onClusterRendered(Cluster<T> cluster, Marker marker) {
}
public DefaultClusterRenderer(Context context, GoogleMap googleMap, ClusterManager<T> clusterManager) {
this.mMarkerCache = new MarkerCache<>();
this.mClusterMarkerCache = new MarkerCache<>();
this.mViewModifier = new ViewModifier();
this.mMap = googleMap;
this.mDensity = context.getResources().getDisplayMetrics().density;
IconGenerator iconGenerator = new IconGenerator(context);
this.mIconGenerator = iconGenerator;
iconGenerator.setContentView(makeSquareTextView(context));
iconGenerator.setTextAppearance(R.style.amu_ClusterIcon_TextAppearance);
iconGenerator.setBackground(makeClusterBackground());
this.mClusterManager = clusterManager;
}
@Override // com.google.maps.android.clustering.view.ClusterRenderer
public void onAdd() {
this.mClusterManager.getMarkerCollection().setOnMarkerClickListener(new GoogleMap.OnMarkerClickListener() { // from class: com.google.maps.android.clustering.view.DefaultClusterRenderer.1
/* JADX WARN: Multi-variable type inference failed */
@Override // com.google.android.gms.maps.GoogleMap.OnMarkerClickListener
public boolean onMarkerClick(Marker marker) {
return DefaultClusterRenderer.this.mItemClickListener != null && DefaultClusterRenderer.this.mItemClickListener.onClusterItemClick((ClusterItem) DefaultClusterRenderer.this.mMarkerCache.get(marker));
}
});
this.mClusterManager.getMarkerCollection().setOnInfoWindowClickListener(new GoogleMap.OnInfoWindowClickListener() { // from class: com.google.maps.android.clustering.view.DefaultClusterRenderer.2
/* JADX WARN: Multi-variable type inference failed */
@Override // com.google.android.gms.maps.GoogleMap.OnInfoWindowClickListener
public void onInfoWindowClick(Marker marker) {
if (DefaultClusterRenderer.this.mItemInfoWindowClickListener != null) {
DefaultClusterRenderer.this.mItemInfoWindowClickListener.onClusterItemInfoWindowClick((ClusterItem) DefaultClusterRenderer.this.mMarkerCache.get(marker));
}
}
});
this.mClusterManager.getMarkerCollection().setOnInfoWindowLongClickListener(new GoogleMap.OnInfoWindowLongClickListener() { // from class: com.google.maps.android.clustering.view.DefaultClusterRenderer$$ExternalSyntheticLambda0
@Override // com.google.android.gms.maps.GoogleMap.OnInfoWindowLongClickListener
public final void onInfoWindowLongClick(Marker marker) {
this.f$0.m7759x54249de(marker);
}
});
this.mClusterManager.getClusterMarkerCollection().setOnMarkerClickListener(new GoogleMap.OnMarkerClickListener() { // from class: com.google.maps.android.clustering.view.DefaultClusterRenderer$$ExternalSyntheticLambda1
@Override // com.google.android.gms.maps.GoogleMap.OnMarkerClickListener
public final boolean onMarkerClick(Marker marker) {
return this.f$0.m7760x83a34dbd(marker);
}
});
this.mClusterManager.getClusterMarkerCollection().setOnInfoWindowClickListener(new GoogleMap.OnInfoWindowClickListener() { // from class: com.google.maps.android.clustering.view.DefaultClusterRenderer$$ExternalSyntheticLambda2
@Override // com.google.android.gms.maps.GoogleMap.OnInfoWindowClickListener
public final void onInfoWindowClick(Marker marker) {
this.f$0.m7761x204519c(marker);
}
});
this.mClusterManager.getClusterMarkerCollection().setOnInfoWindowLongClickListener(new GoogleMap.OnInfoWindowLongClickListener() { // from class: com.google.maps.android.clustering.view.DefaultClusterRenderer$$ExternalSyntheticLambda3
@Override // com.google.android.gms.maps.GoogleMap.OnInfoWindowLongClickListener
public final void onInfoWindowLongClick(Marker marker) {
this.f$0.m7762x8065557b(marker);
}
});
}
/* JADX INFO: renamed from: lambda$onAdd$0$com-google-maps-android-clustering-view-DefaultClusterRenderer, reason: not valid java name */
/* synthetic */ void m7759x54249de(Marker marker) {
ClusterManager.OnClusterItemInfoWindowLongClickListener<T> onClusterItemInfoWindowLongClickListener = this.mItemInfoWindowLongClickListener;
if (onClusterItemInfoWindowLongClickListener != null) {
onClusterItemInfoWindowLongClickListener.onClusterItemInfoWindowLongClick(this.mMarkerCache.get(marker));
}
}
/* JADX INFO: renamed from: lambda$onAdd$1$com-google-maps-android-clustering-view-DefaultClusterRenderer, reason: not valid java name */
/* synthetic */ boolean m7760x83a34dbd(Marker marker) {
ClusterManager.OnClusterClickListener<T> onClusterClickListener = this.mClickListener;
return onClusterClickListener != null && onClusterClickListener.onClusterClick(this.mClusterMarkerCache.get(marker));
}
/* JADX INFO: renamed from: lambda$onAdd$2$com-google-maps-android-clustering-view-DefaultClusterRenderer, reason: not valid java name */
/* synthetic */ void m7761x204519c(Marker marker) {
ClusterManager.OnClusterInfoWindowClickListener<T> onClusterInfoWindowClickListener = this.mInfoWindowClickListener;
if (onClusterInfoWindowClickListener != null) {
onClusterInfoWindowClickListener.onClusterInfoWindowClick(this.mClusterMarkerCache.get(marker));
}
}
/* JADX INFO: renamed from: lambda$onAdd$3$com-google-maps-android-clustering-view-DefaultClusterRenderer, reason: not valid java name */
/* synthetic */ void m7762x8065557b(Marker marker) {
ClusterManager.OnClusterInfoWindowLongClickListener<T> onClusterInfoWindowLongClickListener = this.mInfoWindowLongClickListener;
if (onClusterInfoWindowLongClickListener != null) {
onClusterInfoWindowLongClickListener.onClusterInfoWindowLongClick(this.mClusterMarkerCache.get(marker));
}
}
@Override // com.google.maps.android.clustering.view.ClusterRenderer
public void onRemove() {
this.mClusterManager.getMarkerCollection().setOnMarkerClickListener(null);
this.mClusterManager.getMarkerCollection().setOnInfoWindowClickListener(null);
this.mClusterManager.getMarkerCollection().setOnInfoWindowLongClickListener(null);
this.mClusterManager.getClusterMarkerCollection().setOnMarkerClickListener(null);
this.mClusterManager.getClusterMarkerCollection().setOnInfoWindowClickListener(null);
this.mClusterManager.getClusterMarkerCollection().setOnInfoWindowLongClickListener(null);
}
private LayerDrawable makeClusterBackground() {
this.mColoredCircleBackground = new ShapeDrawable(new OvalShape());
ShapeDrawable shapeDrawable = new ShapeDrawable(new OvalShape());
shapeDrawable.getPaint().setColor(-2130706433);
LayerDrawable layerDrawable = new LayerDrawable(new Drawable[]{shapeDrawable, this.mColoredCircleBackground});
int i = (int) (this.mDensity * 3.0f);
layerDrawable.setLayerInset(1, i, i, i, i);
return layerDrawable;
}
private SquareTextView makeSquareTextView(Context context) {
SquareTextView squareTextView = new SquareTextView(context);
squareTextView.setLayoutParams(new ViewGroup.LayoutParams(-2, -2));
squareTextView.setId(R.id.amu_text);
int i = (int) (this.mDensity * 12.0f);
squareTextView.setPadding(i, i, i, i);
return squareTextView;
}
@Override // com.google.maps.android.clustering.view.ClusterRenderer
public int getColor(int i) {
float fMin = 300.0f - Math.min(i, 300.0f);
return Color.HSVToColor(new float[]{((fMin * fMin) / 90000.0f) * 220.0f, 1.0f, 0.6f});
}
@Override // com.google.maps.android.clustering.view.ClusterRenderer
public int getClusterTextAppearance(int i) {
return R.style.amu_ClusterIcon_TextAppearance;
}
protected String getClusterText(int i) {
if (i < BUCKETS[0]) {
return String.valueOf(i);
}
return i + org.slf4j.Marker.ANY_NON_NULL_MARKER;
}
protected int getBucket(Cluster<T> cluster) {
int size = cluster.getSize();
int i = 0;
if (size <= BUCKETS[0]) {
return size;
}
while (true) {
int[] iArr = BUCKETS;
if (i < iArr.length - 1) {
int i2 = i + 1;
if (size < iArr[i2]) {
return iArr[i];
}
i = i2;
} else {
return iArr[iArr.length - 1];
}
}
}
public int getMinClusterSize() {
return this.mMinClusterSize;
}
public void setMinClusterSize(int i) {
this.mMinClusterSize = i;
}
/* JADX INFO: Access modifiers changed from: private */
class ViewModifier extends Handler {
private static final int RUN_TASK = 0;
private static final int TASK_FINISHED = 1;
private DefaultClusterRenderer<T>.RenderTask mNextClusters;
private boolean mViewModificationInProgress;
private ViewModifier() {
this.mViewModificationInProgress = false;
this.mNextClusters = null;
}
@Override // android.os.Handler
public void handleMessage(Message message) {
DefaultClusterRenderer<T>.RenderTask renderTask;
if (message.what == 1) {
this.mViewModificationInProgress = false;
if (this.mNextClusters != null) {
sendEmptyMessage(0);
return;
}
return;
}
removeMessages(0);
if (this.mViewModificationInProgress || this.mNextClusters == null) {
return;
}
Projection projection = DefaultClusterRenderer.this.mMap.getProjection();
synchronized (this) {
renderTask = this.mNextClusters;
this.mNextClusters = null;
this.mViewModificationInProgress = true;
}
renderTask.setCallback(new Runnable() { // from class: com.google.maps.android.clustering.view.DefaultClusterRenderer$ViewModifier$$ExternalSyntheticLambda0
@Override // java.lang.Runnable
public final void run() {
this.f$0.m7763xef9a7a7f();
}
});
renderTask.setProjection(projection);
renderTask.setMapZoom(DefaultClusterRenderer.this.mMap.getCameraPosition().zoom);
DefaultClusterRenderer.this.mExecutor.execute(renderTask);
}
/* JADX INFO: renamed from: lambda$handleMessage$0$com-google-maps-android-clustering-view-DefaultClusterRenderer$ViewModifier, reason: not valid java name */
/* synthetic */ void m7763xef9a7a7f() {
sendEmptyMessage(1);
}
public void queue(Set<? extends Cluster<T>> set) {
synchronized (this) {
this.mNextClusters = new RenderTask(set);
}
sendEmptyMessage(0);
}
}
protected boolean shouldRenderAsCluster(Cluster<T> cluster) {
return cluster.getSize() >= this.mMinClusterSize;
}
protected boolean shouldRender(Set<? extends Cluster<T>> set, Set<? extends Cluster<T>> set2) {
return !set2.equals(set);
}
private class RenderTask implements Runnable {
final Set<? extends Cluster<T>> clusters;
private Runnable mCallback;
private float mMapZoom;
private Projection mProjection;
private SphericalMercatorProjection mSphericalMercatorProjection;
private RenderTask(Set<? extends Cluster<T>> set) {
this.clusters = set;
}
public void setCallback(Runnable runnable) {
this.mCallback = runnable;
}
public void setProjection(Projection projection) {
this.mProjection = projection;
}
public void setMapZoom(float f) {
this.mMapZoom = f;
this.mSphericalMercatorProjection = new SphericalMercatorProjection(Math.pow(2.0d, Math.min(f, DefaultClusterRenderer.this.mZoom)) * 256.0d);
}
@Override // java.lang.Runnable
public void run() {
LatLngBounds latLngBoundsBuild;
ArrayList arrayList;
DefaultClusterRenderer defaultClusterRenderer = DefaultClusterRenderer.this;
if (!defaultClusterRenderer.shouldRender(defaultClusterRenderer.immutableOf(defaultClusterRenderer.mClusters), DefaultClusterRenderer.this.immutableOf(this.clusters))) {
this.mCallback.run();
return;
}
ArrayList arrayList2 = null;
MarkerModifier markerModifier = new MarkerModifier();
float f = this.mMapZoom;
boolean z = f > DefaultClusterRenderer.this.mZoom;
float f2 = f - DefaultClusterRenderer.this.mZoom;
Set<MarkerWithPosition> set = DefaultClusterRenderer.this.mMarkers;
try {
latLngBoundsBuild = this.mProjection.getVisibleRegion().latLngBounds;
} catch (Exception e) {
e.printStackTrace();
latLngBoundsBuild = LatLngBounds.builder().include(new LatLng(0.0d, 0.0d)).build();
}
if (DefaultClusterRenderer.this.mClusters == null || !DefaultClusterRenderer.this.mAnimate) {
arrayList = null;
} else {
arrayList = new ArrayList();
for (Cluster<T> cluster : DefaultClusterRenderer.this.mClusters) {
if (DefaultClusterRenderer.this.shouldRenderAsCluster(cluster) && latLngBoundsBuild.contains(cluster.getPosition())) {
arrayList.add(this.mSphericalMercatorProjection.toPoint(cluster.getPosition()));
}
}
}
Set setNewSetFromMap = Collections.newSetFromMap(new ConcurrentHashMap());
for (Cluster<T> cluster2 : this.clusters) {
boolean zContains = latLngBoundsBuild.contains(cluster2.getPosition());
if (z && zContains && DefaultClusterRenderer.this.mAnimate) {
Point pointFindClosestCluster = DefaultClusterRenderer.this.findClosestCluster(arrayList, this.mSphericalMercatorProjection.toPoint(cluster2.getPosition()));
if (pointFindClosestCluster != null) {
markerModifier.add(true, new CreateMarkerTask(cluster2, setNewSetFromMap, this.mSphericalMercatorProjection.toLatLng(pointFindClosestCluster)));
} else {
markerModifier.add(true, new CreateMarkerTask(cluster2, setNewSetFromMap, null));
}
} else {
markerModifier.add(zContains, new CreateMarkerTask(cluster2, setNewSetFromMap, null));
}
}
markerModifier.waitUntilFree();
set.removeAll(setNewSetFromMap);
if (DefaultClusterRenderer.this.mAnimate) {
arrayList2 = new ArrayList();
for (Cluster<T> cluster3 : this.clusters) {
if (DefaultClusterRenderer.this.shouldRenderAsCluster(cluster3) && latLngBoundsBuild.contains(cluster3.getPosition())) {
arrayList2.add(this.mSphericalMercatorProjection.toPoint(cluster3.getPosition()));
}
}
}
for (MarkerWithPosition markerWithPosition : set) {
boolean zContains2 = latLngBoundsBuild.contains(markerWithPosition.position);
if (!z && f2 > -3.0f && zContains2 && DefaultClusterRenderer.this.mAnimate) {
Point pointFindClosestCluster2 = DefaultClusterRenderer.this.findClosestCluster(arrayList2, this.mSphericalMercatorProjection.toPoint(markerWithPosition.position));
if (pointFindClosestCluster2 != null) {
markerModifier.animateThenRemove(markerWithPosition, markerWithPosition.position, this.mSphericalMercatorProjection.toLatLng(pointFindClosestCluster2));
} else {
markerModifier.remove(true, markerWithPosition.marker);
}
} else {
markerModifier.remove(zContains2, markerWithPosition.marker);
}
}
markerModifier.waitUntilFree();
DefaultClusterRenderer.this.mMarkers = setNewSetFromMap;
DefaultClusterRenderer.this.mClusters = this.clusters;
DefaultClusterRenderer.this.mZoom = f;
this.mCallback.run();
}
}
@Override // com.google.maps.android.clustering.view.ClusterRenderer
public void onClustersChanged(Set<? extends Cluster<T>> set) {
this.mViewModifier.queue(set);
}
@Override // com.google.maps.android.clustering.view.ClusterRenderer
public void setOnClusterClickListener(ClusterManager.OnClusterClickListener<T> onClusterClickListener) {
this.mClickListener = onClusterClickListener;
}
@Override // com.google.maps.android.clustering.view.ClusterRenderer
public void setOnClusterInfoWindowClickListener(ClusterManager.OnClusterInfoWindowClickListener<T> onClusterInfoWindowClickListener) {
this.mInfoWindowClickListener = onClusterInfoWindowClickListener;
}
@Override // com.google.maps.android.clustering.view.ClusterRenderer
public void setOnClusterInfoWindowLongClickListener(ClusterManager.OnClusterInfoWindowLongClickListener<T> onClusterInfoWindowLongClickListener) {
this.mInfoWindowLongClickListener = onClusterInfoWindowLongClickListener;
}
@Override // com.google.maps.android.clustering.view.ClusterRenderer
public void setOnClusterItemClickListener(ClusterManager.OnClusterItemClickListener<T> onClusterItemClickListener) {
this.mItemClickListener = onClusterItemClickListener;
}
@Override // com.google.maps.android.clustering.view.ClusterRenderer
public void setOnClusterItemInfoWindowClickListener(ClusterManager.OnClusterItemInfoWindowClickListener<T> onClusterItemInfoWindowClickListener) {
this.mItemInfoWindowClickListener = onClusterItemInfoWindowClickListener;
}
@Override // com.google.maps.android.clustering.view.ClusterRenderer
public void setOnClusterItemInfoWindowLongClickListener(ClusterManager.OnClusterItemInfoWindowLongClickListener<T> onClusterItemInfoWindowLongClickListener) {
this.mItemInfoWindowLongClickListener = onClusterItemInfoWindowLongClickListener;
}
@Override // com.google.maps.android.clustering.view.ClusterRenderer
public void setAnimation(boolean z) {
this.mAnimate = z;
}
@Override // com.google.maps.android.clustering.view.ClusterRenderer
public void setAnimationDuration(long j) {
this.mAnimationDurationMs = j;
}
/* JADX INFO: Access modifiers changed from: private */
public Set<? extends Cluster<T>> immutableOf(Set<? extends Cluster<T>> set) {
return set != null ? Collections.unmodifiableSet(set) : Collections.emptySet();
}
private static double distanceSquared(Point point, Point point2) {
return ((point.x - point2.x) * (point.x - point2.x)) + ((point.y - point2.y) * (point.y - point2.y));
}
/* JADX INFO: Access modifiers changed from: private */
public Point findClosestCluster(List<Point> list, Point point) {
Point point2 = null;
if (list != null && !list.isEmpty()) {
int maxDistanceBetweenClusteredItems = this.mClusterManager.getAlgorithm().getMaxDistanceBetweenClusteredItems();
double d = maxDistanceBetweenClusteredItems * maxDistanceBetweenClusteredItems;
for (Point point3 : list) {
double dDistanceSquared = distanceSquared(point3, point);
if (dDistanceSquared < d) {
point2 = point3;
d = dDistanceSquared;
}
}
}
return point2;
}
private class MarkerModifier extends Handler implements MessageQueue.IdleHandler {
private static final int BLANK = 0;
private final Condition busyCondition;
private final Lock lock;
private Queue<DefaultClusterRenderer<T>.AnimationTask> mAnimationTasks;
private Queue<DefaultClusterRenderer<T>.CreateMarkerTask> mCreateMarkerTasks;
private boolean mListenerAdded;
private Queue<DefaultClusterRenderer<T>.CreateMarkerTask> mOnScreenCreateMarkerTasks;
private Queue<Marker> mOnScreenRemoveMarkerTasks;
private Queue<Marker> mRemoveMarkerTasks;
private MarkerModifier() {
super(Looper.getMainLooper());
ReentrantLock reentrantLock = new ReentrantLock();
this.lock = reentrantLock;
this.busyCondition = reentrantLock.newCondition();
this.mCreateMarkerTasks = new LinkedList();
this.mOnScreenCreateMarkerTasks = new LinkedList();
this.mRemoveMarkerTasks = new LinkedList();
this.mOnScreenRemoveMarkerTasks = new LinkedList();
this.mAnimationTasks = new LinkedList();
}
public void add(boolean z, DefaultClusterRenderer<T>.CreateMarkerTask createMarkerTask) {
this.lock.lock();
sendEmptyMessage(0);
if (z) {
this.mOnScreenCreateMarkerTasks.add(createMarkerTask);
} else {
this.mCreateMarkerTasks.add(createMarkerTask);
}
this.lock.unlock();
}
public void remove(boolean z, Marker marker) {
this.lock.lock();
sendEmptyMessage(0);
if (z) {
this.mOnScreenRemoveMarkerTasks.add(marker);
} else {
this.mRemoveMarkerTasks.add(marker);
}
this.lock.unlock();
}
public void animate(MarkerWithPosition markerWithPosition, LatLng latLng, LatLng latLng2) {
this.lock.lock();
this.mAnimationTasks.add(new AnimationTask(markerWithPosition, latLng, latLng2));
this.lock.unlock();
}
public void animateThenRemove(MarkerWithPosition markerWithPosition, LatLng latLng, LatLng latLng2) {
this.lock.lock();
DefaultClusterRenderer<T>.AnimationTask animationTask = new AnimationTask(markerWithPosition, latLng, latLng2);
animationTask.removeOnAnimationComplete(DefaultClusterRenderer.this.mClusterManager.getMarkerManager());
this.mAnimationTasks.add(animationTask);
this.lock.unlock();
}
@Override // android.os.Handler
public void handleMessage(Message message) {
if (!this.mListenerAdded) {
Looper.myQueue().addIdleHandler(this);
this.mListenerAdded = true;
}
removeMessages(0);
this.lock.lock();
for (int i = 0; i < 10; i++) {
try {
performNextTask();
} finally {
this.lock.unlock();
}
}
if (!isBusy()) {
this.mListenerAdded = false;
Looper.myQueue().removeIdleHandler(this);
this.busyCondition.signalAll();
} else {
sendEmptyMessageDelayed(0, 10L);
}
}
private void performNextTask() {
if (!this.mOnScreenRemoveMarkerTasks.isEmpty()) {
removeMarker(this.mOnScreenRemoveMarkerTasks.poll());
return;
}
if (!this.mAnimationTasks.isEmpty()) {
this.mAnimationTasks.poll().perform();
return;
}
if (this.mOnScreenCreateMarkerTasks.isEmpty()) {
if (this.mCreateMarkerTasks.isEmpty()) {
if (this.mRemoveMarkerTasks.isEmpty()) {
return;
}
removeMarker(this.mRemoveMarkerTasks.poll());
return;
}
this.mCreateMarkerTasks.poll().perform(this);
return;
}
this.mOnScreenCreateMarkerTasks.poll().perform(this);
}
private void removeMarker(Marker marker) {
DefaultClusterRenderer.this.mMarkerCache.remove(marker);
DefaultClusterRenderer.this.mClusterMarkerCache.remove(marker);
DefaultClusterRenderer.this.mClusterManager.getMarkerManager().remove(marker);
}
/* JADX WARN: Removed duplicated region for block: B:14:0x0030 */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct code enable 'Show inconsistent code' option in preferences
*/
public boolean isBusy() {
/*
r2 = this;
java.util.concurrent.locks.Lock r0 = r2.lock // Catch: java.lang.Throwable -> L37
r0.lock() // Catch: java.lang.Throwable -> L37
java.util.Queue<com.google.maps.android.clustering.view.DefaultClusterRenderer<T>$CreateMarkerTask> r0 = r2.mCreateMarkerTasks // Catch: java.lang.Throwable -> L37
boolean r0 = r0.isEmpty() // Catch: java.lang.Throwable -> L37
if (r0 == 0) goto L30
java.util.Queue<com.google.maps.android.clustering.view.DefaultClusterRenderer<T>$CreateMarkerTask> r0 = r2.mOnScreenCreateMarkerTasks // Catch: java.lang.Throwable -> L37
boolean r0 = r0.isEmpty() // Catch: java.lang.Throwable -> L37
if (r0 == 0) goto L30
java.util.Queue<com.google.android.gms.maps.model.Marker> r0 = r2.mOnScreenRemoveMarkerTasks // Catch: java.lang.Throwable -> L37
boolean r0 = r0.isEmpty() // Catch: java.lang.Throwable -> L37
if (r0 == 0) goto L30
java.util.Queue<com.google.android.gms.maps.model.Marker> r0 = r2.mRemoveMarkerTasks // Catch: java.lang.Throwable -> L37
boolean r0 = r0.isEmpty() // Catch: java.lang.Throwable -> L37
if (r0 == 0) goto L30
java.util.Queue<com.google.maps.android.clustering.view.DefaultClusterRenderer<T>$AnimationTask> r0 = r2.mAnimationTasks // Catch: java.lang.Throwable -> L37
boolean r0 = r0.isEmpty() // Catch: java.lang.Throwable -> L37
if (r0 != 0) goto L2e
goto L30
L2e:
r0 = 0
goto L31
L30:
r0 = 1
L31:
java.util.concurrent.locks.Lock r1 = r2.lock
r1.unlock()
return r0
L37:
r0 = move-exception
java.util.concurrent.locks.Lock r1 = r2.lock
r1.unlock()
throw r0
*/
throw new UnsupportedOperationException("Method not decompiled: com.google.maps.android.clustering.view.DefaultClusterRenderer.MarkerModifier.isBusy():boolean");
}
public void waitUntilFree() {
while (isBusy()) {
sendEmptyMessage(0);
this.lock.lock();
try {
try {
if (isBusy()) {
this.busyCondition.await();
}
} catch (InterruptedException e) {
throw new RuntimeException(e);
}
} finally {
this.lock.unlock();
}
}
}
@Override // android.os.MessageQueue.IdleHandler
public boolean queueIdle() {
sendEmptyMessage(0);
return true;
}
}
private static class MarkerCache<T> {
private Map<T, Marker> mCache;
private Map<Marker, T> mCacheReverse;
private MarkerCache() {
this.mCache = new HashMap();
this.mCacheReverse = new HashMap();
}
public Marker get(T t) {
return this.mCache.get(t);
}
public T get(Marker marker) {
return this.mCacheReverse.get(marker);
}
public void put(T t, Marker marker) {
this.mCache.put(t, marker);
this.mCacheReverse.put(marker, t);
}
public void remove(Marker marker) {
T t = this.mCacheReverse.get(marker);
this.mCacheReverse.remove(marker);
this.mCache.remove(t);
}
}
protected void onBeforeClusterItemRendered(T t, MarkerOptions markerOptions) {
if (t.getTitle() != null && t.getSnippet() != null) {
markerOptions.title(t.getTitle());
markerOptions.snippet(t.getSnippet());
} else if (t.getTitle() != null) {
markerOptions.title(t.getTitle());
} else if (t.getSnippet() != null) {
markerOptions.title(t.getSnippet());
}
}
protected void onClusterItemUpdated(T t, Marker marker) {
boolean z = true;
boolean z2 = false;
if (t.getTitle() != null && t.getSnippet() != null) {
if (!t.getTitle().equals(marker.getTitle())) {
marker.setTitle(t.getTitle());
z2 = true;
}
if (!t.getSnippet().equals(marker.getSnippet())) {
marker.setSnippet(t.getSnippet());
z2 = true;
}
} else {
if (t.getSnippet() != null && !t.getSnippet().equals(marker.getTitle())) {
marker.setTitle(t.getSnippet());
} else if (t.getTitle() != null && !t.getTitle().equals(marker.getTitle())) {
marker.setTitle(t.getTitle());
}
z2 = true;
}
if (marker.getPosition().equals(t.getPosition())) {
z = z2;
} else {
marker.setPosition(t.getPosition());
if (t.getZIndex() != null) {
marker.setZIndex(t.getZIndex().floatValue());
}
}
if (z && marker.isInfoWindowShown()) {
marker.showInfoWindow();
}
}
protected void onBeforeClusterRendered(Cluster<T> cluster, MarkerOptions markerOptions) {
markerOptions.icon(getDescriptorForCluster(cluster));
}
protected BitmapDescriptor getDescriptorForCluster(Cluster<T> cluster) {
int bucket = getBucket(cluster);
BitmapDescriptor bitmapDescriptor = this.mIcons.get(bucket);
if (bitmapDescriptor != null) {
return bitmapDescriptor;
}
this.mColoredCircleBackground.getPaint().setColor(getColor(bucket));
this.mIconGenerator.setTextAppearance(getClusterTextAppearance(bucket));
BitmapDescriptor bitmapDescriptorFromBitmap = BitmapDescriptorFactory.fromBitmap(this.mIconGenerator.makeIcon(getClusterText(bucket)));
this.mIcons.put(bucket, bitmapDescriptorFromBitmap);
return bitmapDescriptorFromBitmap;
}
protected void onClusterUpdated(Cluster<T> cluster, Marker marker) {
marker.setIcon(getDescriptorForCluster(cluster));
}
public Marker getMarker(T t) {
return this.mMarkerCache.get(t);
}
public T getClusterItem(Marker marker) {
return this.mMarkerCache.get(marker);
}
public Marker getMarker(Cluster<T> cluster) {
return this.mClusterMarkerCache.get(cluster);
}
public Cluster<T> getCluster(Marker marker) {
return this.mClusterMarkerCache.get(marker);
}
private class CreateMarkerTask {
private final LatLng animateFrom;
private final Cluster<T> cluster;
private final Set<MarkerWithPosition> newMarkers;
public CreateMarkerTask(Cluster<T> cluster, Set<MarkerWithPosition> set, LatLng latLng) {
this.cluster = cluster;
this.newMarkers = set;
this.animateFrom = latLng;
}
/* JADX INFO: Access modifiers changed from: private */
public void perform(DefaultClusterRenderer<T>.MarkerModifier markerModifier) {
MarkerWithPosition markerWithPosition;
MarkerWithPosition markerWithPosition2;
if (DefaultClusterRenderer.this.shouldRenderAsCluster(this.cluster)) {
Marker markerAddMarker = DefaultClusterRenderer.this.mClusterMarkerCache.get(this.cluster);
if (markerAddMarker == null) {
MarkerOptions markerOptions = new MarkerOptions();
LatLng position = this.animateFrom;
if (position == null) {
position = this.cluster.getPosition();
}
MarkerOptions markerOptionsPosition = markerOptions.position(position);
DefaultClusterRenderer.this.onBeforeClusterRendered(this.cluster, markerOptionsPosition);
markerAddMarker = DefaultClusterRenderer.this.mClusterManager.getClusterMarkerCollection().addMarker(markerOptionsPosition);
DefaultClusterRenderer.this.mClusterMarkerCache.put(this.cluster, markerAddMarker);
markerWithPosition = new MarkerWithPosition(markerAddMarker);
LatLng latLng = this.animateFrom;
if (latLng != null) {
markerModifier.animate(markerWithPosition, latLng, this.cluster.getPosition());
}
} else {
markerWithPosition = new MarkerWithPosition(markerAddMarker);
DefaultClusterRenderer.this.onClusterUpdated(this.cluster, markerAddMarker);
}
DefaultClusterRenderer.this.onClusterRendered(this.cluster, markerAddMarker);
this.newMarkers.add(markerWithPosition);
return;
}
for (T t : this.cluster.getItems()) {
Marker markerAddMarker2 = DefaultClusterRenderer.this.mMarkerCache.get(t);
if (markerAddMarker2 == null) {
MarkerOptions markerOptions2 = new MarkerOptions();
LatLng latLng2 = this.animateFrom;
if (latLng2 != null) {
markerOptions2.position(latLng2);
} else {
markerOptions2.position(t.getPosition());
if (t.getZIndex() != null) {
markerOptions2.zIndex(t.getZIndex().floatValue());
}
}
DefaultClusterRenderer.this.onBeforeClusterItemRendered(t, markerOptions2);
markerAddMarker2 = DefaultClusterRenderer.this.mClusterManager.getMarkerCollection().addMarker(markerOptions2);
markerWithPosition2 = new MarkerWithPosition(markerAddMarker2);
DefaultClusterRenderer.this.mMarkerCache.put(t, markerAddMarker2);
LatLng latLng3 = this.animateFrom;
if (latLng3 != null) {
markerModifier.animate(markerWithPosition2, latLng3, t.getPosition());
}
} else {
markerWithPosition2 = new MarkerWithPosition(markerAddMarker2);
DefaultClusterRenderer.this.onClusterItemUpdated(t, markerAddMarker2);
}
DefaultClusterRenderer.this.onClusterItemRendered(t, markerAddMarker2);
this.newMarkers.add(markerWithPosition2);
}
}
}
private static class MarkerWithPosition {
private final Marker marker;
private LatLng position;
private MarkerWithPosition(Marker marker) {
this.marker = marker;
this.position = marker.getPosition();
}
public boolean equals(Object obj) {
if (obj instanceof MarkerWithPosition) {
return this.marker.equals(((MarkerWithPosition) obj).marker);
}
return false;
}
public int hashCode() {
return this.marker.hashCode();
}
}
private class AnimationTask extends AnimatorListenerAdapter implements ValueAnimator.AnimatorUpdateListener {
private final LatLng from;
private MarkerManager mMarkerManager;
private boolean mRemoveOnComplete;
private final Marker marker;
private final MarkerWithPosition markerWithPosition;
private final LatLng to;
private AnimationTask(MarkerWithPosition markerWithPosition, LatLng latLng, LatLng latLng2) {
this.markerWithPosition = markerWithPosition;
this.marker = markerWithPosition.marker;
this.from = latLng;
this.to = latLng2;
}
public void perform() {
ValueAnimator valueAnimatorOfFloat = ValueAnimator.ofFloat(0.0f, 1.0f);
valueAnimatorOfFloat.setInterpolator(DefaultClusterRenderer.ANIMATION_INTERP);
valueAnimatorOfFloat.setDuration(DefaultClusterRenderer.this.mAnimationDurationMs);
valueAnimatorOfFloat.addUpdateListener(this);
valueAnimatorOfFloat.addListener(this);
valueAnimatorOfFloat.start();
}
@Override // android.animation.AnimatorListenerAdapter, android.animation.Animator.AnimatorListener
public void onAnimationEnd(Animator animator) {
if (this.mRemoveOnComplete) {
DefaultClusterRenderer.this.mMarkerCache.remove(this.marker);
DefaultClusterRenderer.this.mClusterMarkerCache.remove(this.marker);
this.mMarkerManager.remove(this.marker);
}
this.markerWithPosition.position = this.to;
}
public void removeOnAnimationComplete(MarkerManager markerManager) {
this.mMarkerManager = markerManager;
this.mRemoveOnComplete = true;
}
@Override // android.animation.ValueAnimator.AnimatorUpdateListener
public void onAnimationUpdate(ValueAnimator valueAnimator) {
if (this.to == null || this.from == null || this.marker == null) {
return;
}
double animatedFraction = valueAnimator.getAnimatedFraction();
double d = ((this.to.latitude - this.from.latitude) * animatedFraction) + this.from.latitude;
double dSignum = this.to.longitude - this.from.longitude;
if (Math.abs(dSignum) > 180.0d) {
dSignum -= Math.signum(dSignum) * 360.0d;
}
this.marker.setPosition(new LatLng(d, (dSignum * animatedFraction) + this.from.longitude));
}
}
}
@@ -0,0 +1,110 @@
package com.google.maps.android.collections;
import com.google.android.gms.maps.GoogleMap;
import com.google.android.gms.maps.model.Circle;
import com.google.android.gms.maps.model.CircleOptions;
import com.google.maps.android.collections.MapObjectManager;
import java.util.Iterator;
/* JADX INFO: loaded from: classes2.dex */
public class CircleManager extends MapObjectManager<Circle, Collection> implements GoogleMap.OnCircleClickListener {
@Override // com.google.maps.android.collections.MapObjectManager
public /* bridge */ /* synthetic */ MapObjectManager.Collection getCollection(String str) {
return super.getCollection(str);
}
@Override // com.google.maps.android.collections.MapObjectManager
public /* bridge */ /* synthetic */ MapObjectManager.Collection newCollection(String str) {
return super.newCollection(str);
}
@Override // com.google.maps.android.collections.MapObjectManager
public /* bridge */ /* synthetic */ boolean remove(Circle circle) {
return super.remove(circle);
}
public CircleManager(GoogleMap googleMap) {
super(googleMap);
}
@Override // com.google.maps.android.collections.MapObjectManager
void setListenersOnUiThread() {
if (this.mMap != null) {
this.mMap.setOnCircleClickListener(this);
}
}
@Override // com.google.maps.android.collections.MapObjectManager
public Collection newCollection() {
return new Collection();
}
/* JADX INFO: Access modifiers changed from: protected */
@Override // com.google.maps.android.collections.MapObjectManager
public void removeObjectFromMap(Circle circle) {
circle.remove();
}
@Override // com.google.android.gms.maps.GoogleMap.OnCircleClickListener
public void onCircleClick(Circle circle) {
Collection collection = (Collection) this.mAllObjects.get(circle);
if (collection == null || collection.mCircleClickListener == null) {
return;
}
collection.mCircleClickListener.onCircleClick(circle);
}
public class Collection extends MapObjectManager.Collection {
private GoogleMap.OnCircleClickListener mCircleClickListener;
public Collection() {
super();
}
public Circle addCircle(CircleOptions circleOptions) {
Circle circleAddCircle = CircleManager.this.mMap.addCircle(circleOptions);
super.add(circleAddCircle);
return circleAddCircle;
}
public void addAll(java.util.Collection<CircleOptions> collection) {
Iterator<CircleOptions> it = collection.iterator();
while (it.hasNext()) {
addCircle(it.next());
}
}
public void addAll(java.util.Collection<CircleOptions> collection, boolean z) {
Iterator<CircleOptions> it = collection.iterator();
while (it.hasNext()) {
addCircle(it.next()).setVisible(z);
}
}
public void showAll() {
Iterator<Circle> it = getCircles().iterator();
while (it.hasNext()) {
it.next().setVisible(true);
}
}
public void hideAll() {
Iterator<Circle> it = getCircles().iterator();
while (it.hasNext()) {
it.next().setVisible(false);
}
}
public boolean remove(Circle circle) {
return super.remove(circle);
}
public java.util.Collection<Circle> getCircles() {
return getObjects();
}
public void setOnCircleClickListener(GoogleMap.OnCircleClickListener onCircleClickListener) {
this.mCircleClickListener = onCircleClickListener;
}
}
}
@@ -0,0 +1,110 @@
package com.google.maps.android.collections;
import com.google.android.gms.maps.GoogleMap;
import com.google.android.gms.maps.model.GroundOverlay;
import com.google.android.gms.maps.model.GroundOverlayOptions;
import com.google.maps.android.collections.MapObjectManager;
import java.util.Iterator;
/* JADX INFO: loaded from: classes2.dex */
public class GroundOverlayManager extends MapObjectManager<GroundOverlay, Collection> implements GoogleMap.OnGroundOverlayClickListener {
@Override // com.google.maps.android.collections.MapObjectManager
public /* bridge */ /* synthetic */ MapObjectManager.Collection getCollection(String str) {
return super.getCollection(str);
}
@Override // com.google.maps.android.collections.MapObjectManager
public /* bridge */ /* synthetic */ MapObjectManager.Collection newCollection(String str) {
return super.newCollection(str);
}
@Override // com.google.maps.android.collections.MapObjectManager
public /* bridge */ /* synthetic */ boolean remove(GroundOverlay groundOverlay) {
return super.remove(groundOverlay);
}
public GroundOverlayManager(GoogleMap googleMap) {
super(googleMap);
}
@Override // com.google.maps.android.collections.MapObjectManager
void setListenersOnUiThread() {
if (this.mMap != null) {
this.mMap.setOnGroundOverlayClickListener(this);
}
}
@Override // com.google.maps.android.collections.MapObjectManager
public Collection newCollection() {
return new Collection();
}
/* JADX INFO: Access modifiers changed from: protected */
@Override // com.google.maps.android.collections.MapObjectManager
public void removeObjectFromMap(GroundOverlay groundOverlay) {
groundOverlay.remove();
}
@Override // com.google.android.gms.maps.GoogleMap.OnGroundOverlayClickListener
public void onGroundOverlayClick(GroundOverlay groundOverlay) {
Collection collection = (Collection) this.mAllObjects.get(groundOverlay);
if (collection == null || collection.mGroundOverlayClickListener == null) {
return;
}
collection.mGroundOverlayClickListener.onGroundOverlayClick(groundOverlay);
}
public class Collection extends MapObjectManager.Collection {
private GoogleMap.OnGroundOverlayClickListener mGroundOverlayClickListener;
public Collection() {
super();
}
public GroundOverlay addGroundOverlay(GroundOverlayOptions groundOverlayOptions) {
GroundOverlay groundOverlayAddGroundOverlay = GroundOverlayManager.this.mMap.addGroundOverlay(groundOverlayOptions);
super.add(groundOverlayAddGroundOverlay);
return groundOverlayAddGroundOverlay;
}
public void addAll(java.util.Collection<GroundOverlayOptions> collection) {
Iterator<GroundOverlayOptions> it = collection.iterator();
while (it.hasNext()) {
addGroundOverlay(it.next());
}
}
public void addAll(java.util.Collection<GroundOverlayOptions> collection, boolean z) {
Iterator<GroundOverlayOptions> it = collection.iterator();
while (it.hasNext()) {
addGroundOverlay(it.next()).setVisible(z);
}
}
public void showAll() {
Iterator<GroundOverlay> it = getGroundOverlays().iterator();
while (it.hasNext()) {
it.next().setVisible(true);
}
}
public void hideAll() {
Iterator<GroundOverlay> it = getGroundOverlays().iterator();
while (it.hasNext()) {
it.next().setVisible(false);
}
}
public boolean remove(GroundOverlay groundOverlay) {
return super.remove(groundOverlay);
}
public java.util.Collection<GroundOverlay> getGroundOverlays() {
return getObjects();
}
public void setOnGroundOverlayClickListener(GoogleMap.OnGroundOverlayClickListener onGroundOverlayClickListener) {
this.mGroundOverlayClickListener = onGroundOverlayClickListener;
}
}
}
@@ -0,0 +1,86 @@
package com.google.maps.android.collections;
import android.os.Handler;
import android.os.Looper;
import com.google.android.gms.maps.GoogleMap;
import com.google.maps.android.collections.MapObjectManager.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.LinkedHashSet;
import java.util.Map;
import java.util.Set;
/* JADX INFO: Access modifiers changed from: package-private */
/* JADX INFO: loaded from: classes2.dex */
public abstract class MapObjectManager<O, C extends Collection> {
protected final GoogleMap mMap;
private final Map<String, C> mNamedCollections = new HashMap();
protected final Map<O, C> mAllObjects = new HashMap();
public abstract C newCollection();
protected abstract void removeObjectFromMap(O o);
abstract void setListenersOnUiThread();
public MapObjectManager(GoogleMap googleMap) {
this.mMap = googleMap;
new Handler(Looper.getMainLooper()).post(new Runnable() { // from class: com.google.maps.android.collections.MapObjectManager.1
@Override // java.lang.Runnable
public void run() {
MapObjectManager.this.setListenersOnUiThread();
}
});
}
public C newCollection(String str) {
if (this.mNamedCollections.get(str) != null) {
throw new IllegalArgumentException("collection id is not unique: " + str);
}
C c = (C) newCollection();
this.mNamedCollections.put(str, c);
return c;
}
public C getCollection(String str) {
return this.mNamedCollections.get(str);
}
public boolean remove(O o) {
C c = this.mAllObjects.get(o);
return c != null && c.remove(o);
}
public class Collection {
private final Set<O> mObjects = new LinkedHashSet();
public Collection() {
}
protected void add(O o) {
this.mObjects.add(o);
MapObjectManager.this.mAllObjects.put(o, this);
}
protected boolean remove(O o) {
if (!this.mObjects.remove(o)) {
return false;
}
MapObjectManager.this.mAllObjects.remove(o);
MapObjectManager.this.removeObjectFromMap(o);
return true;
}
public void clear() {
for (O o : this.mObjects) {
MapObjectManager.this.removeObjectFromMap(o);
MapObjectManager.this.mAllObjects.remove(o);
}
this.mObjects.clear();
}
protected java.util.Collection<O> getObjects() {
return Collections.unmodifiableCollection(this.mObjects);
}
}
}
@@ -0,0 +1,205 @@
package com.google.maps.android.collections;
import android.view.View;
import com.google.android.gms.maps.GoogleMap;
import com.google.android.gms.maps.model.AdvancedMarkerOptions;
import com.google.android.gms.maps.model.Marker;
import com.google.android.gms.maps.model.MarkerOptions;
import com.google.maps.android.collections.MapObjectManager;
import java.util.Iterator;
/* JADX INFO: loaded from: classes2.dex */
public class MarkerManager extends MapObjectManager<Marker, Collection> implements GoogleMap.OnInfoWindowClickListener, GoogleMap.OnMarkerClickListener, GoogleMap.OnMarkerDragListener, GoogleMap.InfoWindowAdapter, GoogleMap.OnInfoWindowLongClickListener {
@Override // com.google.maps.android.collections.MapObjectManager
public /* bridge */ /* synthetic */ MapObjectManager.Collection getCollection(String str) {
return super.getCollection(str);
}
@Override // com.google.maps.android.collections.MapObjectManager
public /* bridge */ /* synthetic */ MapObjectManager.Collection newCollection(String str) {
return super.newCollection(str);
}
@Override // com.google.maps.android.collections.MapObjectManager
public /* bridge */ /* synthetic */ boolean remove(Marker marker) {
return super.remove(marker);
}
public MarkerManager(GoogleMap googleMap) {
super(googleMap);
}
@Override // com.google.maps.android.collections.MapObjectManager
void setListenersOnUiThread() {
if (this.mMap != null) {
this.mMap.setOnInfoWindowClickListener(this);
this.mMap.setOnInfoWindowLongClickListener(this);
this.mMap.setOnMarkerClickListener(this);
this.mMap.setOnMarkerDragListener(this);
this.mMap.setInfoWindowAdapter(this);
}
}
@Override // com.google.maps.android.collections.MapObjectManager
public Collection newCollection() {
return new Collection();
}
@Override // com.google.android.gms.maps.GoogleMap.InfoWindowAdapter
public View getInfoWindow(Marker marker) {
Collection collection = (Collection) this.mAllObjects.get(marker);
if (collection == null || collection.mInfoWindowAdapter == null) {
return null;
}
return collection.mInfoWindowAdapter.getInfoWindow(marker);
}
@Override // com.google.android.gms.maps.GoogleMap.InfoWindowAdapter
public View getInfoContents(Marker marker) {
Collection collection = (Collection) this.mAllObjects.get(marker);
if (collection == null || collection.mInfoWindowAdapter == null) {
return null;
}
return collection.mInfoWindowAdapter.getInfoContents(marker);
}
@Override // com.google.android.gms.maps.GoogleMap.OnInfoWindowClickListener
public void onInfoWindowClick(Marker marker) {
Collection collection = (Collection) this.mAllObjects.get(marker);
if (collection == null || collection.mInfoWindowClickListener == null) {
return;
}
collection.mInfoWindowClickListener.onInfoWindowClick(marker);
}
@Override // com.google.android.gms.maps.GoogleMap.OnInfoWindowLongClickListener
public void onInfoWindowLongClick(Marker marker) {
Collection collection = (Collection) this.mAllObjects.get(marker);
if (collection == null || collection.mInfoWindowLongClickListener == null) {
return;
}
collection.mInfoWindowLongClickListener.onInfoWindowLongClick(marker);
}
@Override // com.google.android.gms.maps.GoogleMap.OnMarkerClickListener
public boolean onMarkerClick(Marker marker) {
Collection collection = (Collection) this.mAllObjects.get(marker);
if (collection == null || collection.mMarkerClickListener == null) {
return false;
}
return collection.mMarkerClickListener.onMarkerClick(marker);
}
@Override // com.google.android.gms.maps.GoogleMap.OnMarkerDragListener
public void onMarkerDragStart(Marker marker) {
Collection collection = (Collection) this.mAllObjects.get(marker);
if (collection == null || collection.mMarkerDragListener == null) {
return;
}
collection.mMarkerDragListener.onMarkerDragStart(marker);
}
@Override // com.google.android.gms.maps.GoogleMap.OnMarkerDragListener
public void onMarkerDrag(Marker marker) {
Collection collection = (Collection) this.mAllObjects.get(marker);
if (collection == null || collection.mMarkerDragListener == null) {
return;
}
collection.mMarkerDragListener.onMarkerDrag(marker);
}
@Override // com.google.android.gms.maps.GoogleMap.OnMarkerDragListener
public void onMarkerDragEnd(Marker marker) {
Collection collection = (Collection) this.mAllObjects.get(marker);
if (collection == null || collection.mMarkerDragListener == null) {
return;
}
collection.mMarkerDragListener.onMarkerDragEnd(marker);
}
/* JADX INFO: Access modifiers changed from: protected */
@Override // com.google.maps.android.collections.MapObjectManager
public void removeObjectFromMap(Marker marker) {
marker.remove();
}
public class Collection extends MapObjectManager.Collection {
private GoogleMap.InfoWindowAdapter mInfoWindowAdapter;
private GoogleMap.OnInfoWindowClickListener mInfoWindowClickListener;
private GoogleMap.OnInfoWindowLongClickListener mInfoWindowLongClickListener;
private GoogleMap.OnMarkerClickListener mMarkerClickListener;
private GoogleMap.OnMarkerDragListener mMarkerDragListener;
public Collection() {
super();
}
public Marker addMarker(MarkerOptions markerOptions) {
Marker markerAddMarker = MarkerManager.this.mMap.addMarker(markerOptions);
super.add(markerAddMarker);
return markerAddMarker;
}
public Marker addMarker(AdvancedMarkerOptions advancedMarkerOptions) {
Marker markerAddMarker = MarkerManager.this.mMap.addMarker(advancedMarkerOptions);
super.add(markerAddMarker);
return markerAddMarker;
}
public void addAll(java.util.Collection<MarkerOptions> collection) {
Iterator<MarkerOptions> it = collection.iterator();
while (it.hasNext()) {
addMarker(it.next());
}
}
public void addAll(java.util.Collection<MarkerOptions> collection, boolean z) {
Iterator<MarkerOptions> it = collection.iterator();
while (it.hasNext()) {
addMarker(it.next()).setVisible(z);
}
}
public void showAll() {
Iterator<Marker> it = getMarkers().iterator();
while (it.hasNext()) {
it.next().setVisible(true);
}
}
public void hideAll() {
Iterator<Marker> it = getMarkers().iterator();
while (it.hasNext()) {
it.next().setVisible(false);
}
}
public boolean remove(Marker marker) {
return super.remove(marker);
}
public java.util.Collection<Marker> getMarkers() {
return getObjects();
}
public void setOnInfoWindowClickListener(GoogleMap.OnInfoWindowClickListener onInfoWindowClickListener) {
this.mInfoWindowClickListener = onInfoWindowClickListener;
}
public void setOnInfoWindowLongClickListener(GoogleMap.OnInfoWindowLongClickListener onInfoWindowLongClickListener) {
this.mInfoWindowLongClickListener = onInfoWindowLongClickListener;
}
public void setOnMarkerClickListener(GoogleMap.OnMarkerClickListener onMarkerClickListener) {
this.mMarkerClickListener = onMarkerClickListener;
}
public void setOnMarkerDragListener(GoogleMap.OnMarkerDragListener onMarkerDragListener) {
this.mMarkerDragListener = onMarkerDragListener;
}
public void setInfoWindowAdapter(GoogleMap.InfoWindowAdapter infoWindowAdapter) {
this.mInfoWindowAdapter = infoWindowAdapter;
}
}
}
@@ -0,0 +1,110 @@
package com.google.maps.android.collections;
import com.google.android.gms.maps.GoogleMap;
import com.google.android.gms.maps.model.Polygon;
import com.google.android.gms.maps.model.PolygonOptions;
import com.google.maps.android.collections.MapObjectManager;
import java.util.Iterator;
/* JADX INFO: loaded from: classes2.dex */
public class PolygonManager extends MapObjectManager<Polygon, Collection> implements GoogleMap.OnPolygonClickListener {
@Override // com.google.maps.android.collections.MapObjectManager
public /* bridge */ /* synthetic */ MapObjectManager.Collection getCollection(String str) {
return super.getCollection(str);
}
@Override // com.google.maps.android.collections.MapObjectManager
public /* bridge */ /* synthetic */ MapObjectManager.Collection newCollection(String str) {
return super.newCollection(str);
}
@Override // com.google.maps.android.collections.MapObjectManager
public /* bridge */ /* synthetic */ boolean remove(Polygon polygon) {
return super.remove(polygon);
}
public PolygonManager(GoogleMap googleMap) {
super(googleMap);
}
@Override // com.google.maps.android.collections.MapObjectManager
void setListenersOnUiThread() {
if (this.mMap != null) {
this.mMap.setOnPolygonClickListener(this);
}
}
@Override // com.google.maps.android.collections.MapObjectManager
public Collection newCollection() {
return new Collection();
}
/* JADX INFO: Access modifiers changed from: protected */
@Override // com.google.maps.android.collections.MapObjectManager
public void removeObjectFromMap(Polygon polygon) {
polygon.remove();
}
@Override // com.google.android.gms.maps.GoogleMap.OnPolygonClickListener
public void onPolygonClick(Polygon polygon) {
Collection collection = (Collection) this.mAllObjects.get(polygon);
if (collection == null || collection.mPolygonClickListener == null) {
return;
}
collection.mPolygonClickListener.onPolygonClick(polygon);
}
public class Collection extends MapObjectManager.Collection {
private GoogleMap.OnPolygonClickListener mPolygonClickListener;
public Collection() {
super();
}
public Polygon addPolygon(PolygonOptions polygonOptions) {
Polygon polygonAddPolygon = PolygonManager.this.mMap.addPolygon(polygonOptions);
super.add(polygonAddPolygon);
return polygonAddPolygon;
}
public void addAll(java.util.Collection<PolygonOptions> collection) {
Iterator<PolygonOptions> it = collection.iterator();
while (it.hasNext()) {
addPolygon(it.next());
}
}
public void addAll(java.util.Collection<PolygonOptions> collection, boolean z) {
Iterator<PolygonOptions> it = collection.iterator();
while (it.hasNext()) {
addPolygon(it.next()).setVisible(z);
}
}
public void showAll() {
Iterator<Polygon> it = getPolygons().iterator();
while (it.hasNext()) {
it.next().setVisible(true);
}
}
public void hideAll() {
Iterator<Polygon> it = getPolygons().iterator();
while (it.hasNext()) {
it.next().setVisible(false);
}
}
public boolean remove(Polygon polygon) {
return super.remove(polygon);
}
public java.util.Collection<Polygon> getPolygons() {
return getObjects();
}
public void setOnPolygonClickListener(GoogleMap.OnPolygonClickListener onPolygonClickListener) {
this.mPolygonClickListener = onPolygonClickListener;
}
}
}
@@ -0,0 +1,110 @@
package com.google.maps.android.collections;
import com.google.android.gms.maps.GoogleMap;
import com.google.android.gms.maps.model.Polyline;
import com.google.android.gms.maps.model.PolylineOptions;
import com.google.maps.android.collections.MapObjectManager;
import java.util.Iterator;
/* JADX INFO: loaded from: classes2.dex */
public class PolylineManager extends MapObjectManager<Polyline, Collection> implements GoogleMap.OnPolylineClickListener {
@Override // com.google.maps.android.collections.MapObjectManager
public /* bridge */ /* synthetic */ MapObjectManager.Collection getCollection(String str) {
return super.getCollection(str);
}
@Override // com.google.maps.android.collections.MapObjectManager
public /* bridge */ /* synthetic */ MapObjectManager.Collection newCollection(String str) {
return super.newCollection(str);
}
@Override // com.google.maps.android.collections.MapObjectManager
public /* bridge */ /* synthetic */ boolean remove(Polyline polyline) {
return super.remove(polyline);
}
public PolylineManager(GoogleMap googleMap) {
super(googleMap);
}
@Override // com.google.maps.android.collections.MapObjectManager
void setListenersOnUiThread() {
if (this.mMap != null) {
this.mMap.setOnPolylineClickListener(this);
}
}
@Override // com.google.maps.android.collections.MapObjectManager
public Collection newCollection() {
return new Collection();
}
/* JADX INFO: Access modifiers changed from: protected */
@Override // com.google.maps.android.collections.MapObjectManager
public void removeObjectFromMap(Polyline polyline) {
polyline.remove();
}
@Override // com.google.android.gms.maps.GoogleMap.OnPolylineClickListener
public void onPolylineClick(Polyline polyline) {
Collection collection = (Collection) this.mAllObjects.get(polyline);
if (collection == null || collection.mPolylineClickListener == null) {
return;
}
collection.mPolylineClickListener.onPolylineClick(polyline);
}
public class Collection extends MapObjectManager.Collection {
private GoogleMap.OnPolylineClickListener mPolylineClickListener;
public Collection() {
super();
}
public Polyline addPolyline(PolylineOptions polylineOptions) {
Polyline polylineAddPolyline = PolylineManager.this.mMap.addPolyline(polylineOptions);
super.add(polylineAddPolyline);
return polylineAddPolyline;
}
public void addAll(java.util.Collection<PolylineOptions> collection) {
Iterator<PolylineOptions> it = collection.iterator();
while (it.hasNext()) {
addPolyline(it.next());
}
}
public void addAll(java.util.Collection<PolylineOptions> collection, boolean z) {
Iterator<PolylineOptions> it = collection.iterator();
while (it.hasNext()) {
addPolyline(it.next()).setVisible(z);
}
}
public void showAll() {
Iterator<Polyline> it = getPolylines().iterator();
while (it.hasNext()) {
it.next().setVisible(true);
}
}
public void hideAll() {
Iterator<Polyline> it = getPolylines().iterator();
while (it.hasNext()) {
it.next().setVisible(false);
}
}
public boolean remove(Polyline polyline) {
return super.remove(polyline);
}
public java.util.Collection<Polyline> getPolylines() {
return getObjects();
}
public void setOnPolylineClickListener(GoogleMap.OnPolylineClickListener onPolylineClickListener) {
this.mPolylineClickListener = onPolylineClickListener;
}
}
}
@@ -0,0 +1,86 @@
package com.google.maps.android.compose;
import kotlin.Metadata;
import kotlin.enums.EnumEntries;
import kotlin.enums.EnumEntriesKt;
import kotlin.jvm.internal.DefaultConstructorMarker;
/* JADX WARN: Failed to restore enum class, 'enum' modifier and super class removed */
/* JADX WARN: Unknown enum class pattern. Please report as an issue! */
/* JADX INFO: compiled from: CameraMoveStartedReason.kt */
/* JADX INFO: loaded from: classes2.dex */
@Metadata(d1 = {"\u0000\u0012\n\u0002\u0018\u0002\n\u0002\u0010\u0010\n\u0000\n\u0002\u0010\b\n\u0002\b\u000b\b\u0087\u0081\u0002\u0018\u0000 \r2\b\u0012\u0004\u0012\u00020\u00000\u0001:\u0001\rB\u0011\b\u0002\u0012\u0006\u0010\u0002\u001a\u00020\u0003¢\u0006\u0004\b\u0004\u0010\u0005R\u0011\u0010\u0002\u001a\u00020\u0003¢\u0006\b\n\u0000\u001a\u0004\b\u0006\u0010\u0007j\u0002\b\bj\u0002\b\tj\u0002\b\nj\u0002\b\u000bj\u0002\b\\u0006\u000e"}, d2 = {"Lcom/google/maps/android/compose/CameraMoveStartedReason;", "", "value", "", "<init>", "(Ljava/lang/String;II)V", "getValue", "()I", "UNKNOWN", "NO_MOVEMENT_YET", "GESTURE", "API_ANIMATION", "DEVELOPER_ANIMATION", "Companion", "maps-compose_release"}, k = 1, mv = {2, 0, 0}, xi = 48)
public final class CameraMoveStartedReason {
private static final /* synthetic */ EnumEntries $ENTRIES;
private static final /* synthetic */ CameraMoveStartedReason[] $VALUES;
/* JADX INFO: renamed from: Companion, reason: from kotlin metadata */
public static final Companion INSTANCE;
private final int value;
public static final CameraMoveStartedReason UNKNOWN = new CameraMoveStartedReason("UNKNOWN", 0, -2);
public static final CameraMoveStartedReason NO_MOVEMENT_YET = new CameraMoveStartedReason("NO_MOVEMENT_YET", 1, -1);
public static final CameraMoveStartedReason GESTURE = new CameraMoveStartedReason("GESTURE", 2, 1);
public static final CameraMoveStartedReason API_ANIMATION = new CameraMoveStartedReason("API_ANIMATION", 3, 2);
public static final CameraMoveStartedReason DEVELOPER_ANIMATION = new CameraMoveStartedReason("DEVELOPER_ANIMATION", 4, 3);
private static final /* synthetic */ CameraMoveStartedReason[] $values() {
return new CameraMoveStartedReason[]{UNKNOWN, NO_MOVEMENT_YET, GESTURE, API_ANIMATION, DEVELOPER_ANIMATION};
}
public static EnumEntries<CameraMoveStartedReason> getEntries() {
return $ENTRIES;
}
private CameraMoveStartedReason(String str, int i, int i2) {
this.value = i2;
}
public final int getValue() {
return this.value;
}
static {
CameraMoveStartedReason[] cameraMoveStartedReasonArr$values = $values();
$VALUES = cameraMoveStartedReasonArr$values;
$ENTRIES = EnumEntriesKt.enumEntries(cameraMoveStartedReasonArr$values);
INSTANCE = new Companion(null);
}
/* JADX INFO: compiled from: CameraMoveStartedReason.kt */
@Metadata(d1 = {"\u0000\u0018\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\b\n\u0000\b\u0086\u0003\u0018\u00002\u00020\u0001B\t\b\u0002¢\u0006\u0004\b\u0002\u0010\u0003J\u000e\u0010\u0004\u001a\u00020\u00052\u0006\u0010\u0006\u001a\u00020\u0007¨\u0006\b"}, d2 = {"Lcom/google/maps/android/compose/CameraMoveStartedReason$Companion;", "", "<init>", "()V", "fromInt", "Lcom/google/maps/android/compose/CameraMoveStartedReason;", "value", "", "maps-compose_release"}, k = 1, mv = {2, 0, 0}, xi = 48)
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
private Companion() {
}
public final CameraMoveStartedReason fromInt(int value) {
CameraMoveStartedReason cameraMoveStartedReason;
CameraMoveStartedReason[] cameraMoveStartedReasonArrValues = CameraMoveStartedReason.values();
int length = cameraMoveStartedReasonArrValues.length;
int i = 0;
while (true) {
if (i >= length) {
cameraMoveStartedReason = null;
break;
}
cameraMoveStartedReason = cameraMoveStartedReasonArrValues[i];
if (cameraMoveStartedReason.getValue() == value) {
break;
}
i++;
}
return cameraMoveStartedReason == null ? CameraMoveStartedReason.UNKNOWN : cameraMoveStartedReason;
}
}
public static CameraMoveStartedReason valueOf(String str) {
return (CameraMoveStartedReason) Enum.valueOf(CameraMoveStartedReason.class, str);
}
public static CameraMoveStartedReason[] values() {
return (CameraMoveStartedReason[]) $VALUES.clone();
}
}
@@ -0,0 +1,357 @@
package com.google.maps.android.compose;
import androidx.compose.runtime.MutableState;
import androidx.compose.runtime.SnapshotStateKt__SnapshotStateKt;
import androidx.compose.runtime.saveable.Saver;
import androidx.compose.runtime.saveable.SaverKt;
import androidx.compose.runtime.saveable.SaverScope;
import com.google.android.gms.maps.CameraUpdate;
import com.google.android.gms.maps.CameraUpdateFactory;
import com.google.android.gms.maps.GoogleMap;
import com.google.android.gms.maps.Projection;
import com.google.android.gms.maps.model.CameraPosition;
import com.google.android.gms.maps.model.LatLng;
import com.google.maps.android.compose.CameraPositionState;
import java.util.concurrent.CancellationException;
import kotlin.Metadata;
import kotlin.Result;
import kotlin.ResultKt;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.jvm.internal.ContinuationImpl;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlinx.coroutines.CancellableContinuation;
/* JADX INFO: compiled from: CameraPositionState.kt */
/* JADX INFO: loaded from: classes2.dex */
@Metadata(d1 = {"\u0000V\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0010\u000b\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\b\u0007\n\u0002\u0018\u0002\n\u0002\b\u000b\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\b\u0011\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\b\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0004\b\u0007\u0018\u0000 F2\u00020\u0001:\u0002EFB\u0011\u0012\b\b\u0002\u0010\u0002\u001a\u00020\u0003¢\u0006\u0004\b\u0004\u0010\u0005J\u0010\u00102\u001a\u00020\"2\u0006\u00103\u001a\u00020+H\u0002J\u0017\u0010(\u001a\u00020\"2\b\u0010%\u001a\u0004\u0018\u00010$H\u0000¢\u0006\u0002\b:J \u0010;\u001a\u00020\"2\u0006\u0010<\u001a\u00020=2\b\b\u0002\u0010>\u001a\u00020?H\u0087@¢\u0006\u0002\u0010@J.\u0010A\u001a\u00020\"2\u0006\u0010%\u001a\u00020$2\u0006\u0010<\u001a\u00020=2\u0006\u0010>\u001a\u00020?2\f\u0010B\u001a\b\u0012\u0004\u0012\u00020\"0CH\u0002J\u0010\u0010D\u001a\u00020\"2\u0006\u0010<\u001a\u00020=H\u0007R+\u0010\b\u001a\u00020\u00072\u0006\u0010\u0006\u001a\u00020\u00078F@@X\u0086\u008e\u0002¢\u0006\u0012\n\u0004\b\f\u0010\r\u001a\u0004\b\b\u0010\t\"\u0004\b\n\u0010\u000bR+\u0010\u000f\u001a\u00020\u000e2\u0006\u0010\u0006\u001a\u00020\u000e8F@@X\u0086\u008e\u0002¢\u0006\u0012\n\u0004\b\u0014\u0010\r\u001a\u0004\b\u0010\u0010\u0011\"\u0004\b\u0012\u0010\u0013R\u0013\u0010\u0015\u001a\u0004\u0018\u00010\u00168F¢\u0006\u0006\u001a\u0004\b\u0017\u0010\u0018R+\u0010\u0019\u001a\u00020\u00032\u0006\u0010\u0006\u001a\u00020\u00038@@@X\u0080\u008e\u0002¢\u0006\u0012\n\u0004\b\u001d\u0010\r\u001a\u0004\b\u001a\u0010\u001b\"\u0004\b\u001c\u0010\u0005R$\u0010\u0002\u001a\u00020\u00032\u0006\u0010\u001e\u001a\u00020\u00038F@FX\u0086\u000e¢\u0006\f\u001a\u0004\b\u001f\u0010\u001b\"\u0004\b \u0010\u0005R\u0010\u0010!\u001a\u00020\"X\u0082\u0004¢\u0006\u0004\n\u0002\u0010#R/\u0010%\u001a\u0004\u0018\u00010$2\b\u0010\u0006\u001a\u0004\u0018\u00010$8B@BX\u0082\u008e\u0002¢\u0006\u0012\n\u0004\b*\u0010\r\u001a\u0004\b&\u0010'\"\u0004\b(\u0010)R/\u0010,\u001a\u0004\u0018\u00010+2\b\u0010\u0006\u001a\u0004\u0018\u00010+8B@BX\u0082\u008e\u0002¢\u0006\u0012\n\u0004\b1\u0010\r\u001a\u0004\b-\u0010.\"\u0004\b/\u00100R/\u00104\u001a\u0004\u0018\u00010\u00012\b\u0010\u0006\u001a\u0004\u0018\u00010\u00018B@BX\u0082\u008e\u0002¢\u0006\u0012\n\u0004\b9\u0010\r\u001a\u0004\b5\u00106\"\u0004\b7\u00108¨\u0006G"}, d2 = {"Lcom/google/maps/android/compose/CameraPositionState;", "", "position", "Lcom/google/android/gms/maps/model/CameraPosition;", "<init>", "(Lcom/google/android/gms/maps/model/CameraPosition;)V", "<set-?>", "", "isMoving", "()Z", "setMoving$maps_compose_release", "(Z)V", "isMoving$delegate", "Landroidx/compose/runtime/MutableState;", "Lcom/google/maps/android/compose/CameraMoveStartedReason;", "cameraMoveStartedReason", "getCameraMoveStartedReason", "()Lcom/google/maps/android/compose/CameraMoveStartedReason;", "setCameraMoveStartedReason$maps_compose_release", "(Lcom/google/maps/android/compose/CameraMoveStartedReason;)V", "cameraMoveStartedReason$delegate", "projection", "Lcom/google/android/gms/maps/Projection;", "getProjection", "()Lcom/google/android/gms/maps/Projection;", "rawPosition", "getRawPosition$maps_compose_release", "()Lcom/google/android/gms/maps/model/CameraPosition;", "setRawPosition$maps_compose_release", "rawPosition$delegate", "value", "getPosition", "setPosition", "lock", "", "Lkotlin/Unit;", "Lcom/google/android/gms/maps/GoogleMap;", "map", "getMap", "()Lcom/google/android/gms/maps/GoogleMap;", "setMap", "(Lcom/google/android/gms/maps/GoogleMap;)V", "map$delegate", "Lcom/google/maps/android/compose/CameraPositionState$OnMapChangedCallback;", "onMapChanged", "getOnMapChanged", "()Lcom/google/maps/android/compose/CameraPositionState$OnMapChangedCallback;", "setOnMapChanged", "(Lcom/google/maps/android/compose/CameraPositionState$OnMapChangedCallback;)V", "onMapChanged$delegate", "doOnMapChangedLocked", "callback", "movementOwner", "getMovementOwner", "()Ljava/lang/Object;", "setMovementOwner", "(Ljava/lang/Object;)V", "movementOwner$delegate", "setMap$maps_compose_release", "animate", "update", "Lcom/google/android/gms/maps/CameraUpdate;", "durationMs", "", "(Lcom/google/android/gms/maps/CameraUpdate;ILkotlin/coroutines/Continuation;)Ljava/lang/Object;", "performAnimateCameraLocked", "continuation", "Lkotlinx/coroutines/CancellableContinuation;", "move", "OnMapChangedCallback", "Companion", "maps-compose_release"}, k = 1, mv = {2, 0, 0}, xi = 48)
public final class CameraPositionState {
public static final int $stable = 0;
/* JADX INFO: renamed from: Companion, reason: from kotlin metadata */
public static final Companion INSTANCE = new Companion(null);
private static final Saver<CameraPositionState, CameraPosition> Saver = SaverKt.Saver(new Function2() { // from class: com.google.maps.android.compose.CameraPositionState$$ExternalSyntheticLambda0
@Override // kotlin.jvm.functions.Function2
public final Object invoke(Object obj, Object obj2) {
return CameraPositionState.Saver$lambda$7((SaverScope) obj, (CameraPositionState) obj2);
}
}, new Function1() { // from class: com.google.maps.android.compose.CameraPositionState$$ExternalSyntheticLambda1
@Override // kotlin.jvm.functions.Function1
public final Object invoke(Object obj) {
return CameraPositionState.Saver$lambda$8((CameraPosition) obj);
}
});
/* JADX INFO: renamed from: cameraMoveStartedReason$delegate, reason: from kotlin metadata */
private final MutableState cameraMoveStartedReason;
/* JADX INFO: renamed from: isMoving$delegate, reason: from kotlin metadata */
private final MutableState isMoving;
private final Unit lock;
/* JADX INFO: renamed from: map$delegate, reason: from kotlin metadata */
private final MutableState map;
/* JADX INFO: renamed from: movementOwner$delegate, reason: from kotlin metadata */
private final MutableState movementOwner;
/* JADX INFO: renamed from: onMapChanged$delegate, reason: from kotlin metadata */
private final MutableState onMapChanged;
/* JADX INFO: renamed from: rawPosition$delegate, reason: from kotlin metadata */
private final MutableState rawPosition;
/* JADX INFO: Access modifiers changed from: private */
/* JADX INFO: compiled from: CameraPositionState.kt */
@Metadata(d1 = {"\u0000\u0018\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\\u0080\u0001\u0018\u00002\u00020\u0001J\u0012\u0010\u0002\u001a\u00020\u00032\b\u0010\u0004\u001a\u0004\u0018\u00010\u0005H&J\b\u0010\u0006\u001a\u00020\u0003H\u0016¨\u0006\u0007"}, d2 = {"Lcom/google/maps/android/compose/CameraPositionState$OnMapChangedCallback;", "", "onMapChangedLocked", "", "newMap", "Lcom/google/android/gms/maps/GoogleMap;", "onCancelLocked", "maps-compose_release"}, k = 1, mv = {2, 0, 0}, xi = 48)
interface OnMapChangedCallback {
/* JADX INFO: compiled from: CameraPositionState.kt */
@Metadata(k = 3, mv = {2, 0, 0}, xi = 48)
public static final class DefaultImpls {
public static void onCancelLocked(OnMapChangedCallback onMapChangedCallback) {
}
}
void onCancelLocked();
void onMapChangedLocked(GoogleMap newMap);
}
/* JADX INFO: renamed from: com.google.maps.android.compose.CameraPositionState$animate$1, reason: invalid class name */
/* JADX INFO: compiled from: CameraPositionState.kt */
@Metadata(k = 3, mv = {2, 0, 0}, xi = 48)
@DebugMetadata(c = "com.google.maps.android.compose.CameraPositionState", f = "CameraPositionState.kt", i = {0, 0, 0, 0}, l = {324}, m = "animate", n = {"this", "update", "myJob", "durationMs"}, s = {"L$0", "L$1", "L$2", "I$0"})
static final class AnonymousClass1 extends ContinuationImpl {
int I$0;
Object L$0;
Object L$1;
Object L$2;
int label;
/* synthetic */ Object result;
AnonymousClass1(Continuation<? super AnonymousClass1> continuation) {
super(continuation);
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
this.result = obj;
this.label |= Integer.MIN_VALUE;
return CameraPositionState.this.animate(null, 0, this);
}
}
public CameraPositionState() {
this(null, 1, 0 == true ? 1 : 0);
}
public CameraPositionState(CameraPosition position) {
Intrinsics.checkNotNullParameter(position, "position");
this.isMoving = SnapshotStateKt__SnapshotStateKt.mutableStateOf$default(false, null, 2, null);
this.cameraMoveStartedReason = SnapshotStateKt__SnapshotStateKt.mutableStateOf$default(CameraMoveStartedReason.NO_MOVEMENT_YET, null, 2, null);
this.rawPosition = SnapshotStateKt__SnapshotStateKt.mutableStateOf$default(position, null, 2, null);
this.lock = Unit.INSTANCE;
this.map = SnapshotStateKt__SnapshotStateKt.mutableStateOf$default(null, null, 2, null);
this.onMapChanged = SnapshotStateKt__SnapshotStateKt.mutableStateOf$default(null, null, 2, null);
this.movementOwner = SnapshotStateKt__SnapshotStateKt.mutableStateOf$default(null, null, 2, null);
}
public /* synthetic */ CameraPositionState(CameraPosition cameraPosition, int i, DefaultConstructorMarker defaultConstructorMarker) {
this((i & 1) != 0 ? new CameraPosition(new LatLng(0.0d, 0.0d), 0.0f, 0.0f, 0.0f) : cameraPosition);
}
/* JADX WARN: Multi-variable type inference failed */
public final boolean isMoving() {
return ((Boolean) this.isMoving.getValue()).booleanValue();
}
public final void setMoving$maps_compose_release(boolean z) {
this.isMoving.setValue(Boolean.valueOf(z));
}
/* JADX WARN: Multi-variable type inference failed */
public final CameraMoveStartedReason getCameraMoveStartedReason() {
return (CameraMoveStartedReason) this.cameraMoveStartedReason.getValue();
}
public final void setCameraMoveStartedReason$maps_compose_release(CameraMoveStartedReason cameraMoveStartedReason) {
Intrinsics.checkNotNullParameter(cameraMoveStartedReason, "<set-?>");
this.cameraMoveStartedReason.setValue(cameraMoveStartedReason);
}
public final Projection getProjection() {
GoogleMap map = getMap();
if (map != null) {
return map.getProjection();
}
return null;
}
/* JADX WARN: Multi-variable type inference failed */
public final CameraPosition getRawPosition$maps_compose_release() {
return (CameraPosition) this.rawPosition.getValue();
}
public final void setRawPosition$maps_compose_release(CameraPosition cameraPosition) {
Intrinsics.checkNotNullParameter(cameraPosition, "<set-?>");
this.rawPosition.setValue(cameraPosition);
}
public final CameraPosition getPosition() {
return getRawPosition$maps_compose_release();
}
public final void setPosition(CameraPosition value) {
Intrinsics.checkNotNullParameter(value, "value");
synchronized (this.lock) {
GoogleMap map = getMap();
if (map == null) {
setRawPosition$maps_compose_release(value);
} else {
map.moveCamera(CameraUpdateFactory.newCameraPosition(value));
}
Unit unit = Unit.INSTANCE;
}
}
/* JADX INFO: Access modifiers changed from: private */
/* JADX WARN: Multi-variable type inference failed */
public final GoogleMap getMap() {
return (GoogleMap) this.map.getValue();
}
private final void setMap(GoogleMap googleMap) {
this.map.setValue(googleMap);
}
/* JADX INFO: Access modifiers changed from: private */
public final OnMapChangedCallback getOnMapChanged() {
return (OnMapChangedCallback) this.onMapChanged.getValue();
}
/* JADX INFO: Access modifiers changed from: private */
public final void setOnMapChanged(OnMapChangedCallback onMapChangedCallback) {
this.onMapChanged.setValue(onMapChangedCallback);
}
/* JADX INFO: Access modifiers changed from: private */
public final void doOnMapChangedLocked(OnMapChangedCallback callback) {
OnMapChangedCallback onMapChanged = getOnMapChanged();
if (onMapChanged != null) {
onMapChanged.onCancelLocked();
}
setOnMapChanged(callback);
}
private final Object getMovementOwner() {
return this.movementOwner.getValue();
}
/* JADX INFO: Access modifiers changed from: private */
public final void setMovementOwner(Object obj) {
this.movementOwner.setValue(obj);
}
public final void setMap$maps_compose_release(GoogleMap map) {
synchronized (this.lock) {
if (getMap() == null && map == null) {
return;
}
if (getMap() != null && map != null) {
throw new IllegalStateException("CameraPositionState may only be associated with one GoogleMap at a time".toString());
}
setMap(map);
if (map == null) {
setMoving$maps_compose_release(false);
} else {
map.moveCamera(CameraUpdateFactory.newCameraPosition(getPosition()));
}
OnMapChangedCallback onMapChanged = getOnMapChanged();
if (onMapChanged != null) {
setOnMapChanged(null);
onMapChanged.onMapChangedLocked(map);
Unit unit = Unit.INSTANCE;
}
}
}
public static /* synthetic */ Object animate$default(CameraPositionState cameraPositionState, CameraUpdate cameraUpdate, int i, Continuation continuation, int i2, Object obj) {
if ((i2 & 2) != 0) {
i = Integer.MAX_VALUE;
}
return cameraPositionState.animate(cameraUpdate, i, continuation);
}
/* JADX WARN: Removed duplicated region for block: B:35:0x00b4 */
/* JADX WARN: Removed duplicated region for block: B:55:0x00dc */
/* JADX WARN: Removed duplicated region for block: B:7:0x0014 */
/* JADX WARN: Type inference failed for: r6v1, types: [com.google.maps.android.compose.CameraPositionState$animate$2$1$animateOnMapAvailable$1] */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct code enable 'Show inconsistent code' option in preferences
*/
public final java.lang.Object animate(final com.google.android.gms.maps.CameraUpdate r9, final int r10, kotlin.coroutines.Continuation<? super kotlin.Unit> r11) throws java.lang.Throwable {
/*
Method dump skipped, instruction units count: 247
To view this dump change 'Code comments level' option to 'DEBUG'
*/
throw new UnsupportedOperationException("Method not decompiled: com.google.maps.android.compose.CameraPositionState.animate(com.google.android.gms.maps.CameraUpdate, int, kotlin.coroutines.Continuation):java.lang.Object");
}
/* JADX INFO: Access modifiers changed from: private */
public final void performAnimateCameraLocked(final GoogleMap map, CameraUpdate update, int durationMs, final CancellableContinuation<? super Unit> continuation) {
GoogleMap.CancelableCallback cancelableCallback = new GoogleMap.CancelableCallback() { // from class: com.google.maps.android.compose.CameraPositionState$performAnimateCameraLocked$cancelableCallback$1
@Override // com.google.android.gms.maps.GoogleMap.CancelableCallback
public void onCancel() {
CancellableContinuation<Unit> cancellableContinuation = continuation;
Result.Companion companion = Result.INSTANCE;
cancellableContinuation.resumeWith(Result.m8388constructorimpl(ResultKt.createFailure(new CancellationException("Animation cancelled"))));
}
@Override // com.google.android.gms.maps.GoogleMap.CancelableCallback
public void onFinish() {
CancellableContinuation<Unit> cancellableContinuation = continuation;
Result.Companion companion = Result.INSTANCE;
cancellableContinuation.resumeWith(Result.m8388constructorimpl(Unit.INSTANCE));
}
};
if (durationMs == Integer.MAX_VALUE) {
map.animateCamera(update, cancelableCallback);
} else {
map.animateCamera(update, durationMs, cancelableCallback);
}
doOnMapChangedLocked(new OnMapChangedCallback() { // from class: com.google.maps.android.compose.CameraPositionState.performAnimateCameraLocked.1
@Override // com.google.maps.android.compose.CameraPositionState.OnMapChangedCallback
public void onCancelLocked() {
OnMapChangedCallback.DefaultImpls.onCancelLocked(this);
}
@Override // com.google.maps.android.compose.CameraPositionState.OnMapChangedCallback
public final void onMapChangedLocked(GoogleMap googleMap) {
if (googleMap != null) {
throw new IllegalStateException("New GoogleMap unexpectedly set while an animation was still running".toString());
}
map.stopAnimation();
}
});
}
public final void move(final CameraUpdate update) {
Intrinsics.checkNotNullParameter(update, "update");
synchronized (this.lock) {
GoogleMap map = getMap();
setMovementOwner(null);
if (map == null) {
doOnMapChangedLocked(new OnMapChangedCallback() { // from class: com.google.maps.android.compose.CameraPositionState$move$1$1
@Override // com.google.maps.android.compose.CameraPositionState.OnMapChangedCallback
public void onCancelLocked() {
CameraPositionState.OnMapChangedCallback.DefaultImpls.onCancelLocked(this);
}
@Override // com.google.maps.android.compose.CameraPositionState.OnMapChangedCallback
public final void onMapChangedLocked(GoogleMap googleMap) {
if (googleMap != null) {
googleMap.moveCamera(update);
}
}
});
} else {
map.moveCamera(update);
}
Unit unit = Unit.INSTANCE;
}
}
/* JADX INFO: compiled from: CameraPositionState.kt */
@Metadata(d1 = {"\u0000\u001c\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\b\u0086\u0003\u0018\u00002\u00020\u0001B\t\b\u0002¢\u0006\u0004\b\u0002\u0010\u0003R\u001d\u0010\u0004\u001a\u000e\u0012\u0004\u0012\u00020\u0006\u0012\u0004\u0012\u00020\u00070\u0005¢\u0006\b\n\u0000\u001a\u0004\b\b\u0010\\u0006\n"}, d2 = {"Lcom/google/maps/android/compose/CameraPositionState$Companion;", "", "<init>", "()V", "Saver", "Landroidx/compose/runtime/saveable/Saver;", "Lcom/google/maps/android/compose/CameraPositionState;", "Lcom/google/android/gms/maps/model/CameraPosition;", "getSaver", "()Landroidx/compose/runtime/saveable/Saver;", "maps-compose_release"}, k = 1, mv = {2, 0, 0}, xi = 48)
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
private Companion() {
}
public final Saver<CameraPositionState, CameraPosition> getSaver() {
return CameraPositionState.Saver;
}
}
/* JADX INFO: Access modifiers changed from: private */
public static final CameraPosition Saver$lambda$7(SaverScope Saver2, CameraPositionState it) {
Intrinsics.checkNotNullParameter(Saver2, "$this$Saver");
Intrinsics.checkNotNullParameter(it, "it");
return it.getPosition();
}
/* JADX INFO: Access modifiers changed from: private */
public static final CameraPositionState Saver$lambda$8(CameraPosition it) {
Intrinsics.checkNotNullParameter(it, "it");
return new CameraPositionState(it);
}
}
@@ -0,0 +1,94 @@
package com.google.maps.android.compose;
import androidx.compose.runtime.Composer;
import androidx.compose.runtime.ComposerKt;
import androidx.compose.runtime.CompositionLocalKt;
import androidx.compose.runtime.ProvidableCompositionLocal;
import androidx.compose.runtime.saveable.RememberSaveableKt;
import androidx.compose.runtime.saveable.Saver;
import kotlin.Metadata;
import kotlin.Unit;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.Intrinsics;
/* JADX INFO: compiled from: CameraPositionState.kt */
/* JADX INFO: loaded from: classes2.dex */
@Metadata(d1 = {"\u0000&\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000e\n\u0000\n\u0002\u0018\u0002\n\u0002\u0010\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0006\u001a8\u0010\u0000\u001a\u00020\u00012\n\b\u0002\u0010\u0002\u001a\u0004\u0018\u00010\u00032\u0019\b\u0006\u0010\u0004\u001a\u0013\u0012\u0004\u0012\u00020\u0001\u0012\u0004\u0012\u00020\u00060\u0005¢\u0006\u0002\b\u0007H\u0087\\u0001\u0000¢\u0006\u0002\u0010\b\"\u001a\u0010\t\u001a\b\u0012\u0004\u0012\u00020\u00010\nX\u0080\u0004¢\u0006\b\n\u0000\u001a\u0004\b\u000b\u0010\f\"\u0011\u0010\r\u001a\u00020\u00018G¢\u0006\u0006\u001a\u0004\b\u000e\u0010\u000f\u0082\u0002\u0007\n\u0005\b\u009920\u0001¨\u0006\u0010"}, d2 = {"rememberCameraPositionState", "Lcom/google/maps/android/compose/CameraPositionState;", "key", "", "init", "Lkotlin/Function1;", "", "Lkotlin/ExtensionFunctionType;", "(Ljava/lang/String;Lkotlin/jvm/functions/Function1;Landroidx/compose/runtime/Composer;II)Lcom/google/maps/android/compose/CameraPositionState;", "LocalCameraPositionState", "Landroidx/compose/runtime/ProvidableCompositionLocal;", "getLocalCameraPositionState", "()Landroidx/compose/runtime/ProvidableCompositionLocal;", "currentCameraPositionState", "getCurrentCameraPositionState", "(Landroidx/compose/runtime/Composer;I)Lcom/google/maps/android/compose/CameraPositionState;", "maps-compose_release"}, k = 2, mv = {2, 0, 0}, xi = 48)
public final class CameraPositionStateKt {
private static final ProvidableCompositionLocal<CameraPositionState> LocalCameraPositionState = CompositionLocalKt.staticCompositionLocalOf(new Function0() { // from class: com.google.maps.android.compose.CameraPositionStateKt$$ExternalSyntheticLambda0
@Override // kotlin.jvm.functions.Function0
public final Object invoke() {
return CameraPositionStateKt.LocalCameraPositionState$lambda$0();
}
});
/* JADX INFO: renamed from: com.google.maps.android.compose.CameraPositionStateKt$rememberCameraPositionState$1, reason: invalid class name */
/* JADX INFO: compiled from: CameraPositionState.kt */
@Metadata(k = 3, mv = {2, 0, 0}, xi = 176)
public static final class AnonymousClass1 implements Function1<CameraPositionState, Unit> {
public static final AnonymousClass1 INSTANCE = new AnonymousClass1();
/* JADX INFO: renamed from: invoke, reason: avoid collision after fix types in other method */
public final void invoke2(CameraPositionState cameraPositionState) {
Intrinsics.checkNotNullParameter(cameraPositionState, "<this>");
}
@Override // kotlin.jvm.functions.Function1
public /* bridge */ /* synthetic */ Unit invoke(CameraPositionState cameraPositionState) {
invoke2(cameraPositionState);
return Unit.INSTANCE;
}
}
public static final CameraPositionState rememberCameraPositionState(String str, Function1<? super CameraPositionState, Unit> function1, Composer composer, int i, int i2) {
composer.startReplaceableGroup(-1911106014);
if ((i2 & 1) != 0) {
str = null;
}
String str2 = str;
if ((i2 & 2) != 0) {
function1 = AnonymousClass1.INSTANCE;
}
CameraPositionState cameraPositionState = (CameraPositionState) RememberSaveableKt.m3946rememberSaveable(new Object[0], (Saver) CameraPositionState.INSTANCE.getSaver(), str2, (Function0) new AnonymousClass2(function1), composer, ((i << 6) & 896) | 72, 0);
composer.endReplaceableGroup();
return cameraPositionState;
}
/* JADX INFO: renamed from: com.google.maps.android.compose.CameraPositionStateKt$rememberCameraPositionState$2, reason: invalid class name */
/* JADX INFO: compiled from: CameraPositionState.kt */
@Metadata(k = 3, mv = {2, 0, 0}, xi = 176)
public static final class AnonymousClass2 implements Function0<CameraPositionState> {
final /* synthetic */ Function1<CameraPositionState, Unit> $init;
/* JADX WARN: Multi-variable type inference failed */
public AnonymousClass2(Function1<? super CameraPositionState, Unit> function1) {
this.$init = function1;
}
/* JADX WARN: Can't rename method to resolve collision */
@Override // kotlin.jvm.functions.Function0
public final CameraPositionState invoke() {
CameraPositionState cameraPositionState = new CameraPositionState(null, 1, null);
this.$init.invoke(cameraPositionState);
return cameraPositionState;
}
}
/* JADX INFO: Access modifiers changed from: private */
public static final CameraPositionState LocalCameraPositionState$lambda$0() {
return new CameraPositionState(null, 1, null);
}
public static final ProvidableCompositionLocal<CameraPositionState> getLocalCameraPositionState() {
return LocalCameraPositionState;
}
public static final CameraPositionState getCurrentCameraPositionState(Composer composer, int i) {
ProvidableCompositionLocal<CameraPositionState> providableCompositionLocal = LocalCameraPositionState;
ComposerKt.sourceInformationMarkerStart(composer, 2023513938, "CC:CompositionLocal.kt#9igjgp");
Object objConsume = composer.consume(providableCompositionLocal);
ComposerKt.sourceInformationMarkerEnd(composer);
return (CameraPositionState) objConsume;
}
}
@@ -0,0 +1,180 @@
package com.google.maps.android.compose;
import androidx.compose.runtime.Composer;
import androidx.compose.runtime.RecomposeScopeImplKt;
import androidx.compose.ui.graphics.ColorKt;
import com.google.android.gms.maps.GoogleMap;
import com.google.android.gms.maps.model.Circle;
import com.google.android.gms.maps.model.CircleOptions;
import com.google.android.gms.maps.model.LatLng;
import java.util.List;
import kotlin.Metadata;
import kotlin.Unit;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.Intrinsics;
/* JADX INFO: compiled from: Circle.kt */
/* JADX INFO: loaded from: classes2.dex */
@Metadata(d1 = {"\u0000F\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000b\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0006\n\u0002\b\u0002\n\u0002\u0010 \n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0007\n\u0000\n\u0002\u0010\u0000\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\u001a\u0091\u0001\u0010\u0000\u001a\u00020\u00012\u0006\u0010\u0002\u001a\u00020\u00032\b\b\u0002\u0010\u0004\u001a\u00020\u00052\b\b\u0002\u0010\u0006\u001a\u00020\u00072\b\b\u0002\u0010\b\u001a\u00020\t2\b\b\u0002\u0010\n\u001a\u00020\u00072\u0010\b\u0002\u0010\u000b\u001a\n\u0012\u0004\u0012\u00020\r\u0018\u00010\f2\b\b\u0002\u0010\u000e\u001a\u00020\u000f2\n\b\u0002\u0010\u0010\u001a\u0004\u0018\u00010\u00112\b\b\u0002\u0010\u0012\u001a\u00020\u00052\b\b\u0002\u0010\u0013\u001a\u00020\u000f2\u0014\b\u0002\u0010\u0014\u001a\u000e\u0012\u0004\u0012\u00020\u0016\u0012\u0004\u0012\u00020\u00010\u0015H\u0007¢\u0006\u0004\b\u0017\u0010\u0018¨\u0006\u0019"}, d2 = {"Circle", "", "center", "Lcom/google/android/gms/maps/model/LatLng;", "clickable", "", "fillColor", "Landroidx/compose/ui/graphics/Color;", "radius", "", "strokeColor", "strokePattern", "", "Lcom/google/android/gms/maps/model/PatternItem;", "strokeWidth", "", "tag", "", "visible", "zIndex", "onClick", "Lkotlin/Function1;", "Lcom/google/android/gms/maps/model/Circle;", "Circle-rQ_Q3OA", "(Lcom/google/android/gms/maps/model/LatLng;ZJDJLjava/util/List;FLjava/lang/Object;ZFLkotlin/jvm/functions/Function1;Landroidx/compose/runtime/Composer;III)V", "maps-compose_release"}, k = 2, mv = {2, 0, 0}, xi = 48)
public final class CircleKt {
/* JADX INFO: Access modifiers changed from: private */
public static final Unit Circle_rQ_Q3OA$lambda$13(LatLng center, boolean z, long j, double d, long j2, List list, float f, Object obj, boolean z2, float f2, Function1 function1, int i, int i2, int i3, Composer composer, int i4) {
Intrinsics.checkNotNullParameter(center, "$center");
m7768CirclerQ_Q3OA(center, z, j, d, j2, list, f, obj, z2, f2, function1, composer, RecomposeScopeImplKt.updateChangedFlags(i | 1), RecomposeScopeImplKt.updateChangedFlags(i2), i3);
return Unit.INSTANCE;
}
/* JADX INFO: Access modifiers changed from: private */
public static final Unit Circle_rQ_Q3OA$lambda$0(Circle it) {
Intrinsics.checkNotNullParameter(it, "it");
return Unit.INSTANCE;
}
/* JADX WARN: Removed duplicated region for block: B:105:0x0131 */
/* JADX WARN: Removed duplicated region for block: B:113:0x0161 */
/* JADX WARN: Removed duplicated region for block: B:114:0x0163 */
/* JADX WARN: Removed duplicated region for block: B:115:0x0167 */
/* JADX WARN: Removed duplicated region for block: B:117:0x016b */
/* JADX WARN: Removed duplicated region for block: B:118:0x0174 */
/* JADX WARN: Removed duplicated region for block: B:120:0x0178 */
/* JADX WARN: Removed duplicated region for block: B:121:0x017d */
/* JADX WARN: Removed duplicated region for block: B:123:0x0181 */
/* JADX WARN: Removed duplicated region for block: B:124:0x018a */
/* JADX WARN: Removed duplicated region for block: B:127:0x018f */
/* JADX WARN: Removed duplicated region for block: B:128:0x0191 */
/* JADX WARN: Removed duplicated region for block: B:130:0x0195 */
/* JADX WARN: Removed duplicated region for block: B:131:0x019a */
/* JADX WARN: Removed duplicated region for block: B:133:0x019e */
/* JADX WARN: Removed duplicated region for block: B:134:0x01a0 */
/* JADX WARN: Removed duplicated region for block: B:136:0x01a4 */
/* JADX WARN: Removed duplicated region for block: B:137:0x01a8 */
/* JADX WARN: Removed duplicated region for block: B:139:0x01ac */
/* JADX WARN: Removed duplicated region for block: B:140:0x01b0 */
/* JADX WARN: Removed duplicated region for block: B:142:0x01b4 */
/* JADX WARN: Removed duplicated region for block: B:143:0x01bb */
/* JADX WARN: Removed duplicated region for block: B:146:0x01c5 */
/* JADX WARN: Removed duplicated region for block: B:147:0x01c8 */
/* JADX WARN: Removed duplicated region for block: B:150:0x0202 */
/* JADX WARN: Removed duplicated region for block: B:153:0x020e */
/* JADX WARN: Removed duplicated region for block: B:154:0x021b */
/* JADX WARN: Removed duplicated region for block: B:158:0x02b7 */
/* JADX WARN: Removed duplicated region for block: B:160:? A[RETURN, SYNTHETIC] */
/* JADX WARN: Removed duplicated region for block: B:26:0x004b */
/* JADX WARN: Removed duplicated region for block: B:27:0x004e */
/* JADX WARN: Removed duplicated region for block: B:37:0x0067 */
/* JADX WARN: Removed duplicated region for block: B:38:0x006a */
/* JADX WARN: Removed duplicated region for block: B:48:0x0083 */
/* JADX WARN: Removed duplicated region for block: B:49:0x0088 */
/* JADX WARN: Removed duplicated region for block: B:58:0x00a2 */
/* JADX WARN: Removed duplicated region for block: B:61:0x00aa */
/* JADX WARN: Removed duplicated region for block: B:62:0x00b1 */
/* JADX WARN: Removed duplicated region for block: B:71:0x00c9 */
/* JADX WARN: Removed duplicated region for block: B:74:0x00d1 */
/* JADX WARN: Removed duplicated region for block: B:75:0x00d8 */
/* JADX WARN: Removed duplicated region for block: B:84:0x00f1 */
/* JADX WARN: Removed duplicated region for block: B:85:0x00f8 */
/* JADX WARN: Removed duplicated region for block: B:94:0x0110 */
/* JADX WARN: Removed duplicated region for block: B:95:0x0115 */
/* JADX INFO: renamed from: Circle-rQ_Q3OA, reason: not valid java name */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct code enable 'Show inconsistent code' option in preferences
*/
public static final void m7768CirclerQ_Q3OA(final com.google.android.gms.maps.model.LatLng r32, boolean r33, long r34, double r36, long r38, java.util.List<? extends com.google.android.gms.maps.model.PatternItem> r40, float r41, java.lang.Object r42, boolean r43, float r44, kotlin.jvm.functions.Function1<? super com.google.android.gms.maps.model.Circle, kotlin.Unit> r45, androidx.compose.runtime.Composer r46, final int r47, final int r48, final int r49) {
/*
Method dump skipped, instruction units count: 723
To view this dump change 'Code comments level' option to 'DEBUG'
*/
throw new UnsupportedOperationException("Method not decompiled: com.google.maps.android.compose.CircleKt.m7768CirclerQ_Q3OA(com.google.android.gms.maps.model.LatLng, boolean, long, double, long, java.util.List, float, java.lang.Object, boolean, float, kotlin.jvm.functions.Function1, androidx.compose.runtime.Composer, int, int, int):void");
}
/* JADX INFO: Access modifiers changed from: private */
public static final CircleNode Circle_rQ_Q3OA$lambda$2(MapApplier mapApplier, Object obj, Function1 function1, LatLng center, boolean z, long j, double d, long j2, List list, float f, boolean z2, float f2) {
GoogleMap map;
Intrinsics.checkNotNullParameter(center, "$center");
if (mapApplier != null && (map = mapApplier.getMap()) != null) {
CircleOptions circleOptions = new CircleOptions();
circleOptions.center(center);
circleOptions.clickable(z);
circleOptions.fillColor(ColorKt.m4555toArgb8_81llA(j));
circleOptions.radius(d);
circleOptions.strokeColor(ColorKt.m4555toArgb8_81llA(j2));
circleOptions.strokePattern(list);
circleOptions.strokeWidth(f);
circleOptions.visible(z2);
circleOptions.zIndex(f2);
Circle circleAddCircle = map.addCircle(circleOptions);
Intrinsics.checkNotNullExpressionValue(circleAddCircle, "this.addCircle(\n …ons(optionsActions)\n )");
if (circleAddCircle != null) {
circleAddCircle.setTag(obj);
return new CircleNode(circleAddCircle, function1);
}
}
throw new IllegalStateException("Error adding circle".toString());
}
/* JADX INFO: Access modifiers changed from: private */
public static final Unit Circle_rQ_Q3OA$lambda$12$lambda$3(CircleNode update, Function1 it) {
Intrinsics.checkNotNullParameter(update, "$this$update");
Intrinsics.checkNotNullParameter(it, "it");
update.setOnCircleClick(it);
return Unit.INSTANCE;
}
/* JADX INFO: Access modifiers changed from: private */
public static final Unit Circle_rQ_Q3OA$lambda$12$lambda$4(CircleNode update, LatLng it) {
Intrinsics.checkNotNullParameter(update, "$this$update");
Intrinsics.checkNotNullParameter(it, "it");
update.getCircle().setCenter(it);
return Unit.INSTANCE;
}
/* JADX INFO: Access modifiers changed from: private */
public static final Unit Circle_rQ_Q3OA$lambda$12$lambda$5(CircleNode update, boolean z) {
Intrinsics.checkNotNullParameter(update, "$this$update");
update.getCircle().setClickable(z);
return Unit.INSTANCE;
}
/* JADX INFO: Access modifiers changed from: private */
public static final Unit Circle_rQ_Q3OA$lambda$12$lambda$6(CircleNode update, double d) {
Intrinsics.checkNotNullParameter(update, "$this$update");
update.getCircle().setRadius(d);
return Unit.INSTANCE;
}
/* JADX INFO: Access modifiers changed from: private */
public static final Unit Circle_rQ_Q3OA$lambda$12$lambda$7(CircleNode update, List list) {
Intrinsics.checkNotNullParameter(update, "$this$update");
update.getCircle().setStrokePattern(list);
return Unit.INSTANCE;
}
/* JADX INFO: Access modifiers changed from: private */
public static final Unit Circle_rQ_Q3OA$lambda$12$lambda$8(CircleNode update, float f) {
Intrinsics.checkNotNullParameter(update, "$this$update");
update.getCircle().setStrokeWidth(f);
return Unit.INSTANCE;
}
/* JADX INFO: Access modifiers changed from: private */
public static final Unit Circle_rQ_Q3OA$lambda$12$lambda$9(CircleNode update, Object obj) {
Intrinsics.checkNotNullParameter(update, "$this$update");
update.getCircle().setTag(obj);
return Unit.INSTANCE;
}
/* JADX INFO: Access modifiers changed from: private */
public static final Unit Circle_rQ_Q3OA$lambda$12$lambda$10(CircleNode update, boolean z) {
Intrinsics.checkNotNullParameter(update, "$this$update");
update.getCircle().setVisible(z);
return Unit.INSTANCE;
}
/* JADX INFO: Access modifiers changed from: private */
public static final Unit Circle_rQ_Q3OA$lambda$12$lambda$11(CircleNode update, float f) {
Intrinsics.checkNotNullParameter(update, "$this$update");
update.getCircle().setZIndex(f);
return Unit.INSTANCE;
}
}
@@ -0,0 +1,52 @@
package com.google.maps.android.compose;
import com.google.android.gms.maps.model.Circle;
import com.google.maps.android.compose.MapNode;
import kotlin.Metadata;
import kotlin.Unit;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.Intrinsics;
/* JADX INFO: compiled from: Circle.kt */
/* JADX INFO: loaded from: classes2.dex */
@Metadata(d1 = {"\u0000\u001c\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0010\u0002\n\u0002\b\n\b\u0001\u0018\u00002\u00020\u0001B#\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u0012\u0012\u0010\u0004\u001a\u000e\u0012\u0004\u0012\u00020\u0003\u0012\u0004\u0012\u00020\u00060\u0005¢\u0006\u0004\b\u0007\u0010\bJ\b\u0010\u000f\u001a\u00020\u0006H\u0016R\u0011\u0010\u0002\u001a\u00020\u0003¢\u0006\b\n\u0000\u001a\u0004\b\t\u0010\nR&\u0010\u0004\u001a\u000e\u0012\u0004\u0012\u00020\u0003\u0012\u0004\u0012\u00020\u00060\u0005X\u0086\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b\u000b\u0010\f\"\u0004\b\r\u0010\u000e¨\u0006\u0010"}, d2 = {"Lcom/google/maps/android/compose/CircleNode;", "Lcom/google/maps/android/compose/MapNode;", "circle", "Lcom/google/android/gms/maps/model/Circle;", "onCircleClick", "Lkotlin/Function1;", "", "<init>", "(Lcom/google/android/gms/maps/model/Circle;Lkotlin/jvm/functions/Function1;)V", "getCircle", "()Lcom/google/android/gms/maps/model/Circle;", "getOnCircleClick", "()Lkotlin/jvm/functions/Function1;", "setOnCircleClick", "(Lkotlin/jvm/functions/Function1;)V", "onRemoved", "maps-compose_release"}, k = 1, mv = {2, 0, 0}, xi = 48)
public final class CircleNode implements MapNode {
public static final int $stable = 8;
private final Circle circle;
private Function1<? super Circle, Unit> onCircleClick;
public CircleNode(Circle circle, Function1<? super Circle, Unit> onCircleClick) {
Intrinsics.checkNotNullParameter(circle, "circle");
Intrinsics.checkNotNullParameter(onCircleClick, "onCircleClick");
this.circle = circle;
this.onCircleClick = onCircleClick;
}
@Override // com.google.maps.android.compose.MapNode
public void onAttached() {
MapNode.DefaultImpls.onAttached(this);
}
@Override // com.google.maps.android.compose.MapNode
public void onCleared() {
MapNode.DefaultImpls.onCleared(this);
}
public final Circle getCircle() {
return this.circle;
}
public final Function1<Circle, Unit> getOnCircleClick() {
return this.onCircleClick;
}
public final void setOnCircleClick(Function1<? super Circle, Unit> function1) {
Intrinsics.checkNotNullParameter(function1, "<set-?>");
this.onCircleClick = function1;
}
@Override // com.google.maps.android.compose.MapNode
public void onRemoved() {
this.circle.remove();
}
}
@@ -0,0 +1,54 @@
package com.google.maps.android.compose;
import androidx.compose.runtime.Composer;
import androidx.compose.runtime.internal.ComposableLambdaKt;
import kotlin.Metadata;
import kotlin.Unit;
import kotlin.jvm.functions.Function2;
/* JADX INFO: compiled from: GoogleMap.kt */
/* JADX INFO: loaded from: classes2.dex */
@Metadata(k = 3, mv = {2, 0, 0}, xi = 48)
public final class ComposableSingletons$GoogleMapKt {
public static final ComposableSingletons$GoogleMapKt INSTANCE = new ComposableSingletons$GoogleMapKt();
/* JADX INFO: renamed from: lambda-1, reason: not valid java name */
public static Function2<Composer, Integer, Unit> f59lambda1 = ComposableLambdaKt.composableLambdaInstance(-794123040, false, new Function2<Composer, Integer, Unit>() { // from class: com.google.maps.android.compose.ComposableSingletons$GoogleMapKt$lambda-1$1
@Override // kotlin.jvm.functions.Function2
public /* bridge */ /* synthetic */ Unit invoke(Composer composer, Integer num) {
invoke(composer, num.intValue());
return Unit.INSTANCE;
}
public final void invoke(Composer composer, int i) {
if ((i & 11) == 2 && composer.getSkipping()) {
composer.skipToGroupEnd();
}
}
});
/* JADX INFO: renamed from: lambda-2, reason: not valid java name */
public static Function2<Composer, Integer, Unit> f60lambda2 = ComposableLambdaKt.composableLambdaInstance(-400333435, false, new Function2<Composer, Integer, Unit>() { // from class: com.google.maps.android.compose.ComposableSingletons$GoogleMapKt$lambda-2$1
@Override // kotlin.jvm.functions.Function2
public /* bridge */ /* synthetic */ Unit invoke(Composer composer, Integer num) {
invoke(composer, num.intValue());
return Unit.INSTANCE;
}
public final void invoke(Composer composer, int i) {
if ((i & 11) == 2 && composer.getSkipping()) {
composer.skipToGroupEnd();
}
}
});
/* JADX INFO: renamed from: getLambda-1$maps_compose_release, reason: not valid java name */
public final Function2<Composer, Integer, Unit> m7771getLambda1$maps_compose_release() {
return f59lambda1;
}
/* JADX INFO: renamed from: getLambda-2$maps_compose_release, reason: not valid java name */
public final Function2<Composer, Integer, Unit> m7772getLambda2$maps_compose_release() {
return f60lambda2;
}
}
@@ -0,0 +1,94 @@
package com.google.maps.android.compose;
import android.content.Context;
import android.view.View;
import androidx.compose.runtime.Composer;
import androidx.compose.runtime.internal.ComposableLambdaKt;
import androidx.compose.ui.platform.ComposeView;
import com.google.android.gms.maps.GoogleMap;
import com.google.android.gms.maps.MapView;
import com.google.android.gms.maps.model.Marker;
import java.io.IOException;
import kotlin.Metadata;
import kotlin.Unit;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.functions.Function3;
import kotlin.jvm.internal.Intrinsics;
/* JADX INFO: compiled from: ComposeInfoWindowAdapter.kt */
/* JADX INFO: loaded from: classes2.dex */
@Metadata(d1 = {"\u0000(\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0003\b\u0001\u0018\u00002\u00020\u0001B%\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u0012\u0014\u0010\u0004\u001a\u0010\u0012\u0004\u0012\u00020\u0006\u0012\u0006\u0012\u0004\u0018\u00010\u00070\u0005¢\u0006\u0004\b\b\u0010\tJ\u0012\u0010\n\u001a\u0004\u0018\u00010\u000b2\u0006\u0010\f\u001a\u00020\u0006H\u0016J\u0012\u0010\r\u001a\u0004\u0018\u00010\u000b2\u0006\u0010\f\u001a\u00020\u0006H\u0016R\u000e\u0010\u0002\u001a\u00020\u0003X\u0082\u0004¢\u0006\u0002\n\u0000R\u001c\u0010\u0004\u001a\u0010\u0012\u0004\u0012\u00020\u0006\u0012\u0006\u0012\u0004\u0018\u00010\u00070\u0005X\u0082\u0004¢\u0006\u0002\n\u0000¨\u0006\u000e"}, d2 = {"Lcom/google/maps/android/compose/ComposeInfoWindowAdapter;", "Lcom/google/android/gms/maps/GoogleMap$InfoWindowAdapter;", "mapView", "Lcom/google/android/gms/maps/MapView;", "markerNodeFinder", "Lkotlin/Function1;", "Lcom/google/android/gms/maps/model/Marker;", "Lcom/google/maps/android/compose/MarkerNode;", "<init>", "(Lcom/google/android/gms/maps/MapView;Lkotlin/jvm/functions/Function1;)V", "getInfoContents", "Landroid/view/View;", "marker", "getInfoWindow", "maps-compose_release"}, k = 1, mv = {2, 0, 0}, xi = 48)
public final class ComposeInfoWindowAdapter implements GoogleMap.InfoWindowAdapter {
public static final int $stable = 8;
private final MapView mapView;
private final Function1<Marker, MarkerNode> markerNodeFinder;
/* JADX WARN: Multi-variable type inference failed */
public ComposeInfoWindowAdapter(MapView mapView, Function1<? super Marker, MarkerNode> markerNodeFinder) {
Intrinsics.checkNotNullParameter(mapView, "mapView");
Intrinsics.checkNotNullParameter(markerNodeFinder, "markerNodeFinder");
this.mapView = mapView;
this.markerNodeFinder = markerNodeFinder;
}
@Override // com.google.android.gms.maps.GoogleMap.InfoWindowAdapter
public View getInfoContents(final Marker marker) throws IOException {
final Function3<Marker, Composer, Integer, Unit> infoContent;
Intrinsics.checkNotNullParameter(marker, "marker");
MarkerNode markerNodeInvoke = this.markerNodeFinder.invoke(marker);
if (markerNodeInvoke == null || (infoContent = markerNodeInvoke.getInfoContent()) == null) {
return null;
}
Context context = this.mapView.getContext();
Intrinsics.checkNotNullExpressionValue(context, "getContext(...)");
ComposeView composeView = new ComposeView(context, null, 0, 6, null);
composeView.setContent(ComposableLambdaKt.composableLambdaInstance(1508359207, true, new Function2<Composer, Integer, Unit>() { // from class: com.google.maps.android.compose.ComposeInfoWindowAdapter$getInfoContents$view$1$1
@Override // kotlin.jvm.functions.Function2
public /* bridge */ /* synthetic */ Unit invoke(Composer composer, Integer num) {
invoke(composer, num.intValue());
return Unit.INSTANCE;
}
public final void invoke(Composer composer, int i) {
if ((i & 11) == 2 && composer.getSkipping()) {
composer.skipToGroupEnd();
} else {
infoContent.invoke(marker, composer, 8);
}
}
}));
MapComposeViewRenderKt.renderComposeViewOnce$default(this.mapView, composeView, null, markerNodeInvoke.getCompositionContext(), 2, null);
return composeView;
}
@Override // com.google.android.gms.maps.GoogleMap.InfoWindowAdapter
public View getInfoWindow(final Marker marker) throws IOException {
final Function3<Marker, Composer, Integer, Unit> infoWindow;
Intrinsics.checkNotNullParameter(marker, "marker");
MarkerNode markerNodeInvoke = this.markerNodeFinder.invoke(marker);
if (markerNodeInvoke == null || (infoWindow = markerNodeInvoke.getInfoWindow()) == null) {
return null;
}
Context context = this.mapView.getContext();
Intrinsics.checkNotNullExpressionValue(context, "getContext(...)");
ComposeView composeView = new ComposeView(context, null, 0, 6, null);
composeView.setContent(ComposableLambdaKt.composableLambdaInstance(-742372995, true, new Function2<Composer, Integer, Unit>() { // from class: com.google.maps.android.compose.ComposeInfoWindowAdapter$getInfoWindow$view$1$1
@Override // kotlin.jvm.functions.Function2
public /* bridge */ /* synthetic */ Unit invoke(Composer composer, Integer num) {
invoke(composer, num.intValue());
return Unit.INSTANCE;
}
public final void invoke(Composer composer, int i) {
if ((i & 11) == 2 && composer.getSkipping()) {
composer.skipToGroupEnd();
} else {
infoWindow.invoke(marker, composer, 8);
}
}
}));
MapComposeViewRenderKt.renderComposeViewOnce$default(this.mapView, composeView, null, markerNodeInvoke.getCompositionContext(), 2, null);
return composeView;
}
}
@@ -0,0 +1,33 @@
package com.google.maps.android.compose;
import androidx.compose.ui.platform.AbstractComposeView;
import java.io.Closeable;
import kotlin.Metadata;
import kotlin.Unit;
import kotlin.jvm.functions.Function0;
/* JADX INFO: compiled from: MapComposeViewRender.kt */
/* JADX INFO: loaded from: classes2.dex */
@Metadata(d1 = {"\u0000$\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\bg\u0018\u00002\u00020\u0001:\u0001\nJ \u0010\u0002\u001a\u00020\u00032\u0006\u0010\u0004\u001a\u00020\u00052\u000e\u0010\u0006\u001a\n\u0012\u0004\u0012\u00020\u0003\u0018\u00010\u0007H&J\u0010\u0010\b\u001a\u00020\t2\u0006\u0010\u0004\u001a\u00020\u0005H&¨\u0006\u000b"}, d2 = {"Lcom/google/maps/android/compose/ComposeUiViewRenderer;", "", "renderViewOnce", "", "view", "Landroidx/compose/ui/platform/AbstractComposeView;", "onAddedToWindow", "Lkotlin/Function0;", "startRenderingView", "Lcom/google/maps/android/compose/ComposeUiViewRenderer$RenderHandle;", "RenderHandle", "maps-compose_release"}, k = 1, mv = {2, 0, 0}, xi = 48)
public interface ComposeUiViewRenderer {
void renderViewOnce(AbstractComposeView view, Function0<Unit> onAddedToWindow);
RenderHandle startRenderingView(AbstractComposeView view);
/* JADX INFO: compiled from: MapComposeViewRender.kt */
@Metadata(d1 = {"\u0000\u0012\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0002\bf\u0018\u00002\u00020\u0001J\b\u0010\u0002\u001a\u00020\u0003H&J\b\u0010\u0004\u001a\u00020\u0003H\u0016¨\u0006\u0005"}, d2 = {"Lcom/google/maps/android/compose/ComposeUiViewRenderer$RenderHandle;", "Ljava/io/Closeable;", "dispose", "", "close", "maps-compose_release"}, k = 1, mv = {2, 0, 0}, xi = 48)
public interface RenderHandle extends Closeable {
@Override // java.io.Closeable, java.lang.AutoCloseable
void close();
void dispose();
/* JADX INFO: compiled from: MapComposeViewRender.kt */
@Metadata(k = 3, mv = {2, 0, 0}, xi = 48)
public static final class DefaultImpls {
public static void close(RenderHandle renderHandle) {
renderHandle.dispose();
}
}
}
}
@@ -0,0 +1,26 @@
package com.google.maps.android.compose;
import com.google.android.gms.maps.model.IndoorBuilding;
import com.google.maps.android.compose.IndoorStateChangeListener;
import kotlin.Metadata;
/* JADX INFO: compiled from: MapClickListeners.kt */
/* JADX INFO: loaded from: classes2.dex */
@Metadata(d1 = {"\u0000\f\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\\u0002\u0018\u00002\u00020\u0001B\t\b\u0003¢\u0006\u0004\b\u0002\u0010\u0003¨\u0006\u0004"}, d2 = {"Lcom/google/maps/android/compose/DefaultIndoorStateChangeListener;", "Lcom/google/maps/android/compose/IndoorStateChangeListener;", "<init>", "()V", "maps-compose_release"}, k = 1, mv = {2, 0, 0}, xi = 48)
public final class DefaultIndoorStateChangeListener implements IndoorStateChangeListener {
public static final int $stable = 0;
public static final DefaultIndoorStateChangeListener INSTANCE = new DefaultIndoorStateChangeListener();
private DefaultIndoorStateChangeListener() {
}
@Override // com.google.maps.android.compose.IndoorStateChangeListener
public void onIndoorBuildingFocused() {
IndoorStateChangeListener.DefaultImpls.onIndoorBuildingFocused(this);
}
@Override // com.google.maps.android.compose.IndoorStateChangeListener
public void onIndoorLevelActivated(IndoorBuilding indoorBuilding) {
IndoorStateChangeListener.DefaultImpls.onIndoorLevelActivated(this, indoorBuilding);
}
}
@@ -0,0 +1,45 @@
package com.google.maps.android.compose;
import kotlin.Deprecated;
import kotlin.Metadata;
import kotlin.enums.EnumEntries;
import kotlin.enums.EnumEntriesKt;
/* JADX WARN: Failed to restore enum class, 'enum' modifier and super class removed */
/* JADX WARN: Unknown enum class pattern. Please report as an issue! */
/* JADX INFO: compiled from: Marker.kt */
/* JADX INFO: loaded from: classes2.dex */
@Deprecated(message = "START, DRAG, END are events, not states. Avoid usage.")
@Metadata(d1 = {"\u0000\f\n\u0002\u0018\u0002\n\u0002\u0010\u0010\n\u0002\b\u0006\b\u0087\u0081\u0002\u0018\u00002\b\u0012\u0004\u0012\u00020\u00000\u0001B\t\b\u0002¢\u0006\u0004\b\u0002\u0010\u0003j\u0002\b\u0004j\u0002\b\u0005j\u0002\b\u0006¨\u0006\u0007"}, d2 = {"Lcom/google/maps/android/compose/DragState;", "", "<init>", "(Ljava/lang/String;I)V", "START", "DRAG", "END", "maps-compose_release"}, k = 1, mv = {2, 0, 0}, xi = 48)
public final class DragState {
private static final /* synthetic */ EnumEntries $ENTRIES;
private static final /* synthetic */ DragState[] $VALUES;
public static final DragState START = new DragState("START", 0);
public static final DragState DRAG = new DragState("DRAG", 1);
public static final DragState END = new DragState("END", 2);
private static final /* synthetic */ DragState[] $values() {
return new DragState[]{START, DRAG, END};
}
public static EnumEntries<DragState> getEntries() {
return $ENTRIES;
}
private DragState(String str, int i) {
}
static {
DragState[] dragStateArr$values = $values();
$VALUES = dragStateArr$values;
$ENTRIES = EnumEntriesKt.enumEntries(dragStateArr$values);
}
public static DragState valueOf(String str) {
return (DragState) Enum.valueOf(DragState.class, str);
}
public static DragState[] values() {
return (DragState[]) $VALUES.clone();
}
}
@@ -0,0 +1,19 @@
package com.google.maps.android.compose;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import kotlin.Metadata;
import kotlin.annotation.AnnotationRetention;
import kotlin.annotation.AnnotationTarget;
/* JADX INFO: compiled from: GoogleMapComposable.kt */
/* JADX INFO: loaded from: classes2.dex */
@Target({ElementType.METHOD, ElementType.TYPE_PARAMETER, ElementType.TYPE_USE})
@Metadata(d1 = {"\u0000\n\n\u0002\u0018\u0002\n\u0002\u0010\u001b\n\u0000\b\u0087\u0002\u0018\u00002\u00020\u0001B\u0000¨\u0006\u0002"}, d2 = {"Lcom/google/maps/android/compose/GoogleMapComposable;", "", "maps-compose_release"}, k = 1, mv = {2, 0, 0}, xi = 48)
@kotlin.annotation.Target(allowedTargets = {AnnotationTarget.FILE, AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY_GETTER, AnnotationTarget.TYPE, AnnotationTarget.TYPE_PARAMETER})
@Retention(RetentionPolicy.CLASS)
@kotlin.annotation.Retention(AnnotationRetention.BINARY)
public @interface GoogleMapComposable {
}
@@ -0,0 +1,27 @@
package com.google.maps.android.compose;
import com.google.android.gms.maps.GoogleMap;
import com.google.android.gms.maps.OnMapReadyCallback;
import kotlin.Metadata;
import kotlin.Result;
import kotlin.coroutines.Continuation;
import kotlin.jvm.internal.Intrinsics;
/* JADX INFO: compiled from: MapView.kt */
/* JADX INFO: loaded from: classes2.dex */
@Metadata(d1 = {"\u0000\u0010\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\u0010\u0000\u001a\u00020\u00012\u0006\u0010\u0002\u001a\u00020\u0003H\\u0006\u0002\b\u0004¨\u0006\u0005"}, d2 = {"<anonymous>", "", "it", "Lcom/google/android/gms/maps/GoogleMap;", "onMapReady", "com/google/maps/android/ktx/MapViewKt$awaitMap$2$1"}, k = 3, mv = {2, 0, 0}, xi = 48)
public final class GoogleMapKt$newComposition$$inlined$awaitMap$1 implements OnMapReadyCallback {
final /* synthetic */ Continuation $continuation;
public GoogleMapKt$newComposition$$inlined$awaitMap$1(Continuation continuation) {
this.$continuation = continuation;
}
@Override // com.google.android.gms.maps.OnMapReadyCallback
public final void onMapReady(GoogleMap it) {
Intrinsics.checkNotNullParameter(it, "it");
Continuation continuation = this.$continuation;
Result.Companion companion = Result.INSTANCE;
continuation.resumeWith(Result.m8388constructorimpl(it));
}
}
File diff suppressed because one or more lines are too long

Some files were not shown because too many files have changed in this diff Show More