summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/java/android/hardware/display/VirtualDisplayConfig.java7
-rw-r--r--services/core/java/com/android/server/display/DisplayManagerService.java4
2 files changed, 9 insertions, 2 deletions
diff --git a/core/java/android/hardware/display/VirtualDisplayConfig.java b/core/java/android/hardware/display/VirtualDisplayConfig.java
index 9e09759a4282..56f69a67c0b5 100644
--- a/core/java/android/hardware/display/VirtualDisplayConfig.java
+++ b/core/java/android/hardware/display/VirtualDisplayConfig.java
@@ -450,11 +450,14 @@ public final class VirtualDisplayConfig implements Parcelable {
* automatically launched upon the display creation. If unset or set to {@code false}, the
* display will not host any activities upon creation.</p>
*
- * <p>Note: setting to {@code true} requires the display to be trusted. If the display is
- * not trusted, this property is ignored.</p>
+ * <p>Note: setting to {@code true} requires the display to be trusted and to not mirror
+ * content of other displays. If the display is not trusted, or if it mirrors content of
+ * other displays, this property is ignored.</p>
*
* @param isHomeSupported whether home activities are supported on the display
* @see DisplayManager#VIRTUAL_DISPLAY_FLAG_TRUSTED
+ * @see DisplayManager#VIRTUAL_DISPLAY_FLAG_AUTO_MIRROR
+ * @see DisplayManager#VIRTUAL_DISPLAY_FLAG_OWN_CONTENT_ONLY
* @hide
*/
@FlaggedApi(android.companion.virtual.flags.Flags.FLAG_VDM_CUSTOM_HOME)
diff --git a/services/core/java/com/android/server/display/DisplayManagerService.java b/services/core/java/com/android/server/display/DisplayManagerService.java
index bc3f9dd3cb8c..fbac924be283 100644
--- a/services/core/java/com/android/server/display/DisplayManagerService.java
+++ b/services/core/java/com/android/server/display/DisplayManagerService.java
@@ -1615,6 +1615,10 @@ public final class DisplayManagerService extends SystemService {
if ((flags & VIRTUAL_DISPLAY_FLAG_TRUSTED) == 0) {
Slog.w(TAG, "Display created with home support but lacks "
+ "VIRTUAL_DISPLAY_FLAG_TRUSTED, ignoring the home support request.");
+ } else if ((flags & VIRTUAL_DISPLAY_FLAG_AUTO_MIRROR) != 0) {
+ Slog.w(TAG, "Display created with home support but has "
+ + "VIRTUAL_DISPLAY_FLAG_AUTO_MIRROR, ignoring the home support "
+ + "request.");
} else {
mWindowManagerInternal.setHomeSupportedOnDisplay(displayUniqueId,
Display.TYPE_VIRTUAL, true);