From 012ce9bd3c170757b6382e55707c51cbdec73eff Mon Sep 17 00:00:00 2001 From: mar-v-in Date: Sun, 11 Jan 2015 12:53:42 +0100 Subject: [PATCH] Add Location APIs + empty files --- .../android/gms/auth/AccountChangeEvent.java | 4 + .../firstparty/dataservice/TokenRequest.java | 4 + .../firstparty/dataservice/TokenResponse.java | 4 + .../firstparty/proximity/data/Permit.java | 4 + .../android/gms/common/data/DataHolder.aidl | 3 + .../android/gms/common/data/DataHolder.java | 36 ++ .../metadata/internal/MetadataBundle.java | 4 + .../android/gms/fitness/data/DataPoint.java | 4 + .../android/gms/fitness/data/Device.java | 4 + .../android/gms/fitness/data/Field.java | 4 + .../android/gms/fitness/data/Value.java | 4 + .../identity/accounts/api/AccountData.java | 4 + .../intents/model/CountrySpecification.java | 4 + .../identity/intents/model/UserAddress.java | 4 + .../gms/location/GeofencingRequest.aidl | 3 + .../gms/location/GeofencingRequest.java | 38 ++ .../android/gms/location/LocationRequest.aidl | 3 + .../android/gms/location/LocationRequest.java | 445 ++++++++++++++++++ .../android/gms/location/LocationStatus.aidl | 3 + .../android/gms/location/LocationStatus.java | 103 ++++ .../gms/location/internal/ClientIdentity.java | 4 + .../IGoogleLocationManagerService.aidl | 54 ++- .../location/internal/ILocationListener.aidl | 7 + .../internal/LocationRequestInternal.aidl | 3 + .../internal/LocationRequestInternal.java | 37 ++ .../location/places/AutocompleteFilter.aidl | 3 + .../location/places/AutocompleteFilter.java | 46 ++ .../location/places/NearbyAlertRequest.aidl | 3 + .../location/places/NearbyAlertRequest.java | 36 ++ .../gms/location/places/PlaceFilter.aidl | 3 + .../gms/location/places/PlaceFilter.java | 37 ++ .../gms/location/places/PlaceReport.aidl | 3 + .../gms/location/places/PlaceReport.java | 38 ++ .../gms/location/places/PlaceRequest.aidl | 3 + .../gms/location/places/PlaceRequest.java | 36 ++ .../gms/location/places/UserAddedPlace.aidl | 3 + .../gms/location/places/UserAddedPlace.java | 46 ++ .../gms/location/places/UserDataType.aidl | 3 + .../gms/location/places/UserDataType.java | 36 ++ .../places/internal/IPlacesCallbacks.aidl | 9 + .../places/internal/PlacesParams.aidl | 3 + .../places/internal/PlacesParams.java | 52 ++ .../gms/maps/StreetViewPanoramaOptions.java | 4 + .../android/gms/maps/internal/Point.java | 4 + .../maps/model/StreetViewPanoramaCamera.java | 4 + .../maps/model/StreetViewPanoramaLink.java | 4 + .../model/StreetViewPanoramaLocation.java | 4 + .../model/StreetViewPanoramaOrientation.java | 4 + .../gms/plus/internal/PlusCommonExtras.java | 4 + .../gms/plus/internal/PlusSession.java | 4 + .../model/smart_profile/CardsRequest.java | 4 + .../model/smart_profile/CardsResponse.java | 4 + .../PeopleForProfilesRequest.java | 4 + .../PeopleForProfilesResponse.java | 4 + .../android/gms/plus/model/posts/Comment.java | 4 + .../android/gms/plus/model/posts/Post.java | 4 + .../gms/plus/model/posts/Settings.java | 4 + .../gms/wearable/ConnectionConfiguration.java | 4 + src/org/microg/gms/maps/Constants.java | 9 + 59 files changed, 1219 insertions(+), 1 deletion(-) create mode 100644 src/com/google/android/gms/auth/AccountChangeEvent.java create mode 100644 src/com/google/android/gms/auth/firstparty/dataservice/TokenRequest.java create mode 100644 src/com/google/android/gms/auth/firstparty/dataservice/TokenResponse.java create mode 100644 src/com/google/android/gms/auth/firstparty/proximity/data/Permit.java create mode 100644 src/com/google/android/gms/common/data/DataHolder.aidl create mode 100644 src/com/google/android/gms/common/data/DataHolder.java create mode 100644 src/com/google/android/gms/drive/metadata/internal/MetadataBundle.java create mode 100644 src/com/google/android/gms/fitness/data/DataPoint.java create mode 100644 src/com/google/android/gms/fitness/data/Device.java create mode 100644 src/com/google/android/gms/fitness/data/Field.java create mode 100644 src/com/google/android/gms/fitness/data/Value.java create mode 100644 src/com/google/android/gms/identity/accounts/api/AccountData.java create mode 100644 src/com/google/android/gms/identity/intents/model/CountrySpecification.java create mode 100644 src/com/google/android/gms/identity/intents/model/UserAddress.java create mode 100644 src/com/google/android/gms/location/GeofencingRequest.aidl create mode 100644 src/com/google/android/gms/location/GeofencingRequest.java create mode 100644 src/com/google/android/gms/location/LocationRequest.aidl create mode 100644 src/com/google/android/gms/location/LocationRequest.java create mode 100644 src/com/google/android/gms/location/LocationStatus.aidl create mode 100644 src/com/google/android/gms/location/LocationStatus.java create mode 100644 src/com/google/android/gms/location/internal/ClientIdentity.java create mode 100644 src/com/google/android/gms/location/internal/ILocationListener.aidl create mode 100644 src/com/google/android/gms/location/internal/LocationRequestInternal.aidl create mode 100644 src/com/google/android/gms/location/internal/LocationRequestInternal.java create mode 100644 src/com/google/android/gms/location/places/AutocompleteFilter.aidl create mode 100644 src/com/google/android/gms/location/places/AutocompleteFilter.java create mode 100644 src/com/google/android/gms/location/places/NearbyAlertRequest.aidl create mode 100644 src/com/google/android/gms/location/places/NearbyAlertRequest.java create mode 100644 src/com/google/android/gms/location/places/PlaceFilter.aidl create mode 100644 src/com/google/android/gms/location/places/PlaceFilter.java create mode 100644 src/com/google/android/gms/location/places/PlaceReport.aidl create mode 100644 src/com/google/android/gms/location/places/PlaceReport.java create mode 100644 src/com/google/android/gms/location/places/PlaceRequest.aidl create mode 100644 src/com/google/android/gms/location/places/PlaceRequest.java create mode 100644 src/com/google/android/gms/location/places/UserAddedPlace.aidl create mode 100644 src/com/google/android/gms/location/places/UserAddedPlace.java create mode 100644 src/com/google/android/gms/location/places/UserDataType.aidl create mode 100644 src/com/google/android/gms/location/places/UserDataType.java create mode 100644 src/com/google/android/gms/location/places/internal/IPlacesCallbacks.aidl create mode 100644 src/com/google/android/gms/location/places/internal/PlacesParams.aidl create mode 100644 src/com/google/android/gms/location/places/internal/PlacesParams.java create mode 100644 src/com/google/android/gms/maps/StreetViewPanoramaOptions.java create mode 100644 src/com/google/android/gms/maps/internal/Point.java create mode 100644 src/com/google/android/gms/maps/model/StreetViewPanoramaCamera.java create mode 100644 src/com/google/android/gms/maps/model/StreetViewPanoramaLink.java create mode 100644 src/com/google/android/gms/maps/model/StreetViewPanoramaLocation.java create mode 100644 src/com/google/android/gms/maps/model/StreetViewPanoramaOrientation.java create mode 100644 src/com/google/android/gms/plus/internal/PlusCommonExtras.java create mode 100644 src/com/google/android/gms/plus/internal/PlusSession.java create mode 100644 src/com/google/android/gms/plus/internal/model/smart_profile/CardsRequest.java create mode 100644 src/com/google/android/gms/plus/internal/model/smart_profile/CardsResponse.java create mode 100644 src/com/google/android/gms/plus/internal/model/smart_profile/PeopleForProfilesRequest.java create mode 100644 src/com/google/android/gms/plus/internal/model/smart_profile/PeopleForProfilesResponse.java create mode 100644 src/com/google/android/gms/plus/model/posts/Comment.java create mode 100644 src/com/google/android/gms/plus/model/posts/Post.java create mode 100644 src/com/google/android/gms/plus/model/posts/Settings.java create mode 100644 src/com/google/android/gms/wearable/ConnectionConfiguration.java diff --git a/src/com/google/android/gms/auth/AccountChangeEvent.java b/src/com/google/android/gms/auth/AccountChangeEvent.java new file mode 100644 index 0000000..4f927ab --- /dev/null +++ b/src/com/google/android/gms/auth/AccountChangeEvent.java @@ -0,0 +1,4 @@ +package com.google.android.gms.auth; + +public class AccountChangeEvent { +} diff --git a/src/com/google/android/gms/auth/firstparty/dataservice/TokenRequest.java b/src/com/google/android/gms/auth/firstparty/dataservice/TokenRequest.java new file mode 100644 index 0000000..1388bbd --- /dev/null +++ b/src/com/google/android/gms/auth/firstparty/dataservice/TokenRequest.java @@ -0,0 +1,4 @@ +package com.google.android.gms.auth.firstparty.dataservice; + +public class TokenRequest { +} diff --git a/src/com/google/android/gms/auth/firstparty/dataservice/TokenResponse.java b/src/com/google/android/gms/auth/firstparty/dataservice/TokenResponse.java new file mode 100644 index 0000000..3b1b22a --- /dev/null +++ b/src/com/google/android/gms/auth/firstparty/dataservice/TokenResponse.java @@ -0,0 +1,4 @@ +package com.google.android.gms.auth.firstparty.dataservice; + +public class TokenResponse { +} diff --git a/src/com/google/android/gms/auth/firstparty/proximity/data/Permit.java b/src/com/google/android/gms/auth/firstparty/proximity/data/Permit.java new file mode 100644 index 0000000..fcd07dd --- /dev/null +++ b/src/com/google/android/gms/auth/firstparty/proximity/data/Permit.java @@ -0,0 +1,4 @@ +package com.google.android.gms.auth.firstparty.proximity.data; + +public class Permit { +} diff --git a/src/com/google/android/gms/common/data/DataHolder.aidl b/src/com/google/android/gms/common/data/DataHolder.aidl new file mode 100644 index 0000000..3bbd117 --- /dev/null +++ b/src/com/google/android/gms/common/data/DataHolder.aidl @@ -0,0 +1,3 @@ +package com.google.android.gms.common.data; + +parcelable DataHolder; diff --git a/src/com/google/android/gms/common/data/DataHolder.java b/src/com/google/android/gms/common/data/DataHolder.java new file mode 100644 index 0000000..2cb2885 --- /dev/null +++ b/src/com/google/android/gms/common/data/DataHolder.java @@ -0,0 +1,36 @@ +package com.google.android.gms.common.data; + +import android.os.Parcel; +import org.microg.safeparcel.SafeParcelUtil; +import org.microg.safeparcel.SafeParcelable; + +/** + * TODO: usage + */ +public class DataHolder implements SafeParcelable { + private DataHolder(Parcel in) { + SafeParcelUtil.readObject(this, in); + } + + @Override + public int describeContents() { + return 0; + } + + @Override + public void writeToParcel(Parcel out, int flags) { + SafeParcelUtil.writeObject(this, out, flags); + } + + public static final Creator CREATOR = new Creator() { + @Override + public DataHolder createFromParcel(Parcel parcel) { + return new DataHolder(parcel); + } + + @Override + public DataHolder[] newArray(int i) { + return new DataHolder[i]; + } + }; +} diff --git a/src/com/google/android/gms/drive/metadata/internal/MetadataBundle.java b/src/com/google/android/gms/drive/metadata/internal/MetadataBundle.java new file mode 100644 index 0000000..538defa --- /dev/null +++ b/src/com/google/android/gms/drive/metadata/internal/MetadataBundle.java @@ -0,0 +1,4 @@ +package com.google.android.gms.drive.metadata.internal; + +public class MetadataBundle { +} diff --git a/src/com/google/android/gms/fitness/data/DataPoint.java b/src/com/google/android/gms/fitness/data/DataPoint.java new file mode 100644 index 0000000..e81a017 --- /dev/null +++ b/src/com/google/android/gms/fitness/data/DataPoint.java @@ -0,0 +1,4 @@ +package com.google.android.gms.fitness.data; + +public class DataPoint { +} diff --git a/src/com/google/android/gms/fitness/data/Device.java b/src/com/google/android/gms/fitness/data/Device.java new file mode 100644 index 0000000..173f134 --- /dev/null +++ b/src/com/google/android/gms/fitness/data/Device.java @@ -0,0 +1,4 @@ +package com.google.android.gms.fitness.data; + +public class Device { +} diff --git a/src/com/google/android/gms/fitness/data/Field.java b/src/com/google/android/gms/fitness/data/Field.java new file mode 100644 index 0000000..ee2211d --- /dev/null +++ b/src/com/google/android/gms/fitness/data/Field.java @@ -0,0 +1,4 @@ +package com.google.android.gms.fitness.data; + +public class Field { +} diff --git a/src/com/google/android/gms/fitness/data/Value.java b/src/com/google/android/gms/fitness/data/Value.java new file mode 100644 index 0000000..91cd4b7 --- /dev/null +++ b/src/com/google/android/gms/fitness/data/Value.java @@ -0,0 +1,4 @@ +package com.google.android.gms.fitness.data; + +public class Value { +} diff --git a/src/com/google/android/gms/identity/accounts/api/AccountData.java b/src/com/google/android/gms/identity/accounts/api/AccountData.java new file mode 100644 index 0000000..993f641 --- /dev/null +++ b/src/com/google/android/gms/identity/accounts/api/AccountData.java @@ -0,0 +1,4 @@ +package com.google.android.gms.identity.accounts.api; + +public class AccountData { +} diff --git a/src/com/google/android/gms/identity/intents/model/CountrySpecification.java b/src/com/google/android/gms/identity/intents/model/CountrySpecification.java new file mode 100644 index 0000000..1c9fe39 --- /dev/null +++ b/src/com/google/android/gms/identity/intents/model/CountrySpecification.java @@ -0,0 +1,4 @@ +package com.google.android.gms.identity.intents.model; + +public class CountrySpecification { +} diff --git a/src/com/google/android/gms/identity/intents/model/UserAddress.java b/src/com/google/android/gms/identity/intents/model/UserAddress.java new file mode 100644 index 0000000..3595f66 --- /dev/null +++ b/src/com/google/android/gms/identity/intents/model/UserAddress.java @@ -0,0 +1,4 @@ +package com.google.android.gms.identity.intents.model; + +public class UserAddress { +} diff --git a/src/com/google/android/gms/location/GeofencingRequest.aidl b/src/com/google/android/gms/location/GeofencingRequest.aidl new file mode 100644 index 0000000..d88a3ac --- /dev/null +++ b/src/com/google/android/gms/location/GeofencingRequest.aidl @@ -0,0 +1,3 @@ +package com.google.android.gms.location; + +parcelable GeofencingRequest; diff --git a/src/com/google/android/gms/location/GeofencingRequest.java b/src/com/google/android/gms/location/GeofencingRequest.java new file mode 100644 index 0000000..f8167e7 --- /dev/null +++ b/src/com/google/android/gms/location/GeofencingRequest.java @@ -0,0 +1,38 @@ +package com.google.android.gms.location; + +import android.os.Parcel; +import android.os.Parcelable; +import org.microg.safeparcel.SafeParcelUtil; +import org.microg.safeparcel.SafeParcelable; + +/** + * TODO: usage + */ +public class GeofencingRequest implements SafeParcelable { + + private GeofencingRequest(Parcel in) { + SafeParcelUtil.readObject(this, in); + } + + @Override + public int describeContents() { + return 0; + } + + @Override + public void writeToParcel(Parcel out, int flags) { + SafeParcelUtil.writeObject(this, out, flags); + } + + public static final Parcelable.Creator CREATOR = new Parcelable.Creator() { + @Override + public GeofencingRequest createFromParcel(Parcel parcel) { + return new GeofencingRequest(parcel); + } + + @Override + public GeofencingRequest[] newArray(int i) { + return new GeofencingRequest[i]; + } + }; +} diff --git a/src/com/google/android/gms/location/LocationRequest.aidl b/src/com/google/android/gms/location/LocationRequest.aidl new file mode 100644 index 0000000..915aa2a --- /dev/null +++ b/src/com/google/android/gms/location/LocationRequest.aidl @@ -0,0 +1,3 @@ +package com.google.android.gms.location; + +parcelable LocationRequest; diff --git a/src/com/google/android/gms/location/LocationRequest.java b/src/com/google/android/gms/location/LocationRequest.java new file mode 100644 index 0000000..dfc4681 --- /dev/null +++ b/src/com/google/android/gms/location/LocationRequest.java @@ -0,0 +1,445 @@ +package com.google.android.gms.location; + +import android.os.Parcel; +import android.os.SystemClock; +import org.microg.safeparcel.SafeParcelUtil; +import org.microg.safeparcel.SafeParcelable; +import org.microg.safeparcel.SafeParceled; + +import java.util.Arrays; + +/** + * A data object that contains quality of service parameters for requests to the + * FusedLocationProviderApi. + *

+ * LocationRequest objects are used to request a quality of service for location updates from the + * FusedLocationProviderApi. + *

+ * For example, if your application wants high accuracy location it should create a location + * request with {@link #setPriority(int)} set to {@link #PRIORITY_HIGH_ACCURACY} and + * {@link #setInterval(long)} to 5 seconds. This would be appropriate for mapping applications that + * are showing your location in real-time. + *

+ * At the other extreme, if you want negligible power impact, but to still receive location updates + * when available, then create a location request with {@link #setPriority(int)} set to + * {@link #PRIORITY_NO_POWER}. With this request your application will not trigger (and therefore + * will not receive any power blame) any location updates, but will receive locations triggered by + * other applications. This would be appropriate for applications that have no firm requirement for + * location, but can take advantage when available. + *

+ * In between these two extremes is a very common use-case, where applications definitely want to + * receive updates at a specified interval, and can receive them faster when available, but still + * want a low power impact. These applications should consider + * {@link #PRIORITY_BALANCED_POWER_ACCURACY} combined with a faster + * {@link #setFastestInterval(long)} (such as 1 minute) and a slower {@link #setInterval(long)} + * (such as 60 minutes). They will only be assigned power blame for the interval set by + * {@link #setInterval(long)}, but can still receive locations triggered by other applications at a + * rate up to {@link #setFastestInterval(long)}. This style of request is appropriate for many + * location aware applications, including background usage. Do be careful to also throttle + * {@link #setFastestInterval(long)} if you perform heavy-weight work after receiving an update - + * such as using the network. + *

+ * Activities should strongly consider removing all location request when entering the background + * (for example at {@link android.app.Activity#onPause()}), or at least swap the request to a + * larger interval and lower quality. + *

+ * Applications cannot specify the exact location sources, such as GPS, that are used by the + * LocationClient. In fact, the system may have multiple location sources (providers) running and + * may fuse the results from several sources into a single Location object. + *

+ * Location requests from applications with + * {@link android.Manifest.permission#ACCESS_COARSE_LOCATION} and not + * {@link android.Manifest.permission#ACCESS_FINE_LOCATION} will be automatically throttled to a + * slower interval, and the location object will be obfuscated to only show a coarse level of + * accuracy. + *

+ * All location requests are considered hints, and you may receive locations that are more/less + * accurate, and faster/slower than requested. + *

+ * TODO: Works on wire, but methods not yet implemented. + */ +public class LocationRequest implements SafeParcelable { + + /** + * Used with {@link #setPriority(int)} to request "block" level accuracy. + *

+ * Block level accuracy is considered to be about 100 meter accuracy. Using a coarse accuracy + * such as this often consumes less power. + */ + public static final int PRIORITY_BALANCED_POWER_ACCURACY = 102; + /** + * Used with {@link #setPriority(int)} to request the most accurate locations available. + *

+ * This will return the finest location available. + */ + public static final int PRIORITY_HIGH_ACCURACY = 100; + /** + * Used with {@link #setPriority(int)} to request "city" level accuracy. + *

+ * City level accuracy is considered to be about 10km accuracy. Using a coarse accuracy such as + * this often consumes less power. + */ + public static final int PRIORITY_LOW_POWER = 104; + /** + * Used with {@link #setPriority(int)} to request the best accuracy possible with zero + * additional power consumption. + *

+ * No locations will be returned unless a different client has requested location updates in + * which case this request will act as a passive listener to those locations. + */ + public static final int PRIORITY_NO_POWER = 105; + + @SafeParceled(1000) + private final int versionCode; + @SafeParceled(1) + private int priority; + @SafeParceled(2) + private long interval; + @SafeParceled(3) + private long fastestInterval; + @SafeParceled(4) + private boolean explicitFastestInterval; + @SafeParceled(5) + private long expirationTime; + @SafeParceled(6) + private int numUpdates; + @SafeParceled(7) + private float smallestDesplacement; + @SafeParceled(8) + private long maxWaitTime; + + public LocationRequest() { + this.versionCode = 1; + this.priority = PRIORITY_BALANCED_POWER_ACCURACY; + this.interval = 3600000; + this.fastestInterval = 600000; + this.explicitFastestInterval = false; + this.expirationTime = Long.MAX_VALUE; + this.numUpdates = Integer.MAX_VALUE; + this.smallestDesplacement = 0; + this.maxWaitTime = 0; + } + + public LocationRequest(Parcel in) { + this(); + SafeParcelUtil.readObject(this, in); + } + + /** + * Create a location request with default parameters. + *

+ * Default parameters are for a block accuracy, slowly updated location. It can then be + * adjusted as required by the applications before passing to the FusedLocationProviderApi. + * + * @return a new location request + */ + public static LocationRequest create() { + return new LocationRequest(); + } + + @Override + public int describeContents() { + return 0; + } + + /** + * Get the request expiration time, in milliseconds since boot. + *

+ * This value can be compared to {@link SystemClock#elapsedRealtime()} to determine + * the time until expiration. + * + * @return expiration time of request, in milliseconds since boot including suspend + */ + public long getExpirationTime() { + return expirationTime; + } + + /** + * Get the fastest interval of this request, in milliseconds. + *

+ * The system will never provide location updates faster than the minimum of + * {@link #getFastestInterval()} and {@link #getInterval()}. + * + * @return fastest interval in milliseconds, exact + */ + public long getFastestInterval() { + return fastestInterval; + } + + /** + * Get the desired interval of this request, in milliseconds. + * + * @return desired interval in milliseconds, inexact + */ + public long getInterval() { + return interval; + } + + /** + * Get the number of updates requested. + *

+ * By default this is {@link java.lang.Integer#MAX_VALUE}, which indicates that locations are + * updated until the request is explicitly removed. + * + * @return number of updates + */ + public int getNumUpdates() { + return numUpdates; + } + + /** + * Get the quality of the request. + * + * @return an accuracy constant + */ + public int getPriority() { + return priority; + } + + /** + * Get the minimum displacement between location updates in meters + *

+ * By default this is 0. + * + * @return minimum displacement between location updates in meters + */ + public float getSmallestDesplacement() { + return smallestDesplacement; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + if (o == null || getClass() != o.getClass()) + return false; + + LocationRequest that = (LocationRequest) o; + + if (expirationTime != that.expirationTime) + return false; + if (explicitFastestInterval != that.explicitFastestInterval) + return false; + if (fastestInterval != that.fastestInterval) + return false; + if (interval != that.interval) + return false; + if (maxWaitTime != that.maxWaitTime) + return false; + if (numUpdates != that.numUpdates) + return false; + if (priority != that.priority) + return false; + if (Float.compare(that.smallestDesplacement, smallestDesplacement) != 0) + return false; + + return true; + } + + @Override + public int hashCode() { + return Arrays.hashCode( + new Object[] { priority, interval, fastestInterval, explicitFastestInterval, + explicitFastestInterval, numUpdates, smallestDesplacement, maxWaitTime + }); + } + + /** + * Set the duration of this request, in milliseconds. + *

+ * The duration begins immediately (and not when the request is passed to the location client), + * so call this method again if the request is re-used at a later time. + *

+ * The location client will automatically stop updates after the request expires. + *

+ * The duration includes suspend time. Values less than 0 are allowed, but indicate that the + * request has already expired. + * + * @param millis duration of request in milliseconds + * @return the same object, so that setters can be chained + */ + public LocationRequest setExpirationDuration(long millis) { + expirationTime = SystemClock.elapsedRealtime() + millis; + return this; + } + + /** + * Set the request expiration time, in millisecond since boot. + *

+ * This expiration time uses the same time base as {@link SystemClock#elapsedRealtime()}. + *

+ * The location client will automatically stop updates after the request expires. + *

+ * The duration includes suspend time. Values before {@link SystemClock#elapsedRealtime()} are + * allowed, but indicate that the request has already expired. + * + * @param millis expiration time of request, in milliseconds since boot including suspend + * @return the same object, so that setters can be chained + */ + public LocationRequest setExpirationTime(long millis) { + expirationTime = millis; + return this; + } + + /** + * Explicitly set the fastest interval for location updates, in milliseconds. + *

+ * This controls the fastest rate at which your application will receive location updates, + * which might be faster than {@link #setInterval(long)} in some situations (for example, if + * other applications are triggering location updates). + *

+ * This allows your application to passively acquire locations at a rate faster than it + * actively acquires locations, saving power. + *

+ * Unlike {@link #setInterval(long)}, this parameter is exact. Your application will never + * receive updates faster than this value. + *

+ * If you don't call this method, a fastest interval will be selected for you. It will be a + * value faster than your active interval ({@link #setInterval(long)}). + *

+ * An interval of 0 is allowed, but not recommended, since location updates may be extremely + * fast on future implementations. + *

+ * If {@link #setFastestInterval(long)} is set slower than {@link #setInterval(long)}, then + * your effective fastest interval is {@link #setInterval(long)}. + * + * @param millis fastest interval for updates in milliseconds, exact + * @return the same object, so that setters can be chained + * @throws IllegalArgumentException if the interval is less than zero + */ + public LocationRequest setFastestInterval(long millis) throws IllegalArgumentException { + if (millis < 0) + throw new IllegalArgumentException("interval must not be negative"); + fastestInterval = millis; + return this; + } + + /** + * Set the desired interval for active location updates, in milliseconds. + *

+ * The location client will actively try to obtain location updates for your application at + * this interval, so it has a direct influence on the amount of power used by your application. + * Choose your interval wisely. + *

+ * This interval is inexact. You may not receive updates at all (if no location sources are + * available), or you may receive them slower than requested. You may also receive them faster + * than requested (if other applications are requesting location at a faster interval). The + * fastest rate that that you will receive updates can be controlled with + * {@link #setFastestInterval(long)}. By default this fastest rate is 6x the interval frequency. + *

+ * Applications with only the coarse location permission may have their interval silently + * throttled. + *

+ * An interval of 0 is allowed, but not recommended, since location updates may be extremely + * fast on future implementations. + *

+ * {@link #setPriority(int)} and {@link #setInterval(long)} are the most important parameters + * on a location request. + * + * @param millis desired interval in millisecond, inexact + * @return the same object, so that setters can be chained + * @throws IllegalArgumentException if the interval is less than zero + */ + public LocationRequest setInterval(long millis) throws IllegalArgumentException { + if (millis < 0) + throw new IllegalArgumentException("interval must not be negative"); + interval = millis; + return this; + } + + /** + * Set the number of location updates. + *

+ * By default locations are continuously updated until the request is explicitly removed, + * however you can optionally request a set number of updates. For example, if your application + * only needs a single fresh location, then call this method with a value of 1 before passing + * the request to the location client. + *

+ * When using this option care must be taken to either explicitly remove the request when no + * longer needed or to set an expiration with ({@link #setExpirationDuration(long)} or + * {@link #setExpirationTime(long)}. Otherwise in some cases if a location can't be computed, + * this request could stay active indefinitely consuming power. + * + * @param numUpdates the number of location updates requested + * @return the same object, so that setters can be chained + * @throws IllegalArgumentException if numUpdates is 0 or less + */ + public LocationRequest setNumUpdates(int numUpdates) throws IllegalArgumentException { + if (numUpdates <= 0) + throw new IllegalArgumentException("numUpdates must not be 0 or negative"); + this.numUpdates = numUpdates; + return this; + } + + /** + * Set the priority of the request. + *

+ * Use with a priority constant such as {@link #PRIORITY_HIGH_ACCURACY}. No other values are + * accepted. + *

+ * The priority of the request is a strong hint to the LocationClient for which location + * sources to use. For example, {@link #PRIORITY_HIGH_ACCURACY} is more likely to use GPS, and + * {@link #PRIORITY_BALANCED_POWER_ACCURACY} is more likely to use WIFI & Cell tower + * positioning, but it also depends on many other factors (such as which sources are available) + * and is implementation dependent. + *

+ * {@link #setPriority(int)} and {@link #setInterval(long)} are the most important parameters + * on a location request. + * + * @param priority an accuracy or power constant + * @return the same object, so that setters can be chained + * @throws IllegalArgumentException if the quality constant is not valid + */ + public LocationRequest setPriority(int priority) { + switch (priority) { + default: + throw new IllegalArgumentException("priority is not a known constant"); + case PRIORITY_BALANCED_POWER_ACCURACY: + case PRIORITY_HIGH_ACCURACY: + case PRIORITY_LOW_POWER: + case PRIORITY_NO_POWER: + this.priority = priority; + } + return this; + } + + /** + * Set the minimum displacement between location updates in meters + *

+ * By default this is 0. + * + * @param smallestDisplacementMeters the smallest displacement in meters the user must move + * between location updates. + * @return the same object, so that setters can be chained + * @throws IllegalArgumentException if smallestDisplacementMeters is negative + */ + public LocationRequest setSmallestDesplacement(float smallestDisplacementMeters) { + if (smallestDisplacementMeters < 0) + throw new IllegalArgumentException("smallestDisplacementMeters must not be negative"); + this.smallestDesplacement = smallestDisplacementMeters; + return this; + } + + @Override + public String toString() { + // TODO + return super.toString(); + } + + @Override + public void writeToParcel(Parcel out, int flags) { + SafeParcelUtil.writeObject(this, out, flags); + } + + public static final Creator CREATOR = new Creator() { + @Override + public LocationRequest createFromParcel(Parcel parcel) { + return new LocationRequest(parcel); + } + + @Override + public LocationRequest[] newArray(int i) { + return new LocationRequest[i]; + } + }; +} diff --git a/src/com/google/android/gms/location/LocationStatus.aidl b/src/com/google/android/gms/location/LocationStatus.aidl new file mode 100644 index 0000000..398d9c1 --- /dev/null +++ b/src/com/google/android/gms/location/LocationStatus.aidl @@ -0,0 +1,3 @@ +package com.google.android.gms.location; + +parcelable LocationStatus; diff --git a/src/com/google/android/gms/location/LocationStatus.java b/src/com/google/android/gms/location/LocationStatus.java new file mode 100644 index 0000000..4009e57 --- /dev/null +++ b/src/com/google/android/gms/location/LocationStatus.java @@ -0,0 +1,103 @@ +package com.google.android.gms.location; + +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 LocationStatus implements SafeParcelable { + public static final int STATUS_SUCCESSFUL = 0; + public static final int STATUS_UNKNOWN = 1; + public static final int STATUS_TIMED_OUT_ON_SCAN = 2; + public static final int STATUS_NO_INFO_IN_DATABASE = 3; + public static final int STATUS_INVALID_SCAN = 4; + public static final int STATUS_UNABLE_TO_QUERY_DATABASE = 5; + public static final int STATUS_SCANS_DISABLED_IN_SETTINGS = 6; + public static final int STATUS_LOCATION_DISABLED_IN_SETTINGS = 7; + public static final int STATUS_IN_PROGRESS = 8; + @SafeParceled(1000) + private final int versionCode; + @SafeParceled(1) + int cellStatus; + @SafeParceled(2) + int wifiStatus; + @SafeParceled(3) + long elapsedRealtimeNanos; + + private LocationStatus(Parcel in) { + versionCode = 1; + SafeParcelUtil.readObject(this, in); + } + + @Override + public int describeContents() { + return 0; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + if (o == null || getClass() != o.getClass()) + return false; + + LocationStatus that = (LocationStatus) o; + + if (cellStatus != that.cellStatus) + return false; + if (elapsedRealtimeNanos != that.elapsedRealtimeNanos) + return false; + if (wifiStatus != that.wifiStatus) + return false; + + return true; + } + + @Override + public int hashCode() { + return Arrays.hashCode(new Object[] { cellStatus, wifiStatus, elapsedRealtimeNanos }); + } + + private String statusToString(int status) { + switch (status) { + case STATUS_SUCCESSFUL: + return "STATUS_SUCCESSFUL"; + case STATUS_UNKNOWN: + default: + return "STATUS_UNKNOWN"; + case STATUS_TIMED_OUT_ON_SCAN: + return "STATUS_TIMED_OUT_ON_SCAN"; + case STATUS_NO_INFO_IN_DATABASE: + return "STATUS_NO_INFO_IN_DATABASE"; + case STATUS_INVALID_SCAN: + return "STATUS_INVALID_SCAN"; + case STATUS_UNABLE_TO_QUERY_DATABASE: + return "STATUS_UNABLE_TO_QUERY_DATABASE"; + case STATUS_SCANS_DISABLED_IN_SETTINGS: + return "STATUS_SCANS_DISABLED_IN_SETTINGS"; + case STATUS_LOCATION_DISABLED_IN_SETTINGS: + return "STATUS_LOCATION_DISABLED_IN_SETTINGS"; + case STATUS_IN_PROGRESS: + return "STATUS_IN_PROGRESS"; + } + } + + @Override + public void writeToParcel(Parcel out, int flags) { + SafeParcelUtil.writeObject(this, out, flags); + } + + public static final Creator CREATOR = new Creator() { + @Override + public LocationStatus createFromParcel(Parcel parcel) { + return new LocationStatus(parcel); + } + + @Override + public LocationStatus[] newArray(int i) { + return new LocationStatus[i]; + } + }; +} diff --git a/src/com/google/android/gms/location/internal/ClientIdentity.java b/src/com/google/android/gms/location/internal/ClientIdentity.java new file mode 100644 index 0000000..afb034b --- /dev/null +++ b/src/com/google/android/gms/location/internal/ClientIdentity.java @@ -0,0 +1,4 @@ +package com.google.android.gms.location.internal; + +public class ClientIdentity { +} diff --git a/src/com/google/android/gms/location/internal/IGoogleLocationManagerService.aidl b/src/com/google/android/gms/location/internal/IGoogleLocationManagerService.aidl index c461587..295de79 100644 --- a/src/com/google/android/gms/location/internal/IGoogleLocationManagerService.aidl +++ b/src/com/google/android/gms/location/internal/IGoogleLocationManagerService.aidl @@ -1,8 +1,60 @@ package com.google.android.gms.location.internal; +import com.google.android.gms.location.places.AutocompleteFilter; +import com.google.android.gms.location.places.internal.IPlacesCallbacks; +import com.google.android.gms.location.internal.LocationRequestInternal; +import com.google.android.gms.location.places.NearbyAlertRequest; +import com.google.android.gms.location.places.PlaceFilter; +import com.google.android.gms.location.places.PlaceRequest; +import com.google.android.gms.location.places.PlaceReport; +import com.google.android.gms.location.places.internal.PlacesParams; +import com.google.android.gms.location.places.UserAddedPlace; +import com.google.android.gms.location.places.UserDataType; import com.google.android.gms.location.Geofence; +import com.google.android.gms.location.GeofencingRequest; +import com.google.android.gms.location.LocationRequest; +import com.google.android.gms.location.LocationStatus; import com.google.android.gms.location.internal.IGeofencerCallbacks; +import com.google.android.gms.location.internal.ILocationListener; +import com.google.android.gms.maps.model.LatLng; +import com.google.android.gms.maps.model.LatLngBounds; interface IGoogleLocationManagerService { - void addGeofences(in List geofences, in PendingIntent pendingIntent, IGeofencerCallbacks callback, String str); + void addGeofencesList(in List geofences, in PendingIntent pendingIntent, IGeofencerCallbacks callbacks, String packageName) = 0; + void removeGeofencesByIntent(in PendingIntent pendingIntent, IGeofencerCallbacks callbacks, String packageName) = 1; + void removeGeofencesById(in String[] geofenceRequestIds, IGeofencerCallbacks callbacks, String packageName) = 2; + void iglms4(IGeofencerCallbacks callbacks, String packageName) = 3; + void requestActivityUpdates(long detectionIntervalMillis, boolean alwaysTrue, in PendingIntent callbackIntent) = 4; + void removeActivityUpdates(in PendingIntent callbackIntent) = 5; + Location getLastLocation() = 6; + void requestLocationUpdatesWithListener(in LocationRequest request, ILocationListener listener) = 7; + void requestLocationUpdatesWithIntent(in LocationRequest request, in PendingIntent callbackIntent) = 8; + void removeLocationUpdatesWithListener(ILocationListener listener) = 9; // TODO + void removeLocationUpdatesWithIntent(in PendingIntent callbackIntent) = 11; + void setMockMode(boolean mockMode) = 12; + void setMockLocation(in Location mockLocation) = 13; + void iglms14(in LatLngBounds var1, int var2, in PlaceFilter var3, in PlacesParams var4, IPlacesCallbacks var5) = 14; + void iglms15(String var1, in PlacesParams var2, IPlacesCallbacks var3) = 15; + void iglms16(in LatLng var1, in PlaceFilter var2, in PlacesParams var3, IPlacesCallbacks var4) = 16; + void iglms17(in PlaceFilter var1, in PlacesParams var2, IPlacesCallbacks var3) = 17; + void iglms18(in PlaceRequest var1, in PlacesParams var2, in PendingIntent var3) = 18; + void iglms19(in PlacesParams var1, in PendingIntent var2) = 19; + void requestLocationUpdates(in LocationRequest request, ILocationListener listener, String packageName) = 20; + Location getLastLocationWithPackage(String packageName) = 21; + void iglms25(in PlaceReport var1, in PlacesParams var2) = 25; + void iglms26(in Location var1, int var2) = 26; + LocationStatus iglms34(String var1) = 34; + void iglms42(String var1, in PlacesParams var2, IPlacesCallbacks var3) = 42; + void iglms46(in UserAddedPlace var1, in PlacesParams var2, IPlacesCallbacks var3) = 46; + void iglms47(in LatLngBounds var1, int var2, String var3, in PlaceFilter var4, in PlacesParams var5, IPlacesCallbacks var6) = 47; + void iglms48(in NearbyAlertRequest var1, in PlacesParams var2, in PendingIntent var3) = 48; + void iglms49(in PlacesParams var1, in PendingIntent var2) = 49; + void iglms50(in UserDataType var1, in LatLngBounds var2, in List var3, in PlacesParams var4, IPlacesCallbacks var5) = 50; + IBinder iglms51() = 51; + void requestLocationUpdatesInternalWithListener(in LocationRequestInternal request, ILocationListener listener) = 52; + void requestLocationUpdatesInternalWithIntent(in LocationRequestInternal request, in PendingIntent callbackIntent) = 53; + IBinder iglms54() = 54; + void iglms55(String var1, in LatLngBounds var2, in AutocompleteFilter var3, in PlacesParams var4, IPlacesCallbacks var5) = 55; + void addGeofences(in GeofencingRequest geofencingRequest, in PendingIntent pendingIntent, IGeofencerCallbacks callbacks) = 57; + void iglms58(in List var1, in PlacesParams var2, IPlacesCallbacks var3) = 58; } diff --git a/src/com/google/android/gms/location/internal/ILocationListener.aidl b/src/com/google/android/gms/location/internal/ILocationListener.aidl new file mode 100644 index 0000000..055d6fd --- /dev/null +++ b/src/com/google/android/gms/location/internal/ILocationListener.aidl @@ -0,0 +1,7 @@ +package com.google.android.gms.location.internal; + +import android.location.Location; + +interface ILocationListener { + void onLocationChanged(in Location location); +} diff --git a/src/com/google/android/gms/location/internal/LocationRequestInternal.aidl b/src/com/google/android/gms/location/internal/LocationRequestInternal.aidl new file mode 100644 index 0000000..4604714 --- /dev/null +++ b/src/com/google/android/gms/location/internal/LocationRequestInternal.aidl @@ -0,0 +1,3 @@ +package com.google.android.gms.location.internal; + +parcelable LocationRequestInternal; diff --git a/src/com/google/android/gms/location/internal/LocationRequestInternal.java b/src/com/google/android/gms/location/internal/LocationRequestInternal.java new file mode 100644 index 0000000..8ae2769 --- /dev/null +++ b/src/com/google/android/gms/location/internal/LocationRequestInternal.java @@ -0,0 +1,37 @@ +package com.google.android.gms.location.internal; + +import android.os.Parcel; +import android.os.Parcelable; +import org.microg.safeparcel.SafeParcelUtil; +import org.microg.safeparcel.SafeParcelable; + +/** + * TODO: usage + */ +public class LocationRequestInternal implements SafeParcelable { + private LocationRequestInternal(Parcel in) { + SafeParcelUtil.readObject(this, in); + } + + @Override + public int describeContents() { + return 0; + } + + @Override + public void writeToParcel(Parcel out, int flags) { + SafeParcelUtil.writeObject(this, out, flags); + } + + public static final Parcelable.Creator CREATOR = new Parcelable.Creator() { + @Override + public LocationRequestInternal createFromParcel(Parcel parcel) { + return new LocationRequestInternal(parcel); + } + + @Override + public LocationRequestInternal[] newArray(int i) { + return new LocationRequestInternal[i]; + } + }; +} diff --git a/src/com/google/android/gms/location/places/AutocompleteFilter.aidl b/src/com/google/android/gms/location/places/AutocompleteFilter.aidl new file mode 100644 index 0000000..10b7539 --- /dev/null +++ b/src/com/google/android/gms/location/places/AutocompleteFilter.aidl @@ -0,0 +1,3 @@ +package com.google.android.gms.location.places; + +parcelable AutocompleteFilter; diff --git a/src/com/google/android/gms/location/places/AutocompleteFilter.java b/src/com/google/android/gms/location/places/AutocompleteFilter.java new file mode 100644 index 0000000..86847d4 --- /dev/null +++ b/src/com/google/android/gms/location/places/AutocompleteFilter.java @@ -0,0 +1,46 @@ +package com.google.android.gms.location.places; + +import android.os.Parcel; +import org.microg.safeparcel.SafeParcelUtil; +import org.microg.safeparcel.SafeParcelable; +import org.microg.safeparcel.SafeParceled; + +/** + * TODO usage + */ +public class AutocompleteFilter implements SafeParcelable { + + @SafeParceled(1000) + private final int versionCode; + + private AutocompleteFilter() { + this.versionCode = 1; + } + + private AutocompleteFilter(Parcel in) { + this(); + SafeParcelUtil.readObject(this, in); + } + + @Override + public int describeContents() { + return 0; + } + + @Override + public void writeToParcel(Parcel out, int flags) { + SafeParcelUtil.writeObject(this, out, flags); + } + + public static final Creator CREATOR = new Creator() { + @Override + public AutocompleteFilter createFromParcel(Parcel parcel) { + return new AutocompleteFilter(parcel); + } + + @Override + public AutocompleteFilter[] newArray(int i) { + return new AutocompleteFilter[i]; + } + }; +} diff --git a/src/com/google/android/gms/location/places/NearbyAlertRequest.aidl b/src/com/google/android/gms/location/places/NearbyAlertRequest.aidl new file mode 100644 index 0000000..b34605c --- /dev/null +++ b/src/com/google/android/gms/location/places/NearbyAlertRequest.aidl @@ -0,0 +1,3 @@ +package com.google.android.gms.location.places; + +parcelable NearbyAlertRequest; diff --git a/src/com/google/android/gms/location/places/NearbyAlertRequest.java b/src/com/google/android/gms/location/places/NearbyAlertRequest.java new file mode 100644 index 0000000..0650e46 --- /dev/null +++ b/src/com/google/android/gms/location/places/NearbyAlertRequest.java @@ -0,0 +1,36 @@ +package com.google.android.gms.location.places; + +import android.os.Parcel; +import org.microg.safeparcel.SafeParcelUtil; +import org.microg.safeparcel.SafeParcelable; + +/** + * TODO: usage + */ +public class NearbyAlertRequest implements SafeParcelable { + private NearbyAlertRequest(Parcel in) { + SafeParcelUtil.readObject(this, in); + } + + @Override + public int describeContents() { + return 0; + } + + @Override + public void writeToParcel(Parcel out, int flags) { + SafeParcelUtil.writeObject(this, out, flags); + } + + public static final Creator CREATOR = new Creator() { + @Override + public NearbyAlertRequest createFromParcel(Parcel parcel) { + return new NearbyAlertRequest(parcel); + } + + @Override + public NearbyAlertRequest[] newArray(int i) { + return new NearbyAlertRequest[i]; + } + }; +} diff --git a/src/com/google/android/gms/location/places/PlaceFilter.aidl b/src/com/google/android/gms/location/places/PlaceFilter.aidl new file mode 100644 index 0000000..07a4eec --- /dev/null +++ b/src/com/google/android/gms/location/places/PlaceFilter.aidl @@ -0,0 +1,3 @@ +package com.google.android.gms.location.places; + +parcelable PlaceFilter; diff --git a/src/com/google/android/gms/location/places/PlaceFilter.java b/src/com/google/android/gms/location/places/PlaceFilter.java new file mode 100644 index 0000000..d13849b --- /dev/null +++ b/src/com/google/android/gms/location/places/PlaceFilter.java @@ -0,0 +1,37 @@ +package com.google.android.gms.location.places; + +import android.os.Parcel; +import org.microg.safeparcel.SafeParcelUtil; +import org.microg.safeparcel.SafeParcelable; + +/** + * TODO: usage + */ +public class PlaceFilter implements SafeParcelable { + + private PlaceFilter(Parcel in) { + SafeParcelUtil.readObject(this, in); + } + + @Override + public int describeContents() { + return 0; + } + + @Override + public void writeToParcel(Parcel out, int flags) { + SafeParcelUtil.writeObject(this, out, flags); + } + + public static final Creator CREATOR = new Creator() { + @Override + public PlaceFilter createFromParcel(Parcel parcel) { + return new PlaceFilter(parcel); + } + + @Override + public PlaceFilter[] newArray(int i) { + return new PlaceFilter[i]; + } + }; +} diff --git a/src/com/google/android/gms/location/places/PlaceReport.aidl b/src/com/google/android/gms/location/places/PlaceReport.aidl new file mode 100644 index 0000000..993899d --- /dev/null +++ b/src/com/google/android/gms/location/places/PlaceReport.aidl @@ -0,0 +1,3 @@ +package com.google.android.gms.location.places; + +parcelable PlaceReport; diff --git a/src/com/google/android/gms/location/places/PlaceReport.java b/src/com/google/android/gms/location/places/PlaceReport.java new file mode 100644 index 0000000..8fd57f8 --- /dev/null +++ b/src/com/google/android/gms/location/places/PlaceReport.java @@ -0,0 +1,38 @@ +package com.google.android.gms.location.places; + +import android.os.Parcel; +import android.os.Parcelable; +import org.microg.safeparcel.SafeParcelUtil; +import org.microg.safeparcel.SafeParcelable; + +/** + * TODO: usage + */ +public class PlaceReport implements SafeParcelable { + + private PlaceReport(Parcel in) { + SafeParcelUtil.readObject(this, in); + } + + @Override + public int describeContents() { + return 0; + } + + @Override + public void writeToParcel(Parcel out, int flags) { + SafeParcelUtil.writeObject(this, out, flags); + } + + public static final Parcelable.Creator CREATOR = new Parcelable.Creator() { + @Override + public PlaceReport createFromParcel(Parcel parcel) { + return new PlaceReport(parcel); + } + + @Override + public PlaceReport[] newArray(int i) { + return new PlaceReport[i]; + } + }; +} diff --git a/src/com/google/android/gms/location/places/PlaceRequest.aidl b/src/com/google/android/gms/location/places/PlaceRequest.aidl new file mode 100644 index 0000000..8de920e --- /dev/null +++ b/src/com/google/android/gms/location/places/PlaceRequest.aidl @@ -0,0 +1,3 @@ +package com.google.android.gms.location.places; + +parcelable PlaceRequest; diff --git a/src/com/google/android/gms/location/places/PlaceRequest.java b/src/com/google/android/gms/location/places/PlaceRequest.java new file mode 100644 index 0000000..0960bdc --- /dev/null +++ b/src/com/google/android/gms/location/places/PlaceRequest.java @@ -0,0 +1,36 @@ +package com.google.android.gms.location.places; + +import android.os.Parcel; +import org.microg.safeparcel.SafeParcelUtil; +import org.microg.safeparcel.SafeParcelable; + +/** + * TODO: usage + */ +public class PlaceRequest implements SafeParcelable { + private PlaceRequest(Parcel in) { + SafeParcelUtil.readObject(this, in); + } + + @Override + public int describeContents() { + return 0; + } + + @Override + public void writeToParcel(Parcel out, int flags) { + SafeParcelUtil.writeObject(this, out, flags); + } + + public static final Creator CREATOR = new Creator() { + @Override + public PlaceRequest createFromParcel(Parcel parcel) { + return new PlaceRequest(parcel); + } + + @Override + public PlaceRequest[] newArray(int i) { + return new PlaceRequest[i]; + } + }; +} diff --git a/src/com/google/android/gms/location/places/UserAddedPlace.aidl b/src/com/google/android/gms/location/places/UserAddedPlace.aidl new file mode 100644 index 0000000..aa543a6 --- /dev/null +++ b/src/com/google/android/gms/location/places/UserAddedPlace.aidl @@ -0,0 +1,3 @@ +package com.google.android.gms.location.places; + +parcelable UserAddedPlace; diff --git a/src/com/google/android/gms/location/places/UserAddedPlace.java b/src/com/google/android/gms/location/places/UserAddedPlace.java new file mode 100644 index 0000000..5f83f52 --- /dev/null +++ b/src/com/google/android/gms/location/places/UserAddedPlace.java @@ -0,0 +1,46 @@ +package com.google.android.gms.location.places; + +import android.os.Parcel; +import org.microg.safeparcel.SafeParcelUtil; +import org.microg.safeparcel.SafeParcelable; +import org.microg.safeparcel.SafeParceled; + +/** + * TODO: usage + */ +public class UserAddedPlace implements SafeParcelable { + + @SafeParceled(1000) + private final int versionCode; + + private UserAddedPlace() { + versionCode = -1; + } + + private UserAddedPlace(Parcel in) { + this(); + SafeParcelUtil.readObject(this, in); + } + + @Override + public int describeContents() { + return 0; + } + + @Override + public void writeToParcel(Parcel out, int flags) { + SafeParcelUtil.writeObject(this, out, flags); + } + + public static final Creator CREATOR = new Creator() { + @Override + public UserAddedPlace createFromParcel(Parcel parcel) { + return new UserAddedPlace(parcel); + } + + @Override + public UserAddedPlace[] newArray(int i) { + return new UserAddedPlace[i]; + } + }; +} diff --git a/src/com/google/android/gms/location/places/UserDataType.aidl b/src/com/google/android/gms/location/places/UserDataType.aidl new file mode 100644 index 0000000..503493a --- /dev/null +++ b/src/com/google/android/gms/location/places/UserDataType.aidl @@ -0,0 +1,3 @@ +package com.google.android.gms.location.places; + +parcelable UserDataType; diff --git a/src/com/google/android/gms/location/places/UserDataType.java b/src/com/google/android/gms/location/places/UserDataType.java new file mode 100644 index 0000000..858d3f0 --- /dev/null +++ b/src/com/google/android/gms/location/places/UserDataType.java @@ -0,0 +1,36 @@ +package com.google.android.gms.location.places; + +import android.os.Parcel; +import org.microg.safeparcel.SafeParcelUtil; +import org.microg.safeparcel.SafeParcelable; + +/** + * TODO: usage + */ +public class UserDataType implements SafeParcelable { + private UserDataType(Parcel in) { + SafeParcelUtil.readObject(this, in); + } + + @Override + public int describeContents() { + return 0; + } + + @Override + public void writeToParcel(Parcel out, int flags) { + SafeParcelUtil.writeObject(this, out, flags); + } + + public static final Creator CREATOR = new Creator() { + @Override + public UserDataType createFromParcel(Parcel parcel) { + return new UserDataType(parcel); + } + + @Override + public UserDataType[] newArray(int i) { + return new UserDataType[i]; + } + }; +} diff --git a/src/com/google/android/gms/location/places/internal/IPlacesCallbacks.aidl b/src/com/google/android/gms/location/places/internal/IPlacesCallbacks.aidl new file mode 100644 index 0000000..6e91260 --- /dev/null +++ b/src/com/google/android/gms/location/places/internal/IPlacesCallbacks.aidl @@ -0,0 +1,9 @@ +package com.google.android.gms.location.places.internal; + +import com.google.android.gms.common.data.DataHolder; + +interface IPlacesCallbacks { + void X(in DataHolder dataHolder); + void Y(in DataHolder dataHolder); + void Z(in DataHolder dataHolder); +} diff --git a/src/com/google/android/gms/location/places/internal/PlacesParams.aidl b/src/com/google/android/gms/location/places/internal/PlacesParams.aidl new file mode 100644 index 0000000..fa56954 --- /dev/null +++ b/src/com/google/android/gms/location/places/internal/PlacesParams.aidl @@ -0,0 +1,3 @@ +package com.google.android.gms.location.places.internal; + +parcelable PlacesParams; diff --git a/src/com/google/android/gms/location/places/internal/PlacesParams.java b/src/com/google/android/gms/location/places/internal/PlacesParams.java new file mode 100644 index 0000000..956c99d --- /dev/null +++ b/src/com/google/android/gms/location/places/internal/PlacesParams.java @@ -0,0 +1,52 @@ +package com.google.android.gms.location.places.internal; + +import android.os.Parcel; +import org.microg.safeparcel.SafeParcelUtil; +import org.microg.safeparcel.SafeParcelable; +import org.microg.safeparcel.SafeParceled; + +public class PlacesParams implements SafeParcelable { + + @SafeParceled(1000) + private final int versionCode; + @SafeParceled(1) + public final String clientPackageName; + @SafeParceled(2) + public final String locale; + @SafeParceled(3) + public final String accountName; + @SafeParceled(4) + public final String gCoreClientName; + + private PlacesParams() { + versionCode = -1; + clientPackageName = locale = accountName = gCoreClientName = null; + } + + private PlacesParams(Parcel in) { + this(); + SafeParcelUtil.readObject(this, in); + } + + @Override + public int describeContents() { + return 0; + } + + @Override + public void writeToParcel(Parcel out, int flags) { + SafeParcelUtil.writeObject(this, out, flags); + } + + public static final Creator CREATOR = new Creator() { + @Override + public PlacesParams createFromParcel(Parcel parcel) { + return new PlacesParams(parcel); + } + + @Override + public PlacesParams[] newArray(int i) { + return new PlacesParams[i]; + } + }; +} diff --git a/src/com/google/android/gms/maps/StreetViewPanoramaOptions.java b/src/com/google/android/gms/maps/StreetViewPanoramaOptions.java new file mode 100644 index 0000000..3d1810c --- /dev/null +++ b/src/com/google/android/gms/maps/StreetViewPanoramaOptions.java @@ -0,0 +1,4 @@ +package com.google.android.gms.maps; + +public class StreetViewPanoramaOptions { +} diff --git a/src/com/google/android/gms/maps/internal/Point.java b/src/com/google/android/gms/maps/internal/Point.java new file mode 100644 index 0000000..43ada12 --- /dev/null +++ b/src/com/google/android/gms/maps/internal/Point.java @@ -0,0 +1,4 @@ +package com.google.android.gms.maps.internal; + +public class Point { +} diff --git a/src/com/google/android/gms/maps/model/StreetViewPanoramaCamera.java b/src/com/google/android/gms/maps/model/StreetViewPanoramaCamera.java new file mode 100644 index 0000000..534d814 --- /dev/null +++ b/src/com/google/android/gms/maps/model/StreetViewPanoramaCamera.java @@ -0,0 +1,4 @@ +package com.google.android.gms.maps.model; + +public class StreetViewPanoramaCamera { +} diff --git a/src/com/google/android/gms/maps/model/StreetViewPanoramaLink.java b/src/com/google/android/gms/maps/model/StreetViewPanoramaLink.java new file mode 100644 index 0000000..66859e0 --- /dev/null +++ b/src/com/google/android/gms/maps/model/StreetViewPanoramaLink.java @@ -0,0 +1,4 @@ +package com.google.android.gms.maps.model; + +public class StreetViewPanoramaLink { +} diff --git a/src/com/google/android/gms/maps/model/StreetViewPanoramaLocation.java b/src/com/google/android/gms/maps/model/StreetViewPanoramaLocation.java new file mode 100644 index 0000000..8ef5fda --- /dev/null +++ b/src/com/google/android/gms/maps/model/StreetViewPanoramaLocation.java @@ -0,0 +1,4 @@ +package com.google.android.gms.maps.model; + +public class StreetViewPanoramaLocation { +} diff --git a/src/com/google/android/gms/maps/model/StreetViewPanoramaOrientation.java b/src/com/google/android/gms/maps/model/StreetViewPanoramaOrientation.java new file mode 100644 index 0000000..285c061 --- /dev/null +++ b/src/com/google/android/gms/maps/model/StreetViewPanoramaOrientation.java @@ -0,0 +1,4 @@ +package com.google.android.gms.maps.model; + +public class StreetViewPanoramaOrientation { +} diff --git a/src/com/google/android/gms/plus/internal/PlusCommonExtras.java b/src/com/google/android/gms/plus/internal/PlusCommonExtras.java new file mode 100644 index 0000000..b873578 --- /dev/null +++ b/src/com/google/android/gms/plus/internal/PlusCommonExtras.java @@ -0,0 +1,4 @@ +package com.google.android.gms.plus.internal; + +public class PlusCommonExtras { +} diff --git a/src/com/google/android/gms/plus/internal/PlusSession.java b/src/com/google/android/gms/plus/internal/PlusSession.java new file mode 100644 index 0000000..d8b6c9a --- /dev/null +++ b/src/com/google/android/gms/plus/internal/PlusSession.java @@ -0,0 +1,4 @@ +package com.google.android.gms.plus.internal; + +public class PlusSession { +} diff --git a/src/com/google/android/gms/plus/internal/model/smart_profile/CardsRequest.java b/src/com/google/android/gms/plus/internal/model/smart_profile/CardsRequest.java new file mode 100644 index 0000000..2237e01 --- /dev/null +++ b/src/com/google/android/gms/plus/internal/model/smart_profile/CardsRequest.java @@ -0,0 +1,4 @@ +package com.google.android.gms.plus.internal.model.smart_profile; + +public class CardsRequest { +} diff --git a/src/com/google/android/gms/plus/internal/model/smart_profile/CardsResponse.java b/src/com/google/android/gms/plus/internal/model/smart_profile/CardsResponse.java new file mode 100644 index 0000000..c6f3f23 --- /dev/null +++ b/src/com/google/android/gms/plus/internal/model/smart_profile/CardsResponse.java @@ -0,0 +1,4 @@ +package com.google.android.gms.plus.internal.model.smart_profile; + +public class CardsResponse { +} diff --git a/src/com/google/android/gms/plus/internal/model/smart_profile/PeopleForProfilesRequest.java b/src/com/google/android/gms/plus/internal/model/smart_profile/PeopleForProfilesRequest.java new file mode 100644 index 0000000..7f4374c --- /dev/null +++ b/src/com/google/android/gms/plus/internal/model/smart_profile/PeopleForProfilesRequest.java @@ -0,0 +1,4 @@ +package com.google.android.gms.plus.internal.model.smart_profile; + +public class PeopleForProfilesRequest { +} diff --git a/src/com/google/android/gms/plus/internal/model/smart_profile/PeopleForProfilesResponse.java b/src/com/google/android/gms/plus/internal/model/smart_profile/PeopleForProfilesResponse.java new file mode 100644 index 0000000..28bc9b7 --- /dev/null +++ b/src/com/google/android/gms/plus/internal/model/smart_profile/PeopleForProfilesResponse.java @@ -0,0 +1,4 @@ +package com.google.android.gms.plus.internal.model.smart_profile; + +public class PeopleForProfilesResponse { +} diff --git a/src/com/google/android/gms/plus/model/posts/Comment.java b/src/com/google/android/gms/plus/model/posts/Comment.java new file mode 100644 index 0000000..34b179a --- /dev/null +++ b/src/com/google/android/gms/plus/model/posts/Comment.java @@ -0,0 +1,4 @@ +package com.google.android.gms.plus.model.posts; + +public class Comment { +} diff --git a/src/com/google/android/gms/plus/model/posts/Post.java b/src/com/google/android/gms/plus/model/posts/Post.java new file mode 100644 index 0000000..68d73f2 --- /dev/null +++ b/src/com/google/android/gms/plus/model/posts/Post.java @@ -0,0 +1,4 @@ +package com.google.android.gms.plus.model.posts; + +public class Post { +} diff --git a/src/com/google/android/gms/plus/model/posts/Settings.java b/src/com/google/android/gms/plus/model/posts/Settings.java new file mode 100644 index 0000000..943d0ce --- /dev/null +++ b/src/com/google/android/gms/plus/model/posts/Settings.java @@ -0,0 +1,4 @@ +package com.google.android.gms.plus.model.posts; + +public class Settings { +} diff --git a/src/com/google/android/gms/wearable/ConnectionConfiguration.java b/src/com/google/android/gms/wearable/ConnectionConfiguration.java new file mode 100644 index 0000000..1539f85 --- /dev/null +++ b/src/com/google/android/gms/wearable/ConnectionConfiguration.java @@ -0,0 +1,4 @@ +package com.google.android.gms.wearable; + +public class ConnectionConfiguration { +} diff --git a/src/org/microg/gms/maps/Constants.java b/src/org/microg/gms/maps/Constants.java index 8974585..7209e50 100644 --- a/src/org/microg/gms/maps/Constants.java +++ b/src/org/microg/gms/maps/Constants.java @@ -1,6 +1,12 @@ package org.microg.gms.maps; public class Constants { + /** + * This is the highest version that was looked at during development. + * Does not necessarily mean anything. + */ + public static final int MAX_REFERENCE_VERSION = 6599436; + /** * No base map tiles. */ @@ -25,4 +31,7 @@ public class Constants { * Satellite maps with a transparent layer of major streets. */ public static final int MAP_TYPE_HYBRID = 4; + + public static final String ACTION_GMS_LOCATION_MANAGER_SERVICE_START = "com.google.android.location.internal.GoogleLocationManagerService.START"; + public static final String KEY_MOCK_LOCATION = "mockLocation"; }