diff options
| author | Jeff Brown <jeffbrown@google.com> | 2012-08-23 19:48:44 -0700 |
|---|---|---|
| committer | Jeff Brown <jeffbrown@google.com> | 2012-08-31 15:42:45 -0700 |
| commit | a492c3a7b2c18426fd0cb4d017eacbc368195dc5 (patch) | |
| tree | 67744a8d91519d997cb761a697600041d74165fa /core/java/android/content/ContextWrapper.java | |
| parent | 00453e7a0182b50cf01e65c97650b526284fe084 (diff) | |
Initial draft of high-level multi-display APIs.
This patch introduces the ability to create a Context that
is bound to a Display. The context gets its configuration and
metrics from that display and is able to provide a WindowManager
that is bound to the display.
To make it easier to use, we also add a new kind of Dialog
called a Presentation. Presentation takes care of setting
up the context as needed and watches for significant changes
in the display configuration. If the display is removed,
then the presentation simply dismisses itself.
Change-Id: Idc54b4ec84b1ff91505cfb78910cf8cd09696d7d
Diffstat (limited to 'core/java/android/content/ContextWrapper.java')
| -rw-r--r-- | core/java/android/content/ContextWrapper.java | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/core/java/android/content/ContextWrapper.java b/core/java/android/content/ContextWrapper.java index e50338838952..e8c63d645ad7 100644 --- a/core/java/android/content/ContextWrapper.java +++ b/core/java/android/content/ContextWrapper.java @@ -36,6 +36,7 @@ import android.os.Looper; import android.os.RemoteException; import android.os.UserHandle; import android.view.CompatibilityInfoHolder; +import android.view.Display; import java.io.File; import java.io.FileInputStream; @@ -582,13 +583,18 @@ public class ContextWrapper extends Context { } @Override + public Context createDisplayContext(Display display) { + return mBase.createDisplayContext(display); + } + + @Override public boolean isRestricted() { return mBase.isRestricted(); } /** @hide */ @Override - public CompatibilityInfoHolder getCompatibilityInfo() { - return mBase.getCompatibilityInfo(); + public CompatibilityInfoHolder getCompatibilityInfo(int displayId) { + return mBase.getCompatibilityInfo(displayId); } } |
