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

Commit 13bc602b authored by Amith Yamasani's avatar Amith Yamasani
Browse files

Update searchables when packages are modified, in case they are enabled/disabled.

Bug: 5198361 : SearchManagerService doesn't respond to package updates.
Change-Id: I2ac794c5da4769eadd6b860ab0f9123060d2a5e5
parent cf508bd5
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -97,8 +97,18 @@ public class SearchManagerService extends ISearchManager.Stub {
     * Refreshes the "searchables" list when packages are added/removed.
     */
    class MyPackageMonitor extends PackageMonitor {

        @Override
        public void onSomePackagesChanged() {
            updateSearchables();
        }

        @Override
        public void onPackageModified(String pkg) {
            updateSearchables();
        }

        private void updateSearchables() {
            // Update list of searchable activities
            getSearchables().buildSearchableList();
            // Inform all listeners that the list of searchables has been updated.