diff options
| author | Andrii Kulian <akulian@google.com> | 2020-01-21 21:41:38 -0800 |
|---|---|---|
| committer | Andrii Kulian <akulian@google.com> | 2020-01-22 18:30:29 -0800 |
| commit | 4a316973192b3f60b59d5cc311f8232420bad6c2 (patch) | |
| tree | 19a7b5234f020f83f8cc04ae6745deeaf2805dc2 /core/java/android/view/Display.java | |
| parent | 2175e3ebef2cbcbff79e8d9ed959799d2a9c96ab (diff) | |
Introduce WindowContext API
Test: atest WmTests CtsWindowManagerDeviceTestCases
Bug: 128338354
Change-Id: I9c9dfc5e7f4edd4c968e60d2ffcbb19b5c72a853
Diffstat (limited to 'core/java/android/view/Display.java')
| -rw-r--r-- | core/java/android/view/Display.java | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/core/java/android/view/Display.java b/core/java/android/view/Display.java index 904c510a5b01..0304328f734a 100644 --- a/core/java/android/view/Display.java +++ b/core/java/android/view/Display.java @@ -423,10 +423,14 @@ public final class Display { /** * Internal method to create a display. * The display created with this method will have a static {@link DisplayAdjustments} applied. - * Applications should use {@link android.view.WindowManager#getDefaultDisplay()} - * or {@link android.hardware.display.DisplayManager#getDisplay} - * to get a display object. + * Applications should use {@link android.content.Context#getDisplay} with + * {@link android.app.Activity} or a context associated with a {@link Display} via + * {@link android.content.Context#createDisplayContext(Display)} + * to get a display object associated with a {@link android.app.Context}, or + * {@link android.hardware.display.DisplayManager#getDisplay} to get a display object by id. * + * @see android.content.Context#getDisplay() + * @see android.content.Context#createDisplayContext(Display) * @hide */ public Display(DisplayManagerGlobal global, int displayId, /*@NotNull*/ DisplayInfo displayInfo, |
