diff --git a/core/java/android/text/LangId.java b/core/java/android/view/textclassifier/LangId.java similarity index 86% rename from core/java/android/text/LangId.java rename to core/java/android/view/textclassifier/LangId.java index ed6e9097d669c..53bc1b0a0cbfe 100644 --- a/core/java/android/text/LangId.java +++ b/core/java/android/view/textclassifier/LangId.java @@ -13,16 +13,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package android.text; +package android.view.textclassifier; /** * Java wrapper for LangId native library interface. * This class is used to detect languages in text. - * @hide */ -public final class LangId { - // TODO: Move this to android.view.textclassifier and make it package-private. - // We'll have to update the native library code to do this. +final class LangId { static { System.loadLibrary("smart-selection_jni"); @@ -33,7 +30,7 @@ public final class LangId { /** * Creates a new instance of LangId predictor, using the provided model image. */ - public LangId(int fd) { + LangId(int fd) { mModelPtr = nativeNew(fd); } diff --git a/core/java/android/text/SmartSelection.java b/core/java/android/view/textclassifier/SmartSelection.java similarity index 91% rename from core/java/android/text/SmartSelection.java rename to core/java/android/view/textclassifier/SmartSelection.java index 97ef5149cf23c..47c39e4d2ae5c 100644 --- a/core/java/android/text/SmartSelection.java +++ b/core/java/android/view/textclassifier/SmartSelection.java @@ -14,16 +14,13 @@ * limitations under the License. */ -package android.text; +package android.view.textclassifier; /** * Java wrapper for SmartSelection native library interface. * This library is used for detecting entities in text. - * @hide */ -public final class SmartSelection { - // TODO: Move this to android.view.textclassifier and make it package-private. - // We'll have to update the native library code to do this. +final class SmartSelection { static { System.loadLibrary("smart-selection_jni"); @@ -35,7 +32,7 @@ public final class SmartSelection { * Creates a new instance of SmartSelect predictor, using the provided model image, * given as a file descriptor. */ - public SmartSelection(int fd) { + SmartSelection(int fd) { mCtx = nativeNew(fd); } diff --git a/core/java/android/view/textclassifier/TextClassificationManager.java b/core/java/android/view/textclassifier/TextClassificationManager.java index a4e524f9882b3..4daa110648b89 100644 --- a/core/java/android/view/textclassifier/TextClassificationManager.java +++ b/core/java/android/view/textclassifier/TextClassificationManager.java @@ -19,7 +19,6 @@ package android.view.textclassifier; import android.annotation.NonNull; import android.content.Context; import android.os.ParcelFileDescriptor; -import android.text.LangId; import android.util.Log; import com.android.internal.util.Preconditions; diff --git a/core/java/android/view/textclassifier/TextClassifierImpl.java b/core/java/android/view/textclassifier/TextClassifierImpl.java index e2ff44cb37937..8b39775bd0f76 100644 --- a/core/java/android/view/textclassifier/TextClassifierImpl.java +++ b/core/java/android/view/textclassifier/TextClassifierImpl.java @@ -27,7 +27,6 @@ import android.graphics.drawable.Drawable; import android.icu.text.BreakIterator; import android.net.Uri; import android.os.ParcelFileDescriptor; -import android.text.SmartSelection; import android.text.Spannable; import android.text.TextUtils; import android.text.method.WordIterator;