diff options
| author | Jeff Brown <jeffbrown@google.com> | 2012-09-07 16:01:36 -0700 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-09-07 16:01:37 -0700 |
| commit | 72018294cc4e3cc5feb7affdec4bf4bb2368ac41 (patch) | |
| tree | add91a7ce260c33d8fc72acd56606d5719e749b4 /services/java/com/android/server/display/LogicalDisplay.java | |
| parent | 7017e48380ab0c1be033594bb2a9331898ad5be8 (diff) | |
| parent | 722285e199a9fc74b9b3343b7505c00666848c88 (diff) | |
| download | frameworks_base-72018294cc4e3cc5feb7affdec4bf4bb2368ac41.zip frameworks_base-72018294cc4e3cc5feb7affdec4bf4bb2368ac41.tar.gz frameworks_base-72018294cc4e3cc5feb7affdec4bf4bb2368ac41.tar.bz2 | |
Merge "Make mirroring automatic based on Windows on display." into jb-mr1-dev
Diffstat (limited to 'services/java/com/android/server/display/LogicalDisplay.java')
| -rw-r--r-- | services/java/com/android/server/display/LogicalDisplay.java | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/services/java/com/android/server/display/LogicalDisplay.java b/services/java/com/android/server/display/LogicalDisplay.java index c864189..e0f63dd 100644 --- a/services/java/com/android/server/display/LogicalDisplay.java +++ b/services/java/com/android/server/display/LogicalDisplay.java @@ -63,6 +63,9 @@ final class LogicalDisplay { private DisplayDevice mPrimaryDisplayDevice; private DisplayDeviceInfo mPrimaryDisplayDeviceInfo; + // True if the logical display has unique content. + private boolean mHasContent; + // Temporary rectangle used when needed. private final Rect mTempLayerStackRect = new Rect(); private final Rect mTempDisplayRect = new Rect(); @@ -126,7 +129,7 @@ final class LogicalDisplay { /** * Returns true if the logical display is in a valid state. - * This method should be checked after calling {@link #update} to handle the + * This method should be checked after calling {@link #updateLocked} to handle the * case where a logical display should be removed because all of its associated * display devices are gone or if it is otherwise no longer needed. * @@ -256,6 +259,29 @@ final class LogicalDisplay { device.setProjectionInTransactionLocked(orientation, mTempLayerStackRect, mTempDisplayRect); } + /** + * Returns true if the logical display has unique content. + * <p> + * If the display has unique content then we will try to ensure that it is + * visible on at least its primary display device. Otherwise we will ignore the + * logical display and perhaps show mirrored content on the primary display device. + * </p> + * + * @return True if the display has unique content. + */ + public boolean hasContentLocked() { + return mHasContent; + } + + /** + * Sets whether the logical display has unique content. + * + * @param hasContent True if the display has unique content. + */ + public void setHasContentLocked(boolean hasContent) { + mHasContent = hasContent; + } + public void dumpLocked(PrintWriter pw) { pw.println("mLayerStack=" + mLayerStack); pw.println("mPrimaryDisplayDevice=" + (mPrimaryDisplayDevice != null ? |
