diff --git a/play-services-maps/core/hms/src/main/kotlin/org/microg/gms/maps/hms/model/Circle.kt b/play-services-maps/core/hms/src/main/kotlin/org/microg/gms/maps/hms/model/Circle.kt index 363f7f5269..4b0ec1da8b 100644 --- a/play-services-maps/core/hms/src/main/kotlin/org/microg/gms/maps/hms/model/Circle.kt +++ b/play-services-maps/core/hms/src/main/kotlin/org/microg/gms/maps/hms/model/Circle.kt @@ -18,6 +18,7 @@ import org.microg.gms.maps.hms.utils.toGms import org.microg.gms.maps.hms.utils.toHms class CircleImpl(private val circle: Circle) : ICircleDelegate.Stub() { + private var tag: Any? = null override fun remove() { circle.remove() @@ -50,11 +51,11 @@ class CircleImpl(private val circle: Circle) : ICircleDelegate.Stub() { override fun getStrokeColor(): Int = circle.strokeColor override fun setTag(tag: IObjectWrapper) { - circle.setTag(tag.unwrap()) + this.tag = tag.unwrap() } override fun getTag(): IObjectWrapper? { - return ObjectWrapper.wrap(circle.tag) + return ObjectWrapper.wrap(this.tag) } override fun setStrokePattern(pattern: List?) { diff --git a/play-services-maps/core/hms/src/main/kotlin/org/microg/gms/maps/hms/model/GroundOverlay.kt b/play-services-maps/core/hms/src/main/kotlin/org/microg/gms/maps/hms/model/GroundOverlay.kt index 4b0d97d4cd..56ce47a3e2 100644 --- a/play-services-maps/core/hms/src/main/kotlin/org/microg/gms/maps/hms/model/GroundOverlay.kt +++ b/play-services-maps/core/hms/src/main/kotlin/org/microg/gms/maps/hms/model/GroundOverlay.kt @@ -18,6 +18,7 @@ import org.microg.gms.maps.hms.utils.toGms import org.microg.gms.maps.hms.utils.toHms class GroundOverlayImpl(private val groundOverlay: GroundOverlay) : IGroundOverlayDelegate.Stub() { + private var tag: Any? = null override fun getId(): String { return groundOverlay.id @@ -88,7 +89,7 @@ class GroundOverlayImpl(private val groundOverlay: GroundOverlay) : IGroundOverl } override fun getTag(): IObjectWrapper? { - return ObjectWrapper.wrap(groundOverlay.tag) + return ObjectWrapper.wrap(this.tag) } override fun isClickable(): Boolean = groundOverlay.isClickable @@ -102,7 +103,7 @@ class GroundOverlayImpl(private val groundOverlay: GroundOverlay) : IGroundOverl } override fun setTag(tag: IObjectWrapper) { - groundOverlay.tag = tag.unwrap() + this.tag = tag.unwrap() } override fun equalsRemote(other: IGroundOverlayDelegate?): Boolean { diff --git a/play-services-maps/core/hms/src/main/kotlin/org/microg/gms/maps/hms/model/Marker.kt b/play-services-maps/core/hms/src/main/kotlin/org/microg/gms/maps/hms/model/Marker.kt index bdeec672a3..05eba69fa4 100644 --- a/play-services-maps/core/hms/src/main/kotlin/org/microg/gms/maps/hms/model/Marker.kt +++ b/play-services-maps/core/hms/src/main/kotlin/org/microg/gms/maps/hms/model/Marker.kt @@ -19,8 +19,8 @@ import org.microg.gms.maps.hms.utils.toGms import org.microg.gms.maps.hms.utils.toHms class MarkerImpl(private val mapImpl: GoogleMapImpl, private val id: String, private val options: MarkerOptions) : IMarkerDelegate.Stub() { - private var marker: Marker? = null + private var tag: Any? = null @Synchronized fun update() { @@ -136,10 +136,10 @@ class MarkerImpl(private val mapImpl: GoogleMapImpl, private val id: String, pri override fun getZIndex(): Float = marker?.zIndex ?: 0f override fun setTag(obj: IObjectWrapper?) { - marker?.tag = obj.unwrap() + this.tag = obj.unwrap() } - override fun getTag(): IObjectWrapper = ObjectWrapper.wrap(marker?.tag) + override fun getTag(): IObjectWrapper = ObjectWrapper.wrap(this.tag) override fun onTransact(code: Int, data: Parcel, reply: Parcel?, flags: Int): Boolean = if (super.onTransact(code, data, reply, flags)) { diff --git a/play-services-maps/core/hms/src/main/kotlin/org/microg/gms/maps/hms/model/Polygon.kt b/play-services-maps/core/hms/src/main/kotlin/org/microg/gms/maps/hms/model/Polygon.kt index ed3e287b0f..27a0e094f3 100644 --- a/play-services-maps/core/hms/src/main/kotlin/org/microg/gms/maps/hms/model/Polygon.kt +++ b/play-services-maps/core/hms/src/main/kotlin/org/microg/gms/maps/hms/model/Polygon.kt @@ -19,6 +19,7 @@ import org.microg.gms.maps.hms.utils.toHms import org.microg.gms.utils.warnOnTransactionIssues class PolygonImpl(private val polygon: Polygon) : IPolygonDelegate.Stub() { + private var tag: Any? = null override fun remove() { polygon.remove() @@ -121,7 +122,7 @@ class PolygonImpl(private val polygon: Polygon) : IPolygonDelegate.Stub() { } override fun getTag(): IObjectWrapper { - return ObjectWrapper.wrap(polygon.tag) + return ObjectWrapper.wrap(this.tag) } override fun isClickable(): Boolean { @@ -141,7 +142,7 @@ class PolygonImpl(private val polygon: Polygon) : IPolygonDelegate.Stub() { } override fun setTag(tag: IObjectWrapper?) { - polygon.tag = tag.unwrap() + this.tag = tag.unwrap() } override fun equalsRemote(other: IPolygonDelegate?): Boolean = equals(other) diff --git a/play-services-maps/core/hms/src/main/kotlin/org/microg/gms/maps/hms/model/Polyline.kt b/play-services-maps/core/hms/src/main/kotlin/org/microg/gms/maps/hms/model/Polyline.kt index 14a2c85940..207250eec9 100644 --- a/play-services-maps/core/hms/src/main/kotlin/org/microg/gms/maps/hms/model/Polyline.kt +++ b/play-services-maps/core/hms/src/main/kotlin/org/microg/gms/maps/hms/model/Polyline.kt @@ -29,6 +29,7 @@ import org.microg.gms.maps.hms.utils.toHms import org.microg.gms.maps.hms.utils.toHmsPolylineWidth class PolylineImpl(private val polyline: Polyline, polylineOptions: PolylineOptions) : IPolylineDelegate.Stub() { + private var tag: Any? = null override fun remove() { polyline.remove() @@ -121,7 +122,7 @@ class PolylineImpl(private val polyline: Polyline, polylineOptions: PolylineOpti } override fun getTag(): IObjectWrapper { - return ObjectWrapper.wrap(polyline.tag) + return ObjectWrapper.wrap(this.tag) } override fun setJointType(jointType: Int) { @@ -138,7 +139,7 @@ class PolylineImpl(private val polyline: Polyline, polylineOptions: PolylineOpti } override fun setTag(tag: IObjectWrapper?) { - polyline.tag = tag.unwrap() + this.tag = tag.unwrap() } override fun setEndCap(endCap: Cap) {