Bug 1061685: Don't crash when we get a share with no URL r=rnewman
authorChris Kitching <chriskitching@linux.com>
Tue, 02 Sep 2014 16:29:12 -0700
changeset 203411 ed3c169b4fb6d4609557e0cdec792c2e5f612c05
parent 203410 3459b37cdd2f0b9e02df7c74c01a4298d265bd71
child 203412 b0c0a3322e3668ffd146954108e4fa443cf192cc
push id48665
push userryanvm@gmail.com
push dateWed, 03 Sep 2014 20:40:15 +0000
treeherdermozilla-inbound@0da762e6868a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrnewman
bugs1061685
milestone35.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1061685: Don't crash when we get a share with no URL r=rnewman
mobile/android/base/overlays/ui/ShareDialog.java
--- a/mobile/android/base/overlays/ui/ShareDialog.java
+++ b/mobile/android/base/overlays/ui/ShareDialog.java
@@ -98,16 +98,17 @@ public class ShareDialog extends LocaleA
 
         if (TextUtils.isEmpty(pageUrl)) {
             Log.e(LOGTAG, "Unable to process shared intent. No URL found!");
 
             // Display toast notifying the user of failure (most likely a developer who screwed up
             // trying to send a share intent).
             Toast toast = Toast.makeText(this, getResources().getText(R.string.overlay_share_no_url), Toast.LENGTH_SHORT);
             toast.show();
+            finish();
 
             return;
         }
 
         setContentView(R.layout.overlay_share_dialog);
 
         LocalBroadcastManager.getInstance(this).registerReceiver(uiEventListener,
                                                                  new IntentFilter(OverlayConstants.SHARE_METHOD_UI_EVENT));