diff options
author | Wale Ogunwale <ogunwale@google.com> | 2015-02-06 17:34:28 -0800 |
---|---|---|
committer | Wale Ogunwale <ogunwale@google.com> | 2015-02-13 21:12:47 -0800 |
commit | 7c72668f19d404b01412abc67937b1b5c660df71 (patch) | |
tree | e98ddbb5e82a5a8e0e02e2fd14056cec591cb7ea /core/java/android/hardware | |
parent | 80955e105d6e71f7b71a63b391fd5a8adcded55e (diff) | |
download | frameworks_base-7c72668f19d404b01412abc67937b1b5c660df71.zip frameworks_base-7c72668f19d404b01412abc67937b1b5c660df71.tar.gz frameworks_base-7c72668f19d404b01412abc67937b1b5c660df71.tar.bz2 |
Adjust activity display metrics based on stack configuration.
Apps normally use context.getResources().getDisplayMetrics()
or getWindowManager().getDefaultDisplay() to get information
about the screen dimensions. Not all the screen space is available
for apps in a multi-window environment, so we limit the dimensions
of the display object exposed to the app to that of the containing
stack.
Bug: 19225079
Bug: 19354838
Change-Id: I8dc3a6c9b99ecedcca28fc4ddaba9f31feb4f871
Diffstat (limited to 'core/java/android/hardware')
-rw-r--r-- | core/java/android/hardware/display/DisplayManagerGlobal.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/core/java/android/hardware/display/DisplayManagerGlobal.java b/core/java/android/hardware/display/DisplayManagerGlobal.java index 0051ef5..d9f9c1e 100644 --- a/core/java/android/hardware/display/DisplayManagerGlobal.java +++ b/core/java/android/hardware/display/DisplayManagerGlobal.java @@ -17,10 +17,10 @@ package android.hardware.display; import android.content.Context; +import android.content.res.Configuration; import android.hardware.display.DisplayManager.DisplayListener; import android.media.projection.MediaProjection; import android.media.projection.IMediaProjection; -import android.os.Binder; import android.os.Handler; import android.os.IBinder; import android.os.Looper; @@ -196,11 +196,11 @@ public final class DisplayManagerGlobal { * Gets information about a logical display without applying any compatibility metrics. * * @param displayId The logical display id. - * @param IBinder the activity token for this display. + * @param configuration the configuration. * @return The display object, or null if there is no display with the given id. */ - public Display getRealDisplay(int displayId, IBinder token) { - return getCompatibleDisplay(displayId, new DisplayAdjustments(token)); + public Display getRealDisplay(int displayId, Configuration configuration) { + return getCompatibleDisplay(displayId, new DisplayAdjustments(configuration)); } public void registerDisplayListener(DisplayListener listener, Handler handler) { |