Move PublicFormat from libandroid_runtime to libui
PublicFormat is defined in android_view_Surface.
However this and related functions are also used in libmediandk
which is both NDK and LL-NDK. As a LL-NDK it should run without
libandroid_runtime.
By moving PublicFormat definition and its utility functions
into libui, LL-NDK can use it without cost of libandroid_runtime.
And also PublicFormat will be deprecated(b/126594675).
This is a part cutting dependency from libmediandk to
libandroid_runtime.
Note: applied clang-format
Bug: 124268753
Test: m -j
Change-Id: I7215dde607b425f7a0d47a6541b83fbe3a0deaf4
diff --git a/libs/ui/Android.bp b/libs/ui/Android.bp
index 00e227f..af95a05 100644
--- a/libs/ui/Android.bp
+++ b/libs/ui/Android.bp
@@ -45,6 +45,8 @@
// Don't warn about struct padding
"-Wno-padded",
+
+ "-Wno-switch-enum",
],
sanitize: {
@@ -68,6 +70,7 @@
"GraphicBufferMapper.cpp",
"HdrCapabilities.cpp",
"PixelFormat.cpp",
+ "PublicFormat.cpp",
"Rect.cpp",
"Region.cpp",
"Size.cpp",