From a492c3a7b2c18426fd0cb4d017eacbc368195dc5 Mon Sep 17 00:00:00 2001 From: Jeff Brown Date: Thu, 23 Aug 2012 19:48:44 -0700 Subject: 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 --- test-runner/src/android/test/mock/MockContext.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'test-runner') diff --git a/test-runner/src/android/test/mock/MockContext.java b/test-runner/src/android/test/mock/MockContext.java index eb1f2d6..9004e10 100644 --- a/test-runner/src/android/test/mock/MockContext.java +++ b/test-runner/src/android/test/mock/MockContext.java @@ -40,6 +40,7 @@ import android.os.Handler; import android.os.Looper; import android.os.UserHandle; import android.view.CompatibilityInfoHolder; +import android.view.Display; import java.io.File; import java.io.FileInputStream; @@ -521,13 +522,18 @@ public class MockContext extends Context { } @Override + public Context createDisplayContext(Display display) { + throw new UnsupportedOperationException(); + } + + @Override public boolean isRestricted() { throw new UnsupportedOperationException(); } /** @hide */ @Override - public CompatibilityInfoHolder getCompatibilityInfo() { + public CompatibilityInfoHolder getCompatibilityInfo(int displayId) { throw new UnsupportedOperationException(); } } -- cgit v1.1