Skip to content
Snippets Groups Projects
Commit d594b09f authored by Phil Ringnalda's avatar Phil Ringnalda
Browse files

Backed out 7 changesets (bug 1209967) for making Android Talos hang

CLOSED TREE

Backed out changeset e78763a5c2c3 (bug 1209967)
Backed out changeset cdd9b2d4b72a (bug 1209967)
Backed out changeset ced2c85d9f09 (bug 1209967)
Backed out changeset d458396e6f06 (bug 1209967)
Backed out changeset 5cea26659e0d (bug 1209967)
Backed out changeset 035f6f5db4fe (bug 1209967)
Backed out changeset 7942bfbde7f2 (bug 1209967)

--HG--
rename : mobile/android/base/resources/drawable-hdpi-v11/ic_menu_back.png => mobile/android/base/resources/drawable-hdpi/ic_menu_back.png
rename : mobile/android/base/resources/drawable-xhdpi-v11/ic_menu_back.png => mobile/android/base/resources/drawable-xhdpi/ic_menu_back.png
parent a982a98c
No related branches found
No related tags found
No related merge requests found
Showing
with 31 additions and 51 deletions
...@@ -3027,6 +3027,7 @@ public class BrowserApp extends GeckoApp ...@@ -3027,6 +3027,7 @@ public class BrowserApp extends GeckoApp
bookmark.setVisible(!inGuestMode); bookmark.setVisible(!inGuestMode);
bookmark.setCheckable(true); bookmark.setCheckable(true);
bookmark.setChecked(tab.isBookmark()); bookmark.setChecked(tab.isBookmark());
bookmark.setIcon(resolveBookmarkIconID(tab.isBookmark()));
bookmark.setTitle(resolveBookmarkTitleID(tab.isBookmark())); bookmark.setTitle(resolveBookmarkTitleID(tab.isBookmark()));
reader.setEnabled(isAboutReader || !AboutPages.isAboutPage(tab.getURL())); reader.setEnabled(isAboutReader || !AboutPages.isAboutPage(tab.getURL()));
...@@ -3034,14 +3035,9 @@ public class BrowserApp extends GeckoApp ...@@ -3034,14 +3035,9 @@ public class BrowserApp extends GeckoApp
reader.setCheckable(true); reader.setCheckable(true);
final boolean isPageInReadingList = tab.isInReadingList(); final boolean isPageInReadingList = tab.isInReadingList();
reader.setChecked(isPageInReadingList); reader.setChecked(isPageInReadingList);
reader.setIcon(resolveReadingListIconID(isPageInReadingList));
reader.setTitle(resolveReadingListTitleID(isPageInReadingList)); reader.setTitle(resolveReadingListTitleID(isPageInReadingList));
if (Versions.feature11Plus) {
// We don't use icons on GB builds so not resolving icons might conserve resources.
bookmark.setIcon(resolveBookmarkIconID(tab.isBookmark()));
reader.setIcon(resolveReadingListIconID(isPageInReadingList));
}
back.setEnabled(tab.canDoBack()); back.setEnabled(tab.canDoBack());
forward.setEnabled(tab.canDoForward()); forward.setEnabled(tab.canDoForward());
desktopMode.setChecked(tab.getDesktopMode()); desktopMode.setChecked(tab.getDesktopMode());
...@@ -3233,19 +3229,13 @@ public class BrowserApp extends GeckoApp ...@@ -3233,19 +3229,13 @@ public class BrowserApp extends GeckoApp
if (item.isChecked()) { if (item.isChecked()) {
Telemetry.sendUIEvent(TelemetryContract.Event.UNSAVE, TelemetryContract.Method.MENU, "bookmark"); Telemetry.sendUIEvent(TelemetryContract.Event.UNSAVE, TelemetryContract.Method.MENU, "bookmark");
tab.removeBookmark(); tab.removeBookmark();
item.setIcon(resolveBookmarkIconID(false));
item.setTitle(resolveBookmarkTitleID(false)); item.setTitle(resolveBookmarkTitleID(false));
if (Versions.feature11Plus) {
// We don't use icons on GB builds so not resolving icons might conserve resources.
item.setIcon(resolveBookmarkIconID(false));
}
} else { } else {
Telemetry.sendUIEvent(TelemetryContract.Event.SAVE, TelemetryContract.Method.MENU, "bookmark"); Telemetry.sendUIEvent(TelemetryContract.Event.SAVE, TelemetryContract.Method.MENU, "bookmark");
tab.addBookmark(); tab.addBookmark();
item.setIcon(resolveBookmarkIconID(true));
item.setTitle(resolveBookmarkTitleID(true)); item.setTitle(resolveBookmarkTitleID(true));
if (Versions.feature11Plus) {
// We don't use icons on GB builds so not resolving icons might conserve resources.
item.setIcon(resolveBookmarkIconID(true));
}
} }
} }
return true; return true;
...@@ -3257,19 +3247,13 @@ public class BrowserApp extends GeckoApp ...@@ -3257,19 +3247,13 @@ public class BrowserApp extends GeckoApp
if (item.isChecked()) { if (item.isChecked()) {
Telemetry.sendUIEvent(TelemetryContract.Event.UNSAVE, TelemetryContract.Method.MENU, "reading_list"); Telemetry.sendUIEvent(TelemetryContract.Event.UNSAVE, TelemetryContract.Method.MENU, "reading_list");
tab.removeFromReadingList(); tab.removeFromReadingList();
item.setIcon(resolveReadingListIconID(false));
item.setTitle(resolveReadingListTitleID(false)); item.setTitle(resolveReadingListTitleID(false));
if (Versions.feature11Plus) {
// We don't use icons on GB builds so not resolving icons might conserve resources.
item.setIcon(resolveReadingListIconID(false));
}
} else { } else {
Telemetry.sendUIEvent(TelemetryContract.Event.SAVE, TelemetryContract.Method.MENU, "reading_list"); Telemetry.sendUIEvent(TelemetryContract.Event.SAVE, TelemetryContract.Method.MENU, "reading_list");
tab.addToReadingList(); tab.addToReadingList();
item.setIcon(resolveReadingListIconID(true));
item.setTitle(resolveReadingListTitleID(true)); item.setTitle(resolveReadingListTitleID(true));
if (Versions.feature11Plus) {
// We don't use icons on GB builds so not resolving icons might conserve resources.
item.setIcon(resolveReadingListIconID(true));
}
} }
} }
return true; return true;
......
...@@ -348,7 +348,11 @@ public abstract class GeckoApp ...@@ -348,7 +348,11 @@ public abstract class GeckoApp
@Override @Override
public MenuInflater getMenuInflater() { public MenuInflater getMenuInflater() {
return new GeckoMenuInflater(this); if (Versions.feature11Plus) {
return new GeckoMenuInflater(this);
} else {
return super.getMenuInflater();
}
} }
public MenuPanel getMenuPanel() { public MenuPanel getMenuPanel() {
...@@ -399,7 +403,7 @@ public abstract class GeckoApp ...@@ -399,7 +403,7 @@ public abstract class GeckoApp
@Override @Override
public View onCreatePanelView(int featureId) { public View onCreatePanelView(int featureId) {
if (featureId == Window.FEATURE_OPTIONS_PANEL) { if (Versions.feature11Plus && featureId == Window.FEATURE_OPTIONS_PANEL) {
if (mMenuPanel == null) { if (mMenuPanel == null) {
mMenuPanel = new MenuPanel(this, null); mMenuPanel = new MenuPanel(this, null);
} else { } else {
...@@ -415,7 +419,7 @@ public abstract class GeckoApp ...@@ -415,7 +419,7 @@ public abstract class GeckoApp
@Override @Override
public boolean onCreatePanelMenu(int featureId, Menu menu) { public boolean onCreatePanelMenu(int featureId, Menu menu) {
if (featureId == Window.FEATURE_OPTIONS_PANEL) { if (Versions.feature11Plus && featureId == Window.FEATURE_OPTIONS_PANEL) {
if (mMenuPanel == null) { if (mMenuPanel == null) {
mMenuPanel = (MenuPanel) onCreatePanelView(featureId); mMenuPanel = (MenuPanel) onCreatePanelView(featureId);
} }
...@@ -434,7 +438,7 @@ public abstract class GeckoApp ...@@ -434,7 +438,7 @@ public abstract class GeckoApp
@Override @Override
public boolean onPreparePanel(int featureId, View view, Menu menu) { public boolean onPreparePanel(int featureId, View view, Menu menu) {
if (featureId == Window.FEATURE_OPTIONS_PANEL) { if (Versions.feature11Plus && featureId == Window.FEATURE_OPTIONS_PANEL) {
return onPrepareOptionsMenu(menu); return onPrepareOptionsMenu(menu);
} }
...@@ -448,7 +452,7 @@ public abstract class GeckoApp ...@@ -448,7 +452,7 @@ public abstract class GeckoApp
GeckoAppShell.sendEventToGecko(GeckoEvent.createBroadcastEvent("FullScreen:Exit", null)); GeckoAppShell.sendEventToGecko(GeckoEvent.createBroadcastEvent("FullScreen:Exit", null));
} }
if (featureId == Window.FEATURE_OPTIONS_PANEL) { if (Versions.feature11Plus && featureId == Window.FEATURE_OPTIONS_PANEL) {
if (mMenu == null) { if (mMenu == null) {
// getMenuPanel() will force the creation of the menu as well // getMenuPanel() will force the creation of the menu as well
MenuPanel panel = getMenuPanel(); MenuPanel panel = getMenuPanel();
...@@ -513,8 +517,10 @@ public abstract class GeckoApp ...@@ -513,8 +517,10 @@ public abstract class GeckoApp
@Override @Override
public void onOptionsMenuClosed(Menu menu) { public void onOptionsMenuClosed(Menu menu) {
mMenuPanel.removeAllViews(); if (Versions.feature11Plus) {
mMenuPanel.addView((GeckoMenu) mMenu); mMenuPanel.removeAllViews();
mMenuPanel.addView((GeckoMenu) mMenu);
}
} }
@Override @Override
......
mobile/android/base/resources/drawable-hdpi/ic_menu_bookmark_add.png

1.12 KiB

mobile/android/base/resources/drawable-hdpi/ic_menu_bookmark_remove.png

1.67 KiB

mobile/android/base/resources/drawable-hdpi/ic_menu_forward.png

606 B

mobile/android/base/resources/drawable-hdpi/ic_menu_new_private_tab.png

1.16 KiB

mobile/android/base/resources/drawable-hdpi/ic_menu_new_tab.png

480 B

mobile/android/base/resources/drawable-hdpi/ic_menu_reload.png

1.12 KiB

mobile/android/base/resources/drawable-xhdpi/ic_menu_bookmark_add.png

1.71 KiB

mobile/android/base/resources/drawable-xhdpi/ic_menu_bookmark_remove.png

2.13 KiB

mobile/android/base/resources/drawable-xhdpi/ic_menu_forward.png

790 B

mobile/android/base/resources/drawable-xhdpi/ic_menu_new_private_tab.png

1.56 KiB

mobile/android/base/resources/drawable-xhdpi/ic_menu_new_tab.png

620 B

mobile/android/base/resources/drawable-xhdpi/ic_menu_reload.png

1.6 KiB

<?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/. -->
<!-- This asset is properly available in large-* dirs so this null
reference exists for build time on API 9 builds. -->
<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
android:src="@null"/>
<?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/. -->
<!-- This asset is properly available in large-* dirs so this null
reference exists for build time on API 9 builds. -->
<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
android:src="@null"/>
...@@ -3,5 +3,9 @@ ...@@ -3,5 +3,9 @@
- License, v. 2.0. If a copy of the MPL was not distributed with this - 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/. --> - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<bitmap xmlns:android="http://schemas.android.com/apk/res/android" <shape xmlns:android="http://schemas.android.com/apk/res/android"
android:src="@null"/> android:shape="rectangle">
<solid android:color="@android:color/transparent"/>
</shape>
...@@ -3,5 +3,9 @@ ...@@ -3,5 +3,9 @@
- License, v. 2.0. If a copy of the MPL was not distributed with this - 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/. --> - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<bitmap xmlns:android="http://schemas.android.com/apk/res/android" <shape xmlns:android="http://schemas.android.com/apk/res/android"
android:src="@null"/> android:shape="rectangle">
<solid android:color="@android:color/transparent"/>
</shape>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment