Switch TextClassifier implementation from native to java

Thic CL eliminates the native dependency on libtextclassifier in favor of the java one
because the .java implementation is built on top of stable APIs (@CorePlatformAPI, Android SDK)
while the native API might change in future, leading to breakages.

Bug: 119788152
Test: m droid successfully builds + atest frameworks/base/core/tests/coretests/src/android/view/textclassifier
Change-Id: I4c3bb4790c360dd514ed2ea48e0634de43dab9e7
Merged-In: Ide5e58d1c80d9a028cea4e9192a91aeac2843c71
(cherry picked from commit 64c4cb2ea929a00f5e67df1802e461fcbcc96d0c)
diff --git a/Android.bp b/Android.bp
index 8d0e1d3..6ff8d93 100644
--- a/Android.bp
+++ b/Android.bp
@@ -704,7 +704,6 @@
     required: [
         // TODO: remove gps_debug when the build system propagates "required" properly.
         "gps_debug.conf",
-        "libtextclassifier",
         // Loaded with System.loadLibrary by android.view.textclassifier
         "libmedia2_jni",
     ],
@@ -850,6 +849,10 @@
         "nist-sip",
         "tagsoup",
         "rappor",
+        "libtextclassifier-java",
+    ],
+    required: [
+        "libtextclassifier",
     ],
     dxflags: ["--core-library"],
 }