Break a dependency of libui on libandroid
This was only a header dependency, but it still
created a circular dependency, which will cause
problems in another CL.
We fix this by creating a libarect static library
containing only that header. both libui and
libandroid now depend on it and reexport the
header.
We also make sure rect.h ends-up in the right
place.
Test: built and booted device
Bug: 35164655
Change-Id: Iba25b8b801b26b26ec1401c00caf367a06f197ca
diff --git a/opengl/libagl/egl.cpp b/opengl/libagl/egl.cpp
index 48bf676..04f6d6d 100644
--- a/opengl/libagl/egl.cpp
+++ b/opengl/libagl/egl.cpp
@@ -33,6 +33,7 @@
#include <ui/ANativeObjectBase.h>
#include <ui/Fence.h>
#include <ui/GraphicBufferMapper.h>
+#include <ui/Rect.h>
#include <EGL/egl.h>
#include <EGL/eglext.h>
diff --git a/opengl/tests/hwc/Android.mk b/opengl/tests/hwc/Android.mk
index 693fba4..13337c2 100644
--- a/opengl/tests/hwc/Android.mk
+++ b/opengl/tests/hwc/Android.mk
@@ -25,6 +25,8 @@
LOCAL_C_INCLUDES += system/extras/tests/include \
$(call include-path-for, opengl-tests-includes) \
+LOCAL_STATIC_LIBRARIES := libarect
+
include $(BUILD_STATIC_LIBRARY)
include $(CLEAR_VARS)
diff --git a/opengl/tests/lib/Android.mk b/opengl/tests/lib/Android.mk
index 4407e7b..0f1c925 100644
--- a/opengl/tests/lib/Android.mk
+++ b/opengl/tests/lib/Android.mk
@@ -24,4 +24,6 @@
LOCAL_CFLAGS := -DGL_GLEXT_PROTOTYPES -DEGL_EGLEXT_PROTOTYPES -Wall -Wextra -Werror
+LOCAL_STATIC_LIBRARIES := libarect
+
include $(BUILD_STATIC_LIBRARY)