Anisotropy correction for external displays only

Previously anisotropy correciton could be applied
to virtual and internal displays. This is because
the source display may have anisotropy itself.

This CL fixes this by checking that the sink is
an external display.

Bug: 327717050
Test: adb shell screenrecord ; check recording has no letterboxing
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:bccda389bd7c810a3ceee7eba3fd658a9add4945)
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:8c9a9e07692e92f643da4cd0d49e1bf5bf2adfb7)
Merged-In: Ic97ea30fba2d5c30b8abaee90c49bcd833b5353e
Change-Id: Ic97ea30fba2d5c30b8abaee90c49bcd833b5353e
diff --git a/services/core/java/com/android/server/wm/ContentRecorder.java b/services/core/java/com/android/server/wm/ContentRecorder.java
index a914c07..dd86c40 100644
--- a/services/core/java/com/android/server/wm/ContentRecorder.java
+++ b/services/core/java/com/android/server/wm/ContentRecorder.java
@@ -107,7 +107,10 @@
 
     ContentRecorder(@NonNull DisplayContent displayContent) {
         this(displayContent, new RemoteMediaProjectionManagerWrapper(displayContent.mDisplayId),
-                new DisplayManagerFlags().isConnectedDisplayManagementEnabled());
+                new DisplayManagerFlags().isConnectedDisplayManagementEnabled()
+                        && !new DisplayManagerFlags()
+                                    .isPixelAnisotropyCorrectionInLogicalDisplayEnabled()
+                        && displayContent.getDisplayInfo().type == Display.TYPE_EXTERNAL);
     }
 
     @VisibleForTesting