Build slice from indexed data in SliceProvider

Connect the SliceIndexing data to the SliceProvider,
such that a query to SliceProvider can build a Slice
via the indexed data from SlicesIndexingManager.

We take the key from the Uri supplied to the SettingSliceProvider
and find a potential matching row in the indexed data. The
matched data is then used to Build a slice for the caller.

Bug: 67996923
Test: robotests
Change-Id: If51bfd1a05c3f3817ae720554f95a98fc7b002e1
This commit is contained in:
Matthew Fritze
2017-12-15 10:48:40 -08:00
parent 87f7a1be1e
commit 8c96843fe3
15 changed files with 858 additions and 14 deletions

View File

@@ -28,6 +28,7 @@ import android.widget.Toolbar;
import com.android.settings.core.FeatureFlags;
import com.android.settings.dashboard.SiteMapManager;
import com.android.settings.overlay.FeatureFactory;
import java.util.List;
import java.util.concurrent.ExecutorService;
@@ -185,6 +186,9 @@ public interface SearchFeatureProvider {
} else {
intent = new Intent(activity, SearchActivity.class);
}
FeatureFactory.getFactory(
activity.getApplicationContext()).getSlicesFeatureProvider()
.indexSliceDataAsync(activity.getApplicationContext());
activity.startActivityForResult(intent, 0 /* requestCode */);
});
}