Bug 1393577: Change AS context menu title to subdomain.domain.tld. r=liuche draft
authorMichael Comella <michael.l.comella@gmail.com>
Fri, 08 Sep 2017 14:38:50 -0700
changeset 661702 1c5f7dc4aec2b91a2929d24d5cdaf587a3715623
parent 661701 165b72395a28f745c9a4e4b82d72299e648615ed
child 730656 6fcd786021902156a66d958fcc069ab76b01f254
push id78854
push usermichael.l.comella@gmail.com
push dateFri, 08 Sep 2017 21:46:17 +0000
reviewersliuche
bugs1393577
milestone57.0a1
Bug 1393577: Change AS context menu title to subdomain.domain.tld. r=liuche Unlike the previous changeset, we don't strip common subdomains because "m.youtube.com" and "www.mozilla.org" can be informative and don't look bad when you have a tld. MozReview-Commit-ID: BOPH73pzAfh
mobile/android/base/java/org/mozilla/gecko/activitystream/homepanel/menu/BottomSheetContextMenu.java
--- a/mobile/android/base/java/org/mozilla/gecko/activitystream/homepanel/menu/BottomSheetContextMenu.java
+++ b/mobile/android/base/java/org/mozilla/gecko/activitystream/homepanel/menu/BottomSheetContextMenu.java
@@ -226,17 +226,17 @@ import java.net.URISyntaxException;
 
     /** Updates the given TextView's text to the page domain. */
     private static class UpdatePageDomainAsyncTask extends URIUtils.GetFormattedDomainAsyncTask {
         private final WeakReference<TextView> pageDomainViewWeakReference;
         private final String[] pageDomainTextReference;
 
         private UpdatePageDomainAsyncTask(final Context context, final TextView pageDomainView, final URI uri,
                 final String[] pageDomainTextReference) {
-            super(context, uri, true, 0); // baseDomain.
+            super(context, uri, true, 1); // subdomain.domain.tld.
             this.pageDomainViewWeakReference = new WeakReference<>(pageDomainView);
             this.pageDomainTextReference = pageDomainTextReference;
         }
 
         @Override
         protected void onPostExecute(final String baseDomain) {
             super.onPostExecute(baseDomain);