diff options
author | Jiyong Park <jiyong@google.com> | 2018-02-27 22:00:23 +0900 |
---|---|---|
committer | Jiyong Park <jiyong@google.com> | 2018-03-19 19:27:09 +0900 |
commit | eee99986c8021d6825f99a25434725fccf7b2b12 (patch) | |
tree | 79da47d3610df6db9f59dc35a624db4a2c86a254 /location/lib/java | |
parent | 790befca1deb009e578a05e42504d95e9f1a03b0 (diff) |
Create the stubs lib for com.android.location.provider
com.android.location.provider.stubs is the stubs library for the shared
library com.android.location.provider. The stubs library is intended to
provide the stable set of APIs to the apps implementing location
provider.
Without the stubs library, apps had to directly link to the shared
library which is built without Android SDK and exposes private APIs that
are not intended to be used by apps. This also has been causing the
lin-type check warnings when the shared lib is used by apps built with
SDK; apps built with SDK is not allowed to link to lib built without
SDK. This has been reported as warnings but will soon be errors. Now
such apps are required to link to the stubs lib, which is built with
SDK.
While building the stubs library, following APIs are made hidden because
they are exposing private APIs from the Android platform.
1) Activity* classes are removed from the API, as they are not intended
to be used by apps since O.
2) GeocodeProvider and GeofenceProvider are removed from the API.
3) LocationProvider.mLocationManager is removed as it is exposing the
private symbol ILocationProvider
4) ProviderPropertiesUnbundle.getProviderProperties are removed from the
API as it is exposing the private symbol ProviderProperties.
5) The constructor of ProviderRequestUnbundled is removed since the
class is intended to be instantiated by the service.
Bug: 71420593
Test: m -j com.android.location.provider.stubs
Change-Id: I20aba7e9ca9c3adc75db241f37a55f0d657f3ced
Diffstat (limited to 'location/lib/java')
11 files changed, 11 insertions, 1 deletions
diff --git a/location/lib/java/com/android/location/provider/ActivityChangedEvent.java b/location/lib/java/com/android/location/provider/ActivityChangedEvent.java index c7dfc887bbbb..843dd670315a 100644 --- a/location/lib/java/com/android/location/provider/ActivityChangedEvent.java +++ b/location/lib/java/com/android/location/provider/ActivityChangedEvent.java @@ -23,6 +23,7 @@ import java.util.List; /** * A class representing an event for Activity changes. + * @hide */ public class ActivityChangedEvent { private final List<ActivityRecognitionEvent> mActivityRecognitionEvents; diff --git a/location/lib/java/com/android/location/provider/ActivityRecognitionEvent.java b/location/lib/java/com/android/location/provider/ActivityRecognitionEvent.java index a39cff228567..e54dea40d690 100644 --- a/location/lib/java/com/android/location/provider/ActivityRecognitionEvent.java +++ b/location/lib/java/com/android/location/provider/ActivityRecognitionEvent.java @@ -18,6 +18,7 @@ package com.android.location.provider; /** * A class that represents an Activity Recognition Event. + * @hide */ public class ActivityRecognitionEvent { private final String mActivity; diff --git a/location/lib/java/com/android/location/provider/ActivityRecognitionProvider.java b/location/lib/java/com/android/location/provider/ActivityRecognitionProvider.java index bc2dae14be38..0eff7d3f2014 100644 --- a/location/lib/java/com/android/location/provider/ActivityRecognitionProvider.java +++ b/location/lib/java/com/android/location/provider/ActivityRecognitionProvider.java @@ -28,6 +28,7 @@ import java.util.HashSet; /** * A class that exposes {@link IActivityRecognitionHardware} functionality to unbundled services. + * @hide */ public final class ActivityRecognitionProvider { private final IActivityRecognitionHardware mService; diff --git a/location/lib/java/com/android/location/provider/ActivityRecognitionProviderClient.java b/location/lib/java/com/android/location/provider/ActivityRecognitionProviderClient.java index 0b878d7c1f2b..326d901b9daa 100644 --- a/location/lib/java/com/android/location/provider/ActivityRecognitionProviderClient.java +++ b/location/lib/java/com/android/location/provider/ActivityRecognitionProviderClient.java @@ -27,6 +27,7 @@ import android.util.Log; /** * A client class for interaction with an Activity-Recognition provider. + * @hide */ public abstract class ActivityRecognitionProviderClient { private static final String TAG = "ArProviderClient"; diff --git a/location/lib/java/com/android/location/provider/ActivityRecognitionProviderWatcher.java b/location/lib/java/com/android/location/provider/ActivityRecognitionProviderWatcher.java index 7139025d2722..42f77b42766f 100644 --- a/location/lib/java/com/android/location/provider/ActivityRecognitionProviderWatcher.java +++ b/location/lib/java/com/android/location/provider/ActivityRecognitionProviderWatcher.java @@ -30,6 +30,7 @@ import android.util.Log; * A watcher class for Activity-Recognition instances. * * @deprecated use {@link ActivityRecognitionProviderClient} instead. + * @hide */ @Deprecated public class ActivityRecognitionProviderWatcher { diff --git a/location/lib/java/com/android/location/provider/GeocodeProvider.java b/location/lib/java/com/android/location/provider/GeocodeProvider.java index d7a34af332ca..f7f3d82169a7 100644 --- a/location/lib/java/com/android/location/provider/GeocodeProvider.java +++ b/location/lib/java/com/android/location/provider/GeocodeProvider.java @@ -33,6 +33,7 @@ import java.util.List; * <p>IMPORTANT: This class is effectively a public API for unbundled * applications, and must remain API stable. See README.txt in the root * of this package for more information. + * @hide */ public abstract class GeocodeProvider { diff --git a/location/lib/java/com/android/location/provider/GeofenceProvider.java b/location/lib/java/com/android/location/provider/GeofenceProvider.java index fafaa8462dd9..43690ab87cf2 100644 --- a/location/lib/java/com/android/location/provider/GeofenceProvider.java +++ b/location/lib/java/com/android/location/provider/GeofenceProvider.java @@ -31,6 +31,7 @@ import android.location.IGeofenceProvider; * <p>IMPORTANT: This class is effectively a public API for unbundled * applications, and must remain API stable. See README.txt in the root * of this package for more information. + * @hide */ public abstract class GeofenceProvider { diff --git a/location/lib/java/com/android/location/provider/GmsFusedBatchOptions.java b/location/lib/java/com/android/location/provider/GmsFusedBatchOptions.java index 29818ecb85cb..13278e7afc1f 100644 --- a/location/lib/java/com/android/location/provider/GmsFusedBatchOptions.java +++ b/location/lib/java/com/android/location/provider/GmsFusedBatchOptions.java @@ -105,7 +105,7 @@ public class GmsFusedBatchOptions { * Method definitions for internal use. */ - /* + /** * @hide */ public FusedBatchOptions getParcelableOptions() { diff --git a/location/lib/java/com/android/location/provider/LocationProviderBase.java b/location/lib/java/com/android/location/provider/LocationProviderBase.java index d717f40cab59..30655f5bbf10 100644 --- a/location/lib/java/com/android/location/provider/LocationProviderBase.java +++ b/location/lib/java/com/android/location/provider/LocationProviderBase.java @@ -56,6 +56,7 @@ import com.android.internal.util.FastPrintWriter; public abstract class LocationProviderBase { private final String TAG; + /** @hide */ protected final ILocationManager mLocationManager; private final ProviderProperties mProperties; private final IBinder mBinder; diff --git a/location/lib/java/com/android/location/provider/ProviderPropertiesUnbundled.java b/location/lib/java/com/android/location/provider/ProviderPropertiesUnbundled.java index 9ee4df21c894..b1a1bda45f39 100644 --- a/location/lib/java/com/android/location/provider/ProviderPropertiesUnbundled.java +++ b/location/lib/java/com/android/location/provider/ProviderPropertiesUnbundled.java @@ -41,6 +41,7 @@ public final class ProviderPropertiesUnbundled { mProperties = properties; } + /** @hide */ public ProviderProperties getProviderProperties() { return mProperties; } diff --git a/location/lib/java/com/android/location/provider/ProviderRequestUnbundled.java b/location/lib/java/com/android/location/provider/ProviderRequestUnbundled.java index ad3d1df35548..6a8e61877e46 100644 --- a/location/lib/java/com/android/location/provider/ProviderRequestUnbundled.java +++ b/location/lib/java/com/android/location/provider/ProviderRequestUnbundled.java @@ -33,6 +33,7 @@ import com.android.internal.location.ProviderRequest; public final class ProviderRequestUnbundled { private final ProviderRequest mRequest; + /** @hide */ public ProviderRequestUnbundled(ProviderRequest request) { mRequest = request; } |