mirror of
https://github.com/moparisthebest/keepass2android
synced 2025-01-10 21:18:18 -05:00
correctly integrated PluginManager.java into KP2AKeyboard
This commit is contained in:
parent
6e0645559d
commit
12dbe597ce
@ -288,6 +288,7 @@ public class KP2AKeyboard extends InputMethodService
|
||||
}
|
||||
};
|
||||
private ClearKeyboardBroadcastReceiver mClearKeyboardReceiver;
|
||||
private PluginManager mPluginManager;
|
||||
|
||||
public class ClearKeyboardBroadcastReceiver extends BroadcastReceiver {
|
||||
@Override
|
||||
@ -327,6 +328,17 @@ public class KP2AKeyboard extends InputMethodService
|
||||
mReCorrectionEnabled = prefs.getBoolean(PREF_RECORRECTION_ENABLED,
|
||||
getResources().getBoolean(R.bool.default_recorrection_enabled));
|
||||
|
||||
Log.d("KP2AK","finding plugin dicts...");
|
||||
PluginManager.getPluginDictionaries(getApplicationContext());
|
||||
mPluginManager = new PluginManager(this);
|
||||
final IntentFilter pFilter = new IntentFilter();
|
||||
pFilter.addDataScheme("package");
|
||||
pFilter.addAction("android.intent.action.PACKAGE_ADDED");
|
||||
pFilter.addAction("android.intent.action.PACKAGE_REPLACED");
|
||||
pFilter.addAction("android.intent.action.PACKAGE_REMOVED");
|
||||
registerReceiver(mPluginManager, pFilter);
|
||||
|
||||
|
||||
LatinIMEUtil.GCUtils.getInstance().reset();
|
||||
boolean tryGC = true;
|
||||
for (int i = 0; i < LatinIMEUtil.GCUtils.GC_TRY_LOOP_MAX && tryGC; ++i) {
|
||||
@ -452,7 +464,7 @@ public class KP2AKeyboard extends InputMethodService
|
||||
mContactsDictionary.close();
|
||||
}*/
|
||||
unregisterReceiver(mReceiver);
|
||||
|
||||
unregisterReceiver(mPluginManager);
|
||||
unregisterReceiver(mClearKeyboardReceiver);
|
||||
|
||||
LatinImeLogger.commit();
|
||||
|
Loading…
Reference in New Issue
Block a user