OSDN Git Service

Add javadoc about APIs requiring uses-feature
authorEugene Susla <eugenesusla@google.com>
Mon, 24 Apr 2017 20:26:12 +0000 (13:26 -0700)
committerEugene Susla <eugenesusla@google.com>
Mon, 24 Apr 2017 20:31:31 +0000 (13:31 -0700)
Bug: 37629514
Test: Ensure no compilation error; proofread
Change-Id: Ia250c95da1edb20017bc13a4504ead092eb24fff

core/java/android/companion/CompanionDeviceManager.java

index e50b2a9..fac9e13 100644 (file)
@@ -118,6 +118,9 @@ public final class CompanionDeviceManager {
      * association is no longer relevant to avoid unnecessary battery and/or data drain resulting
      * from special privileges that the association provides</p>
      *
+     * <p>Calling this API requires a uses-feature
+     * {@link PackageManager#FEATURE_COMPANION_DEVICE_SETUP} declaration in the manifest</p>
+     *
      * @param request specific details about this request
      * @param callback will be called once there's at least one device found for user to choose from
      * @param handler A handler to control which thread the callback will be delivered on, or null,
@@ -160,6 +163,9 @@ public final class CompanionDeviceManager {
     }
 
     /**
+     * <p>Calling this API requires a uses-feature
+     * {@link PackageManager#FEATURE_COMPANION_DEVICE_SETUP} declaration in the manifest</p>
+     *
      * @return a list of MAC addresses of devices that have been previously associated with the
      * current app. You can use these with {@link #disassociate}
      */
@@ -184,6 +190,9 @@ public final class CompanionDeviceManager {
      * association is no longer relevant to avoid unnecessary battery and/or data drain resulting
      * from special privileges that the association provides</p>
      *
+     * <p>Calling this API requires a uses-feature
+     * {@link PackageManager#FEATURE_COMPANION_DEVICE_SETUP} declaration in the manifest</p>
+     *
      * @param deviceMacAddress the MAC address of device to disassociate from this app
      */
     public void disassociate(@NonNull String deviceMacAddress) {
@@ -206,6 +215,9 @@ public final class CompanionDeviceManager {
      * are allowed.
      *
      * Your app must have an association with a device before calling this API
+     *
+     * <p>Calling this API requires a uses-feature
+     * {@link PackageManager#FEATURE_COMPANION_DEVICE_SETUP} declaration in the manifest</p>
      */
     public void requestNotificationAccess(ComponentName component) {
         if (!checkFeaturePresent()) {
@@ -226,6 +238,9 @@ public final class CompanionDeviceManager {
      *
      * Your app must have an association with a device before calling this API
      *
+     * <p>Calling this API requires a uses-feature
+     * {@link PackageManager#FEATURE_COMPANION_DEVICE_SETUP} declaration in the manifest</p>
+     *
      * @param component the name of the component
      * @return whether the given component has the notification listener permission
      */