Backed out changeset 014826d39b2f (bug 1394356) for Android bustage.
authorRyan VanderMeulen <ryanvm@gmail.com>
Mon, 11 Sep 2017 11:36:07 -0400
changeset 424027 1b63df5a180b5c564efda052d9a19dc150131fc7
parent 424026 47dcb670f8cacaf872682f6700cda45ee76541b4
child 424028 4defb75014dfe3f8d77301ea89a7b43897696ca2
push id1517
push userjlorenzo@mozilla.com
push dateThu, 14 Sep 2017 16:50:54 +0000
treeherdermozilla-release@3b41fd564418 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1394356
milestone56.0
backs out014826d39b2f14ea1216808d3dde47f043514f05
Backed out changeset 014826d39b2f (bug 1394356) for Android bustage.
mobile/android/app/src/main/res/menu-large-v26/browser_app_menu.xml
mobile/android/app/src/main/res/menu-v26/activitystream_contextmenu.xml
mobile/android/app/src/main/res/menu-v26/browser_app_menu.xml
mobile/android/app/src/main/res/menu-v26/home_contextmenu.xml
mobile/android/app/src/main/res/menu-v26/titlebar_contextmenu.xml
mobile/android/app/src/main/res/menu-xlarge-v26/browser_app_menu.xml
mobile/android/base/java/org/mozilla/gecko/delegates/BookmarkStateChangeDelegate.java
mobile/android/base/java/org/mozilla/gecko/promotion/AddToHomeScreenPromotion.java
deleted file mode 100644
--- a/mobile/android/app/src/main/res/menu-large-v26/browser_app_menu.xml
+++ /dev/null
@@ -1,120 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
-   - License, v. 2.0. If a copy of the MPL was not distributed with this
-   - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-<!-- We disable AlwaysShowAction because we interpret the menu
-     attributes ourselves and thus the warning isn't relevant to us. -->
-<menu xmlns:android="http://schemas.android.com/apk/res/android"
-      xmlns:tools="http://schemas.android.com/tools"
-      tools:ignore="AlwaysShowAction">
-
-    <item android:id="@+id/reload"
-          android:icon="@drawable/ic_menu_reload"
-          android:title="@string/reload"
-          android:showAsAction="always"/>
-
-    <item android:id="@+id/back"
-          android:icon="@drawable/ic_menu_back"
-          android:title="@string/back"
-          android:visible="false"/>
-
-    <item android:id="@+id/forward"
-          android:icon="@drawable/ic_menu_forward"
-          android:title="@string/forward"
-          android:visible="false"/>
-
-    <item android:id="@+id/bookmark"
-          android:icon="@drawable/ic_menu_bookmark_add"
-          android:title="@string/bookmark"
-          android:showAsAction="ifRoom"/>
-
-    <item android:id="@+id/share"
-          android:icon="@drawable/ic_menu_share"
-          android:title="@string/share"
-          android:showAsAction="ifRoom"/>
-
-    <item android:id="@+id/new_tab"
-          android:title="@string/new_tab"/>
-
-    <item android:id="@+id/new_private_tab"
-          android:title="@string/new_private_tab"/>
-
-    <item android:id="@+id/bookmarks_list"
-          android:title="@string/bookmarks_title"/>
-
-    <item android:id="@+id/history_list"
-          android:title="@string/history_title"/>
-
-    <item android:id="@+id/find_in_page"
-          android:title="@string/find_in_page" />
-
-    <item android:id="@+id/desktop_mode"
-          android:title="@string/desktop_mode"
-          android:checkable="true" />
-
-    <item android:id="@+id/addons_top_level"
-          android:title="@string/addons"
-          android:visible="false" />
-
-    <item android:id="@+id/page"
-          android:title="@string/page">
-
-        <menu>
-
-            <item android:id="@+id/subscribe"
-                  android:title="@string/contextmenu_subscribe"/>
-
-            <item android:id="@+id/save_as_pdf"
-                  android:title="@string/save_as_pdf"/>
-
-            <item android:id="@+id/print"
-                  android:title="@string/print"/>
-
-            <item android:id="@+id/add_search_engine"
-                  android:title="@string/contextmenu_add_search_engine"/>
-
-            <item android:id="@+id/set_as_homepage"
-                  android:title="@string/contextmenu_set_as_homepage"/>
-
-        </menu>
-
-    </item>
-
-    <item android:id="@+id/tools"
-          android:title="@string/tools">
-
-        <menu>
-
-            <item android:id="@+id/downloads"
-                  android:title="@string/downloads"/>
-
-            <item android:id="@+id/addons"
-                  android:title="@string/addons"/>
-
-            <item android:id="@+id/logins"
-                  android:title="@string/logins"/>
-
-            <item android:id="@+id/new_guest_session"
-                  android:visible="false"
-                  android:title="@string/new_guest_session"/>
-
-            <item android:id="@+id/exit_guest_session"
-                  android:visible="false"
-                  android:title="@string/exit_guest_session"/>
-
-        </menu>
-
-    </item>
-
-    <item android:id="@+id/char_encoding"
-          android:visible="false"
-          android:title="@string/char_encoding"/>
-
-    <item android:id="@+id/settings"
-          android:title="@string/settings" />
-
-    <item android:id="@+id/help"
-          android:title="@string/help_menu" />
-
-</menu>
deleted file mode 100644
--- a/mobile/android/app/src/main/res/menu-v26/activitystream_contextmenu.xml
+++ /dev/null
@@ -1,46 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<menu xmlns:android="http://schemas.android.com/apk/res/android">
-    <!-- Group ID's are required, otherwise NavigationView won't show any dividers. The ID's are unused, but still required. -->
-    <group android:id="@+id/group0">
-        <item
-            android:id="@+id/open_new_tab"
-            android:icon="@drawable/as_tab"
-            android:title="@string/contextmenu_open_new_tab"/>
-        <item
-            android:id="@+id/open_new_private_tab"
-            android:icon="@drawable/as_private"
-            android:title="@string/contextmenu_open_private_tab"/>
-    </group>
-
-    <group android:id="@+id/group1">
-        <item
-            android:id="@+id/dismiss"
-            android:icon="@drawable/as_dismiss"
-            android:title="@string/activity_stream_remove"/>
-
-        <item
-            android:id="@+id/delete"
-            android:icon="@drawable/as_bin"
-            android:visible="false"
-            android:title="@string/activity_stream_delete_history"/>
-    </group>
-
-    <group android:id="@+id/group2">
-        <item
-            android:id="@+id/bookmark"
-            android:icon="@drawable/as_bookmark"
-            android:title="@string/bookmark"/>
-        <item
-            android:id="@+id/share"
-            android:icon="@drawable/as_share"
-            android:title="@string/share"/>
-        <item
-            android:id="@+id/copy_url"
-            android:icon="@drawable/as_copy"
-            android:title="@string/contextmenu_copyurl"/>
-        <item
-            android:id="@+id/pin"
-            android:icon="@drawable/as_pin"
-            android:title="@string/contextmenu_top_sites_pin"/>
-    </group>
-</menu>
\ No newline at end of file
deleted file mode 100644
--- a/mobile/android/app/src/main/res/menu-v26/browser_app_menu.xml
+++ /dev/null
@@ -1,120 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
-   - License, v. 2.0. If a copy of the MPL was not distributed with this
-   - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-<!-- We disable AlwaysShowAction because we interpret the menu
-     attributes ourselves and thus the warning isn't relevant to us. -->
-<menu xmlns:android="http://schemas.android.com/apk/res/android"
-      xmlns:tools="http://schemas.android.com/tools"
-      tools:ignore="AlwaysShowAction">
-
-    <item android:id="@+id/back"
-          android:icon="@drawable/ic_menu_back"
-          android:title="@string/back"
-          android:showAsAction="always"/>
-
-    <item android:id="@+id/forward"
-          android:icon="@drawable/ic_menu_forward"
-          android:title="@string/forward"
-          android:showAsAction="always"/>
-
-    <item android:id="@+id/bookmark"
-          android:icon="@drawable/ic_menu_bookmark_add"
-          android:title="@string/bookmark"
-          android:showAsAction="always"/>
-
-    <item android:id="@+id/reload"
-          android:icon="@drawable/ic_menu_reload"
-          android:title="@string/reload"
-          android:showAsAction="always"/>
-
-    <item android:id="@+id/share"
-          android:icon="@drawable/ic_menu_share"
-          android:title="@string/share"
-          android:showAsAction="ifRoom"/>
-
-    <item android:id="@+id/new_tab"
-          android:title="@string/new_tab"/>
-
-    <item android:id="@+id/new_private_tab"
-          android:title="@string/new_private_tab"/>
-
-    <item android:id="@+id/bookmarks_list"
-          android:title="@string/bookmarks_title"/>
-
-    <item android:id="@+id/history_list"
-          android:title="@string/history_title"/>
-
-    <item android:id="@+id/find_in_page"
-          android:title="@string/find_in_page" />
-
-    <item android:id="@+id/desktop_mode"
-          android:title="@string/desktop_mode"
-          android:checkable="true" />
-
-    <item android:id="@+id/addons_top_level"
-          android:title="@string/addons"
-          android:visible="false" />
-
-    <item android:id="@+id/page"
-          android:title="@string/page">
-
-        <menu>
-
-            <item android:id="@+id/subscribe"
-                  android:title="@string/contextmenu_subscribe"/>
-
-            <item android:id="@+id/save_as_pdf"
-                  android:title="@string/save_as_pdf"/>
-
-            <item android:id="@+id/print"
-                  android:title="@string/print"/>
-
-            <item android:id="@+id/add_search_engine"
-                  android:title="@string/contextmenu_add_search_engine"/>
-
-            <item android:id="@+id/set_as_homepage"
-                  android:title="@string/contextmenu_set_as_homepage"/>
-
-        </menu>
-
-    </item>
-
-    <item android:id="@+id/tools"
-          android:title="@string/tools">
-
-        <menu>
-
-            <item android:id="@+id/downloads"
-                  android:title="@string/downloads"/>
-
-            <item android:id="@+id/addons"
-                  android:title="@string/addons"/>
-
-            <item android:id="@+id/logins"
-                  android:title="@string/logins"/>
-
-            <item android:id="@+id/new_guest_session"
-                  android:visible="false"
-                  android:title="@string/new_guest_session"/>
-
-            <item android:id="@+id/exit_guest_session"
-                  android:visible="false"
-                  android:title="@string/exit_guest_session"/>
-
-        </menu>
-
-    </item>
-
-    <item android:id="@+id/char_encoding"
-          android:visible="false"
-          android:title="@string/char_encoding"/>
-
-    <item android:id="@+id/settings"
-          android:title="@string/settings" />
-
-    <item android:id="@+id/help"
-          android:title="@string/help_menu" />
-
-</menu>
deleted file mode 100644
--- a/mobile/android/app/src/main/res/menu-v26/home_contextmenu.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
-   - License, v. 2.0. If a copy of the MPL was not distributed with this
-   - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-<menu xmlns:android="http://schemas.android.com/apk/res/android">
-
-    <item android:id="@+id/home_open_new_tab"
-          android:title="@string/contextmenu_open_new_tab"/>
-
-    <item android:id="@+id/home_open_private_tab"
-          android:title="@string/contextmenu_open_private_tab"/>
-
-    <item android:id="@+id/home_copyurl"
-          android:title="@string/contextmenu_copyurl"/>
-
-    <item android:id="@+id/home_share"
-          android:title="@string/contextmenu_share"/>
-
-    <item android:id="@+id/top_sites_edit"
-          android:title="@string/contextmenu_top_sites_edit"/>
-
-    <item android:id="@+id/top_sites_pin"
-          android:title="@string/contextmenu_top_sites_pin"/>
-
-    <item android:id="@+id/top_sites_unpin"
-          android:title="@string/contextmenu_top_sites_unpin"/>
-
-    <item android:id="@+id/home_edit_bookmark"
-          android:title="@string/contextmenu_edit_bookmark"/>
-
-    <item android:id="@+id/home_remove"
-          android:title="@string/contextmenu_remove"/>
-
-    <item android:id="@+id/home_as_pin"
-        android:title="@string/contextmenu_top_sites_pin"/>
-
-    <item android:id="@+id/home_set_as_homepage"
-          android:title="@string/contextmenu_set_as_homepage"/>
-
-</menu>
deleted file mode 100644
--- a/mobile/android/app/src/main/res/menu-v26/titlebar_contextmenu.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
-   - License, v. 2.0. If a copy of the MPL was not distributed with this
-   - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-<menu xmlns:android="http://schemas.android.com/apk/res/android">
-
-    <item android:id="@+id/pasteandgo"
-          android:title="@string/contextmenu_pasteandgo"/>
-
-    <item android:id="@+id/paste"
-          android:title="@string/contextmenu_paste"/>
-
-    <item android:id="@+id/subscribe"
-          android:title="@string/contextmenu_subscribe"/>
-
-    <item android:id="@+id/add_search_engine"
-          android:title="@string/contextmenu_add_search_engine"/>
-
-    <item android:id="@+id/copyurl"
-          android:title="@string/contextmenu_copyurl"/>
-
-    <item android:id="@+id/set_as_homepage"
-          android:title="@string/contextmenu_set_as_homepage"/>
-
-</menu>
deleted file mode 100644
--- a/mobile/android/app/src/main/res/menu-xlarge-v26/browser_app_menu.xml
+++ /dev/null
@@ -1,121 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
-   - License, v. 2.0. If a copy of the MPL was not distributed with this
-   - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-<!-- We disable AlwaysShowAction because we interpret the menu
-     attributes ourselves and thus the warning isn't relevant to us. -->
-<menu xmlns:android="http://schemas.android.com/apk/res/android"
-      xmlns:tools="http://schemas.android.com/tools"
-      tools:ignore="AlwaysShowAction">
-
-    <item android:id="@+id/reload"
-          android:icon="@drawable/ic_menu_reload"
-          android:title="@string/reload"
-          android:showAsAction="always"/>
-
-    <item android:id="@+id/back"
-          android:icon="@drawable/ic_menu_back"
-          android:title="@string/back"
-          android:visible="false"/>
-
-    <item android:id="@+id/forward"
-          android:icon="@drawable/ic_menu_forward"
-          android:title="@string/forward"
-          android:visible="false"/>
-
-    <item android:id="@+id/bookmark"
-          android:icon="@drawable/ic_menu_bookmark_add"
-          android:title="@string/bookmark"
-          android:showAsAction="always"/>
-
-    <item android:id="@+id/share"
-          android:icon="@drawable/ic_menu_share"
-          android:title="@string/share"
-          android:showAsAction="ifRoom"/>
-
-    <item android:id="@+id/new_tab"
-          android:title="@string/new_tab"/>
-
-    <item android:id="@+id/new_private_tab"
-          android:title="@string/new_private_tab"/>
-
-    <item android:id="@+id/bookmarks_list"
-          android:title="@string/bookmarks_title"/>
-
-    <item android:id="@+id/history_list"
-          android:title="@string/history_title"/>
-
-    <item android:id="@+id/find_in_page"
-          android:title="@string/find_in_page" />
-
-    <item android:id="@+id/addons_top_level"
-          android:title="@string/addons"
-          android:visible="false" />
-
-    <item android:id="@+id/desktop_mode"
-          android:title="@string/desktop_mode"
-          android:checkable="true" />
-
-
-    <item android:id="@+id/page"
-          android:title="@string/page">
-
-        <menu>
-
-            <item android:id="@+id/subscribe"
-                  android:title="@string/contextmenu_subscribe"/>
-
-            <item android:id="@+id/save_as_pdf"
-                  android:title="@string/save_as_pdf"/>
-
-            <item android:id="@+id/print"
-                  android:title="@string/print"/>
-
-            <item android:id="@+id/add_search_engine"
-                  android:title="@string/contextmenu_add_search_engine"/>
-
-            <item android:id="@+id/set_as_homepage"
-                  android:title="@string/contextmenu_set_as_homepage"/>
-
-        </menu>
-
-    </item>
-
-    <item android:id="@+id/tools"
-          android:title="@string/tools">
-
-        <menu>
-
-            <item android:id="@+id/downloads"
-                  android:title="@string/downloads"/>
-
-            <item android:id="@+id/addons"
-                  android:title="@string/addons"/>
-
-            <item android:id="@+id/logins"
-                  android:title="@string/logins"/>
-
-            <item android:id="@+id/new_guest_session"
-                  android:visible="false"
-                  android:title="@string/new_guest_session"/>
-
-            <item android:id="@+id/exit_guest_session"
-                  android:visible="false"
-                  android:title="@string/exit_guest_session"/>
-
-        </menu>
-
-    </item>
-
-    <item android:id="@+id/char_encoding"
-          android:visible="false"
-          android:title="@string/char_encoding"/>
-
-    <item android:id="@+id/settings"
-          android:title="@string/settings" />
-
-    <item android:id="@+id/help"
-          android:title="@string/help_menu" />
-
-</menu>
--- a/mobile/android/base/java/org/mozilla/gecko/delegates/BookmarkStateChangeDelegate.java
+++ b/mobile/android/base/java/org/mozilla/gecko/delegates/BookmarkStateChangeDelegate.java
@@ -11,17 +11,16 @@ import android.content.res.Resources;
 import android.graphics.Color;
 import android.graphics.drawable.Drawable;
 import android.support.design.widget.Snackbar;
 import android.support.v4.content.ContextCompat;
 import android.view.View;
 import android.widget.ListView;
 
 import org.mozilla.gecko.AboutPages;
-import org.mozilla.gecko.AppConstants;
 import org.mozilla.gecko.BrowserApp;
 import org.mozilla.gecko.GeckoApplication;
 import org.mozilla.gecko.GeckoSharedPrefs;
 import org.mozilla.gecko.R;
 import org.mozilla.gecko.SnackbarBuilder;
 import org.mozilla.gecko.Tab;
 import org.mozilla.gecko.Tabs;
 import org.mozilla.gecko.Telemetry;
@@ -188,28 +187,21 @@ public class BookmarkStateChangeDelegate
                                 GeckoApplication.createShortcut(title, url);
                             }
                         });
                     }
                 }
             }
         });
 
-        if (AppConstants.Versions.feature26Plus) {
-            final PromptListItem[] items = new PromptListItem[1];
-            items[0] = new PromptListItem(res.getString(R.string.contextmenu_edit_bookmark));
-            ps.show("", "", items, ListView.CHOICE_MODE_NONE);
-        } else {
-            final PromptListItem[] items = new PromptListItem[2];
-            items[0] = new PromptListItem(res.getString(R.string.contextmenu_edit_bookmark));
-            items[1] = new PromptListItem(res.getString(R.string.contextmenu_add_to_launcher));
-            ps.show("", "", items, ListView.CHOICE_MODE_NONE);
-        }
+        final PromptListItem[] items = new PromptListItem[2];
+        items[0] = new PromptListItem(res.getString(R.string.contextmenu_edit_bookmark));
+        items[1] = new PromptListItem(res.getString(R.string.contextmenu_add_to_launcher));
 
-
+        ps.show("", "", items, ListView.CHOICE_MODE_NONE);
     }
 
     private void showReaderModeBookmarkAddedSnackbar() {
         final BrowserApp browserApp = getBrowserApp();
         if (browserApp == null) {
             return;
         }
 
--- a/mobile/android/base/java/org/mozilla/gecko/promotion/AddToHomeScreenPromotion.java
+++ b/mobile/android/base/java/org/mozilla/gecko/promotion/AddToHomeScreenPromotion.java
@@ -8,17 +8,16 @@ package org.mozilla.gecko.promotion;
 import android.app.Activity;
 import android.content.Context;
 import android.database.Cursor;
 import android.os.Bundle;
 import android.support.annotation.CallSuper;
 import android.support.annotation.Nullable;
 import android.util.Log;
 
-import org.mozilla.gecko.AppConstants;
 import org.mozilla.gecko.switchboard.SwitchBoard;
 
 import org.json.JSONException;
 import org.json.JSONObject;
 import org.mozilla.gecko.AboutPages;
 import org.mozilla.gecko.BrowserApp;
 import org.mozilla.gecko.GeckoProfile;
 import org.mozilla.gecko.Tab;
@@ -132,21 +131,16 @@ public class AddToHomeScreenPromotion ex
         }
 
         if (isTabsTrayVisible()) {
             // We only want to show this prompt if this tab is in the foreground and not on top
             // of the tabs tray.
             return;
         }
 
-        // Temporary remove add to home screen
-        if (AppConstants.Versions.feature26Plus) {
-            return;
-        }
-
         ThreadUtils.postToBackgroundThread(new Runnable() {
             @Override
             public void run() {
                 maybeShowPromotionForUrl(tab.getURL(), tab.getTitle());
             }
         });
     }