Backed out changeset 916fb74ed491 (bug 1220928)
authorCarsten "Tomcat" Book <cbook@mozilla.com>
Wed, 30 Mar 2016 14:37:49 +0200
changeset 290881 a30dd3829cd0a7bb8f3a98067d0fc77117fd6697
parent 290880 f4449c8ce9a82a4be98b0ab4b6be7c23c82f82c2
child 290882 3cdaff81f4d58e0e2ba8af736438e63993867a4a
push id19656
push usergwagner@mozilla.com
push dateMon, 04 Apr 2016 13:43:23 +0000
treeherderb2g-inbound@e99061fde28a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1220928
milestone48.0a1
backs out916fb74ed491c4f492d97bb4bbc5b8f786cd223f
Backed out changeset 916fb74ed491 (bug 1220928)
mobile/android/base/java/org/mozilla/gecko/home/CombinedHistoryAdapter.java
mobile/android/base/java/org/mozilla/gecko/home/CombinedHistoryRecyclerView.java
--- a/mobile/android/base/java/org/mozilla/gecko/home/CombinedHistoryAdapter.java
+++ b/mobile/android/base/java/org/mozilla/gecko/home/CombinedHistoryAdapter.java
@@ -190,24 +190,20 @@ public class CombinedHistoryAdapter exte
         }
         // Handle "back" view.
         clientChildren.add(null);
         clientChildren.addAll(remoteClients.get(transformAdapterPositionForDataStructure(ItemType.CLIENT, parentPosition)).tabs);
         inChildView = true;
         notifyDataSetChanged();
     }
 
-    public boolean exitChildView() {
-        if (!inChildView) {
-            return false;
-        }
+    public void exitChildView() {
         inChildView = false;
         clientChildren.clear();
         notifyDataSetChanged();
-        return true;
     }
 
     private ItemType getItemTypeForPosition(int position) {
         return ItemType.viewTypeToItemType(getItemViewType(position));
     }
 
     /**
      * Transform an adapter position to the position for the data structure backing the item type.
--- a/mobile/android/base/java/org/mozilla/gecko/home/CombinedHistoryRecyclerView.java
+++ b/mobile/android/base/java/org/mozilla/gecko/home/CombinedHistoryRecyclerView.java
@@ -4,17 +4,16 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 package org.mozilla.gecko.home;
 
 import android.content.Context;
 import android.support.v7.widget.LinearLayoutManager;
 import android.support.v7.widget.RecyclerView;
 import android.util.AttributeSet;
-import android.view.KeyEvent;
 import android.view.View;
 import org.mozilla.gecko.db.RemoteClient;
 import org.mozilla.gecko.home.CombinedHistoryPanel.OnPanelLevelChangeListener;
 import org.mozilla.gecko.home.CombinedHistoryPanel.OnPanelLevelChangeListener.PanelLevel;
 import org.mozilla.gecko.Telemetry;
 import org.mozilla.gecko.TelemetryContract;
 import org.mozilla.gecko.widget.RecyclerViewClickSupport;
 
@@ -46,29 +45,16 @@ public class CombinedHistoryRecyclerView
     private void init(Context context) {
         LinearLayoutManager layoutManager = new LinearLayoutManager(context);
         layoutManager.setOrientation(LinearLayoutManager.VERTICAL);
         setLayoutManager(layoutManager);
 
         RecyclerViewClickSupport.addTo(this)
             .setOnItemClickListener(this)
             .setOnItemLongClickListener(this);
-
-        setOnKeyListener(new View.OnKeyListener() {
-            @Override
-            public boolean onKey(View v, int keyCode, KeyEvent event) {
-                final int action = event.getAction();
-
-                // If the user hit the BACK key, try to move to the parent folder.
-                if (action == KeyEvent.ACTION_UP && keyCode == KeyEvent.KEYCODE_BACK) {
-                    return ((CombinedHistoryAdapter) getAdapter()).exitChildView();
-                }
-                return false;
-            }
-        });
     }
 
     public void setOnHistoryClickedListener(HomePager.OnUrlOpenListener listener) {
         this.mOnUrlOpenListener = listener;
     }
 
     public void setOnPanelLevelChangeListener(OnPanelLevelChangeListener listener) {
         this.mOnPanelLevelChangeListener = listener;