Add explicit dependencies on jni_headers

Preparation for removing implicit include paths for jni.h from soong.

Also remove unnecessary jni.h includes from PathParser.{h,cpp}.

Bug: 152482542
Test: lunch aosp_x86_64 && m checkbuild
Change-Id: Ib18afa3d2c93ed3ce69204286d5177991100fd7e
Exempt-From-Owner-Approval: build refactoring
diff --git a/cmds/bootanimation/Android.bp b/cmds/bootanimation/Android.bp
index 3e5877b..c60d08b 100644
--- a/cmds/bootanimation/Android.bp
+++ b/cmds/bootanimation/Android.bp
@@ -28,6 +28,8 @@
     name: "bootanimation",
     defaults: ["bootanimation_defaults"],
 
+    header_libs: ["jni_headers"],
+
     shared_libs: [
         "libOpenSLES",
         "libbootanimation",
diff --git a/core/tests/utiltests/jni/Android.bp b/core/tests/utiltests/jni/Android.bp
index b0b09c2..6b75471 100644
--- a/core/tests/utiltests/jni/Android.bp
+++ b/core/tests/utiltests/jni/Android.bp
@@ -14,6 +14,7 @@
 

 cc_library_shared {

     name: "libmemoryintarraytest",

+    header_libs: ["jni_headers"],

     shared_libs: [

         "libcutils",

     ],

@@ -23,4 +24,4 @@
         "android_util_MemoryIntArrayTest.cpp",

     ],

     cflags: ["-Werror"],

-}
\ No newline at end of file
+}

diff --git a/libs/hwui/PathParser.cpp b/libs/hwui/PathParser.cpp
index 808921d..61d06c2 100644
--- a/libs/hwui/PathParser.cpp
+++ b/libs/hwui/PathParser.cpp
@@ -16,8 +16,6 @@
 
 #include "PathParser.h"
 
-#include "jni.h"
-
 #include <errno.h>
 #include <stdlib.h>
 #include <utils/Log.h>
diff --git a/libs/hwui/PathParser.h b/libs/hwui/PathParser.h
index f5bebce..878bb7c 100644
--- a/libs/hwui/PathParser.h
+++ b/libs/hwui/PathParser.h
@@ -22,7 +22,6 @@
 
 #include <android/log.h>
 #include <cutils/compiler.h>
-#include <jni.h>
 
 #include <string>
 
diff --git a/media/mca/filterfw/Android.bp b/media/mca/filterfw/Android.bp
index 71899cf..0e0ecf3 100644
--- a/media/mca/filterfw/Android.bp
+++ b/media/mca/filterfw/Android.bp
@@ -65,6 +65,8 @@
         "-Wno-unused-parameter",
     ],
 
+    header_libs: ["jni_headers"],
+
     shared_libs: [
         "libmedia",
         "libgui",
diff --git a/native/webview/loader/Android.bp b/native/webview/loader/Android.bp
index 0ba256f..dfa5bdd 100644
--- a/native/webview/loader/Android.bp
+++ b/native/webview/loader/Android.bp
@@ -24,6 +24,8 @@
 
     cflags: ["-Werror"],
 
+    header_libs: ["jni_headers"],
+
     shared_libs: [
         "libdl",
         "liblog",
diff --git a/tools/aapt2/Android.bp b/tools/aapt2/Android.bp
index 53372bf..a2709bd 100644
--- a/tools/aapt2/Android.bp
+++ b/tools/aapt2/Android.bp
@@ -47,6 +47,7 @@
             cflags: ["-D_DARWIN_UNLIMITED_STREAMS"],
         },
     },
+    header_libs: ["jni_headers"],
     static_libs: [
         "libandroidfw",
         "libutils",
diff --git a/tools/dump-coverage/Android.bp b/tools/dump-coverage/Android.bp
index 4519ce3..94356eb 100644
--- a/tools/dump-coverage/Android.bp
+++ b/tools/dump-coverage/Android.bp
@@ -19,6 +19,7 @@
     name: "libdumpcoverage",
     srcs: ["dump_coverage.cc"],
     header_libs: [
+        "jni_headers",
         "libopenjdkjvmti_headers",
     ],