summaryrefslogtreecommitdiffstats
path: root/core/java/com
diff options
context:
space:
mode:
authorAmith Yamasani <yamasani@google.com>2013-10-23 16:05:29 -0700
committerAmith Yamasani <yamasani@google.com>2013-10-23 16:05:29 -0700
commit34d41e9a85f4e2e092b5eb8c7fa4554254650fe4 (patch)
treed3a89e728d7739a2850dcdbc296dc34c7cddd024 /core/java/com
parent02e4c3a1d870be7ced0f70f460d718924f6e348f (diff)
downloadframeworks_base-34d41e9a85f4e2e092b5eb8c7fa4554254650fe4.zip
frameworks_base-34d41e9a85f4e2e092b5eb8c7fa4554254650fe4.tar.gz
frameworks_base-34d41e9a85f4e2e092b5eb8c7fa4554254650fe4.tar.bz2
Only simulate the first click if "Always use" button is available
This prevents Keep from being selected automatically when shown in the Share dialog if Keep was previously chosen by the user as Always use for a send action. This was a regression introduced by the new intent disambig behavior. Bug: 11294904 Change-Id: I6745060a8ee0a6d680e657b55ee46aaec27bbacb
Diffstat (limited to 'core/java/com')
-rw-r--r--core/java/com/android/internal/app/ResolverActivity.java11
1 files changed, 6 insertions, 5 deletions
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 @@ 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
+ }
}
}