[tbb-commits] [tor-browser/tor-browser-60.6.1esr-8.5-1] Bug 30086 - Prevent Sync-related crashes on Android
gk at torproject.org
gk at torproject.org
Thu Apr 25 20:18:31 UTC 2019
commit 128f8ebdc9d460f4df550b5977ef30bd6ff4e302
Author: Matthew Finkel <Matthew.Finkel at gmail.com>
Date: Wed Apr 24 16:37:03 2019 +0000
Bug 30086 - Prevent Sync-related crashes on Android
---
.../java/org/mozilla/gecko/home/CombinedHistoryPanel.java | 14 ++++++++++----
.../gecko/overlays/service/sharemethods/SendTab.java | 6 ++++--
mobile/android/base/locales/en-US/torbrowser_strings.dtd | 2 ++
mobile/android/base/strings.xml.in | 2 ++
4 files changed, 18 insertions(+), 6 deletions(-)
diff --git a/mobile/android/base/java/org/mozilla/gecko/home/CombinedHistoryPanel.java b/mobile/android/base/java/org/mozilla/gecko/home/CombinedHistoryPanel.java
index 6d00268432a5..a35b3ab53e87 100644
--- a/mobile/android/base/java/org/mozilla/gecko/home/CombinedHistoryPanel.java
+++ b/mobile/android/base/java/org/mozilla/gecko/home/CombinedHistoryPanel.java
@@ -234,10 +234,16 @@ public class CombinedHistoryPanel extends HomeFragment implements RemoteClientsD
syncSetupButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
- Telemetry.sendUIEvent(TelemetryContract.Event.ACTION, TelemetryContract.Method.BUTTON, "history_syncsetup");
- // This Activity will redirect to the correct Activity as needed.
- final Intent intent = new Intent(FxAccountConstants.ACTION_FXA_GET_STARTED);
- startActivity(intent);
+ // Tell the user this action is not supported
+ final AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(getActivity());
+ dialogBuilder.setMessage(R.string.sync_not_supported);
+ dialogBuilder.setNegativeButton(R.string.button_cancel, new AlertDialog.OnClickListener() {
+ @Override
+ public void onClick(final DialogInterface dialog, final int which) {
+ dialog.dismiss();
+ }
+ });
+ dialogBuilder.show();
}
});
diff --git a/mobile/android/base/java/org/mozilla/gecko/overlays/service/sharemethods/SendTab.java b/mobile/android/base/java/org/mozilla/gecko/overlays/service/sharemethods/SendTab.java
index 9382c2ec15f9..5babb74c4f88 100644
--- a/mobile/android/base/java/org/mozilla/gecko/overlays/service/sharemethods/SendTab.java
+++ b/mobile/android/base/java/org/mozilla/gecko/overlays/service/sharemethods/SendTab.java
@@ -165,7 +165,8 @@ public class SendTab extends ShareMethod {
}
// Have registered UIs offer to set up a Firefox Account.
- setOverrideIntentAction(FxAccountConstants.ACTION_FXA_GET_STARTED);
+ // Comment for Tor Browser
+ //setOverrideIntentAction(FxAccountConstants.ACTION_FXA_GET_STARTED);
}
/**
@@ -187,7 +188,8 @@ public class SendTab extends ShareMethod {
if (validGUIDs.isEmpty()) {
// Guess we'd better override. We have no clients.
// This does the broadcast for us.
- setOverrideIntentAction(FxAccountConstants.ACTION_FXA_GET_STARTED);
+ // Comment for Tor Browser
+ //setOverrideIntentAction(FxAccountConstants.ACTION_FXA_GET_STARTED);
return;
}
diff --git a/mobile/android/base/locales/en-US/torbrowser_strings.dtd b/mobile/android/base/locales/en-US/torbrowser_strings.dtd
index 44b4a44ff93c..36cff09ee3c3 100644
--- a/mobile/android/base/locales/en-US/torbrowser_strings.dtd
+++ b/mobile/android/base/locales/en-US/torbrowser_strings.dtd
@@ -55,3 +55,5 @@
<!ENTITY pref_tor_network_using_a_provided_bridge "You\'re using &formatS; bridge.">
<!ENTITY tor_notify_user_about_error "An error occurred, please swipe for more information.">
+
+<!ENTITY sync_not_supported "Sync is not currently supported in Tor Browser on Android">
diff --git a/mobile/android/base/strings.xml.in b/mobile/android/base/strings.xml.in
index eaa902b95060..327755ef68f3 100644
--- a/mobile/android/base/strings.xml.in
+++ b/mobile/android/base/strings.xml.in
@@ -111,6 +111,8 @@
<string name="pref_tor_network_using_multiple_provided_bridges">&pref_tor_network_using_multiple_provided_bridges;</string>
<string name="pref_tor_network_using_a_provided_bridge">&pref_tor_network_using_a_provided_bridge;</string>
+ <string name="sync_not_supported">&sync_not_supported;</string>
+
<string name="bookmarks_title">&bookmarks_title;</string>
<string name="history_title">&history_title;</string>
More information about the tbb-commits
mailing list