Loading play-services-maps-core-mapbox/src/main/kotlin/org/microg/gms/maps/mapbox/AbstractGoogleMap.kt +19 −3 Original line number Diff line number Diff line Loading @@ -58,11 +58,11 @@ abstract class AbstractGoogleMap(context: Context) : IGoogleMapDelegate.Stub() { onInfoWindowClickListener = listener } override fun setInfoWindowLongClickListener(listener: IOnInfoWindowLongClickListener) { override fun setOnInfoWindowLongClickListener(listener: IOnInfoWindowLongClickListener) { onInfoWindowLongClickListener = listener } override fun setInfoWindowCloseListener(listener: IOnInfoWindowCloseListener) { override fun setOnInfoWindowCloseListener(listener: IOnInfoWindowCloseListener) { onInfoWindowCloseListener = listener } Loading @@ -82,10 +82,26 @@ abstract class AbstractGoogleMap(context: Context) : IGoogleMapDelegate.Stub() { markerClickListener = listener } override fun setCircleClickListener(listener: IOnCircleClickListener?) { override fun setOnCircleClickListener(listener: IOnCircleClickListener?) { circleClickListener = listener } override fun setOnPolygonClickListener(listener: IOnPolygonClickListener?) { Log.d(TAG, "Not yet implemented: setOnPolygonClickListener") } override fun setOnPolylineClickListener(listener: IOnPolylineClickListener?) { Log.d(TAG, "Not yet implemented: setOnPolylineClickListener") } override fun setOnGroundOverlayClickListener(listener: IOnGroundOverlayClickListener?) { Log.d(TAG, "Not yet implemented: setOnGroundOverlayClickListener") } override fun setOnMyLocationClickListener(listener: IOnMyLocationClickListener?) { Log.d(TAG, "Not yet implemented: setOnMyLocationClickListener") } override fun getMyLocation(): Location? { Log.d(TAG, "unimplemented Method: getMyLocation") return null Loading play-services-maps-core-mapbox/src/main/kotlin/org/microg/gms/maps/mapbox/GoogleMap.kt +4 −0 Original line number Diff line number Diff line Loading @@ -499,6 +499,10 @@ class GoogleMapImpl(context: Context, var options: GoogleMapOptions) : AbstractG } } override fun snapshotForTest(callback: ISnapshotReadyCallback?) { Log.d(TAG, "Not yet implemented: snapshotForTest") } override fun setPadding(left: Int, top: Int, right: Int, bottom: Int) = afterInitialize { map -> Log.d(TAG, "setPadding: $left $top $right $bottom") val padding = map.cameraPosition.padding Loading play-services-maps-core-mapbox/src/main/kotlin/org/microg/gms/maps/mapbox/LiteGoogleMap.kt +4 −0 Original line number Diff line number Diff line Loading @@ -549,6 +549,10 @@ class LiteGoogleMapImpl(context: Context, var options: GoogleMapOptions) : Abstr } } override fun snapshotForTest(callback: ISnapshotReadyCallback?) { Log.d(TAG, "Not yet implemented: snapshotForTest") } override fun setPadding(left: Int, top: Int, right: Int, bottom: Int) { view.setPadding(left, top, right, bottom) postUpdateSnapshot() Loading play-services-maps-core-mapbox/src/main/kotlin/org/microg/gms/maps/mapbox/model/GroundOverlay.kt +25 −11 Original line number Diff line number Diff line Loading @@ -8,11 +8,14 @@ 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 import com.google.android.gms.dynamic.unwrap import com.google.android.gms.maps.model.GroundOverlayOptions import com.google.android.gms.maps.model.LatLng import com.google.android.gms.maps.model.LatLngBounds import com.google.android.gms.maps.model.internal.IGroundOverlayDelegate import org.microg.gms.maps.mapbox.GoogleMapImpl import org.microg.gms.utils.warnOnTransactionIssues class GroundOverlayImpl(private val map: GoogleMapImpl, private val id: String, options: GroundOverlayOptions) : IGroundOverlayDelegate.Stub() { private var location: LatLng? = options.location Loading @@ -23,6 +26,8 @@ class GroundOverlayImpl(private val map: GoogleMapImpl, private val id: String, private var zIndex: Float = options.zIndex private var visible: Boolean = options.isVisible private var transparency: Float = options.transparency private var clickable: Boolean = options.isClickable private var tag: Any? = null override fun getId(): String { return id Loading Loading @@ -93,6 +98,24 @@ class GroundOverlayImpl(private val map: GoogleMapImpl, private val id: String, this.bounds = bounds } override fun setClickable(clickable: Boolean) { this.clickable = clickable } override fun isClickable(): Boolean { return clickable } override fun setImage(img: IObjectWrapper?) { Log.d(TAG, "Not yet implemented: setImage") } override fun setTag(o: IObjectWrapper?) { this.tag = o.unwrap() } override fun getTag(): IObjectWrapper = ObjectWrapper.wrap(tag) override fun equalsRemote(other: IGroundOverlayDelegate?): Boolean { return this.equals(other) } Loading @@ -109,18 +132,9 @@ class GroundOverlayImpl(private val map: GoogleMapImpl, private val id: String, Log.w(TAG, "unimplemented Method: remove") } override fun todo(obj: IObjectWrapper?) { Log.w(TAG, "unimplemented Method: todo") } 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 } override fun onTransact(code: Int, data: Parcel, reply: Parcel?, flags: Int): Boolean = warnOnTransactionIssues(code, reply, flags, TAG) { super.onTransact(code, data, reply, flags) } companion object { private val TAG = "GmsMapMarker" private const val TAG = "GroundOverlay" } } play-services-maps-core-mapbox/src/main/kotlin/org/microg/gms/maps/mapbox/model/Polyline.kt +24 −29 Original line number Diff line number Diff line /* * Copyright (C) 2019 microG Project Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * SPDX-FileCopyrightText: 2019 microG Project Team * SPDX-License-Identifier: Apache-2.0 */ 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 import com.google.android.gms.maps.model.Cap import com.google.android.gms.maps.model.LatLng import com.google.android.gms.maps.model.PatternItem import com.google.android.gms.maps.model.internal.IPolylineDelegate Loading @@ -29,6 +18,7 @@ import com.mapbox.mapboxsdk.utils.ColorUtils import org.microg.gms.maps.mapbox.GoogleMapImpl import org.microg.gms.maps.mapbox.LiteGoogleMapImpl import org.microg.gms.maps.mapbox.utils.toMapbox import org.microg.gms.utils.warnOnTransactionIssues import com.google.android.gms.maps.model.PolylineOptions as GmsLineOptions abstract class AbstractPolylineImpl(private val id: String, options: GmsLineOptions, private val dpiFactor: Function0<Float>) : IPolylineDelegate.Stub() { Loading @@ -40,6 +30,10 @@ abstract class AbstractPolylineImpl(private val id: String, options: GmsLineOpti internal var visible: Boolean = options.isVisible internal var clickable: Boolean = options.isClickable internal var tag: IObjectWrapper? = null internal var startCap: Cap = options.startCap internal var endCap: Cap = options.endCap internal var geodesic = options.isGeodesic internal var zIndex = options.zIndex val annotationOptions: LineOptions get() = LineOptions() Loading Loading @@ -74,13 +68,10 @@ abstract class AbstractPolylineImpl(private val id: String, options: GmsLineOpti override fun getColor(): Int = color override fun setZIndex(zIndex: Float) { Log.d(TAG, "unimplemented Method: setZIndex") this.zIndex = zIndex } override fun getZIndex(): Float { Log.d(TAG, "unimplemented Method: getZIndex") return 0f } override fun getZIndex(): Float = zIndex override fun setVisible(visible: Boolean) { this.visible = visible Loading @@ -90,14 +81,23 @@ abstract class AbstractPolylineImpl(private val id: String, options: GmsLineOpti override fun isVisible(): Boolean = visible override fun setGeodesic(geod: Boolean) { Log.d(TAG, "unimplemented Method: setGeodesic") this.geodesic = geod } override fun isGeodesic(): Boolean { Log.d(TAG, "unimplemented Method: isGeodesic") return false override fun isGeodesic(): Boolean = geodesic override fun setStartCap(startCap: Cap) { this.startCap = startCap } override fun getStartCap(): Cap = startCap override fun setEndCap(endCap: Cap) { this.endCap = endCap } override fun getEndCap(): Cap = endCap override fun equalsRemote(other: IPolylineDelegate?): Boolean = equals(other) override fun hashCodeRemote(): Int = hashCode() Loading Loading @@ -141,12 +141,7 @@ abstract class AbstractPolylineImpl(private val id: String, options: GmsLineOpti return id } 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 } override fun onTransact(code: Int, data: Parcel, reply: Parcel?, flags: Int): Boolean = warnOnTransactionIssues(code, reply, flags, TAG) { super.onTransact(code, data, reply, flags) } companion object { const val TAG = "GmsPolylineAbstract" Loading Loading
play-services-maps-core-mapbox/src/main/kotlin/org/microg/gms/maps/mapbox/AbstractGoogleMap.kt +19 −3 Original line number Diff line number Diff line Loading @@ -58,11 +58,11 @@ abstract class AbstractGoogleMap(context: Context) : IGoogleMapDelegate.Stub() { onInfoWindowClickListener = listener } override fun setInfoWindowLongClickListener(listener: IOnInfoWindowLongClickListener) { override fun setOnInfoWindowLongClickListener(listener: IOnInfoWindowLongClickListener) { onInfoWindowLongClickListener = listener } override fun setInfoWindowCloseListener(listener: IOnInfoWindowCloseListener) { override fun setOnInfoWindowCloseListener(listener: IOnInfoWindowCloseListener) { onInfoWindowCloseListener = listener } Loading @@ -82,10 +82,26 @@ abstract class AbstractGoogleMap(context: Context) : IGoogleMapDelegate.Stub() { markerClickListener = listener } override fun setCircleClickListener(listener: IOnCircleClickListener?) { override fun setOnCircleClickListener(listener: IOnCircleClickListener?) { circleClickListener = listener } override fun setOnPolygonClickListener(listener: IOnPolygonClickListener?) { Log.d(TAG, "Not yet implemented: setOnPolygonClickListener") } override fun setOnPolylineClickListener(listener: IOnPolylineClickListener?) { Log.d(TAG, "Not yet implemented: setOnPolylineClickListener") } override fun setOnGroundOverlayClickListener(listener: IOnGroundOverlayClickListener?) { Log.d(TAG, "Not yet implemented: setOnGroundOverlayClickListener") } override fun setOnMyLocationClickListener(listener: IOnMyLocationClickListener?) { Log.d(TAG, "Not yet implemented: setOnMyLocationClickListener") } override fun getMyLocation(): Location? { Log.d(TAG, "unimplemented Method: getMyLocation") return null Loading
play-services-maps-core-mapbox/src/main/kotlin/org/microg/gms/maps/mapbox/GoogleMap.kt +4 −0 Original line number Diff line number Diff line Loading @@ -499,6 +499,10 @@ class GoogleMapImpl(context: Context, var options: GoogleMapOptions) : AbstractG } } override fun snapshotForTest(callback: ISnapshotReadyCallback?) { Log.d(TAG, "Not yet implemented: snapshotForTest") } override fun setPadding(left: Int, top: Int, right: Int, bottom: Int) = afterInitialize { map -> Log.d(TAG, "setPadding: $left $top $right $bottom") val padding = map.cameraPosition.padding Loading
play-services-maps-core-mapbox/src/main/kotlin/org/microg/gms/maps/mapbox/LiteGoogleMap.kt +4 −0 Original line number Diff line number Diff line Loading @@ -549,6 +549,10 @@ class LiteGoogleMapImpl(context: Context, var options: GoogleMapOptions) : Abstr } } override fun snapshotForTest(callback: ISnapshotReadyCallback?) { Log.d(TAG, "Not yet implemented: snapshotForTest") } override fun setPadding(left: Int, top: Int, right: Int, bottom: Int) { view.setPadding(left, top, right, bottom) postUpdateSnapshot() Loading
play-services-maps-core-mapbox/src/main/kotlin/org/microg/gms/maps/mapbox/model/GroundOverlay.kt +25 −11 Original line number Diff line number Diff line Loading @@ -8,11 +8,14 @@ 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 import com.google.android.gms.dynamic.unwrap import com.google.android.gms.maps.model.GroundOverlayOptions import com.google.android.gms.maps.model.LatLng import com.google.android.gms.maps.model.LatLngBounds import com.google.android.gms.maps.model.internal.IGroundOverlayDelegate import org.microg.gms.maps.mapbox.GoogleMapImpl import org.microg.gms.utils.warnOnTransactionIssues class GroundOverlayImpl(private val map: GoogleMapImpl, private val id: String, options: GroundOverlayOptions) : IGroundOverlayDelegate.Stub() { private var location: LatLng? = options.location Loading @@ -23,6 +26,8 @@ class GroundOverlayImpl(private val map: GoogleMapImpl, private val id: String, private var zIndex: Float = options.zIndex private var visible: Boolean = options.isVisible private var transparency: Float = options.transparency private var clickable: Boolean = options.isClickable private var tag: Any? = null override fun getId(): String { return id Loading Loading @@ -93,6 +98,24 @@ class GroundOverlayImpl(private val map: GoogleMapImpl, private val id: String, this.bounds = bounds } override fun setClickable(clickable: Boolean) { this.clickable = clickable } override fun isClickable(): Boolean { return clickable } override fun setImage(img: IObjectWrapper?) { Log.d(TAG, "Not yet implemented: setImage") } override fun setTag(o: IObjectWrapper?) { this.tag = o.unwrap() } override fun getTag(): IObjectWrapper = ObjectWrapper.wrap(tag) override fun equalsRemote(other: IGroundOverlayDelegate?): Boolean { return this.equals(other) } Loading @@ -109,18 +132,9 @@ class GroundOverlayImpl(private val map: GoogleMapImpl, private val id: String, Log.w(TAG, "unimplemented Method: remove") } override fun todo(obj: IObjectWrapper?) { Log.w(TAG, "unimplemented Method: todo") } 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 } override fun onTransact(code: Int, data: Parcel, reply: Parcel?, flags: Int): Boolean = warnOnTransactionIssues(code, reply, flags, TAG) { super.onTransact(code, data, reply, flags) } companion object { private val TAG = "GmsMapMarker" private const val TAG = "GroundOverlay" } }
play-services-maps-core-mapbox/src/main/kotlin/org/microg/gms/maps/mapbox/model/Polyline.kt +24 −29 Original line number Diff line number Diff line /* * Copyright (C) 2019 microG Project Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * SPDX-FileCopyrightText: 2019 microG Project Team * SPDX-License-Identifier: Apache-2.0 */ 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 import com.google.android.gms.maps.model.Cap import com.google.android.gms.maps.model.LatLng import com.google.android.gms.maps.model.PatternItem import com.google.android.gms.maps.model.internal.IPolylineDelegate Loading @@ -29,6 +18,7 @@ import com.mapbox.mapboxsdk.utils.ColorUtils import org.microg.gms.maps.mapbox.GoogleMapImpl import org.microg.gms.maps.mapbox.LiteGoogleMapImpl import org.microg.gms.maps.mapbox.utils.toMapbox import org.microg.gms.utils.warnOnTransactionIssues import com.google.android.gms.maps.model.PolylineOptions as GmsLineOptions abstract class AbstractPolylineImpl(private val id: String, options: GmsLineOptions, private val dpiFactor: Function0<Float>) : IPolylineDelegate.Stub() { Loading @@ -40,6 +30,10 @@ abstract class AbstractPolylineImpl(private val id: String, options: GmsLineOpti internal var visible: Boolean = options.isVisible internal var clickable: Boolean = options.isClickable internal var tag: IObjectWrapper? = null internal var startCap: Cap = options.startCap internal var endCap: Cap = options.endCap internal var geodesic = options.isGeodesic internal var zIndex = options.zIndex val annotationOptions: LineOptions get() = LineOptions() Loading Loading @@ -74,13 +68,10 @@ abstract class AbstractPolylineImpl(private val id: String, options: GmsLineOpti override fun getColor(): Int = color override fun setZIndex(zIndex: Float) { Log.d(TAG, "unimplemented Method: setZIndex") this.zIndex = zIndex } override fun getZIndex(): Float { Log.d(TAG, "unimplemented Method: getZIndex") return 0f } override fun getZIndex(): Float = zIndex override fun setVisible(visible: Boolean) { this.visible = visible Loading @@ -90,14 +81,23 @@ abstract class AbstractPolylineImpl(private val id: String, options: GmsLineOpti override fun isVisible(): Boolean = visible override fun setGeodesic(geod: Boolean) { Log.d(TAG, "unimplemented Method: setGeodesic") this.geodesic = geod } override fun isGeodesic(): Boolean { Log.d(TAG, "unimplemented Method: isGeodesic") return false override fun isGeodesic(): Boolean = geodesic override fun setStartCap(startCap: Cap) { this.startCap = startCap } override fun getStartCap(): Cap = startCap override fun setEndCap(endCap: Cap) { this.endCap = endCap } override fun getEndCap(): Cap = endCap override fun equalsRemote(other: IPolylineDelegate?): Boolean = equals(other) override fun hashCodeRemote(): Int = hashCode() Loading Loading @@ -141,12 +141,7 @@ abstract class AbstractPolylineImpl(private val id: String, options: GmsLineOpti return id } 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 } override fun onTransact(code: Int, data: Parcel, reply: Parcel?, flags: Int): Boolean = warnOnTransactionIssues(code, reply, flags, TAG) { super.onTransact(code, data, reply, flags) } companion object { const val TAG = "GmsPolylineAbstract" Loading