[3.4.0-map-sdk] code tyle

This commit is contained in:
zhongchao
2023-09-13 18:31:16 +08:00
parent 1f1a28a975
commit 4932c1d8a7
38 changed files with 657 additions and 822 deletions

View File

@@ -64,15 +64,11 @@ class GDLocationClient private constructor() : AMapLocationListener,
} catch (e: Exception) {
e.printStackTrace()
}
if (mLocationClient != null) {
mLocationClient.startLocation()
}
mLocationClient.startLocation()
}
override fun stop() {
if (mLocationClient != null) {
mLocationClient.stopLocation()
}
mLocationClient.stopLocation()
}
override fun onLocationChanged(aMapLocation: AMapLocation) {
@@ -170,7 +166,7 @@ class GDLocationClient private constructor() : AMapLocationListener,
}
companion object {
val gdLocationClient by lazy(LazyThreadSafetyMode.SYNCHRONIZED){
val gdLocationClient by lazy(LazyThreadSafetyMode.SYNCHRONIZED) {
GDLocationClient()
}
}