mirror of
https://github.com/TeamVanced/VancedMicroG
synced 2024-11-11 22:59:25 +01:00
Migrate to AutoSafeParcelable
This commit is contained in:
parent
7c312bfe30
commit
95fabdd877
7
src/com/google/android/gms/common/api/AccountInfo.java
Normal file
7
src/com/google/android/gms/common/api/AccountInfo.java
Normal file
@ -0,0 +1,7 @@
|
||||
package com.google.android.gms.common.api;
|
||||
|
||||
import org.microg.safeparcel.AutoSafeParcelable;
|
||||
|
||||
public class AccountInfo extends AutoSafeParcelable {
|
||||
public static final Creator<AccountInfo> CREATOR = new AutoCreator<>(AccountInfo.class);
|
||||
}
|
@ -1,15 +1,16 @@
|
||||
package com.google.android.gms.common.api;
|
||||
|
||||
import android.os.Parcel;
|
||||
import org.microg.safeparcel.SafeParcelUtil;
|
||||
import org.microg.safeparcel.SafeParcelable;
|
||||
import org.microg.safeparcel.AutoSafeParcelable;
|
||||
import org.microg.safeparcel.SafeParceled;
|
||||
|
||||
/**
|
||||
* Describes an OAuth 2.0 scope to request. This has security implications for the user, and
|
||||
* requesting additional scopes will result in authorization dialogs.
|
||||
*/
|
||||
public class Scope implements SafeParcelable {
|
||||
public class Scope extends AutoSafeParcelable {
|
||||
@SafeParceled(1)
|
||||
private final int versionCode;
|
||||
@SafeParceled(2)
|
||||
private final String scopeUri;
|
||||
|
||||
private Scope() {
|
||||
@ -17,11 +18,6 @@ public class Scope implements SafeParcelable {
|
||||
scopeUri = null;
|
||||
}
|
||||
|
||||
private Scope(Parcel in) {
|
||||
this();
|
||||
SafeParcelUtil.readObject(this, in);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new scope with the given URI.
|
||||
*/
|
||||
@ -30,11 +26,6 @@ public class Scope implements SafeParcelable {
|
||||
this.scopeUri = scopeUri;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
return this == o || o instanceof Scope && scopeUri.equals(((Scope) o).scopeUri);
|
||||
@ -54,20 +45,5 @@ public class Scope implements SafeParcelable {
|
||||
return scopeUri;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToParcel(Parcel out, int flags) {
|
||||
SafeParcelUtil.writeObject(this, out, flags);
|
||||
}
|
||||
|
||||
public static final Creator<Scope> CREATOR = new Creator<Scope>() {
|
||||
@Override
|
||||
public Scope createFromParcel(Parcel parcel) {
|
||||
return new Scope(parcel);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Scope[] newArray(int i) {
|
||||
return new Scope[i];
|
||||
}
|
||||
};
|
||||
public static final Creator<Scope> CREATOR = new AutoCreator<>(Scope.class);
|
||||
}
|
||||
|
@ -1,36 +1,11 @@
|
||||
package com.google.android.gms.common.data;
|
||||
|
||||
import android.os.Parcel;
|
||||
import org.microg.safeparcel.SafeParcelUtil;
|
||||
import org.microg.safeparcel.SafeParcelable;
|
||||
import org.microg.safeparcel.AutoSafeParcelable;
|
||||
|
||||
/**
|
||||
* TODO: usage
|
||||
*/
|
||||
public class DataHolder implements SafeParcelable {
|
||||
private DataHolder(Parcel in) {
|
||||
SafeParcelUtil.readObject(this, in);
|
||||
}
|
||||
public class DataHolder extends AutoSafeParcelable {
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToParcel(Parcel out, int flags) {
|
||||
SafeParcelUtil.writeObject(this, out, flags);
|
||||
}
|
||||
|
||||
public static final Creator<DataHolder> CREATOR = new Creator<DataHolder>() {
|
||||
@Override
|
||||
public DataHolder createFromParcel(Parcel parcel) {
|
||||
return new DataHolder(parcel);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataHolder[] newArray(int i) {
|
||||
return new DataHolder[i];
|
||||
}
|
||||
};
|
||||
public static final Creator<DataHolder> CREATOR = new AutoCreator<>(DataHolder.class);
|
||||
}
|
||||
|
@ -16,33 +16,9 @@
|
||||
|
||||
package com.google.android.gms.location;
|
||||
|
||||
import android.os.Parcel;
|
||||
import org.microg.safeparcel.SafeParcelUtil;
|
||||
import org.microg.safeparcel.SafeParcelable;
|
||||
import org.microg.safeparcel.AutoSafeParcelable;
|
||||
|
||||
public class Geofence implements SafeParcelable {
|
||||
public class Geofence extends AutoSafeParcelable {
|
||||
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToParcel(Parcel dest, int flags) {
|
||||
SafeParcelUtil.writeObject(this, dest, flags);
|
||||
}
|
||||
|
||||
|
||||
public static Creator<Geofence> CREATOR = new Creator<Geofence>() {
|
||||
@Override
|
||||
public Geofence createFromParcel(Parcel source) {
|
||||
return new Geofence();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Geofence[] newArray(int size) {
|
||||
return new Geofence[size];
|
||||
}
|
||||
};
|
||||
public static Creator<Geofence> CREATOR = new AutoCreator<>(Geofence.class);
|
||||
}
|
||||
|
@ -1,38 +1,12 @@
|
||||
package com.google.android.gms.location;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
import org.microg.safeparcel.SafeParcelUtil;
|
||||
import org.microg.safeparcel.SafeParcelable;
|
||||
import org.microg.safeparcel.AutoSafeParcelable;
|
||||
|
||||
/**
|
||||
* TODO: usage
|
||||
*/
|
||||
public class GeofencingRequest implements SafeParcelable {
|
||||
public class GeofencingRequest extends AutoSafeParcelable {
|
||||
|
||||
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<GeofencingRequest> CREATOR = new Parcelable.Creator<GeofencingRequest>() {
|
||||
@Override
|
||||
public GeofencingRequest createFromParcel(Parcel parcel) {
|
||||
return new GeofencingRequest(parcel);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GeofencingRequest[] newArray(int i) {
|
||||
return new GeofencingRequest[i];
|
||||
}
|
||||
};
|
||||
public static final Creator<GeofencingRequest> CREATOR = new AutoCreator<>(
|
||||
GeofencingRequest.class);
|
||||
}
|
||||
|
@ -1,9 +1,7 @@
|
||||
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.AutoSafeParcelable;
|
||||
import org.microg.safeparcel.SafeParceled;
|
||||
|
||||
import java.util.Arrays;
|
||||
@ -55,10 +53,8 @@ import java.util.Arrays;
|
||||
* <p/>
|
||||
* All location requests are considered hints, and you may receive locations that are more/less
|
||||
* accurate, and faster/slower than requested.
|
||||
* <p/>
|
||||
* TODO: Works on wire, but methods not yet implemented.
|
||||
*/
|
||||
public class LocationRequest implements SafeParcelable {
|
||||
public class LocationRequest extends AutoSafeParcelable {
|
||||
|
||||
/**
|
||||
* Used with {@link #setPriority(int)} to request "block" level accuracy.
|
||||
@ -120,11 +116,6 @@ public class LocationRequest implements SafeParcelable {
|
||||
this.maxWaitTime = 0;
|
||||
}
|
||||
|
||||
public LocationRequest(Parcel in) {
|
||||
this();
|
||||
SafeParcelUtil.readObject(this, in);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a location request with default parameters.
|
||||
* <p/>
|
||||
@ -137,11 +128,6 @@ public class LocationRequest implements SafeParcelable {
|
||||
return new LocationRequest();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the request expiration time, in milliseconds since boot.
|
||||
* <p/>
|
||||
@ -426,20 +412,5 @@ public class LocationRequest implements SafeParcelable {
|
||||
return super.toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToParcel(Parcel out, int flags) {
|
||||
SafeParcelUtil.writeObject(this, out, flags);
|
||||
}
|
||||
|
||||
public static final Creator<LocationRequest> CREATOR = new Creator<LocationRequest>() {
|
||||
@Override
|
||||
public LocationRequest createFromParcel(Parcel parcel) {
|
||||
return new LocationRequest(parcel);
|
||||
}
|
||||
|
||||
@Override
|
||||
public LocationRequest[] newArray(int i) {
|
||||
return new LocationRequest[i];
|
||||
}
|
||||
};
|
||||
public static final Creator<LocationRequest> CREATOR = new AutoCreator<>(LocationRequest.class);
|
||||
}
|
||||
|
@ -1,13 +1,11 @@
|
||||
package com.google.android.gms.location;
|
||||
|
||||
import android.os.Parcel;
|
||||
import org.microg.safeparcel.SafeParcelUtil;
|
||||
import org.microg.safeparcel.SafeParcelable;
|
||||
import org.microg.safeparcel.AutoSafeParcelable;
|
||||
import org.microg.safeparcel.SafeParceled;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
public class LocationStatus implements SafeParcelable {
|
||||
public class LocationStatus extends AutoSafeParcelable {
|
||||
public static final int STATUS_SUCCESSFUL = 0;
|
||||
public static final int STATUS_UNKNOWN = 1;
|
||||
public static final int STATUS_TIMED_OUT_ON_SCAN = 2;
|
||||
@ -26,14 +24,8 @@ public class LocationStatus implements SafeParcelable {
|
||||
@SafeParceled(3)
|
||||
long elapsedRealtimeNanos;
|
||||
|
||||
private LocationStatus(Parcel in) {
|
||||
private LocationStatus() {
|
||||
versionCode = 1;
|
||||
SafeParcelUtil.readObject(this, in);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -84,20 +76,5 @@ public class LocationStatus implements SafeParcelable {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToParcel(Parcel out, int flags) {
|
||||
SafeParcelUtil.writeObject(this, out, flags);
|
||||
}
|
||||
|
||||
public static final Creator<LocationStatus> CREATOR = new Creator<LocationStatus>() {
|
||||
@Override
|
||||
public LocationStatus createFromParcel(Parcel parcel) {
|
||||
return new LocationStatus(parcel);
|
||||
}
|
||||
|
||||
@Override
|
||||
public LocationStatus[] newArray(int i) {
|
||||
return new LocationStatus[i];
|
||||
}
|
||||
};
|
||||
public static final Creator<LocationStatus> CREATOR = new AutoCreator<>(LocationStatus.class);
|
||||
}
|
||||
|
@ -1,37 +1,12 @@
|
||||
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;
|
||||
import org.microg.safeparcel.AutoSafeParcelable;
|
||||
|
||||
/**
|
||||
* TODO: usage
|
||||
*/
|
||||
public class LocationRequestInternal implements SafeParcelable {
|
||||
private LocationRequestInternal(Parcel in) {
|
||||
SafeParcelUtil.readObject(this, in);
|
||||
}
|
||||
public class LocationRequestInternal extends AutoSafeParcelable {
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToParcel(Parcel out, int flags) {
|
||||
SafeParcelUtil.writeObject(this, out, flags);
|
||||
}
|
||||
|
||||
public static final Parcelable.Creator<LocationRequestInternal> CREATOR = new Parcelable.Creator<LocationRequestInternal>() {
|
||||
@Override
|
||||
public LocationRequestInternal createFromParcel(Parcel parcel) {
|
||||
return new LocationRequestInternal(parcel);
|
||||
}
|
||||
|
||||
@Override
|
||||
public LocationRequestInternal[] newArray(int i) {
|
||||
return new LocationRequestInternal[i];
|
||||
}
|
||||
};
|
||||
public static final Creator<LocationRequestInternal> CREATOR = new AutoCreator<>(
|
||||
LocationRequestInternal.class);
|
||||
}
|
||||
|
@ -1,14 +1,12 @@
|
||||
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.AutoSafeParcelable;
|
||||
import org.microg.safeparcel.SafeParceled;
|
||||
|
||||
/**
|
||||
* TODO usage
|
||||
*/
|
||||
public class AutocompleteFilter implements SafeParcelable {
|
||||
public class AutocompleteFilter extends AutoSafeParcelable {
|
||||
|
||||
@SafeParceled(1000)
|
||||
private final int versionCode;
|
||||
@ -17,30 +15,6 @@ public class AutocompleteFilter implements SafeParcelable {
|
||||
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<AutocompleteFilter> CREATOR = new Creator<AutocompleteFilter>() {
|
||||
@Override
|
||||
public AutocompleteFilter createFromParcel(Parcel parcel) {
|
||||
return new AutocompleteFilter(parcel);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AutocompleteFilter[] newArray(int i) {
|
||||
return new AutocompleteFilter[i];
|
||||
}
|
||||
};
|
||||
public static final Creator<AutocompleteFilter> CREATOR = new AutoCreator<>(
|
||||
AutocompleteFilter.class);
|
||||
}
|
||||
|
@ -1,36 +1,12 @@
|
||||
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.AutoSafeParcelable;
|
||||
|
||||
/**
|
||||
* TODO: usage
|
||||
*/
|
||||
public class NearbyAlertRequest implements SafeParcelable {
|
||||
private NearbyAlertRequest(Parcel in) {
|
||||
SafeParcelUtil.readObject(this, in);
|
||||
}
|
||||
public class NearbyAlertRequest extends AutoSafeParcelable {
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToParcel(Parcel out, int flags) {
|
||||
SafeParcelUtil.writeObject(this, out, flags);
|
||||
}
|
||||
|
||||
public static final Creator<NearbyAlertRequest> CREATOR = new Creator<NearbyAlertRequest>() {
|
||||
@Override
|
||||
public NearbyAlertRequest createFromParcel(Parcel parcel) {
|
||||
return new NearbyAlertRequest(parcel);
|
||||
}
|
||||
|
||||
@Override
|
||||
public NearbyAlertRequest[] newArray(int i) {
|
||||
return new NearbyAlertRequest[i];
|
||||
}
|
||||
};
|
||||
public static final Creator<NearbyAlertRequest> CREATOR = new AutoCreator<>(
|
||||
NearbyAlertRequest.class);
|
||||
}
|
||||
|
@ -1,37 +1,11 @@
|
||||
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.AutoSafeParcelable;
|
||||
|
||||
/**
|
||||
* TODO: usage
|
||||
*/
|
||||
public class PlaceFilter implements SafeParcelable {
|
||||
public class PlaceFilter extends AutoSafeParcelable {
|
||||
|
||||
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<PlaceFilter> CREATOR = new Creator<PlaceFilter>() {
|
||||
@Override
|
||||
public PlaceFilter createFromParcel(Parcel parcel) {
|
||||
return new PlaceFilter(parcel);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PlaceFilter[] newArray(int i) {
|
||||
return new PlaceFilter[i];
|
||||
}
|
||||
};
|
||||
public static final Creator<PlaceFilter> CREATOR = new AutoCreator<>(PlaceFilter.class);
|
||||
}
|
||||
|
@ -1,38 +1,10 @@
|
||||
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;
|
||||
import org.microg.safeparcel.AutoSafeParcelable;
|
||||
|
||||
/**
|
||||
* 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<PlaceReport> CREATOR = new Parcelable.Creator<PlaceReport>() {
|
||||
@Override
|
||||
public PlaceReport createFromParcel(Parcel parcel) {
|
||||
return new PlaceReport(parcel);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PlaceReport[] newArray(int i) {
|
||||
return new PlaceReport[i];
|
||||
}
|
||||
};
|
||||
public class PlaceReport extends AutoSafeParcelable {
|
||||
public static final Creator<PlaceReport> CREATOR = new AutoCreator<>(PlaceReport.class);
|
||||
}
|
||||
|
@ -1,36 +1,10 @@
|
||||
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.AutoSafeParcelable;
|
||||
|
||||
/**
|
||||
* 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<PlaceRequest> CREATOR = new Creator<PlaceRequest>() {
|
||||
@Override
|
||||
public PlaceRequest createFromParcel(Parcel parcel) {
|
||||
return new PlaceRequest(parcel);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PlaceRequest[] newArray(int i) {
|
||||
return new PlaceRequest[i];
|
||||
}
|
||||
};
|
||||
public class PlaceRequest extends AutoSafeParcelable {
|
||||
public static final Creator<PlaceRequest> CREATOR = new AutoCreator<>(PlaceRequest.class);
|
||||
}
|
||||
|
@ -1,46 +1,19 @@
|
||||
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.AutoSafeParcelable;
|
||||
import org.microg.safeparcel.SafeParceled;
|
||||
|
||||
/**
|
||||
* TODO: usage
|
||||
*/
|
||||
public class UserAddedPlace implements SafeParcelable {
|
||||
public class UserAddedPlace extends AutoSafeParcelable {
|
||||
|
||||
@SafeParceled(1000)
|
||||
private final int versionCode;
|
||||
|
||||
private UserAddedPlace() {
|
||||
versionCode = -1;
|
||||
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<UserAddedPlace> CREATOR = new Creator<UserAddedPlace>() {
|
||||
@Override
|
||||
public UserAddedPlace createFromParcel(Parcel parcel) {
|
||||
return new UserAddedPlace(parcel);
|
||||
}
|
||||
|
||||
@Override
|
||||
public UserAddedPlace[] newArray(int i) {
|
||||
return new UserAddedPlace[i];
|
||||
}
|
||||
};
|
||||
public static final Creator<UserAddedPlace> CREATOR = new AutoCreator<>(UserAddedPlace.class);
|
||||
}
|
||||
|
@ -1,36 +1,11 @@
|
||||
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.AutoSafeParcelable;
|
||||
|
||||
/**
|
||||
* TODO: usage
|
||||
*/
|
||||
public class UserDataType implements SafeParcelable {
|
||||
private UserDataType(Parcel in) {
|
||||
SafeParcelUtil.readObject(this, in);
|
||||
}
|
||||
public class UserDataType extends AutoSafeParcelable {
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToParcel(Parcel out, int flags) {
|
||||
SafeParcelUtil.writeObject(this, out, flags);
|
||||
}
|
||||
|
||||
public static final Creator<UserDataType> CREATOR = new Creator<UserDataType>() {
|
||||
@Override
|
||||
public UserDataType createFromParcel(Parcel parcel) {
|
||||
return new UserDataType(parcel);
|
||||
}
|
||||
|
||||
@Override
|
||||
public UserDataType[] newArray(int i) {
|
||||
return new UserDataType[i];
|
||||
}
|
||||
};
|
||||
public static final Creator<UserDataType> CREATOR = new AutoCreator<>(UserDataType.class);
|
||||
}
|
||||
|
@ -1,11 +1,9 @@
|
||||
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.AutoSafeParcelable;
|
||||
import org.microg.safeparcel.SafeParceled;
|
||||
|
||||
public class PlacesParams implements SafeParcelable {
|
||||
public class PlacesParams extends AutoSafeParcelable {
|
||||
|
||||
@SafeParceled(1000)
|
||||
private final int versionCode;
|
||||
@ -19,34 +17,9 @@ public class PlacesParams implements SafeParcelable {
|
||||
public final String gCoreClientName;
|
||||
|
||||
private PlacesParams() {
|
||||
versionCode = -1;
|
||||
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<PlacesParams> CREATOR = new Creator<PlacesParams>() {
|
||||
@Override
|
||||
public PlacesParams createFromParcel(Parcel parcel) {
|
||||
return new PlacesParams(parcel);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PlacesParams[] newArray(int i) {
|
||||
return new PlacesParams[i];
|
||||
}
|
||||
};
|
||||
public static final Creator<PlacesParams> CREATOR = new AutoCreator<>(PlacesParams.class);
|
||||
}
|
||||
|
@ -16,13 +16,11 @@
|
||||
|
||||
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.AutoSafeParcelable;
|
||||
import org.microg.safeparcel.SafeParceled;
|
||||
|
||||
public final class GoogleMapOptions implements SafeParcelable {
|
||||
public final class GoogleMapOptions extends AutoSafeParcelable {
|
||||
@SafeParceled(1)
|
||||
private int versionCode;
|
||||
@SafeParceled(2)
|
||||
@ -46,23 +44,9 @@ public final class GoogleMapOptions implements SafeParcelable {
|
||||
@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;
|
||||
}
|
||||
@ -95,13 +79,5 @@ public final class GoogleMapOptions implements SafeParcelable {
|
||||
return rotateGesturesEnabled;
|
||||
}
|
||||
|
||||
public static Creator<GoogleMapOptions> CREATOR = new Creator<GoogleMapOptions>() {
|
||||
public GoogleMapOptions createFromParcel(Parcel source) {
|
||||
return new GoogleMapOptions(source);
|
||||
}
|
||||
|
||||
public GoogleMapOptions[] newArray(int size) {
|
||||
return new GoogleMapOptions[size];
|
||||
}
|
||||
};
|
||||
public static Creator<GoogleMapOptions> CREATOR = new AutoCreator<>(GoogleMapOptions.class);
|
||||
}
|
||||
|
@ -17,10 +17,8 @@
|
||||
package com.google.android.gms.maps.model;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Parcel;
|
||||
import android.util.AttributeSet;
|
||||
import org.microg.safeparcel.SafeParcelUtil;
|
||||
import org.microg.safeparcel.SafeParcelable;
|
||||
import org.microg.safeparcel.AutoSafeParcelable;
|
||||
import org.microg.safeparcel.SafeParceled;
|
||||
|
||||
import java.util.Arrays;
|
||||
@ -28,7 +26,7 @@ import java.util.Arrays;
|
||||
/**
|
||||
* An immutable class that aggregates all camera position parameters.
|
||||
*/
|
||||
public final class CameraPosition implements SafeParcelable {
|
||||
public final class CameraPosition extends AutoSafeParcelable {
|
||||
@SafeParceled(1)
|
||||
private final int versionCode;
|
||||
/**
|
||||
@ -60,17 +58,10 @@ public final class CameraPosition implements SafeParcelable {
|
||||
*/
|
||||
private CameraPosition() {
|
||||
target = null;
|
||||
versionCode = -1;
|
||||
versionCode = 1;
|
||||
zoom = tilt = bearing = 0;
|
||||
}
|
||||
|
||||
private CameraPosition(Parcel in) {
|
||||
this();
|
||||
SafeParcelUtil.readObject(this, in);
|
||||
if (target == null)
|
||||
throw new NullPointerException("Target must not be null");
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a CameraPosition.
|
||||
*
|
||||
@ -126,11 +117,6 @@ public final class CameraPosition implements SafeParcelable {
|
||||
return null; // TODO
|
||||
}
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o)
|
||||
@ -181,20 +167,7 @@ public final class CameraPosition implements SafeParcelable {
|
||||
'}';
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToParcel(Parcel out, int flags) {
|
||||
SafeParcelUtil.writeObject(this, out, flags);
|
||||
}
|
||||
|
||||
public static Creator<CameraPosition> CREATOR = new Creator<CameraPosition>() {
|
||||
public CameraPosition createFromParcel(Parcel source) {
|
||||
return new CameraPosition(source);
|
||||
}
|
||||
|
||||
public CameraPosition[] newArray(int size) {
|
||||
return new CameraPosition[size];
|
||||
}
|
||||
};
|
||||
public static Creator<CameraPosition> CREATOR = new AutoCreator<>(CameraPosition.class);
|
||||
|
||||
/**
|
||||
* Builds camera position.
|
||||
|
@ -17,15 +17,13 @@
|
||||
package com.google.android.gms.maps.model;
|
||||
|
||||
import android.graphics.Color;
|
||||
import android.os.Parcel;
|
||||
import org.microg.safeparcel.SafeParcelUtil;
|
||||
import org.microg.safeparcel.SafeParcelable;
|
||||
import org.microg.safeparcel.AutoSafeParcelable;
|
||||
import org.microg.safeparcel.SafeParceled;
|
||||
|
||||
/**
|
||||
* Defines options for a Circle.
|
||||
*/
|
||||
public class CircleOptions implements SafeParcelable {
|
||||
public class CircleOptions extends AutoSafeParcelable {
|
||||
@SafeParceled(1)
|
||||
private int versionCode;
|
||||
@SafeParceled(2)
|
||||
@ -49,15 +47,6 @@ public class CircleOptions implements SafeParcelable {
|
||||
public CircleOptions() {
|
||||
}
|
||||
|
||||
private CircleOptions(Parcel in) {
|
||||
SafeParcelUtil.readObject(this, in);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the center using a {@link LatLng}.
|
||||
* <p/>
|
||||
@ -210,11 +199,6 @@ public class CircleOptions implements SafeParcelable {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToParcel(Parcel out, int flags) {
|
||||
SafeParcelUtil.writeObject(this, out, flags);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the zIndex.
|
||||
* <p/>
|
||||
@ -230,13 +214,5 @@ public class CircleOptions implements SafeParcelable {
|
||||
return this;
|
||||
}
|
||||
|
||||
public static Creator<CircleOptions> CREATOR = new Creator<CircleOptions>() {
|
||||
public CircleOptions createFromParcel(Parcel source) {
|
||||
return new CircleOptions(source);
|
||||
}
|
||||
|
||||
public CircleOptions[] newArray(int size) {
|
||||
return new CircleOptions[size];
|
||||
}
|
||||
};
|
||||
public static Creator<CircleOptions> CREATOR = new AutoCreator<>(CircleOptions.class);
|
||||
}
|
||||
|
@ -17,16 +17,14 @@
|
||||
package com.google.android.gms.maps.model;
|
||||
|
||||
import android.os.IBinder;
|
||||
import android.os.Parcel;
|
||||
import com.google.android.gms.dynamic.ObjectWrapper;
|
||||
import org.microg.safeparcel.SafeParcelUtil;
|
||||
import org.microg.safeparcel.SafeParcelable;
|
||||
import org.microg.safeparcel.AutoSafeParcelable;
|
||||
import org.microg.safeparcel.SafeParceled;
|
||||
|
||||
/**
|
||||
* Defines options for a ground overlay.
|
||||
*/
|
||||
public class GroundOverlayOptions implements SafeParcelable {
|
||||
public class GroundOverlayOptions extends AutoSafeParcelable {
|
||||
/**
|
||||
* Flag for when no dimension is specified for the height.
|
||||
*/
|
||||
@ -64,10 +62,6 @@ public class GroundOverlayOptions implements SafeParcelable {
|
||||
public GroundOverlayOptions() {
|
||||
}
|
||||
|
||||
private GroundOverlayOptions(Parcel in) {
|
||||
SafeParcelUtil.readObject(this, in);
|
||||
}
|
||||
|
||||
/**
|
||||
* Specifies the anchor to be at a particular point in the image.
|
||||
* <p/>
|
||||
@ -104,11 +98,6 @@ public class GroundOverlayOptions implements SafeParcelable {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Horizontal distance, normalized to [0, 1], of the anchor from the left edge.
|
||||
*
|
||||
@ -333,11 +322,6 @@ public class GroundOverlayOptions implements SafeParcelable {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToParcel(Parcel out, int flags) {
|
||||
SafeParcelUtil.writeObject(this, out, flags);
|
||||
}
|
||||
|
||||
/**
|
||||
* Specifies the ground overlay's zIndex, i.e., the order in which it will be drawn. See the
|
||||
* documentation at the top of this class for more information about zIndex.
|
||||
@ -349,13 +333,6 @@ public class GroundOverlayOptions implements SafeParcelable {
|
||||
return this;
|
||||
}
|
||||
|
||||
public static Creator<GroundOverlayOptions> CREATOR = new Creator<GroundOverlayOptions>() {
|
||||
public GroundOverlayOptions createFromParcel(Parcel source) {
|
||||
return new GroundOverlayOptions(source);
|
||||
}
|
||||
|
||||
public GroundOverlayOptions[] newArray(int size) {
|
||||
return new GroundOverlayOptions[size];
|
||||
}
|
||||
};
|
||||
public static Creator<GroundOverlayOptions> CREATOR = new AutoCreator<>(
|
||||
GroundOverlayOptions.class);
|
||||
}
|
||||
|
@ -16,15 +16,13 @@
|
||||
|
||||
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.AutoSafeParcelable;
|
||||
import org.microg.safeparcel.SafeParceled;
|
||||
|
||||
/**
|
||||
* An immutable class representing a pair of latitude and longitude coordinates, stored as degrees.
|
||||
*/
|
||||
public final class LatLng implements SafeParcelable {
|
||||
public final class LatLng extends AutoSafeParcelable {
|
||||
@SafeParceled(1)
|
||||
private final int versionCode;
|
||||
/**
|
||||
@ -43,15 +41,10 @@ public final class LatLng implements SafeParcelable {
|
||||
* In fact, those are replaced by their real values later using SafeParcelUtil.
|
||||
*/
|
||||
private LatLng() {
|
||||
versionCode = -1;
|
||||
versionCode = 1;
|
||||
latitude = longitude = 0;
|
||||
}
|
||||
|
||||
private LatLng(Parcel in) {
|
||||
this();
|
||||
SafeParcelUtil.readObject(this, in);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a LatLng with the given latitude and longitude, measured in degrees.
|
||||
*
|
||||
@ -107,23 +100,5 @@ public final class LatLng implements SafeParcelable {
|
||||
return "lat/lng: (" + latitude + "," + longitude + ")";
|
||||
}
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToParcel(Parcel out, int flags) {
|
||||
SafeParcelUtil.writeObject(this, out, flags);
|
||||
}
|
||||
|
||||
public static Creator<LatLng> CREATOR = new Creator<LatLng>() {
|
||||
public LatLng createFromParcel(Parcel source) {
|
||||
return new LatLng(source);
|
||||
}
|
||||
|
||||
public LatLng[] newArray(int size) {
|
||||
return new LatLng[size];
|
||||
}
|
||||
};
|
||||
public static Creator<LatLng> CREATOR = new AutoCreator<>(LatLng.class);
|
||||
}
|
||||
|
@ -16,9 +16,7 @@
|
||||
|
||||
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.AutoSafeParcelable;
|
||||
import org.microg.safeparcel.SafeParceled;
|
||||
|
||||
import java.util.Arrays;
|
||||
@ -26,7 +24,7 @@ import java.util.Arrays;
|
||||
/**
|
||||
* An immutable class representing a latitude/longitude aligned rectangle.
|
||||
*/
|
||||
public final class LatLngBounds implements SafeParcelable {
|
||||
public final class LatLngBounds extends AutoSafeParcelable {
|
||||
@SafeParceled(1)
|
||||
private final int versionCode;
|
||||
/**
|
||||
@ -45,15 +43,10 @@ public final class LatLngBounds implements SafeParcelable {
|
||||
* In fact, those are replaced by their real values later using SafeParcelUtil.
|
||||
*/
|
||||
private LatLngBounds() {
|
||||
this.versionCode = -1;
|
||||
this.versionCode = 1;
|
||||
southwest = northeast = null;
|
||||
}
|
||||
|
||||
private LatLngBounds(Parcel in) {
|
||||
this();
|
||||
SafeParcelUtil.readObject(this, in);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new bounds based on a southwest and a northeast corner.
|
||||
* <p/>
|
||||
@ -110,11 +103,6 @@ public final class LatLngBounds implements SafeParcelable {
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o)
|
||||
@ -190,20 +178,7 @@ public final class LatLngBounds implements SafeParcelable {
|
||||
'}';
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToParcel(Parcel out, int flags) {
|
||||
SafeParcelUtil.writeObject(this, out, flags);
|
||||
}
|
||||
|
||||
public static Creator<LatLngBounds> CREATOR = new Creator<LatLngBounds>() {
|
||||
public LatLngBounds createFromParcel(Parcel source) {
|
||||
return new LatLngBounds(source);
|
||||
}
|
||||
|
||||
public LatLngBounds[] newArray(int size) {
|
||||
return new LatLngBounds[size];
|
||||
}
|
||||
};
|
||||
public static Creator<LatLngBounds> CREATOR = new AutoCreator<>(LatLngBounds.class);
|
||||
|
||||
/**
|
||||
* This is a builder that is able to create a minimum bound based on a set of LatLng points.
|
||||
|
@ -17,13 +17,11 @@
|
||||
package com.google.android.gms.maps.model;
|
||||
|
||||
import android.os.IBinder;
|
||||
import android.os.Parcel;
|
||||
import com.google.android.gms.dynamic.ObjectWrapper;
|
||||
import org.microg.safeparcel.SafeParcelUtil;
|
||||
import org.microg.safeparcel.SafeParcelable;
|
||||
import org.microg.safeparcel.AutoSafeParcelable;
|
||||
import org.microg.safeparcel.SafeParceled;
|
||||
|
||||
public class MarkerOptions implements SafeParcelable {
|
||||
public class MarkerOptions extends AutoSafeParcelable {
|
||||
|
||||
@SafeParceled(1)
|
||||
private int versionCode = 1;
|
||||
@ -64,15 +62,6 @@ public class MarkerOptions implements SafeParcelable {
|
||||
public MarkerOptions() {
|
||||
}
|
||||
|
||||
private MarkerOptions(Parcel in) {
|
||||
SafeParcelUtil.readObject(this, in);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the alpha (opacity) of the marker. This is a value from 0 to 1, where 0 means the
|
||||
* marker is completely transparent and 1 means the marker is completely opaque.
|
||||
@ -334,18 +323,5 @@ public class MarkerOptions implements SafeParcelable {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToParcel(Parcel dest, int flags) {
|
||||
SafeParcelUtil.writeObject(this, dest, flags);
|
||||
}
|
||||
|
||||
public static Creator<MarkerOptions> CREATOR = new Creator<MarkerOptions>() {
|
||||
public MarkerOptions createFromParcel(Parcel source) {
|
||||
return new MarkerOptions(source);
|
||||
}
|
||||
|
||||
public MarkerOptions[] newArray(int size) {
|
||||
return new MarkerOptions[size];
|
||||
}
|
||||
};
|
||||
public static Creator<MarkerOptions> CREATOR = new AutoCreator<>(MarkerOptions.class);
|
||||
}
|
||||
|
@ -16,39 +16,15 @@
|
||||
|
||||
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.AutoSafeParcelable;
|
||||
|
||||
/**
|
||||
* Defines options for a polygon.
|
||||
* TODO
|
||||
*/
|
||||
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 class PolygonOptions extends AutoSafeParcelable {
|
||||
public PolygonOptions() {
|
||||
}
|
||||
|
||||
private PolygonOptions(Parcel in) {
|
||||
SafeParcelUtil.readObject(this, in);
|
||||
}
|
||||
|
||||
public static Creator<PolygonOptions> CREATOR = new Creator<PolygonOptions>() {
|
||||
public PolygonOptions createFromParcel(Parcel source) {
|
||||
return new PolygonOptions(source);
|
||||
}
|
||||
|
||||
public PolygonOptions[] newArray(int size) {
|
||||
return new PolygonOptions[size];
|
||||
}
|
||||
};
|
||||
public static Creator<PolygonOptions> CREATOR = new AutoCreator<>(PolygonOptions.class);
|
||||
}
|
||||
|
@ -16,9 +16,7 @@
|
||||
|
||||
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.AutoSafeParcelable;
|
||||
import org.microg.safeparcel.SafeParceled;
|
||||
|
||||
import java.util.List;
|
||||
@ -27,7 +25,7 @@ import java.util.List;
|
||||
* Defines options for a polyline.
|
||||
* TODO
|
||||
*/
|
||||
public class PolylineOptions implements SafeParcelable {
|
||||
public class PolylineOptions extends AutoSafeParcelable {
|
||||
@SafeParceled(1)
|
||||
private int versionCode;
|
||||
// TODO
|
||||
@ -41,27 +39,5 @@ public class PolylineOptions implements SafeParcelable {
|
||||
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<PolylineOptions> CREATOR = new Creator<PolylineOptions>() {
|
||||
public PolylineOptions createFromParcel(Parcel source) {
|
||||
return new PolylineOptions(source);
|
||||
}
|
||||
|
||||
public PolylineOptions[] newArray(int size) {
|
||||
return new PolylineOptions[size];
|
||||
}
|
||||
};
|
||||
public static Creator<PolylineOptions> CREATOR = new AutoCreator<>(PolylineOptions.class);
|
||||
}
|
||||
|
@ -1,15 +1,13 @@
|
||||
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.AutoSafeParcelable;
|
||||
import org.microg.safeparcel.SafeParceled;
|
||||
|
||||
/**
|
||||
* Contains information about a Tile that is returned by a {@link TileProvider}.
|
||||
* TODO SafeParceled
|
||||
*/
|
||||
public class Tile implements SafeParcelable {
|
||||
public class Tile extends AutoSafeParcelable {
|
||||
@SafeParceled(1)
|
||||
private final int versionCode;
|
||||
/**
|
||||
@ -30,16 +28,11 @@ public class Tile implements SafeParcelable {
|
||||
public final byte[] data;
|
||||
|
||||
private Tile() {
|
||||
versionCode = -1;
|
||||
versionCode = 1;
|
||||
width = height = 0;
|
||||
data = null;
|
||||
}
|
||||
|
||||
private Tile(Parcel in) {
|
||||
this();
|
||||
SafeParcelUtil.readObject(this, in);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a {@link Tile}.
|
||||
*
|
||||
@ -56,23 +49,5 @@ public class Tile implements SafeParcelable {
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToParcel(Parcel out, int flags) {
|
||||
SafeParcelUtil.writeObject(this, out, flags);
|
||||
}
|
||||
|
||||
public static Creator<Tile> CREATOR = new Creator<Tile>() {
|
||||
public Tile createFromParcel(Parcel source) {
|
||||
return new Tile(source);
|
||||
}
|
||||
|
||||
public Tile[] newArray(int size) {
|
||||
return new Tile[size];
|
||||
}
|
||||
};
|
||||
public static Creator<Tile> CREATOR = new AutoCreator<>(Tile.class);
|
||||
}
|
||||
|
@ -17,17 +17,15 @@
|
||||
package com.google.android.gms.maps.model;
|
||||
|
||||
import android.os.IBinder;
|
||||
import android.os.Parcel;
|
||||
import android.os.RemoteException;
|
||||
import com.google.android.gms.maps.model.internal.ITileProviderDelegate;
|
||||
import org.microg.safeparcel.SafeParcelUtil;
|
||||
import org.microg.safeparcel.SafeParcelable;
|
||||
import org.microg.safeparcel.AutoSafeParcelable;
|
||||
import org.microg.safeparcel.SafeParceled;
|
||||
|
||||
/**
|
||||
* Defines options for a TileOverlay.
|
||||
*/
|
||||
public class TileOverlayOptions implements SafeParcelable {
|
||||
public class TileOverlayOptions extends AutoSafeParcelable {
|
||||
|
||||
@SafeParceled(1)
|
||||
private final int versionCode = 1;
|
||||
@ -50,15 +48,6 @@ public class TileOverlayOptions implements SafeParcelable {
|
||||
public TileOverlayOptions() {
|
||||
}
|
||||
|
||||
private TileOverlayOptions(Parcel in) {
|
||||
SafeParcelUtil.readObject(this, in);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Specifies whether the tiles should fade in. The default is {@code true}.
|
||||
*
|
||||
@ -132,11 +121,6 @@ public class TileOverlayOptions implements SafeParcelable {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToParcel(Parcel dest, int flags) {
|
||||
SafeParcelUtil.writeObject(this, dest, flags);
|
||||
}
|
||||
|
||||
/**
|
||||
* Specifies the tile overlay's zIndex, i.e., the order in which it will be drawn where
|
||||
* overlays with larger values are drawn above those with lower values. See the documentation
|
||||
@ -149,13 +133,5 @@ public class TileOverlayOptions implements SafeParcelable {
|
||||
return this;
|
||||
}
|
||||
|
||||
public static Creator<TileOverlayOptions> CREATOR = new Creator<TileOverlayOptions>() {
|
||||
public TileOverlayOptions createFromParcel(Parcel source) {
|
||||
return new TileOverlayOptions(source);
|
||||
}
|
||||
|
||||
public TileOverlayOptions[] newArray(int size) {
|
||||
return new TileOverlayOptions[size];
|
||||
}
|
||||
};
|
||||
public static Creator<TileOverlayOptions> CREATOR = new AutoCreator<>(TileOverlayOptions.class);
|
||||
}
|
||||
|
@ -16,12 +16,10 @@
|
||||
|
||||
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.AutoSafeParcelable;
|
||||
import org.microg.safeparcel.SafeParceled;
|
||||
|
||||
public class VisibleRegion implements SafeParcelable {
|
||||
public class VisibleRegion extends AutoSafeParcelable {
|
||||
@SafeParceled(1)
|
||||
private int versionCode;
|
||||
@SafeParceled(2)
|
||||
@ -35,6 +33,9 @@ public class VisibleRegion implements SafeParcelable {
|
||||
@SafeParceled(6)
|
||||
private LatLngBounds bounds;
|
||||
|
||||
private VisibleRegion() {
|
||||
}
|
||||
|
||||
public VisibleRegion(int versionCode, LatLng nearLeft, LatLng nearRight, LatLng farLeft,
|
||||
LatLng farRight, LatLngBounds bounds) {
|
||||
this.versionCode = versionCode;
|
||||
@ -60,27 +61,5 @@ public class VisibleRegion implements SafeParcelable {
|
||||
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<VisibleRegion> CREATOR = new Creator<VisibleRegion>() {
|
||||
public VisibleRegion createFromParcel(Parcel source) {
|
||||
return new VisibleRegion(source);
|
||||
}
|
||||
|
||||
public VisibleRegion[] newArray(int size) {
|
||||
return new VisibleRegion[size];
|
||||
}
|
||||
};
|
||||
public static Creator<VisibleRegion> CREATOR = new AutoCreator<>(VisibleRegion.class);
|
||||
}
|
||||
|
@ -8,6 +8,7 @@ public class Constants {
|
||||
public static final int MAX_REFERENCE_VERSION = 6599436;
|
||||
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";
|
||||
public static final String DEFAULT_ACCOUNT = "<<default account>>";
|
||||
|
||||
/**
|
||||
* No base map tiles.
|
||||
|
Loading…
Reference in New Issue
Block a user