summaryrefslogtreecommitdiffstats
path: root/core/java/android/view/textservice
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2011-10-20 19:33:53 +0900
committerJean Chalard <jchalard@google.com>2011-10-20 20:04:54 +0900
commita80838d9d63fcc9a83a9e7c99884e5b50316d4f0 (patch)
tree9d88bf2070c68a75528f6469d8966152cba00c5e /core/java/android/view/textservice
parent149a14931e5aa4beb8c4263995f01437a8918465 (diff)
downloadframeworks_base-a80838d9d63fcc9a83a9e7c99884e5b50316d4f0.zip
frameworks_base-a80838d9d63fcc9a83a9e7c99884e5b50316d4f0.tar.gz
frameworks_base-a80838d9d63fcc9a83a9e7c99884e5b50316d4f0.tar.bz2
Fix a warning from the binder.
This patch fixes the following warning: W/Binder: The following Binder class should be static or leaks might occur: android.view.textservice .SpellCheckerSession.InternalListener ...in hope of removing a possible memory leaks. However in my tests it does nothing at all for the memory leak in bug 5461066, so it was probably unrelated. Change-Id: Id776665e9483121d22cc91e8d2d9f32e3413ec96 Bugs: 5481376,5461066
Diffstat (limited to 'core/java/android/view/textservice')
-rw-r--r--core/java/android/view/textservice/SpellCheckerSession.java12
1 files changed, 9 insertions, 3 deletions
diff --git a/core/java/android/view/textservice/SpellCheckerSession.java b/core/java/android/view/textservice/SpellCheckerSession.java
index 793f514..5c3f089 100644
--- a/core/java/android/view/textservice/SpellCheckerSession.java
+++ b/core/java/android/view/textservice/SpellCheckerSession.java
@@ -123,7 +123,7 @@ public class SpellCheckerSession {
}
mSpellCheckerInfo = info;
mSpellCheckerSessionListenerImpl = new SpellCheckerSessionListenerImpl(mHandler);
- mInternalListener = new InternalListener();
+ mInternalListener = new InternalListener(mSpellCheckerSessionListenerImpl);
mTextServicesManager = tsm;
mIsUsed = true;
mSpellCheckerSessionListener = listener;
@@ -316,13 +316,19 @@ public class SpellCheckerSession {
public void onGetSuggestions(SuggestionsInfo[] results);
}
- private class InternalListener extends ITextServicesSessionListener.Stub {
+ private static class InternalListener extends ITextServicesSessionListener.Stub {
+ private final SpellCheckerSessionListenerImpl mParentSpellCheckerSessionListenerImpl;
+
+ public InternalListener(SpellCheckerSessionListenerImpl spellCheckerSessionListenerImpl) {
+ mParentSpellCheckerSessionListenerImpl = spellCheckerSessionListenerImpl;
+ }
+
@Override
public void onServiceConnected(ISpellCheckerSession session) {
if (DBG) {
Log.w(TAG, "SpellCheckerSession connected.");
}
- mSpellCheckerSessionListenerImpl.onServiceConnected(session);
+ mParentSpellCheckerSessionListenerImpl.onServiceConnected(session);
}
}