summaryrefslogtreecommitdiffstats
path: root/core/java/android/hardware/display
diff options
context:
space:
mode:
authorJeff Brown <jeffbrown@google.com>2012-09-26 18:34:47 -0700
committerJeff Brown <jeffbrown@google.com>2012-09-26 18:34:47 -0700
commitbc335457462a12434a9df6955de1dd693cdccac7 (patch)
tree6c2881bbb48aecdfb3df4d73eb2c55b8b448237d /core/java/android/hardware/display
parent62c82e4d92cc0b856059f905d81885f7808a0e7d (diff)
downloadframeworks_base-bc335457462a12434a9df6955de1dd693cdccac7.zip
frameworks_base-bc335457462a12434a9df6955de1dd693cdccac7.tar.gz
frameworks_base-bc335457462a12434a9df6955de1dd693cdccac7.tar.bz2
Allow applications to connect to known wifi displays.
Bug: 7177920 Change-Id: I9d8406e1016988e2cd267dfa52d78a829f1b385e
Diffstat (limited to 'core/java/android/hardware/display')
-rw-r--r--core/java/android/hardware/display/DisplayManager.java11
-rw-r--r--core/java/android/hardware/display/IDisplayManager.aidl9
2 files changed, 13 insertions, 7 deletions
diff --git a/core/java/android/hardware/display/DisplayManager.java b/core/java/android/hardware/display/DisplayManager.java
index 58a0f13..28e320b 100644
--- a/core/java/android/hardware/display/DisplayManager.java
+++ b/core/java/android/hardware/display/DisplayManager.java
@@ -46,9 +46,7 @@ public final class DisplayManager {
* The status is provided as a {@link WifiDisplayStatus} object in the
* {@link #EXTRA_WIFI_DISPLAY_STATUS} extra.
* </p><p>
- * This broadcast is only sent to registered receivers with the
- * {@link android.Manifest.permission#CONFIGURE_WIFI_DISPLAY} permission and can
- * only be sent by the system.
+ * This broadcast is only sent to registered receivers and can only be sent by the system.
* </p>
* @hide
*/
@@ -163,6 +161,9 @@ public final class DisplayManager {
* <p>
* Automatically remembers the display after a successful connection, if not
* already remembered.
+ * </p><p>
+ * Requires {@link android.Manifest.permission#CONFIGURE_WIFI_DISPLAY} to connect
+ * to unknown displays. No permissions are required to connect to already known displays.
* </p>
*
* @param deviceAddress The MAC address of the device to which we should connect.
@@ -187,6 +188,8 @@ public final class DisplayManager {
* The display must already be remembered for this call to succeed. In other words,
* we must already have successfully connected to the display at least once and then
* not forgotten it.
+ * </p><p>
+ * Requires {@link android.Manifest.permission#CONFIGURE_WIFI_DISPLAY}.
* </p>
*
* @param deviceAddress The MAC address of the device to rename.
@@ -202,6 +205,8 @@ public final class DisplayManager {
* Forgets a previously remembered Wifi display.
* <p>
* Automatically disconnects from the display if currently connected to it.
+ * </p><p>
+ * Requires {@link android.Manifest.permission#CONFIGURE_WIFI_DISPLAY}.
* </p>
*
* @param deviceAddress The MAC address of the device to forget.
diff --git a/core/java/android/hardware/display/IDisplayManager.aidl b/core/java/android/hardware/display/IDisplayManager.aidl
index 4b6fb53..79aad78 100644
--- a/core/java/android/hardware/display/IDisplayManager.aidl
+++ b/core/java/android/hardware/display/IDisplayManager.aidl
@@ -28,13 +28,14 @@ interface IDisplayManager {
void registerCallback(in IDisplayManagerCallback callback);
- // Requires CONFIGURE_WIFI_DISPLAY permission.
+ // No permissions required.
void scanWifiDisplays();
- // Requires CONFIGURE_WIFI_DISPLAY permission.
+ // Requires CONFIGURE_WIFI_DISPLAY permission to connect to an unknown device.
+ // No permissions required to connect to a known device.
void connectWifiDisplay(String address);
- // Requires CONFIGURE_WIFI_DISPLAY permission.
+ // No permissions required.
void disconnectWifiDisplay();
// Requires CONFIGURE_WIFI_DISPLAY permission.
@@ -43,6 +44,6 @@ interface IDisplayManager {
// Requires CONFIGURE_WIFI_DISPLAY permission.
void forgetWifiDisplay(String address);
- // Requires CONFIGURE_WIFI_DISPLAY permission.
+ // No permissions required.
WifiDisplayStatus getWifiDisplayStatus();
}