Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8001678f authored by Abodunrinwa Toki's avatar Abodunrinwa Toki
Browse files

TextClassificationManager: Update model file reference.

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
parent dc61d1b2
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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());
            }