Index Data to build Slices in Settings
The indexing is done by taking the indexable fragments from search, grabbing their XML via SearchIndexableResources, and then looking for controllers defined in preferences. For each controller found, we take the combination of the fragment providing the XML and the Preference info to create an indexable row. Buiding a Slice will be handled in a subsquent CL, but a prototype can be found here: ag/3324435 Test: robotests Bug: 67996923 Change-Id: I48668618079bcc3da55ab77b7323ee8e467073af
This commit is contained in:
@@ -48,6 +48,8 @@ import com.android.settings.search.SearchFeatureProvider;
|
||||
import com.android.settings.search.SearchFeatureProviderImpl;
|
||||
import com.android.settings.security.SecurityFeatureProvider;
|
||||
import com.android.settings.security.SecurityFeatureProviderImpl;
|
||||
import com.android.settings.slices.SlicesFeatureProvider;
|
||||
import com.android.settings.slices.SlicesFeatureProviderImpl;
|
||||
import com.android.settings.users.UserFeatureProvider;
|
||||
import com.android.settings.users.UserFeatureProviderImpl;
|
||||
import com.android.settings.wrapper.ConnectivityManagerWrapper;
|
||||
@@ -75,6 +77,7 @@ public class FeatureFactoryImpl extends FeatureFactory {
|
||||
private BluetoothFeatureProvider mBluetoothFeatureProvider;
|
||||
private DataPlanFeatureProvider mDataPlanFeatureProvider;
|
||||
private SmsMirroringFeatureProvider mSmsMirroringFeatureProvider;
|
||||
private SlicesFeatureProvider mSlicesFeatureProvider;
|
||||
|
||||
@Override
|
||||
public SupportFeatureProvider getSupportFeatureProvider(Context context) {
|
||||
@@ -208,4 +211,12 @@ public class FeatureFactoryImpl extends FeatureFactory {
|
||||
}
|
||||
return mSmsMirroringFeatureProvider;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SlicesFeatureProvider getSlicesFeatureProvider() {
|
||||
if (mSlicesFeatureProvider == null) {
|
||||
mSlicesFeatureProvider = new SlicesFeatureProviderImpl();
|
||||
}
|
||||
return mSlicesFeatureProvider;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user