OSDN Git Service

RESTRICT AUTOMERGE Close TextClassifier native resources.
authorAbodunrinwa Toki <toki@google.com>
Tue, 22 Jan 2019 21:42:56 +0000 (21:42 +0000)
committerAbodunrinwa Toki <toki@google.com>
Fri, 8 Feb 2019 13:05:38 +0000 (13:05 +0000)
commitec1b164923f62b681eb4683f4c5c3d37a457f354
treec8a6e3a77fddfb8723feec22fe7795180dfca392
parent64ca10b75bb7e8b8b9633b57f2a5fcaeb3c395b3
RESTRICT AUTOMERGE Close TextClassifier native resources.

Bug: 122904322
Test: atest android.view.textclassifier.TextClassificationManagerTest
Test: (MANUAL)
      1. Start an app with a TextView
      2. Select the text to trigger the text selection toolbar and TextClassifier
      3. Close the app's activity by repeatedly clicking back on the nav bar
      4. Start a Profiler for the app and observe for memory growth
      5. Repeat 1 - 3 several times and observe.
         If the bug still exists, memory should grow at about 4 - 5MB.
 If the bug is fixed, Memory should remain about the same across activity restarts.

Change-Id: Id9a60dea85cf3949de030042537287ddb29842a2
core/java/android/view/textclassifier/TextClassifierImpl.java
core/java/android/view/textclassifier/TextClassifierImplNative.java