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
--- 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);