Use art_defaults in libnative*, for consistency.

Also change to //art:__submodules__ for consistent internal visibility, and
some TODO comment corrections.

Test: m WITH_TIDY=1
Test: build & boot
Test: atest art/libnativeloader/test (no new errors, but existing ones on arm64 - b/142896688)
Test: (atest art/libnativebridge/tests doesn't work at all, but that's not new - b/142897320)
Bug: 137364733
Bug: 133140750
Change-Id: If9ddb5a597eea3606342c3625dcdb3bcf5d19041
diff --git a/libnativebridge/Android.bp b/libnativebridge/Android.bp
index 2dd92d1..f2db117 100644
--- a/libnativebridge/Android.bp
+++ b/libnativebridge/Android.bp
@@ -1,9 +1,6 @@
 cc_defaults {
     name: "libnativebridge-defaults",
-    cflags: [
-        "-Werror",
-        "-Wall",
-    ],
+    defaults: ["art_defaults"],
     cppflags: [
         "-fvisibility=protected",
     ],
@@ -22,9 +19,8 @@
     name: "libnativebridge",
     defaults: ["libnativebridge-defaults"],
     visibility: [
-        "//art:__subpackages__",
-        // TODO(b/133140750): Clean this up.
         "//frameworks/base/cmds/app_process",
+        // TODO(b/133140750): Clean this up.
         "//frameworks/base/native/webview/loader/libwebviewchromium_loader",
     ],
 
diff --git a/libnativebridge/native_bridge.cc b/libnativebridge/native_bridge.cc
index 82dd562..6790a18 100644
--- a/libnativebridge/native_bridge.cc
+++ b/libnativebridge/native_bridge.cc
@@ -350,7 +350,7 @@
 }
 
 // Set up the environment for the bridged app.
-static void SetupEnvironment(const NativeBridgeCallbacks* callbacks, JNIEnv* env, const char* isa) {
+static void SetupEnvironment(const NativeBridgeCallbacks* cbs, JNIEnv* env, const char* isa) {
   // Need a JNIEnv* to do anything.
   if (env == nullptr) {
     ALOGW("No JNIEnv* to set up app environment.");
@@ -358,7 +358,7 @@
   }
 
   // Query the bridge for environment values.
-  const struct NativeBridgeRuntimeValues* env_values = callbacks->getAppEnv(isa);
+  const struct NativeBridgeRuntimeValues* env_values = cbs->getAppEnv(isa);
   if (env_values == nullptr) {
     return;
   }