Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a034fa54 authored by Tadashi G. Takaoka's avatar Tadashi G. Takaoka
Browse files

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
parent 1df45999
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -723,7 +723,7 @@ public class SettingsActivity extends SettingsDrawerActivity
        unregisterReceiver(mBatteryInfoReceiver);
        unregisterReceiver(mUserAddRemoveReceiver);
        if (mDynamicIndexableContentMonitor != null) {
            mDynamicIndexableContentMonitor.unregister();
            mDynamicIndexableContentMonitor.unregister(this, LOADER_ID_INDEXABLE_CONTENT_MONITOR);
        }
    }

+2 −0
Original line number Diff line number Diff line
@@ -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);
Loading