New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 716272 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner:
Email to this user bounced
Closed: May 2017
Cc:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug

Blocking:
issue 685420



Sign in to add a comment

Use creation context for TextClassificationManager

Reported by ti...@chromium.org, Apr 28 2017

Issue description

We retrieve the TextClassifier from a context through TextClassificationManager:
   TextClassificationManager mgr = context.getSystemService();
   TextClassifier classifier = mgr.getTextClassifier();

It is also possible to set a new classifire into a TextClassificationManager.

Because of that it seems to make sense to use the WebView creation context when we need the text classifier in the WebView.
Right now the code uses initial WindowAndroid, i.e. the Activity this WebView first appeared in.

From Toki: ---------------

The important thing to note is that the TextClassificationManager belongs to the particular instance of the context, and the TextClassifier you set belongs to that TextClassificationManager.

i.e. Context ---has a--> TextClassificationManager ---has a--> TextClassifier

My suggestion will be to use the context you're using to initialise the WebView. You also probably want to be consistent with the context(s) you're using.

-------------------------

 

Comment 1 by ti...@chromium.org, Apr 28 2017

Description: Show this description

Comment 2 by ti...@chromium.org, May 16 2017

Status: WontFix (was: Assigned)
Per discussion with Bo the WindowAndroid context which is currently used is the right one.

Sign in to add a comment