Bug 1251923 - TabQueueService: Treat BadTokenException like SecurityException. r=margaret
authorSebastian Kaspari <s.kaspari@gmail.com>
Fri, 04 Mar 2016 16:01:59 +0100
changeset 287016 815d8ea19eff49bf8c1172f5cc23126299f29ac9
parent 287015 209b08d0d9b19d8b5f9c1672f9ac628c1893c61c
child 287017 3827e69a54ef03d6224c27d6a1c7180f896d87e5
push id18034
push users.kaspari@gmail.com
push dateMon, 07 Mar 2016 11:43:30 +0000
treeherderfx-team@815d8ea19eff [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmargaret
bugs1251923
milestone47.0a1
Bug 1251923 - TabQueueService: Treat BadTokenException like SecurityException. r=margaret MozReview-Commit-ID: qTtRaQuZyo
mobile/android/base/java/org/mozilla/gecko/tabqueue/TabQueueService.java
--- a/mobile/android/base/java/org/mozilla/gecko/tabqueue/TabQueueService.java
+++ b/mobile/android/base/java/org/mozilla/gecko/tabqueue/TabQueueService.java
@@ -172,17 +172,17 @@ public class TabQueueService extends Ser
         if (stopServiceRunnable != null) {
             // If we're already displaying a toast, keep displaying it but store the previous url.
             // The open button will refer to the most recently opened link.
             tabQueueHandler.removeCallbacks(stopServiceRunnable);
             stopServiceRunnable.run(false);
         } else {
             try {
                 windowManager.addView(toastLayout, toastLayoutParams);
-            } catch (final SecurityException e) {
+            } catch (final SecurityException | WindowManager.BadTokenException e) {
                 Toast.makeText(this, getText(R.string.tab_queue_toast_message), Toast.LENGTH_SHORT).show();
                 showSettingsNotification();
             }
         }
 
         stopServiceRunnable = new StopServiceRunnable(startId) {
             @Override
             public void onRun() {