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
diff --git a/src/com/android/settings/bluetooth/BluetoothDevicePreference.java b/src/com/android/settings/bluetooth/BluetoothDevicePreference.java
index 12d25e5..e336ae4 100644
--- a/src/com/android/settings/bluetooth/BluetoothDevicePreference.java
+++ b/src/com/android/settings/bluetooth/BluetoothDevicePreference.java
@@ -215,8 +215,10 @@
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);
diff --git a/src/com/android/settings/bluetooth/DeviceProfilesSettings.java b/src/com/android/settings/bluetooth/DeviceProfilesSettings.java
index 821013d..b50d2b4 100755
--- a/src/com/android/settings/bluetooth/DeviceProfilesSettings.java
+++ b/src/com/android/settings/bluetooth/DeviceProfilesSettings.java
@@ -235,8 +235,10 @@
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);