summaryrefslogtreecommitdiffstats
path: root/core/java/android/hardware/display/DisplayManager.java
diff options
context:
space:
mode:
authorJeff Brown <jeffbrown@google.com>2012-09-19 11:33:42 -0700
committerJeff Brown <jeffbrown@google.com>2012-09-19 22:04:44 -0700
commit89d5546d7fd3a3bb19820c42e8b4527013dd6545 (patch)
treed3c39ef51f626165545504772f0fb8ba8f01f076 /core/java/android/hardware/display/DisplayManager.java
parent4e7b551fbffa6112821ed6cfeedd6128463fccd0 (diff)
downloadframeworks_base-89d5546d7fd3a3bb19820c42e8b4527013dd6545.zip
frameworks_base-89d5546d7fd3a3bb19820c42e8b4527013dd6545.tar.gz
frameworks_base-89d5546d7fd3a3bb19820c42e8b4527013dd6545.tar.bz2
Add support for remembering Wifi display devices.
Add a setting to globally disable Wifi display. Fixed a bug where the wifi display broadcast receiver was running on the wrong thread. Removed the wifi-display QuickSettings dialog, all functionality has been moved to Settings. Bug: 7178216 Bug: 7192799 Change-Id: I9796baac8245d664cf28fa147b9ed978d81d8ab9
Diffstat (limited to 'core/java/android/hardware/display/DisplayManager.java')
-rw-r--r--core/java/android/hardware/display/DisplayManager.java34
1 files changed, 34 insertions, 0 deletions
diff --git a/core/java/android/hardware/display/DisplayManager.java b/core/java/android/hardware/display/DisplayManager.java
index 4347e75..58a0f13 100644
--- a/core/java/android/hardware/display/DisplayManager.java
+++ b/core/java/android/hardware/display/DisplayManager.java
@@ -160,6 +160,10 @@ public final class DisplayManager {
/**
* Connects to a Wifi display.
* The results are sent as a {@link #ACTION_WIFI_DISPLAY_STATUS_CHANGED} broadcast.
+ * <p>
+ * Automatically remembers the display after a successful connection, if not
+ * already remembered.
+ * </p>
*
* @param deviceAddress The MAC address of the device to which we should connect.
* @hide
@@ -178,6 +182,36 @@ public final class DisplayManager {
}
/**
+ * Renames a Wifi display.
+ * <p>
+ * 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>
+ *
+ * @param deviceAddress The MAC address of the device to rename.
+ * @param alias The alias name by which to remember the device, or null
+ * or empty if no alias should be used.
+ * @hide
+ */
+ public void renameWifiDisplay(String deviceAddress, String alias) {
+ mGlobal.renameWifiDisplay(deviceAddress, alias);
+ }
+
+ /**
+ * Forgets a previously remembered Wifi display.
+ * <p>
+ * Automatically disconnects from the display if currently connected to it.
+ * </p>
+ *
+ * @param deviceAddress The MAC address of the device to forget.
+ * @hide
+ */
+ public void forgetWifiDisplay(String deviceAddress) {
+ mGlobal.forgetWifiDisplay(deviceAddress);
+ }
+
+ /**
* Gets the current Wifi display status.
* Watch for changes in the status by registering a broadcast receiver for
* {@link #ACTION_WIFI_DISPLAY_STATUS_CHANGED}.