From 0e2ceee2a66c8bcb7568631a9782bbda39cd7f69 Mon Sep 17 00:00:00 2001 From: mar-v-in Date: Tue, 6 Jan 2015 04:05:25 +0100 Subject: [PATCH] Initial commit --- Android.mk | 9 + AndroidManifest.xml | 4 + build.gradle | 28 +++ .../android/auth/IAuthManagerService.aidl | 6 + .../gms/common/AbstractGmsServiceBroker.java | 170 ++++++++++++++++++ .../gms/common/internal/IGmsCallbacks.aidl | 5 + .../common/internal/IGmsServiceBroker.aidl | 30 ++++ .../android/gms/dynamic/IObjectWrapper.aidl | 8 + .../android/gms/dynamic/ObjectWrapper.java | 66 +++++++ .../google/android/gms/location/Geofence.aidl | 3 + .../google/android/gms/location/Geofence.java | 48 +++++ .../internal/IGeofencerCallbacks.aidl | 4 + .../IGoogleLocationManagerService.aidl | 8 + .../android/gms/maps/GoogleMapOptions.aidl | 3 + .../android/gms/maps/GoogleMapOptions.java | 107 +++++++++++ .../ICameraUpdateFactoryDelegate.aidl | 20 +++ .../maps/internal/ICancelableCallback.aidl | 6 + .../android/gms/maps/internal/ICreator.aidl | 17 ++ .../gms/maps/internal/IGoogleMapDelegate.aidl | 91 ++++++++++ .../gms/maps/internal/IInfoWindowAdapter.aidl | 9 + .../internal/ILocationSourceDelegate.aidl | 4 + .../maps/internal/IMapFragmentDelegate.aidl | 19 ++ .../gms/maps/internal/IMapViewDelegate.aidl | 15 ++ .../internal/IOnCameraChangeListener.aidl | 4 + .../internal/IOnInfoWindowClickListener.aidl | 7 + .../maps/internal/IOnMapClickListener.aidl | 7 + .../maps/internal/IOnMapLoadedCallback.aidl | 4 + .../internal/IOnMapLongClickListener.aidl | 7 + .../maps/internal/IOnMarkerClickListener.aidl | 7 + .../maps/internal/IOnMarkerDragListener.aidl | 4 + .../IOnMyLocationButtonClickListener.aidl | 4 + .../internal/IOnMyLocationChangeListener.aidl | 4 + .../maps/internal/IProjectionDelegate.aidl | 11 ++ .../maps/internal/ISnapshotReadyCallback.aidl | 4 + .../maps/internal/IUiSettingsDelegate.aidl | 19 ++ .../gms/maps/model/CameraPosition.aidl | 3 + .../gms/maps/model/CameraPosition.java | 91 ++++++++++ .../android/gms/maps/model/CircleOptions.aidl | 3 + .../android/gms/maps/model/CircleOptions.java | 67 +++++++ .../gms/maps/model/GroundOverlayOptions.aidl | 3 + .../gms/maps/model/GroundOverlayOptions.java | 79 ++++++++ .../google/android/gms/maps/model/LatLng.aidl | 3 + .../google/android/gms/maps/model/LatLng.java | 81 +++++++++ .../android/gms/maps/model/LatLngBounds.aidl | 3 + .../android/gms/maps/model/LatLngBounds.java | 64 +++++++ .../android/gms/maps/model/MarkerOptions.aidl | 3 + .../android/gms/maps/model/MarkerOptions.java | 134 ++++++++++++++ .../gms/maps/model/PolygonOptions.aidl | 3 + .../gms/maps/model/PolygonOptions.java | 50 ++++++ .../gms/maps/model/PolylineOptions.aidl | 3 + .../gms/maps/model/PolylineOptions.java | 66 +++++++ .../gms/maps/model/TileOverlayOptions.aidl | 3 + .../gms/maps/model/TileOverlayOptions.java | 51 ++++++ .../android/gms/maps/model/VisibleRegion.aidl | 3 + .../android/gms/maps/model/VisibleRegion.java | 76 ++++++++ .../IBitmapDescriptorFactoryDelegate.aidl | 14 ++ .../maps/model/internal/ICircleDelegate.aidl | 24 +++ .../internal/IGroundOverlayDelegate.aidl | 29 +++ .../maps/model/internal/IMarkerDelegate.aidl | 33 ++++ .../maps/model/internal/IPolygonDelegate.aidl | 27 +++ .../model/internal/IPolylineDelegate.aidl | 22 +++ .../model/internal/ITileOverlayDelegate.aidl | 4 + .../plus/internal/IPlusOneButtonCreator.aidl | 8 + 63 files changed, 1712 insertions(+) create mode 100644 Android.mk create mode 100644 AndroidManifest.xml create mode 100644 build.gradle create mode 100644 src/com/google/android/auth/IAuthManagerService.aidl create mode 100644 src/com/google/android/gms/common/AbstractGmsServiceBroker.java create mode 100644 src/com/google/android/gms/common/internal/IGmsCallbacks.aidl create mode 100644 src/com/google/android/gms/common/internal/IGmsServiceBroker.aidl create mode 100644 src/com/google/android/gms/dynamic/IObjectWrapper.aidl create mode 100644 src/com/google/android/gms/dynamic/ObjectWrapper.java create mode 100644 src/com/google/android/gms/location/Geofence.aidl create mode 100644 src/com/google/android/gms/location/Geofence.java create mode 100644 src/com/google/android/gms/location/internal/IGeofencerCallbacks.aidl create mode 100644 src/com/google/android/gms/location/internal/IGoogleLocationManagerService.aidl create mode 100644 src/com/google/android/gms/maps/GoogleMapOptions.aidl create mode 100644 src/com/google/android/gms/maps/GoogleMapOptions.java create mode 100644 src/com/google/android/gms/maps/internal/ICameraUpdateFactoryDelegate.aidl create mode 100644 src/com/google/android/gms/maps/internal/ICancelableCallback.aidl create mode 100644 src/com/google/android/gms/maps/internal/ICreator.aidl create mode 100644 src/com/google/android/gms/maps/internal/IGoogleMapDelegate.aidl create mode 100644 src/com/google/android/gms/maps/internal/IInfoWindowAdapter.aidl create mode 100644 src/com/google/android/gms/maps/internal/ILocationSourceDelegate.aidl create mode 100644 src/com/google/android/gms/maps/internal/IMapFragmentDelegate.aidl create mode 100644 src/com/google/android/gms/maps/internal/IMapViewDelegate.aidl create mode 100644 src/com/google/android/gms/maps/internal/IOnCameraChangeListener.aidl create mode 100644 src/com/google/android/gms/maps/internal/IOnInfoWindowClickListener.aidl create mode 100644 src/com/google/android/gms/maps/internal/IOnMapClickListener.aidl create mode 100644 src/com/google/android/gms/maps/internal/IOnMapLoadedCallback.aidl create mode 100644 src/com/google/android/gms/maps/internal/IOnMapLongClickListener.aidl create mode 100644 src/com/google/android/gms/maps/internal/IOnMarkerClickListener.aidl create mode 100644 src/com/google/android/gms/maps/internal/IOnMarkerDragListener.aidl create mode 100644 src/com/google/android/gms/maps/internal/IOnMyLocationButtonClickListener.aidl create mode 100644 src/com/google/android/gms/maps/internal/IOnMyLocationChangeListener.aidl create mode 100644 src/com/google/android/gms/maps/internal/IProjectionDelegate.aidl create mode 100644 src/com/google/android/gms/maps/internal/ISnapshotReadyCallback.aidl create mode 100644 src/com/google/android/gms/maps/internal/IUiSettingsDelegate.aidl create mode 100644 src/com/google/android/gms/maps/model/CameraPosition.aidl create mode 100644 src/com/google/android/gms/maps/model/CameraPosition.java create mode 100644 src/com/google/android/gms/maps/model/CircleOptions.aidl create mode 100644 src/com/google/android/gms/maps/model/CircleOptions.java create mode 100644 src/com/google/android/gms/maps/model/GroundOverlayOptions.aidl create mode 100644 src/com/google/android/gms/maps/model/GroundOverlayOptions.java create mode 100644 src/com/google/android/gms/maps/model/LatLng.aidl create mode 100644 src/com/google/android/gms/maps/model/LatLng.java create mode 100644 src/com/google/android/gms/maps/model/LatLngBounds.aidl create mode 100644 src/com/google/android/gms/maps/model/LatLngBounds.java create mode 100644 src/com/google/android/gms/maps/model/MarkerOptions.aidl create mode 100644 src/com/google/android/gms/maps/model/MarkerOptions.java create mode 100644 src/com/google/android/gms/maps/model/PolygonOptions.aidl create mode 100644 src/com/google/android/gms/maps/model/PolygonOptions.java create mode 100644 src/com/google/android/gms/maps/model/PolylineOptions.aidl create mode 100644 src/com/google/android/gms/maps/model/PolylineOptions.java create mode 100644 src/com/google/android/gms/maps/model/TileOverlayOptions.aidl create mode 100644 src/com/google/android/gms/maps/model/TileOverlayOptions.java create mode 100644 src/com/google/android/gms/maps/model/VisibleRegion.aidl create mode 100644 src/com/google/android/gms/maps/model/VisibleRegion.java create mode 100644 src/com/google/android/gms/maps/model/internal/IBitmapDescriptorFactoryDelegate.aidl create mode 100644 src/com/google/android/gms/maps/model/internal/ICircleDelegate.aidl create mode 100644 src/com/google/android/gms/maps/model/internal/IGroundOverlayDelegate.aidl create mode 100644 src/com/google/android/gms/maps/model/internal/IMarkerDelegate.aidl create mode 100644 src/com/google/android/gms/maps/model/internal/IPolygonDelegate.aidl create mode 100644 src/com/google/android/gms/maps/model/internal/IPolylineDelegate.aidl create mode 100644 src/com/google/android/gms/maps/model/internal/ITileOverlayDelegate.aidl create mode 100644 src/com/google/android/gms/plus/internal/IPlusOneButtonCreator.aidl diff --git a/Android.mk b/Android.mk new file mode 100644 index 00000000..4b9abaa0 --- /dev/null +++ b/Android.mk @@ -0,0 +1,9 @@ +# Not working yet +LOCAL_PATH := $(call my-dir) +include $(CLEAR_VARS) + +LOCAL_MODULE := GmsApi +LOCAL_SRC_FILES := $(call all-java-files-under, src) +LOCAL_SRC_FILES := $(call all-Iaidl-files-under, src) + +include $(BUILD_STATIC_JAVA_LIBRARY) diff --git a/AndroidManifest.xml b/AndroidManifest.xml new file mode 100644 index 00000000..1b9d6274 --- /dev/null +++ b/AndroidManifest.xml @@ -0,0 +1,4 @@ + + + + diff --git a/build.gradle b/build.gradle new file mode 100644 index 00000000..f433729e --- /dev/null +++ b/build.gradle @@ -0,0 +1,28 @@ +buildscript { + repositories { + mavenCentral() + } + dependencies { + classpath 'com.android.tools.build:gradle:1.0.0' + } +} + +apply plugin: 'com.android.library' + +dependencies { + compile project(':SafeParcel') +} + +android { + compileSdkVersion 21 + buildToolsVersion "21.0.2" + lintOptions.abortOnError false + + sourceSets { + main { + manifest.srcFile 'AndroidManifest.xml' + java.srcDirs = ['src'] + aidl.srcDirs = ['src'] + } + } +} diff --git a/src/com/google/android/auth/IAuthManagerService.aidl b/src/com/google/android/auth/IAuthManagerService.aidl new file mode 100644 index 00000000..0b84c375 --- /dev/null +++ b/src/com/google/android/auth/IAuthManagerService.aidl @@ -0,0 +1,6 @@ +package com.google.android.auth; + +interface IAuthManagerService { + Bundle getToken(String accountName, String scope, in Bundle extras); + Bundle clearToken(String token, in Bundle extras); +} diff --git a/src/com/google/android/gms/common/AbstractGmsServiceBroker.java b/src/com/google/android/gms/common/AbstractGmsServiceBroker.java new file mode 100644 index 00000000..758d6faf --- /dev/null +++ b/src/com/google/android/gms/common/AbstractGmsServiceBroker.java @@ -0,0 +1,170 @@ +/* + * Copyright (c) 2014 μg 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. + */ + +package com.google.android.gms.common; + +import android.os.Bundle; +import android.os.IBinder; +import android.os.RemoteException; +import com.google.android.gms.common.internal.IGmsCallbacks; +import com.google.android.gms.common.internal.IGmsServiceBroker; + +public abstract class AbstractGmsServiceBroker extends IGmsServiceBroker.Stub { + @Override + public void getPlusService(IGmsCallbacks callback, int versionCode, String packageName, + String str2, String[] paramArrayOfString, String str3, Bundle params) + throws RemoteException { + throw new IllegalArgumentException("Plus service not supported"); + } + + @Override + public void getPanoramaService(IGmsCallbacks callback, int versionCode, String packageName, + Bundle params) throws RemoteException { + throw new IllegalArgumentException("Panorama service not supported"); + } + + @Override + public void getAppDataSearchService(IGmsCallbacks callback, int versionCode, String packageName) + throws RemoteException { + throw new IllegalArgumentException("App Data Search service not supported"); + } + + @Override + public void getWalletService(IGmsCallbacks callback, int versionCode) throws RemoteException { + throw new IllegalArgumentException("Wallet service not supported"); + } + + @Override + public void getPeopleService(IGmsCallbacks callback, int versionCode, String packageName, + Bundle params) throws RemoteException { + throw new IllegalArgumentException("People service not supported"); + } + + @Override + public void getReportingService(IGmsCallbacks callback, int versionCode, String packageName, + Bundle params) throws RemoteException { + throw new IllegalArgumentException("Reporting service not supported"); + } + + @Override + public void getLocationService(IGmsCallbacks callback, int versionCode, String packageName, + Bundle params) throws RemoteException { + throw new IllegalArgumentException("Location service not supported"); + } + + @Override + public void getGoogleLocationManagerService(IGmsCallbacks callback, int versionCode, + String packageName, Bundle params) throws RemoteException { + throw new IllegalArgumentException("Google Location Manager service not supported"); + } + + @Override + public void getGamesService(IGmsCallbacks callback, int versionCode, String packageName, + String str2, String[] args, String str3, IBinder binder, String str4, Bundle params) + throws RemoteException { + throw new IllegalArgumentException("Games service not supported"); + } + + @Override + public void getAppStateService(IGmsCallbacks callback, int versionCode, String packageName, + String str2, String[] args) throws RemoteException { + throw new IllegalArgumentException("App State service not supported"); + } + + @Override + public void getPlayLogService(IGmsCallbacks callback, int versionCode, String packageName, + Bundle params) throws RemoteException { + throw new IllegalArgumentException("Play Log service not supported"); + } + + @Override + public void getAdMobService(IGmsCallbacks callback, int versionCode, String packageName, + Bundle params) throws RemoteException { + throw new IllegalArgumentException("AdMob service not supported"); + } + + @Override + public void getDroidGuardService(IGmsCallbacks callback, int versionCode, String packageName, + Bundle params) throws RemoteException { + throw new IllegalArgumentException("DroidGuard service not supported"); + } + + @Override + public void getLockboxService(IGmsCallbacks callback, int versionCode, String packageName, + Bundle params) throws RemoteException { + throw new IllegalArgumentException("Lockbox service not supported"); + } + + @Override + public void getCastMirroringService(IGmsCallbacks callback, int versionCode, String packageName, + Bundle params) throws RemoteException { + throw new IllegalArgumentException("Cast Mirroring service not supported"); + } + + @Override + public void getNetworkQualityService(IGmsCallbacks callback, int versionCode, + String packageName, Bundle params) throws RemoteException { + throw new IllegalArgumentException("Network Quality service not supported"); + } + + @Override + public void getGoogleIdentityService(IGmsCallbacks callback, int versionCode, + String packageName, Bundle params) throws RemoteException { + throw new IllegalArgumentException("Google Identity service not supported"); + } + + @Override + public void getGoogleFeedbackService(IGmsCallbacks callback, int versionCode, + String packageName, Bundle params) throws RemoteException { + throw new IllegalArgumentException("Google Feedback service not supported"); + } + + @Override + public void getCastService(IGmsCallbacks callback, int versionCode, String packageName, + IBinder binder, Bundle params) throws RemoteException { + throw new IllegalArgumentException("Cast service not supported"); + } + + @Override + public void getDriveService(IGmsCallbacks callback, int versionCode, String packageName, + String[] args, String str2, Bundle params) throws RemoteException { + throw new IllegalArgumentException("Drive service not supported"); + } + + @Override + public void getLightweightAppDataSearchService(IGmsCallbacks callback, int versionCode, + String packageName) throws RemoteException { + throw new IllegalArgumentException("Lightweight App Data Search service not supported"); + } + + @Override + public void getSearchAdministrationService(IGmsCallbacks callback, int versionCode, + String packageName) throws RemoteException { + throw new IllegalArgumentException("Search Administration service not supported"); + } + + @Override + public void getAutoBackupService(IGmsCallbacks callback, int versionCode, String packageName, + Bundle params) throws RemoteException { + throw new IllegalArgumentException("Auto Backup service not supported"); + } + + @Override + public void getAddressService(IGmsCallbacks callback, int versionCode, String packageName) + throws RemoteException { + throw new IllegalArgumentException("Address service not supported"); + } +} diff --git a/src/com/google/android/gms/common/internal/IGmsCallbacks.aidl b/src/com/google/android/gms/common/internal/IGmsCallbacks.aidl new file mode 100644 index 00000000..9a36b0ed --- /dev/null +++ b/src/com/google/android/gms/common/internal/IGmsCallbacks.aidl @@ -0,0 +1,5 @@ +package com.google.android.gms.common.internal; + +interface IGmsCallbacks { + void onPostInitComplete(int statusCode, IBinder binder, in Bundle params); +} diff --git a/src/com/google/android/gms/common/internal/IGmsServiceBroker.aidl b/src/com/google/android/gms/common/internal/IGmsServiceBroker.aidl new file mode 100644 index 00000000..318c4dab --- /dev/null +++ b/src/com/google/android/gms/common/internal/IGmsServiceBroker.aidl @@ -0,0 +1,30 @@ +package com.google.android.gms.common.internal; + +import com.google.android.gms.common.internal.IGmsCallbacks; + +interface IGmsServiceBroker { + void getPlusService(IGmsCallbacks callback, int code, String str1, String str2, in String[] paramArrayOfString, String str3, in Bundle params); + void getPanoramaService(IGmsCallbacks callback, int code, String str, in Bundle params); + void getAppDataSearchService(IGmsCallbacks callback, int code, String str); + void getWalletService(IGmsCallbacks callback, int code); + void getPeopleService(IGmsCallbacks callback, int code, String str, in Bundle params); + void getReportingService(IGmsCallbacks callback, int code, String str, in Bundle params); + void getLocationService(IGmsCallbacks callback, int code, String str, in Bundle params); + void getGoogleLocationManagerService(IGmsCallbacks callback, int code, String str, in Bundle params); + void getGamesService(IGmsCallbacks callback, int code, String str1, String str2, in String[] args, String str3, IBinder binder, String str4, in Bundle params); + void getAppStateService(IGmsCallbacks callback, int code, String str1, String str2, in String[] args); + void getPlayLogService(IGmsCallbacks callback, int code, String str, in Bundle params); + void getAdMobService(IGmsCallbacks callback, int code, String str, in Bundle params); + void getDroidGuardService(IGmsCallbacks callback, int code, String str, in Bundle params); + void getLockboxService(IGmsCallbacks callback, int code, String str, in Bundle params); + void getCastMirroringService(IGmsCallbacks callback, int code, String str, in Bundle params); + void getNetworkQualityService(IGmsCallbacks callback, int code, String str, in Bundle params); + void getGoogleIdentityService(IGmsCallbacks callback, int code, String str, in Bundle params); + void getGoogleFeedbackService(IGmsCallbacks callback, int code, String str, in Bundle params); + void getCastService(IGmsCallbacks callback, int code, String str, IBinder binder, in Bundle params); + void getDriveService(IGmsCallbacks callback, int code, String str1, in String[] args, String str2, in Bundle params); + void getLightweightAppDataSearchService(IGmsCallbacks callback, int code, String str); + void getSearchAdministrationService(IGmsCallbacks callback, int code, String str); + void getAutoBackupService(IGmsCallbacks callback, int code, String str, in Bundle params); + void getAddressService(IGmsCallbacks callback, int code, String str); +} diff --git a/src/com/google/android/gms/dynamic/IObjectWrapper.aidl b/src/com/google/android/gms/dynamic/IObjectWrapper.aidl new file mode 100644 index 00000000..35e1474a --- /dev/null +++ b/src/com/google/android/gms/dynamic/IObjectWrapper.aidl @@ -0,0 +1,8 @@ +package com.google.android.gms.dynamic; + +/** + * The concrete class implementing IObjectWrapper must have exactly one declared private field + * for the wrapped object. Preferably, this is an instance of the ObjectWrapper class. + */ +interface IObjectWrapper { +} diff --git a/src/com/google/android/gms/dynamic/ObjectWrapper.java b/src/com/google/android/gms/dynamic/ObjectWrapper.java new file mode 100644 index 00000000..04a5e582 --- /dev/null +++ b/src/com/google/android/gms/dynamic/ObjectWrapper.java @@ -0,0 +1,66 @@ +/* + * Copyright (c) 2014 μg 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. + */ + +package com.google.android.gms.dynamic; + +import android.os.IBinder; + +import java.lang.reflect.Field; + +public class ObjectWrapper extends IObjectWrapper.Stub { + private final T t; + + public ObjectWrapper(T t) { + this.t = t; + } + + public static Object unwrap(IObjectWrapper obj) { + if (obj == null) { + return null; + } + if (obj instanceof ObjectWrapper) { + return ((ObjectWrapper) obj).t; + } + IBinder binder = obj.asBinder(); + Field[] fields = binder.getClass().getDeclaredFields(); + if (fields.length != 1) { + throw new IllegalArgumentException(); + } + Field field = fields[0]; + if (!field.isAccessible()) { + field.setAccessible(true); + try { + Object wrapped = field.get(binder); + return wrapped; + } catch (NullPointerException localNullPointerException) { + throw new IllegalArgumentException("Binder object is null.", + localNullPointerException); + } catch (IllegalArgumentException localIllegalArgumentException) { + throw new IllegalArgumentException("remoteBinder is the wrong class.", + localIllegalArgumentException); + } catch (IllegalAccessException localIllegalAccessException) { + throw new IllegalArgumentException("Could not access the field in remoteBinder.", + localIllegalAccessException); + } + } else { + throw new IllegalArgumentException(); + } + } + + public static ObjectWrapper wrap(T t) { + return new ObjectWrapper(t); + } +} diff --git a/src/com/google/android/gms/location/Geofence.aidl b/src/com/google/android/gms/location/Geofence.aidl new file mode 100644 index 00000000..4fc554eb --- /dev/null +++ b/src/com/google/android/gms/location/Geofence.aidl @@ -0,0 +1,3 @@ +package com.google.android.gms.location; + +parcelable Geofence; \ No newline at end of file diff --git a/src/com/google/android/gms/location/Geofence.java b/src/com/google/android/gms/location/Geofence.java new file mode 100644 index 00000000..0c65cfa5 --- /dev/null +++ b/src/com/google/android/gms/location/Geofence.java @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2014 μg 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. + */ + +package com.google.android.gms.location; + +import android.os.Parcel; +import org.microg.safeparcel.SafeParcelUtil; +import org.microg.safeparcel.SafeParcelable; + +public class Geofence implements SafeParcelable { + + + @Override + public int describeContents() { + return 0; + } + + @Override + public void writeToParcel(Parcel dest, int flags) { + SafeParcelUtil.writeObject(this, dest, flags); + } + + + public static Creator CREATOR = new Creator() { + @Override + public Geofence createFromParcel(Parcel source) { + return new Geofence(); + } + + @Override + public Geofence[] newArray(int size) { + return new Geofence[size]; + } + }; +} diff --git a/src/com/google/android/gms/location/internal/IGeofencerCallbacks.aidl b/src/com/google/android/gms/location/internal/IGeofencerCallbacks.aidl new file mode 100644 index 00000000..b8e03066 --- /dev/null +++ b/src/com/google/android/gms/location/internal/IGeofencerCallbacks.aidl @@ -0,0 +1,4 @@ +package com.google.android.gms.location.internal; + +interface IGeofencerCallbacks { +} diff --git a/src/com/google/android/gms/location/internal/IGoogleLocationManagerService.aidl b/src/com/google/android/gms/location/internal/IGoogleLocationManagerService.aidl new file mode 100644 index 00000000..c461587d --- /dev/null +++ b/src/com/google/android/gms/location/internal/IGoogleLocationManagerService.aidl @@ -0,0 +1,8 @@ +package com.google.android.gms.location.internal; + +import com.google.android.gms.location.Geofence; +import com.google.android.gms.location.internal.IGeofencerCallbacks; + +interface IGoogleLocationManagerService { + void addGeofences(in List geofences, in PendingIntent pendingIntent, IGeofencerCallbacks callback, String str); +} diff --git a/src/com/google/android/gms/maps/GoogleMapOptions.aidl b/src/com/google/android/gms/maps/GoogleMapOptions.aidl new file mode 100644 index 00000000..e2cf4afd --- /dev/null +++ b/src/com/google/android/gms/maps/GoogleMapOptions.aidl @@ -0,0 +1,3 @@ +package com.google.android.gms.maps; + +parcelable GoogleMapOptions; diff --git a/src/com/google/android/gms/maps/GoogleMapOptions.java b/src/com/google/android/gms/maps/GoogleMapOptions.java new file mode 100644 index 00000000..8219b155 --- /dev/null +++ b/src/com/google/android/gms/maps/GoogleMapOptions.java @@ -0,0 +1,107 @@ +/* + * Copyright (c) 2014 μg 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. + */ + +package com.google.android.gms.maps; + +import android.os.Parcel; +import com.google.android.gms.maps.model.CameraPosition; +import org.microg.safeparcel.SafeParcelUtil; +import org.microg.safeparcel.SafeParcelable; +import org.microg.safeparcel.SafeParceled; + +public final class GoogleMapOptions implements SafeParcelable { + @SafeParceled(1) + private int versionCode; + @SafeParceled(2) + private int zOrderOnTop; + @SafeParceled(3) + private boolean useViewLifecycleInFragment; + @SafeParceled(4) + private int mapType; + @SafeParceled(5) + private CameraPosition camera; + @SafeParceled(6) + private boolean zoomControlsEnabled; + @SafeParceled(7) + private boolean compassEnabled; + @SafeParceled(8) + private boolean scrollGesturesEnabled; + @SafeParceled(9) + private boolean zoomGesturesEnabled; + @SafeParceled(10) + private boolean tiltGesturesEnabled; + @SafeParceled(11) + private boolean rotateGesturesEnabled; + + @Override + public int describeContents() { + return 0; + } + + @Override + public void writeToParcel(Parcel dest, int flags) { + SafeParcelUtil.writeObject(this, dest, flags); + } + + public GoogleMapOptions() { + } + + private GoogleMapOptions(Parcel in) { + SafeParcelUtil.readObject(this, in); + } + + public int getMapType() { + return mapType; + } + + public CameraPosition getCamera() { + return camera; + } + + public boolean isZoomControlsEnabled() { + return zoomControlsEnabled; + } + + public boolean isCompassEnabled() { + return compassEnabled; + } + + public boolean isScrollGesturesEnabled() { + return scrollGesturesEnabled; + } + + public boolean isZoomGesturesEnabled() { + return zoomGesturesEnabled; + } + + public boolean isTiltGesturesEnabled() { + return tiltGesturesEnabled; + } + + public boolean isRotateGesturesEnabled() { + return rotateGesturesEnabled; + } + + public static Creator CREATOR = new Creator() { + public GoogleMapOptions createFromParcel(Parcel source) { + return new GoogleMapOptions(source); + } + + public GoogleMapOptions[] newArray(int size) { + return new GoogleMapOptions[size]; + } + }; +} diff --git a/src/com/google/android/gms/maps/internal/ICameraUpdateFactoryDelegate.aidl b/src/com/google/android/gms/maps/internal/ICameraUpdateFactoryDelegate.aidl new file mode 100644 index 00000000..fc1665b7 --- /dev/null +++ b/src/com/google/android/gms/maps/internal/ICameraUpdateFactoryDelegate.aidl @@ -0,0 +1,20 @@ +package com.google.android.gms.maps.internal; + +import com.google.android.gms.dynamic.IObjectWrapper; +import com.google.android.gms.maps.model.CameraPosition; +import com.google.android.gms.maps.model.LatLng; +import com.google.android.gms.maps.model.LatLngBounds; + +interface ICameraUpdateFactoryDelegate { + IObjectWrapper zoomIn(); + IObjectWrapper zoomOut(); + IObjectWrapper scrollBy(float x, float y); + IObjectWrapper zoomTo(float zoom); + IObjectWrapper zoomBy(float zoomDelta); + IObjectWrapper zoomByWithFocus(float zoomDelta, int x, int y); + IObjectWrapper newCameraPosition(in CameraPosition cameraPosition); + IObjectWrapper newLatLng(in LatLng latLng); + IObjectWrapper newLatLngZoom(in LatLng latLng, float zoom); + IObjectWrapper newLatLngBounds(in LatLngBounds bounds, int i); + IObjectWrapper newLatLngBoundsWithSize(in LatLngBounds bounds, int i1, int i2, int i3); +} diff --git a/src/com/google/android/gms/maps/internal/ICancelableCallback.aidl b/src/com/google/android/gms/maps/internal/ICancelableCallback.aidl new file mode 100644 index 00000000..0cc5938f --- /dev/null +++ b/src/com/google/android/gms/maps/internal/ICancelableCallback.aidl @@ -0,0 +1,6 @@ +package com.google.android.gms.maps.internal; + +interface ICancelableCallback { + void onFinish(); + void onCancel(); +} diff --git a/src/com/google/android/gms/maps/internal/ICreator.aidl b/src/com/google/android/gms/maps/internal/ICreator.aidl new file mode 100644 index 00000000..f10ab345 --- /dev/null +++ b/src/com/google/android/gms/maps/internal/ICreator.aidl @@ -0,0 +1,17 @@ +package com.google.android.gms.maps.internal; + +import com.google.android.gms.dynamic.IObjectWrapper; +import com.google.android.gms.maps.GoogleMapOptions; +import com.google.android.gms.maps.internal.IMapFragmentDelegate; +import com.google.android.gms.maps.internal.IMapViewDelegate; +import com.google.android.gms.maps.internal.ICameraUpdateFactoryDelegate; +import com.google.android.gms.maps.model.internal.IBitmapDescriptorFactoryDelegate; + +interface ICreator { + void init(IObjectWrapper resources); + IMapFragmentDelegate newMapFragmentDelegate(IObjectWrapper activity); + IMapViewDelegate newMapViewDelegate(IObjectWrapper context, in GoogleMapOptions options); + ICameraUpdateFactoryDelegate newCameraUpdateFactoryDelegate(); + IBitmapDescriptorFactoryDelegate newBitmapDescriptorFactoryDelegate(); + void initV2(IObjectWrapper resources, int flags); +} diff --git a/src/com/google/android/gms/maps/internal/IGoogleMapDelegate.aidl b/src/com/google/android/gms/maps/internal/IGoogleMapDelegate.aidl new file mode 100644 index 00000000..ac474c35 --- /dev/null +++ b/src/com/google/android/gms/maps/internal/IGoogleMapDelegate.aidl @@ -0,0 +1,91 @@ +package com.google.android.gms.maps.internal; + +import com.google.android.gms.dynamic.IObjectWrapper; +import com.google.android.gms.maps.model.CameraPosition; +import com.google.android.gms.maps.internal.ICancelableCallback; +import com.google.android.gms.maps.internal.ILocationSourceDelegate; +import com.google.android.gms.maps.internal.IUiSettingsDelegate; +import com.google.android.gms.maps.internal.IProjectionDelegate; +import com.google.android.gms.maps.internal.IOnCameraChangeListener; +import com.google.android.gms.maps.internal.IOnMapClickListener; +import com.google.android.gms.maps.internal.IOnMapLongClickListener; +import com.google.android.gms.maps.internal.IOnMarkerClickListener; +import com.google.android.gms.maps.internal.IOnMarkerDragListener; +import com.google.android.gms.maps.internal.IOnInfoWindowClickListener; +import com.google.android.gms.maps.internal.IInfoWindowAdapter; +import com.google.android.gms.maps.internal.IOnMapLoadedCallback; +import com.google.android.gms.maps.internal.IOnMyLocationChangeListener; +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.MarkerOptions; +import com.google.android.gms.maps.model.PolygonOptions; +import com.google.android.gms.maps.model.PolylineOptions; +import com.google.android.gms.maps.model.TileOverlayOptions; +import com.google.android.gms.maps.model.internal.IPolylineDelegate; +import com.google.android.gms.maps.model.internal.IPolygonDelegate; +import com.google.android.gms.maps.model.internal.IMarkerDelegate; +import com.google.android.gms.maps.model.internal.ICircleDelegate; +import com.google.android.gms.maps.model.internal.IGroundOverlayDelegate; +import com.google.android.gms.maps.model.internal.ITileOverlayDelegate; + +interface IGoogleMapDelegate { + CameraPosition getCameraPosition(); + + float getMaxZoomLevel(); + float getMinZoomLevel(); + + void moveCamera(IObjectWrapper cameraUpdate); + void animateCamera(IObjectWrapper cameraUpdate); + void animateCameraWithCallback(IObjectWrapper cameraUpdate, ICancelableCallback callback); + void animateCameraWithDurationAndCallback(IObjectWrapper cameraUpdate, int duration, ICancelableCallback callback); + void stopAnimation(); + + IPolylineDelegate addPolyline(in PolylineOptions options); + IPolygonDelegate addPolygon(in PolygonOptions options); + IMarkerDelegate addMarker(in MarkerOptions options); + IGroundOverlayDelegate addGroundOverlay(in GroundOverlayOptions options); + ITileOverlayDelegate addTileOverlay(in TileOverlayOptions options); + + void clear(); + + int getMapType(); + void setMapType(int type); + boolean isTrafficEnabled(); + void setTrafficEnabled(boolean traffic); + boolean isIndoorEnabled(); + void setIndoorEnabled(boolean indoor); + + boolean isMyLocationEnabled(); + void setMyLocationEnabled(boolean myLocation); + Location getMyLocation(); + void setLocationSource(ILocationSourceDelegate locationSource); + + IUiSettingsDelegate getUiSettings(); + IProjectionDelegate getProjection(); + + void setOnCameraChangeListener(IOnCameraChangeListener listener); + void setOnMapClickListener(IOnMapClickListener listener); + void setOnMapLongClickListener(IOnMapLongClickListener listener); + void setOnMarkerClickListener(IOnMarkerClickListener listener); + void setOnMarkerDragListener(IOnMarkerDragListener listener); + void setOnInfoWindowClickListener(IOnInfoWindowClickListener listener); + void setInfoWindowAdapter(IInfoWindowAdapter adapter); + + IObjectWrapper getTestingHelper(); + + ICircleDelegate addCircle(in CircleOptions options); + + void setOnMyLocationChangeListener(IOnMyLocationChangeListener listener); + void setOnMyLocationButtonClickListener(IOnMyLocationButtonClickListener listener); + + void snapshot(ISnapshotReadyCallback callback, IObjectWrapper bitmap); + + void setPadding(int left, int top, int right, int bottom); + + boolean isBuildingsEnabled(); + void setBuildingsEnabled(boolean buildings); + + void setOnMapLoadedCallback(IOnMapLoadedCallback callback); +} diff --git a/src/com/google/android/gms/maps/internal/IInfoWindowAdapter.aidl b/src/com/google/android/gms/maps/internal/IInfoWindowAdapter.aidl new file mode 100644 index 00000000..d11d71d4 --- /dev/null +++ b/src/com/google/android/gms/maps/internal/IInfoWindowAdapter.aidl @@ -0,0 +1,9 @@ +package com.google.android.gms.maps.internal; + +import com.google.android.gms.dynamic.IObjectWrapper; +import com.google.android.gms.maps.model.internal.IMarkerDelegate; + +interface IInfoWindowAdapter { + IObjectWrapper getInfoWindow(IMarkerDelegate marker); + IObjectWrapper getInfoContents(IMarkerDelegate marker); +} diff --git a/src/com/google/android/gms/maps/internal/ILocationSourceDelegate.aidl b/src/com/google/android/gms/maps/internal/ILocationSourceDelegate.aidl new file mode 100644 index 00000000..203ec69f --- /dev/null +++ b/src/com/google/android/gms/maps/internal/ILocationSourceDelegate.aidl @@ -0,0 +1,4 @@ +package com.google.android.gms.maps.internal; + +interface ILocationSourceDelegate { +} diff --git a/src/com/google/android/gms/maps/internal/IMapFragmentDelegate.aidl b/src/com/google/android/gms/maps/internal/IMapFragmentDelegate.aidl new file mode 100644 index 00000000..966c4e4b --- /dev/null +++ b/src/com/google/android/gms/maps/internal/IMapFragmentDelegate.aidl @@ -0,0 +1,19 @@ +package com.google.android.gms.maps.internal; + +import com.google.android.gms.maps.internal.IGoogleMapDelegate; +import com.google.android.gms.maps.GoogleMapOptions; +import com.google.android.gms.dynamic.IObjectWrapper; + +interface IMapFragmentDelegate { + IGoogleMapDelegate getMap(); + void onInflate(IObjectWrapper activity, in GoogleMapOptions options, in Bundle savedInstanceState); + void onCreate(in Bundle savedInstanceState); + IObjectWrapper onCreateView(IObjectWrapper layoutInflate, IObjectWrapper container, in Bundle savedInstanceState); + void onResume(); + void onPause(); + void onDestroyView(); + void onDestroy(); + void onLowMemory(); + void onSaveInstanceState(inout Bundle outState); + boolean isReady(); +} diff --git a/src/com/google/android/gms/maps/internal/IMapViewDelegate.aidl b/src/com/google/android/gms/maps/internal/IMapViewDelegate.aidl new file mode 100644 index 00000000..820e27b4 --- /dev/null +++ b/src/com/google/android/gms/maps/internal/IMapViewDelegate.aidl @@ -0,0 +1,15 @@ +package com.google.android.gms.maps.internal; + +import com.google.android.gms.maps.internal.IGoogleMapDelegate; +import com.google.android.gms.dynamic.IObjectWrapper; + +interface IMapViewDelegate { + IGoogleMapDelegate getMap(); + void onCreate(in Bundle savedInstanceState); + void onResume(); + void onPause(); + void onDestroy(); + void onLowMemory(); + void onSaveInstanceState(inout Bundle outState); + IObjectWrapper getView(); +} diff --git a/src/com/google/android/gms/maps/internal/IOnCameraChangeListener.aidl b/src/com/google/android/gms/maps/internal/IOnCameraChangeListener.aidl new file mode 100644 index 00000000..41010aa0 --- /dev/null +++ b/src/com/google/android/gms/maps/internal/IOnCameraChangeListener.aidl @@ -0,0 +1,4 @@ +package com.google.android.gms.maps.internal; + +interface IOnCameraChangeListener { +} diff --git a/src/com/google/android/gms/maps/internal/IOnInfoWindowClickListener.aidl b/src/com/google/android/gms/maps/internal/IOnInfoWindowClickListener.aidl new file mode 100644 index 00000000..7c396ce7 --- /dev/null +++ b/src/com/google/android/gms/maps/internal/IOnInfoWindowClickListener.aidl @@ -0,0 +1,7 @@ +package com.google.android.gms.maps.internal; + +import com.google.android.gms.maps.model.internal.IMarkerDelegate; + +interface IOnInfoWindowClickListener { + void onInfoWindowClick(IMarkerDelegate marker); +} diff --git a/src/com/google/android/gms/maps/internal/IOnMapClickListener.aidl b/src/com/google/android/gms/maps/internal/IOnMapClickListener.aidl new file mode 100644 index 00000000..6b3b2ec8 --- /dev/null +++ b/src/com/google/android/gms/maps/internal/IOnMapClickListener.aidl @@ -0,0 +1,7 @@ +package com.google.android.gms.maps.internal; + +import com.google.android.gms.maps.model.LatLng; + +interface IOnMapClickListener { + void onMapClick(in LatLng latLng); +} diff --git a/src/com/google/android/gms/maps/internal/IOnMapLoadedCallback.aidl b/src/com/google/android/gms/maps/internal/IOnMapLoadedCallback.aidl new file mode 100644 index 00000000..969d9652 --- /dev/null +++ b/src/com/google/android/gms/maps/internal/IOnMapLoadedCallback.aidl @@ -0,0 +1,4 @@ +package com.google.android.gms.maps.internal; + +interface IOnMapLoadedCallback { +} diff --git a/src/com/google/android/gms/maps/internal/IOnMapLongClickListener.aidl b/src/com/google/android/gms/maps/internal/IOnMapLongClickListener.aidl new file mode 100644 index 00000000..11201b2c --- /dev/null +++ b/src/com/google/android/gms/maps/internal/IOnMapLongClickListener.aidl @@ -0,0 +1,7 @@ +package com.google.android.gms.maps.internal; + +import com.google.android.gms.maps.model.LatLng; + +interface IOnMapLongClickListener { + void onMapLongClick(in LatLng latLng); +} diff --git a/src/com/google/android/gms/maps/internal/IOnMarkerClickListener.aidl b/src/com/google/android/gms/maps/internal/IOnMarkerClickListener.aidl new file mode 100644 index 00000000..94c4465d --- /dev/null +++ b/src/com/google/android/gms/maps/internal/IOnMarkerClickListener.aidl @@ -0,0 +1,7 @@ +package com.google.android.gms.maps.internal; + +import com.google.android.gms.maps.model.internal.IMarkerDelegate; + +interface IOnMarkerClickListener { + boolean onMarkerClick(IMarkerDelegate marker); +} diff --git a/src/com/google/android/gms/maps/internal/IOnMarkerDragListener.aidl b/src/com/google/android/gms/maps/internal/IOnMarkerDragListener.aidl new file mode 100644 index 00000000..42cec6ca --- /dev/null +++ b/src/com/google/android/gms/maps/internal/IOnMarkerDragListener.aidl @@ -0,0 +1,4 @@ +package com.google.android.gms.maps.internal; + +interface IOnMarkerDragListener { +} diff --git a/src/com/google/android/gms/maps/internal/IOnMyLocationButtonClickListener.aidl b/src/com/google/android/gms/maps/internal/IOnMyLocationButtonClickListener.aidl new file mode 100644 index 00000000..b10880dd --- /dev/null +++ b/src/com/google/android/gms/maps/internal/IOnMyLocationButtonClickListener.aidl @@ -0,0 +1,4 @@ +package com.google.android.gms.maps.internal; + +interface IOnMyLocationButtonClickListener { +} diff --git a/src/com/google/android/gms/maps/internal/IOnMyLocationChangeListener.aidl b/src/com/google/android/gms/maps/internal/IOnMyLocationChangeListener.aidl new file mode 100644 index 00000000..db71cd63 --- /dev/null +++ b/src/com/google/android/gms/maps/internal/IOnMyLocationChangeListener.aidl @@ -0,0 +1,4 @@ +package com.google.android.gms.maps.internal; + +interface IOnMyLocationChangeListener { +} diff --git a/src/com/google/android/gms/maps/internal/IProjectionDelegate.aidl b/src/com/google/android/gms/maps/internal/IProjectionDelegate.aidl new file mode 100644 index 00000000..9b2da90b --- /dev/null +++ b/src/com/google/android/gms/maps/internal/IProjectionDelegate.aidl @@ -0,0 +1,11 @@ +package com.google.android.gms.maps.internal; + +import com.google.android.gms.dynamic.IObjectWrapper; +import com.google.android.gms.maps.model.LatLng; +import com.google.android.gms.maps.model.VisibleRegion; + +interface IProjectionDelegate { + LatLng fromScreenLocation(IObjectWrapper obj); + IObjectWrapper toScreenLocation(in LatLng latLng); + VisibleRegion getVisibleRegion(); +} diff --git a/src/com/google/android/gms/maps/internal/ISnapshotReadyCallback.aidl b/src/com/google/android/gms/maps/internal/ISnapshotReadyCallback.aidl new file mode 100644 index 00000000..48a39219 --- /dev/null +++ b/src/com/google/android/gms/maps/internal/ISnapshotReadyCallback.aidl @@ -0,0 +1,4 @@ +package com.google.android.gms.maps.internal; + +interface ISnapshotReadyCallback { +} diff --git a/src/com/google/android/gms/maps/internal/IUiSettingsDelegate.aidl b/src/com/google/android/gms/maps/internal/IUiSettingsDelegate.aidl new file mode 100644 index 00000000..ca5e0d08 --- /dev/null +++ b/src/com/google/android/gms/maps/internal/IUiSettingsDelegate.aidl @@ -0,0 +1,19 @@ +package com.google.android.gms.maps.internal; + +interface IUiSettingsDelegate { + void setZoomControlsEnabled(boolean zoom); + void setCompassEnabled(boolean compass); + void setMyLocationButtonEnabled(boolean locationButton); + void setScrollGesturesEnabled(boolean scrollGestures); + void setZoomGesturesEnabled(boolean zoomGestures); + void setTiltGesturesEnabled(boolean tiltGestures); + void setRotateGesturesEnabled(boolean rotateGestures); + void setAllGesturesEnabled(boolean gestures); + boolean isZoomControlsEnabled(); + boolean isCompassEnabled(); + boolean isMyLocationButtonEnabled(); + boolean isScrollGesturesEnabled(); + boolean isZoomGesturesEnabled(); + boolean isTiltGesturesEnabled(); + boolean isRotateGesturesEnabled(); +} diff --git a/src/com/google/android/gms/maps/model/CameraPosition.aidl b/src/com/google/android/gms/maps/model/CameraPosition.aidl new file mode 100644 index 00000000..bb5ab701 --- /dev/null +++ b/src/com/google/android/gms/maps/model/CameraPosition.aidl @@ -0,0 +1,3 @@ +package com.google.android.gms.maps.model; + +parcelable CameraPosition; diff --git a/src/com/google/android/gms/maps/model/CameraPosition.java b/src/com/google/android/gms/maps/model/CameraPosition.java new file mode 100644 index 00000000..109dfddb --- /dev/null +++ b/src/com/google/android/gms/maps/model/CameraPosition.java @@ -0,0 +1,91 @@ +/* + * Copyright (c) 2014 μg 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. + */ + +package com.google.android.gms.maps.model; + +import android.os.Parcel; +import org.microg.safeparcel.SafeParcelUtil; +import org.microg.safeparcel.SafeParcelable; +import org.microg.safeparcel.SafeParceled; + +import java.util.Arrays; + +public class CameraPosition implements SafeParcelable { + @SafeParceled(1) + private int versionCode; + @SafeParceled(2) + public LatLng target; + @SafeParceled(3) + public float zoom; + @SafeParceled(4) + public float tilt; + @SafeParceled(5) + public float bearing; + + private CameraPosition(Parcel in) { + SafeParcelUtil.readObject(this, in); + } + + public CameraPosition(int versionCode, LatLng target, float zoom, float tilt, float bearing) { + this.versionCode = versionCode; + if (target == null) { + throw new NullPointerException("null camera target"); + } + this.target = target; + this.zoom = zoom; + if (tilt < 0 || 90 < tilt) { + throw new IllegalArgumentException("Tilt needs to be between 0 and 90 inclusive"); + } + this.tilt = tilt; + if (bearing <= 0) { + bearing += 360; + } + this.bearing = bearing % 360; + } + + public CameraPosition(LatLng target, float zoom, float tilt, float bearing) { + this(1, target, zoom, tilt, bearing); + } + + public static CameraPosition create(LatLng latLng) { + return new CameraPosition(latLng, 0, 0, 0); + } + + @Override + public int hashCode() { + return Arrays.hashCode(new Object[] { target, zoom, tilt, bearing }); + } + + @Override + public int describeContents() { + return 0; + } + + @Override + public void writeToParcel(Parcel dest, int flags) { + SafeParcelUtil.writeObject(this, dest, flags); + } + + public static Creator CREATOR = new Creator() { + public CameraPosition createFromParcel(Parcel source) { + return new CameraPosition(source); + } + + public CameraPosition[] newArray(int size) { + return new CameraPosition[size]; + } + }; +} diff --git a/src/com/google/android/gms/maps/model/CircleOptions.aidl b/src/com/google/android/gms/maps/model/CircleOptions.aidl new file mode 100644 index 00000000..33ae4542 --- /dev/null +++ b/src/com/google/android/gms/maps/model/CircleOptions.aidl @@ -0,0 +1,3 @@ +package com.google.android.gms.maps.model; + +parcelable CircleOptions; diff --git a/src/com/google/android/gms/maps/model/CircleOptions.java b/src/com/google/android/gms/maps/model/CircleOptions.java new file mode 100644 index 00000000..1b6d982d --- /dev/null +++ b/src/com/google/android/gms/maps/model/CircleOptions.java @@ -0,0 +1,67 @@ +/* + * Copyright (c) 2014 μg 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. + */ + +package com.google.android.gms.maps.model; + +import android.os.Parcel; +import org.microg.safeparcel.SafeParcelUtil; +import org.microg.safeparcel.SafeParcelable; +import org.microg.safeparcel.SafeParceled; + +public class CircleOptions implements SafeParcelable { + public static Creator CREATOR = new Creator() { + public CircleOptions createFromParcel(Parcel source) { + return new CircleOptions(source); + } + + public CircleOptions[] newArray(int size) { + return new CircleOptions[size]; + } + }; + @SafeParceled(1) + private int versionCode; + @SafeParceled(2) + private LatLng center; + @SafeParceled(3) + private double radius; + @SafeParceled(4) + private float strokeWidth; + @SafeParceled(5) + private int strokeColor; + @SafeParceled(6) + private int fillColor; + @SafeParceled(7) + private float zIndex; + @SafeParceled(8) + private boolean visisble; + + public CircleOptions() { + } + + private CircleOptions(Parcel in) { + SafeParcelUtil.readObject(this, in); + } + + @Override + public int describeContents() { + return 0; + } + + @Override + public void writeToParcel(Parcel dest, int flags) { + SafeParcelUtil.writeObject(this, dest, flags); + } +} diff --git a/src/com/google/android/gms/maps/model/GroundOverlayOptions.aidl b/src/com/google/android/gms/maps/model/GroundOverlayOptions.aidl new file mode 100644 index 00000000..5bdbefaf --- /dev/null +++ b/src/com/google/android/gms/maps/model/GroundOverlayOptions.aidl @@ -0,0 +1,3 @@ +package com.google.android.gms.maps.model; + +parcelable GroundOverlayOptions; diff --git a/src/com/google/android/gms/maps/model/GroundOverlayOptions.java b/src/com/google/android/gms/maps/model/GroundOverlayOptions.java new file mode 100644 index 00000000..dd758cfe --- /dev/null +++ b/src/com/google/android/gms/maps/model/GroundOverlayOptions.java @@ -0,0 +1,79 @@ +/* + * Copyright (c) 2014 μg 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. + */ + +package com.google.android.gms.maps.model; + +import android.os.IBinder; +import android.os.Parcel; +import org.microg.safeparcel.SafeParcelUtil; +import org.microg.safeparcel.SafeParcelable; +import org.microg.safeparcel.SafeParceled; + +public class GroundOverlayOptions implements SafeParcelable { + @SafeParceled(1) + private int versionCode; + @SafeParceled(2) + private IBinder wrappedImage; + @SafeParceled(3) + private LatLng location; + @SafeParceled(4) + private float width; + @SafeParceled(5) + private float height; + @SafeParceled(6) + private LatLngBounds bounds; + @SafeParceled(7) + private float bearing; + @SafeParceled(8) + private float zIndex; + @SafeParceled(9) + private boolean visible; + @SafeParceled(10) + private float transparency; + @SafeParceled(11) + private float anchorU; + @SafeParceled(12) + private float anchorV; + + public GroundOverlayOptions() { + } + + private GroundOverlayOptions(Parcel in) { + SafeParcelUtil.readObject(this, in); + // wrappedImage = new BitmapDescriptor(IObjectWrapper.Stub.asInterface(SafeReader.readBinder(in, position))); + } + + @Override + public int describeContents() { + return 0; + } + + @Override + public void writeToParcel(Parcel dest, int flags) { + SafeParcelUtil.writeObject(this, dest, flags); + // SafeParcelWriter.write(dest, 2, wrappedImage.getRemoteObject().asBinder(), false); + } + + public static Creator CREATOR = new Creator() { + public GroundOverlayOptions createFromParcel(Parcel source) { + return new GroundOverlayOptions(source); + } + + public GroundOverlayOptions[] newArray(int size) { + return new GroundOverlayOptions[size]; + } + }; +} diff --git a/src/com/google/android/gms/maps/model/LatLng.aidl b/src/com/google/android/gms/maps/model/LatLng.aidl new file mode 100644 index 00000000..42df9312 --- /dev/null +++ b/src/com/google/android/gms/maps/model/LatLng.aidl @@ -0,0 +1,3 @@ +package com.google.android.gms.maps.model; + +parcelable LatLng; diff --git a/src/com/google/android/gms/maps/model/LatLng.java b/src/com/google/android/gms/maps/model/LatLng.java new file mode 100644 index 00000000..1d4d1ddd --- /dev/null +++ b/src/com/google/android/gms/maps/model/LatLng.java @@ -0,0 +1,81 @@ +/* + * Copyright (c) 2014 μg 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. + */ + +package com.google.android.gms.maps.model; + +import android.os.Parcel; +import org.microg.safeparcel.SafeParcelUtil; +import org.microg.safeparcel.SafeParcelable; +import org.microg.safeparcel.SafeParceled; + +public class LatLng implements SafeParcelable { + public static Creator CREATOR = new Creator() { + public LatLng createFromParcel(Parcel source) { + return new LatLng(source); + } + + public LatLng[] newArray(int size) { + return new LatLng[size]; + } + }; + @SafeParceled(2) + public double latitude; + @SafeParceled(3) + public double longitude; + @SafeParceled(1) + private int versionCode; + + public LatLng(int versionCode, double latitude, double longitude) { + this.versionCode = versionCode; + this.latitude = Math.max(-90, Math.min(90, latitude)); + if ((-180 <= longitude) && (longitude < 180)) { + this.longitude = longitude; + } else { + this.longitude = ((360 + (longitude - 180) % 360) % 360 - 180); + } + } + + private LatLng(Parcel in) { + SafeParcelUtil.readObject(this, in); + } + + public LatLng(double latitude, double longitude) { + this(1, latitude, longitude); + } + + @Override + public final int hashCode() { + long lat = Double.doubleToLongBits(latitude); + int tmp = 31 + (int) (lat ^ lat >>> 32); + long lon = Double.doubleToLongBits(longitude); + return tmp * 31 + (int) (lon ^ lon >>> 32); + } + + @Override + public String toString() { + return "lat/lng: (" + latitude + "," + longitude + ")"; + } + + @Override + public int describeContents() { + return 0; + } + + @Override + public void writeToParcel(Parcel dest, int flags) { + SafeParcelUtil.writeObject(this, dest, flags); + } +} diff --git a/src/com/google/android/gms/maps/model/LatLngBounds.aidl b/src/com/google/android/gms/maps/model/LatLngBounds.aidl new file mode 100644 index 00000000..70538794 --- /dev/null +++ b/src/com/google/android/gms/maps/model/LatLngBounds.aidl @@ -0,0 +1,3 @@ +package com.google.android.gms.maps.model; + +parcelable LatLngBounds; \ No newline at end of file diff --git a/src/com/google/android/gms/maps/model/LatLngBounds.java b/src/com/google/android/gms/maps/model/LatLngBounds.java new file mode 100644 index 00000000..42da1d3f --- /dev/null +++ b/src/com/google/android/gms/maps/model/LatLngBounds.java @@ -0,0 +1,64 @@ +/* + * Copyright (c) 2014 μg 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. + */ + +package com.google.android.gms.maps.model; + +import android.os.Parcel; +import org.microg.safeparcel.SafeParcelUtil; +import org.microg.safeparcel.SafeParcelable; +import org.microg.safeparcel.SafeParceled; + +public class LatLngBounds implements SafeParcelable { + public static Creator CREATOR = new Creator() { + public LatLngBounds createFromParcel(Parcel source) { + return new LatLngBounds(source); + } + + public LatLngBounds[] newArray(int size) { + return new LatLngBounds[size]; + } + }; + @SafeParceled(1) + private int versionCode; + @SafeParceled(2) + public LatLng southWest; + @SafeParceled(3) + public LatLng northEast; + + public LatLngBounds(int versionCode, LatLng southWest, LatLng northEast) { + this.versionCode = versionCode; + this.southWest = southWest; + this.northEast = northEast; + } + + public LatLngBounds(LatLng southWest, LatLng northEast) { + this(1, southWest, northEast); + } + + private LatLngBounds(Parcel in) { + SafeParcelUtil.readObject(this, in); + } + + @Override + public int describeContents() { + return 0; + } + + @Override + public void writeToParcel(Parcel dest, int flags) { + SafeParcelUtil.writeObject(this, dest, flags); + } +} diff --git a/src/com/google/android/gms/maps/model/MarkerOptions.aidl b/src/com/google/android/gms/maps/model/MarkerOptions.aidl new file mode 100644 index 00000000..dc4abbcf --- /dev/null +++ b/src/com/google/android/gms/maps/model/MarkerOptions.aidl @@ -0,0 +1,3 @@ +package com.google.android.gms.maps.model; + +parcelable MarkerOptions; diff --git a/src/com/google/android/gms/maps/model/MarkerOptions.java b/src/com/google/android/gms/maps/model/MarkerOptions.java new file mode 100644 index 00000000..4162f0c0 --- /dev/null +++ b/src/com/google/android/gms/maps/model/MarkerOptions.java @@ -0,0 +1,134 @@ +/* + * Copyright (c) 2014 μg 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. + */ + +package com.google.android.gms.maps.model; + +import android.os.IBinder; +import android.os.Parcel; +import org.microg.safeparcel.SafeParcelUtil; +import org.microg.safeparcel.SafeParcelable; +import org.microg.safeparcel.SafeParceled; + +public class MarkerOptions implements SafeParcelable { + + @SafeParceled(1) + private int versionCode = 1; + @SafeParceled(2) + private LatLng position; + @SafeParceled(3) + private String title; + @SafeParceled(4) + private String snippet; + @SafeParceled(5) + private IBinder icon; + @SafeParceled(6) + private float anchorU = 0.5F; + @SafeParceled(7) + private float anchorV = 1F; + @SafeParceled(8) + private boolean draggable; + @SafeParceled(9) + private boolean visible; + @SafeParceled(10) + private boolean flat; + @SafeParceled(11) + private float rotation = 0F; + @SafeParceled(12) + private float infoWindowAnchorU = 0F; + @SafeParceled(13) + private float infoWindowAnchorV = 1F; + @SafeParceled(14) + private float alpha = 1F; + + @Override + public int describeContents() { + return 0; + } + + @Override + public void writeToParcel(Parcel dest, int flags) { + } + + public MarkerOptions() { + } + + private MarkerOptions(Parcel in) { + SafeParcelUtil.readObject(this, in); + // this.icon = icon == null ? null : new BitmapDescriptor(ObjectWrapper.asInterface(icon)); + } + + public LatLng getPosition() { + return position; + } + + public String getTitle() { + return title; + } + + public String getSnippet() { + return snippet; + } + + public IBinder getIcon() { + return icon; + } + + public float getAnchorU() { + return anchorU; + } + + public float getAnchorV() { + return anchorV; + } + + public boolean isDraggable() { + return draggable; + } + + public boolean isVisible() { + return visible; + } + + public boolean isFlat() { + return flat; + } + + public float getRotation() { + return rotation; + } + + public float getInfoWindowAnchorU() { + return infoWindowAnchorU; + } + + public float getInfoWindowAnchorV() { + return infoWindowAnchorV; + } + + public float getAlpha() { + return alpha; + } + + public static Creator CREATOR = new Creator() { + public MarkerOptions createFromParcel(Parcel source) { + return new MarkerOptions(source); + } + + public MarkerOptions[] newArray(int size) { + return new MarkerOptions[size]; + } + }; +} diff --git a/src/com/google/android/gms/maps/model/PolygonOptions.aidl b/src/com/google/android/gms/maps/model/PolygonOptions.aidl new file mode 100644 index 00000000..adac82a0 --- /dev/null +++ b/src/com/google/android/gms/maps/model/PolygonOptions.aidl @@ -0,0 +1,3 @@ +package com.google.android.gms.maps.model; + +parcelable PolygonOptions; diff --git a/src/com/google/android/gms/maps/model/PolygonOptions.java b/src/com/google/android/gms/maps/model/PolygonOptions.java new file mode 100644 index 00000000..aaefc97c --- /dev/null +++ b/src/com/google/android/gms/maps/model/PolygonOptions.java @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2014 μg 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. + */ + +package com.google.android.gms.maps.model; + +import android.os.Parcel; +import org.microg.safeparcel.SafeParcelUtil; +import org.microg.safeparcel.SafeParcelable; + +public class PolygonOptions implements SafeParcelable { + @Override + public int describeContents() { + return 0; + } + + @Override + public void writeToParcel(Parcel dest, int flags) { + SafeParcelUtil.writeObject(this, dest, flags); + } + + public PolygonOptions() { + } + + private PolygonOptions(Parcel in) { + SafeParcelUtil.readObject(this, in); + } + + public static Creator CREATOR = new Creator() { + public PolygonOptions createFromParcel(Parcel source) { + return new PolygonOptions(source); + } + + public PolygonOptions[] newArray(int size) { + return new PolygonOptions[size]; + } + }; +} diff --git a/src/com/google/android/gms/maps/model/PolylineOptions.aidl b/src/com/google/android/gms/maps/model/PolylineOptions.aidl new file mode 100644 index 00000000..7c165891 --- /dev/null +++ b/src/com/google/android/gms/maps/model/PolylineOptions.aidl @@ -0,0 +1,3 @@ +package com.google.android.gms.maps.model; + +parcelable PolylineOptions; diff --git a/src/com/google/android/gms/maps/model/PolylineOptions.java b/src/com/google/android/gms/maps/model/PolylineOptions.java new file mode 100644 index 00000000..6cc21ac2 --- /dev/null +++ b/src/com/google/android/gms/maps/model/PolylineOptions.java @@ -0,0 +1,66 @@ +/* + * Copyright (c) 2014 μg 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. + */ + +package com.google.android.gms.maps.model; + +import android.os.Parcel; +import android.os.Parcelable; +import org.microg.safeparcel.SafeParcelUtil; +import org.microg.safeparcel.SafeParcelable; +import org.microg.safeparcel.SafeParceled; + +import java.util.ArrayList; +import java.util.List; + +public class PolylineOptions implements SafeParcelable { + @SafeParceled(1) + private int versionCode; + // TODO + private List points; + private float width; + private int color; + private float zIndex; + private boolean visible; + private boolean geodesic; + + + public PolylineOptions() { + } + + private PolylineOptions(Parcel in) { + SafeParcelUtil.readObject(this, in); + } + + @Override + public int describeContents() { + return 0; + } + + @Override + public void writeToParcel(Parcel dest, int flags) { + SafeParcelUtil.writeObject(this, dest, flags); + } + + public static Creator CREATOR = new Creator() { + public PolylineOptions createFromParcel(Parcel source) { + return new PolylineOptions(source); + } + + public PolylineOptions[] newArray(int size) { + return new PolylineOptions[size]; + } + }; +} diff --git a/src/com/google/android/gms/maps/model/TileOverlayOptions.aidl b/src/com/google/android/gms/maps/model/TileOverlayOptions.aidl new file mode 100644 index 00000000..85f5ac32 --- /dev/null +++ b/src/com/google/android/gms/maps/model/TileOverlayOptions.aidl @@ -0,0 +1,3 @@ +package com.google.android.gms.maps.model; + +parcelable TileOverlayOptions; diff --git a/src/com/google/android/gms/maps/model/TileOverlayOptions.java b/src/com/google/android/gms/maps/model/TileOverlayOptions.java new file mode 100644 index 00000000..0256adfc --- /dev/null +++ b/src/com/google/android/gms/maps/model/TileOverlayOptions.java @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2014 μg 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. + */ + +package com.google.android.gms.maps.model; + +import android.os.Parcel; +import org.microg.safeparcel.SafeParcelUtil; +import org.microg.safeparcel.SafeParcelable; + +public class TileOverlayOptions implements SafeParcelable { + + @Override + public int describeContents() { + return 0; + } + + @Override + public void writeToParcel(Parcel dest, int flags) { + SafeParcelUtil.writeObject(this, dest, flags); + } + + public TileOverlayOptions() { + } + + private TileOverlayOptions(Parcel in) { + SafeParcelUtil.readObject(this, in); + } + + public static Creator CREATOR = new Creator() { + public TileOverlayOptions createFromParcel(Parcel source) { + return new TileOverlayOptions(source); + } + + public TileOverlayOptions[] newArray(int size) { + return new TileOverlayOptions[size]; + } + }; +} diff --git a/src/com/google/android/gms/maps/model/VisibleRegion.aidl b/src/com/google/android/gms/maps/model/VisibleRegion.aidl new file mode 100644 index 00000000..09d22101 --- /dev/null +++ b/src/com/google/android/gms/maps/model/VisibleRegion.aidl @@ -0,0 +1,3 @@ +package com.google.android.gms.maps.model; + +parcelable VisibleRegion; diff --git a/src/com/google/android/gms/maps/model/VisibleRegion.java b/src/com/google/android/gms/maps/model/VisibleRegion.java new file mode 100644 index 00000000..21f9cd13 --- /dev/null +++ b/src/com/google/android/gms/maps/model/VisibleRegion.java @@ -0,0 +1,76 @@ +/* + * Copyright (c) 2014 μg 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. + */ + +package com.google.android.gms.maps.model; + +import android.os.Parcel; +import org.microg.safeparcel.SafeParcelUtil; +import org.microg.safeparcel.SafeParcelable; +import org.microg.safeparcel.SafeParceled; + +public class VisibleRegion implements SafeParcelable { + @SafeParceled(1) + private int versionCode; + @SafeParceled(2) + private LatLng nearLeft; + @SafeParceled(3) + private LatLng nearRight; + @SafeParceled(4) + private LatLng farLeft; + @SafeParceled(5) + private LatLng farRight; + @SafeParceled(6) + private LatLngBounds bounds; + + public VisibleRegion(int versionCode, LatLng nearLeft, LatLng nearRight, LatLng farLeft, + LatLng farRight, LatLngBounds bounds) { + this.versionCode = versionCode; + this.nearLeft = nearLeft; + this.nearRight = nearRight; + this.farLeft = farLeft; + this.farRight = farRight; + this.bounds = bounds; + } + + public VisibleRegion(LatLng nearLeft, LatLng nearRight, LatLng farLeft, LatLng farRight, + LatLngBounds bounds) { + this(1, nearLeft, nearRight, farLeft, farRight, bounds); + } + + public VisibleRegion(Parcel in) { + SafeParcelUtil.readObject(this, in); + } + + @Override + public int describeContents() { + return 0; + } + + @Override + public void writeToParcel(Parcel dest, int flags) { + SafeParcelUtil.writeObject(this, dest, flags); + } + + public static Creator CREATOR = new Creator() { + public VisibleRegion createFromParcel(Parcel source) { + return new VisibleRegion(source); + } + + public VisibleRegion[] newArray(int size) { + return new VisibleRegion[size]; + } + }; +} diff --git a/src/com/google/android/gms/maps/model/internal/IBitmapDescriptorFactoryDelegate.aidl b/src/com/google/android/gms/maps/model/internal/IBitmapDescriptorFactoryDelegate.aidl new file mode 100644 index 00000000..dca49b60 --- /dev/null +++ b/src/com/google/android/gms/maps/model/internal/IBitmapDescriptorFactoryDelegate.aidl @@ -0,0 +1,14 @@ +package com.google.android.gms.maps.model.internal; + +import android.graphics.Bitmap; +import com.google.android.gms.dynamic.IObjectWrapper; + +interface IBitmapDescriptorFactoryDelegate { + IObjectWrapper fromResource(int resourceId); + IObjectWrapper fromAsset(String assetName); + IObjectWrapper fromFile(String fileName); + IObjectWrapper defaultMarker(); + IObjectWrapper defaultMarkerWithHue(float hue); + IObjectWrapper fromBitmap(in Bitmap bitmap); + IObjectWrapper fromPath(String absolutePath); +} diff --git a/src/com/google/android/gms/maps/model/internal/ICircleDelegate.aidl b/src/com/google/android/gms/maps/model/internal/ICircleDelegate.aidl new file mode 100644 index 00000000..719d8eab --- /dev/null +++ b/src/com/google/android/gms/maps/model/internal/ICircleDelegate.aidl @@ -0,0 +1,24 @@ +package com.google.android.gms.maps.model.internal; + +import com.google.android.gms.maps.model.LatLng; + +interface ICircleDelegate { + void remove(); + String getId(); + void setCenter(in LatLng center); + LatLng getCenter(); + void setRadius(double radius); + double getRadius(); + void setStrokeWidth(float width); + float getStrokeWidth(); + void setStrokeColor(int color); + int getStrokeColor(); + void setFillColor(int color); + int getFillColor(); + void setZIndex(float zIndex); + float getZIndex(); + void setVisible(boolean visible); + boolean isVisible(); + boolean equalsRemote(ICircleDelegate other); + int hashCodeRemote(); +} diff --git a/src/com/google/android/gms/maps/model/internal/IGroundOverlayDelegate.aidl b/src/com/google/android/gms/maps/model/internal/IGroundOverlayDelegate.aidl new file mode 100644 index 00000000..0a1a0632 --- /dev/null +++ b/src/com/google/android/gms/maps/model/internal/IGroundOverlayDelegate.aidl @@ -0,0 +1,29 @@ +package com.google.android.gms.maps.model.internal; + +import com.google.android.gms.dynamic.IObjectWrapper; +import com.google.android.gms.maps.model.LatLng; +import com.google.android.gms.maps.model.LatLngBounds; + +interface IGroundOverlayDelegate { + void remove(); + String getId(); + void setPosition(in LatLng pos); + LatLng getPosition(); + void setDimension(float dimension); + void setDimensions(float width, float height); + float getWidth(); + float getHeight(); + void setPositionFromBounds(in LatLngBounds bounds); + LatLngBounds getBounds(); + void setBearing(float bearing); + float getBearing(); + void setZIndex(float zIndex); + float getZIndex(); + void setVisible(boolean visible); + boolean isVisible(); + void setTransparency(float transparency); + float getTransparency(); + boolean equalsRemote(IGroundOverlayDelegate other); + int hashCodeRemote(); + void todo(IObjectWrapper obj); +} diff --git a/src/com/google/android/gms/maps/model/internal/IMarkerDelegate.aidl b/src/com/google/android/gms/maps/model/internal/IMarkerDelegate.aidl new file mode 100644 index 00000000..d4eccf6d --- /dev/null +++ b/src/com/google/android/gms/maps/model/internal/IMarkerDelegate.aidl @@ -0,0 +1,33 @@ +package com.google.android.gms.maps.model.internal; + +import com.google.android.gms.dynamic.IObjectWrapper; +import com.google.android.gms.maps.model.LatLng; + +interface IMarkerDelegate { + void remove(); + String getId(); + void setPosition(in LatLng pos); + LatLng getPosition(); + void setTitle(String title); + String getTitle(); + void setSnippet(String snippet); + String getSnippet(); + void setDraggable(boolean drag); + boolean isDraggable(); + void showInfoWindow(); + void hideInfoWindow(); + boolean isInfoWindowShown(); + void setVisible(boolean visible); + boolean isVisible(); + boolean equalsRemote(IMarkerDelegate other); + int hashCodeRemote(); + void setIcon(IObjectWrapper obj); + void setAnchor(float x, float y); + void setFlat(boolean flat); + boolean isFlat(); + void setRotation(float rotation); + float getRotation(); + void setInfoWindowAnchor(float x, float y); + void setAlpha(float alpha); + float getAlpha(); +} diff --git a/src/com/google/android/gms/maps/model/internal/IPolygonDelegate.aidl b/src/com/google/android/gms/maps/model/internal/IPolygonDelegate.aidl new file mode 100644 index 00000000..67f0517b --- /dev/null +++ b/src/com/google/android/gms/maps/model/internal/IPolygonDelegate.aidl @@ -0,0 +1,27 @@ +package com.google.android.gms.maps.model.internal; + +import com.google.android.gms.maps.model.LatLng; + +interface IPolygonDelegate { + void remove(); + String getId(); + void setPoints(in List points); + List getPoints(); + void setHoles(in List holes); + List getHoles(); + void setStrokeWidth(float width); + float getStrokeWidth(); + void setStrokeColor(int color); + int getStrokeColor(); + void setFillColor(int color); + int getFillColor(); + void setZIndex(float zIndex); + float getZIndex(); + void setVisible(boolean visible); + boolean isVisible(); + void setGeodesic(boolean geod); + boolean isGeodesic(); + boolean equalsRemote(IPolygonDelegate other); + int hashCodeRemote(); + +} diff --git a/src/com/google/android/gms/maps/model/internal/IPolylineDelegate.aidl b/src/com/google/android/gms/maps/model/internal/IPolylineDelegate.aidl new file mode 100644 index 00000000..ebbb336b --- /dev/null +++ b/src/com/google/android/gms/maps/model/internal/IPolylineDelegate.aidl @@ -0,0 +1,22 @@ +package com.google.android.gms.maps.model.internal; + +import com.google.android.gms.maps.model.LatLng; + +interface IPolylineDelegate { + void remove(); + String getId(); + void setPoints(in List points); + List getPoints(); + void setWidth(float width); + float getWidth(); + void setColor(int color); + int getColor(); + void setZIndex(float zIndex); + float getZIndex(); + void setVisible(boolean visible); + boolean isVisible(); + void setGeodesic(boolean geod); + boolean isGeodesic(); + boolean equalsRemote(IPolylineDelegate other); + int hashCodeRemote(); +} diff --git a/src/com/google/android/gms/maps/model/internal/ITileOverlayDelegate.aidl b/src/com/google/android/gms/maps/model/internal/ITileOverlayDelegate.aidl new file mode 100644 index 00000000..417cb024 --- /dev/null +++ b/src/com/google/android/gms/maps/model/internal/ITileOverlayDelegate.aidl @@ -0,0 +1,4 @@ +package com.google.android.gms.maps.model.internal; + +interface ITileOverlayDelegate { +} diff --git a/src/com/google/android/gms/plus/internal/IPlusOneButtonCreator.aidl b/src/com/google/android/gms/plus/internal/IPlusOneButtonCreator.aidl new file mode 100644 index 00000000..7e2121d2 --- /dev/null +++ b/src/com/google/android/gms/plus/internal/IPlusOneButtonCreator.aidl @@ -0,0 +1,8 @@ +package com.google.android.gms.plus.internal; + +import com.google.android.gms.dynamic.IObjectWrapper; + +interface IPlusOneButtonCreator { + IObjectWrapper create(IObjectWrapper context, int size, int annotation, String url, int activityRequestCode); + IObjectWrapper createForAccount(IObjectWrapper context, int size, int annotation, String url, String account); +}