Skip to content

Commit

Permalink
Ignoring SpellCheckerSessionListenerImpl leak
Browse files Browse the repository at this point in the history
  • Loading branch information
pyricau committed May 10, 2015
1 parent 6bdcee4 commit 3faa17d
Showing 1 changed file with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,13 @@ public static ExcludedRefs.Builder createAppDefaults() {
excluded.instanceField("android.animation.LayoutTransition$1", "val$parent");
}

if (SDK_INT >= JELLY_BEAN || SDK_INT <= LOLLIPOP_MR1) {
// SpellCheckerSessionListenerImpl.mHandler is leaking destroyed Activity when the
// SpellCheckerSession is closed before the service is connected.
// Tracked here: https://code.google.com/p/android/issues/detail?id=172542
excluded.instanceField("android.view.textservice.SpellCheckerSession$1", "this$0");
}

if (MOTOROLA.equals(MANUFACTURER) && SDK_INT == KITKAT) {
// DevicePolicyManager keeps a reference to the context it has been created with instead of
// extracting the application context. In this Motorola build, DevicePolicyManager has an
Expand Down Expand Up @@ -215,14 +222,6 @@ public static ExcludedRefs.Builder createAppDefaults() {
excluded.staticField("android.widget.TextView", "mLastHoveredView");
}

if (MOTOROLA.equals(MANUFACTURER) && SDK_INT == JELLY_BEAN) {
// android.view.textservice.SpellCheckerSession$SpellCheckerSessionListenerImpl.mHandler is
// a GC root, it's an inner class that references SpellCheckerSession which itself references
// a SpellChecker through SpellCheckerSession.mSpellCheckerSessionListener.
excluded.instanceField("android.view.textservice.SpellCheckerSession",
"mSpellCheckerSessionListener");
}

if (SAMSUNG.equals(MANUFACTURER) && SDK_INT == KITKAT) {
// android.app.LoadedApk.mResources has a reference to
// android.content.res.Resources.mPersonaManager which has a reference to
Expand Down

0 comments on commit 3faa17d

Please sign in to comment.