mirror of
https://github.com/TeamVanced/VancedMicroG
synced 2025-01-06 01:26:04 +01:00
Update SafeParcel, Add PolylineOptions
This commit is contained in:
parent
0890bf4546
commit
28ff7f36f2
2
extern/SafeParcel
vendored
2
extern/SafeParcel
vendored
@ -1 +1 @@
|
|||||||
Subproject commit ef1568e2614f29c3f13a6b6536989aba7f1a1b5d
|
Subproject commit e0556cbfac91c0d42bbca4119aa712638a925d6b
|
@ -25,7 +25,7 @@ import java.util.List;
|
|||||||
public class AccountChangeEventsResponse extends AutoSafeParcelable {
|
public class AccountChangeEventsResponse extends AutoSafeParcelable {
|
||||||
@SafeParceled(1)
|
@SafeParceled(1)
|
||||||
private int versionCode = 1;
|
private int versionCode = 1;
|
||||||
@SafeParceled(value = 2, subType = "com.google.android.gms.auth.AccountChangeEvent")
|
@SafeParceled(value = 2, subClass = AccountChangeEvent.class)
|
||||||
private List<AccountChangeEvent> events;
|
private List<AccountChangeEvent> events;
|
||||||
|
|
||||||
public AccountChangeEventsResponse() {
|
public AccountChangeEventsResponse() {
|
||||||
|
@ -16,10 +16,13 @@
|
|||||||
|
|
||||||
package com.google.android.gms.maps.model;
|
package com.google.android.gms.maps.model;
|
||||||
|
|
||||||
|
import android.graphics.Color;
|
||||||
|
|
||||||
import org.microg.gms.common.PublicApi;
|
import org.microg.gms.common.PublicApi;
|
||||||
import org.microg.safeparcel.AutoSafeParcelable;
|
import org.microg.safeparcel.AutoSafeParcelable;
|
||||||
import org.microg.safeparcel.SafeParceled;
|
import org.microg.safeparcel.SafeParceled;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -29,17 +32,90 @@ import java.util.List;
|
|||||||
@PublicApi
|
@PublicApi
|
||||||
public class PolylineOptions extends AutoSafeParcelable {
|
public class PolylineOptions extends AutoSafeParcelable {
|
||||||
@SafeParceled(1)
|
@SafeParceled(1)
|
||||||
private int versionCode;
|
private int versionCode = 1;
|
||||||
// TODO
|
@SafeParceled(value = 2, subClass = LatLng.class)
|
||||||
private List<LatLng> points;
|
private List<LatLng> points = new ArrayList<LatLng>();
|
||||||
private float width;
|
@SafeParceled(3)
|
||||||
private int color;
|
private float width = 10;
|
||||||
private float zIndex;
|
@SafeParceled(4)
|
||||||
private boolean visible;
|
private int color = Color.BLACK;
|
||||||
private boolean geodesic;
|
@SafeParceled(5)
|
||||||
|
private float zIndex = 0;
|
||||||
|
@SafeParceled(6)
|
||||||
|
private boolean visible = true;
|
||||||
|
@SafeParceled(7)
|
||||||
|
private boolean geodesic = false;
|
||||||
|
|
||||||
public PolylineOptions() {
|
public PolylineOptions() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public PolylineOptions add(LatLng point) {
|
||||||
|
points.add(point);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public PolylineOptions add(LatLng... points) {
|
||||||
|
for (LatLng point : points) {
|
||||||
|
this.points.add(point);
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public PolylineOptions addAll(Iterable<LatLng> points) {
|
||||||
|
for (LatLng point : points) {
|
||||||
|
this.points.add(point);
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public PolylineOptions color(int color) {
|
||||||
|
this.color = color;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public PolylineOptions geodesic(boolean geodesic) {
|
||||||
|
this.geodesic = geodesic;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getColor() {
|
||||||
|
return color;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<LatLng> getPoints() {
|
||||||
|
return points;
|
||||||
|
}
|
||||||
|
|
||||||
|
public float getWidth() {
|
||||||
|
return width;
|
||||||
|
}
|
||||||
|
|
||||||
|
public float getZIndex() {
|
||||||
|
return zIndex;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isGeodesic() {
|
||||||
|
return geodesic;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isVisible() {
|
||||||
|
return visible;
|
||||||
|
}
|
||||||
|
|
||||||
|
public PolylineOptions visible(boolean visible) {
|
||||||
|
this.visible = visible;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public PolylineOptions width(float width) {
|
||||||
|
this.width = width;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public PolylineOptions zIndex(float zIndex) {
|
||||||
|
this.zIndex = zIndex;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
public static Creator<PolylineOptions> CREATOR = new AutoCreator<PolylineOptions>(PolylineOptions.class);
|
public static Creator<PolylineOptions> CREATOR = new AutoCreator<PolylineOptions>(PolylineOptions.class);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user