mirror of
https://github.com/moparisthebest/android_external_GmsApi
synced 2024-11-23 17:22:19 -05:00
Add some Wearable classes, mark public apis
This commit is contained in:
parent
c4db81d1fc
commit
ae39009ccd
40
src/com/google/android/gms/common/api/CommonStatusCodes.java
Normal file
40
src/com/google/android/gms/common/api/CommonStatusCodes.java
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2014-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.common.api;
|
||||||
|
|
||||||
|
import org.microg.gms.PublicApi;
|
||||||
|
|
||||||
|
@PublicApi
|
||||||
|
public class CommonStatusCodes {
|
||||||
|
public static final int SUCCESS_CACHE = -1;
|
||||||
|
public static final int SUCCESS = 0;
|
||||||
|
public static final int SERVICE_MISSING = 1;
|
||||||
|
public static final int SERVICE_VERSION_UPDATE_REQUIRED = 2;
|
||||||
|
public static final int SERVICE_DISABLED = 3;
|
||||||
|
public static final int SIGN_IN_REQUIRED = 4;
|
||||||
|
public static final int INVALID_ACCOUNT = 5;
|
||||||
|
public static final int RESOLUTION_REQUIRED = 6;
|
||||||
|
public static final int NETWORK_ERROR = 7;
|
||||||
|
public static final int INTERNAL_ERROR = 8;
|
||||||
|
public static final int SERVICE_INVALID = 9;
|
||||||
|
public static final int DEVELOPER_ERROR = 10;
|
||||||
|
public static final int LICENSE_CHECK_FAILED = 11;
|
||||||
|
public static final int ERROR = 13;
|
||||||
|
public static final int INTERRUPTED = 14;
|
||||||
|
public static final int TIMEOUT = 15;
|
||||||
|
public static final int CANCELED = 16;
|
||||||
|
}
|
@ -1,8 +1,11 @@
|
|||||||
package com.google.android.gms.common.api;
|
package com.google.android.gms.common.api;
|
||||||
|
|
||||||
|
import org.microg.gms.PublicApi;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents the final result of invoking an API method in Google Play Services.
|
* Represents the final result of invoking an API method in Google Play Services.
|
||||||
*/
|
*/
|
||||||
|
@PublicApi
|
||||||
public interface Result {
|
public interface Result {
|
||||||
public Status getStatus();
|
public Status getStatus();
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package com.google.android.gms.common.api;
|
package com.google.android.gms.common.api;
|
||||||
|
|
||||||
|
import org.microg.gms.PublicApi;
|
||||||
import org.microg.safeparcel.AutoSafeParcelable;
|
import org.microg.safeparcel.AutoSafeParcelable;
|
||||||
import org.microg.safeparcel.SafeParceled;
|
import org.microg.safeparcel.SafeParceled;
|
||||||
|
|
||||||
@ -7,6 +8,7 @@ import org.microg.safeparcel.SafeParceled;
|
|||||||
* Describes an OAuth 2.0 scope to request. This has security implications for the user, and
|
* Describes an OAuth 2.0 scope to request. This has security implications for the user, and
|
||||||
* requesting additional scopes will result in authorization dialogs.
|
* requesting additional scopes will result in authorization dialogs.
|
||||||
*/
|
*/
|
||||||
|
@PublicApi
|
||||||
public class Scope extends AutoSafeParcelable {
|
public class Scope extends AutoSafeParcelable {
|
||||||
@SafeParceled(1)
|
@SafeParceled(1)
|
||||||
private final int versionCode;
|
private final int versionCode;
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
package com.google.android.gms.common.api;
|
package com.google.android.gms.common.api;
|
||||||
|
|
||||||
import android.app.PendingIntent;
|
import android.app.PendingIntent;
|
||||||
|
|
||||||
|
import org.microg.gms.PublicApi;
|
||||||
import org.microg.safeparcel.AutoSafeParcelable;
|
import org.microg.safeparcel.AutoSafeParcelable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -8,6 +10,7 @@ import org.microg.safeparcel.AutoSafeParcelable;
|
|||||||
* <p/>
|
* <p/>
|
||||||
* TODO: Docs
|
* TODO: Docs
|
||||||
*/
|
*/
|
||||||
|
@PublicApi
|
||||||
public final class Status extends AutoSafeParcelable implements Result {
|
public final class Status extends AutoSafeParcelable implements Result {
|
||||||
private static final int STATUS_CODE_INTERRUPTED = 14;
|
private static final int STATUS_CODE_INTERRUPTED = 14;
|
||||||
private static final int STATUS_CODE_CANCELED = 16;
|
private static final int STATUS_CODE_CANCELED = 16;
|
||||||
|
@ -18,10 +18,13 @@ package com.google.android.gms.maps.model;
|
|||||||
|
|
||||||
import com.google.android.gms.dynamic.IObjectWrapper;
|
import com.google.android.gms.dynamic.IObjectWrapper;
|
||||||
|
|
||||||
|
import org.microg.gms.PublicApi;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Defines an image. For a marker, it can be used to set the image of the marker icon. For a ground
|
* Defines an image. For a marker, it can be used to set the image of the marker icon. For a ground
|
||||||
* overlay, it can be used to set the image to place on the surface of the earth.
|
* overlay, it can be used to set the image to place on the surface of the earth.
|
||||||
*/
|
*/
|
||||||
|
@PublicApi
|
||||||
public class BitmapDescriptor {
|
public class BitmapDescriptor {
|
||||||
private final IObjectWrapper remoteObject;
|
private final IObjectWrapper remoteObject;
|
||||||
|
|
||||||
|
@ -18,6 +18,8 @@ package com.google.android.gms.maps.model;
|
|||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.util.AttributeSet;
|
import android.util.AttributeSet;
|
||||||
|
|
||||||
|
import org.microg.gms.PublicApi;
|
||||||
import org.microg.safeparcel.AutoSafeParcelable;
|
import org.microg.safeparcel.AutoSafeParcelable;
|
||||||
import org.microg.safeparcel.SafeParceled;
|
import org.microg.safeparcel.SafeParceled;
|
||||||
|
|
||||||
@ -26,6 +28,7 @@ import java.util.Arrays;
|
|||||||
/**
|
/**
|
||||||
* An immutable class that aggregates all camera position parameters.
|
* An immutable class that aggregates all camera position parameters.
|
||||||
*/
|
*/
|
||||||
|
@PublicApi
|
||||||
public final class CameraPosition extends AutoSafeParcelable {
|
public final class CameraPosition extends AutoSafeParcelable {
|
||||||
@SafeParceled(1)
|
@SafeParceled(1)
|
||||||
private final int versionCode;
|
private final int versionCode;
|
||||||
|
@ -17,12 +17,15 @@
|
|||||||
package com.google.android.gms.maps.model;
|
package com.google.android.gms.maps.model;
|
||||||
|
|
||||||
import android.graphics.Color;
|
import android.graphics.Color;
|
||||||
|
|
||||||
|
import org.microg.gms.PublicApi;
|
||||||
import org.microg.safeparcel.AutoSafeParcelable;
|
import org.microg.safeparcel.AutoSafeParcelable;
|
||||||
import org.microg.safeparcel.SafeParceled;
|
import org.microg.safeparcel.SafeParceled;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Defines options for a Circle.
|
* Defines options for a Circle.
|
||||||
*/
|
*/
|
||||||
|
@PublicApi
|
||||||
public class CircleOptions extends AutoSafeParcelable {
|
public class CircleOptions extends AutoSafeParcelable {
|
||||||
@SafeParceled(1)
|
@SafeParceled(1)
|
||||||
private int versionCode;
|
private int versionCode;
|
||||||
|
@ -18,12 +18,15 @@ package com.google.android.gms.maps.model;
|
|||||||
|
|
||||||
import android.os.IBinder;
|
import android.os.IBinder;
|
||||||
import com.google.android.gms.dynamic.ObjectWrapper;
|
import com.google.android.gms.dynamic.ObjectWrapper;
|
||||||
|
|
||||||
|
import org.microg.gms.PublicApi;
|
||||||
import org.microg.safeparcel.AutoSafeParcelable;
|
import org.microg.safeparcel.AutoSafeParcelable;
|
||||||
import org.microg.safeparcel.SafeParceled;
|
import org.microg.safeparcel.SafeParceled;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Defines options for a ground overlay.
|
* Defines options for a ground overlay.
|
||||||
*/
|
*/
|
||||||
|
@PublicApi
|
||||||
public class GroundOverlayOptions extends AutoSafeParcelable {
|
public class GroundOverlayOptions extends AutoSafeParcelable {
|
||||||
/**
|
/**
|
||||||
* Flag for when no dimension is specified for the height.
|
* Flag for when no dimension is specified for the height.
|
||||||
|
@ -16,12 +16,14 @@
|
|||||||
|
|
||||||
package com.google.android.gms.maps.model;
|
package com.google.android.gms.maps.model;
|
||||||
|
|
||||||
|
import org.microg.gms.PublicApi;
|
||||||
import org.microg.safeparcel.AutoSafeParcelable;
|
import org.microg.safeparcel.AutoSafeParcelable;
|
||||||
import org.microg.safeparcel.SafeParceled;
|
import org.microg.safeparcel.SafeParceled;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An immutable class representing a pair of latitude and longitude coordinates, stored as degrees.
|
* An immutable class representing a pair of latitude and longitude coordinates, stored as degrees.
|
||||||
*/
|
*/
|
||||||
|
@PublicApi
|
||||||
public final class LatLng extends AutoSafeParcelable {
|
public final class LatLng extends AutoSafeParcelable {
|
||||||
@SafeParceled(1)
|
@SafeParceled(1)
|
||||||
private final int versionCode;
|
private final int versionCode;
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
package com.google.android.gms.maps.model;
|
package com.google.android.gms.maps.model;
|
||||||
|
|
||||||
|
import org.microg.gms.PublicApi;
|
||||||
import org.microg.safeparcel.AutoSafeParcelable;
|
import org.microg.safeparcel.AutoSafeParcelable;
|
||||||
import org.microg.safeparcel.SafeParceled;
|
import org.microg.safeparcel.SafeParceled;
|
||||||
|
|
||||||
@ -24,6 +25,7 @@ import java.util.Arrays;
|
|||||||
/**
|
/**
|
||||||
* An immutable class representing a latitude/longitude aligned rectangle.
|
* An immutable class representing a latitude/longitude aligned rectangle.
|
||||||
*/
|
*/
|
||||||
|
@PublicApi
|
||||||
public final class LatLngBounds extends AutoSafeParcelable {
|
public final class LatLngBounds extends AutoSafeParcelable {
|
||||||
@SafeParceled(1)
|
@SafeParceled(1)
|
||||||
private final int versionCode;
|
private final int versionCode;
|
||||||
|
@ -18,9 +18,12 @@ package com.google.android.gms.maps.model;
|
|||||||
|
|
||||||
import android.os.IBinder;
|
import android.os.IBinder;
|
||||||
import com.google.android.gms.dynamic.ObjectWrapper;
|
import com.google.android.gms.dynamic.ObjectWrapper;
|
||||||
|
|
||||||
|
import org.microg.gms.PublicApi;
|
||||||
import org.microg.safeparcel.AutoSafeParcelable;
|
import org.microg.safeparcel.AutoSafeParcelable;
|
||||||
import org.microg.safeparcel.SafeParceled;
|
import org.microg.safeparcel.SafeParceled;
|
||||||
|
|
||||||
|
@PublicApi
|
||||||
public class MarkerOptions extends AutoSafeParcelable {
|
public class MarkerOptions extends AutoSafeParcelable {
|
||||||
|
|
||||||
@SafeParceled(1)
|
@SafeParceled(1)
|
||||||
|
@ -16,12 +16,14 @@
|
|||||||
|
|
||||||
package com.google.android.gms.maps.model;
|
package com.google.android.gms.maps.model;
|
||||||
|
|
||||||
|
import org.microg.gms.PublicApi;
|
||||||
import org.microg.safeparcel.AutoSafeParcelable;
|
import org.microg.safeparcel.AutoSafeParcelable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Defines options for a polygon.
|
* Defines options for a polygon.
|
||||||
* TODO
|
* TODO
|
||||||
*/
|
*/
|
||||||
|
@PublicApi
|
||||||
public class PolygonOptions extends AutoSafeParcelable {
|
public class PolygonOptions extends AutoSafeParcelable {
|
||||||
public PolygonOptions() {
|
public PolygonOptions() {
|
||||||
}
|
}
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
package com.google.android.gms.maps.model;
|
package com.google.android.gms.maps.model;
|
||||||
|
|
||||||
|
import org.microg.gms.PublicApi;
|
||||||
import org.microg.safeparcel.AutoSafeParcelable;
|
import org.microg.safeparcel.AutoSafeParcelable;
|
||||||
import org.microg.safeparcel.SafeParceled;
|
import org.microg.safeparcel.SafeParceled;
|
||||||
|
|
||||||
@ -25,6 +26,7 @@ import java.util.List;
|
|||||||
* Defines options for a polyline.
|
* Defines options for a polyline.
|
||||||
* TODO
|
* TODO
|
||||||
*/
|
*/
|
||||||
|
@PublicApi
|
||||||
public class PolylineOptions extends AutoSafeParcelable {
|
public class PolylineOptions extends AutoSafeParcelable {
|
||||||
@SafeParceled(1)
|
@SafeParceled(1)
|
||||||
private int versionCode;
|
private int versionCode;
|
||||||
|
@ -1,4 +1,7 @@
|
|||||||
package com.google.android.gms.maps.model;
|
package com.google.android.gms.maps.model;
|
||||||
|
|
||||||
|
import org.microg.gms.PublicApi;
|
||||||
|
|
||||||
|
@PublicApi
|
||||||
public class StreetViewPanoramaCamera {
|
public class StreetViewPanoramaCamera {
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,7 @@
|
|||||||
package com.google.android.gms.maps.model;
|
package com.google.android.gms.maps.model;
|
||||||
|
|
||||||
|
import org.microg.gms.PublicApi;
|
||||||
|
|
||||||
|
@PublicApi
|
||||||
public class StreetViewPanoramaLink {
|
public class StreetViewPanoramaLink {
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,7 @@
|
|||||||
package com.google.android.gms.maps.model;
|
package com.google.android.gms.maps.model;
|
||||||
|
|
||||||
|
import org.microg.gms.PublicApi;
|
||||||
|
|
||||||
|
@PublicApi
|
||||||
public class StreetViewPanoramaLocation {
|
public class StreetViewPanoramaLocation {
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,7 @@
|
|||||||
package com.google.android.gms.maps.model;
|
package com.google.android.gms.maps.model;
|
||||||
|
|
||||||
|
import org.microg.gms.PublicApi;
|
||||||
|
|
||||||
|
@PublicApi
|
||||||
public class StreetViewPanoramaOrientation {
|
public class StreetViewPanoramaOrientation {
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package com.google.android.gms.maps.model;
|
package com.google.android.gms.maps.model;
|
||||||
|
|
||||||
|
import org.microg.gms.PublicApi;
|
||||||
import org.microg.safeparcel.AutoSafeParcelable;
|
import org.microg.safeparcel.AutoSafeParcelable;
|
||||||
import org.microg.safeparcel.SafeParceled;
|
import org.microg.safeparcel.SafeParceled;
|
||||||
|
|
||||||
@ -7,6 +8,7 @@ import org.microg.safeparcel.SafeParceled;
|
|||||||
* Contains information about a Tile that is returned by a {@link TileProvider}.
|
* Contains information about a Tile that is returned by a {@link TileProvider}.
|
||||||
* TODO SafeParceled
|
* TODO SafeParceled
|
||||||
*/
|
*/
|
||||||
|
@PublicApi
|
||||||
public class Tile extends AutoSafeParcelable {
|
public class Tile extends AutoSafeParcelable {
|
||||||
@SafeParceled(1)
|
@SafeParceled(1)
|
||||||
private final int versionCode;
|
private final int versionCode;
|
||||||
|
@ -19,12 +19,15 @@ 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.PublicApi;
|
||||||
import org.microg.safeparcel.AutoSafeParcelable;
|
import org.microg.safeparcel.AutoSafeParcelable;
|
||||||
import org.microg.safeparcel.SafeParceled;
|
import org.microg.safeparcel.SafeParceled;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Defines options for a TileOverlay.
|
* Defines options for a TileOverlay.
|
||||||
*/
|
*/
|
||||||
|
@PublicApi
|
||||||
public class TileOverlayOptions extends AutoSafeParcelable {
|
public class TileOverlayOptions extends AutoSafeParcelable {
|
||||||
|
|
||||||
@SafeParceled(1)
|
@SafeParceled(1)
|
||||||
|
@ -16,9 +16,11 @@
|
|||||||
|
|
||||||
package com.google.android.gms.maps.model;
|
package com.google.android.gms.maps.model;
|
||||||
|
|
||||||
|
import org.microg.gms.PublicApi;
|
||||||
import org.microg.safeparcel.AutoSafeParcelable;
|
import org.microg.safeparcel.AutoSafeParcelable;
|
||||||
import org.microg.safeparcel.SafeParceled;
|
import org.microg.safeparcel.SafeParceled;
|
||||||
|
|
||||||
|
@PublicApi
|
||||||
public class VisibleRegion extends AutoSafeParcelable {
|
public class VisibleRegion extends AutoSafeParcelable {
|
||||||
@SafeParceled(1)
|
@SafeParceled(1)
|
||||||
private int versionCode;
|
private int versionCode;
|
||||||
|
36
src/com/google/android/gms/wearable/Node.java
Normal file
36
src/com/google/android/gms/wearable/Node.java
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2014-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.gms.PublicApi;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Information about a particular node in the Android Wear network.
|
||||||
|
*/
|
||||||
|
@PublicApi
|
||||||
|
public interface Node {
|
||||||
|
/**
|
||||||
|
* Returns a human readable description of the node. Sometimes generated from the Bluetooth
|
||||||
|
* device name
|
||||||
|
*/
|
||||||
|
public abstract String getDisplayName();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns an opaque string that represents a node in the Android Wear network.
|
||||||
|
*/
|
||||||
|
public abstract String getId();
|
||||||
|
}
|
53
src/com/google/android/gms/wearable/WearableStatusCodes.java
Normal file
53
src/com/google/android/gms/wearable/WearableStatusCodes.java
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2014-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.common.api.CommonStatusCodes;
|
||||||
|
|
||||||
|
import org.microg.gms.PublicApi;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Error codes for wearable API failures. These values may be returned by APIs to indicate the
|
||||||
|
* success or failure of a request.
|
||||||
|
*/
|
||||||
|
@PublicApi
|
||||||
|
public class WearableStatusCodes extends CommonStatusCodes {
|
||||||
|
/**
|
||||||
|
* Indicates that the targeted node is not accessible in the wearable network.
|
||||||
|
*/
|
||||||
|
public static final int TARGET_NODE_NOT_CONNECTED = 4000;
|
||||||
|
/**
|
||||||
|
* Indicates that the specified listener is already registered.
|
||||||
|
*/
|
||||||
|
public static final int DUPLICATE_LISTENER = 4001;
|
||||||
|
/**
|
||||||
|
* Indicates that the specified listener is not recognized.
|
||||||
|
*/
|
||||||
|
public static final int UNKNOWN_LISTENER = 4002;
|
||||||
|
/**
|
||||||
|
* Indicates that the data item was too large to set.
|
||||||
|
*/
|
||||||
|
public static final int DATA_ITEM_TOO_LARGE = 4003;
|
||||||
|
/**
|
||||||
|
* Indicates that the targeted node is not a valid node in the wearable network.
|
||||||
|
*/
|
||||||
|
public static final int INVALID_TARGET_NODE = 4004;
|
||||||
|
/**
|
||||||
|
* Indicates that the requested asset is unavailable.
|
||||||
|
*/
|
||||||
|
public static final int ASSET_UNAVAILABLE = 4005;
|
||||||
|
}
|
@ -0,0 +1,79 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2014-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 com.google.android.gms.wearable.Node;
|
||||||
|
|
||||||
|
import org.microg.safeparcel.AutoSafeParcelable;
|
||||||
|
import org.microg.safeparcel.SafeParceled;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Parcelable implementation of the {@link com.google.android.gms.wearable.Node} interface.
|
||||||
|
*/
|
||||||
|
public class NodeParcelable extends AutoSafeParcelable implements Node {
|
||||||
|
@SafeParceled(1)
|
||||||
|
private final int versionCode;
|
||||||
|
@SafeParceled(2)
|
||||||
|
private final String id;
|
||||||
|
@SafeParceled(3)
|
||||||
|
private final String displayName;
|
||||||
|
|
||||||
|
private NodeParcelable() {
|
||||||
|
versionCode = 1;
|
||||||
|
id = displayName = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public NodeParcelable(String id, String displayName) {
|
||||||
|
versionCode = 1;
|
||||||
|
this.id = id;
|
||||||
|
this.displayName = displayName;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (this == o) return true;
|
||||||
|
if (o == null || getClass() != o.getClass()) return false;
|
||||||
|
|
||||||
|
NodeParcelable that = (NodeParcelable) o;
|
||||||
|
|
||||||
|
if (!id.equals(that.id)) return false;
|
||||||
|
if (!displayName.equals(that.displayName)) return false;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getDisplayName() {
|
||||||
|
return displayName;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
int result = 37 * 17 + id.hashCode();
|
||||||
|
return 37 * result + displayName.hashCode();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "NodeParcelable{" + id + "," + displayName + "}";
|
||||||
|
}
|
||||||
|
}
|
23
src/org/microg/gms/PublicApi.java
Normal file
23
src/org/microg/gms/PublicApi.java
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2014-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 org.microg.gms;
|
||||||
|
|
||||||
|
public @interface PublicApi {
|
||||||
|
String since() default "-1";
|
||||||
|
|
||||||
|
String until() default "-1";
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user