summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsatok <satok@google.com>2011-08-31 00:49:39 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-08-31 00:49:39 -0700
commit8da2a004b883dc4526bddb3198476414b2f3819c (patch)
tree1e96140f84fae42dbc13c5f557b05ddeed4f7334
parent27c6837d57be4e3a8de9b5d31ee5ee6da8675d1a (diff)
parentc7b60f72dda5c5f222342a9d60435ec353a8a19b (diff)
downloadframeworks_base-8da2a004b883dc4526bddb3198476414b2f3819c.zip
frameworks_base-8da2a004b883dc4526bddb3198476414b2f3819c.tar.gz
frameworks_base-8da2a004b883dc4526bddb3198476414b2f3819c.tar.bz2
Merge "Fix DeadObjectException of the spell checker"
-rw-r--r--services/java/com/android/server/TextServicesManagerService.java13
1 files changed, 9 insertions, 4 deletions
diff --git a/services/java/com/android/server/TextServicesManagerService.java b/services/java/com/android/server/TextServicesManagerService.java
index f6c369e..c792b33 100644
--- a/services/java/com/android/server/TextServicesManagerService.java
+++ b/services/java/com/android/server/TextServicesManagerService.java
@@ -201,7 +201,7 @@ public class TextServicesManagerService extends ITextServicesManager.Stub {
Settings.Secure.getString(mContext.getContentResolver(),
Settings.Secure.SELECTED_SPELL_CHECKER_SUBTYPE);
if (DBG) {
- Slog.w(TAG, "getCurrentSpellChecker: " + subtypeHashCodeStr);
+ Slog.w(TAG, "getCurrentSpellCheckerSubtype: " + subtypeHashCodeStr);
}
final SpellCheckerInfo sci = getCurrentSpellChecker(null);
if (sci == null || sci.getSubtypeCount() == 0) {
@@ -509,7 +509,8 @@ public class TextServicesManagerService extends ITextServicesManager.Stub {
listener.mScLocale, listener.mScListener, listener.mBundle);
listener.mTsListener.onServiceConnected(session);
} catch (RemoteException e) {
- Slog.e(TAG, "Exception in getting the spell checker session: " + e);
+ Slog.e(TAG, "Exception in getting the spell checker session."
+ + "Reconnect to the spellchecker. ", e);
removeAll();
return;
}
@@ -579,8 +580,12 @@ public class TextServicesManagerService extends ITextServicesManager.Stub {
Slog.d(TAG, "cleanLocked");
}
if (mListeners.isEmpty()) {
- if (mSpellCheckerBindGroups.containsKey(this)) {
- mSpellCheckerBindGroups.remove(this);
+ final String sciId = mInternalConnection.mSciId;
+ if (mSpellCheckerBindGroups.containsKey(sciId)) {
+ if (DBG) {
+ Slog.d(TAG, "Remove bind group.");
+ }
+ mSpellCheckerBindGroups.remove(sciId);
}
// Unbind service when there is no active clients.
mContext.unbindService(mInternalConnection);