backout 578bf8d6363c for causing robocop pan regression
authorMargaret Leibovic <margaret.leibovic@gmail.com>
Fri, 13 Jun 2014 13:56:47 -0700
changeset 188559 1e1f339edfa8114946e17761e9a58f2ab2805678
parent 188558 a981121ef93b563bb0acbe59314fdb2af8faa669
child 188560 aa2f545e6e0bbad471d4aac839424a48baf54f44
child 188720 86aa28ce309efd1895531d99a0393f0215afaf44
push id7285
push usermleibovic@mozilla.com
push dateFri, 13 Jun 2014 20:56:59 +0000
treeherderfx-team@1e1f339edfa8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone33.0a1
backs out578bf8d6363c2b35560b4bfd4ee5ad5fe3bfd428
backout 578bf8d6363c for causing robocop pan regression
mobile/android/base/BrowserApp.java
mobile/android/base/widget/ButtonToast.java
--- a/mobile/android/base/BrowserApp.java
+++ b/mobile/android/base/BrowserApp.java
@@ -482,17 +482,17 @@ abstract public class BrowserApp extends
         mBrowserToolbar.setProgressBar(mProgressView);
         if (Intent.ACTION_VIEW.equals(intent.getAction())) {
             // Show the target URL immediately in the toolbar.
             mBrowserToolbar.setTitle(intent.getDataString());
 
             Telemetry.sendUIEvent(TelemetryContract.Event.LOAD_URL, TelemetryContract.Method.INTENT);
         }
 
-        ((GeckoApp.MainLayout) mMainLayout).setTouchEventInterceptor(new HideOnTouchListener());
+        ((GeckoApp.MainLayout) mMainLayout).setTouchEventInterceptor(new HideTabsTouchListener());
         ((GeckoApp.MainLayout) mMainLayout).setMotionEventInterceptor(new MotionEventInterceptor() {
             @Override
             public boolean onInterceptMotionEvent(View view, MotionEvent event) {
                 // If we get a gamepad panning MotionEvent while the focus is not on the layerview,
                 // put the focus on the layerview and carry on
                 if (mLayerView != null && !mLayerView.hasFocus() && GamepadUtils.isPanningControl(event)) {
                     if (mHomePager == null) {
                         return false;
@@ -1980,27 +1980,21 @@ abstract public class BrowserApp extends
 
         mBrowserSearchContainer.setVisibility(View.INVISIBLE);
 
         getSupportFragmentManager().beginTransaction()
                 .remove(mBrowserSearch).commitAllowingStateLoss();
         mBrowserSearch.setUserVisibleHint(false);
     }
 
-    /**
-     * Hides certain UI elements (e.g. button toast, tabs tray) when the
-     * user touches the main layout.
-     */
-    private class HideOnTouchListener implements TouchEventInterceptor {
+    private class HideTabsTouchListener implements TouchEventInterceptor {
         private boolean mIsHidingTabs = false;
 
         @Override
         public boolean onInterceptTouchEvent(View view, MotionEvent event) {
-            getButtonToast().hide(false, ButtonToast.ReasonHidden.TOUCH_OUTSIDE);
-
             // We need to account for scroll state for the touched view otherwise
             // tapping on an "empty" part of the view will still be considered a
             // valid touch event.
             if (view.getScrollX() != 0 || view.getScrollY() != 0) {
                 Rect rect = new Rect();
                 view.getHitRect(rect);
                 rect.offset(-view.getScrollX(), -view.getScrollY());
 
--- a/mobile/android/base/widget/ButtonToast.java
+++ b/mobile/android/base/widget/ButtonToast.java
@@ -37,17 +37,16 @@ public class ButtonToast {
     private final View mView;
     private final TextView mMessageView;
     private final Button mButton;
     private final Handler mHideHandler = new Handler();
     private Toast mCurrentToast;
 
     public enum ReasonHidden {
         CLICKED,
-        TOUCH_OUTSIDE,
         TIMEOUT,
         REPLACED,
         STARTUP
     }
 
     // State objects
     private static class Toast {
         public final CharSequence buttonMessage;