summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Charles Chen <charlesccchen@google.com> 2024-07-08 14:44:39 +0800
committer Cherrypicker Worker <android-build-cherrypicker-worker@google.com> 2024-07-22 03:10:21 +0000
commitda84c7d06d56cd27ed12f601af6608d08a43bbc7 (patch)
treec966f1b12bb49777b5a935009fa99a5344bfcdcb
parent57deacba44cd462df33c96bdde715726c4bb0223 (diff)
Add debug log to getPossibleDisplayInfo
Test: manual Bug: 345960547 Flag: EXEMPT bugfix (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:6b225cbc7375496855a9075c21cd350bc216c3b7) Merged-In: I32a103f81e86d59d462ddb59d3e0fed6865e3364 Change-Id: I32a103f81e86d59d462ddb59d3e0fed6865e3364
-rw-r--r--services/core/java/com/android/server/display/DisplayManagerService.java4
-rw-r--r--services/core/java/com/android/server/display/LogicalDisplayMapper.java4
2 files changed, 8 insertions, 0 deletions
diff --git a/services/core/java/com/android/server/display/DisplayManagerService.java b/services/core/java/com/android/server/display/DisplayManagerService.java
index c7b1d6a44239..32ae90199237 100644
--- a/services/core/java/com/android/server/display/DisplayManagerService.java
+++ b/services/core/java/com/android/server/display/DisplayManagerService.java
@@ -4643,6 +4643,8 @@ public final class DisplayManagerService extends SystemService {
}
final int[] supportedStates =
mDeviceStateManager.getSupportedStateIdentifiers();
+ // TODO(b/352019542): remove the log once b/345960547 is fixed.
+ Slog.d(TAG, "supportedStates=" + Arrays.toString(supportedStates));
DisplayInfo displayInfo;
for (int state : supportedStates) {
displayInfo = mLogicalDisplayMapper.getDisplayInfoForStateLocked(state,
@@ -4651,6 +4653,8 @@ public final class DisplayManagerService extends SystemService {
possibleInfo.add(displayInfo);
}
}
+ // TODO(b/352019542): remove the log once b/345960547 is fixed.
+ Slog.d(TAG, "possibleInfos=" + possibleInfo);
return possibleInfo;
}
}
diff --git a/services/core/java/com/android/server/display/LogicalDisplayMapper.java b/services/core/java/com/android/server/display/LogicalDisplayMapper.java
index 4f5fefbd1985..2ac46740db97 100644
--- a/services/core/java/com/android/server/display/LogicalDisplayMapper.java
+++ b/services/core/java/com/android/server/display/LogicalDisplayMapper.java
@@ -384,11 +384,15 @@ class LogicalDisplayMapper implements DisplayDeviceRepository.Listener {
// Retrieve the layout for this particular state.
final Layout layout = mDeviceStateToLayoutMap.get(deviceState);
if (layout == null) {
+ // TODO(b/352019542): remove the log once b/345960547 is fixed.
+ Slog.d(TAG, "Cannot get layout for given state:" + deviceState);
return null;
}
// Retrieve the details of the given display within this layout.
Layout.Display display = layout.getById(displayId);
if (display == null) {
+ // TODO(b/352019542): remove the log once b/345960547 is fixed.
+ Slog.d(TAG, "Cannot get display for given layout:" + layout);
return null;
}
// Retrieve the display info for the display that matches the display id.