Bug 776950 - Use displayname for homescreen shortcuts. r=margaret
authorWes Johnston <wjohnston@mozilla.com>
Tue, 24 Jul 2012 16:47:59 -0700
changeset 100640 1dd57c1c57cfc287442ec54329438865ef873356
parent 100639 1b04613c43c92932c856a122f4070d30b546ae04
child 100641 9118c1ca0aac18941014cd36532abdc5266ccc10
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewersmargaret
bugs776950
milestone17.0a1
Bug 776950 - Use displayname for homescreen shortcuts. r=margaret
mobile/android/base/GeckoApp.java
--- a/mobile/android/base/GeckoApp.java
+++ b/mobile/android/base/GeckoApp.java
@@ -708,17 +708,17 @@ abstract public class GeckoApp
       if (tab == null)
         return;
 
       String url = tab.getURL();
       if (url == null)
           return;
 
       GeckoAppShell.openUriExternal(url, "text/plain", "", "",
-                                    Intent.ACTION_SEND, tab.getTitle());
+                                    Intent.ACTION_SEND, tab.getDisplayTitle());
     }
 
     protected void onSaveInstanceState(Bundle outState) {
         super.onSaveInstanceState(outState);
 
         if (outState == null)
             outState = new Bundle();
 
@@ -2922,17 +2922,17 @@ abstract public class GeckoApp
                     }
                 }
                 return true;
             }
             case R.id.add_to_launcher: {
                 Tab tab = Tabs.getInstance().getSelectedTab();
                 if (tab != null) {
                     String url = tab.getURL();
-                    String title = tab.getTitle();
+                    String title = tab.getDisplayTitle();
                     BitmapDrawable favicon = (BitmapDrawable)(tab.getFavicon());
                     if (url != null && title != null) {
                         GeckoAppShell.createShortcut(title, url, url, favicon == null ? null : favicon.getBitmap(), "");
                     }
                 }
                 return true;
             }
         }