Add a config to control whether SettingsIntelligence supports Slice

Fix: 240371240
Test: manual, robotest
Change-Id: Iddb08b521011a5e5134b8358a135cefb34809371
This commit is contained in:
Jason Chiu
2022-09-07 15:42:16 +08:00
parent 380dc18c0a
commit 5e365d3541
5 changed files with 69 additions and 2 deletions

View File

@@ -65,6 +65,11 @@ public class FlashlightHandleActivity extends Activity implements Indexable {
boolean enabled) {
final List<SearchIndexableRaw> result = new ArrayList<>();
if (!context.getResources().getBoolean(
R.bool.config_settingsintelligence_slice_supported)) {
Log.d(TAG, "Search doesn't support Slice");
return result;
}
SearchIndexableRaw data = new SearchIndexableRaw(context);
data.title = context.getString(R.string.power_flashlight);