SF: Fix getAllowedDisplayConfigs in multi-display mode

DMS does not expect failure for a valid display token, so return an
empty array and avoid log spam.

Bug: 130740549
Test: Boot with multiple displays
Change-Id: I2d385233a53fc726f6d3563edfcebcd76038d934
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index 6063555..a75364a 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -5872,12 +5872,15 @@
 
     Mutex::Autolock lock(mStateLock);
 
-    if (displayToken != getInternalDisplayTokenLocked()) {
-        ALOGE("%s is only supported for the internal display", __FUNCTION__);
+    const auto display = getDisplayDeviceLocked(displayToken);
+    if (!display) {
         return NAME_NOT_FOUND;
     }
 
-    outAllowedConfigs->assign(mAllowedDisplayConfigs.begin(), mAllowedDisplayConfigs.end());
+    if (display->isPrimary()) {
+        outAllowedConfigs->assign(mAllowedDisplayConfigs.begin(), mAllowedDisplayConfigs.end());
+    }
+
     return NO_ERROR;
 }