From dc895b4e03fa66b604c78c9c0fff6561b0a519af Mon Sep 17 00:00:00 2001 From: Marvin W Date: Sun, 30 Jun 2019 17:45:44 +0200 Subject: [PATCH] Add more details of Maps API --- .../gms/maps/internal/IGoogleMapDelegate.aidl | 35 ++++++-- .../maps/internal/IMapFragmentDelegate.aidl | 4 + .../gms/maps/internal/IMapViewDelegate.aidl | 4 + .../maps/internal/IUiSettingsDelegate.aidl | 6 ++ .../google/android/gms/maps/model/LatLng.aidl | 3 + .../android/gms/maps/model/LatLngBounds.aidl | 3 + .../android/gms/maps/GoogleMapOptions.java | 83 ++++++++++++++++++- 7 files changed, 128 insertions(+), 10 deletions(-) create mode 100644 play-services-api/src/main/aidl/com/google/android/gms/maps/model/LatLng.aidl create mode 100644 play-services-api/src/main/aidl/com/google/android/gms/maps/model/LatLngBounds.aidl diff --git a/play-services-api/src/main/aidl/com/google/android/gms/maps/internal/IGoogleMapDelegate.aidl b/play-services-api/src/main/aidl/com/google/android/gms/maps/internal/IGoogleMapDelegate.aidl index 0f78cf48..b8866644 100644 --- a/play-services-api/src/main/aidl/com/google/android/gms/maps/internal/IGoogleMapDelegate.aidl +++ b/play-services-api/src/main/aidl/com/google/android/gms/maps/internal/IGoogleMapDelegate.aidl @@ -25,6 +25,7 @@ import com.google.android.gms.maps.internal.IOnMyLocationButtonClickListener; import com.google.android.gms.maps.internal.ISnapshotReadyCallback; import com.google.android.gms.maps.model.CircleOptions; import com.google.android.gms.maps.model.GroundOverlayOptions; +import com.google.android.gms.maps.model.LatLngBounds; import com.google.android.gms.maps.model.MarkerOptions; import com.google.android.gms.maps.model.PolygonOptions; import com.google.android.gms.maps.model.PolylineOptions; @@ -53,7 +54,6 @@ interface IGoogleMapDelegate { IMarkerDelegate addMarker(in MarkerOptions options) = 10; IGroundOverlayDelegate addGroundOverlay(in GroundOverlayOptions options) = 11; ITileOverlayDelegate addTileOverlay(in TileOverlayOptions options) = 12; - ICircleDelegate addCircle(in CircleOptions options) = 34; void clear() = 13; @@ -82,6 +82,8 @@ interface IGoogleMapDelegate { IObjectWrapper getTestingHelper() = 33; + ICircleDelegate addCircle(in CircleOptions options) = 34; + void setOnMyLocationChangeListener(IOnMyLocationChangeListener listener) = 35; void setOnMyLocationButtonClickListener(IOnMyLocationButtonClickListener listener) = 36; @@ -94,17 +96,29 @@ interface IGoogleMapDelegate { void setOnMapLoadedCallback(IOnMapLoadedCallback callback) = 41; - //IIndoorBuildingDelegate getIndoorBuilding() = 43; + //IIndoorBuildingDelegate getFocusedBuilding() = 43; //void setIndoorStateChangeListener(IOnIndoorStateChangeListener listener) = 44; - //void a(boolean a) = 50; + void setWatermarkEnabled(boolean watermark) = 50; - //void setOnMapReadyCallback(IOnMapReadyCallback callback) = 52; + //void getMapAsync(IOnMapReadyCallback callback) = 52; + void onCreate(in Bundle savedInstanceState) = 53; + void onResume() = 54; + void onPause() = 55; + void onDestroy() = 56; + void onLowMemory() = 57; + boolean useViewLifecycleWhenInFragment() = 58; + void onSaveInstanceState(out Bundle outState) = 59; - //void setSnapshotReadyCallback(ISnapshotReadyCallback callback) = 70; + void setContentDescription(String desc) = 60; + + //void snapshotForTest(ISnapshotReadyCallback callback) = 70; //void setPoiClickListener(IOnPoiClickListener listener) = 79; + void onEnterAmbient(in Bundle bundle) = 80; + void onExitAmbient() = 81; + //void setOnGroundOverlayClickListener(IOnGroundOverlayClickListener listener) = 82; //void setInfoWindowLongClickListener(IOnInfoWindowLongClickListener listener) = 83; //void setPolygonClickListener(IOnPolygonClickListener listener) = 84; //void setInfoWindowCloseListener(IOnInfoWindowCloseListener listener) = 85; @@ -112,11 +126,18 @@ interface IGoogleMapDelegate { //void setCircleClickListener(IOnCircleClickListener listener) = 88; //boolean setMapStyle(in MapStyleOptions options) = 90; - - //void setBounds(in LatLngBounds bounds) = 94; + void setMinZoomPreference(float minZoom) = 91; + void setMaxZoomPreference(float maxZoom) = 92; + void resetMinMaxZoomPreference() = 93; + void setLatLngBoundsForCameraTarget(in LatLngBounds bounds) = 94; void setCameraMoveStartedListener(IOnCameraMoveStartedListener listener) = 95; void setCameraMoveListener(IOnCameraMoveListener listener) = 96; void setCameraMoveCanceledListener(IOnCameraMoveCanceledListener listener) = 97; void setCameraIdleListener(IOnCameraIdleListener listener) = 98; + + void onStart() = 100; + void onStop() = 101; + + //void setOnMyLocationClickListener(IOnMyLocationClickListener listener) = 106; } diff --git a/play-services-api/src/main/aidl/com/google/android/gms/maps/internal/IMapFragmentDelegate.aidl b/play-services-api/src/main/aidl/com/google/android/gms/maps/internal/IMapFragmentDelegate.aidl index 130a1fcc..c08c987b 100644 --- a/play-services-api/src/main/aidl/com/google/android/gms/maps/internal/IMapFragmentDelegate.aidl +++ b/play-services-api/src/main/aidl/com/google/android/gms/maps/internal/IMapFragmentDelegate.aidl @@ -20,4 +20,8 @@ interface IMapFragmentDelegate { void onSaveInstanceState(inout Bundle outState); boolean isReady(); void getMapAsync(IOnMapReadyCallback callback); + void onEnterAmbient(in Bundle bundle); + void onExitAmbient(); + void onStart(); + void onStop(); } diff --git a/play-services-api/src/main/aidl/com/google/android/gms/maps/internal/IMapViewDelegate.aidl b/play-services-api/src/main/aidl/com/google/android/gms/maps/internal/IMapViewDelegate.aidl index 80362ce0..d22db6c6 100644 --- a/play-services-api/src/main/aidl/com/google/android/gms/maps/internal/IMapViewDelegate.aidl +++ b/play-services-api/src/main/aidl/com/google/android/gms/maps/internal/IMapViewDelegate.aidl @@ -16,4 +16,8 @@ interface IMapViewDelegate { void onSaveInstanceState(inout Bundle outState); IObjectWrapper getView(); void getMapAsync(IOnMapReadyCallback callback); + void onEnterAmbient(in Bundle bundle); + void onExitAmbient(); + void onStart(); + void onStop(); } diff --git a/play-services-api/src/main/aidl/com/google/android/gms/maps/internal/IUiSettingsDelegate.aidl b/play-services-api/src/main/aidl/com/google/android/gms/maps/internal/IUiSettingsDelegate.aidl index ca5e0d08..12c78123 100644 --- a/play-services-api/src/main/aidl/com/google/android/gms/maps/internal/IUiSettingsDelegate.aidl +++ b/play-services-api/src/main/aidl/com/google/android/gms/maps/internal/IUiSettingsDelegate.aidl @@ -16,4 +16,10 @@ interface IUiSettingsDelegate { boolean isZoomGesturesEnabled(); boolean isTiltGesturesEnabled(); boolean isRotateGesturesEnabled(); + void setIndoorLevelPickerEnabled(boolean indoorLevelPicker); + boolean isIndoorLevelPickerEnabled(); + void setMapToolbarEnabled(boolean mapToolbar); + boolean isMapToolbarEnabled(); + void setScrollGesturesEnabledDuringRotateOrZoom(boolean scrollDuringZoom); + boolean isScrollGesturesEnabledDuringRotateOrZoom(); } diff --git a/play-services-api/src/main/aidl/com/google/android/gms/maps/model/LatLng.aidl b/play-services-api/src/main/aidl/com/google/android/gms/maps/model/LatLng.aidl new file mode 100644 index 00000000..42df9312 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/maps/model/LatLng.aidl @@ -0,0 +1,3 @@ +package com.google.android.gms.maps.model; + +parcelable LatLng; diff --git a/play-services-api/src/main/aidl/com/google/android/gms/maps/model/LatLngBounds.aidl b/play-services-api/src/main/aidl/com/google/android/gms/maps/model/LatLngBounds.aidl new file mode 100644 index 00000000..22bf17b4 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/maps/model/LatLngBounds.aidl @@ -0,0 +1,3 @@ +package com.google.android.gms.maps.model; + +parcelable LatLngBounds; diff --git a/play-services-api/src/main/java/com/google/android/gms/maps/GoogleMapOptions.java b/play-services-api/src/main/java/com/google/android/gms/maps/GoogleMapOptions.java index 09a5ad92..405f31d1 100644 --- a/play-services-api/src/main/java/com/google/android/gms/maps/GoogleMapOptions.java +++ b/play-services-api/src/main/java/com/google/android/gms/maps/GoogleMapOptions.java @@ -17,6 +17,8 @@ package com.google.android.gms.maps; import com.google.android.gms.maps.model.CameraPosition; +import com.google.android.gms.maps.model.LatLngBounds; + import org.microg.safeparcel.AutoSafeParcelable; import org.microg.safeparcel.SafeParceled; @@ -49,41 +51,116 @@ public final class GoogleMapOptions extends AutoSafeParcelable { private boolean mapToobarEnabled = false; @SafeParceled(15) private boolean ambientEnabled = false; + @SafeParceled(16) + private float minZoom; + @SafeParceled(17) + private float maxZoom; + @SafeParceled(18) + private LatLngBounds boundsForCamera; + @SafeParceled(19) + private boolean scrollGesturesEnabledDuringRotateOrZoom = true; public GoogleMapOptions() { } - public int getMapType() { - return mapType; + public Boolean getAmbientEnabled() { + return ambientEnabled; } public CameraPosition getCamera() { return camera; } - public boolean isZoomControlsEnabled() { + public Boolean getCompassEnabled() { + return compassEnabled; + } + + public LatLngBounds getLatLngBoundsForCameraTarget() { + return boundsForCamera; + } + + public Boolean getLiteMode() { + return liteMode; + } + + public Boolean getMapToolbarEnabled() { + return mapToobarEnabled; + } + + public int getMapType() { + return mapType; + } + + public Float getMaxZoomPreference() { + return maxZoom; + } + + public Float getMinZoomPreference() { + return minZoom; + } + + public Boolean getRotateGesturesEnabled() { + return rotateGesturesEnabled; + } + + public Boolean getScrollGesturesEnabled() { + return scrollGesturesEnabled; + } + + public Boolean getScrollGesturesEnabledDuringRotateOrZoom() { + return scrollGesturesEnabledDuringRotateOrZoom; + } + + public Boolean getTiltGesturesEnabled() { + return tiltGesturesEnabled; + } + + public Boolean getUseViewLifecycleInFragment() { + return useViewLifecycleInFragment; + } + + public Boolean getZOrderOnTop() { + return zOrderOnTop == 1; // TODO + } + + public Boolean getZoomControlsEnabled() { return zoomControlsEnabled; } + public Boolean getZoomGesturesEnabled() { + return zoomGesturesEnabled; + } + + @Deprecated public boolean isCompassEnabled() { return compassEnabled; } + @Deprecated + public boolean isZoomControlsEnabled() { + return zoomControlsEnabled; + } + + @Deprecated public boolean isScrollGesturesEnabled() { return scrollGesturesEnabled; } + @Deprecated public boolean isZoomGesturesEnabled() { return zoomGesturesEnabled; } + @Deprecated public boolean isTiltGesturesEnabled() { return tiltGesturesEnabled; } + @Deprecated public boolean isRotateGesturesEnabled() { return rotateGesturesEnabled; } + public static Creator CREATOR = new AutoCreator(GoogleMapOptions.class); }