Use generic libpdx event bits facility in libvrflinger and bufferhubd.

Use the generic event bits abstraction to support UDS and ServiceFS
backends properly.

Bug: 34466748
Test: start/stop basicvr repeatedly; observe stable bufferhub counts.
Change-Id: I9f2ea67c25860ad7fb931938991a29a37f3391fc
diff --git a/libs/vr/libvrflinger/display_surface.cpp b/libs/vr/libvrflinger/display_surface.cpp
index dff08b5..e1729f8 100644
--- a/libs/vr/libvrflinger/display_surface.cpp
+++ b/libs/vr/libvrflinger/display_surface.cpp
@@ -396,6 +396,16 @@
 
 void DisplaySurface::HandleConsumerEvents(
     const std::shared_ptr<BufferConsumer>& consumer, int events) {
+  auto status = consumer->GetEventMask(events);
+  if (!status) {
+    ALOGW(
+        "DisplaySurface::HandleConsumerEvents: Failed to get event mask for "
+        "consumer: %s",
+        status.GetErrorMessage().c_str());
+    return;
+  }
+
+  events = status.get();
   if (events & EPOLLHUP) {
     ALOGD_IF(TRACE,
              "DisplaySurface::HandleConsumerEvents: removing event handler for "