Refactor DynamicIndexableContentMonitor
Refactor content monitoring code into a few singletons to keep alive
while Settings app is running.
Bug: 32995210
Test: Manually installing/uninstalling AOSP LatinIME.apk while
Settings app is/isn't running, then search AOSP.
Test: Connecting/Disconnecting Anker bluetooth keyboard while Settings
app is/isn't running, then search Anker.
Test: Added Robolectric test for DynamicIndexableContentMonitor.
Change-Id: I588e33be169fc9677d41c3daa59ab400f04f6419
This commit is contained in:
@@ -222,6 +222,7 @@ public class InputMethodAndLanguageSettings extends DashboardFragment
|
||||
InputMethodManager inputMethodManager = (InputMethodManager) context.getSystemService(
|
||||
Context.INPUT_METHOD_SERVICE);
|
||||
|
||||
// TODO: Move to VirtualKeyboardFragment and AvailableVirtualKeyboardFragment.
|
||||
// All other IMEs.
|
||||
List<InputMethodInfo> inputMethods = immValues.getInputMethodList();
|
||||
final int inputMethodCount = (inputMethods == null ? 0 : inputMethods.size());
|
||||
@@ -245,6 +246,7 @@ public class InputMethodAndLanguageSettings extends DashboardFragment
|
||||
indexables.add(indexable);
|
||||
}
|
||||
|
||||
// TODO: Move to PhysicalKeyboardFragment.
|
||||
// Hard keyboards
|
||||
InputManager inputManager = (InputManager) context.getSystemService(
|
||||
Context.INPUT_SERVICE);
|
||||
|
||||
Reference in New Issue
Block a user