Bug 1259078 - Post: remove unneeded reading list panel resources and code r?liuche
MozReview-Commit-ID: Yoghq4MQRc
deleted file mode 100644
--- a/mobile/android/base/java/org/mozilla/gecko/home/ReadingListPanel.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/* -*- Mode: Java; c-basic-offset: 4; tab-width: 20; indent-tabs-mode: nil; -*-
- * 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/. */
-
-package org.mozilla.gecko.home;
-
-import android.os.Bundle;
-
-import java.util.EnumSet;
-import java.util.Locale;
-
-import org.mozilla.gecko.AppConstants;
-import org.mozilla.gecko.GeckoSharedPrefs;
-import org.mozilla.gecko.Locales;
-import org.mozilla.gecko.R;
-import org.mozilla.gecko.SnackbarHelper;
-
-import android.support.design.widget.Snackbar;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
-
-/**
- * Fragment that used to display reading list contents in a ListView, and now directs
- * users to Bookmarks to view their former reading-list content.
- */
-public class ReadingListPanel extends HomeFragment {
-
- @Override
- public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstance) {
- final ViewGroup root = (ViewGroup) inflater.inflate(R.layout.readinglistpanel_gone_fragment, container, false);
-
- // We could update the ID names - however this panel is only intended to be live for one
- // release, hence there's little utility in optimising this code.
- root.findViewById(R.id.welcome_account).setOnClickListener(new View.OnClickListener() {
- @Override
- public void onClick(View v) {
- boolean bookmarksEnabled = GeckoSharedPrefs.forProfile(getContext()).getBoolean(HomeConfig.PREF_KEY_BOOKMARKS_PANEL_ENABLED, true);
-
- if (bookmarksEnabled) {
- mUrlOpenListener.onUrlOpen("about:home?panel=" + HomeConfig.getIdForBuiltinPanelType(HomeConfig.PanelType.BOOKMARKS),
- EnumSet.noneOf(HomePager.OnUrlOpenListener.Flags.class));
- } else {
- SnackbarHelper.showSnackbar(getActivity(),
- getResources().getString(R.string.reading_list_migration_bookmarks_hidden),
- Snackbar.LENGTH_LONG);
- }
- }
- });
-
- root.findViewById(R.id.welcome_browse).setOnClickListener(new View.OnClickListener() {
- @Override
- public void onClick(View v) {
- final String link = getString(R.string.migrated_reading_list_url,
- AppConstants.MOZ_APP_VERSION,
- AppConstants.OS_TARGET,
- Locales.getLanguageTag(Locale.getDefault()));
-
- mUrlOpenListener.onUrlOpen(link,
- EnumSet.noneOf(HomePager.OnUrlOpenListener.Flags.class));
- }
- });
-
- return root;
- }
-
- @Override
- protected void load() {
- // Must be overriden, but we're not doing any loading hence no real implementation...
- }
-}
--- a/mobile/android/base/locales/en-US/android_strings.dtd
+++ b/mobile/android/base/locales/en-US/android_strings.dtd
@@ -19,26 +19,20 @@
<!ENTITY firstrun_sync_subtext "Sync your tabs, passwords, and more everywhere you use it.">
<!ENTITY firstrun_signin_message "Get connected, get started">
<!ENTITY firstrun_signin_button "Sign in to Sync">
<!ENTITY onboard_start_button_browser "Start Browsing">
<!ENTITY firstrun_button_next "Next">
<!ENTITY onboard_start_restricted1 "Stay safe and in control with this simplified version of &brandShortName;.">
-<!ENTITY reading_list_migration_title "Reading List connected">
-<!ENTITY reading_list_migration_subtext "Your Reading List items will now be added to your Bookmarks">
-<!ENTITY reading_list_migration_goto_bookmarks "Go to Bookmarks">
-<!ENTITY reading_list_migration_bookmarks_hidden "Your Bookmarks panel is hidden">
-
<!-- Localization note: These are used as the titles of different pages on the home screen.
They are automatically converted to all caps by the Android platform. -->
<!ENTITY bookmarks_title "Bookmarks">
<!ENTITY history_title "History">
-<!ENTITY reading_list_title "Reading List">
<!ENTITY recent_tabs_title "Recent Tabs">
<!ENTITY switch_to_tab "Switch to tab">
<!ENTITY crash_reporter_title "&brandShortName; Crash Reporter">
<!ENTITY crash_message2 "&brandShortName; had a problem and crashed. Your tabs should be listed on the &brandShortName; Start page when you restart.">
<!ENTITY crash_send_report_message3 "Tell &vendorShortName; about this crash so they can fix it">
<!ENTITY crash_include_url2 "Include the address of the page I was on">
--- a/mobile/android/base/moz.build
+++ b/mobile/android/base/moz.build
@@ -419,17 +419,16 @@ gbjar.sources += ['java/org/mozilla/geck
'home/PanelLayout.java',
'home/PanelListView.java',
'home/PanelRecyclerView.java',
'home/PanelRecyclerViewAdapter.java',
'home/PanelRefreshLayout.java',
'home/PanelViewAdapter.java',
'home/PanelViewItemHandler.java',
'home/PinSiteDialog.java',
- 'home/ReadingListPanel.java',
'home/RecentTabsPanel.java',
'home/RemoteTabsExpandableListState.java',
'home/SearchEngine.java',
'home/SearchEngineAdapter.java',
'home/SearchEngineBar.java',
'home/SearchEngineRow.java',
'home/SearchLoader.java',
'home/SimpleCursorLoader.java',
deleted file mode 100644
index 69af116f2e23546f55ff9704d19268c7ea124f1d..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index cab7f2a3602653ecf593bec66fdbb4f562b75e6f..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index f81bbb0ab76370cc3383397285b64c7ad5f6ab1e..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
--- a/mobile/android/base/resources/layout/readinglistpanel_gone_fragment.xml
+++ /dev/null
@@ -1,58 +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/. -->
-
-
-<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_height="wrap_content"
- android:layout_width="match_parent"
- android:orientation="vertical"
- android:fillViewport="true">
-
- <LinearLayout android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:minHeight="@dimen/firstrun_min_height"
- android:gravity="center_horizontal"
- android:orientation="vertical">
-
- <ImageView android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginTop="40dp"
- android:layout_marginBottom="40dp"
- android:scaleType="fitCenter"
- android:layout_gravity="center"
- android:adjustViewBounds="true"
- android:src="@drawable/reading_list_migration"/>
-
- <TextView android:layout_width="@dimen/firstrun_content_width"
- android:layout_height="wrap_content"
- android:gravity="center"
- android:textAppearance="@style/TextAppearance.FirstrunLight.Main"
- android:text="@string/reading_list_migration_title"/>
-
- <TextView android:id="@+id/firstrun_subtext"
- android:layout_width="@dimen/firstrun_content_width"
- android:layout_height="wrap_content"
- android:paddingTop="20dp"
- android:paddingBottom="30dp"
- android:gravity="center"
- android:text="@string/reading_list_migration_subtext"
- android:textAppearance="@style/TextAppearance.FirstrunRegular.Body"
- android:singleLine="false"/>
-
- <Button android:id="@+id/welcome_account"
- style="@style/Widget.Firstrun.Button"
- android:background="@drawable/button_background_action_orange_round"
- android:layout_gravity="center"
- android:text="@string/reading_list_migration_goto_bookmarks"/>
-
- <TextView android:id="@+id/welcome_browse"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:padding="16dp"
- android:gravity="center"
- android:textAppearance="@style/TextAppearance.FirstrunRegular.Link"
- android:text="@string/pref_learn_more"/>
- </LinearLayout>
-</ScrollView>
--- a/mobile/android/base/strings.xml.in
+++ b/mobile/android/base/strings.xml.in
@@ -48,22 +48,18 @@
<string name="firstrun_signin_button">&firstrun_signin_button;</string>
<string name="firstrun_welcome_button_browser">&onboard_start_button_browser;</string>
<string name="firstrun_button_next">&firstrun_button_next;</string>
<string name="firstrun_welcome_restricted">&onboard_start_restricted1;</string>
<string name="bookmarks_title">&bookmarks_title;</string>
<string name="history_title">&history_title;</string>
- <string name="reading_list_title">&reading_list_title;</string>
<string name="recent_tabs_title">&recent_tabs_title;</string>
- <!-- https://support.mozilla.org/1/mobile/%VERSION%/%OS%/%LOCALE%/reading-list -->
- <string name="migrated_reading_list_url">https://support.mozilla.org/1/mobile/&formatS1;/&formatS2;/&formatS3;/reading-list</string>
-
<string name="switch_to_tab">&switch_to_tab;</string>
<string name="crash_reporter_title">&crash_reporter_title;</string>
<string name="crash_message2">&crash_message2;</string>
<string name="crash_send_report_message3">&crash_send_report_message3;</string>
<string name="crash_include_url2">&crash_include_url2;</string>
<string name="crash_sorry">&crash_sorry;</string>
<string name="crash_comment">&crash_comment;</string>
@@ -368,21 +364,16 @@
<string name="tabs_normal">&tabs_normal;</string>
<string name="tabs_private">&tabs_private;</string>
<string name="edit_mode_cancel">&edit_mode_cancel;</string>
<string name="site_settings_title">&site_settings_title3;</string>
<string name="site_settings_cancel">&site_settings_cancel;</string>
<string name="site_settings_clear">&site_settings_clear;</string>
- <string name="reading_list_migration_title">&reading_list_migration_title;</string>
- <string name="reading_list_migration_subtext">&reading_list_migration_subtext;</string>
- <string name="reading_list_migration_goto_bookmarks">&reading_list_migration_goto_bookmarks;</string>
- <string name="reading_list_migration_bookmarks_hidden">&reading_list_migration_bookmarks_hidden;</string>
-
<string name="page_action_dropmarker_description">&page_action_dropmarker_description;</string>
<string name="contextmenu_open_new_tab">&contextmenu_open_new_tab;</string>
<string name="contextmenu_open_private_tab">&contextmenu_open_private_tab;</string>
<string name="contextmenu_remove">&contextmenu_remove;</string>
<string name="contextmenu_add_to_launcher">&contextmenu_add_to_launcher;</string>
<string name="contextmenu_share">&contextmenu_share;</string>
<string name="contextmenu_pasteandgo">&contextmenu_pasteandgo;</string>
--- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/StringHelper.java
+++ b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/StringHelper.java
@@ -112,17 +112,16 @@ public class StringHelper {
public final String BRAND_NAME = "(Fennec|Nightly|Aurora|Firefox Beta|Firefox)";
public final String ABOUT_LABEL = "About " + BRAND_NAME ;
public final String LOCATION_SERVICES_LABEL = "Mozilla Location Service";
// Labels for the about:home tabs
public final String HISTORY_LABEL;
public final String TOP_SITES_LABEL;
public final String BOOKMARKS_LABEL;
- public final String READING_LIST_LABEL;
public final String TODAY_LABEL;
// Desktop default bookmarks folders
public final String BOOKMARKS_UP_TO;
public final String BOOKMARKS_ROOT_LABEL;
public final String DESKTOP_FOLDER_LABEL;
public final String TOOLBAR_FOLDER_LABEL;
public final String BOOKMARKS_MENU_FOLDER_LABEL;
@@ -285,17 +284,16 @@ public class StringHelper {
// Settings menu strings
PRIVACY_SECTION_LABEL = res.getString(R.string.pref_category_privacy_short);
MOZILLA_SECTION_LABEL = res.getString(R.string.pref_category_vendor);
// Labels for the about:home tabs
HISTORY_LABEL = res.getString(R.string.home_history_title);
TOP_SITES_LABEL = res.getString(R.string.home_top_sites_title);
BOOKMARKS_LABEL = res.getString(R.string.bookmarks_title);
- READING_LIST_LABEL = res.getString(R.string.reading_list_title);
TODAY_LABEL = res.getString(R.string.history_today_section);
BOOKMARKS_UP_TO = res.getString(R.string.home_move_back_to_filter);
BOOKMARKS_ROOT_LABEL = res.getString(R.string.bookmarks_title);
DESKTOP_FOLDER_LABEL = res.getString(R.string.bookmarks_folder_desktop);
TOOLBAR_FOLDER_LABEL = res.getString(R.string.bookmarks_folder_toolbar);
BOOKMARKS_MENU_FOLDER_LABEL = res.getString(R.string.bookmarks_folder_menu);
UNSORTED_FOLDER_LABEL = res.getString(R.string.bookmarks_folder_unfiled);
--- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/components/AboutHomeComponent.java
+++ b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/components/AboutHomeComponent.java
@@ -30,17 +30,17 @@ import com.robotium.solo.Solo;
*/
public class AboutHomeComponent extends BaseComponent {
private static final String LOGTAG = AboutHomeComponent.class.getSimpleName();
private static final List<PanelType> PANEL_ORDERING = Arrays.asList(
PanelType.TOP_SITES,
PanelType.BOOKMARKS,
PanelType.COMBINED_HISTORY,
- PanelType.RECENT_TABS,
+ PanelType.RECENT_TABS
);
// The percentage of the panel to swipe between 0 and 1. This value was set through
// testing: 0.55f was tested on try and fails on armv6 devices.
private static final float SWIPE_PERCENTAGE = 0.70f;
public AboutHomeComponent(final UITestContext testContext) {
super(testContext);
--- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testShareLink.java
+++ b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testShareLink.java
@@ -29,17 +29,17 @@ public class testShareLink extends About
String urlTitle = mStringHelper.ROBOCOP_BIG_LINK_TITLE;
public void testShareLink() {
url = getAbsoluteUrl(mStringHelper.ROBOCOP_BIG_LINK_URL);
ArrayList<String> shareOptions;
blockForGeckoReady();
// FIXME: This is a temporary hack workaround for a permissions problem.
- openAboutHomeTab(AboutHomeTabs.READING_LIST);
+ openAboutHomeTab(AboutHomeTabs.HISTORY);
inputAndLoadUrl(url);
verifyUrlBarTitle(url); // Waiting for page title to ensure the page is loaded
selectMenuItem(mStringHelper.SHARE_LABEL);
if (Build.VERSION.SDK_INT >= 14) {
// Check for our own sync in the submenu.
waitForText("Sync$");