Merge "Only simulate the first click if "Always use" button is available" into klp-dev

This commit is contained in:
Amith Yamasani
2013-10-24 19:21:12 +00:00
committed by Android (Google) Code Review

View File

@@ -181,11 +181,12 @@ public class ResolverActivity extends AlertActivity implements AdapterView.OnIte
} else {
mAlwaysUseOption = false;
}
}
final int initialHighlight = mAdapter.getInitialHighlight();
if (initialHighlight >= 0) {
mListView.setItemChecked(initialHighlight, true);
onItemClick(null, null, initialHighlight, 0); // Other entries are not used
// Set the initial highlight if there was a preferred or last used choice
final int initialHighlight = mAdapter.getInitialHighlight();
if (initialHighlight >= 0) {
mListView.setItemChecked(initialHighlight, true);
onItemClick(null, null, initialHighlight, 0); // Other entries are not used
}
}
}