OSDN Git Service

TextClassificationManager: Update model file reference.
authorAbodunrinwa Toki <toki@google.com>
Tue, 14 Mar 2017 18:57:54 +0000 (18:57 +0000)
committerAbodunrinwa Toki <toki@google.com>
Tue, 14 Mar 2017 18:57:54 +0000 (18:57 +0000)
Location of the model files have moved to etc/textclassifier

Test: cts-tradefed run cts-dev -m CtsViewTestCases -t
android.view.textclassifier.cts.TextClassificationManagerTest
Bug: 34865247

Change-Id: I1e9b3a6588b37ce9a35fb5146a3e6dca921510ed

core/java/android/view/textclassifier/TextClassificationManager.java

index f032414..35c9a29 100644 (file)
@@ -63,7 +63,7 @@ public final class TextClassificationManager {
             if (mDefault == null) {
                 try {
                     mSmartSelectionFd = ParcelFileDescriptor.open(
-                            new File("/etc/assistant/smart-selection.model"),
+                            new File("/etc/textclassifier/textclassifier.smartselection.en.model"),
                             ParcelFileDescriptor.MODE_READ_ONLY);
                     mDefault = new TextClassifierImpl(mContext, mSmartSelectionFd);
                 } catch (FileNotFoundException e) {
@@ -109,7 +109,7 @@ public final class TextClassificationManager {
         synchronized (mLangIdLock) {
             if (mLangId == null) {
                 mLangIdFd = ParcelFileDescriptor.open(
-                        new File("/etc/assistant/lang-id.model"),
+                        new File("/etc/textclassifier/textclassifier.langid.model"),
                         ParcelFileDescriptor.MODE_READ_ONLY);
                 mLangId = new LangId(mLangIdFd.getFd());
             }