New issue
Advanced search Search tips

Issue 826581 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
Cc:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug



Sign in to add a comment

Smart Text Selection related cleanup tasks.

Project Member Reported by ctzsm@chromium.org, Mar 28 2018

Issue description

SelectionClient.Result was introduced because we want to use information from android.view.textclassifier.TextClassification to upstream, but upstream still compiled against with N SDK at that time. 

Basically, SelectionClient.Result is the Chromium version of TextClassification/TextSelection combination at that time.

We added TextClassification and TextSelection to SelectionClient.Result for Smart Selection logging because logging API only accepts TextClassification/TextSelection and there is no public constructor for them.

We should remove these old fields and keep TextClassification and TextSelection objects.

There might be more clean up work after we upstreamed code for new version of Android.

[1] https://cs.chromium.org/chromium/src/content/public/android/java/src/org/chromium/content_public/browser/SelectionClient.java?rcl=a72081670f6f1656b8791518b1da6cf6dac3ebfa&l=23
 

Comment 1 by ctzsm@chromium.org, Apr 2 2018

Summary: Smart Text Selection related cleanup tasks. (was: Cleanup redundant fields in SelectionClient.Result )
Another one comes while reviewing http://crrev/c/985353.

We should put @interface constants inside of the annotation interface in SmartSelectionProvider.java.

@interface RequestType { 
static final int CLASSIFY = 0;
static final int SUGGEST_AND_CLASSIFY = 1;
}

Comment 2 by ctzsm@chromium.org, Apr 3 2018

We need to add @RequestType to "private final @RequestType int mRequestType;" in SmartSelectionProvider.ClassificationTask.
Project Member

Comment 3 by bugdroid1@chromium.org, Jul 10

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/11599018ca2a7bba53215c1895d3a3e9e69928b8

commit 11599018ca2a7bba53215c1895d3a3e9e69928b8
Author: Shimi Zhang <ctzsm@chromium.org>
Date: Tue Jul 10 21:56:58 2018

[Smart Selection] Remove |IntentType|

Removing unused |IntentType|, the usage was removed due to new P API.

Bug: 826581
Change-Id: Ic279cbda662df73300bf1eaf6496614767da8abf
Reviewed-on: https://chromium-review.googlesource.com/1131925
Reviewed-by: Pedro Amaral <amaralp@chromium.org>
Commit-Queue: Shimi Zhang <ctzsm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#573935}
[modify] https://crrev.com/11599018ca2a7bba53215c1895d3a3e9e69928b8/content/public/android/java/src/org/chromium/content/browser/selection/AdditionalMenuItemProviderImpl.java

Sign in to add a comment