From e70e6bc956a4d31ca1953324456621562c04b837 Mon Sep 17 00:00:00 2001 From: Marvin W Date: Tue, 15 Sep 2020 16:43:54 +0200 Subject: [PATCH] Mapbox: Track info window shown --- .../org/microg/gms/maps/mapbox/model/Marker.kt | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/play-services-maps-core-mapbox/src/main/kotlin/org/microg/gms/maps/mapbox/model/Marker.kt b/play-services-maps-core-mapbox/src/main/kotlin/org/microg/gms/maps/mapbox/model/Marker.kt index 129157c0..5d298d8f 100644 --- a/play-services-maps-core-mapbox/src/main/kotlin/org/microg/gms/maps/mapbox/model/Marker.kt +++ b/play-services-maps-core-mapbox/src/main/kotlin/org/microg/gms/maps/mapbox/model/Marker.kt @@ -16,6 +16,7 @@ package org.microg.gms.maps.mapbox.model +import android.os.Parcel import android.util.Log import com.google.android.gms.dynamic.IObjectWrapper import com.google.android.gms.dynamic.ObjectWrapper @@ -42,6 +43,8 @@ class MarkerImpl(private val map: GoogleMapImpl, private val id: String, options private var draggable: Boolean = options.isDraggable private var tag: IObjectWrapper? = null + private var infoWindowShown = false + override var annotation: Symbol? = null override var removed: Boolean = false override val annotationOptions: SymbolOptions @@ -108,15 +111,17 @@ class MarkerImpl(private val map: GoogleMapImpl, private val id: String, options override fun showInfoWindow() { Log.d(TAG, "unimplemented Method: showInfoWindow") + infoWindowShown = true } override fun hideInfoWindow() { Log.d(TAG, "unimplemented Method: hideInfoWindow") + infoWindowShown = false } override fun isInfoWindowShown(): Boolean { Log.d(TAG, "unimplemented Method: isInfoWindowShow") - return false + return infoWindowShown } override fun setVisible(visible: Boolean) { @@ -202,6 +207,13 @@ class MarkerImpl(private val map: GoogleMapImpl, private val id: String, options override fun getTag(): IObjectWrapper = tag ?: ObjectWrapper.wrap(null) + override fun onTransact(code: Int, data: Parcel, reply: Parcel?, flags: Int): Boolean = + if (super.onTransact(code, data, reply, flags)) { + true + } else { + Log.d(TAG, "onTransact [unknown]: $code, $data, $flags"); false + } + companion object { private val TAG = "GmsMapMarker" }