Merge "Only simulate the first click if "Always use" button is available" into klp-dev
diff --git a/core/java/com/android/internal/app/ResolverActivity.java b/core/java/com/android/internal/app/ResolverActivity.java
index cd853b6..591267e 100644
--- a/core/java/com/android/internal/app/ResolverActivity.java
+++ b/core/java/com/android/internal/app/ResolverActivity.java
@@ -181,11 +181,12 @@
} 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
+ }
}
}