summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Eugene Susla <eugenesusla@google.com> 2017-04-25 06:54:10 +0000
committer android-build-merger <android-build-merger@google.com> 2017-04-25 06:54:10 +0000
commitf3f46a5416d6933686fb44ef856e6a29bb18d0f9 (patch)
treeb1d9812ae684d0bf62cadb20d3e2deef381b0e35
parent3aa1f6503ea1a1a38ce7475fbcdde383e2d68442 (diff)
parent0cc9c8090deea9d5daad2cc4f9e5ac4890f29b20 (diff)
Merge "Add javadoc about APIs requiring uses-feature" into oc-dev am: 07d2cec982
am: 0cc9c8090d Change-Id: I2b763f91adfc6f6dc25915f6a41efffdcc44ea42
-rw-r--r--core/java/android/companion/CompanionDeviceManager.java15
1 files changed, 15 insertions, 0 deletions
diff --git a/core/java/android/companion/CompanionDeviceManager.java b/core/java/android/companion/CompanionDeviceManager.java
index e50b2a97c2d2..fac9e13db322 100644
--- a/core/java/android/companion/CompanionDeviceManager.java
+++ b/core/java/android/companion/CompanionDeviceManager.java
@@ -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
*/