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,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;
}
}
}