mirror of
https://github.com/YTVanced/VancedMicroG
synced 2024-11-24 04:05:13 +00:00
Adding some wearable APIs and various smaller changes
This commit is contained in:
parent
2c847ce6e8
commit
f77b09dc0c
64 changed files with 774 additions and 98 deletions
2
extern/SafeParcel
vendored
2
extern/SafeParcel
vendored
|
@ -1 +1 @@
|
||||||
Subproject commit cfbcc9db09d98a2d32e996f5ff9fe587aa9f21f4
|
Subproject commit ef1568e2614f29c3f13a6b6536989aba7f1a1b5d
|
|
@ -0,0 +1,3 @@
|
||||||
|
package com.google.android.gms.common.api;
|
||||||
|
|
||||||
|
parcelable Status;
|
|
@ -0,0 +1,3 @@
|
||||||
|
package com.google.android.gms.wearable;
|
||||||
|
|
||||||
|
parcelable AddListenerRequest;
|
|
@ -0,0 +1,3 @@
|
||||||
|
package com.google.android.gms.wearable;
|
||||||
|
|
||||||
|
parcelable ConnectionConfiguration;
|
|
@ -0,0 +1,3 @@
|
||||||
|
package com.google.android.gms.wearable;
|
||||||
|
|
||||||
|
parcelable DeleteDataItemsResponse;
|
|
@ -0,0 +1,3 @@
|
||||||
|
package com.google.android.gms.wearable;
|
||||||
|
|
||||||
|
parcelable GetConfigResponse;
|
|
@ -0,0 +1,3 @@
|
||||||
|
package com.google.android.gms.wearable;
|
||||||
|
|
||||||
|
parcelable GetConfigsResponse;
|
|
@ -0,0 +1,3 @@
|
||||||
|
package com.google.android.gms.wearable;
|
||||||
|
|
||||||
|
parcelable GetConnectedNodesResponse;
|
|
@ -0,0 +1,3 @@
|
||||||
|
package com.google.android.gms.wearable;
|
||||||
|
|
||||||
|
parcelable GetDataItemResponse;
|
|
@ -0,0 +1,3 @@
|
||||||
|
package com.google.android.gms.wearable;
|
||||||
|
|
||||||
|
parcelable GetFdForAssetResponse;
|
|
@ -0,0 +1,3 @@
|
||||||
|
package com.google.android.gms.wearable;
|
||||||
|
|
||||||
|
parcelable GetLocalNodeResponse;
|
|
@ -0,0 +1,3 @@
|
||||||
|
package com.google.android.gms.wearable;
|
||||||
|
|
||||||
|
parcelable PutDataRequest;
|
|
@ -0,0 +1,3 @@
|
||||||
|
package com.google.android.gms.wearable;
|
||||||
|
|
||||||
|
parcelable PutDataResponse;
|
|
@ -0,0 +1,3 @@
|
||||||
|
package com.google.android.gms.wearable;
|
||||||
|
|
||||||
|
parcelable RemoveListenerRequest;
|
|
@ -0,0 +1,3 @@
|
||||||
|
package com.google.android.gms.wearable;
|
||||||
|
|
||||||
|
parcelable SendMessageResponse;
|
|
@ -0,0 +1,3 @@
|
||||||
|
package com.google.android.gms.wearable;
|
||||||
|
|
||||||
|
parcelable StorageInfoResponse;
|
|
@ -0,0 +1,29 @@
|
||||||
|
package com.google.android.gms.wearable.internal;
|
||||||
|
|
||||||
|
import com.google.android.gms.common.api.Status;
|
||||||
|
import com.google.android.gms.common.data.DataHolder;
|
||||||
|
import com.google.android.gms.wearable.DeleteDataItemsResponse;
|
||||||
|
import com.google.android.gms.wearable.GetConfigResponse;
|
||||||
|
import com.google.android.gms.wearable.GetConfigsResponse;
|
||||||
|
import com.google.android.gms.wearable.GetConnectedNodesResponse;
|
||||||
|
import com.google.android.gms.wearable.GetDataItemResponse;
|
||||||
|
import com.google.android.gms.wearable.GetFdForAssetResponse;
|
||||||
|
import com.google.android.gms.wearable.GetLocalNodeResponse;
|
||||||
|
import com.google.android.gms.wearable.PutDataResponse;
|
||||||
|
import com.google.android.gms.wearable.SendMessageResponse;
|
||||||
|
import com.google.android.gms.wearable.StorageInfoResponse;
|
||||||
|
|
||||||
|
interface IWearableCallbacks {
|
||||||
|
void onGetConfigResponse(in GetConfigResponse response) = 1;
|
||||||
|
void onPutDataResponse(in PutDataResponse response) = 2;
|
||||||
|
void onGetDataItemResponse(in GetDataItemResponse response) = 3;
|
||||||
|
void onDataHolder(in DataHolder dataHolder) = 4;
|
||||||
|
void onDeleteDataItemsResponse(in DeleteDataItemsResponse response) = 5;
|
||||||
|
void onSendMessageResponse(in SendMessageResponse response) = 6;
|
||||||
|
void onGetFdForAssetResponse(in GetFdForAssetResponse response) = 7;
|
||||||
|
void onGetLocalNodeResponse(in GetLocalNodeResponse response) = 8;
|
||||||
|
void onGetConnectedNodesResponse(in GetConnectedNodesResponse response) = 9;
|
||||||
|
void onStatus(in Status status) = 10;
|
||||||
|
void onStorageInfoResponse(in StorageInfoResponse response) = 11;
|
||||||
|
void onGetConfigsResponse(in GetConfigsResponse response) = 12;
|
||||||
|
}
|
|
@ -0,0 +1,5 @@
|
||||||
|
package com.google.android.gms.wearable.internal;
|
||||||
|
|
||||||
|
interface IWearableListener {
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,23 @@
|
||||||
|
package com.google.android.gms.wearable.internal;
|
||||||
|
|
||||||
|
import com.google.android.gms.wearable.AddListenerRequest;
|
||||||
|
import com.google.android.gms.wearable.ConnectionConfiguration;
|
||||||
|
import com.google.android.gms.wearable.PutDataRequest;
|
||||||
|
import com.google.android.gms.wearable.RemoveListenerRequest;
|
||||||
|
import com.google.android.gms.wearable.internal.IWearableCallbacks;
|
||||||
|
import com.google.android.gms.wearable.internal.IWearableService;
|
||||||
|
|
||||||
|
interface IWearableService {
|
||||||
|
void getConfig(IWearableCallbacks callbacks) = 2;
|
||||||
|
void putData(IWearableCallbacks callbacks, in PutDataRequest request) = 5;
|
||||||
|
void getDataItem(IWearableCallbacks callbacks, in Uri uri) = 6;
|
||||||
|
void getDataItems(IWearableCallbacks callbacks) = 7;
|
||||||
|
void getLocalNode(IWearableCallbacks callbacks) = 13;
|
||||||
|
void getConnectedNodes(IWearableCallbacks callbacks) = 14;
|
||||||
|
void addListener(IWearableCallbacks callbacks, in AddListenerRequest request) = 15;
|
||||||
|
void removeListener(IWearableCallbacks callbacks, in RemoveListenerRequest request) = 16;
|
||||||
|
void putConfig(IWearableCallbacks callbacks, in ConnectionConfiguration config) = 19;
|
||||||
|
void getConfigs(IWearableCallbacks callbacks) = 21;
|
||||||
|
void getDataItemsByUri(IWearableCallbacks callbacks, in Uri uri, int i) = 39;
|
||||||
|
void deleteDataItems(IWearableCallbacks callbacks, in Uri uri) = 40;
|
||||||
|
}
|
|
@ -24,7 +24,7 @@ import org.microg.safeparcel.SafeParceled;
|
||||||
public class CorpusStatus extends AutoSafeParcelable {
|
public class CorpusStatus extends AutoSafeParcelable {
|
||||||
|
|
||||||
@SafeParceled(1000)
|
@SafeParceled(1000)
|
||||||
private int versionCode = 2;
|
private int versionCode;
|
||||||
@SafeParceled(1)
|
@SafeParceled(1)
|
||||||
public boolean found;
|
public boolean found;
|
||||||
@SafeParceled(2)
|
@SafeParceled(2)
|
||||||
|
@ -38,5 +38,9 @@ public class CorpusStatus extends AutoSafeParcelable {
|
||||||
@SafeParceled(6)
|
@SafeParceled(6)
|
||||||
public String g;
|
public String g;
|
||||||
|
|
||||||
|
public CorpusStatus() {
|
||||||
|
versionCode = 2;
|
||||||
|
}
|
||||||
|
|
||||||
public static final Creator<CorpusStatus> CREATOR = new AutoCreator<CorpusStatus>(CorpusStatus.class);
|
public static final Creator<CorpusStatus> CREATOR = new AutoCreator<CorpusStatus>(CorpusStatus.class);
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,7 +21,7 @@ import org.microg.safeparcel.SafeParceled;
|
||||||
|
|
||||||
public class PIMEUpdateResponse extends AutoSafeParcelable {
|
public class PIMEUpdateResponse extends AutoSafeParcelable {
|
||||||
@SafeParceled(1000)
|
@SafeParceled(1000)
|
||||||
private int versionCode = 1;
|
private int versionCode;
|
||||||
|
|
||||||
@SafeParceled(1)
|
@SafeParceled(1)
|
||||||
private String b;
|
private String b;
|
||||||
|
@ -33,6 +33,7 @@ public class PIMEUpdateResponse extends AutoSafeParcelable {
|
||||||
public final PIMEUpdate[] updates;
|
public final PIMEUpdate[] updates;
|
||||||
|
|
||||||
public PIMEUpdateResponse() {
|
public PIMEUpdateResponse() {
|
||||||
|
versionCode = 1;
|
||||||
this.bytes = null;
|
this.bytes = null;
|
||||||
this.updates = new PIMEUpdate[0];
|
this.updates = new PIMEUpdate[0];
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,7 +24,7 @@ import java.util.List;
|
||||||
public class QuerySpecification extends AutoSafeParcelable {
|
public class QuerySpecification extends AutoSafeParcelable {
|
||||||
|
|
||||||
@SafeParceled(1000)
|
@SafeParceled(1000)
|
||||||
public final int versionCode;
|
private int versionCode = 2;
|
||||||
@SafeParceled(1)
|
@SafeParceled(1)
|
||||||
public final boolean b;
|
public final boolean b;
|
||||||
//@SafeParceled(value = 2, subType = "TODO")
|
//@SafeParceled(value = 2, subType = "TODO")
|
||||||
|
@ -43,7 +43,6 @@ public class QuerySpecification extends AutoSafeParcelable {
|
||||||
public final int i;
|
public final int i;
|
||||||
|
|
||||||
private QuerySpecification() {
|
private QuerySpecification() {
|
||||||
versionCode = 2;
|
|
||||||
b = false;
|
b = false;
|
||||||
c = null;
|
c = null;
|
||||||
d = null;
|
d = null;
|
||||||
|
|
|
@ -21,7 +21,7 @@ import org.microg.safeparcel.SafeParceled;
|
||||||
|
|
||||||
public class SearchResults extends AutoSafeParcelable {
|
public class SearchResults extends AutoSafeParcelable {
|
||||||
@SafeParceled(1000)
|
@SafeParceled(1000)
|
||||||
public final int versionCode = 2;
|
private int versionCode = 2;
|
||||||
|
|
||||||
public static Creator<SearchResults> CREATOR = new AutoCreator<SearchResults>(SearchResults.class);
|
public static Creator<SearchResults> CREATOR = new AutoCreator<SearchResults>(SearchResults.class);
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,7 +21,11 @@ import org.microg.safeparcel.SafeParceled;
|
||||||
|
|
||||||
public class SuggestSpecification extends AutoSafeParcelable {
|
public class SuggestSpecification extends AutoSafeParcelable {
|
||||||
@SafeParceled(1000)
|
@SafeParceled(1000)
|
||||||
private int versionCode = 2;
|
private int versionCode;
|
||||||
|
|
||||||
|
public SuggestSpecification() {
|
||||||
|
versionCode = 2;
|
||||||
|
}
|
||||||
|
|
||||||
public static final Creator<SuggestSpecification> CREATOR = new AutoCreator<SuggestSpecification>(SuggestSpecification.class);
|
public static final Creator<SuggestSpecification> CREATOR = new AutoCreator<SuggestSpecification>(SuggestSpecification.class);
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,7 +21,7 @@ import org.microg.safeparcel.SafeParceled;
|
||||||
|
|
||||||
public class SuggestionResults extends AutoSafeParcelable {
|
public class SuggestionResults extends AutoSafeParcelable {
|
||||||
@SafeParceled(1000)
|
@SafeParceled(1000)
|
||||||
private int versionCode = 2;
|
private int versionCode;
|
||||||
@SafeParceled(1)
|
@SafeParceled(1)
|
||||||
public final String errorMessage;
|
public final String errorMessage;
|
||||||
|
|
||||||
|
@ -31,17 +31,20 @@ public class SuggestionResults extends AutoSafeParcelable {
|
||||||
public final String[] s2;
|
public final String[] s2;
|
||||||
|
|
||||||
private SuggestionResults() {
|
private SuggestionResults() {
|
||||||
|
versionCode = 2;
|
||||||
errorMessage = null;
|
errorMessage = null;
|
||||||
s1 = s2 = null;
|
s1 = s2 = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public SuggestionResults(String errorMessage) {
|
public SuggestionResults(String errorMessage) {
|
||||||
|
versionCode = 2;
|
||||||
this.errorMessage = errorMessage;
|
this.errorMessage = errorMessage;
|
||||||
this.s1 = null;
|
this.s1 = null;
|
||||||
this.s2 = null;
|
this.s2 = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public SuggestionResults(String[] s1, String[] s2) {
|
public SuggestionResults(String[] s1, String[] s2) {
|
||||||
|
versionCode = 2;
|
||||||
this.errorMessage = null;
|
this.errorMessage = null;
|
||||||
this.s1 = s1;
|
this.s1 = s1;
|
||||||
this.s2 = s2;
|
this.s2 = s2;
|
||||||
|
|
|
@ -21,17 +21,12 @@ import org.microg.safeparcel.SafeParceled;
|
||||||
|
|
||||||
public class AccountChangeEventsRequest extends AutoSafeParcelable {
|
public class AccountChangeEventsRequest extends AutoSafeParcelable {
|
||||||
@SafeParceled(1)
|
@SafeParceled(1)
|
||||||
private final int versionCode;
|
private int versionCode = 1;
|
||||||
@SafeParceled(2)
|
@SafeParceled(2)
|
||||||
private int i;
|
private int i;
|
||||||
@SafeParceled(3)
|
@SafeParceled(3)
|
||||||
private String s;
|
private String s;
|
||||||
|
|
||||||
|
|
||||||
private AccountChangeEventsRequest() {
|
|
||||||
versionCode = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static Creator<AccountChangeEventsRequest> CREATOR = new AutoCreator<AccountChangeEventsRequest>(AccountChangeEventsRequest.class);
|
public static Creator<AccountChangeEventsRequest> CREATOR = new AutoCreator<AccountChangeEventsRequest>(AccountChangeEventsRequest.class);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,12 +24,11 @@ import java.util.List;
|
||||||
|
|
||||||
public class AccountChangeEventsResponse extends AutoSafeParcelable {
|
public class AccountChangeEventsResponse extends AutoSafeParcelable {
|
||||||
@SafeParceled(1)
|
@SafeParceled(1)
|
||||||
private final int versionCode;
|
private int versionCode = 1;
|
||||||
@SafeParceled(value = 2, subType = "com.google.android.gms.auth.AccountChangeEvent")
|
@SafeParceled(value = 2, subType = "com.google.android.gms.auth.AccountChangeEvent")
|
||||||
private List<AccountChangeEvent> events;
|
private List<AccountChangeEvent> events;
|
||||||
|
|
||||||
public AccountChangeEventsResponse() {
|
public AccountChangeEventsResponse() {
|
||||||
versionCode = 1;
|
|
||||||
events = new ArrayList<AccountChangeEvent>();
|
events = new ArrayList<AccountChangeEvent>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,12 +11,11 @@ import org.microg.safeparcel.SafeParceled;
|
||||||
@PublicApi
|
@PublicApi
|
||||||
public class Scope extends AutoSafeParcelable {
|
public class Scope extends AutoSafeParcelable {
|
||||||
@SafeParceled(1)
|
@SafeParceled(1)
|
||||||
private final int versionCode;
|
private int versionCode = 1;
|
||||||
@SafeParceled(2)
|
@SafeParceled(2)
|
||||||
private final String scopeUri;
|
private final String scopeUri;
|
||||||
|
|
||||||
private Scope() {
|
private Scope() {
|
||||||
versionCode = -1;
|
|
||||||
scopeUri = null;
|
scopeUri = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -24,7 +23,6 @@ public class Scope extends AutoSafeParcelable {
|
||||||
* Creates a new scope with the given URI.
|
* Creates a new scope with the given URI.
|
||||||
*/
|
*/
|
||||||
public Scope(String scopeUri) {
|
public Scope(String scopeUri) {
|
||||||
versionCode = 1;
|
|
||||||
this.scopeUri = scopeUri;
|
this.scopeUri = scopeUri;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -19,13 +19,12 @@ public final class Status extends AutoSafeParcelable implements Result {
|
||||||
public static final Status CANCELED = new Status(STATUS_CODE_CANCELED);
|
public static final Status CANCELED = new Status(STATUS_CODE_CANCELED);
|
||||||
public static final Status SUCCESS = new Status(0);
|
public static final Status SUCCESS = new Status(0);
|
||||||
|
|
||||||
private final int versionCode;
|
private int versionCode = 1;
|
||||||
private final int statusCode;
|
private final int statusCode;
|
||||||
private final String statusMessage;
|
private final String statusMessage;
|
||||||
private final PendingIntent resolution;
|
private final PendingIntent resolution;
|
||||||
|
|
||||||
private Status() {
|
private Status() {
|
||||||
versionCode = 1;
|
|
||||||
statusCode = 0;
|
statusCode = 0;
|
||||||
statusMessage = null;
|
statusMessage = null;
|
||||||
resolution = null;
|
resolution = null;
|
||||||
|
@ -40,7 +39,6 @@ public final class Status extends AutoSafeParcelable implements Result {
|
||||||
}
|
}
|
||||||
|
|
||||||
public Status(int statusCode, String statusMessage, PendingIntent resolution) {
|
public Status(int statusCode, String statusMessage, PendingIntent resolution) {
|
||||||
this.versionCode = 1;
|
|
||||||
this.statusCode = statusCode;
|
this.statusCode = statusCode;
|
||||||
this.statusMessage = statusMessage;
|
this.statusMessage = statusMessage;
|
||||||
this.resolution = resolution;
|
this.resolution = resolution;
|
||||||
|
|
|
@ -31,7 +31,7 @@ import java.util.Arrays;
|
||||||
|
|
||||||
public class GetServiceRequest extends AutoSafeParcelable {
|
public class GetServiceRequest extends AutoSafeParcelable {
|
||||||
@SafeParceled(1)
|
@SafeParceled(1)
|
||||||
private final int versionCode;
|
private int versionCode = 2;
|
||||||
|
|
||||||
@SafeParceled(2)
|
@SafeParceled(2)
|
||||||
public final int serviceId;
|
public final int serviceId;
|
||||||
|
@ -55,13 +55,11 @@ public class GetServiceRequest extends AutoSafeParcelable {
|
||||||
public Account account;
|
public Account account;
|
||||||
|
|
||||||
private GetServiceRequest() {
|
private GetServiceRequest() {
|
||||||
versionCode = 2;
|
|
||||||
serviceId = -1;
|
serviceId = -1;
|
||||||
gmsVersion = Constants.MAX_REFERENCE_VERSION;
|
gmsVersion = Constants.MAX_REFERENCE_VERSION;
|
||||||
}
|
}
|
||||||
|
|
||||||
public GetServiceRequest(int serviceId) {
|
public GetServiceRequest(int serviceId) {
|
||||||
this.versionCode = 2;
|
|
||||||
this.serviceId = serviceId;
|
this.serviceId = serviceId;
|
||||||
this.gmsVersion = Constants.MAX_REFERENCE_VERSION;
|
this.gmsVersion = Constants.MAX_REFERENCE_VERSION;
|
||||||
}
|
}
|
||||||
|
|
|
@ -86,7 +86,7 @@ public class LocationRequest extends AutoSafeParcelable {
|
||||||
public static final int PRIORITY_NO_POWER = 105;
|
public static final int PRIORITY_NO_POWER = 105;
|
||||||
|
|
||||||
@SafeParceled(1000)
|
@SafeParceled(1000)
|
||||||
private final int versionCode;
|
private int versionCode = 1;
|
||||||
@SafeParceled(1)
|
@SafeParceled(1)
|
||||||
private int priority;
|
private int priority;
|
||||||
@SafeParceled(2)
|
@SafeParceled(2)
|
||||||
|
@ -105,7 +105,6 @@ public class LocationRequest extends AutoSafeParcelable {
|
||||||
private long maxWaitTime;
|
private long maxWaitTime;
|
||||||
|
|
||||||
public LocationRequest() {
|
public LocationRequest() {
|
||||||
this.versionCode = 1;
|
|
||||||
this.priority = PRIORITY_BALANCED_POWER_ACCURACY;
|
this.priority = PRIORITY_BALANCED_POWER_ACCURACY;
|
||||||
this.interval = 3600000;
|
this.interval = 3600000;
|
||||||
this.fastestInterval = 600000;
|
this.fastestInterval = 600000;
|
||||||
|
|
|
@ -16,7 +16,7 @@ public class LocationStatus extends AutoSafeParcelable {
|
||||||
public static final int STATUS_LOCATION_DISABLED_IN_SETTINGS = 7;
|
public static final int STATUS_LOCATION_DISABLED_IN_SETTINGS = 7;
|
||||||
public static final int STATUS_IN_PROGRESS = 8;
|
public static final int STATUS_IN_PROGRESS = 8;
|
||||||
@SafeParceled(1000)
|
@SafeParceled(1000)
|
||||||
private final int versionCode;
|
private int versionCode = 1;
|
||||||
@SafeParceled(1)
|
@SafeParceled(1)
|
||||||
int cellStatus;
|
int cellStatus;
|
||||||
@SafeParceled(2)
|
@SafeParceled(2)
|
||||||
|
@ -24,10 +24,6 @@ public class LocationStatus extends AutoSafeParcelable {
|
||||||
@SafeParceled(3)
|
@SafeParceled(3)
|
||||||
long elapsedRealtimeNanos;
|
long elapsedRealtimeNanos;
|
||||||
|
|
||||||
private LocationStatus() {
|
|
||||||
versionCode = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(Object o) {
|
public boolean equals(Object o) {
|
||||||
if (this == o)
|
if (this == o)
|
||||||
|
|
|
@ -9,11 +9,7 @@ import org.microg.safeparcel.SafeParceled;
|
||||||
public class AutocompleteFilter extends AutoSafeParcelable {
|
public class AutocompleteFilter extends AutoSafeParcelable {
|
||||||
|
|
||||||
@SafeParceled(1000)
|
@SafeParceled(1000)
|
||||||
private final int versionCode;
|
private int versionCode = 1;
|
||||||
|
|
||||||
private AutocompleteFilter() {
|
|
||||||
this.versionCode = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static final Creator<AutocompleteFilter> CREATOR = new AutoCreator<AutocompleteFilter>(AutocompleteFilter.class);
|
public static final Creator<AutocompleteFilter> CREATOR = new AutoCreator<AutocompleteFilter>(AutocompleteFilter.class);
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,11 +9,7 @@ import org.microg.safeparcel.SafeParceled;
|
||||||
public class UserAddedPlace extends AutoSafeParcelable {
|
public class UserAddedPlace extends AutoSafeParcelable {
|
||||||
|
|
||||||
@SafeParceled(1000)
|
@SafeParceled(1000)
|
||||||
private final int versionCode;
|
private int versionCode = 1;
|
||||||
|
|
||||||
private UserAddedPlace() {
|
|
||||||
versionCode = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static final Creator<UserAddedPlace> CREATOR = new AutoCreator<UserAddedPlace>(UserAddedPlace.class);
|
public static final Creator<UserAddedPlace> CREATOR = new AutoCreator<UserAddedPlace>(UserAddedPlace.class);
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@ import org.microg.safeparcel.SafeParceled;
|
||||||
public class PlacesParams extends AutoSafeParcelable {
|
public class PlacesParams extends AutoSafeParcelable {
|
||||||
|
|
||||||
@SafeParceled(1000)
|
@SafeParceled(1000)
|
||||||
private final int versionCode;
|
private int versionCode = 1;
|
||||||
@SafeParceled(1)
|
@SafeParceled(1)
|
||||||
public final String clientPackageName;
|
public final String clientPackageName;
|
||||||
@SafeParceled(2)
|
@SafeParceled(2)
|
||||||
|
@ -17,7 +17,6 @@ public class PlacesParams extends AutoSafeParcelable {
|
||||||
public final String gCoreClientName;
|
public final String gCoreClientName;
|
||||||
|
|
||||||
private PlacesParams() {
|
private PlacesParams() {
|
||||||
versionCode = 1;
|
|
||||||
clientPackageName = locale = accountName = gCoreClientName = null;
|
clientPackageName = locale = accountName = gCoreClientName = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@ import java.util.Arrays;
|
||||||
@PublicApi
|
@PublicApi
|
||||||
public final class CameraPosition extends AutoSafeParcelable {
|
public final class CameraPosition extends AutoSafeParcelable {
|
||||||
@SafeParceled(1)
|
@SafeParceled(1)
|
||||||
private final int versionCode;
|
private int versionCode = 1;
|
||||||
/**
|
/**
|
||||||
* The location that the camera is pointing at.
|
* The location that the camera is pointing at.
|
||||||
*/
|
*/
|
||||||
|
@ -61,7 +61,6 @@ public final class CameraPosition extends AutoSafeParcelable {
|
||||||
*/
|
*/
|
||||||
private CameraPosition() {
|
private CameraPosition() {
|
||||||
target = null;
|
target = null;
|
||||||
versionCode = 1;
|
|
||||||
zoom = tilt = bearing = 0;
|
zoom = tilt = bearing = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -81,7 +80,6 @@ public final class CameraPosition extends AutoSafeParcelable {
|
||||||
*/
|
*/
|
||||||
public CameraPosition(LatLng target, float zoom, float tilt, float bearing)
|
public CameraPosition(LatLng target, float zoom, float tilt, float bearing)
|
||||||
throws NullPointerException, IllegalArgumentException {
|
throws NullPointerException, IllegalArgumentException {
|
||||||
versionCode = 1;
|
|
||||||
if (target == null) {
|
if (target == null) {
|
||||||
throw new NullPointerException("null camera target");
|
throw new NullPointerException("null camera target");
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,7 +26,7 @@ import org.microg.safeparcel.SafeParceled;
|
||||||
@PublicApi
|
@PublicApi
|
||||||
public final class LatLng extends AutoSafeParcelable {
|
public final class LatLng extends AutoSafeParcelable {
|
||||||
@SafeParceled(1)
|
@SafeParceled(1)
|
||||||
private final int versionCode;
|
private int versionCode = 1;
|
||||||
/**
|
/**
|
||||||
* Latitude, in degrees. This value is in the range [-90, 90].
|
* Latitude, in degrees. This value is in the range [-90, 90].
|
||||||
*/
|
*/
|
||||||
|
@ -43,7 +43,6 @@ public final class LatLng extends AutoSafeParcelable {
|
||||||
* In fact, those are replaced by their real values later using SafeParcelUtil.
|
* In fact, those are replaced by their real values later using SafeParcelUtil.
|
||||||
*/
|
*/
|
||||||
private LatLng() {
|
private LatLng() {
|
||||||
versionCode = 1;
|
|
||||||
latitude = longitude = 0;
|
latitude = longitude = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -56,7 +55,6 @@ public final class LatLng extends AutoSafeParcelable {
|
||||||
* inclusive and +180 degrees exclusive.
|
* inclusive and +180 degrees exclusive.
|
||||||
*/
|
*/
|
||||||
public LatLng(double latitude, double longitude) {
|
public LatLng(double latitude, double longitude) {
|
||||||
this.versionCode = 1;
|
|
||||||
this.latitude = Math.max(-90, Math.min(90, latitude));
|
this.latitude = Math.max(-90, Math.min(90, latitude));
|
||||||
if ((-180 <= longitude) && (longitude < 180)) {
|
if ((-180 <= longitude) && (longitude < 180)) {
|
||||||
this.longitude = longitude;
|
this.longitude = longitude;
|
||||||
|
|
|
@ -28,7 +28,7 @@ import java.util.Arrays;
|
||||||
@PublicApi
|
@PublicApi
|
||||||
public final class LatLngBounds extends AutoSafeParcelable {
|
public final class LatLngBounds extends AutoSafeParcelable {
|
||||||
@SafeParceled(1)
|
@SafeParceled(1)
|
||||||
private final int versionCode;
|
private int versionCode = 1;
|
||||||
/**
|
/**
|
||||||
* Southwest corner of the bound.
|
* Southwest corner of the bound.
|
||||||
*/
|
*/
|
||||||
|
@ -45,7 +45,6 @@ public final class LatLngBounds extends AutoSafeParcelable {
|
||||||
* In fact, those are replaced by their real values later using SafeParcelUtil.
|
* In fact, those are replaced by their real values later using SafeParcelUtil.
|
||||||
*/
|
*/
|
||||||
private LatLngBounds() {
|
private LatLngBounds() {
|
||||||
this.versionCode = 1;
|
|
||||||
southwest = northeast = null;
|
southwest = northeast = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -70,7 +69,6 @@ public final class LatLngBounds extends AutoSafeParcelable {
|
||||||
if (northeast.latitude < southwest.latitude)
|
if (northeast.latitude < southwest.latitude)
|
||||||
throw new IllegalArgumentException("latitude of northeast corner must not be" +
|
throw new IllegalArgumentException("latitude of northeast corner must not be" +
|
||||||
" lower than latitude of southwest corner");
|
" lower than latitude of southwest corner");
|
||||||
this.versionCode = 1;
|
|
||||||
this.southwest = southwest;
|
this.southwest = southwest;
|
||||||
this.northeast = northeast;
|
this.northeast = northeast;
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,7 @@ import org.microg.safeparcel.SafeParceled;
|
||||||
@PublicApi
|
@PublicApi
|
||||||
public class Tile extends AutoSafeParcelable {
|
public class Tile extends AutoSafeParcelable {
|
||||||
@SafeParceled(1)
|
@SafeParceled(1)
|
||||||
private final int versionCode;
|
private int versionCode = 1;
|
||||||
/**
|
/**
|
||||||
* The width of the image encoded by {@link #data} in pixels.
|
* The width of the image encoded by {@link #data} in pixels.
|
||||||
*/
|
*/
|
||||||
|
@ -30,7 +30,6 @@ public class Tile extends AutoSafeParcelable {
|
||||||
public final byte[] data;
|
public final byte[] data;
|
||||||
|
|
||||||
private Tile() {
|
private Tile() {
|
||||||
versionCode = 1;
|
|
||||||
width = height = 0;
|
width = height = 0;
|
||||||
data = null;
|
data = null;
|
||||||
}
|
}
|
||||||
|
@ -45,7 +44,6 @@ public class Tile extends AutoSafeParcelable {
|
||||||
* {@link android.graphics.BitmapFactory#decodeByteArray(byte[], int, int)}.
|
* {@link android.graphics.BitmapFactory#decodeByteArray(byte[], int, int)}.
|
||||||
*/
|
*/
|
||||||
public Tile(int width, int height, byte[] data) {
|
public Tile(int width, int height, byte[] data) {
|
||||||
this.versionCode = 1;
|
|
||||||
this.width = width;
|
this.width = width;
|
||||||
this.height = height;
|
this.height = height;
|
||||||
this.data = data;
|
this.data = data;
|
||||||
|
|
|
@ -18,6 +18,7 @@ package com.google.android.gms.maps.model;
|
||||||
|
|
||||||
import android.os.IBinder;
|
import android.os.IBinder;
|
||||||
import android.os.RemoteException;
|
import android.os.RemoteException;
|
||||||
|
|
||||||
import com.google.android.gms.maps.model.internal.ITileProviderDelegate;
|
import com.google.android.gms.maps.model.internal.ITileProviderDelegate;
|
||||||
|
|
||||||
import org.microg.gms.common.PublicApi;
|
import org.microg.gms.common.PublicApi;
|
||||||
|
@ -31,7 +32,7 @@ import org.microg.safeparcel.SafeParceled;
|
||||||
public class TileOverlayOptions extends AutoSafeParcelable {
|
public class TileOverlayOptions extends AutoSafeParcelable {
|
||||||
|
|
||||||
@SafeParceled(1)
|
@SafeParceled(1)
|
||||||
private final int versionCode;
|
private int versionCode = 1;
|
||||||
/**
|
/**
|
||||||
* This is a IBinder to the {@link #tileProvider}, built using {@link ITileProviderDelegate}.
|
* This is a IBinder to the {@link #tileProvider}, built using {@link ITileProviderDelegate}.
|
||||||
*/
|
*/
|
||||||
|
@ -49,7 +50,6 @@ public class TileOverlayOptions extends AutoSafeParcelable {
|
||||||
* Creates a new set of tile overlay options.
|
* Creates a new set of tile overlay options.
|
||||||
*/
|
*/
|
||||||
public TileOverlayOptions() {
|
public TileOverlayOptions() {
|
||||||
versionCode = 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -24,7 +24,7 @@ import java.util.Date;
|
||||||
public class LogEvent extends AutoSafeParcelable {
|
public class LogEvent extends AutoSafeParcelable {
|
||||||
|
|
||||||
@SafeParceled(1)
|
@SafeParceled(1)
|
||||||
public final int versionCode;
|
private int versionCode = 1;
|
||||||
|
|
||||||
@SafeParceled(2)
|
@SafeParceled(2)
|
||||||
public final long eventTime;
|
public final long eventTime;
|
||||||
|
@ -36,7 +36,6 @@ public class LogEvent extends AutoSafeParcelable {
|
||||||
public final byte[] data;
|
public final byte[] data;
|
||||||
|
|
||||||
private LogEvent() {
|
private LogEvent() {
|
||||||
versionCode = 1;
|
|
||||||
eventTime = -1;
|
eventTime = -1;
|
||||||
tag = null;
|
tag = null;
|
||||||
data = null;
|
data = null;
|
||||||
|
|
|
@ -22,7 +22,7 @@ import org.microg.safeparcel.SafeParceled;
|
||||||
public class PlayLoggerContext extends AutoSafeParcelable {
|
public class PlayLoggerContext extends AutoSafeParcelable {
|
||||||
|
|
||||||
@SafeParceled(1)
|
@SafeParceled(1)
|
||||||
public final int versionCode;
|
private int versionCode = 1;
|
||||||
|
|
||||||
@SafeParceled(2)
|
@SafeParceled(2)
|
||||||
public final String packageName;
|
public final String packageName;
|
||||||
|
@ -43,14 +43,12 @@ public class PlayLoggerContext extends AutoSafeParcelable {
|
||||||
public final String logSourceName;
|
public final String logSourceName;
|
||||||
|
|
||||||
private PlayLoggerContext() {
|
private PlayLoggerContext() {
|
||||||
this.versionCode = 1;
|
|
||||||
packageName = uploadAccount = logSourceName = null;
|
packageName = uploadAccount = logSourceName = null;
|
||||||
logSource = loggingId = -1;
|
logSource = loggingId = -1;
|
||||||
logAndroidId = false;
|
logAndroidId = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public PlayLoggerContext(String packageName, int logSource, String uploadAccount, int loggingId, String logSourceName) {
|
public PlayLoggerContext(String packageName, int logSource, String uploadAccount, int loggingId, String logSourceName) {
|
||||||
this.versionCode = 1;
|
|
||||||
this.packageName = packageName;
|
this.packageName = packageName;
|
||||||
this.logSource = logSource;
|
this.logSource = logSource;
|
||||||
this.uploadAccount = uploadAccount;
|
this.uploadAccount = uploadAccount;
|
||||||
|
|
|
@ -22,7 +22,7 @@ import org.microg.safeparcel.SafeParceled;
|
||||||
public class GetCorpusStatusRequest extends AutoSafeParcelable {
|
public class GetCorpusStatusRequest extends AutoSafeParcelable {
|
||||||
|
|
||||||
@SafeParceled(1000)
|
@SafeParceled(1000)
|
||||||
public final int versionCode;
|
private int versionCode = 1;
|
||||||
|
|
||||||
@SafeParceled(1)
|
@SafeParceled(1)
|
||||||
public final String packageName;
|
public final String packageName;
|
||||||
|
@ -31,7 +31,6 @@ public class GetCorpusStatusRequest extends AutoSafeParcelable {
|
||||||
public final String corpus;
|
public final String corpus;
|
||||||
|
|
||||||
private GetCorpusStatusRequest() {
|
private GetCorpusStatusRequest() {
|
||||||
versionCode = 1;
|
|
||||||
packageName = null;
|
packageName = null;
|
||||||
corpus = null;
|
corpus = null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,7 +25,7 @@ import org.microg.safeparcel.SafeParceled;
|
||||||
public class GetCorpusStatusResponse extends AutoSafeParcelable {
|
public class GetCorpusStatusResponse extends AutoSafeParcelable {
|
||||||
|
|
||||||
@SafeParceled(1000)
|
@SafeParceled(1000)
|
||||||
public final int versionCode;
|
private int versionCode;
|
||||||
|
|
||||||
@SafeParceled(1)
|
@SafeParceled(1)
|
||||||
public final Status status;
|
public final Status status;
|
||||||
|
@ -34,13 +34,11 @@ public class GetCorpusStatusResponse extends AutoSafeParcelable {
|
||||||
public final CorpusStatus corpusStatus;
|
public final CorpusStatus corpusStatus;
|
||||||
|
|
||||||
private GetCorpusStatusResponse() {
|
private GetCorpusStatusResponse() {
|
||||||
versionCode = 1;
|
|
||||||
status = null;
|
status = null;
|
||||||
corpusStatus = null;
|
corpusStatus = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public GetCorpusStatusResponse(Status status, CorpusStatus corpusStatus) {
|
public GetCorpusStatusResponse(Status status, CorpusStatus corpusStatus) {
|
||||||
this.versionCode = 1;
|
|
||||||
this.status = status;
|
this.status = status;
|
||||||
this.corpusStatus = corpusStatus;
|
this.corpusStatus = corpusStatus;
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,7 +22,7 @@ import org.microg.safeparcel.SafeParceled;
|
||||||
public class RequestIndexingRequest extends AutoSafeParcelable {
|
public class RequestIndexingRequest extends AutoSafeParcelable {
|
||||||
|
|
||||||
@SafeParceled(1000)
|
@SafeParceled(1000)
|
||||||
public final int versionCode;
|
private int versionCode = 1;
|
||||||
|
|
||||||
@SafeParceled(1)
|
@SafeParceled(1)
|
||||||
public final String packageName;
|
public final String packageName;
|
||||||
|
@ -34,7 +34,6 @@ public class RequestIndexingRequest extends AutoSafeParcelable {
|
||||||
public final long sequenceNumber;
|
public final long sequenceNumber;
|
||||||
|
|
||||||
private RequestIndexingRequest() {
|
private RequestIndexingRequest() {
|
||||||
versionCode = 1;
|
|
||||||
packageName = null;
|
packageName = null;
|
||||||
corpus = null;
|
corpus = null;
|
||||||
sequenceNumber = 0;
|
sequenceNumber = 0;
|
||||||
|
|
|
@ -24,7 +24,7 @@ import org.microg.safeparcel.SafeParceled;
|
||||||
public class RequestIndexingResponse extends AutoSafeParcelable {
|
public class RequestIndexingResponse extends AutoSafeParcelable {
|
||||||
|
|
||||||
@SafeParceled(1000)
|
@SafeParceled(1000)
|
||||||
public final int versionCode;
|
private int versionCode;
|
||||||
|
|
||||||
@SafeParceled(1)
|
@SafeParceled(1)
|
||||||
public final Status status;
|
public final Status status;
|
||||||
|
@ -33,13 +33,11 @@ public class RequestIndexingResponse extends AutoSafeParcelable {
|
||||||
public final boolean scheduledIndexing;
|
public final boolean scheduledIndexing;
|
||||||
|
|
||||||
private RequestIndexingResponse() {
|
private RequestIndexingResponse() {
|
||||||
versionCode = 1;
|
|
||||||
status = null;
|
status = null;
|
||||||
scheduledIndexing = false;
|
scheduledIndexing = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public RequestIndexingResponse(Status status, boolean scheduledIndexing) {
|
public RequestIndexingResponse(Status status, boolean scheduledIndexing) {
|
||||||
this.versionCode = 1;
|
|
||||||
this.status = status;
|
this.status = status;
|
||||||
this.scheduledIndexing = scheduledIndexing;
|
this.scheduledIndexing = scheduledIndexing;
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,7 +25,7 @@ import org.microg.safeparcel.SafeParceled;
|
||||||
public class QueryResponse extends AutoSafeParcelable {
|
public class QueryResponse extends AutoSafeParcelable {
|
||||||
|
|
||||||
@SafeParceled(1000)
|
@SafeParceled(1000)
|
||||||
public final int versionCode;
|
private int versionCode = 1;
|
||||||
|
|
||||||
@SafeParceled(1)
|
@SafeParceled(1)
|
||||||
public final Status status;
|
public final Status status;
|
||||||
|
@ -34,13 +34,11 @@ public class QueryResponse extends AutoSafeParcelable {
|
||||||
public final SearchResults results;
|
public final SearchResults results;
|
||||||
|
|
||||||
private QueryResponse() {
|
private QueryResponse() {
|
||||||
versionCode = 1;
|
|
||||||
status = null;
|
status = null;
|
||||||
results = null;
|
results = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public QueryResponse(Status status, SearchResults results) {
|
public QueryResponse(Status status, SearchResults results) {
|
||||||
this.versionCode = 1;
|
|
||||||
this.status = status;
|
this.status = status;
|
||||||
this.results = results;
|
this.results = results;
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,45 @@
|
||||||
|
/*
|
||||||
|
* Copyright 2013-2015 µg Project Team
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package com.google.android.gms.wearable;
|
||||||
|
|
||||||
|
import android.content.IntentFilter;
|
||||||
|
|
||||||
|
import com.google.android.gms.wearable.internal.IWearableListener;
|
||||||
|
|
||||||
|
import org.microg.safeparcel.AutoSafeParcelable;
|
||||||
|
import org.microg.safeparcel.SafeParceled;
|
||||||
|
|
||||||
|
public class AddListenerRequest extends AutoSafeParcelable {
|
||||||
|
@SafeParceled(1)
|
||||||
|
private int versionCode = 1;
|
||||||
|
@SafeParceled(2)
|
||||||
|
public final IWearableListener listener;
|
||||||
|
@SafeParceled(3)
|
||||||
|
public final IntentFilter[] intentFilters;
|
||||||
|
|
||||||
|
private AddListenerRequest() {
|
||||||
|
listener = null;
|
||||||
|
intentFilters = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public AddListenerRequest(IWearableListener listener, IntentFilter[] intentFilters) {
|
||||||
|
this.listener = listener;
|
||||||
|
this.intentFilters = intentFilters;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static final Creator<AddListenerRequest> CREATOR = new AutoCreator<AddListenerRequest>(AddListenerRequest.class);
|
||||||
|
}
|
|
@ -1,4 +1,53 @@
|
||||||
package com.google.android.gms.wearable;
|
package com.google.android.gms.wearable;
|
||||||
|
|
||||||
public class ConnectionConfiguration {
|
import org.microg.safeparcel.AutoSafeParcelable;
|
||||||
|
import org.microg.safeparcel.SafeParceled;
|
||||||
|
|
||||||
|
public class ConnectionConfiguration extends AutoSafeParcelable {
|
||||||
|
|
||||||
|
@SafeParceled(1)
|
||||||
|
private int versionCode = 1;
|
||||||
|
@SafeParceled(2)
|
||||||
|
public final String name;
|
||||||
|
@SafeParceled(3)
|
||||||
|
public final String address;
|
||||||
|
@SafeParceled(4)
|
||||||
|
public final int type;
|
||||||
|
@SafeParceled(5)
|
||||||
|
public final int role;
|
||||||
|
@SafeParceled(6)
|
||||||
|
public final boolean enabled;
|
||||||
|
@SafeParceled(7)
|
||||||
|
public boolean connected = false;
|
||||||
|
@SafeParceled(8)
|
||||||
|
public String peerNodeId;
|
||||||
|
@SafeParceled(9)
|
||||||
|
public boolean btlePriority = true;
|
||||||
|
@SafeParceled(10)
|
||||||
|
public String nodeId;
|
||||||
|
|
||||||
|
private ConnectionConfiguration() {
|
||||||
|
name = address = null;
|
||||||
|
type = role = 0;
|
||||||
|
enabled = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ConnectionConfiguration(String name, String address, int type, int role, boolean enabled) {
|
||||||
|
this.name = name;
|
||||||
|
this.address = address;
|
||||||
|
this.type = type;
|
||||||
|
this.role = role;
|
||||||
|
this.enabled = enabled;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ConnectionConfiguration(String name, String address, int type, int role, boolean enabled, String nodeId) {
|
||||||
|
this.name = name;
|
||||||
|
this.address = address;
|
||||||
|
this.type = type;
|
||||||
|
this.role = role;
|
||||||
|
this.enabled = enabled;
|
||||||
|
this.nodeId = nodeId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static final Creator<ConnectionConfiguration> CREATOR = new AutoCreator<ConnectionConfiguration>(ConnectionConfiguration.class);
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,23 @@
|
||||||
|
/*
|
||||||
|
* Copyright 2013-2015 µg Project Team
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package com.google.android.gms.wearable;
|
||||||
|
|
||||||
|
import org.microg.safeparcel.AutoSafeParcelable;
|
||||||
|
|
||||||
|
public class DeleteDataItemsResponse extends AutoSafeParcelable {
|
||||||
|
public static final Creator<DeleteDataItemsResponse> CREATOR = new AutoCreator<DeleteDataItemsResponse>(DeleteDataItemsResponse.class);
|
||||||
|
}
|
|
@ -0,0 +1,41 @@
|
||||||
|
/*
|
||||||
|
* Copyright 2013-2015 µg Project Team
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package com.google.android.gms.wearable;
|
||||||
|
|
||||||
|
import org.microg.safeparcel.AutoSafeParcelable;
|
||||||
|
import org.microg.safeparcel.SafeParceled;
|
||||||
|
|
||||||
|
public class GetConfigResponse extends AutoSafeParcelable {
|
||||||
|
@SafeParceled(1)
|
||||||
|
private int versionCode = 1;
|
||||||
|
@SafeParceled(2)
|
||||||
|
public final int statusCode;
|
||||||
|
@SafeParceled(3)
|
||||||
|
public final ConnectionConfiguration connectionConfiguration;
|
||||||
|
|
||||||
|
private GetConfigResponse() {
|
||||||
|
statusCode = 0;
|
||||||
|
connectionConfiguration = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public GetConfigResponse(int statusCode, ConnectionConfiguration connectionConfiguration) {
|
||||||
|
this.statusCode = statusCode;
|
||||||
|
this.connectionConfiguration = connectionConfiguration;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static final Creator<GetConfigResponse> CREATOR = new AutoCreator<GetConfigResponse>(GetConfigResponse.class);
|
||||||
|
}
|
|
@ -0,0 +1,41 @@
|
||||||
|
/*
|
||||||
|
* Copyright 2013-2015 µg Project Team
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package com.google.android.gms.wearable;
|
||||||
|
|
||||||
|
import org.microg.safeparcel.AutoSafeParcelable;
|
||||||
|
import org.microg.safeparcel.SafeParceled;
|
||||||
|
|
||||||
|
public class GetConfigsResponse extends AutoSafeParcelable {
|
||||||
|
@SafeParceled(1)
|
||||||
|
private int versionCode = 1;
|
||||||
|
@SafeParceled(2)
|
||||||
|
public final int statusCode;
|
||||||
|
@SafeParceled(3)
|
||||||
|
public final ConnectionConfiguration[] configurations;
|
||||||
|
|
||||||
|
private GetConfigsResponse() {
|
||||||
|
statusCode = 0;
|
||||||
|
configurations = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public GetConfigsResponse(int statusCode, ConnectionConfiguration[] configurations) {
|
||||||
|
this.statusCode = statusCode;
|
||||||
|
this.configurations = configurations;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static final Creator<GetConfigsResponse> CREATOR = new AutoCreator<GetConfigsResponse>(GetConfigsResponse.class);
|
||||||
|
}
|
|
@ -0,0 +1,45 @@
|
||||||
|
/*
|
||||||
|
* Copyright 2013-2015 µg Project Team
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package com.google.android.gms.wearable;
|
||||||
|
|
||||||
|
import com.google.android.gms.wearable.internal.NodeParcelable;
|
||||||
|
|
||||||
|
import org.microg.safeparcel.AutoSafeParcelable;
|
||||||
|
import org.microg.safeparcel.SafeParceled;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class GetConnectedNodesResponse extends AutoSafeParcelable {
|
||||||
|
@SafeParceled(1)
|
||||||
|
private int versionCode = 1;
|
||||||
|
@SafeParceled(2)
|
||||||
|
public final int statusCode;
|
||||||
|
@SafeParceled(3)
|
||||||
|
public final List<NodeParcelable> nodes;
|
||||||
|
|
||||||
|
private GetConnectedNodesResponse() {
|
||||||
|
statusCode = 0;
|
||||||
|
nodes = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public GetConnectedNodesResponse(int statusCode, List<NodeParcelable> nodes) {
|
||||||
|
this.statusCode = statusCode;
|
||||||
|
this.nodes = nodes;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static final Creator<GetConnectedNodesResponse> CREATOR = new AutoCreator<GetConnectedNodesResponse>(GetConnectedNodesResponse.class);
|
||||||
|
}
|
|
@ -0,0 +1,43 @@
|
||||||
|
/*
|
||||||
|
* Copyright 2013-2015 µg Project Team
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package com.google.android.gms.wearable;
|
||||||
|
|
||||||
|
import com.google.android.gms.wearable.internal.DataItemParcelable;
|
||||||
|
|
||||||
|
import org.microg.safeparcel.AutoSafeParcelable;
|
||||||
|
import org.microg.safeparcel.SafeParceled;
|
||||||
|
|
||||||
|
public class GetDataItemResponse extends AutoSafeParcelable {
|
||||||
|
@SafeParceled(1)
|
||||||
|
private int versionCode = 1;
|
||||||
|
@SafeParceled(2)
|
||||||
|
public final int statusCode;
|
||||||
|
@SafeParceled(3)
|
||||||
|
public final DataItemParcelable dataItem;
|
||||||
|
|
||||||
|
private GetDataItemResponse() {
|
||||||
|
statusCode = 0;
|
||||||
|
dataItem = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public GetDataItemResponse(int statusCode, DataItemParcelable dataItem) {
|
||||||
|
this.statusCode = statusCode;
|
||||||
|
this.dataItem = dataItem;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static final Creator<GetDataItemResponse> CREATOR = new AutoCreator<GetDataItemResponse>(GetDataItemResponse.class);
|
||||||
|
}
|
|
@ -0,0 +1,23 @@
|
||||||
|
/*
|
||||||
|
* Copyright 2013-2015 µg Project Team
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package com.google.android.gms.wearable;
|
||||||
|
|
||||||
|
import org.microg.safeparcel.AutoSafeParcelable;
|
||||||
|
|
||||||
|
public class GetFdForAssetResponse extends AutoSafeParcelable {
|
||||||
|
public static final Creator<GetFdForAssetResponse> CREATOR = new AutoCreator<GetFdForAssetResponse>(GetFdForAssetResponse.class);
|
||||||
|
}
|
|
@ -0,0 +1,43 @@
|
||||||
|
/*
|
||||||
|
* Copyright 2013-2015 µg Project Team
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package com.google.android.gms.wearable;
|
||||||
|
|
||||||
|
import com.google.android.gms.wearable.internal.NodeParcelable;
|
||||||
|
|
||||||
|
import org.microg.safeparcel.AutoSafeParcelable;
|
||||||
|
import org.microg.safeparcel.SafeParceled;
|
||||||
|
|
||||||
|
public class GetLocalNodeResponse extends AutoSafeParcelable {
|
||||||
|
@SafeParceled(1)
|
||||||
|
private int versionCode = 1;
|
||||||
|
@SafeParceled(2)
|
||||||
|
public final int statusCode;
|
||||||
|
@SafeParceled(3)
|
||||||
|
public final NodeParcelable node;
|
||||||
|
|
||||||
|
private GetLocalNodeResponse() {
|
||||||
|
statusCode = 0;
|
||||||
|
node = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public GetLocalNodeResponse(int statusCode, NodeParcelable node) {
|
||||||
|
this.statusCode = statusCode;
|
||||||
|
this.node = node;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static final Creator<GetLocalNodeResponse> CREATOR = new AutoCreator<GetLocalNodeResponse>(GetLocalNodeResponse.class);
|
||||||
|
}
|
|
@ -17,11 +17,17 @@
|
||||||
package com.google.android.gms.wearable;
|
package com.google.android.gms.wearable;
|
||||||
|
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.text.TextUtils;
|
||||||
|
import android.util.Base64;
|
||||||
|
|
||||||
|
import com.google.android.gms.wearable.internal.DataItemAssetParcelable;
|
||||||
|
|
||||||
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 java.util.Collections;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -31,19 +37,46 @@ import java.util.Map;
|
||||||
public class PutDataRequest extends AutoSafeParcelable {
|
public class PutDataRequest extends AutoSafeParcelable {
|
||||||
public static final String WEAR_URI_SCHEME = "wear";
|
public static final String WEAR_URI_SCHEME = "wear";
|
||||||
|
|
||||||
private DataItem dataItem;
|
@SafeParceled(1)
|
||||||
|
private int versionCode = 1;
|
||||||
|
@SafeParceled(2)
|
||||||
|
final Uri uri;
|
||||||
|
@SafeParceled(4)
|
||||||
|
private final Bundle assets;
|
||||||
|
@SafeParceled(5)
|
||||||
|
byte[] data;
|
||||||
|
|
||||||
private PutDataRequest(DataItem dataItem) {
|
private PutDataRequest() {
|
||||||
this.dataItem = dataItem;
|
uri = null;
|
||||||
|
assets = new Bundle();
|
||||||
|
}
|
||||||
|
|
||||||
|
private PutDataRequest(Uri uri) {
|
||||||
|
this.uri = uri;
|
||||||
|
assets = new Bundle();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static PutDataRequest create(Uri uri) {
|
||||||
|
return new PutDataRequest(uri);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static PutDataRequest create(String path) {
|
public static PutDataRequest create(String path) {
|
||||||
// TODO
|
if (TextUtils.isEmpty(path)) {
|
||||||
return new PutDataRequest(null);
|
throw new IllegalArgumentException("An empty path was supplied.");
|
||||||
|
} else if (!path.startsWith("/")) {
|
||||||
|
throw new IllegalArgumentException("A path must start with a single / .");
|
||||||
|
} else if (path.startsWith("//")) {
|
||||||
|
throw new IllegalArgumentException("A path must start with a single / .");
|
||||||
|
} else {
|
||||||
|
return create((new Uri.Builder()).scheme(WEAR_URI_SCHEME).path(path).build());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static PutDataRequest createFromDataItem(DataItem source) {
|
public static PutDataRequest createFromDataItem(DataItem source) {
|
||||||
return new PutDataRequest(source);
|
PutDataRequest dataRequest = new PutDataRequest(source.getUri());
|
||||||
|
dataRequest.data = source.getData();
|
||||||
|
// TODO: assets
|
||||||
|
return dataRequest;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static PutDataRequest createWithAutoAppendedId(String pathPrefix) {
|
public static PutDataRequest createWithAutoAppendedId(String pathPrefix) {
|
||||||
|
@ -51,39 +84,42 @@ public class PutDataRequest extends AutoSafeParcelable {
|
||||||
}
|
}
|
||||||
|
|
||||||
public Asset getAsset(String key) {
|
public Asset getAsset(String key) {
|
||||||
// TODO
|
return assets.getParcelable(key);
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Map<String, Asset> getAssets() {
|
public Map<String, Asset> getAssets() {
|
||||||
// TODO
|
Map<String, Asset> map = new HashMap<String, Asset>();
|
||||||
return Collections.emptyMap();
|
assets.setClassLoader(DataItemAssetParcelable.class.getClassLoader());
|
||||||
|
for (String key : assets.keySet()) {
|
||||||
|
map.put(key, (Asset) assets.getParcelable(key));
|
||||||
|
}
|
||||||
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
public byte[] getData() {
|
public byte[] getData() {
|
||||||
return dataItem.getData();
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Uri getUri() {
|
public Uri getUri() {
|
||||||
return dataItem.getUri();
|
return uri;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean hasAsset(String key) {
|
public boolean hasAsset(String key) {
|
||||||
return dataItem.getAssets().containsKey(key);
|
return assets.containsKey(key);
|
||||||
}
|
}
|
||||||
|
|
||||||
public PutDataRequest putAsset(String key, Asset value) {
|
public PutDataRequest putAsset(String key, Asset value) {
|
||||||
// TODO
|
assets.putParcelable(key, value);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public PutDataRequest removeAsset(String key) {
|
public PutDataRequest removeAsset(String key) {
|
||||||
// TODO
|
assets.remove(key);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public PutDataRequest setData(byte[] data) {
|
public PutDataRequest setData(byte[] data) {
|
||||||
// TODO
|
this.data = data;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -93,7 +129,10 @@ public class PutDataRequest extends AutoSafeParcelable {
|
||||||
}
|
}
|
||||||
|
|
||||||
public String toString(boolean verbose) {
|
public String toString(boolean verbose) {
|
||||||
return "PutDataRequest{data=" + dataItem + "}";
|
return "PutDataRequest[data=" + (data == null ? "null" : Base64.encodeToString(data, Base64.NO_WRAP)) +
|
||||||
|
", numAssets=" + getAssets().size() +
|
||||||
|
", uri=" + uri + "]";
|
||||||
|
// TODO: Verbose: dump all assets
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final Creator<PutDataRequest> CREATOR = new AutoCreator<PutDataRequest>(PutDataRequest.class);
|
public static final Creator<PutDataRequest> CREATOR = new AutoCreator<PutDataRequest>(PutDataRequest.class);
|
||||||
|
|
|
@ -0,0 +1,43 @@
|
||||||
|
/*
|
||||||
|
* Copyright 2013-2015 µg Project Team
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package com.google.android.gms.wearable;
|
||||||
|
|
||||||
|
import com.google.android.gms.wearable.internal.DataItemParcelable;
|
||||||
|
|
||||||
|
import org.microg.safeparcel.AutoSafeParcelable;
|
||||||
|
import org.microg.safeparcel.SafeParceled;
|
||||||
|
|
||||||
|
public class PutDataResponse extends AutoSafeParcelable {
|
||||||
|
@SafeParceled(1)
|
||||||
|
private int versionCode = 1;
|
||||||
|
@SafeParceled(2)
|
||||||
|
public final int statusCode;
|
||||||
|
@SafeParceled(3)
|
||||||
|
public final DataItemParcelable dataItem;
|
||||||
|
|
||||||
|
private PutDataResponse() {
|
||||||
|
statusCode = 0;
|
||||||
|
dataItem = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public PutDataResponse(int statusCode, DataItemParcelable dataItem) {
|
||||||
|
this.statusCode = statusCode;
|
||||||
|
this.dataItem = dataItem;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static final Creator<PutDataResponse> CREATOR = new AutoCreator<PutDataResponse>(PutDataResponse.class);
|
||||||
|
}
|
|
@ -0,0 +1,39 @@
|
||||||
|
/*
|
||||||
|
* Copyright 2013-2015 µg Project Team
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package com.google.android.gms.wearable;
|
||||||
|
|
||||||
|
import com.google.android.gms.wearable.internal.IWearableListener;
|
||||||
|
|
||||||
|
import org.microg.safeparcel.AutoSafeParcelable;
|
||||||
|
import org.microg.safeparcel.SafeParceled;
|
||||||
|
|
||||||
|
public class RemoveListenerRequest extends AutoSafeParcelable {
|
||||||
|
@SafeParceled(1)
|
||||||
|
private int versionCode = 1;
|
||||||
|
@SafeParceled(2)
|
||||||
|
public final IWearableListener listener;
|
||||||
|
|
||||||
|
private RemoveListenerRequest() {
|
||||||
|
listener = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public RemoveListenerRequest(IWearableListener listener) {
|
||||||
|
this.listener = listener;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static final Creator<RemoveListenerRequest> CREATOR = new AutoCreator<RemoveListenerRequest>(RemoveListenerRequest.class);
|
||||||
|
}
|
|
@ -0,0 +1,23 @@
|
||||||
|
/*
|
||||||
|
* Copyright 2013-2015 µg Project Team
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package com.google.android.gms.wearable;
|
||||||
|
|
||||||
|
import org.microg.safeparcel.AutoSafeParcelable;
|
||||||
|
|
||||||
|
public class SendMessageResponse extends AutoSafeParcelable {
|
||||||
|
public static final Creator<SendMessageResponse> CREATOR = new AutoCreator<SendMessageResponse>(SendMessageResponse.class);
|
||||||
|
}
|
|
@ -0,0 +1,23 @@
|
||||||
|
/*
|
||||||
|
* Copyright 2013-2015 µg Project Team
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package com.google.android.gms.wearable;
|
||||||
|
|
||||||
|
import org.microg.safeparcel.AutoSafeParcelable;
|
||||||
|
|
||||||
|
public class StorageInfoResponse extends AutoSafeParcelable {
|
||||||
|
public static final Creator<StorageInfoResponse> CREATOR = new AutoCreator<StorageInfoResponse>(StorageInfoResponse.class);
|
||||||
|
}
|
|
@ -0,0 +1,23 @@
|
||||||
|
/*
|
||||||
|
* Copyright 2013-2015 µg Project Team
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package com.google.android.gms.wearable.internal;
|
||||||
|
|
||||||
|
import org.microg.safeparcel.AutoSafeParcelable;
|
||||||
|
|
||||||
|
public class DataItemAssetParcelable extends AutoSafeParcelable {
|
||||||
|
public static final Creator<DataItemAssetParcelable> CREATOR = new AutoCreator<DataItemAssetParcelable>(DataItemAssetParcelable.class);
|
||||||
|
}
|
|
@ -0,0 +1,67 @@
|
||||||
|
/*
|
||||||
|
* Copyright 2013-2015 µg Project Team
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package com.google.android.gms.wearable.internal;
|
||||||
|
|
||||||
|
import android.net.Uri;
|
||||||
|
import android.os.Bundle;
|
||||||
|
|
||||||
|
import org.microg.safeparcel.AutoSafeParcelable;
|
||||||
|
import org.microg.safeparcel.SafeParceled;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
public class DataItemParcelable extends AutoSafeParcelable {
|
||||||
|
@SafeParceled(1)
|
||||||
|
private int versionCode = 1;
|
||||||
|
@SafeParceled(2)
|
||||||
|
public final Uri uri;
|
||||||
|
@SafeParceled(4)
|
||||||
|
private final Bundle assets;
|
||||||
|
@SafeParceled(5)
|
||||||
|
public byte[] data;
|
||||||
|
|
||||||
|
private DataItemParcelable() {
|
||||||
|
uri = null;
|
||||||
|
assets = new Bundle();
|
||||||
|
data = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DataItemParcelable(Uri uri) {
|
||||||
|
this(uri, new HashMap<String, DataItemAssetParcelable>());
|
||||||
|
}
|
||||||
|
|
||||||
|
public DataItemParcelable(Uri uri, Map<String, DataItemAssetParcelable> assets) {
|
||||||
|
this.uri = uri;
|
||||||
|
this.assets = new Bundle();
|
||||||
|
for (String key : assets.keySet()) {
|
||||||
|
this.assets.putParcelable(key, assets.get(key));
|
||||||
|
}
|
||||||
|
data = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Map<String, DataItemAssetParcelable> getAssets() {
|
||||||
|
Map<String, DataItemAssetParcelable> assets = new HashMap<String, DataItemAssetParcelable>();
|
||||||
|
this.assets.setClassLoader(DataItemAssetParcelable.class.getClassLoader());
|
||||||
|
for (String key : this.assets.keySet()) {
|
||||||
|
assets.put(key, (DataItemAssetParcelable) this.assets.getParcelable(key));
|
||||||
|
}
|
||||||
|
return assets;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static final Creator<DataItemParcelable> CREATOR = new AutoCreator<DataItemParcelable>(DataItemParcelable.class);
|
||||||
|
}
|
|
@ -26,19 +26,17 @@ import org.microg.safeparcel.SafeParceled;
|
||||||
*/
|
*/
|
||||||
public class NodeParcelable extends AutoSafeParcelable implements Node {
|
public class NodeParcelable extends AutoSafeParcelable implements Node {
|
||||||
@SafeParceled(1)
|
@SafeParceled(1)
|
||||||
private final int versionCode;
|
private int versionCode = 1;
|
||||||
@SafeParceled(2)
|
@SafeParceled(2)
|
||||||
private final String id;
|
private final String id;
|
||||||
@SafeParceled(3)
|
@SafeParceled(3)
|
||||||
private final String displayName;
|
private final String displayName;
|
||||||
|
|
||||||
private NodeParcelable() {
|
private NodeParcelable() {
|
||||||
versionCode = 1;
|
|
||||||
id = displayName = null;
|
id = displayName = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public NodeParcelable(String id, String displayName) {
|
public NodeParcelable(String id, String displayName) {
|
||||||
versionCode = 1;
|
|
||||||
this.id = id;
|
this.id = id;
|
||||||
this.displayName = displayName;
|
this.displayName = displayName;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue