Deprecate legacy and unused DVR API
Bug: 65469368
Test: Build system and run VrHome; dvr_api-test
Change-Id: I366549319e96ed936815f100f8e64e6a1c4f52bb
diff --git a/libs/vr/libdvr/dvr_api.cpp b/libs/vr/libdvr/dvr_api.cpp
index 7d4e2d1..d14f040 100644
--- a/libs/vr/libdvr/dvr_api.cpp
+++ b/libs/vr/libdvr/dvr_api.cpp
@@ -41,10 +41,19 @@
} \
} while (0)
+#define DVR_V1_API_ENTRY_DEPRECATED(name) \
+ do { \
+ if ((offsetof(DvrApi_v1, name) + sizeof(dvr_api->name)) <= \
+ clamped_struct_size) { \
+ dvr_api->name = nullptr; \
+ } \
+ } while (0)
+
#include "include/dvr/dvr_api_entries.h"
// Undefine macro definitions to play nice with Google3 style rules.
#undef DVR_V1_API_ENTRY
+#undef DVR_V1_API_ENTRY_DEPRECATED
return 0;
}