am e5febfd5
: Merge "Clean up the spell checker framework" into ics-mr1
* commit 'e5febfd5bd9b19a01383760b523476ba7f013a5c': Clean up the spell checker framework
This commit is contained in:
@ -201,7 +201,7 @@ public class SpellCheckerSession {
|
|||||||
private static final int TASK_CLOSE = 3;
|
private static final int TASK_CLOSE = 3;
|
||||||
private final Queue<SpellCheckerParams> mPendingTasks =
|
private final Queue<SpellCheckerParams> mPendingTasks =
|
||||||
new LinkedList<SpellCheckerParams>();
|
new LinkedList<SpellCheckerParams>();
|
||||||
private final Handler mHandler;
|
private Handler mHandler;
|
||||||
|
|
||||||
private boolean mOpened;
|
private boolean mOpened;
|
||||||
private ISpellCheckerSession mISpellCheckerSession;
|
private ISpellCheckerSession mISpellCheckerSession;
|
||||||
@ -334,6 +334,7 @@ public class SpellCheckerSession {
|
|||||||
try {
|
try {
|
||||||
mISpellCheckerSession.onClose();
|
mISpellCheckerSession.onClose();
|
||||||
mISpellCheckerSession = null;
|
mISpellCheckerSession = null;
|
||||||
|
mHandler = null;
|
||||||
} catch (RemoteException e) {
|
} catch (RemoteException e) {
|
||||||
Log.e(TAG, "Failed to close " + e);
|
Log.e(TAG, "Failed to close " + e);
|
||||||
}
|
}
|
||||||
|
@ -360,7 +360,7 @@ public class TextServicesManagerService extends ITextServicesManager.Stub {
|
|||||||
}
|
}
|
||||||
final String sciId = info.getId();
|
final String sciId = info.getId();
|
||||||
final InternalServiceConnection connection = new InternalServiceConnection(
|
final InternalServiceConnection connection = new InternalServiceConnection(
|
||||||
sciId, locale, scListener, bundle);
|
sciId, locale, bundle);
|
||||||
final Intent serviceIntent = new Intent(SpellCheckerService.SERVICE_INTERFACE);
|
final Intent serviceIntent = new Intent(SpellCheckerService.SERVICE_INTERFACE);
|
||||||
serviceIntent.setComponent(info.getComponent());
|
serviceIntent.setComponent(info.getComponent());
|
||||||
if (DBG) {
|
if (DBG) {
|
||||||
@ -704,15 +704,13 @@ public class TextServicesManagerService extends ITextServicesManager.Stub {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private class InternalServiceConnection implements ServiceConnection {
|
private class InternalServiceConnection implements ServiceConnection {
|
||||||
private final ISpellCheckerSessionListener mListener;
|
|
||||||
private final String mSciId;
|
private final String mSciId;
|
||||||
private final String mLocale;
|
private final String mLocale;
|
||||||
private final Bundle mBundle;
|
private final Bundle mBundle;
|
||||||
public InternalServiceConnection(
|
public InternalServiceConnection(
|
||||||
String id, String locale, ISpellCheckerSessionListener listener, Bundle bundle) {
|
String id, String locale, Bundle bundle) {
|
||||||
mSciId = id;
|
mSciId = id;
|
||||||
mLocale = locale;
|
mLocale = locale;
|
||||||
mListener = listener;
|
|
||||||
mBundle = bundle;
|
mBundle = bundle;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user