Bug 1216489 - 1. Cleanup TabsPanel includes and remove member variable. r=sebastian
authorTom Klein <twointofive@gmail.com>
Wed, 30 Nov 2016 17:02:53 -0600
changeset 374474 b96ede86735972a43f0ee84954887763b4d6ab37
parent 374473 8a62afb4f1790a2d78d0a9f8cdfa5d20fba9f71b
child 374475 baa3bfef08bd89510532275fb2fa91616a34c1da
push id10863
push userjlorenzo@mozilla.com
push dateMon, 06 Mar 2017 23:02:23 +0000
treeherdermozilla-aurora@0931190cd725 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssebastian
bugs1216489
milestone54.0a1
Bug 1216489 - 1. Cleanup TabsPanel includes and remove member variable. r=sebastian MozReview-Commit-ID: 9eTBEf8xj1l
mobile/android/base/java/org/mozilla/gecko/tabs/TabsPanel.java
--- a/mobile/android/base/java/org/mozilla/gecko/tabs/TabsPanel.java
+++ b/mobile/android/base/java/org/mozilla/gecko/tabs/TabsPanel.java
@@ -1,17 +1,15 @@
 /* -*- Mode: Java; c-basic-offset: 4; tab-width: 20; indent-tabs-mode: nil; -*-
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 package org.mozilla.gecko.tabs;
 
-import android.support.v4.content.ContextCompat;
-
 import org.mozilla.gecko.Experiments;
 import org.mozilla.gecko.GeckoApp;
 import org.mozilla.gecko.GeckoApplication;
 import org.mozilla.gecko.GeckoSharedPrefs;
 import org.mozilla.gecko.R;
 import org.mozilla.gecko.Telemetry;
 import org.mozilla.gecko.TelemetryContract;
 import org.mozilla.gecko.animation.PropertyAnimator;
@@ -26,16 +24,17 @@ import org.mozilla.gecko.util.ThreadUtil
 import org.mozilla.gecko.widget.GeckoPopupMenu;
 import org.mozilla.gecko.widget.IconTabWidget;
 
 import android.content.Context;
 import android.content.SharedPreferences;
 import android.content.res.Configuration;
 import android.content.res.Resources;
 import android.support.annotation.UiThread;
+import android.support.v4.content.ContextCompat;
 import android.text.TextUtils;
 import android.util.AttributeSet;
 import android.util.Log;
 import android.view.LayoutInflater;
 import android.view.Menu;
 import android.view.MenuItem;
 import android.view.View;
 import android.widget.Button;
@@ -106,17 +105,16 @@ public class TabsPanel extends LinearLay
     private PanelView mPanel;
     private PanelView mPanelNormal;
     private PanelView mPanelPrivate;
     private TabsLayoutChangeListener mLayoutChangeListener;
 
     private IconTabWidget mTabWidget;
     private View mMenuButton;
     private ImageButton mAddTab;
-    private ImageButton mNavBackButton;
 
     private Panel mCurrentPanel;
     private boolean mVisible;
     private boolean mHeaderVisible;
 
     private final GeckoPopupMenu mPopupMenu;
 
     public TabsPanel(Context context, AttributeSet attrs) {
@@ -173,18 +171,18 @@ public class TabsPanel extends LinearLay
         mMenuButton = findViewById(R.id.menu);
         mMenuButton.setOnClickListener(new Button.OnClickListener() {
             @Override
             public void onClick(View view) {
                 showMenu();
             }
         });
 
-        mNavBackButton = (ImageButton) findViewById(R.id.nav_back);
-        mNavBackButton.setOnClickListener(new Button.OnClickListener() {
+        final ImageButton navBackButton = (ImageButton) findViewById(R.id.nav_back);
+        navBackButton.setOnClickListener(new Button.OnClickListener() {
             @Override
             public void onClick(View view) {
                 mActivity.onBackPressed();
             }
         });
     }
 
     public void showMenu() {