[SF] Use HWC api getPhysicalDisplayOrientation

With HWC3.0 we have the getPhysicalDisplayOrientation
api that can replace the sysprop ro.surface_flinger.primary_display_orientation

BUG: 184085132
Test: atest libsurfaceflinger_unittest
Change-Id: Ie2b0f8e1a81219dc8231a56b9e6174d549a4cbd1
diff --git a/services/surfaceflinger/DisplayHardware/HidlComposerHal.cpp b/services/surfaceflinger/DisplayHardware/HidlComposerHal.cpp
index 33adceb..e8dc084 100644
--- a/services/surfaceflinger/DisplayHardware/HidlComposerHal.cpp
+++ b/services/surfaceflinger/DisplayHardware/HidlComposerHal.cpp
@@ -237,6 +237,7 @@
         case OptionalFeature::DisplayBrightnessCommand:
         case OptionalFeature::BootDisplayConfig:
         case OptionalFeature::KernelIdleTimer:
+        case OptionalFeature::PhysicalDisplayOrientation:
             return false;
     }
 }
@@ -1331,6 +1332,11 @@
                      "OptionalFeature::KernelIdleTimer is not supported on HIDL");
 }
 
+Error HidlComposer::getPhysicalDisplayOrientation(Display, AidlTransform*) {
+    LOG_ALWAYS_FATAL("getPhysicalDisplayOrientation should have never been called on this as "
+                     "OptionalFeature::PhysicalDisplayOrientation is not supported on HIDL");
+}
+
 void HidlComposer::registerCallback(ComposerCallback& callback) {
     const bool vsyncSwitchingSupported =
             isSupported(Hwc2::Composer::OptionalFeature::RefreshRateSwitching);