Added unique id to display devices and their settings.
The display setting saved to disk were using a localized name for
the key. This is an issue if the user changes languages after the
display settings have been saved. We now use the non-localized
name for the display to access the settings if it is available,
else we fall back on the localized name.
Bug: 18190800
Change-Id: I837c06a8935df10727229a1aa2bb6eeb3953707f
diff --git a/services/core/java/com/android/server/display/LogicalDisplay.java b/services/core/java/com/android/server/display/LogicalDisplay.java
index 00ff1cf..6c57eec 100644
--- a/services/core/java/com/android/server/display/LogicalDisplay.java
+++ b/services/core/java/com/android/server/display/LogicalDisplay.java
@@ -118,6 +118,7 @@
mInfo.copyFrom(mOverrideDisplayInfo);
mInfo.layerStack = mBaseDisplayInfo.layerStack;
mInfo.name = mBaseDisplayInfo.name;
+ mInfo.uniqueId = mBaseDisplayInfo.uniqueId;
mInfo.state = mBaseDisplayInfo.state;
} else {
mInfo.copyFrom(mBaseDisplayInfo);
@@ -208,6 +209,7 @@
mBaseDisplayInfo.type = deviceInfo.type;
mBaseDisplayInfo.address = deviceInfo.address;
mBaseDisplayInfo.name = deviceInfo.name;
+ mBaseDisplayInfo.uniqueId = deviceInfo.uniqueId;
mBaseDisplayInfo.appWidth = deviceInfo.width;
mBaseDisplayInfo.appHeight = deviceInfo.height;
mBaseDisplayInfo.logicalWidth = deviceInfo.width;