Search - fix remembered Bluetooth devices indexing

We were indexing the remembered device names but we were missing the
informations for launching the correct Activity from the Search result.

- add the missing information: className and iconResId

Change-Id: Ib6781d4c492c296e822da1b5a8a2a76c92ecd586
This commit is contained in:
Fabrice Di Meglio
2014-04-11 14:00:56 -07:00
parent e241ad1867
commit fa46de5c68
2 changed files with 4 additions and 0 deletions

View File

@@ -215,8 +215,10 @@ public final class BluetoothDevicePreference extends Preference implements
final Context context = getContext();
SearchIndexableRaw data = new SearchIndexableRaw(context);
data.className = BluetoothSettings.class.getName();
data.title = mCachedDevice.getName();
data.screenTitle = context.getResources().getString(R.string.bluetooth_settings);
data.iconResId = R.drawable.ic_settings_bluetooth2;
data.enabled = true;
Index.getInstance(context).updateFromSearchIndexableData(data);

View File

@@ -235,8 +235,10 @@ public final class DeviceProfilesSettings extends SettingsPreferenceFragment
final Context context = preference.getContext();
SearchIndexableRaw data = new SearchIndexableRaw(context);
data.className = BluetoothSettings.class.getName();
data.title = mCachedDevice.getName();
data.screenTitle = context.getResources().getString(R.string.bluetooth_settings);
data.iconResId = R.drawable.ic_settings_bluetooth2;
data.enabled = false;
Index.getInstance(context).updateFromSearchIndexableData(data);