Increase the duration allowed for a TC result.
Increase the duration allowed for a TextClassifier (TC) result when it is being initialized for the first time. Initialization typically takes more time that other calls to the TC. A timeout during initialization means the user doesn't see the effect of running the TC the first time. Subsequent calls typically work fine as they're less likely to timeout. We increase this value only slightly because we don't want the user waiting too long for a slow TC's result. Finding the right balance is an art and most likely depends on the TC being used. Note that although a TextView's TC can change for each individual call to the TC, such a situation does not benefit from the bump in the timeout. Again, we really want to discourage larger timeouts. Fixes: 66217281 Test: bit FrameworksCoreTests:android.widget.TextViewActivityTest Test: bit CtsWidgetTestCases:android.widget.cts.TextViewTest Test: Manual test: - Delayed TextClassifier response by about 150ms (allowing only 50ms for initialization) - Before cl: Sometimes the result is not shown to the user the first time the textclassifier runs - After cl: Results consistently show for even for first textclassifier call Merged-In: Iabc8279fa57ef6a9a2db0c7e9c7e3ab8c131bf02 Change-Id: Iabc8279fa57ef6a9a2db0c7e9c7e3ab8c131bf02
Loading
Please register or sign in to comment