lists.torproject.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

tbb-commits

Thread Start a new thread
Threads by month
  • ----- 2025 -----
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2021 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2020 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2019 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2018 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2017 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2016 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2015 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2014 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
tbb-commits@lists.torproject.org

  • 1 participants
  • 19502 discussions
[tor-browser/tor-browser-52.7.2esr-8.0-1] Bug 23439: Exempt .onion domains from mixed content warnings
by gk@torproject.org 21 Mar '18

21 Mar '18
commit 1316acb053d6191176e9ae4e4f502415b068525e Author: Georg Koppen <gk(a)torproject.org> Date: Wed Mar 21 08:21:01 2018 +0000 Bug 23439: Exempt .onion domains from mixed content warnings Tests --- browser/base/content/test/general/browser.ini | 4 +++ .../test/general/browser_no_mcb_for_onions.js | 39 ++++++++++++++++++++++ .../test/general/test_no_mcb_for_onions.html | 28 ++++++++++++++++ 3 files changed, 71 insertions(+) diff --git a/browser/base/content/test/general/browser.ini b/browser/base/content/test/general/browser.ini index 96e591ffea7b..321e444c2cde 100644 --- a/browser/base/content/test/general/browser.ini +++ b/browser/base/content/test/general/browser.ini @@ -492,3 +492,7 @@ tags = mcb [browser_newwindow_focus.js] skip-if = (os == "linux" && !e10s) # Bug 1263254 - Perma fails on Linux without e10s for some reason. [browser_bug1299667.js] +[browser_no_mcb_for_onions.js] +tags = mcb +support-files = + test_no_mcb_for_onions.html diff --git a/browser/base/content/test/general/browser_no_mcb_for_onions.js b/browser/base/content/test/general/browser_no_mcb_for_onions.js new file mode 100644 index 000000000000..8023b78276f3 --- /dev/null +++ b/browser/base/content/test/general/browser_no_mcb_for_onions.js @@ -0,0 +1,39 @@ +/* Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/publicdomain/zero/1.0/ */ + +// The test loads a HTTPS web page with active content from HTTP .onion URLs +// and makes sure that the mixed content flags on the docshell are not set. +// +// Note that the URLs referenced within the test page intentionally use the +// unassigned port 8 because we don't want to actually load anything, we just +// want to check that the URLs are not blocked. + +const TEST_URL = getRootDirectory(gTestPath).replace("chrome://mochitests/content", "https://example.com") + "test_no_mcb_for_onions.html"; + +const PREF_BLOCK_DISPLAY = "security.mixed_content.block_display_content"; +const PREF_BLOCK_ACTIVE = "security.mixed_content.block_active_content"; +const PREF_ONION_WHITELIST = "dom.securecontext.whitelist_onions"; + +add_task(async function allowOnionMixedContent() { + registerCleanupFunction(function() { + gBrowser.removeCurrentTab(); + }); + + await SpecialPowers.pushPrefEnv({set: [[PREF_BLOCK_DISPLAY, true]]}); + await SpecialPowers.pushPrefEnv({set: [[PREF_BLOCK_ACTIVE, true]]}); + await SpecialPowers.pushPrefEnv({set: [[PREF_ONION_WHITELIST, true]]}); + + const tab = await BrowserTestUtils.openNewForegroundTab(gBrowser, TEST_URL); + const browser = gBrowser.getBrowserForTab(tab); + + await ContentTask.spawn(browser, null, function() { + is(docShell.hasMixedDisplayContentBlocked, false, "hasMixedDisplayContentBlocked not set"); + is(docShell.hasMixedActiveContentBlocked, false, "hasMixedActiveContentBlocked not set"); + }); + + await assertMixedContentBlockingState(browser, { + activeBlocked: false, + activeLoaded: false, + passiveLoaded: false, + }); +}); diff --git a/browser/base/content/test/general/test_no_mcb_for_onions.html b/browser/base/content/test/general/test_no_mcb_for_onions.html new file mode 100644 index 000000000000..9715d526bf87 --- /dev/null +++ b/browser/base/content/test/general/test_no_mcb_for_onions.html @@ -0,0 +1,28 @@ +<!-- See browser_no_mcb_for_onions.js --> +<!DOCTYPE HTML> +<html> + <head> + <meta charset="utf8"> + <title>Bug 1382359</title> + </head> + + <style> + @font-face { + src: url("http://123456789abcdef.onion:8/test.ttf"); + } + </style> + + <body> + <img src="http://123456789abcdef.onion:8/test.png"> + + <iframe src="http://123456789abcdef.onion:8/test.html"></iframe> + </body> + + <script src="http://123456789abcdef.onion:8/test.js"></script> + + <link href="http://123456789abcdef.onion:8/test.css" rel="stylesheet"></link> + + <script> + fetch("http://123456789abcdef.onion:8"); + </script> +</html>
1 0
0 0
[tor-browser/tor-browser-52.7.2esr-8.0-1] fix #17 from https://github.com/amoghbl1/tor-browser/issues don't restore tabs by default
by gk@torproject.org 20 Mar '18

20 Mar '18
commit e311353ec9e015992ae672834cfa9de796cb0ece Author: n8fr8 <nathan(a)freitas.net> Date: Mon Jul 17 13:33:42 2017 -0400 fix #17 from https://github.com/amoghbl1/tor-browser/issues don't restore tabs by default fix #11 from https://github.com/amoghbl1/tor-browser/issues turn off health report by default search history disabled by default fixes #12 sets private data to clear by default disable camera permissions as part of WebRTC disable #15 more work on #15 to remove permissions disable search history for v11+ as well work on #15 to disable location permissions ensure search history is off by default make sure voice and qr is disabled by default make sure autoplay is off by default Signed-off-by: Amogh Pradeep <amoghbl1(a)gmail.com> --- .../android/base/FennecManifest_permissions.xml.in | 12 ++++++++++- .../java/org/mozilla/gecko/home/BrowserSearch.java | 2 +- .../org/mozilla/gecko/home/SearchEngineRow.java | 2 +- .../mozilla/gecko/toolbar/ToolbarEditLayout.java | 4 ++-- mobile/android/base/resources/values/arrays.xml | 24 +++++++++++----------- .../base/resources/xml-v11/preferences_search.xml | 2 +- .../base/resources/xml/preferences_advanced.xml | 6 ++++-- .../base/resources/xml/preferences_privacy.xml | 2 +- .../base/resources/xml/preferences_search.xml | 2 +- .../android/geckoview/src/main/AndroidManifest.xml | 4 ++++ mobile/android/modules/RuntimePermissions.jsm | 2 +- .../SearchAndroidManifest_permissions.xml.in | 2 ++ modules/libpref/init/all.js | 2 +- 13 files changed, 42 insertions(+), 24 deletions(-) diff --git a/mobile/android/base/FennecManifest_permissions.xml.in b/mobile/android/base/FennecManifest_permissions.xml.in index cf3365582cb3..e711ce6a19de 100644 --- a/mobile/android/base/FennecManifest_permissions.xml.in +++ b/mobile/android/base/FennecManifest_permissions.xml.in @@ -17,9 +17,15 @@ (potentially) of the push feature. --> #include GcmAndroidManifest_permissions.xml.in +#ifdef MOZ_WIFI_STATE <uses-permission android:name="android.permission.CHANGE_WIFI_STATE"/> <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/> +#endif + +#ifdef MOZ_LOCATION <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/> +#endif + <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/> <uses-permission android:name="android.permission.INTERNET"/> <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/> @@ -34,12 +40,16 @@ <uses-permission android:name="android.permission.WAKE_LOCK"/> <uses-permission android:name="android.permission.VIBRATE"/> + #ifdef MOZ_ANDROID_DOWNLOADS_INTEGRATION <uses-permission android:name="android.permission.DOWNLOAD_WITHOUT_NOTIFICATION" /> #endif +#ifdef MOZ_LOCATION <uses-feature android:name="android.hardware.location" android:required="false"/> <uses-feature android:name="android.hardware.location.gps" android:required="false"/> +#endif + <uses-feature android:name="android.hardware.touchscreen"/> <!-- Tab Queue --> @@ -56,10 +66,10 @@ <uses-feature android:name="android.hardware.audio.low_latency" android:required="false"/> <uses-feature android:name="android.hardware.camera.any" android:required="false"/> <uses-feature android:name="android.hardware.microphone" android:required="false"/> -#endif <uses-permission android:name="android.permission.CAMERA" /> <uses-feature android:name="android.hardware.camera" android:required="false"/> <uses-feature android:name="android.hardware.camera.autofocus" android:required="false"/> +#endif <!-- App requires OpenGL ES 2.0 --> <uses-feature android:glEsVersion="0x00020000" android:required="true" /> diff --git a/mobile/android/base/java/org/mozilla/gecko/home/BrowserSearch.java b/mobile/android/base/java/org/mozilla/gecko/home/BrowserSearch.java index 7732932fe3e5..4f029fcc331b 100644 --- a/mobile/android/base/java/org/mozilla/gecko/home/BrowserSearch.java +++ b/mobile/android/base/java/org/mozilla/gecko/home/BrowserSearch.java @@ -275,7 +275,7 @@ public class BrowserSearch extends HomeFragment super.onResume(); final SharedPreferences prefs = GeckoSharedPrefs.forApp(getContext()); - mSavedSearchesEnabled = prefs.getBoolean(GeckoPreferences.PREFS_HISTORY_SAVED_SEARCH, true); + mSavedSearchesEnabled = prefs.getBoolean(GeckoPreferences.PREFS_HISTORY_SAVED_SEARCH, false); // Fetch engines if we need to. if (mSearchEngines.isEmpty() || !Locale.getDefault().equals(mLastLocale)) { diff --git a/mobile/android/base/java/org/mozilla/gecko/home/SearchEngineRow.java b/mobile/android/base/java/org/mozilla/gecko/home/SearchEngineRow.java index 5b97a8f5f7e9..39e9bc2865b7 100644 --- a/mobile/android/base/java/org/mozilla/gecko/home/SearchEngineRow.java +++ b/mobile/android/base/java/org/mozilla/gecko/home/SearchEngineRow.java @@ -391,7 +391,7 @@ class SearchEngineRow extends AnimatedHeightLayout { final int recycledSuggestionCount = mSuggestionView.getChildCount(); final SharedPreferences prefs = GeckoSharedPrefs.forApp(getContext()); - final boolean savedSearchesEnabled = prefs.getBoolean(GeckoPreferences.PREFS_HISTORY_SAVED_SEARCH, true); + final boolean savedSearchesEnabled = prefs.getBoolean(GeckoPreferences.PREFS_HISTORY_SAVED_SEARCH, false); // Remove duplicates of search engine suggestions from saved searches. List<String> searchHistorySuggestions = (rawSearchHistorySuggestions != null) ? rawSearchHistorySuggestions : new ArrayList<String>(); diff --git a/mobile/android/base/java/org/mozilla/gecko/toolbar/ToolbarEditLayout.java b/mobile/android/base/java/org/mozilla/gecko/toolbar/ToolbarEditLayout.java index c9731a4014d6..c0cee5eeaadd 100644 --- a/mobile/android/base/java/org/mozilla/gecko/toolbar/ToolbarEditLayout.java +++ b/mobile/android/base/java/org/mozilla/gecko/toolbar/ToolbarEditLayout.java @@ -278,7 +278,7 @@ public class ToolbarEditLayout extends ThemedLinearLayout { return false; } return GeckoSharedPrefs.forApp(context) - .getBoolean(GeckoPreferences.PREFS_VOICE_INPUT_ENABLED, true); + .getBoolean(GeckoPreferences.PREFS_VOICE_INPUT_ENABLED, false); } private void launchVoiceRecognizer() { @@ -315,7 +315,7 @@ public class ToolbarEditLayout extends ThemedLinearLayout { return false; } return GeckoSharedPrefs.forApp(context) - .getBoolean(GeckoPreferences.PREFS_QRCODE_ENABLED, true); + .getBoolean(GeckoPreferences.PREFS_QRCODE_ENABLED, false); } private void launchQRCodeReader() { diff --git a/mobile/android/base/resources/values/arrays.xml b/mobile/android/base/resources/values/arrays.xml index d220ca9bb4e0..8369d817da8d 100644 --- a/mobile/android/base/resources/values/arrays.xml +++ b/mobile/android/base/resources/values/arrays.xml @@ -70,8 +70,8 @@ <item>@string/history_title</item> </string-array> <string-array name="pref_import_android_defaults"> - <item>true</item> - <item>true</item> + <item>false</item> + <item>false</item> </string-array> <string-array name="pref_import_android_values"> <item>android_import.data.bookmarks</item> @@ -126,16 +126,16 @@ <item>private.data.passwords</item> </string-array> <string-array name="pref_clear_on_exit_defaults"> - <item>false</item> - <item>false</item> - <item>false</item> - <item>false</item> - <item>false</item> - <item>false</item> - <item>false</item> - <item>false</item> - <item>false</item> - <item>false</item> + <item>true</item> + <item>true</item> + <item>true</item> + <item>true</item> + <item>true</item> + <item>true</item> + <item>true</item> + <item>true</item> + <item>true</item> + <item>true</item> </string-array> <string-array name="pref_restore_entries"> <item>@string/pref_restore_always</item> diff --git a/mobile/android/base/resources/xml-v11/preferences_search.xml b/mobile/android/base/resources/xml-v11/preferences_search.xml index 937b05b617c6..a58bb7cece44 100644 --- a/mobile/android/base/resources/xml-v11/preferences_search.xml +++ b/mobile/android/base/resources/xml-v11/preferences_search.xml @@ -27,7 +27,7 @@ <CheckBoxPreference android:key="android.not_a_preference.search.search_history.enabled" android:title="@string/pref_history_search_suggestions" - android:defaultValue="true" + android:defaultValue="false" android:persistent="true" /> </PreferenceScreen> diff --git a/mobile/android/base/resources/xml/preferences_advanced.xml b/mobile/android/base/resources/xml/preferences_advanced.xml index 32cdf0b915b5..ca8318b83767 100644 --- a/mobile/android/base/resources/xml/preferences_advanced.xml +++ b/mobile/android/base/resources/xml/preferences_advanced.xml @@ -27,7 +27,7 @@ <ListPreference android:key="android.not_a_preference.restoreSession3" android:title="@string/pref_restore" - android:defaultValue="always" + android:defaultValue="quit" android:entries="@array/pref_restore_entries" android:entryValues="@array/pref_restore_values" android:persistent="true" /> @@ -62,7 +62,9 @@ <SwitchPreference android:key="media.autoplay.enabled" android:title="@string/pref_media_autoplay_enabled" - android:summary="@string/pref_media_autoplay_enabled_summary" /> + android:summary="@string/pref_media_autoplay_enabled_summary" + android:defaultValue="false" + /> </PreferenceCategory> diff --git a/mobile/android/base/resources/xml/preferences_privacy.xml b/mobile/android/base/resources/xml/preferences_privacy.xml index 7b3215cb2665..1d4593ec2523 100644 --- a/mobile/android/base/resources/xml/preferences_privacy.xml +++ b/mobile/android/base/resources/xml/preferences_privacy.xml @@ -99,7 +99,7 @@ <CheckBoxPreference android:key="android.not_a_preference.healthreport.uploadEnabled" android:title="@string/datareporting_fhr_title" android:summary="@string/datareporting_fhr_summary2" - android:defaultValue="true" /> + android:defaultValue="false" /> <org.mozilla.gecko.preferences.AlignRightLinkPreference android:key="android.not_a_preference.healthreport.link" android:title="@string/datareporting_abouthr_title" diff --git a/mobile/android/base/resources/xml/preferences_search.xml b/mobile/android/base/resources/xml/preferences_search.xml index 440167fe5e2a..fc8c258821e1 100644 --- a/mobile/android/base/resources/xml/preferences_search.xml +++ b/mobile/android/base/resources/xml/preferences_search.xml @@ -34,7 +34,7 @@ <CheckBoxPreference android:key="android.not_a_preference.search.search_history.enabled" android:title="@string/pref_history_search_suggestions" - android:defaultValue="true" + android:defaultValue="false" android:persistent="true" /> </PreferenceScreen> diff --git a/mobile/android/geckoview/src/main/AndroidManifest.xml b/mobile/android/geckoview/src/main/AndroidManifest.xml index 4e2aaf447128..8584018cab39 100644 --- a/mobile/android/geckoview/src/main/AndroidManifest.xml +++ b/mobile/android/geckoview/src/main/AndroidManifest.xml @@ -3,7 +3,9 @@ <uses-permission android:name="android.permission.CHANGE_WIFI_STATE"/> <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/> +#ifdef MOZ_LOCATION <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/> +#endif <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/> <uses-permission android:name="android.permission.INTERNET"/> <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/> @@ -18,8 +20,10 @@ <uses-permission android:name="android.permission.WAKE_LOCK"/> <uses-permission android:name="android.permission.VIBRATE"/> +#ifdef MOZ_LOCATION <uses-feature android:name="android.hardware.location" android:required="false"/> <uses-feature android:name="android.hardware.location.gps" android:required="false"/> +#endif <uses-feature android:name="android.hardware.touchscreen"/> <!--#ifdef MOZ_WEBRTC--> diff --git a/mobile/android/modules/RuntimePermissions.jsm b/mobile/android/modules/RuntimePermissions.jsm index 42d8024b1a60..21c6102cafdb 100644 --- a/mobile/android/modules/RuntimePermissions.jsm +++ b/mobile/android/modules/RuntimePermissions.jsm @@ -38,4 +38,4 @@ var RuntimePermissions = { return Messaging.sendRequestForResult(msg); } -}; \ No newline at end of file +}; diff --git a/mobile/android/search/manifests/SearchAndroidManifest_permissions.xml.in b/mobile/android/search/manifests/SearchAndroidManifest_permissions.xml.in index a0abb99faebb..2575e5fe1bc4 100644 --- a/mobile/android/search/manifests/SearchAndroidManifest_permissions.xml.in +++ b/mobile/android/search/manifests/SearchAndroidManifest_permissions.xml.in @@ -1,3 +1,5 @@ +#ifdef MOZ_LOCATION <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> +#endif <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <uses-permission android:name="android.permission.INTERNET" /> diff --git a/modules/libpref/init/all.js b/modules/libpref/init/all.js index 198028eeb96c..766e665c074a 100644 --- a/modules/libpref/init/all.js +++ b/modules/libpref/init/all.js @@ -591,7 +591,7 @@ pref("media.encoder.webm.enabled", true); #endif // Whether to autostart a media element with an |autoplay| attribute -pref("media.autoplay.enabled", true); +pref("media.autoplay.enabled", false); // The default number of decoded video frames that are enqueued in // MediaDecoderReader's mVideoQueue.
1 0
0 0
[tor-browser/tor-browser-52.7.2esr-8.0-1] Orfox: quit button added, functionality changed to bring it up to date with current GeckoApp.java class, earlier version seemed to have problems with quitting
by gk@torproject.org 20 Mar '18

20 Mar '18
commit 25f95adb4015299cee5c6c8a14c3f3c849e7ad22 Author: Amogh Pradeep <amoghbl1(a)gmail.com> Date: Fri Jul 17 17:01:09 2015 -0400 Orfox: quit button added, functionality changed to bring it up to date with current GeckoApp.java class, earlier version seemed to have problems with quitting Signed-off-by: Amogh Pradeep <amoghbl1(a)gmail.com> --- mobile/android/base/java/org/mozilla/gecko/BrowserApp.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mobile/android/base/java/org/mozilla/gecko/BrowserApp.java b/mobile/android/base/java/org/mozilla/gecko/BrowserApp.java index 5eddca3cf726..9023618669ef 100644 --- a/mobile/android/base/java/org/mozilla/gecko/BrowserApp.java +++ b/mobile/android/base/java/org/mozilla/gecko/BrowserApp.java @@ -3428,7 +3428,7 @@ public class BrowserApp extends GeckoApp !PrefUtils.getStringSet(GeckoSharedPrefs.forProfile(this), ClearOnShutdownPref.PREF, new HashSet<String>()).isEmpty(); - aMenu.findItem(R.id.quit).setVisible(visible); + aMenu.findItem(R.id.quit).setVisible(true); // If tab data is unavailable we disable most of the context menu and related items and // return early.
1 0
0 0
[tor-browser/tor-browser-52.7.2esr-8.0-1] Orfox: Removed sync option from preferences
by gk@torproject.org 20 Mar '18

20 Mar '18
commit 8f90bf1ab835668f38679bcf5129db85bc304b7a Author: Amogh Pradeep <amoghbl1(a)gmail.com> Date: Fri Jul 17 13:27:07 2015 -0400 Orfox: Removed sync option from preferences Signed-off-by: Amogh Pradeep <amoghbl1(a)gmail.com> --- mobile/android/base/resources/xml/preferences.xml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/mobile/android/base/resources/xml/preferences.xml b/mobile/android/base/resources/xml/preferences.xml index 06716cd9af91..08ee14ea443a 100644 --- a/mobile/android/base/resources/xml/preferences.xml +++ b/mobile/android/base/resources/xml/preferences.xml @@ -9,12 +9,6 @@ xmlns:gecko="http://schemas.android.com/apk/res-auto" android:enabled="false"> - <org.mozilla.gecko.preferences.SyncPreference android:key="android.not_a_preference.sync" - android:title="@string/pref_sync" - android:icon="@drawable/sync_avatar_default" - android:summary="@string/pref_sync_summary" - android:persistent="false" /> - <PreferenceScreen android:title="@string/pref_category_general" android:summary="@string/pref_category_general_summary" android:key="android.not_a_preference.general_screen"
1 0
0 0
[tor-browser/tor-browser-52.7.2esr-8.0-1] Orfox: queue URL Intents and Tab:Load events when Orbot is not yet started
by gk@torproject.org 20 Mar '18

20 Mar '18
commit 7b8e8ea0d5ead3c243bd8f73b07ed815eaa3369d Author: Hans-Christoph Steiner <hans(a)eds.org> Date: Wed Sep 2 16:43:33 2015 +0200 Orfox: queue URL Intents and Tab:Load events when Orbot is not yet started Instead of failing when opening a URL and Tor is not ready, queue those Intents, then send them once we get STATUS_ON from Orbot. Tab:Load events seem to be the main way that URLs are sent to the browser engine. Trying to migrate these changes to 45, this might end up breaking it, not sure. Squash with 64604feef6326ed44101bde31edb666ffbf21352 Signed-off-by: Amogh Pradeep <amoghbl1(a)gmail.com> --- .../base/java/org/mozilla/gecko/BrowserApp.java | 21 +++++---------- .../main/java/org/mozilla/gecko/GeckoAppShell.java | 31 ++++++++++++++++++++++ 2 files changed, 37 insertions(+), 15 deletions(-) diff --git a/mobile/android/base/java/org/mozilla/gecko/BrowserApp.java b/mobile/android/base/java/org/mozilla/gecko/BrowserApp.java index 984f04eaf52c..b57fe27705fb 100644 --- a/mobile/android/base/java/org/mozilla/gecko/BrowserApp.java +++ b/mobile/android/base/java/org/mozilla/gecko/BrowserApp.java @@ -1077,21 +1077,12 @@ public class BrowserApp extends GeckoApp @Override public void onReceive(Context context, Intent intent) { if (TextUtils.equals(intent.getAction(), OrbotHelper.ACTION_STATUS)) { - Log.i(LOGTAG, getPackageName() + " received intent : " + intent.getAction() + " " + intent.getPackage()); - String status = intent.getStringExtra(OrbotHelper.EXTRA_STATUS) + " (" + intent.getStringExtra(OrbotHelper.EXTRA_PACKAGE_NAME) + ")"; - Log.i(LOGTAG, status); - - boolean enabled = (intent.getStringExtra(OrbotHelper.EXTRA_STATUS).equals(OrbotHelper.STATUS_ON)); - // TODO - /* - if(enabled) { - if (intent.hasExtra(OrbotHelper.EXTRA_PROXY_PORT_HTTP)) - Log.i(LOGTAG, "HTTP PROXY: " + intent.getIntExtra(OrbotHelper.EXTRA_PROXY_PORT_HTTP, -1)); - - if (intent.hasExtra(OrbotHelper.EXTRA_PROXY_PORT_SOCKS)) - Log.i(LOGTAG, "SOCKS PROXY: " + intent.getIntExtra(OrbotHelper.EXTRA_PROXY_PORT_SOCKS, -1)); - } - */ + String status = intent.getStringExtra(OrbotHelper.EXTRA_STATUS); + Tabs.getInstance().setTorStatus(status); + + if (status.equals(OrbotHelper.STATUS_ON)) { + GeckoAppShell.sendPendingUrlIntents(BrowserApp.this); + } } } }; diff --git a/mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoAppShell.java b/mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoAppShell.java index a802126395b4..9f28742c02d7 100644 --- a/mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoAppShell.java +++ b/mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoAppShell.java @@ -21,9 +21,12 @@ import java.util.ArrayList; import java.util.Iterator; import java.util.List; import java.util.Map; +import java.util.NoSuchElementException; +import java.util.Queue; import java.util.StringTokenizer; import java.util.TreeMap; import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.ConcurrentLinkedQueue; import android.annotation.SuppressLint; import org.mozilla.gecko.annotation.JNITarget; @@ -44,6 +47,8 @@ import org.mozilla.gecko.util.NativeJSObject; import org.mozilla.gecko.util.ProxySelector; import org.mozilla.gecko.util.ThreadUtils; +import info.guardianproject.netcipher.proxy.OrbotHelper; + import android.Manifest; import android.app.Activity; import android.app.ActivityManager; @@ -110,6 +115,8 @@ public class GeckoAppShell // We have static members only. private GeckoAppShell() { } + private static String torStatus; + private static final CrashHandler CRASH_HANDLER = new CrashHandler() { @Override protected String getAppPackageName() { @@ -187,6 +194,8 @@ public class GeckoAppShell static private int sDensityDpi; static private int sScreenDepth; + static final Queue<Intent> PENDING_URL_INTENTS = new ConcurrentLinkedQueue<Intent>(); + /* Is the value in sVibrationEndTime valid? */ private static boolean sVibrationMaybePlaying; @@ -254,6 +263,17 @@ public class GeckoAppShell return sLayerView; } + static void sendPendingUrlIntents() { + try { + Context context = getContext(); + while (!PENDING_URL_INTENTS.isEmpty()) { + final Intent intent = PENDING_URL_INTENTS.poll(); + context.startActivity(intent); + } + } catch (NoSuchElementException e) {} + } + + /** * Sends an asynchronous request to Gecko. * @@ -2236,4 +2256,15 @@ public class GeckoAppShell } return sScreenSize; } + + public static void setTorStatus(Intent intent) { + torStatus = intent.getStringExtra(OrbotHelper.EXTRA_STATUS); + if (OrbotHelper.STATUS_ON.equals(torStatus)) { + sendPendingUrlIntents(); + } + } + + public static String getTorStatus() { + return torStatus; + } }
1 0
0 0
[tor-browser/tor-browser-52.7.2esr-8.0-1] Orfox: Centralized proxy applied to CrashReporter, SuggestClient, Distribution, AbstractCommunicator and BaseResources.
by gk@torproject.org 20 Mar '18

20 Mar '18
commit 8236f9c6273a9ff4a094fbe9203a14f3a9e0dd75 Author: Amogh Pradeep <amoghbl1(a)gmail.com> Date: Fri Jun 12 02:07:45 2015 -0400 Orfox: Centralized proxy applied to CrashReporter, SuggestClient, Distribution, AbstractCommunicator and BaseResources. Signed-off-by: Amogh Pradeep <amoghbl1(a)gmail.com> --- .../base/java/org/mozilla/gecko/CrashReporter.java | 5 ++++- .../base/java/org/mozilla/gecko/SuggestClient.java | 5 ++++- .../mozilla/gecko/distribution/Distribution.java | 5 ++++- mobile/android/base/moz.build | 4 +++- .../java/org/mozilla/gecko/util/ProxySettings.java | 21 +++++++++++++++++++++ .../org/mozilla/gecko/sync/net/BaseResource.java | 4 ++++ .../service/utils/AbstractCommunicator.java | 5 ++++- 7 files changed, 44 insertions(+), 5 deletions(-) diff --git a/mobile/android/base/java/org/mozilla/gecko/CrashReporter.java b/mobile/android/base/java/org/mozilla/gecko/CrashReporter.java index ce2384a4d4d4..577079954fae 100644 --- a/mobile/android/base/java/org/mozilla/gecko/CrashReporter.java +++ b/mobile/android/base/java/org/mozilla/gecko/CrashReporter.java @@ -17,11 +17,14 @@ import java.io.IOException; import java.io.OutputStream; import java.net.HttpURLConnection; import java.net.URL; +import java.net.Proxy; +import java.net.InetSocketAddress; import java.nio.channels.Channels; import java.nio.channels.FileChannel; import java.util.zip.GZIPOutputStream; import org.mozilla.gecko.AppConstants.Versions; +import org.mozilla.gecko.util.ProxySettings; import android.annotation.SuppressLint; import android.app.AlertDialog; @@ -366,7 +369,7 @@ public class CrashReporter extends AppCompatActivity Log.i(LOGTAG, "server url: " + spec); try { URL url = new URL(spec); - HttpURLConnection conn = (HttpURLConnection)url.openConnection(); + HttpURLConnection conn = (HttpURLConnection)url.openConnection(ProxySettings.getProxy()); conn.setRequestMethod("POST"); String boundary = generateBoundary(); conn.setDoOutput(true); diff --git a/mobile/android/base/java/org/mozilla/gecko/SuggestClient.java b/mobile/android/base/java/org/mozilla/gecko/SuggestClient.java index e43bbef1f48c..673feb54abdc 100644 --- a/mobile/android/base/java/org/mozilla/gecko/SuggestClient.java +++ b/mobile/android/base/java/org/mozilla/gecko/SuggestClient.java @@ -7,6 +7,8 @@ package org.mozilla.gecko; import java.io.BufferedInputStream; import java.io.IOException; import java.io.InputStream; +import java.net.Proxy; +import java.net.InetSocketAddress; import java.net.HttpURLConnection; import java.net.URL; import java.net.URLEncoder; @@ -15,6 +17,7 @@ import java.util.ArrayList; import org.json.JSONArray; import org.mozilla.gecko.annotation.RobocopTarget; import org.mozilla.gecko.util.HardwareUtils; +import org.mozilla.gecko.util.ProxySettings; import android.content.Context; import android.text.TextUtils; @@ -87,7 +90,7 @@ public class SuggestClient { HttpURLConnection urlConnection = null; InputStream in = null; try { - urlConnection = (HttpURLConnection) url.openConnection(); + urlConnection = (HttpURLConnection) url.openConnection(ProxySettings.getProxy()); urlConnection.setConnectTimeout(mTimeout); urlConnection.setRequestProperty("User-Agent", USER_AGENT); in = new BufferedInputStream(urlConnection.getInputStream()); diff --git a/mobile/android/base/java/org/mozilla/gecko/distribution/Distribution.java b/mobile/android/base/java/org/mozilla/gecko/distribution/Distribution.java index a7b0fe32d360..4b272109a0fc 100644 --- a/mobile/android/base/java/org/mozilla/gecko/distribution/Distribution.java +++ b/mobile/android/base/java/org/mozilla/gecko/distribution/Distribution.java @@ -18,6 +18,8 @@ import java.net.SocketException; import java.net.URI; import java.net.URISyntaxException; import java.net.UnknownHostException; +import java.net.Proxy; +import java.net.InetSocketAddress; import java.util.Collections; import java.util.Enumeration; import java.util.HashMap; @@ -44,6 +46,7 @@ import org.mozilla.gecko.Telemetry; import org.mozilla.gecko.annotation.JNITarget; import org.mozilla.gecko.util.FileUtils; import org.mozilla.gecko.util.HardwareUtils; +import org.mozilla.gecko.util.ProxySettings; import org.mozilla.gecko.util.ThreadUtils; import android.app.Activity; @@ -522,7 +525,7 @@ public class Distribution { Log.v(LOGTAG, "Downloading referred distribution: " + uri); try { - final HttpURLConnection connection = (HttpURLConnection) uri.toURL().openConnection(); + final HttpURLConnection connection = (HttpURLConnection) uri.toURL().openConnection(ProxySettings.getProxy()); // If the Search Activity starts, and we handle the referrer intent, this'll return // null. Recover gracefully in this case. diff --git a/mobile/android/base/moz.build b/mobile/android/base/moz.build index 4dbb1c25fdab..9d93e47b222d 100644 --- a/mobile/android/base/moz.build +++ b/mobile/android/base/moz.build @@ -149,8 +149,9 @@ gujar.sources += [geckoview_source_dir + 'java/org/mozilla/gecko/' + x for x in 'util/NonEvictingLruCache.java', 'util/PrefUtils.java', 'util/ProxySelector.java', + 'util/ProxySettings.java', 'util/publicsuffix/PublicSuffix.java', - 'util/publicsuffix/PublicSuffixPatterns.java', + 'util/publicsuffix/PublicSuffixPatterns.java', 'util/RawResource.java', 'util/StringUtils.java', 'util/ThreadUtils.java', @@ -165,6 +166,7 @@ gujar.extra_jars = [ CONFIG['ANDROID_SUPPORT_V4_AAR_INTERNAL_LIB'], 'constants.jar', 'gecko-mozglue.jar', + 'sync-thirdparty.jar', ] gujar.javac_flags += ['-Xlint:all,-deprecation'] diff --git a/mobile/android/geckoview/src/main/java/org/mozilla/gecko/util/ProxySettings.java b/mobile/android/geckoview/src/main/java/org/mozilla/gecko/util/ProxySettings.java new file mode 100644 index 000000000000..0f5d363d543f --- /dev/null +++ b/mobile/android/geckoview/src/main/java/org/mozilla/gecko/util/ProxySettings.java @@ -0,0 +1,21 @@ +package org.mozilla.gecko.util; + +import java.net.InetSocketAddress; +import java.net.Proxy; + +import ch.boye.httpclientandroidlib.HttpHost; + +public class ProxySettings { + private static final String TOR_PROXY_ADDRESS = "127.0.0.1"; + private static final int TOR_PROXY_PORT = 8118; + + public static Proxy getProxy() { + // TODO make configurable + return new Proxy(Proxy.Type.HTTP, new InetSocketAddress(TOR_PROXY_ADDRESS, TOR_PROXY_PORT)); + } + + public static HttpHost getProxyHost() { + // TODO make configurable + return new HttpHost(TOR_PROXY_ADDRESS, TOR_PROXY_PORT); + } +} diff --git a/mobile/android/services/src/main/java/org/mozilla/gecko/sync/net/BaseResource.java b/mobile/android/services/src/main/java/org/mozilla/gecko/sync/net/BaseResource.java index 60bbc86bbca7..b52c38d1ab07 100644 --- a/mobile/android/services/src/main/java/org/mozilla/gecko/sync/net/BaseResource.java +++ b/mobile/android/services/src/main/java/org/mozilla/gecko/sync/net/BaseResource.java @@ -54,6 +54,9 @@ import ch.boye.httpclientandroidlib.params.HttpProtocolParams; import ch.boye.httpclientandroidlib.protocol.BasicHttpContext; import ch.boye.httpclientandroidlib.protocol.HttpContext; import ch.boye.httpclientandroidlib.util.EntityUtils; +import ch.boye.httpclientandroidlib.HttpHost; +import ch.boye.httpclientandroidlib.conn.params.ConnRoutePNames; +import org.mozilla.gecko.util.ProxySettings; /** * Provide simple HTTP access to a Sync server or similar. @@ -215,6 +218,7 @@ public class BaseResource implements Resource { // We could reuse these client instances, except that we mess around // with their parameters… so we'd need a pool of some kind. client = new DefaultHttpClient(getConnectionManager()); + client.getParams().setParameter(ConnRoutePNames.DEFAULT_PROXY, ProxySettings.getProxyHost()); // TODO: Eventually we should use Apache HttpAsyncClient. It's not out of alpha yet. // Until then, we synchronously make the request, then invoke our delegate's callback. diff --git a/mobile/android/stumbler/java/org/mozilla/mozstumbler/service/utils/AbstractCommunicator.java b/mobile/android/stumbler/java/org/mozilla/mozstumbler/service/utils/AbstractCommunicator.java index 70816371a39c..f67b8bd45711 100644 --- a/mobile/android/stumbler/java/org/mozilla/mozstumbler/service/utils/AbstractCommunicator.java +++ b/mobile/android/stumbler/java/org/mozilla/mozstumbler/service/utils/AbstractCommunicator.java @@ -17,6 +17,8 @@ import java.io.OutputStream; import java.net.HttpURLConnection; import java.net.MalformedURLException; import java.net.URL; +import java.net.Proxy; +import java.net.InetSocketAddress; public abstract class AbstractCommunicator { @@ -73,7 +75,8 @@ public abstract class AbstractCommunicator { sMozApiKey = prefs.getMozApiKey(); } URL url = new URL(getUrlString() + "?key=" + sMozApiKey); - mHttpURLConnection = (HttpURLConnection) url.openConnection(); + Proxy torProxy = new Proxy(Proxy.Type.HTTP, new InetSocketAddress("127.0.0.1", 8118)); + mHttpURLConnection = (HttpURLConnection) url.openConnection(torProxy); mHttpURLConnection.setRequestMethod("POST"); } catch (MalformedURLException e) { throw new IllegalArgumentException(e);
1 0
0 0
[tor-browser/tor-browser-52.7.2esr-8.0-1] Orfox: add BroadcastReceiver to receive Tor status from Orbot
by gk@torproject.org 20 Mar '18

20 Mar '18
commit a9dbc810f24b511ca2eb079ba19830106658c9a9 Author: Hans-Christoph Steiner <hans(a)eds.org> Date: Tue Sep 1 20:49:27 2015 +0200 Orfox: add BroadcastReceiver to receive Tor status from Orbot Signed-off-by: Amogh Pradeep <amoghbl1(a)gmail.com> --- .../base/java/org/mozilla/gecko/BrowserApp.java | 31 ++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/mobile/android/base/java/org/mozilla/gecko/BrowserApp.java b/mobile/android/base/java/org/mozilla/gecko/BrowserApp.java index a532b454a263..984f04eaf52c 100644 --- a/mobile/android/base/java/org/mozilla/gecko/BrowserApp.java +++ b/mobile/android/base/java/org/mozilla/gecko/BrowserApp.java @@ -120,10 +120,12 @@ import android.app.AlertDialog; import android.app.Notification; import android.app.NotificationManager; import android.app.PendingIntent; +import android.content.BroadcastReceiver; import android.content.ContentResolver; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; +import android.content.IntentFilter; import android.content.SharedPreferences; import android.content.pm.PackageManager; import android.content.pm.ResolveInfo; @@ -1070,6 +1072,30 @@ public class BrowserApp extends GeckoApp } } + private BroadcastReceiver torStatusReceiver = new BroadcastReceiver() { + + @Override + public void onReceive(Context context, Intent intent) { + if (TextUtils.equals(intent.getAction(), OrbotHelper.ACTION_STATUS)) { + Log.i(LOGTAG, getPackageName() + " received intent : " + intent.getAction() + " " + intent.getPackage()); + String status = intent.getStringExtra(OrbotHelper.EXTRA_STATUS) + " (" + intent.getStringExtra(OrbotHelper.EXTRA_PACKAGE_NAME) + ")"; + Log.i(LOGTAG, status); + + boolean enabled = (intent.getStringExtra(OrbotHelper.EXTRA_STATUS).equals(OrbotHelper.STATUS_ON)); + // TODO + /* + if(enabled) { + if (intent.hasExtra(OrbotHelper.EXTRA_PROXY_PORT_HTTP)) + Log.i(LOGTAG, "HTTP PROXY: " + intent.getIntExtra(OrbotHelper.EXTRA_PROXY_PORT_HTTP, -1)); + + if (intent.hasExtra(OrbotHelper.EXTRA_PROXY_PORT_SOCKS)) + Log.i(LOGTAG, "SOCKS PROXY: " + intent.getIntExtra(OrbotHelper.EXTRA_PROXY_PORT_SOCKS, -1)); + } + */ + } + } + }; + public void checkStartOrbot() { if (!OrbotHelper.isOrbotInstalled(this)) { final Intent intent = OrbotHelper.getOrbotInstallIntent(this); @@ -1090,6 +1116,7 @@ public class BrowserApp extends GeckoApp }); builder.show(); } else { + registerReceiver(torStatusReceiver, new IntentFilter(OrbotHelper.ACTION_STATUS)); OrbotHelper.requestStartTor(this); } } @@ -1136,6 +1163,10 @@ public class BrowserApp extends GeckoApp if (mIsAbortingAppLaunch) { return; } + // Register for Prompt:ShowTop so we can foreground this activity even if it's hidden. + EventDispatcher.getInstance().registerGeckoThreadListener((GeckoEventListener) this, + "Prompt:ShowTop"); + unregisterReceiver(torStatusReceiver); for (final BrowserAppDelegate delegate : delegates) { delegate.onRestart(this);
1 0
0 0
[tor-browser/tor-browser-52.7.2esr-8.0-1] Orfox: receive Tor status in thread so they arrive when event sync blocks
by gk@torproject.org 20 Mar '18

20 Mar '18
commit 444e865687a56e630fc511173a67d7e06acf746c Author: Hans-Christoph Steiner <hans(a)eds.org> Date: Thu Sep 10 12:52:52 2015 +0200 Orfox: receive Tor status in thread so they arrive when event sync blocks Run in thread so Tor status updates will be received while the Gecko event sync is blocking the main thread. This might not be the best approach since it probably means that the main UI will be frozen waiting for Tor to reach ON status. Signed-off-by: Amogh Pradeep <amoghbl1(a)gmail.com> --- mobile/android/base/java/org/mozilla/gecko/BrowserApp.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/mobile/android/base/java/org/mozilla/gecko/BrowserApp.java b/mobile/android/base/java/org/mozilla/gecko/BrowserApp.java index b57fe27705fb..34f93ee56cdb 100644 --- a/mobile/android/base/java/org/mozilla/gecko/BrowserApp.java +++ b/mobile/android/base/java/org/mozilla/gecko/BrowserApp.java @@ -139,6 +139,9 @@ import android.nfc.NfcAdapter; import android.nfc.NfcEvent; import android.os.Build; import android.os.Bundle; +import android.os.Handler; +import android.os.HandlerThread; +import android.os.Looper; import android.os.StrictMode; import android.support.design.widget.Snackbar; import android.support.v4.app.Fragment; @@ -1119,6 +1122,14 @@ public class BrowserApp extends GeckoApp if (mIsAbortingAppLaunch) { return; } + /* run in thread so Tor status updates will be received while the + * Gecko event sync is blocking the main thread */ + HandlerThread handlerThread = new HandlerThread("torStatusReceiver"); + handlerThread.start(); + Looper looper = handlerThread.getLooper(); + Handler handler = new Handler(looper); + registerReceiver(torStatusReceiver, new IntentFilter(OrbotHelper.ACTION_STATUS), + null, handler); checkStartOrbot();
1 0
0 0
[tor-browser/tor-browser-52.7.2esr-8.0-1] Orfox: Fix #1 - Improve build instructions
by gk@torproject.org 20 Mar '18

20 Mar '18
commit 03f65d64913229abf74b964da309535db3919679 Author: Amogh Pradeep <amoghbl1(a)gmail.com> Date: Tue Jul 14 00:52:24 2015 -0400 Orfox: Fix #1 - Improve build instructions Signed-off-by: Amogh Pradeep <amoghbl1(a)gmail.com> --- README.md | 20 ++++++++++++++++++++ README.txt | 27 --------------------------- 2 files changed, 20 insertions(+), 27 deletions(-) diff --git a/README.md b/README.md new file mode 100644 index 000000000000..8cf5ca26625a --- /dev/null +++ b/README.md @@ -0,0 +1,20 @@ +## ORFOX BUILD STEPS: + +1) Move .mozconfig-android to .mozconfig OR run: +``` +export MOZCONFIG="tor-browser/.mozconfig-android" +``` +2) Checks if the all requirements for the build are fine with: +``` +./mach configure +``` +3) Builds the repo with: +``` +./mach build +``` +4) Creates the apk in tor-browser/MOZ_OBJDIR/dist/fennec-38.0.en-US.android-arm.apk +``` +./mach package +``` +### Note: this does not ship the addons, that is managed in a different repo: https://github.com/amoghbl1/orfox-addons. +### Steps to include these addons can be figured out looking at the jenkins script at https://github.com/amoghbl1/Orfox/blob/master/jenkins-build diff --git a/README.txt b/README.txt deleted file mode 100644 index 658c0dce3174..000000000000 --- a/README.txt +++ /dev/null @@ -1,27 +0,0 @@ -An explanation of the Mozilla Source Code Directory Structure and links to -project pages with documentation can be found at: - - https://developer.mozilla.org/en/Mozilla_Source_Code_Directory_Structure - -For information on how to build Mozilla from the source code, see: - - http://developer.mozilla.org/en/docs/Build_Documentation - -To have your bug fix / feature added to Mozilla, you should create a patch and -submit it to Bugzilla (https://bugzilla.mozilla.org) Instructions are at: - - http://developer.mozilla.org/en/docs/Creating_a_patch - http://developer.mozilla.org/en/docs/Getting_your_patch_in_the_tree - -If you have a question about developing Mozilla, and can't find the solution -on http://developer.mozilla.org, you can try asking your question in a -mozilla.* Usenet group, or on IRC at irc.mozilla.org. [The Mozilla news groups -are accessible on Google Groups, or news.mozilla.org with a NNTP reader.] - -You can download nightly development builds from the Mozilla FTP server. -Keep in mind that nightly builds, which are used by Mozilla developers for -testing, may be buggy. Firefox nightlies, for example, can be found at: - - https://archive.mozilla.org/pub/firefox/nightly/latest-mozilla-central/ - - or - - http://nightly.mozilla.org/
1 0
0 0
[tor-browser/tor-browser-52.7.2esr-8.0-1] handle #11 crash related to tor status receiver unregistering
by gk@torproject.org 20 Mar '18

20 Mar '18
commit 4af211f30d591820516bcfcd220a293bf06a1939 Author: n8fr8 <nathan(a)freitas.net> Date: Sun Aug 6 22:50:56 2017 -0400 handle #11 crash related to tor status receiver unregistering --- mobile/android/base/java/org/mozilla/gecko/BrowserApp.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/mobile/android/base/java/org/mozilla/gecko/BrowserApp.java b/mobile/android/base/java/org/mozilla/gecko/BrowserApp.java index 47cb6249d09a..bc2885c71437 100644 --- a/mobile/android/base/java/org/mozilla/gecko/BrowserApp.java +++ b/mobile/android/base/java/org/mozilla/gecko/BrowserApp.java @@ -1155,7 +1155,17 @@ public class BrowserApp extends GeckoApp delegate.onPause(this); } - unregisterReceiver(torStatusReceiver); + if (torStatusReceiver != null) + { + try + { + unregisterReceiver(torStatusReceiver); + } + catch (IllegalArgumentException iae) + { + Log.w("BrowserApp","Tor status receiver couldn't be unregistered",iae); + } + } } @Override
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 1592
  • 1593
  • 1594
  • 1595
  • 1596
  • 1597
  • 1598
  • ...
  • 1951
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.