Merge "[libnativedisplay] Cleanup map file usage"
diff --git a/libs/nativedisplay/ADisplay.cpp b/libs/nativedisplay/ADisplay.cpp
index 6566538..1e25049 100644
--- a/libs/nativedisplay/ADisplay.cpp
+++ b/libs/nativedisplay/ADisplay.cpp
@@ -129,6 +129,8 @@
}
} // namespace
+namespace android {
+
int ADisplay_acquirePhysicalDisplays(ADisplay*** outDisplays) {
const std::vector<PhysicalDisplayId> ids = SurfaceComposerClient::getPhysicalDisplayIds();
const size_t size = ids.size();
@@ -298,3 +300,5 @@
return reinterpret_cast<DisplayConfigImpl*>(config)->appOffset;
}
+
+} // namespace android
diff --git a/libs/nativedisplay/Android.bp b/libs/nativedisplay/Android.bp
index d37b9a1..bcc99fc 100644
--- a/libs/nativedisplay/Android.bp
+++ b/libs/nativedisplay/Android.bp
@@ -40,6 +40,8 @@
"-Wno-unused-function",
],
+ version_script: "libnativedisplay.map.txt",
+
srcs: [
"AChoreographer.cpp",
"ADisplay.cpp",
diff --git a/libs/nativedisplay/include/apex/display.h b/libs/nativedisplay/include/apex/display.h
index 9be401e..a7eaf87 100644
--- a/libs/nativedisplay/include/apex/display.h
+++ b/libs/nativedisplay/include/apex/display.h
@@ -20,7 +20,12 @@
#include <android/hardware_buffer.h>
#include <inttypes.h>
-__BEGIN_DECLS
+// TODO: the intention of these apis is to be stable - hence they are defined in
+// an apex directory. But because they don't yet need to be stable, hold off on
+// making them stable until a Mainline module needs them.
+// __BEGIN_DECLS
+
+namespace android {
/**
* Opaque handle for a native display
@@ -130,4 +135,5 @@
*/
int64_t ADisplayConfig_getAppVsyncOffsetNanos(ADisplayConfig* config);
-__END_DECLS
+} // namespace android
+// __END_DECLS
diff --git a/libs/nativedisplay/libnativedisplay.map.txt b/libs/nativedisplay/libnativedisplay.map.txt
index 3b6a241..650bdf1 100644
--- a/libs/nativedisplay/libnativedisplay.map.txt
+++ b/libs/nativedisplay/libnativedisplay.map.txt
@@ -7,6 +7,28 @@
AChoreographer_postFrameCallbackDelayed64; # apex # introduced=30
AChoreographer_registerRefreshRateCallback; # apex # introduced=30
AChoreographer_unregisterRefreshRateCallback; # apex # introduced=30
+ AChoreographer_create; # apex # introduced=30
+ AChoreographer_destroy; # apex # introduced=30
+ AChoreographer_getFd; # apex # introduced=30
+ AChoreographer_handlePendingEvents; # apex # introduced=30
local:
*;
};
+
+LIBNATIVEDISPLAY_PLATFORM {
+ global:
+ extern "C++" {
+ android::ADisplay_acquirePhysicalDisplays*;
+ android::ADisplay_release*;
+ android::ADisplay_getMaxSupportedFps*;
+ android::ADisplay_getDisplayType*;
+ android::ADisplay_getPreferredWideColorFormat*;
+ android::ADisplay_getCurrentConfig*;
+ android::ADisplayConfig_getDensity*;
+ android::ADisplayConfig_getWidth*;
+ android::ADisplayConfig_getHeight*;
+ android::ADisplayConfig_getFps*;
+ android::ADisplayConfig_getCompositorOffsetNanos*;
+ android::ADisplayConfig_getAppVsyncOffsetNanos*;
+ };
+} LIBNATIVEDISPLAY;