summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--api/removed.txt10
-rw-r--r--api/system-removed.txt10
-rw-r--r--api/test-removed.txt10
-rw-r--r--core/java/android/view/textclassifier/TextClassifier.java32
-rw-r--r--core/java/android/view/textclassifier/TextClassifierImpl.java26
5 files changed, 4 insertions, 84 deletions
diff --git a/api/removed.txt b/api/removed.txt
index 04c9c35428b3..7e980a1f394e 100644
--- a/api/removed.txt
+++ b/api/removed.txt
@@ -373,16 +373,6 @@ package android.view {
}
-package android.view.textclassifier {
-
- public abstract interface TextClassifier {
- method public abstract android.view.textclassifier.LinksInfo getLinks(java.lang.CharSequence, int);
- method public abstract android.view.textclassifier.TextClassificationResult getTextClassificationResult(java.lang.CharSequence, int, int);
- method public abstract android.view.textclassifier.TextSelection suggestSelection(java.lang.CharSequence, int, int);
- }
-
-}
-
package android.webkit {
public class WebViewClient {
diff --git a/api/system-removed.txt b/api/system-removed.txt
index 640dc81877a1..3ca2ec26a0bc 100644
--- a/api/system-removed.txt
+++ b/api/system-removed.txt
@@ -367,16 +367,6 @@ package android.view {
}
-package android.view.textclassifier {
-
- public abstract interface TextClassifier {
- method public abstract android.view.textclassifier.LinksInfo getLinks(java.lang.CharSequence, int);
- method public abstract android.view.textclassifier.TextClassificationResult getTextClassificationResult(java.lang.CharSequence, int, int);
- method public abstract android.view.textclassifier.TextSelection suggestSelection(java.lang.CharSequence, int, int);
- }
-
-}
-
package android.webkit {
public class WebViewClient {
diff --git a/api/test-removed.txt b/api/test-removed.txt
index 04c9c35428b3..7e980a1f394e 100644
--- a/api/test-removed.txt
+++ b/api/test-removed.txt
@@ -373,16 +373,6 @@ package android.view {
}
-package android.view.textclassifier {
-
- public abstract interface TextClassifier {
- method public abstract android.view.textclassifier.LinksInfo getLinks(java.lang.CharSequence, int);
- method public abstract android.view.textclassifier.TextClassificationResult getTextClassificationResult(java.lang.CharSequence, int, int);
- method public abstract android.view.textclassifier.TextSelection suggestSelection(java.lang.CharSequence, int, int);
- }
-
-}
-
package android.webkit {
public class WebViewClient {
diff --git a/core/java/android/view/textclassifier/TextClassifier.java b/core/java/android/view/textclassifier/TextClassifier.java
index 46f7a81e0550..dabbf31d8f96 100644
--- a/core/java/android/view/textclassifier/TextClassifier.java
+++ b/core/java/android/view/textclassifier/TextClassifier.java
@@ -70,26 +70,6 @@ public interface TextClassifier {
public LinksInfo getLinks(CharSequence text, int linkMask, LocaleList defaultLocales) {
return LinksInfo.NO_OP;
}
-
- // TODO: Remove
- @Override
- public TextSelection suggestSelection(
- CharSequence text, int selectionStartIndex, int selectionEndIndex) {
- throw new UnsupportedOperationException("Removed");
- }
-
- // TODO: Remove
- @Override
- public TextClassificationResult getTextClassificationResult(
- CharSequence text, int startIndex, int endIndex) {
- throw new UnsupportedOperationException("Removed");
- }
-
- // TODO: Remove
- @Override
- public LinksInfo getLinks(CharSequence text, int linkMask) {
- throw new UnsupportedOperationException("Removed");
- }
};
/**
@@ -154,16 +134,4 @@ public interface TextClassifier {
*/
LinksInfo getLinks(
@NonNull CharSequence text, int linkMask, @Nullable LocaleList defaultLocales);
-
- // TODO: Remove
- /** @removed */
- TextSelection suggestSelection(
- CharSequence text, int selectionStartIndex, int selectionEndIndex);
- // TODO: Remove
- /** @removed */
- TextClassificationResult getTextClassificationResult(
- CharSequence text, int startIndex, int endIndex);
- // TODO: Remove
- /** @removed */
- LinksInfo getLinks(CharSequence text, int linkMask);
}
diff --git a/core/java/android/view/textclassifier/TextClassifierImpl.java b/core/java/android/view/textclassifier/TextClassifierImpl.java
index 06ac8699f864..be12f5702129 100644
--- a/core/java/android/view/textclassifier/TextClassifierImpl.java
+++ b/core/java/android/view/textclassifier/TextClassifierImpl.java
@@ -120,10 +120,12 @@ final class TextClassifierImpl implements TextClassifier {
SmartSelection.ClassificationResult[] results = getSmartSelection()
.classifyText(text.toString(), startIndex, endIndex);
if (results.length > 0) {
+ final TextClassificationResult classificationResult =
+ createClassificationResult(results, classified);
// TODO: Added this log for debug only. Remove before release.
Log.d(LOG_TAG, String.format(
- "Classification type: %s", getHighestScoringType(results)));
- return createClassificationResult(results, classified);
+ "Classification type: %s", classificationResult));
+ return classificationResult;
}
}
} catch (Throwable t) {
@@ -149,26 +151,6 @@ final class TextClassifierImpl implements TextClassifier {
return TextClassifier.NO_OP.getLinks(text, linkMask, defaultLocales);
}
- // TODO: Remove
- @Override
- public TextSelection suggestSelection(
- CharSequence text, int selectionStartIndex, int selectionEndIndex) {
- throw new UnsupportedOperationException("Removed");
- }
-
- // TODO: Remove
- @Override
- public TextClassificationResult getTextClassificationResult(
- CharSequence text, int startIndex, int endIndex) {
- throw new UnsupportedOperationException("Removed");
- }
-
- // TODO: Remove
- @Override
- public LinksInfo getLinks(CharSequence text, int linkMask) {
- throw new UnsupportedOperationException("Removed");
- }
-
private SmartSelection getSmartSelection() throws FileNotFoundException {
synchronized (mSmartSelectionLock) {
if (mSmartSelection == null) {