Merge "Fix bluetooth search result no-op" into pi-dev

This commit is contained in:
TreeHugger Robot
2018-05-29 19:40:14 +00:00
committed by Android (Google) Code Review
4 changed files with 76 additions and 9 deletions

View File

@@ -40,6 +40,8 @@ public class AdvancedConnectedDeviceDashboardFragment extends DashboardFragment
private static final String TAG = "AdvancedConnectedDeviceFrag";
static final String KEY_BLUETOOTH = "bluetooth_settings";
@Override
public int getMetricsCategory() {
return MetricsProto.MetricsEvent.CONNECTION_DEVICE_ADVANCED;
@@ -104,6 +106,9 @@ public class AdvancedConnectedDeviceDashboardFragment extends DashboardFragment
keys.add(AndroidBeamPreferenceController.KEY_ANDROID_BEAM_SETTINGS);
}
// Parent duplicate
keys.add(KEY_BLUETOOTH);
return keys;
}

View File

@@ -109,17 +109,10 @@ public class BluetoothDashboardFragment extends DashboardFragment {
final List<SearchIndexableRaw> result = new ArrayList<>();
// Add the activity title
SearchIndexableRaw data = new SearchIndexableRaw(context);
final SearchIndexableRaw data = new SearchIndexableRaw(context);
data.title = context.getString(R.string.bluetooth_settings_title);
data.screenTitle = context.getString(R.string.settings_label);
data.screenTitle = context.getString(R.string.bluetooth_settings_title);
data.keywords = context.getString(R.string.keywords_bluetooth_settings);
data.intentTargetPackage = context.getPackageName();
data.intentTargetClass = BluetoothDashboardFragment.class.getName();
data.intentAction = new SubSettingLauncher(context)
.setDestination(ScanningSettings.class.getName())
.setSourceMetricsCategory(MetricsProto.MetricsEvent.BLUETOOTH_FRAGMENT)
.toIntent()
.getAction();
data.key = KEY_BLUETOOTH_SCREEN;
result.add(data);