DO NOT MERGE - Allowing only a subset of display attributes to get overridden.
b/20854184
Change-Id: If6b2486ba8ca93e8f96d3bdbe8e140c736353683
(cherry picked from commit 4b4c7f98869f5394b738bbc91b3775b6f4026189)
diff --git a/services/core/java/com/android/server/display/LogicalDisplay.java b/services/core/java/com/android/server/display/LogicalDisplay.java
index 7accbf2..424b4a0 100644
--- a/services/core/java/com/android/server/display/LogicalDisplay.java
+++ b/services/core/java/com/android/server/display/LogicalDisplay.java
@@ -117,14 +117,22 @@
public DisplayInfo getDisplayInfoLocked() {
if (mInfo == null) {
mInfo = new DisplayInfo();
+ mInfo.copyFrom(mBaseDisplayInfo);
if (mOverrideDisplayInfo != null) {
- mInfo.copyFrom(mOverrideDisplayInfo);
- mInfo.layerStack = mBaseDisplayInfo.layerStack;
- mInfo.name = mBaseDisplayInfo.name;
- mInfo.uniqueId = mBaseDisplayInfo.uniqueId;
- mInfo.state = mBaseDisplayInfo.state;
- } else {
- mInfo.copyFrom(mBaseDisplayInfo);
+ mInfo.appWidth = mOverrideDisplayInfo.appWidth;
+ mInfo.appHeight = mOverrideDisplayInfo.appHeight;
+ mInfo.smallestNominalAppWidth = mOverrideDisplayInfo.smallestNominalAppWidth;
+ mInfo.smallestNominalAppHeight = mOverrideDisplayInfo.smallestNominalAppHeight;
+ mInfo.largestNominalAppWidth = mOverrideDisplayInfo.largestNominalAppWidth;
+ mInfo.largestNominalAppHeight = mOverrideDisplayInfo.largestNominalAppHeight;
+ mInfo.logicalWidth = mOverrideDisplayInfo.logicalWidth;
+ mInfo.logicalHeight = mOverrideDisplayInfo.logicalHeight;
+ mInfo.overscanLeft = mOverrideDisplayInfo.overscanLeft;
+ mInfo.overscanTop = mOverrideDisplayInfo.overscanTop;
+ mInfo.overscanRight = mOverrideDisplayInfo.overscanRight;
+ mInfo.overscanBottom = mOverrideDisplayInfo.overscanBottom;
+ mInfo.rotation = mOverrideDisplayInfo.rotation;
+ mInfo.logicalDensityDpi = mOverrideDisplayInfo.logicalDensityDpi;
}
}
return mInfo;