Merge "Set key when Explore preference is created, otherwise tapping it will cause a NPE. BUG: 25597961"

This commit is contained in:
Felipe Leme
2015-11-10 00:28:40 +00:00
committed by Android (Google) Code Review

View File

@@ -297,6 +297,7 @@ public class PrivateVolumeSettings extends SettingsPreferenceFragment {
private Preference buildAction(int titleRes) { private Preference buildAction(int titleRes) {
final Preference pref = new Preference(getPrefContext()); final Preference pref = new Preference(getPrefContext());
pref.setTitle(titleRes); pref.setTitle(titleRes);
pref.setKey(Integer.toString(titleRes));
return pref; return pref;
} }