summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Christopher Tate <ctate@google.com> 2013-10-01 20:39:04 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2013-10-01 20:39:05 +0000
commit5088fc858c5a7f234310b51c0fa87a9a617eef7d (patch)
treeca4941d3b1f50a078f0c210e45f8fea6578dc72e
parent3c98926bf2105571a149d810a52461e01e5e7cdb (diff)
parentb72b363c972ffa70205afdaeb36073ed09d57f76 (diff)
Merge "Specialized prompting when 'home' has become ambiguous" into klp-dev
-rw-r--r--core/java/com/android/internal/app/ResolverActivity.java16
-rw-r--r--core/res/res/values/strings.xml2
-rw-r--r--core/res/res/values/symbols.xml1
3 files changed, 17 insertions, 2 deletions
diff --git a/core/java/com/android/internal/app/ResolverActivity.java b/core/java/com/android/internal/app/ResolverActivity.java
index 05fd613ee659..cd853b62e622 100644
--- a/core/java/com/android/internal/app/ResolverActivity.java
+++ b/core/java/com/android/internal/app/ResolverActivity.java
@@ -100,8 +100,20 @@ public class ResolverActivity extends AlertActivity implements AdapterView.OnIte
@Override
protected void onCreate(Bundle savedInstanceState) {
- onCreate(savedInstanceState, makeMyIntent(),
- getResources().getText(com.android.internal.R.string.whichApplication),
+ // Use a specialized prompt when we're handling the 'Home' app startActivity()
+ final int titleResource;
+ final Intent intent = makeMyIntent();
+ final Set<String> categories = intent.getCategories();
+ if (Intent.ACTION_MAIN.equals(intent.getAction())
+ && categories != null
+ && categories.size() == 1
+ && categories.contains(Intent.CATEGORY_HOME)) {
+ titleResource = com.android.internal.R.string.whichHomeApplication;
+ } else {
+ titleResource = com.android.internal.R.string.whichApplication;
+ }
+
+ onCreate(savedInstanceState, intent, getResources().getText(titleResource),
null, null, true);
}
diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml
index 6c334e241965..56e7ff9476cd 100644
--- a/core/res/res/values/strings.xml
+++ b/core/res/res/values/strings.xml
@@ -3182,6 +3182,8 @@
<!-- Title of intent resolver dialog when selecting an application to run. -->
<string name="whichApplication">Complete action using</string>
+ <!-- Title of intent resolver dialog when selecting a HOME application to run. -->
+ <string name="whichHomeApplication">Select a home app</string>
<!-- Option to always use the selected application resolution in the future. See the "Complete action using" dialog title-->
<string name="alwaysUse">Use by default for this action.</string>
<!-- Text displayed when the user selects the check box for setting default application. See the "Use by default for this action" check box. -->
diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml
index c786888e8116..7608f9928923 100644
--- a/core/res/res/values/symbols.xml
+++ b/core/res/res/values/symbols.xml
@@ -800,6 +800,7 @@
<java-symbol type="string" name="web_user_agent_target_content" />
<java-symbol type="string" name="webpage_unresponsive" />
<java-symbol type="string" name="whichApplication" />
+ <java-symbol type="string" name="whichHomeApplication" />
<java-symbol type="string" name="wifi_available_sign_in" />
<java-symbol type="string" name="network_available_sign_in" />
<java-symbol type="string" name="network_available_sign_in_detailed" />