Fix NPE onDestroy
Change-Id: I6aa1951fd3d69e07d1fbc7712fe2526dd9a5ef57
This commit is contained in:
parent
dac53d9c7d
commit
88327fb73b
1 changed files with 7 additions and 3 deletions
|
@ -355,10 +355,14 @@ public class LatinIME extends InputMethodService
|
|||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
if (mUserDictionary != null) {
|
||||
mUserDictionary.close();
|
||||
}
|
||||
if (mContactsDictionary != null) {
|
||||
mContactsDictionary.close();
|
||||
}
|
||||
unregisterReceiver(mReceiver);
|
||||
if (VOICE_INSTALLED) {
|
||||
if (VOICE_INSTALLED && mVoiceInput != null) {
|
||||
mVoiceInput.destroy();
|
||||
}
|
||||
LatinImeLogger.commit();
|
||||
|
|
Loading…
Reference in a new issue