Fix some failing tests
Bug: 13968927 Change-Id: I7e5e075535e38bf0fa24af98ed6e2cdfd6de6556main
parent
1ee443d848
commit
66e509b1d4
|
@ -501,7 +501,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
||||||
final IntentFilter filter = new IntentFilter();
|
final IntentFilter filter = new IntentFilter();
|
||||||
filter.addAction(ConnectivityManager.CONNECTIVITY_ACTION);
|
filter.addAction(ConnectivityManager.CONNECTIVITY_ACTION);
|
||||||
filter.addAction(AudioManager.RINGER_MODE_CHANGED_ACTION);
|
filter.addAction(AudioManager.RINGER_MODE_CHANGED_ACTION);
|
||||||
registerReceiver(mReceiver, filter);
|
registerReceiver(mConnectivityAndRingerModeChangeReceiver, filter);
|
||||||
|
|
||||||
final IntentFilter packageFilter = new IntentFilter();
|
final IntentFilter packageFilter = new IntentFilter();
|
||||||
packageFilter.addAction(Intent.ACTION_PACKAGE_ADDED);
|
packageFilter.addAction(Intent.ACTION_PACKAGE_ADDED);
|
||||||
|
@ -630,7 +630,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
||||||
public void onDestroy() {
|
public void onDestroy() {
|
||||||
mInputLogic.mSuggest.mDictionaryFacilitator.closeDictionaries();
|
mInputLogic.mSuggest.mDictionaryFacilitator.closeDictionaries();
|
||||||
mSettings.onDestroy();
|
mSettings.onDestroy();
|
||||||
unregisterReceiver(mReceiver);
|
unregisterReceiver(mConnectivityAndRingerModeChangeReceiver);
|
||||||
if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
|
if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
|
||||||
ResearchLogger.getInstance().onDestroy();
|
ResearchLogger.getInstance().onDestroy();
|
||||||
}
|
}
|
||||||
|
@ -645,6 +645,9 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
||||||
|
|
||||||
@UsedForTesting
|
@UsedForTesting
|
||||||
public void recycle() {
|
public void recycle() {
|
||||||
|
unregisterReceiver(mDictionaryPackInstallReceiver);
|
||||||
|
unregisterReceiver(mDictionaryDumpBroadcastReceiver);
|
||||||
|
unregisterReceiver(mConnectivityAndRingerModeChangeReceiver);
|
||||||
mInputLogic.recycle();
|
mInputLogic.recycle();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1635,7 +1638,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
||||||
// boolean onKeyMultiple(final int keyCode, final int count, final KeyEvent event);
|
// boolean onKeyMultiple(final int keyCode, final int count, final KeyEvent event);
|
||||||
|
|
||||||
// receive ringer mode change and network state change.
|
// receive ringer mode change and network state change.
|
||||||
private BroadcastReceiver mReceiver = new BroadcastReceiver() {
|
private BroadcastReceiver mConnectivityAndRingerModeChangeReceiver = new BroadcastReceiver() {
|
||||||
@Override
|
@Override
|
||||||
public void onReceive(final Context context, final Intent intent) {
|
public void onReceive(final Context context, final Intent intent) {
|
||||||
final String action = intent.getAction();
|
final String action = intent.getAction();
|
||||||
|
|
Loading…
Reference in New Issue