diff options
Diffstat (limited to 'core/java/android')
| -rw-r--r-- | core/java/android/hardware/display/DisplayManager.java | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/core/java/android/hardware/display/DisplayManager.java b/core/java/android/hardware/display/DisplayManager.java index 731ea9207283..eadcac91dcd7 100644 --- a/core/java/android/hardware/display/DisplayManager.java +++ b/core/java/android/hardware/display/DisplayManager.java @@ -108,6 +108,17 @@ public final class DisplayManager { public static final String DISPLAY_CATEGORY_PRESENTATION = "android.hardware.display.category.PRESENTATION"; + /** + * Display category: All displays, including disabled displays. + * <p> + * This returns all displays, including currently disabled and inaccessible displays. + * + * @see #getDisplays(String) + * @hide + */ + public static final String DISPLAY_CATEGORY_ALL_INCLUDING_DISABLED = + "android.hardware.display.category.ALL_INCLUDING_DISABLED"; + /** @hide **/ @IntDef(prefix = "VIRTUAL_DISPLAY_FLAG_", flag = true, value = { VIRTUAL_DISPLAY_FLAG_PUBLIC, @@ -552,7 +563,8 @@ public final class DisplayManager { final int[] displayIds = mGlobal.getDisplayIds(); synchronized (mLock) { try { - if (category == null) { + if (category == null + || DISPLAY_CATEGORY_ALL_INCLUDING_DISABLED.equals(category)) { addAllDisplaysLocked(mTempDisplays, displayIds); } else if (category.equals(DISPLAY_CATEGORY_PRESENTATION)) { addPresentationDisplaysLocked(mTempDisplays, displayIds, Display.TYPE_WIFI); |
