From 2ab1b7d9abc1b720b63ae01abcf1df0dc780eed4 Mon Sep 17 00:00:00 2001 From: Jeff Brown Date: Wed, 8 Aug 2012 01:46:41 -0700 Subject: [PATCH] Make display info accessible from hidden api. Change-Id: I83f3899b9ef10da4fe9a71f40dee8e940b32ec46 --- core/java/android/view/Display.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/core/java/android/view/Display.java b/core/java/android/view/Display.java index 2b0c14df21f22..5409b3849ff28 100644 --- a/core/java/android/view/Display.java +++ b/core/java/android/view/Display.java @@ -100,6 +100,19 @@ public final class Display { return mDisplayId; } + /** + * Gets a full copy of the display information. + * + * @param outDisplayInfo The object to receive the copy of the display information. + * @hide + */ + public void getDisplayInfo(DisplayInfo outDisplayInfo) { + synchronized (this) { + updateDisplayInfoLocked(); + outDisplayInfo.copyFrom(mDisplayInfo); + } + } + /** * Gets the size of the display, in pixels. *