Loading core/java/com/android/internal/app/ResolverActivity.java +7 −11 Original line number Diff line number Diff line Loading @@ -128,7 +128,10 @@ public class ResolverActivity extends Activity implements AdapterView.OnItemClic com.android.internal.R.string.whichSendApplicationNamed), DEFAULT(null, com.android.internal.R.string.whichApplication, com.android.internal.R.string.whichApplicationNamed); com.android.internal.R.string.whichApplicationNamed), HOME(Intent.ACTION_MAIN, com.android.internal.R.string.whichHomeApplication, com.android.internal.R.string.whichHomeApplicationNamed); public final String action; public final int titleRes; Loading @@ -142,7 +145,7 @@ public class ResolverActivity extends Activity implements AdapterView.OnItemClic public static ActionTitle forAction(String action) { for (ActionTitle title : values()) { if (action != null && action.equals(title.action)) { if (title != HOME && action != null && action.equals(title.action)) { return title; } } Loading @@ -165,26 +168,19 @@ public class ResolverActivity extends Activity implements AdapterView.OnItemClic @Override protected void onCreate(Bundle savedInstanceState) { // 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; // Note: this field is not set to true in the compatibility version. mResolvingHome = true; } else { titleResource = 0; } setSafeForwardingMode(true); onCreate(savedInstanceState, intent, titleResource != 0 ? getResources().getText(titleResource) : null, titleResource, null, null, true); onCreate(savedInstanceState, intent, null, 0, null, null, true); } /** Loading Loading @@ -336,7 +332,7 @@ public class ResolverActivity extends Activity implements AdapterView.OnItemClic } protected CharSequence getTitleForAction(String action, int defaultTitleRes) { final ActionTitle title = ActionTitle.forAction(action); final ActionTitle title = mResolvingHome ? ActionTitle.HOME : ActionTitle.forAction(action); final boolean named = mAdapter.hasFilteredItem(); if (title == ActionTitle.DEFAULT && defaultTitleRes != 0) { return getString(defaultTitleRes); Loading core/res/res/values/strings.xml +4 −1 Original line number Diff line number Diff line Loading @@ -3440,7 +3440,10 @@ and a previously used application is known. --> <string name="whichSendApplicationNamed">Share with %1$s</string> <!-- Title of intent resolver dialog when selecting a HOME application to run. --> <string name="whichHomeApplication">Select a home app</string> <string name="whichHomeApplication">Select a Home app</string> <!-- Title of intent resolver dialog when selecting a HOME application to run and a previously used application is known. --> <string name="whichHomeApplicationNamed">Use %1$s as Home</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> <!-- Title of the list of alternate options to complete an action shown when the Loading core/res/res/values/symbols.xml +1 −0 Original line number Diff line number Diff line Loading @@ -2067,4 +2067,5 @@ <java-symbol type="bool" name="config_restart_radio_on_pdp_fail_regular_deactivation" /> <java-symbol type="array" name="networks_not_clear_data" /> <java-symbol type="bool" name="config_switch_phone_on_voice_reg_state_change" /> <java-symbol type="string" name="whichHomeApplicationNamed" /> </resources> Loading
core/java/com/android/internal/app/ResolverActivity.java +7 −11 Original line number Diff line number Diff line Loading @@ -128,7 +128,10 @@ public class ResolverActivity extends Activity implements AdapterView.OnItemClic com.android.internal.R.string.whichSendApplicationNamed), DEFAULT(null, com.android.internal.R.string.whichApplication, com.android.internal.R.string.whichApplicationNamed); com.android.internal.R.string.whichApplicationNamed), HOME(Intent.ACTION_MAIN, com.android.internal.R.string.whichHomeApplication, com.android.internal.R.string.whichHomeApplicationNamed); public final String action; public final int titleRes; Loading @@ -142,7 +145,7 @@ public class ResolverActivity extends Activity implements AdapterView.OnItemClic public static ActionTitle forAction(String action) { for (ActionTitle title : values()) { if (action != null && action.equals(title.action)) { if (title != HOME && action != null && action.equals(title.action)) { return title; } } Loading @@ -165,26 +168,19 @@ public class ResolverActivity extends Activity implements AdapterView.OnItemClic @Override protected void onCreate(Bundle savedInstanceState) { // 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; // Note: this field is not set to true in the compatibility version. mResolvingHome = true; } else { titleResource = 0; } setSafeForwardingMode(true); onCreate(savedInstanceState, intent, titleResource != 0 ? getResources().getText(titleResource) : null, titleResource, null, null, true); onCreate(savedInstanceState, intent, null, 0, null, null, true); } /** Loading Loading @@ -336,7 +332,7 @@ public class ResolverActivity extends Activity implements AdapterView.OnItemClic } protected CharSequence getTitleForAction(String action, int defaultTitleRes) { final ActionTitle title = ActionTitle.forAction(action); final ActionTitle title = mResolvingHome ? ActionTitle.HOME : ActionTitle.forAction(action); final boolean named = mAdapter.hasFilteredItem(); if (title == ActionTitle.DEFAULT && defaultTitleRes != 0) { return getString(defaultTitleRes); Loading
core/res/res/values/strings.xml +4 −1 Original line number Diff line number Diff line Loading @@ -3440,7 +3440,10 @@ and a previously used application is known. --> <string name="whichSendApplicationNamed">Share with %1$s</string> <!-- Title of intent resolver dialog when selecting a HOME application to run. --> <string name="whichHomeApplication">Select a home app</string> <string name="whichHomeApplication">Select a Home app</string> <!-- Title of intent resolver dialog when selecting a HOME application to run and a previously used application is known. --> <string name="whichHomeApplicationNamed">Use %1$s as Home</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> <!-- Title of the list of alternate options to complete an action shown when the Loading
core/res/res/values/symbols.xml +1 −0 Original line number Diff line number Diff line Loading @@ -2067,4 +2067,5 @@ <java-symbol type="bool" name="config_restart_radio_on_pdp_fail_regular_deactivation" /> <java-symbol type="array" name="networks_not_clear_data" /> <java-symbol type="bool" name="config_switch_phone_on_voice_reg_state_change" /> <java-symbol type="string" name="whichHomeApplicationNamed" /> </resources>