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

Commit a1678dad authored by Raff Tsai's avatar Raff Tsai
Browse files

Add dynamic injection item to site map

- That will make injection able to build site map

Bug: 143116297
Test: manual
Change-Id: Ic07280519bb7f904a3e80e172b6cb8785b94616f
parent cd216b1d
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -189,16 +189,22 @@ public class SettingsSearchIndexablesProvider extends SearchIndexablesProvider {
            // Build parent-child class pairs for all children listed under this key.
            for (Tile tile : category.getTiles()) {
                String childClass = null;
                CharSequence childTitle = "";
                if (tile.getMetaData() != null) {
                    childClass = tile.getMetaData().getString(
                            SettingsActivity.META_DATA_KEY_FRAGMENT_CLASS);
                }
                if (childClass == null) {
                    childClass = tile.getComponentName();
                    childTitle = tile.getTitle(getContext());
                }
                if (childClass == null) {
                    continue;
                }
                cursor.newRow()
                        .add(SearchIndexablesContract.SiteMapColumns.PARENT_CLASS, parentClass)
                        .add(SearchIndexablesContract.SiteMapColumns.CHILD_CLASS, childClass);
                        .add(SearchIndexablesContract.SiteMapColumns.CHILD_CLASS, childClass)
                        .add(SearchIndexablesContract.SiteMapColumns.CHILD_TITLE, childTitle);
            }
        }
        // Done.
@@ -383,7 +389,8 @@ public class SettingsSearchIndexablesProvider extends SearchIndexablesProvider {
            }
        }

        return rawList;    }
        return rawList;
    }

    private static Object[] createIndexableRawColumnObjects(SearchIndexableRaw raw) {
        final Object[] ref = new Object[INDEXABLES_RAW_COLUMNS.length];