From e9a3927c1bb3c23cd3cb2b4954f75d95050a455b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pedro=20Garau=20Mart=C3=ADnez?= Date: Tue, 9 Jun 2026 08:10:23 +0200 Subject: [PATCH] [bugfix] Ignore vrtual displays on AxPcMode Fixes Android Auto bootloop on some weird resolutions, because the configurable dpi messed up with the UI elements and enters in a bootloop state. --- .../core/java/com/android/server/AxPcModeService.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/services/core/java/com/android/server/AxPcModeService.java b/services/core/java/com/android/server/AxPcModeService.java index 6a36fb726b7e2..a536dd02fa63f 100644 --- a/services/core/java/com/android/server/AxPcModeService.java +++ b/services/core/java/com/android/server/AxPcModeService.java @@ -647,6 +647,16 @@ public void onDisplayAdded(int displayId) { + " uniqueId=" + info.uniqueId); return; } + if (info != null + && (info.ownerPackageName != null + || info.type == Display.TYPE_VIRTUAL + || info.type == Display.TYPE_OVERLAY)) { + Slog.d(TAG, "Ignoring non-external/app-owned display " + displayId + + " type=" + info.type + + " owner=" + info.ownerPackageName + + " uniqueId=" + info.uniqueId); + return; + } } mHandler.post(() -> { setTargetDisplayId(displayId);