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/libs/ui/Android.bp b/libs/ui/Android.bp
index cfe170d..ea18644 100644
--- a/libs/ui/Android.bp
+++ b/libs/ui/Android.bp
@@ -75,6 +75,12 @@
         "libutils",
         "liblog",
     ],
+
+    static_libs: [
+        "libarect",
+    ],
+
+    export_static_lib_headers: ["libarect"],
 }
 
 subdirs = ["tests"]
diff --git a/libs/ui/Gralloc1.cpp b/libs/ui/Gralloc1.cpp
index 0083f58..7952ed6 100644
--- a/libs/ui/Gralloc1.cpp
+++ b/libs/ui/Gralloc1.cpp
@@ -17,6 +17,7 @@
 //#define LOG_NDEBUG 0
 
 #include <ui/Gralloc1.h>
+#include <ui/GraphicBuffer.h>
 
 #include <vector>
 
diff --git a/libs/ui/Gralloc1On0Adapter.cpp b/libs/ui/Gralloc1On0Adapter.cpp
index a0bbe63..4cc0e4b 100644
--- a/libs/ui/Gralloc1On0Adapter.cpp
+++ b/libs/ui/Gralloc1On0Adapter.cpp
@@ -21,6 +21,7 @@
 #include <hardware/gralloc.h>
 
 #include <ui/Gralloc1On0Adapter.h>
+#include <ui/GraphicBuffer.h>
 
 #include <utils/Log.h>
 
diff --git a/libs/ui/GraphicBufferMapper.cpp b/libs/ui/GraphicBufferMapper.cpp
index a3b6e18..f418f7f 100644
--- a/libs/ui/GraphicBufferMapper.cpp
+++ b/libs/ui/GraphicBufferMapper.cpp
@@ -35,7 +35,7 @@
 #include <ui/Gralloc1On0Adapter.h>
 #include <ui/GrallocMapper.h>
 #include <ui/GraphicBufferMapper.h>
-#include <ui/Rect.h>
+#include <ui/GraphicBuffer.h>
 
 #include <system/graphics.h>