Skip to content

Commit 7cdedbd

Browse files
committed
Reformat code
1 parent d5bd5a3 commit 7cdedbd

File tree

15 files changed

+1103
-566
lines changed

15 files changed

+1103
-566
lines changed

packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/ClusterManagersController.java

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@ class ClusterManagersController
3535
ClusterManager.OnClusterClickListener<MarkerBuilder> {
3636
@NonNull private final Context context;
3737

38-
@VisibleForTesting
39-
@NonNull
38+
@VisibleForTesting @NonNull
4039
protected final HashMap<String, ClusterManager<MarkerBuilder>> clusterManagerIdToManager;
4140

4241
@NonNull private final MapsCallbackApi flutterApi;
@@ -54,8 +53,7 @@ class ClusterManagersController
5453
ClusterManagersController(
5554
@NonNull MapsCallbackApi flutterApi,
5655
@NonNull Context context,
57-
@NonNull PlatformMarkerType markerType
58-
) {
56+
@NonNull PlatformMarkerType markerType) {
5957
this.clusterManagerIdToManager = new HashMap<>();
6058
this.context = context;
6159
this.flutterApi = flutterApi;
@@ -109,10 +107,9 @@ void addClusterManager(String clusterManagerId) {
109107
}
110108

111109
/**
112-
* Initialize cluster renderer if it hasn't been initialized before.
113-
* ClusterManager uses default renderer which should be changed to (legacy) renderer or
114-
* advanced renderer
115-
**/
110+
* Initialize cluster renderer if it hasn't been initialized before. ClusterManager uses default
111+
* renderer which should be changed to (legacy) renderer or advanced renderer
112+
*/
116113
private void initializeRenderer(ClusterManager<MarkerBuilder> clusterManager) {
117114
final ClusterRenderer<MarkerBuilder> renderer = clusterManager.getRenderer();
118115
if (renderer.getClass() == MarkerClusterRenderer.class
@@ -261,17 +258,16 @@ protected void onClusterItemRendered(@NonNull T item, @NonNull Marker marker) {
261258

262259
/** AdvancedMarkerClusterRenderer is a ClusterRenderer that supports AdvancedMarkers */
263260
@VisibleForTesting
264-
static class AdvancedMarkerClusterRenderer<T extends MarkerBuilder> extends
265-
DefaultAdvancedMarkersClusterRenderer<T> {
261+
static class AdvancedMarkerClusterRenderer<T extends MarkerBuilder>
262+
extends DefaultAdvancedMarkersClusterRenderer<T> {
266263

267264
private final ClusterManagersController clusterManagersController;
268265

269266
public AdvancedMarkerClusterRenderer(
270267
Context context,
271268
GoogleMap map,
272269
ClusterManager<T> clusterManager,
273-
ClusterManagersController clusterManagersController
274-
) {
270+
ClusterManagersController clusterManagersController) {
275271
super(context, map, clusterManager);
276272
this.clusterManagersController = clusterManagersController;
277273
}

packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/Convert.java

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -195,8 +195,7 @@ public static BitmapDescriptor getBitmapFromPinConfig(
195195
Messages.PlatformBitmapPinConfig pinConfigBitmap,
196196
AssetManager assetManager,
197197
float density,
198-
BitmapDescriptorFactoryWrapper bitmapDescriptorFactory
199-
) {
198+
BitmapDescriptorFactoryWrapper bitmapDescriptorFactory) {
200199
try {
201200
final String backgroundColorKey = "backgroundColor";
202201
final String borderColorKey = "borderColor";
@@ -206,20 +205,23 @@ public static BitmapDescriptor getBitmapFromPinConfig(
206205
final String glyphBitmapDescriptorKey = "glyphBitmapDescriptor";
207206

208207
final Integer backgroundColor =
209-
pinConfigBitmap.getBackgroundColor() != null ? toInt(pinConfigBitmap.getBackgroundColor())
208+
pinConfigBitmap.getBackgroundColor() != null
209+
? toInt(pinConfigBitmap.getBackgroundColor())
210210
: null;
211211
final Integer borderColor =
212212
pinConfigBitmap.getBorderColor() != null ? toInt(pinConfigBitmap.getBorderColor()) : null;
213213
final String glyphText =
214214
pinConfigBitmap.getGlyphText() != null ? pinConfigBitmap.getGlyphText() : null;
215215
final Integer glyphTextColor =
216-
pinConfigBitmap.getGlyphTextColor() != null ? toInt(pinConfigBitmap.getGlyphTextColor())
216+
pinConfigBitmap.getGlyphTextColor() != null
217+
? toInt(pinConfigBitmap.getGlyphTextColor())
217218
: null;
218219
final Integer glyphColor =
219220
pinConfigBitmap.getGlyphColor() != null ? toInt(pinConfigBitmap.getGlyphColor()) : null;
220-
final BitmapDescriptor glyphBitmapDescriptor = pinConfigBitmap.getGlyphBitmap() != null
221-
? toBitmapDescriptor(pinConfigBitmap.getGlyphBitmap(), assetManager, density)
222-
: null;
221+
final BitmapDescriptor glyphBitmapDescriptor =
222+
pinConfigBitmap.getGlyphBitmap() != null
223+
? toBitmapDescriptor(pinConfigBitmap.getGlyphBitmap(), assetManager, density)
224+
: null;
223225

224226
final PinConfig.Builder pinConfigBuilder = PinConfig.builder();
225227
if (backgroundColor != null) {
@@ -232,9 +234,10 @@ public static BitmapDescriptor getBitmapFromPinConfig(
232234

233235
PinConfig.Glyph glyph = null;
234236
if (glyphText != null) {
235-
glyph = glyphTextColor != null
236-
? new PinConfig.Glyph(glyphText, glyphTextColor)
237-
: new PinConfig.Glyph(glyphText);
237+
glyph =
238+
glyphTextColor != null
239+
? new PinConfig.Glyph(glyphText, glyphTextColor)
240+
: new PinConfig.Glyph(glyphText);
238241
} else if (glyphBitmapDescriptor != null) {
239242
glyph = new PinConfig.Glyph(glyphBitmapDescriptor);
240243
} else if (glyphColor != null) {

packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/GoogleMapBuilder.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ GoogleMapController build(
4040
LifecycleProvider lifecycleProvider,
4141
PlatformMarkerType markerType) {
4242
final GoogleMapController controller =
43-
new GoogleMapController(id, context, binaryMessenger, lifecycleProvider, options,
44-
markerType);
43+
new GoogleMapController(
44+
id, context, binaryMessenger, lifecycleProvider, options, markerType);
4545
controller.init();
4646
controller.setMyLocationEnabled(myLocationEnabled);
4747
controller.setMyLocationButtonEnabled(myLocationButtonEnabled);

packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/GoogleMapController.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -988,9 +988,9 @@ public Boolean isInfoWindowShown(@NonNull String markerId) {
988988
public @NonNull Boolean isAdvancedMarkersAvailable() {
989989
if (googleMap == null) {
990990
throw new FlutterError(
991-
"GoogleMap uninitialized", "getMapCapabilities() called prior to map initialization",
992-
null
993-
);
991+
"GoogleMap uninitialized",
992+
"getMapCapabilities() called prior to map initialization",
993+
null);
994994
}
995995
final MapCapabilities mapCapabilities = googleMap.getMapCapabilities();
996996
return mapCapabilities.isAdvancedMarkersAvailable();

packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/MarkerBuilder.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,10 @@ class MarkerBuilder implements MarkerOptionsSink, ClusterItem {
1818
private boolean consumeTapEvents;
1919

2020
MarkerBuilder(String markerId, String clusterManagerId, PlatformMarkerType markerType) {
21-
this.markerOptions = markerType == PlatformMarkerType.ADVANCED_MARKER
22-
? new AdvancedMarkerOptions()
23-
: new MarkerOptions();
21+
this.markerOptions =
22+
markerType == PlatformMarkerType.ADVANCED_MARKER
23+
? new AdvancedMarkerOptions()
24+
: new MarkerOptions();
2425
this.markerId = markerId;
2526
this.clusterManagerId = clusterManagerId;
2627
}

packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/MarkerController.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,7 @@ public void setZIndex(float zIndex) {
144144
}
145145

146146
@Override
147-
public void setCollisionBehavior(int collisionBehavior) {
148-
}
147+
public void setCollisionBehavior(int collisionBehavior) {}
149148

150149
String getGoogleMapsMarkerId() {
151150
return googleMapsMarkerId;

packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/MarkersController.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@
55
package io.flutter.plugins.googlemaps;
66

77
import android.content.res.AssetManager;
8-
98
import androidx.annotation.NonNull;
10-
119
import com.google.android.gms.maps.model.LatLng;
1210
import com.google.android.gms.maps.model.Marker;
1311
import com.google.android.gms.maps.model.MarkerOptions;
@@ -180,8 +178,7 @@ public void onClusterItemRendered(MarkerBuilder markerBuilder, Marker marker) {
180178
private void addMarker(@NonNull Messages.PlatformMarker marker) {
181179
String markerId = marker.getMarkerId();
182180
String clusterManagerId = marker.getClusterManagerId();
183-
MarkerBuilder markerBuilder = new MarkerBuilder(markerId, clusterManagerId,
184-
markerType);
181+
MarkerBuilder markerBuilder = new MarkerBuilder(markerId, clusterManagerId, markerType);
185182
Convert.interpretMarkerOptions(
186183
marker, markerBuilder, assetManager, density, bitmapDescriptorFactoryWrapper);
187184
addMarker(markerBuilder);

0 commit comments

Comments
 (0)