From 3f6a20d8403b824f67a9c913f4a0a1e0b6e72410 Mon Sep 17 00:00:00 2001 From: Mike de Boer Date: Sat, 11 Oct 2014 00:00:44 +0200 Subject: [PATCH 01/17] Bug 1081322: add string for new contacts phone number editing. r=mattn --- browser/locales/en-US/chrome/browser/loop/loop.properties | 1 + 1 file changed, 1 insertion(+) diff --git a/browser/locales/en-US/chrome/browser/loop/loop.properties b/browser/locales/en-US/chrome/browser/loop/loop.properties index 4ecc5fed142..88b5851ebcd 100644 --- a/browser/locales/en-US/chrome/browser/loop/loop.properties +++ b/browser/locales/en-US/chrome/browser/loop/loop.properties @@ -97,6 +97,7 @@ new_contact_button=New Contact ## and click the 'New Contact' button to see the fields. new_contact_name_placeholder=Name new_contact_email_placeholder=Email +new_contact_phone_placeholder=Firefox OS Phone contacts_blocked_contacts=Blocked Contacts From b3b493641b8c531ecaaa27c52df2d2a33e5678ce Mon Sep 17 00:00:00 2001 From: Mark Hammond Date: Sat, 11 Oct 2014 12:37:16 +1100 Subject: [PATCH 02/17] Bug 1063702 - Update all Reset Firefox strings and relevant UI to new UX requirements. r=MattN --HG-- extra : rebase_source : 4e9f51eb421ccd12e2fc14b6294a104d1c7a1aff --- browser/base/content/safeMode.js | 1 - browser/base/content/safeMode.xul | 21 ++++--------- .../migration/content/aboutWelcomeBack.xhtml | 22 ++++---------- browser/components/nsBrowserGlue.js | 4 +-- .../content/aboutSessionRestore.js | 26 ++++++++++++++-- .../chrome/browser/aboutSessionRestore.dtd | 30 ++++++++++++++----- .../locales/en-US/chrome/browser/safeMode.dtd | 10 +++---- toolkit/content/aboutSupport.xhtml | 5 ++-- toolkit/content/resetProfile.js | 19 ------------ toolkit/content/resetProfile.xul | 16 +++++----- toolkit/content/resetProfileProgress.xul | 5 ++-- .../en-US/chrome/global/resetProfile.dtd | 18 +++++------ .../chrome/global/resetProfile.properties | 6 ++-- .../themes/windows/global/aboutSupport.css | 1 - 14 files changed, 87 insertions(+), 97 deletions(-) diff --git a/browser/base/content/safeMode.js b/browser/base/content/safeMode.js index 19ecb6adcaa..693a44eb96e 100644 --- a/browser/base/content/safeMode.js +++ b/browser/base/content/safeMode.js @@ -72,7 +72,6 @@ function onLoad() { document.getElementById("autoSafeMode").hidden = false; document.getElementById("safeMode").hidden = true; if (ResetProfile.resetSupported()) { - populateResetPane("resetProfileItems"); document.getElementById("resetProfile").hidden = false; } else { // Hide the reset button is it's not supported. diff --git a/browser/base/content/safeMode.xul b/browser/base/content/safeMode.xul index f527fb19ba8..a94de5fba0a 100644 --- a/browser/base/content/safeMode.xul +++ b/browser/base/content/safeMode.xul @@ -21,7 +21,7 @@ title="&safeModeDialog.title;" buttons="accept,extra1" buttonlabelaccept="&startSafeMode.label;" - buttonlabelextra1="&resetProfile.label;" + buttonlabelextra1="&refreshProfile.label;" maxwidth="&window.maxWidth;" ondialogaccept="return onDefaultButton()" ondialogcancel="onCancel();" @@ -32,30 +32,19 @@ + + + + + +Login Manager test: input events should fire. + + + +

+ +
+ +
+

This is form 1.

+ + + + + +
+ +
+

+
+

From d8c813b17ceacad9ac4ba74cdc9e596f81c59077 Mon Sep 17 00:00:00 2001
From: Chris Kitching 
Date: Sat, 11 Oct 2014 15:22:55 +0100
Subject: [PATCH 05/17] Bug 1064620: Replace # with //# for IDE integration.
 r=nalexander

---
 mobile/android/base/AppConstants.java.in      | 122 +++++++++---------
 mobile/android/base/Makefile.in               |   2 +
 mobile/android/base/SysInfo.java.in           |   2 +-
 .../background/common/GlobalConstants.java.in |   8 +-
 .../HealthReportConstants.java.in             |   2 +-
 .../base/fxa/FxAccountConstants.java.in       |   2 +-
 .../android/base/mozglue/GeckoLoader.java.in  |   6 +-
 .../android/base/sync/SyncConstants.java.in   |   2 +-
 .../base/widget/ThemedEditText.java.in        |   8 +-
 .../base/widget/ThemedImageButton.java.in     |   8 +-
 .../base/widget/ThemedImageView.java.in       |   8 +-
 .../base/widget/ThemedLinearLayout.java.in    |   8 +-
 .../base/widget/ThemedRelativeLayout.java.in  |   8 +-
 .../base/widget/ThemedTextSwitcher.java.in    |   8 +-
 .../base/widget/ThemedTextView.java.in        |   8 +-
 mobile/android/base/widget/ThemedView.java.in |   8 +-
 16 files changed, 106 insertions(+), 104 deletions(-)

diff --git a/mobile/android/base/AppConstants.java.in b/mobile/android/base/AppConstants.java.in
index fed41782d19..4ed830cd1d5 100644
--- a/mobile/android/base/AppConstants.java.in
+++ b/mobile/android/base/AppConstants.java.in
@@ -1,4 +1,4 @@
-#filter substitution
+//#filter substitution
 /* -*- 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
@@ -31,11 +31,11 @@ public class AppConstants {
     public static final class Versions {
         public static final int MIN_SDK_VERSION = @MOZ_ANDROID_MIN_SDK_VERSION@;
         public static final int MAX_SDK_VERSION =
-#ifdef MOZ_ANDROID_MAX_SDK_VERSION
+//#ifdef MOZ_ANDROID_MAX_SDK_VERSION
         @MOZ_ANDROID_MAX_SDK_VERSION@;
-#else
+//#else
         999;
-#endif
+//#endif
 
         /*
          * The SDK_INT >= N check can only pass if our MAX_SDK_VERSION is
@@ -93,11 +93,11 @@ public class AppConstants {
     public static final String MOZILLA_VERSION = @MOZILLA_VERSION@;
 
     public static final String MOZ_STUMBLER_API_KEY =
-#ifdef MOZ_ANDROID_MLS_STUMBLER
+//#ifdef MOZ_ANDROID_MLS_STUMBLER
     "@MOZ_STUMBLER_API_KEY@";
-#else
+//#else
     null;
-#endif
+//#endif
     public static final boolean MOZ_STUMBLER_BUILD_TIME_ENABLED = (MOZ_STUMBLER_API_KEY != null);
 
     public static final String MOZ_CHILD_PROCESS_NAME = "@MOZ_CHILD_PROCESS_NAME@";
@@ -122,142 +122,142 @@ public class AppConstants {
     public static final int MOZ_MIN_CPU_VERSION = @MOZ_MIN_CPU_VERSION@;
 
     public static final boolean MOZ_ANDROID_ANR_REPORTER =
-#ifdef MOZ_ANDROID_ANR_REPORTER
+//#ifdef MOZ_ANDROID_ANR_REPORTER
     true;
-#else
+//#else
     false;
-#endif
+//#endif
 
     public static final String MOZ_PKG_SPECIAL =
-#ifdef MOZ_PKG_SPECIAL
+//#ifdef MOZ_PKG_SPECIAL
     "@MOZ_PKG_SPECIAL@";
-#else
+//#else
     null;
-#endif
+//#endif
 
     /**
      * Whether this APK was built with constrained resources --
      * no xhdpi+ images, for example.
      */
     public static final boolean MOZ_ANDROID_RESOURCE_CONSTRAINED =
-#ifdef MOZ_ANDROID_RESOURCE_CONSTRAINED
+//#ifdef MOZ_ANDROID_RESOURCE_CONSTRAINED
     true;
-#else
+//#else
     false;
-#endif
+//#endif
 
     public static final boolean MOZ_SERVICES_HEALTHREPORT =
-#ifdef MOZ_SERVICES_HEALTHREPORT
+//#ifdef MOZ_SERVICES_HEALTHREPORT
     true;
-#else
+//#else
     false;
-#endif
+//#endif
 
     public static final boolean MOZ_TELEMETRY_ON_BY_DEFAULT =
-#ifdef MOZ_TELEMETRY_ON_BY_DEFAULT
+//#ifdef MOZ_TELEMETRY_ON_BY_DEFAULT
     true;
-#else
+//#else
     false;
-#endif
+//#endif
 
     public static final String TELEMETRY_PREF_NAME =
           "toolkit.telemetry.enabled";
 
     public static final boolean MOZ_TELEMETRY_REPORTING =
-#ifdef MOZ_TELEMETRY_REPORTING
+//#ifdef MOZ_TELEMETRY_REPORTING
     true;
-#else
+//#else
     false;
-#endif
+//#endif
 
     public static final boolean MOZ_CRASHREPORTER =
-#if MOZ_CRASHREPORTER
+//#if MOZ_CRASHREPORTER
     true;
-#else
+//#else
     false;
-#endif
+//#endif
 
     public static final boolean MOZ_DATA_REPORTING =
-#ifdef MOZ_DATA_REPORTING
+//#ifdef MOZ_DATA_REPORTING
       true;
-#else
+//#else
     false;
-#endif
+//#endif
 
     public static final boolean MOZ_LOCALE_SWITCHER =
-#ifdef MOZ_LOCALE_SWITCHER
+//#ifdef MOZ_LOCALE_SWITCHER
     true;
-#else
+//#else
     false;
-#endif
+//#endif
 
     public static final boolean MOZ_UPDATER =
-#ifdef MOZ_UPDATER
+//#ifdef MOZ_UPDATER
     true;
-#else
+//#else
     false;
-#endif
+//#endif
 
     public static final boolean MOZ_WEBSMS_BACKEND =
-#ifdef MOZ_WEBSMS_BACKEND
+//#ifdef MOZ_WEBSMS_BACKEND
     true;
-#else
+//#else
     false;
-#endif
+//#endif
 
     // Android Beam is only supported on API14+, so we don't even bother building
     // it if this APK doesn't include API14 support.
     public static final boolean MOZ_ANDROID_BEAM =
-#ifdef MOZ_ANDROID_BEAM
+//#ifdef MOZ_ANDROID_BEAM
     Versions.feature14Plus;
-#else
+//#else
     false;
-#endif
+//#endif
 
     public static final boolean MOZ_ANDROID_APZ =
-#ifdef MOZ_ANDROID_APZ
+//#ifdef MOZ_ANDROID_APZ
     true;
-#else
+//#else
     false;
-#endif
+//#endif
 
     // See this wiki page for more details about channel specific build defines:
     // https://wiki.mozilla.org/Platform/Channel-specific_build_defines
     public static final boolean RELEASE_BUILD =
-#ifdef RELEASE_BUILD
+//#ifdef RELEASE_BUILD
     true;
-#else
+//#else
     false;
-#endif
+//#endif
 
     public static final boolean DEBUG_BUILD =
-#ifdef MOZ_DEBUG
+//#ifdef MOZ_DEBUG
     true;
-#else
+//#else
     false;
-#endif
+//#endif
 
     public static final boolean MOZ_MEDIA_PLAYER =
-#ifdef MOZ_NATIVE_DEVICES
+//#ifdef MOZ_NATIVE_DEVICES
     true;
-#else
+//#else
     false;
-#endif
+//#endif
 
     // Official corresponds, roughly, to whether this build is performed on
     // Mozilla's continuous integration infrastructure. You should disable
     // developer-only functionality when this flag is set.
     public static final boolean MOZILLA_OFFICIAL =
-#ifdef MOZILLA_OFFICIAL
+//#ifdef MOZILLA_OFFICIAL
     true;
-#else
+//#else
     false;
-#endif
+//#endif
 
     public static final boolean ANDROID_DOWNLOADS_INTEGRATION =
-#ifdef MOZ_ANDROID_DOWNLOADS_INTEGRATION
+//#ifdef MOZ_ANDROID_DOWNLOADS_INTEGRATION
     AppConstants.Versions.feature12Plus;
-#else
+//#else
     false;
-#endif
+//#endif
 }
diff --git a/mobile/android/base/Makefile.in b/mobile/android/base/Makefile.in
index cdeb7dcc266..32555de9d0b 100644
--- a/mobile/android/base/Makefile.in
+++ b/mobile/android/base/Makefile.in
@@ -201,6 +201,7 @@ preprocessed := $(addsuffix .in,$(subst generated/org/mozilla/gecko/,,$(filter g
 
 preprocessed_PATH := generated/org/mozilla/gecko
 preprocessed_KEEP_PATH := 1
+preprocessed_FLAGS := --marker='//\\\#'
 
 PP_TARGETS += preprocessed
 
@@ -214,6 +215,7 @@ preprocessed_package := $(addsuffix .in,$(subst $(android_package_dir)/,,$(filte
 
 preprocessed_package_PATH := $(android_package_dir)
 preprocessed_package_KEEP_PATH := 1
+preprocessed_package_FLAGS := --marker='//\\\#'
 
 PP_TARGETS += preprocessed_package
 
diff --git a/mobile/android/base/SysInfo.java.in b/mobile/android/base/SysInfo.java.in
index 2f296740f90..f5c07302ebc 100644
--- a/mobile/android/base/SysInfo.java.in
+++ b/mobile/android/base/SysInfo.java.in
@@ -1,4 +1,4 @@
-#filter substitution
+//#filter substitution
 /* -*- 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
diff --git a/mobile/android/base/background/common/GlobalConstants.java.in b/mobile/android/base/background/common/GlobalConstants.java.in
index 5d2040a12b3..4d853d39b79 100644
--- a/mobile/android/base/background/common/GlobalConstants.java.in
+++ b/mobile/android/base/background/common/GlobalConstants.java.in
@@ -1,4 +1,4 @@
-#filter substitution
+//#filter substitution
 /* 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/. */
@@ -16,11 +16,11 @@ public class GlobalConstants {
   // If this is an official build, 'default' means 'release'.
   // Otherwise, it means 'dev'.
   public static final String MOZ_UPDATE_CHANNEL = "@MOZ_UPDATE_CHANNEL@";
-#ifdef MOZ_OFFICIAL_BRANDING
+//#ifdef MOZ_OFFICIAL_BRANDING
   public static final boolean MOZ_OFFICIAL_BRANDING = true;
-#else
+//#else
   public static final boolean MOZ_OFFICIAL_BRANDING = false;
-#endif
+//#endif
 
   public static final long BUILD_TIMESTAMP_SECONDS = @MOZ_BUILD_TIMESTAMP@L;
   public static final long BUILD_TIMESTAMP_MSEC = 1000L * @MOZ_BUILD_TIMESTAMP@L;
diff --git a/mobile/android/base/background/healthreport/HealthReportConstants.java.in b/mobile/android/base/background/healthreport/HealthReportConstants.java.in
index 45cbb86e09b..073e74236e6 100644
--- a/mobile/android/base/background/healthreport/HealthReportConstants.java.in
+++ b/mobile/android/base/background/healthreport/HealthReportConstants.java.in
@@ -1,4 +1,4 @@
-#filter substitution
+//#filter substitution
 /* 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/. */
diff --git a/mobile/android/base/fxa/FxAccountConstants.java.in b/mobile/android/base/fxa/FxAccountConstants.java.in
index bdef49092c5..732f1bf7613 100644
--- a/mobile/android/base/fxa/FxAccountConstants.java.in
+++ b/mobile/android/base/fxa/FxAccountConstants.java.in
@@ -1,4 +1,4 @@
-#filter substitution
+//#filter substitution
 /* 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/. */
diff --git a/mobile/android/base/mozglue/GeckoLoader.java.in b/mobile/android/base/mozglue/GeckoLoader.java.in
index 195cf610150..0c0f27d67f2 100644
--- a/mobile/android/base/mozglue/GeckoLoader.java.in
+++ b/mobile/android/base/mozglue/GeckoLoader.java.in
@@ -1,4 +1,4 @@
-#filter substitution
+//#filter substitution
 /* -*- 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
@@ -226,7 +226,7 @@ public final class GeckoLoader {
             }
         }
 
-#ifdef MOZ_LINKER_EXTRACT
+//#ifdef MOZ_LINKER_EXTRACT
         putenv("MOZ_LINKER_EXTRACT=1");
         // Ensure that the cache dir is world-writable
         File cacheDir = new File(linkerCache);
@@ -235,7 +235,7 @@ public final class GeckoLoader {
             cacheDir.setExecutable(true, false);
             cacheDir.setReadable(true, false);
         }
-#endif
+//#endif
     }
 
     @RobocopTarget
diff --git a/mobile/android/base/sync/SyncConstants.java.in b/mobile/android/base/sync/SyncConstants.java.in
index 4076e6945c1..5ba16c09562 100644
--- a/mobile/android/base/sync/SyncConstants.java.in
+++ b/mobile/android/base/sync/SyncConstants.java.in
@@ -1,4 +1,4 @@
-#filter substitution
+//#filter substitution
 /* 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/. */
diff --git a/mobile/android/base/widget/ThemedEditText.java.in b/mobile/android/base/widget/ThemedEditText.java.in
index 0ee0f6b2728..1cabd12c311 100644
--- a/mobile/android/base/widget/ThemedEditText.java.in
+++ b/mobile/android/base/widget/ThemedEditText.java.in
@@ -1,4 +1,4 @@
-#filter substitution
-#define VIEW_NAME_SUFFIX EditText
-#define BASE_TYPE android.widget.EditText
-#include ThemedView.java.frag
+//#filter substitution
+//#define VIEW_NAME_SUFFIX EditText
+//#define BASE_TYPE android.widget.EditText
+//#include ThemedView.java.frag
diff --git a/mobile/android/base/widget/ThemedImageButton.java.in b/mobile/android/base/widget/ThemedImageButton.java.in
index f7e7d61801e..a9731503e2b 100644
--- a/mobile/android/base/widget/ThemedImageButton.java.in
+++ b/mobile/android/base/widget/ThemedImageButton.java.in
@@ -1,4 +1,4 @@
-#filter substitution
-#define VIEW_NAME_SUFFIX ImageButton
-#define BASE_TYPE android.widget.ImageButton
-#include ThemedView.java.frag
+//#filter substitution
+//#define VIEW_NAME_SUFFIX ImageButton
+//#define BASE_TYPE android.widget.ImageButton
+//#include ThemedView.java.frag
diff --git a/mobile/android/base/widget/ThemedImageView.java.in b/mobile/android/base/widget/ThemedImageView.java.in
index 8a62c932af9..31b970f394c 100644
--- a/mobile/android/base/widget/ThemedImageView.java.in
+++ b/mobile/android/base/widget/ThemedImageView.java.in
@@ -1,4 +1,4 @@
-#filter substitution
-#define VIEW_NAME_SUFFIX ImageView
-#define BASE_TYPE android.widget.ImageView
-#include ThemedView.java.frag
+//#filter substitution
+//#define VIEW_NAME_SUFFIX ImageView
+//#define BASE_TYPE android.widget.ImageView
+//#include ThemedView.java.frag
diff --git a/mobile/android/base/widget/ThemedLinearLayout.java.in b/mobile/android/base/widget/ThemedLinearLayout.java.in
index 28a88980fbc..5f4d4c6b67f 100644
--- a/mobile/android/base/widget/ThemedLinearLayout.java.in
+++ b/mobile/android/base/widget/ThemedLinearLayout.java.in
@@ -1,4 +1,4 @@
-#filter substitution
-#define VIEW_NAME_SUFFIX LinearLayout
-#define BASE_TYPE android.widget.LinearLayout
-#include ThemedView.java.frag
+//#filter substitution
+//#define VIEW_NAME_SUFFIX LinearLayout
+//#define BASE_TYPE android.widget.LinearLayout
+//#include ThemedView.java.frag
diff --git a/mobile/android/base/widget/ThemedRelativeLayout.java.in b/mobile/android/base/widget/ThemedRelativeLayout.java.in
index 63b18fc2dbb..44aa99bfd82 100644
--- a/mobile/android/base/widget/ThemedRelativeLayout.java.in
+++ b/mobile/android/base/widget/ThemedRelativeLayout.java.in
@@ -1,4 +1,4 @@
-#filter substitution
-#define VIEW_NAME_SUFFIX RelativeLayout
-#define BASE_TYPE android.widget.RelativeLayout
-#include ThemedView.java.frag
+//#filter substitution
+//#define VIEW_NAME_SUFFIX RelativeLayout
+//#define BASE_TYPE android.widget.RelativeLayout
+//#include ThemedView.java.frag
diff --git a/mobile/android/base/widget/ThemedTextSwitcher.java.in b/mobile/android/base/widget/ThemedTextSwitcher.java.in
index f70c20beee5..49d2fa2eb39 100644
--- a/mobile/android/base/widget/ThemedTextSwitcher.java.in
+++ b/mobile/android/base/widget/ThemedTextSwitcher.java.in
@@ -1,4 +1,4 @@
-#filter substitution
-#define VIEW_NAME_SUFFIX TextSwitcher
-#define BASE_TYPE android.widget.TextSwitcher
-#include ThemedView.java.frag
+//#filter substitution
+//#define VIEW_NAME_SUFFIX TextSwitcher
+//#define BASE_TYPE android.widget.TextSwitcher
+//#include ThemedView.java.frag
diff --git a/mobile/android/base/widget/ThemedTextView.java.in b/mobile/android/base/widget/ThemedTextView.java.in
index 6b2a1b6ee2a..13b560f6369 100644
--- a/mobile/android/base/widget/ThemedTextView.java.in
+++ b/mobile/android/base/widget/ThemedTextView.java.in
@@ -1,4 +1,4 @@
-#filter substitution
-#define VIEW_NAME_SUFFIX TextView
-#define BASE_TYPE android.widget.TextView
-#include ThemedView.java.frag
+//#filter substitution
+//#define VIEW_NAME_SUFFIX TextView
+//#define BASE_TYPE android.widget.TextView
+//#include ThemedView.java.frag
diff --git a/mobile/android/base/widget/ThemedView.java.in b/mobile/android/base/widget/ThemedView.java.in
index 8d3deb11aee..731c6456fa4 100644
--- a/mobile/android/base/widget/ThemedView.java.in
+++ b/mobile/android/base/widget/ThemedView.java.in
@@ -1,4 +1,4 @@
-#filter substitution
-#define VIEW_NAME_SUFFIX View
-#define BASE_TYPE android.view.View
-#include ThemedView.java.frag
+//#filter substitution
+//#define VIEW_NAME_SUFFIX View
+//#define BASE_TYPE android.view.View
+//#include ThemedView.java.frag

From 1a28cd5cbc876593978652d70617481ea8d2ea03 Mon Sep 17 00:00:00 2001
From: Panos Astithas 
Date: Thu, 9 Oct 2014 19:51:47 +0300
Subject: [PATCH 06/17] Strings for an optional badge to the hamburger menu
 when updates are available (bug 1080690); r=dao,jwalker

---
 browser/locales/en-US/chrome/browser/browser.properties | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/browser/locales/en-US/chrome/browser/browser.properties b/browser/locales/en-US/chrome/browser/browser.properties
index c450a31dde2..c7fdc70c737 100644
--- a/browser/locales/en-US/chrome/browser/browser.properties
+++ b/browser/locales/en-US/chrome/browser/browser.properties
@@ -604,3 +604,12 @@ slowStartup.disableNotificationButton.accesskey = A
 customizeTips.tip0 = %1$S: You can customize %2$S to work the way you do. Simply drag any of the above to the menu or toolbar. %3$S about customizing %2$S.
 customizeTips.tip0.hint = Hint
 customizeTips.tip0.learnMore = Learn more
+
+# LOCALIZATION NOTE(appmenu.*.description, appmenu.*.label): these are used for
+# the appmenu labels and buttons that appear when an update is staged for
+# installation or a background update has failed and a manual download is required.
+# %S is brandShortName
+appmenu.restartNeeded.description = Restart %S to apply updates
+appmenu.updateFailed.description = Background update failed, please download update
+appmenu.restartBrowserButton.label = Restart %S
+appmenu.downloadUpdateButton.label = Download Update

From a57d3f5ce6b7db399dd22f31652f537cd35fe559 Mon Sep 17 00:00:00 2001
From: Chris Kitching 
Date: Fri, 10 Oct 2014 20:40:20 +0100
Subject: [PATCH 07/17] Bug 1081276: Don't use Java assertions. r=rnewman

---
 mobile/android/base/webapp/InstallListener.java | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/mobile/android/base/webapp/InstallListener.java b/mobile/android/base/webapp/InstallListener.java
index ce07fbbf139..1d02346a541 100644
--- a/mobile/android/base/webapp/InstallListener.java
+++ b/mobile/android/base/webapp/InstallListener.java
@@ -10,6 +10,7 @@ import java.io.IOException;
 
 import org.json.JSONException;
 import org.json.JSONObject;
+import org.mozilla.gecko.Assert;
 import org.mozilla.gecko.GeckoThread;
 
 import android.content.BroadcastReceiver;
@@ -31,8 +32,8 @@ public class InstallListener extends BroadcastReceiver {
         mData = data;
         mApkFile = apkFile;
         mManifestUrl = manifestUrl;
-        assert mManifestUrl != null;
-        assert mApkFile != null && mApkFile.exists();
+        Assert.isNotNull(mManifestUrl);
+        Assert.isTrue(mApkFile != null && mApkFile.exists());
     }
 
     public boolean isReceived() {

From fdd9ff084e3c4c4c0e378f5dddfcec2750c5c03b Mon Sep 17 00:00:00 2001
From: Chris Kitching 
Date: Fri, 10 Oct 2014 20:52:48 +0100
Subject: [PATCH 08/17] Bug 1081281: Don't double-box in ContactService.
 r=rnewman

---
 mobile/android/base/ContactService.java | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/mobile/android/base/ContactService.java b/mobile/android/base/ContactService.java
index 7b3dedfc083..36fd19c41b9 100644
--- a/mobile/android/base/ContactService.java
+++ b/mobile/android/base/ContactService.java
@@ -1898,7 +1898,7 @@ public class ContactService implements GeckoEventListener {
     private int getAddressType(String addressType) {
         initAddressTypesMap();
         Integer type = mAddressTypesMap.get(addressType.toLowerCase());
-        return (type != null ? Integer.valueOf(type) : StructuredPostal.TYPE_CUSTOM);
+        return type != null ? type : StructuredPostal.TYPE_CUSTOM;
     }
 
     private void initAddressTypesMap() {
@@ -1914,7 +1914,7 @@ public class ContactService implements GeckoEventListener {
     private int getPhoneType(String phoneType) {
         initPhoneTypesMap();
         Integer type = mPhoneTypesMap.get(phoneType.toLowerCase());
-        return (type != null ? Integer.valueOf(type) : Phone.TYPE_CUSTOM);
+        return type != null ? type : Phone.TYPE_CUSTOM;
     }
 
     private void initPhoneTypesMap() {
@@ -1949,7 +1949,7 @@ public class ContactService implements GeckoEventListener {
     private int getEmailType(String emailType) {
         initEmailTypesMap();
         Integer type = mEmailTypesMap.get(emailType.toLowerCase());
-        return (type != null ? Integer.valueOf(type) : Email.TYPE_CUSTOM);
+        return type != null ? type : Email.TYPE_CUSTOM;
     }
 
     private void initEmailTypesMap() {
@@ -1966,7 +1966,7 @@ public class ContactService implements GeckoEventListener {
     private int getWebsiteType(String webisteType) {
         initWebsiteTypesMap();
         Integer type = mWebsiteTypesMap.get(webisteType.toLowerCase());
-        return (type != null ? Integer.valueOf(type) : Website.TYPE_CUSTOM);
+        return type != null ? type : Website.TYPE_CUSTOM;
     }
 
     private void initWebsiteTypesMap() {
@@ -1986,7 +1986,7 @@ public class ContactService implements GeckoEventListener {
     private int getImType(String imType) {
         initImTypesMap();
         Integer type = mImTypesMap.get(imType.toLowerCase());
-        return (type != null ? Integer.valueOf(type) : Im.TYPE_CUSTOM);
+        return type != null ? type : Im.TYPE_CUSTOM;
     }
 
     private void initImTypesMap() {

From f66158ea725a5ca1c2a4eb4b757cf6a02a74af61 Mon Sep 17 00:00:00 2001
From: Chris Kitching 
Date: Fri, 10 Oct 2014 21:01:01 +0100
Subject: [PATCH 09/17] Bug 1081287: Use EnumMap where possible. r=rnewman * *
 * Bug 1081287: Use EnumMap where possible in sync. r=rnewman * * * Bug
 1081287: Use EnumMap where possible. r=rnewman * * * Bug 1081287: Use EnumMap
 where possible. r=rnewman * * * Bug 1081287: Use EnumMap where possible.
 r=rnewman

---
 mobile/android/base/fxa/login/FxAccountLoginStateMachine.java | 4 ++--
 mobile/android/base/fxa/sync/FxAccountGlobalSession.java      | 4 +++-
 mobile/android/base/home/RemoteTabsPanel.java                 | 4 +++-
 mobile/android/base/sync/GlobalSession.java                   | 3 ++-
 4 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/mobile/android/base/fxa/login/FxAccountLoginStateMachine.java b/mobile/android/base/fxa/login/FxAccountLoginStateMachine.java
index 84b16d8b209..34e50754191 100644
--- a/mobile/android/base/fxa/login/FxAccountLoginStateMachine.java
+++ b/mobile/android/base/fxa/login/FxAccountLoginStateMachine.java
@@ -5,7 +5,7 @@
 package org.mozilla.gecko.fxa.login;
 
 import java.security.NoSuchAlgorithmException;
-import java.util.HashSet;
+import java.util.EnumSet;
 import java.util.Set;
 
 import org.mozilla.gecko.background.fxa.FxAccountClient;
@@ -29,7 +29,7 @@ public class FxAccountLoginStateMachine {
     protected final LoginStateMachineDelegate delegate;
     protected final StateLabel desiredStateLabel;
     // It's as difficult to detect arbitrary cycles as repeated states.
-    protected final Set stateLabelsSeen = new HashSet();
+    protected final Set stateLabelsSeen = EnumSet.noneOf(StateLabel.class);
 
     protected ExecuteDelegate(StateLabel initialStateLabel, StateLabel desiredStateLabel, LoginStateMachineDelegate delegate) {
       this.delegate = delegate;
diff --git a/mobile/android/base/fxa/sync/FxAccountGlobalSession.java b/mobile/android/base/fxa/sync/FxAccountGlobalSession.java
index fdeb18dbb4a..6746685593d 100644
--- a/mobile/android/base/fxa/sync/FxAccountGlobalSession.java
+++ b/mobile/android/base/fxa/sync/FxAccountGlobalSession.java
@@ -7,7 +7,9 @@ package org.mozilla.gecko.fxa.sync;
 import java.io.IOException;
 import java.net.URISyntaxException;
 import java.util.Collections;
+import java.util.EnumMap;
 import java.util.HashMap;
+import java.util.Map;
 
 import org.json.simple.parser.ParseException;
 import org.mozilla.gecko.sync.GlobalSession;
@@ -34,7 +36,7 @@ public class FxAccountGlobalSession extends GlobalSession {
   @Override
   public void prepareStages() {
     super.prepareStages();
-    HashMap stages = new HashMap();
+    Map stages = new EnumMap<>(Stage.class);
     stages.putAll(this.stages);
     stages.put(Stage.ensureClusterURL, new CheckPreconditionsStage());
     this.stages = Collections.unmodifiableMap(stages);
diff --git a/mobile/android/base/home/RemoteTabsPanel.java b/mobile/android/base/home/RemoteTabsPanel.java
index 9cdea093d4f..0b8412d5783 100644
--- a/mobile/android/base/home/RemoteTabsPanel.java
+++ b/mobile/android/base/home/RemoteTabsPanel.java
@@ -5,7 +5,9 @@
 
 package org.mozilla.gecko.home;
 
+import java.util.EnumMap;
 import java.util.HashMap;
+import java.util.Map;
 
 import org.mozilla.gecko.R;
 import org.mozilla.gecko.fxa.AccountLoader;
@@ -52,7 +54,7 @@ public class RemoteTabsPanel extends HomeFragment {
     // system account states. We don't want to re-create panels unnecessarily,
     // because that can cause flickering. Be aware that null is a valid key; it
     // corresponds to "no Account, neither Firefox nor Legacy Sync."
-    private final HashMap mFragmentCache = new HashMap();
+    private final Map mFragmentCache = new EnumMap<>(Action.class);
 
     @Override
     public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
diff --git a/mobile/android/base/sync/GlobalSession.java b/mobile/android/base/sync/GlobalSession.java
index ab3302ce6ed..fddeedf2938 100644
--- a/mobile/android/base/sync/GlobalSession.java
+++ b/mobile/android/base/sync/GlobalSession.java
@@ -10,6 +10,7 @@ import java.net.URISyntaxException;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
+import java.util.EnumMap;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.List;
@@ -174,7 +175,7 @@ public class GlobalSession implements HttpResponseObserver {
   }
 
   protected void prepareStages() {
-    HashMap stages = new HashMap();
+    Map stages = new EnumMap(Stage.class);
 
     stages.put(Stage.checkPreconditions,      new CheckPreconditionsStage());
     stages.put(Stage.ensureClusterURL,        new EnsureClusterURLStage(nodeAssignmentCallback));

From 1c7d9eeb0ab997c64134e335631ad2bd32ad534b Mon Sep 17 00:00:00 2001
From: Chris Kitching 
Date: Fri, 10 Oct 2014 21:02:18 +0100
Subject: [PATCH 10/17] Bug 1081288: Don't call String.toString. r=rnewman

---
 mobile/android/base/home/BrowserSearch.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mobile/android/base/home/BrowserSearch.java b/mobile/android/base/home/BrowserSearch.java
index c3b0f57584b..506a71886d1 100644
--- a/mobile/android/base/home/BrowserSearch.java
+++ b/mobile/android/base/home/BrowserSearch.java
@@ -441,7 +441,7 @@ public class BrowserSearch extends HomeFragment
 
             if (searchCount == 0) {
                 // Prefetch the first item in the list since it's weighted the highest
-                GeckoAppShell.sendEventToGecko(GeckoEvent.createBroadcastEvent("Session:Prefetch", url.toString()));
+                GeckoAppShell.sendEventToGecko(GeckoEvent.createBroadcastEvent("Session:Prefetch", url));
             }
 
             // Does the completion match against the whole URL? This will match

From ec1a4b949fe4137b308eafe5b59d3d82ff3a44d8 Mon Sep 17 00:00:00 2001
From: Chris Kitching 
Date: Fri, 10 Oct 2014 21:53:22 +0100
Subject: [PATCH 11/17] Bug 1081317: Don't create redundant temporary objects
 when converting primitives to strings. r=rnewman * * * Bug 1081317: Don't
 create redundant temporary objects when converting primitives to strings.
 r=rnewman

---
 mobile/android/base/db/PasswordsProvider.java              | 2 +-
 mobile/android/base/sync/config/ConfigurationMigrator.java | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/mobile/android/base/db/PasswordsProvider.java b/mobile/android/base/db/PasswordsProvider.java
index c7fa004ddac..5798ef6a3a2 100644
--- a/mobile/android/base/db/PasswordsProvider.java
+++ b/mobile/android/base/db/PasswordsProvider.java
@@ -176,7 +176,7 @@ public class PasswordsProvider extends SQLiteBridgeContentProvider {
                     String guid = Utils.generateGuid();
                     values.put(Passwords.GUID, guid);
                 }
-                String nowString = new Long(now).toString();
+                String nowString = Long.toString(now);
                 DBUtils.replaceKey(values, null, Passwords.HOSTNAME, "");
                 DBUtils.replaceKey(values, null, Passwords.HTTP_REALM, "");
                 DBUtils.replaceKey(values, null, Passwords.FORM_SUBMIT_URL, "");
diff --git a/mobile/android/base/sync/config/ConfigurationMigrator.java b/mobile/android/base/sync/config/ConfigurationMigrator.java
index 12138e35a44..6cbd7c962e0 100644
--- a/mobile/android/base/sync/config/ConfigurationMigrator.java
+++ b/mobile/android/base/sync/config/ConfigurationMigrator.java
@@ -239,7 +239,7 @@ public class ConfigurationMigrator {
     }
     if (numClients > -1) {
       Logger.debug(LOG_TAG, "Migrated clients count.");
-      accountManager.setUserData(account, V1_PREF_NUM_CLIENTS, new Long(numClients).toString());
+      accountManager.setUserData(account, V1_PREF_NUM_CLIENTS, Long.toString(numClients));
       count += 1;
     }
     return count;

From 14ddbd77e123afabd0723e24f9bc317a9c456a4b Mon Sep 17 00:00:00 2001
From: Chris Kitching 
Date: Sat, 11 Oct 2014 00:08:17 +0100
Subject: [PATCH 12/17] Bug 1081393: Don't compare enums with equals()
 r=rnewman

---
 mobile/android/base/DynamicToolbar.java      | 2 +-
 mobile/android/base/TextSelectionHandle.java | 9 +++++----
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/mobile/android/base/DynamicToolbar.java b/mobile/android/base/DynamicToolbar.java
index 2210e7ee7bf..ca8ec73e99e 100644
--- a/mobile/android/base/DynamicToolbar.java
+++ b/mobile/android/base/DynamicToolbar.java
@@ -106,7 +106,7 @@ public class DynamicToolbar {
             return;
         }
 
-        final boolean immediate = transition.equals(VisibilityTransition.IMMEDIATE);
+        final boolean immediate = transition == VisibilityTransition.IMMEDIATE;
         if (visible) {
             layerView.getLayerMarginsAnimator().showMargins(immediate);
         } else {
diff --git a/mobile/android/base/TextSelectionHandle.java b/mobile/android/base/TextSelectionHandle.java
index 78762358ef3..bd71fe005f0 100644
--- a/mobile/android/base/TextSelectionHandle.java
+++ b/mobile/android/base/TextSelectionHandle.java
@@ -132,7 +132,7 @@ class TextSelectionHandle extends ImageView implements View.OnTouchListener {
         // will tell us the position of the caret, so we set the handle
         // position then. This allows us to lock the handle to wherever the
         // caret appears.
-        if (!mHandleType.equals(HandleType.MIDDLE)) {
+        if (mHandleType != HandleType.MIDDLE) {
             setLayoutPosition();
         }
     }
@@ -166,12 +166,13 @@ class TextSelectionHandle extends ImageView implements View.OnTouchListener {
     }
 
     private float adjustLeftForHandle() {
-        if (mHandleType.equals(HandleType.START))
+        if (mHandleType == HandleType.START) {
             return mIsRTL ? mShadow : mWidth - mShadow;
-        else if (mHandleType.equals(HandleType.MIDDLE))
+        } else if (mHandleType == HandleType.MIDDLE) {
             return mWidth / 2;
-        else
+        } else {
             return mIsRTL ? mWidth - mShadow : mShadow;
+        }
     }
 
     private void setLayoutPosition() {

From f4746e8579c277b7e4bfad598ac8f24d21eddd1c Mon Sep 17 00:00:00 2001
From: Chris Kitching 
Date: Sat, 11 Oct 2014 00:15:08 +0100
Subject: [PATCH 13/17] Bug 1081395: Stop using tabs for indentation. r=rnewman

---
 .../base/LightweightThemeDrawable.java        |  19 +-
 mobile/android/base/TextSelection.java        |  12 +-
 mobile/android/base/animation/ViewHelper.java |  84 ++++----
 .../preferences/PreferenceManagerCompat.java  | 184 +++++++++---------
 .../base/prompts/ColorPickerInput.java        |   2 +-
 .../base/tests/helpers/AssertionHelper.java   |   4 +-
 .../android/base/updater/UpdateService.java   |  16 +-
 .../base/widget/TabThumbnailWrapper.java      |   2 +-
 8 files changed, 162 insertions(+), 161 deletions(-)

diff --git a/mobile/android/base/LightweightThemeDrawable.java b/mobile/android/base/LightweightThemeDrawable.java
index a5db7a423dc..090fcdcea80 100644
--- a/mobile/android/base/LightweightThemeDrawable.java
+++ b/mobile/android/base/LightweightThemeDrawable.java
@@ -53,8 +53,9 @@ public class LightweightThemeDrawable extends Drawable {
     @Override
     public void draw(Canvas canvas) {
         // Draw the colors, if available.
-        if (mColorPaint != null)
+        if (mColorPaint != null) {
             canvas.drawPaint(mColorPaint);
+        }
 
         // Draw the bitmap.
         canvas.drawPaint(mPaint);
@@ -75,7 +76,7 @@ public class LightweightThemeDrawable extends Drawable {
     @Override
     public void setColorFilter(ColorFilter filter) {
         mPaint.setColorFilter(filter);
-    }		
+    }
 
     /**
      * Creates a paint that paint a particular color.
@@ -112,17 +113,17 @@ public class LightweightThemeDrawable extends Drawable {
     }
 
     private void initializeBitmapShader() {
-	// A bitmap-shader to draw the bitmap.
+        // A bitmap-shader to draw the bitmap.
         // Clamp mode will repeat the last row of pixels.
         // Hence its better to have an endAlpha of 0 for the linear-gradient.
-	BitmapShader bitmapShader = new BitmapShader(mBitmap, Shader.TileMode.CLAMP, Shader.TileMode.CLAMP);
+        BitmapShader bitmapShader = new BitmapShader(mBitmap, Shader.TileMode.CLAMP, Shader.TileMode.CLAMP);
 
-	// A linear-gradient to specify the opacity of the bitmap.
-	LinearGradient gradient = new LinearGradient(0, 0, 0, mBitmap.getHeight(), mStartColor, mEndColor, Shader.TileMode.CLAMP);
+        // A linear-gradient to specify the opacity of the bitmap.
+        LinearGradient gradient = new LinearGradient(0, 0, 0, mBitmap.getHeight(), mStartColor, mEndColor, Shader.TileMode.CLAMP);
 
-	// Make a combined shader -- a performance win.
+        // Make a combined shader -- a performance win.
         // The linear-gradient is the 'SRC' and the bitmap-shader is the 'DST'.
-	// Drawing the DST in the SRC will provide the opacity.
-	mPaint.setShader(new ComposeShader(bitmapShader, gradient, PorterDuff.Mode.DST_IN));
+        // Drawing the DST in the SRC will provide the opacity.
+        mPaint.setShader(new ComposeShader(bitmapShader, gradient, PorterDuff.Mode.DST_IN));
     }
 }
diff --git a/mobile/android/base/TextSelection.java b/mobile/android/base/TextSelection.java
index 67afa464eed..7e55d8f612b 100644
--- a/mobile/android/base/TextSelection.java
+++ b/mobile/android/base/TextSelection.java
@@ -189,11 +189,11 @@ class TextSelection extends Layer implements GeckoEventListener {
     }
 
     private void showActionMode(final JSONArray items) {
-	String itemsString = items.toString();
-	if (itemsString.equals(mCurrentItems)) {
-	    return;
-	}
-	mCurrentItems = itemsString;
+        String itemsString = items.toString();
+        if (itemsString.equals(mCurrentItems)) {
+            return;
+        }
+        mCurrentItems = itemsString;
 
         if (mCallback != null) {
             mCallback.updateItems(items);
@@ -214,7 +214,7 @@ class TextSelection extends Layer implements GeckoEventListener {
             final ActionModeCompat.Presenter presenter = (ActionModeCompat.Presenter) context;
             presenter.endActionModeCompat();
         }
-	mCurrentItems = null;
+        mCurrentItems = null;
     }
 
     @Override
diff --git a/mobile/android/base/animation/ViewHelper.java b/mobile/android/base/animation/ViewHelper.java
index 65fe9eff4e1..64f2dc359b4 100644
--- a/mobile/android/base/animation/ViewHelper.java
+++ b/mobile/android/base/animation/ViewHelper.java
@@ -7,56 +7,56 @@ package org.mozilla.gecko.animation;
 import android.view.View;
 
 public final class ViewHelper {
-	private ViewHelper() {
-	}
+    private ViewHelper() {
+    }
 
-	public static float getTranslationX(View view) {
-		AnimatorProxy proxy = AnimatorProxy.create(view);
-		return proxy.getTranslationX();
-	}
+    public static float getTranslationX(View view) {
+        AnimatorProxy proxy = AnimatorProxy.create(view);
+        return proxy.getTranslationX();
+    }
 
-	public static void setTranslationX(View view, float translationX) {
-		final AnimatorProxy proxy = AnimatorProxy.create(view);
-		proxy.setTranslationX(translationX);
-	}
+    public static void setTranslationX(View view, float translationX) {
+        final AnimatorProxy proxy = AnimatorProxy.create(view);
+        proxy.setTranslationX(translationX);
+    }
 
-	public static float getTranslationY(View view) {
-		final AnimatorProxy proxy = AnimatorProxy.create(view);
-		return proxy.getTranslationY();
-	}
+    public static float getTranslationY(View view) {
+        final AnimatorProxy proxy = AnimatorProxy.create(view);
+        return proxy.getTranslationY();
+    }
 
-	public static void setTranslationY(View view, float translationY) {
-		final AnimatorProxy proxy = AnimatorProxy.create(view);
-		proxy.setTranslationY(translationY);
-	}
+    public static void setTranslationY(View view, float translationY) {
+        final AnimatorProxy proxy = AnimatorProxy.create(view);
+        proxy.setTranslationY(translationY);
+    }
 
-	public static float getAlpha(View view) {
-		final AnimatorProxy proxy = AnimatorProxy.create(view);
-		return proxy.getAlpha();
-	}
+    public static float getAlpha(View view) {
+        final AnimatorProxy proxy = AnimatorProxy.create(view);
+        return proxy.getAlpha();
+    }
 
-	public static void setAlpha(View view, float alpha) {
-		final AnimatorProxy proxy = AnimatorProxy.create(view);
-		proxy.setAlpha(alpha);
-	}
+    public static void setAlpha(View view, float alpha) {
+        final AnimatorProxy proxy = AnimatorProxy.create(view);
+        proxy.setAlpha(alpha);
+    }
 
-	public static int getWidth(View view) {
-		final AnimatorProxy proxy = AnimatorProxy.create(view);
-		return proxy.getWidth();
-	}
+    public static int getWidth(View view) {
+        final AnimatorProxy proxy = AnimatorProxy.create(view);
+        return proxy.getWidth();
+    }
 
-	public static void setWidth(View view, int width) {
-		final AnimatorProxy proxy = AnimatorProxy.create(view);
-		proxy.setWidth(width);
-	}
+    public static void setWidth(View view, int width) {
+        final AnimatorProxy proxy = AnimatorProxy.create(view);
+        proxy.setWidth(width);
+    }
 
-	public static int getHeight(View view) {
-		final AnimatorProxy proxy = AnimatorProxy.create(view);
-		return proxy.getHeight();
-	}
+    public static int getHeight(View view) {
+        final AnimatorProxy proxy = AnimatorProxy.create(view);
+        return proxy.getHeight();
+    }
 
-	public static void setHeight(View view, int height) {
-		final AnimatorProxy proxy = AnimatorProxy.create(view);
-		proxy.setHeight(height);
-	}
+    public static void setHeight(View view, int height) {
+        final AnimatorProxy proxy = AnimatorProxy.create(view);
+        proxy.setHeight(height);
+    }
 }
diff --git a/mobile/android/base/background/preferences/PreferenceManagerCompat.java b/mobile/android/base/background/preferences/PreferenceManagerCompat.java
index 91090e43ead..f27dd53e691 100644
--- a/mobile/android/base/background/preferences/PreferenceManagerCompat.java
+++ b/mobile/android/base/background/preferences/PreferenceManagerCompat.java
@@ -32,7 +32,7 @@ import android.util.Log;
 
 public class PreferenceManagerCompat {
 
-	private static final String TAG = PreferenceManagerCompat.class.getSimpleName();
+    private static final String TAG = PreferenceManagerCompat.class.getSimpleName();
 
     /**
      * Interface definition for a callback to be invoked when a
@@ -52,22 +52,22 @@ public class PreferenceManagerCompat {
         boolean onPreferenceTreeClick(PreferenceScreen preferenceScreen, Preference preference);
     }
 
-	static PreferenceManager newInstance(Activity activity, int firstRequestCode) {
-		try {
-			Constructor c = PreferenceManager.class.getDeclaredConstructor(Activity.class, int.class);
-			c.setAccessible(true);
-			return c.newInstance(activity, firstRequestCode);
-		} catch (Exception e) {
-			Log.w(TAG, "Couldn't call constructor PreferenceManager by reflection", e);
-		}
-		return null;
-	}
+    static PreferenceManager newInstance(Activity activity, int firstRequestCode) {
+        try {
+            Constructor c = PreferenceManager.class.getDeclaredConstructor(Activity.class, int.class);
+            c.setAccessible(true);
+            return c.newInstance(activity, firstRequestCode);
+        } catch (Exception e) {
+            Log.w(TAG, "Couldn't call constructor PreferenceManager by reflection", e);
+        }
+        return null;
+    }
 
-	/**
+    /**
      * Sets the owning preference fragment
      */
     static void setFragment(PreferenceManager manager, PreferenceFragment fragment) {
-	// stub
+        // stub
     }
 
     /**
@@ -76,34 +76,34 @@ public class PreferenceManagerCompat {
      *
      * @param listener The callback to be invoked.
      */
-	static void setOnPreferenceTreeClickListener(PreferenceManager manager, final OnPreferenceTreeClickListener listener) {
-		try {
-			Field onPreferenceTreeClickListener = PreferenceManager.class.getDeclaredField("mOnPreferenceTreeClickListener");
-			onPreferenceTreeClickListener.setAccessible(true);
-			if (listener != null) {
-				Object proxy = Proxy.newProxyInstance(
-						onPreferenceTreeClickListener.getType().getClassLoader(),
-						new Class[] { onPreferenceTreeClickListener.getType() },
-						new InvocationHandler() {
-					@Override
+    static void setOnPreferenceTreeClickListener(PreferenceManager manager, final OnPreferenceTreeClickListener listener) {
+        try {
+            Field onPreferenceTreeClickListener = PreferenceManager.class.getDeclaredField("mOnPreferenceTreeClickListener");
+            onPreferenceTreeClickListener.setAccessible(true);
+            if (listener != null) {
+                Object proxy = Proxy.newProxyInstance(
+                        onPreferenceTreeClickListener.getType().getClassLoader(),
+                        new Class[] { onPreferenceTreeClickListener.getType() },
+                        new InvocationHandler() {
+                    @Override
           public Object invoke(Object proxy, Method method, Object[] args) {
-						if (method.getName().equals("onPreferenceTreeClick")) {
-							return Boolean.valueOf(listener.onPreferenceTreeClick((PreferenceScreen) args[0], (Preference) args[1]));
-						} else {
-							return null;
-						}
-					}
-				});
-				onPreferenceTreeClickListener.set(manager, proxy);
-			} else {
-				onPreferenceTreeClickListener.set(manager, null);
-			}
-		} catch (Exception e) {
-			Log.w(TAG, "Couldn't set PreferenceManager.mOnPreferenceTreeClickListener by reflection", e);
-		}
-	}
+                        if (method.getName().equals("onPreferenceTreeClick")) {
+                            return Boolean.valueOf(listener.onPreferenceTreeClick((PreferenceScreen) args[0], (Preference) args[1]));
+                        } else {
+                            return null;
+                        }
+                    }
+                });
+                onPreferenceTreeClickListener.set(manager, proxy);
+            } else {
+                onPreferenceTreeClickListener.set(manager, null);
+            }
+        } catch (Exception e) {
+            Log.w(TAG, "Couldn't set PreferenceManager.mOnPreferenceTreeClickListener by reflection", e);
+        }
+    }
 
-	/**
+    /**
      * Inflates a preference hierarchy from the preference hierarchies of
      * {@link Activity Activities} that match the given {@link Intent}. An
      * {@link Activity} defines its preference hierarchy with meta-data using
@@ -118,19 +118,19 @@ public class PreferenceManagerCompat {
      * @return The root hierarchy (if one was not provided, the new hierarchy's
      *         root).
      */
-	static PreferenceScreen inflateFromIntent(PreferenceManager manager, Intent intent, PreferenceScreen screen) {
-		try {
+    static PreferenceScreen inflateFromIntent(PreferenceManager manager, Intent intent, PreferenceScreen screen) {
+        try {
             Method m = PreferenceManager.class.getDeclaredMethod("inflateFromIntent", Intent.class, PreferenceScreen.class);
             m.setAccessible(true);
             PreferenceScreen prefScreen = (PreferenceScreen) m.invoke(manager, intent, screen);
             return prefScreen;
         } catch (Exception e) {
-			Log.w(TAG, "Couldn't call PreferenceManager.inflateFromIntent by reflection", e);
-		}
-		return null;
-	}
+            Log.w(TAG, "Couldn't call PreferenceManager.inflateFromIntent by reflection", e);
+        }
+        return null;
+    }
 
-	/**
+    /**
      * Inflates a preference hierarchy from XML. If a preference hierarchy is
      * given, the new preference hierarchies will be merged in.
      *
@@ -142,90 +142,90 @@ public class PreferenceManagerCompat {
      *         root).
      * @hide
      */
-	static PreferenceScreen inflateFromResource(PreferenceManager manager, Activity activity, int resId, PreferenceScreen screen) {
-		try {
+    static PreferenceScreen inflateFromResource(PreferenceManager manager, Activity activity, int resId, PreferenceScreen screen) {
+        try {
             Method m = PreferenceManager.class.getDeclaredMethod("inflateFromResource", Context.class, int.class, PreferenceScreen.class);
             m.setAccessible(true);
             PreferenceScreen prefScreen = (PreferenceScreen) m.invoke(manager, activity, resId, screen);
             return prefScreen;
         } catch (Exception e) {
-			Log.w(TAG, "Couldn't call PreferenceManager.inflateFromResource by reflection", e);
-		}
-		return null;
-	}
+            Log.w(TAG, "Couldn't call PreferenceManager.inflateFromResource by reflection", e);
+        }
+        return null;
+    }
 
-	/**
+    /**
      * Returns the root of the preference hierarchy managed by this class.
      *
      * @return The {@link PreferenceScreen} object that is at the root of the hierarchy.
      */
-	static PreferenceScreen getPreferenceScreen(PreferenceManager manager) {
-		try {
+    static PreferenceScreen getPreferenceScreen(PreferenceManager manager) {
+        try {
             Method m = PreferenceManager.class.getDeclaredMethod("getPreferenceScreen");
             m.setAccessible(true);
             return (PreferenceScreen) m.invoke(manager);
         } catch (Exception e) {
-			Log.w(TAG, "Couldn't call PreferenceManager.getPreferenceScreen by reflection", e);
-		}
-		return null;
-	}
+            Log.w(TAG, "Couldn't call PreferenceManager.getPreferenceScreen by reflection", e);
+        }
+        return null;
+    }
 
-	/**
+    /**
      * Called by the {@link PreferenceManager} to dispatch a subactivity result.
      */
-	static void dispatchActivityResult(PreferenceManager manager, int requestCode, int resultCode, Intent data) {
-		try {
+    static void dispatchActivityResult(PreferenceManager manager, int requestCode, int resultCode, Intent data) {
+        try {
             Method m = PreferenceManager.class.getDeclaredMethod("dispatchActivityResult", int.class, int.class, Intent.class);
             m.setAccessible(true);
             m.invoke(manager, requestCode, resultCode, data);
         } catch (Exception e) {
-			Log.w(TAG, "Couldn't call PreferenceManager.dispatchActivityResult by reflection", e);
-		}
-	}
+            Log.w(TAG, "Couldn't call PreferenceManager.dispatchActivityResult by reflection", e);
+        }
+    }
 
-	/**
+    /**
      * Called by the {@link PreferenceManager} to dispatch the activity stop
      * event.
      */
-	static void dispatchActivityStop(PreferenceManager manager) {
-		try {
+    static void dispatchActivityStop(PreferenceManager manager) {
+        try {
             Method m = PreferenceManager.class.getDeclaredMethod("dispatchActivityStop");
             m.setAccessible(true);
             m.invoke(manager);
         } catch (Exception e) {
-			Log.w(TAG, "Couldn't call PreferenceManager.dispatchActivityStop by reflection", e);
-		}
-	}
+            Log.w(TAG, "Couldn't call PreferenceManager.dispatchActivityStop by reflection", e);
+        }
+    }
 
-	/**
+    /**
      * Called by the {@link PreferenceManager} to dispatch the activity destroy
      * event.
      */
-	static void dispatchActivityDestroy(PreferenceManager manager) {
-		try {
-			Method m = PreferenceManager.class.getDeclaredMethod("dispatchActivityDestroy");
-			m.setAccessible(true);
-			m.invoke(manager);
-		} catch (Exception e) {
-			Log.w(TAG, "Couldn't call PreferenceManager.dispatchActivityDestroy by reflection", e);
-		}
-	}
+    static void dispatchActivityDestroy(PreferenceManager manager) {
+        try {
+            Method m = PreferenceManager.class.getDeclaredMethod("dispatchActivityDestroy");
+            m.setAccessible(true);
+            m.invoke(manager);
+        } catch (Exception e) {
+            Log.w(TAG, "Couldn't call PreferenceManager.dispatchActivityDestroy by reflection", e);
+        }
+    }
 
-	/**
+    /**
      * Sets the root of the preference hierarchy.
      *
      * @param preferenceScreen The root {@link PreferenceScreen} of the preference hierarchy.
      * @return Whether the {@link PreferenceScreen} given is different than the previous.
      */
-	static boolean setPreferences(PreferenceManager manager, PreferenceScreen screen) {
-		try {
-			Method m = PreferenceManager.class.getDeclaredMethod("setPreferences", PreferenceScreen.class);
-			m.setAccessible(true);
-			return ((Boolean) m.invoke(manager, screen));
-		} catch (Exception e) {
-			Log.w(TAG, "Couldn't call PreferenceManager.setPreferences by reflection", e);
-		}
-		return false;
-	}
+    static boolean setPreferences(PreferenceManager manager, PreferenceScreen screen) {
+        try {
+            Method m = PreferenceManager.class.getDeclaredMethod("setPreferences", PreferenceScreen.class);
+            m.setAccessible(true);
+            return ((Boolean) m.invoke(manager, screen));
+        } catch (Exception e) {
+            Log.w(TAG, "Couldn't call PreferenceManager.setPreferences by reflection", e);
+        }
+        return false;
+    }
 
 }
diff --git a/mobile/android/base/prompts/ColorPickerInput.java b/mobile/android/base/prompts/ColorPickerInput.java
index 79e665aca8d..eb775b09cd1 100644
--- a/mobile/android/base/prompts/ColorPickerInput.java
+++ b/mobile/android/base/prompts/ColorPickerInput.java
@@ -54,6 +54,6 @@ public class ColorPickerInput extends PromptInput {
 
     @Override
     public boolean canApplyInputStyle() {
-	return false;
+        return false;
     }
 }
diff --git a/mobile/android/base/tests/helpers/AssertionHelper.java b/mobile/android/base/tests/helpers/AssertionHelper.java
index be3f962bf8f..09c7e302797 100644
--- a/mobile/android/base/tests/helpers/AssertionHelper.java
+++ b/mobile/android/base/tests/helpers/AssertionHelper.java
@@ -99,11 +99,11 @@ public final class AssertionHelper {
     }
 
     public static void fAssertIsPixel(final String message, final int actual, final int r, final int g, final int b) {
-	sAsserter.ispixel(actual, r, g, b, message);
+        sAsserter.ispixel(actual, r, g, b, message);
     }
 
     public static void fAssertIsNotPixel(final String message, final int actual, final int r, final int g, final int b) {
-	sAsserter.isnotpixel(actual, r, g, b, message);
+        sAsserter.isnotpixel(actual, r, g, b, message);
     }
 
     public static void fFail(final String message) {
diff --git a/mobile/android/base/updater/UpdateService.java b/mobile/android/base/updater/UpdateService.java
index 1824a4c3fc0..cc5134c2f05 100644
--- a/mobile/android/base/updater/UpdateService.java
+++ b/mobile/android/base/updater/UpdateService.java
@@ -393,10 +393,10 @@ public class UpdateService extends IntentService {
 
         mBuilder = new NotificationCompat.Builder(this);
         mBuilder.setContentTitle(getResources().getString(R.string.updater_downloading_title))
-    	    .setContentText(mApplyImmediately ? "" : getResources().getString(R.string.updater_downloading_select))
-    	    .setSmallIcon(android.R.drawable.stat_sys_download)
-    	    .setContentIntent(contentIntent)
-            .setDeleteIntent(deleteIntent);
+                .setContentText(mApplyImmediately ? "" : getResources().getString(R.string.updater_downloading_select))
+                .setSmallIcon(android.R.drawable.stat_sys_download)
+                .setContentIntent(contentIntent)
+                .setDeleteIntent(deleteIntent);
 
         mBuilder.setProgress(100, 0, true);
         mNotificationManager.notify(NOTIFICATION_ID, mBuilder.build());
@@ -480,10 +480,10 @@ public class UpdateService extends IntentService {
                 output.write(buf, 0, len);
                 bytesRead += len;
                 // Updating the notification takes time so only do it every 1MB
-                if(bytesRead - lastNotify > 1048576) {
-	                mBuilder.setProgress(length, bytesRead, false);
-	                mNotificationManager.notify(NOTIFICATION_ID, mBuilder.build());
-	                lastNotify = bytesRead;
+                if (bytesRead - lastNotify > 1048576) {
+                    mBuilder.setProgress(length, bytesRead, false);
+                    mNotificationManager.notify(NOTIFICATION_ID, mBuilder.build());
+                    lastNotify = bytesRead;
                 }
             }
 
diff --git a/mobile/android/base/widget/TabThumbnailWrapper.java b/mobile/android/base/widget/TabThumbnailWrapper.java
index c9b5777ede4..156f920466e 100644
--- a/mobile/android/base/widget/TabThumbnailWrapper.java
+++ b/mobile/android/base/widget/TabThumbnailWrapper.java
@@ -28,7 +28,7 @@ public class TabThumbnailWrapper extends FrameLayout {
 
         if (mRecording) {
             mergeDrawableStates(drawableState, STATE_RECORDING);
-	}
+        }
         return drawableState;
     }
 

From ef5903ad00020d3f46324b3cd00aafde1d1c67b8 Mon Sep 17 00:00:00 2001
From: Chris Kitching 
Date: Sat, 11 Oct 2014 00:17:01 +0100
Subject: [PATCH 14/17] Bug 1081397: Finalise large numbers of fields.
 r=rnewman * * * Bug 1081397: Finalise large numbers of fields. r=rnewman

---
 mobile/android/base/ActionModeCompat.java     |  6 +-
 mobile/android/base/AlertNotification.java    |  2 +-
 mobile/android/base/BrowserApp.java           |  2 +-
 mobile/android/base/BrowserLocaleManager.java |  4 +-
 mobile/android/base/ChromeCast.java           |  2 +-
 mobile/android/base/ContactService.java       |  4 +-
 mobile/android/base/DoorHangerPopup.java      |  2 +-
 mobile/android/base/FormAssistPopup.java      |  4 +-
 mobile/android/base/GeckoApp.java             |  2 +-
 mobile/android/base/GeckoBatteryManager.java  |  2 +-
 .../base/GeckoConnectivityReceiver.java       |  2 +-
 mobile/android/base/GeckoEvent.java           |  2 +-
 mobile/android/base/GeckoInputConnection.java |  2 +-
 mobile/android/base/GeckoJavaSampler.java     |  2 +-
 mobile/android/base/GeckoProfile.java         |  2 +-
 .../android/base/GeckoProfileDirectories.java |  4 +-
 mobile/android/base/GeckoThread.java          |  2 +-
 mobile/android/base/IntentHelper.java         |  2 +-
 .../base/LightweightThemeDrawable.java        |  6 +-
 mobile/android/base/MemoryMonitor.java        |  2 +-
 mobile/android/base/NotificationHelper.java   |  2 +-
 mobile/android/base/ScrollAnimator.java       |  2 +-
 mobile/android/base/SuggestClient.java        |  2 +-
 mobile/android/base/Tab.java                  | 12 ++--
 mobile/android/base/Tabs.java                 |  2 +-
 mobile/android/base/TextSelection.java        |  2 +-
 .../android/base/animation/AnimatorProxy.java |  6 +-
 .../base/animation/BounceAnimator.java        |  2 +-
 .../base/animation/PropertyAnimator.java      |  8 +--
 .../datareporting/TelemetryRecorder.java      |  2 +-
 .../HealthReportDatabaseStorage.java          |  2 +-
 .../healthreport/HealthReportDatabases.java   |  2 +-
 .../preferences/PreferenceFragment.java       |  4 +-
 .../db/AbstractTransactionalProvider.java     |  4 +-
 .../base/db/BrowserDatabaseHelper.java        |  4 +-
 mobile/android/base/db/BrowserProvider.java   |  4 +-
 .../android/base/db/FormHistoryProvider.java  |  4 +-
 mobile/android/base/db/HomeProvider.java      |  4 +-
 mobile/android/base/db/PasswordsProvider.java |  4 +-
 .../FxAccountAbstractSetupActivity.java       |  2 +-
 mobile/android/base/gfx/Axis.java             |  2 +-
 .../android/base/gfx/BufferedCairoImage.java  |  2 +-
 .../base/gfx/DisplayPortCalculator.java       |  2 +-
 mobile/android/base/gfx/GLController.java     |  2 +-
 mobile/android/base/gfx/GeckoLayerClient.java |  6 +-
 .../base/gfx/JavaPanZoomController.java       | 10 +--
 .../base/gfx/LayerMarginsAnimator.java        |  4 +-
 mobile/android/base/gfx/LayerRenderer.java    |  8 +--
 mobile/android/base/gfx/LayerView.java        |  4 +-
 mobile/android/base/gfx/PluginLayer.java      |  8 +--
 mobile/android/base/gfx/ScrollbarLayer.java   |  2 +-
 .../base/gfx/SimpleScaleGestureDetector.java  |  4 +-
 .../base/gfx/SubdocumentScrollHelper.java     |  8 +--
 mobile/android/base/gfx/TextureGenerator.java |  2 +-
 mobile/android/base/gfx/TextureReaper.java    |  2 +-
 .../base/health/BrowserHealthRecorder.java    |  2 +-
 .../base/home/BookmarksListAdapter.java       |  2 +-
 mobile/android/base/home/HomeListView.java    |  2 +-
 mobile/android/base/home/HomePager.java       |  2 +-
 mobile/android/base/home/PanelGridView.java   |  2 +-
 .../android/base/home/PanelInfoManager.java   |  2 +-
 mobile/android/base/home/PanelLayout.java     |  4 +-
 mobile/android/base/home/PinSiteDialog.java   |  2 +-
 mobile/android/base/home/TopSitesPanel.java   |  8 +--
 .../base/home/TopSitesThumbnailView.java      |  2 +-
 mobile/android/base/menu/GeckoMenu.java       | 10 +--
 mobile/android/base/menu/MenuItemDefault.java |  2 +-
 .../base/mozglue/ByteBufferInputStream.java   |  2 +-
 .../android/base/overlays/ui/SendTabList.java |  2 +-
 .../base/preferences/AndroidImport.java       | 16 ++---
 .../preferences/AndroidImportPreference.java  |  4 +-
 .../base/preferences/GeckoPreferences.java    |  2 +-
 .../base/preferences/LinkPreference.java      |  2 +-
 .../base/preferences/PanelsPreference.java    |  2 +-
 .../base/preferences/SyncPreference.java      |  2 +-
 .../base/prompts/ColorPickerInput.java        |  4 +-
 .../android/base/prompts/IconGridInput.java   |  2 +-
 mobile/android/base/prompts/PromptInput.java  |  2 +-
 .../base/sqlite/ByteBufferInputStream.java    |  2 +-
 mobile/android/base/sqlite/SQLiteBridge.java  |  2 +-
 .../android/base/sync/CommandProcessor.java   |  2 +-
 .../android/base/sync/JSONRecordFetcher.java  |  2 +-
 .../android/base/sync/SyncConfiguration.java  |  6 +-
 mobile/android/base/sync/Utils.java           |  2 +-
 .../android/base/sync/jpake/JPakeClient.java  | 66 +++++++++----------
 .../sync/jpake/stage/GetRequestStage.java     |  4 +-
 .../Crypto5MiddlewareRepository.java          |  6 +-
 .../Crypto5MiddlewareRepositorySession.java   | 10 +--
 .../MiddlewareRepositorySession.java          |  4 +-
 .../android/base/sync/net/BaseResource.java   |  2 +-
 .../repositories/HashSetStoreTracker.java     |  2 +-
 .../Server11RepositorySession.java            | 10 +--
 .../AndroidBrowserBookmarksDataAccessor.java  |  2 +-
 ...roidBrowserBookmarksRepositorySession.java | 10 +--
 .../AndroidBrowserHistoryDataAccessor.java    |  2 +-
 .../android/AndroidBrowserRepository.java     |  8 +--
 .../AndroidBrowserRepositorySession.java      | 16 ++---
 .../android/FormHistoryRepositorySession.java |  4 +-
 .../android/PasswordsRepositorySession.java   |  8 +--
 ...eferredRepositorySessionBeginDelegate.java |  4 +-
 ...RepositorySessionFetchRecordsDelegate.java |  4 +-
 .../sync/setup/SyncAuthenticatorService.java  |  2 +-
 .../activities/ClientRecordArrayAdapter.java  |  2 +-
 .../sync/setup/auth/AccountAuthenticator.java |  2 +-
 .../base/sync/stage/FetchMetaGlobalStage.java |  2 +-
 .../SafeConstrainedServer11Repository.java    |  4 +-
 .../ConcurrentRecordConsumer.java             |  4 +-
 .../sync/synchronizer/RecordsChannel.java     |  4 +-
 .../synchronizer/SerialRecordConsumer.java    |  4 +-
 .../android/base/tabs/PrivateTabsPanel.java   |  2 +-
 mobile/android/base/tabs/TabsGridLayout.java  |  4 +-
 .../android/base/tabs/TabsLayoutAdapter.java  |  4 +-
 mobile/android/base/tabs/TabsListLayout.java  | 16 ++---
 mobile/android/base/tabs/TabsPanel.java       |  6 +-
 mobile/android/base/tests/AboutHomeTest.java  |  2 +-
 mobile/android/base/tests/DatabaseHelper.java |  4 +-
 mobile/android/base/tests/SessionTest.java    |  4 +-
 mobile/android/base/tests/testBookmark.java   |  2 +-
 mobile/android/base/tests/testNewTab.java     |  2 +-
 .../base/tests/testReadingListProvider.java   |  2 +-
 .../base/tests/testSearchHistoryProvider.java |  2 +-
 mobile/android/base/tests/testThumbnails.java |  4 +-
 .../base/toolbar/PageActionLayout.java        | 10 +--
 .../base/toolbar/ToolbarDisplayLayout.java    | 14 ++--
 .../base/util/ActivityResultHandlerMap.java   |  2 +-
 mobile/android/base/util/INIParser.java       |  2 +-
 .../android/base/util/NativeJSContainer.java  |  2 +-
 mobile/android/base/util/UIAsyncTask.java     |  2 +-
 .../android/base/webapp/InstallListener.java  |  8 +--
 .../base/webapp/UninstallListener.java        |  4 +-
 mobile/android/base/widget/ArrowPopup.java    |  2 +-
 mobile/android/base/widget/ButtonToast.java   |  2 +-
 .../android/base/widget/DateTimePicker.java   |  8 +--
 mobile/android/base/widget/Divider.java       |  2 +-
 mobile/android/base/widget/DoorHanger.java    |  4 +-
 .../android/base/widget/EllipsisTextView.java |  2 +-
 mobile/android/base/widget/FaviconView.java   |  4 +-
 .../base/widget/GeckoActionProvider.java      |  4 +-
 .../base/widget/GeckoSwipeRefreshLayout.java  |  8 +--
 .../android/base/widget/GeckoViewFlipper.java |  2 +-
 .../SwipeDismissListViewTouchListener.java    | 12 ++--
 .../search/providers/SearchEngine.java        |  2 +-
 .../datahandling/DataStorageManager.java      |  2 +-
 .../stumblerthread/scanners/WifiScanner.java  |  2 +-
 .../service/uploadthread/AsyncUploader.java   |  2 +-
 .../utils/PersistentIntentService.java        |  2 +-
 146 files changed, 318 insertions(+), 318 deletions(-)

diff --git a/mobile/android/base/ActionModeCompat.java b/mobile/android/base/ActionModeCompat.java
index 67b6a776851..014beb4e8d3 100644
--- a/mobile/android/base/ActionModeCompat.java
+++ b/mobile/android/base/ActionModeCompat.java
@@ -18,9 +18,9 @@ class ActionModeCompat implements GeckoPopupMenu.OnMenuItemClickListener,
                                   View.OnClickListener {
     private final String LOGTAG = "GeckoActionModeCompat";
 
-    private Callback mCallback;
-    private ActionModeCompatView mView;
-    private Presenter mPresenter;
+    private final Callback mCallback;
+    private final ActionModeCompatView mView;
+    private final Presenter mPresenter;
 
     /* A set of callbacks to be called during this ActionMode's lifecycle. These will control the
      * creation, interaction with, and destruction of menuitems for the view */
diff --git a/mobile/android/base/AlertNotification.java b/mobile/android/base/AlertNotification.java
index 960a91d0acb..b7910a685ea 100644
--- a/mobile/android/base/AlertNotification.java
+++ b/mobile/android/base/AlertNotification.java
@@ -33,7 +33,7 @@ public class AlertNotification
     private String mPrevAlertText = "";
 
     private static final double UPDATE_THRESHOLD = .01;
-    private Context mContext;
+    private final Context mContext;
 
     public AlertNotification(Context aContext, int aNotificationId, int aIcon,
                              String aTitle, String aText, long aWhen, Uri aIconUri) {
diff --git a/mobile/android/base/BrowserApp.java b/mobile/android/base/BrowserApp.java
index d05a1dad7e6..0ee763bf616 100644
--- a/mobile/android/base/BrowserApp.java
+++ b/mobile/android/base/BrowserApp.java
@@ -240,7 +240,7 @@ public class BrowserApp extends GeckoApp
     // race by determining if the web content should be hidden at the animation's end.
     private boolean mHideWebContentOnAnimationEnd;
 
-    private DynamicToolbar mDynamicToolbar = new DynamicToolbar();
+    private final DynamicToolbar mDynamicToolbar = new DynamicToolbar();
 
     @Override
     public View onCreateView(final String name, final Context context, final AttributeSet attrs) {
diff --git a/mobile/android/base/BrowserLocaleManager.java b/mobile/android/base/BrowserLocaleManager.java
index 8194301508a..1dc02da9d01 100644
--- a/mobile/android/base/BrowserLocaleManager.java
+++ b/mobile/android/base/BrowserLocaleManager.java
@@ -55,11 +55,11 @@ public class BrowserLocaleManager implements LocaleManager {
     private volatile Locale currentLocale;
     private volatile Locale systemLocale = Locale.getDefault();
 
-    private AtomicBoolean inited = new AtomicBoolean(false);
+    private final AtomicBoolean inited = new AtomicBoolean(false);
     private boolean systemLocaleDidChange;
     private BroadcastReceiver receiver;
 
-    private static AtomicReference instance = new AtomicReference();
+    private static final AtomicReference instance = new AtomicReference();
 
     public static LocaleManager getInstance() {
         LocaleManager localeManager = instance.get();
diff --git a/mobile/android/base/ChromeCast.java b/mobile/android/base/ChromeCast.java
index 7a007a2710a..4fffd94a3d2 100644
--- a/mobile/android/base/ChromeCast.java
+++ b/mobile/android/base/ChromeCast.java
@@ -43,7 +43,7 @@ class ChromeCast implements GeckoMediaPlayer {
     private final RouteInfo route;
     private GoogleApiClient apiClient;
     private RemoteMediaPlayer remoteMediaPlayer;
-    private boolean canMirror;
+    private final boolean canMirror;
     private String mSessionId;
     private MirrorChannel mMirrorChannel;
     private boolean mApplicationStarted = false;
diff --git a/mobile/android/base/ContactService.java b/mobile/android/base/ContactService.java
index 36fd19c41b9..7e02ce730a3 100644
--- a/mobile/android/base/ContactService.java
+++ b/mobile/android/base/ContactService.java
@@ -90,8 +90,8 @@ public class ContactService implements GeckoEventListener {
     private HashMap mWebsiteTypesMap;
     private HashMap mImTypesMap;
 
-    private ContentResolver mContentResolver;
-    private GeckoApp mActivity;
+    private final ContentResolver mContentResolver;
+    private final GeckoApp mActivity;
 
     ContactService(EventDispatcher eventDispatcher, GeckoApp activity) {
         mEventDispatcher = eventDispatcher;
diff --git a/mobile/android/base/DoorHangerPopup.java b/mobile/android/base/DoorHangerPopup.java
index 261faba5572..f581f39f67d 100644
--- a/mobile/android/base/DoorHangerPopup.java
+++ b/mobile/android/base/DoorHangerPopup.java
@@ -31,7 +31,7 @@ public class DoorHangerPopup extends ArrowPopup
 
     // Stores a set of all active DoorHanger notifications. A DoorHanger is
     // uniquely identified by its tabId and value.
-    private HashSet mDoorHangers;
+    private final HashSet mDoorHangers;
 
     // Whether or not the doorhanger popup is disabled.
     private boolean mDisabled;
diff --git a/mobile/android/base/FormAssistPopup.java b/mobile/android/base/FormAssistPopup.java
index 65123d7e8fd..7f176047643 100644
--- a/mobile/android/base/FormAssistPopup.java
+++ b/mobile/android/base/FormAssistPopup.java
@@ -401,8 +401,8 @@ public class FormAssistPopup extends RelativeLayout implements GeckoEventListene
     }
 
     private class AutoCompleteListAdapter extends ArrayAdapter> {
-        private LayoutInflater mInflater;
-        private int mTextViewResourceId;
+        private final LayoutInflater mInflater;
+        private final int mTextViewResourceId;
 
         public AutoCompleteListAdapter(Context context, int textViewResourceId) {
             super(context, textViewResourceId);
diff --git a/mobile/android/base/GeckoApp.java b/mobile/android/base/GeckoApp.java
index 220ae8c941b..d765687675a 100644
--- a/mobile/android/base/GeckoApp.java
+++ b/mobile/android/base/GeckoApp.java
@@ -183,7 +183,7 @@ public abstract class GeckoApp
     private FullScreenHolder mFullScreenPluginContainer;
     private View mFullScreenPluginView;
 
-    private HashMap mWakeLocks = new HashMap();
+    private final HashMap mWakeLocks = new HashMap();
 
     protected boolean mShouldRestore;
     protected boolean mInitialized;
diff --git a/mobile/android/base/GeckoBatteryManager.java b/mobile/android/base/GeckoBatteryManager.java
index 436bdff544c..303ee0fb983 100644
--- a/mobile/android/base/GeckoBatteryManager.java
+++ b/mobile/android/base/GeckoBatteryManager.java
@@ -30,7 +30,7 @@ public class GeckoBatteryManager extends BroadcastReceiver {
     private static boolean sCharging                   = kDefaultCharging;
     private static double  sRemainingTime              = kDefaultRemainingTime;
 
-    private static GeckoBatteryManager sInstance = new GeckoBatteryManager();
+    private static final GeckoBatteryManager sInstance = new GeckoBatteryManager();
 
     private final IntentFilter mFilter;
     private Context mApplicationContext;
diff --git a/mobile/android/base/GeckoConnectivityReceiver.java b/mobile/android/base/GeckoConnectivityReceiver.java
index 32a94a67bbb..735632b3cb8 100644
--- a/mobile/android/base/GeckoConnectivityReceiver.java
+++ b/mobile/android/base/GeckoConnectivityReceiver.java
@@ -25,7 +25,7 @@ public class GeckoConnectivityReceiver extends BroadcastReceiver {
 
     private static final String LOGTAG = "GeckoConnectivityReceiver";
 
-    private static GeckoConnectivityReceiver sInstance = new GeckoConnectivityReceiver();
+    private static final GeckoConnectivityReceiver sInstance = new GeckoConnectivityReceiver();
 
     private final IntentFilter mFilter;
     private Context mApplicationContext;
diff --git a/mobile/android/base/GeckoEvent.java b/mobile/android/base/GeckoEvent.java
index 4239b6a4ad1..cc0bbd5593f 100644
--- a/mobile/android/base/GeckoEvent.java
+++ b/mobile/android/base/GeckoEvent.java
@@ -43,7 +43,7 @@ public class GeckoEvent {
     private static final int EVENT_FACTORY_SIZE = 5;
 
     // Maybe we're probably better to just make mType non final, and just store GeckoEvents in here...
-    private static SparseArray> mEvents = new SparseArray>();
+    private static final SparseArray> mEvents = new SparseArray>();
 
     public static GeckoEvent get(NativeGeckoEvent type) {
         synchronized (mEvents) {
diff --git a/mobile/android/base/GeckoInputConnection.java b/mobile/android/base/GeckoInputConnection.java
index 7c9227d31aa..26bc262f356 100644
--- a/mobile/android/base/GeckoInputConnection.java
+++ b/mobile/android/base/GeckoInputConnection.java
@@ -997,7 +997,7 @@ final class DebugGeckoInputConnection
         implements InvocationHandler {
 
     private InputConnection mProxy;
-    private StringBuilder mCallLevel;
+    private final StringBuilder mCallLevel;
 
     private DebugGeckoInputConnection(View targetView,
                                       GeckoEditableClient editable) {
diff --git a/mobile/android/base/GeckoJavaSampler.java b/mobile/android/base/GeckoJavaSampler.java
index 8ea2e1c22f6..f8bde6f4b41 100644
--- a/mobile/android/base/GeckoJavaSampler.java
+++ b/mobile/android/base/GeckoJavaSampler.java
@@ -62,7 +62,7 @@ public class GeckoJavaSampler {
         private boolean mPauseSampler;
         private boolean mStopSampler;
 
-        private SparseArray mSamples = new SparseArray();
+        private final SparseArray mSamples = new SparseArray();
         private int mSamplePos;
 
         public SamplingThread(final int aInterval, final int aSampleCount) {
diff --git a/mobile/android/base/GeckoProfile.java b/mobile/android/base/GeckoProfile.java
index 174247ddd01..97a62d2d75c 100644
--- a/mobile/android/base/GeckoProfile.java
+++ b/mobile/android/base/GeckoProfile.java
@@ -40,7 +40,7 @@ public final class GeckoProfile {
     public static final String DEFAULT_PROFILE = "default";
     public static final String GUEST_PROFILE = "guest";
 
-    private static HashMap sProfileCache = new HashMap();
+    private static final HashMap sProfileCache = new HashMap();
     private static String sDefaultProfileName;
 
     // Caches the guest profile dir.
diff --git a/mobile/android/base/GeckoProfileDirectories.java b/mobile/android/base/GeckoProfileDirectories.java
index 88587ec3c1c..d655928dacd 100644
--- a/mobile/android/base/GeckoProfileDirectories.java
+++ b/mobile/android/base/GeckoProfileDirectories.java
@@ -58,7 +58,7 @@ public class GeckoProfileDirectories {
     /**
      * Returns true if the supplied profile entry represents the default profile.
      */
-    private static INISectionPredicate sectionIsDefault = new INISectionPredicate() {
+    private static final INISectionPredicate sectionIsDefault = new INISectionPredicate() {
         @Override
         public boolean matches(INISection section) {
             return section.getIntProperty("Default") == 1;
@@ -68,7 +68,7 @@ public class GeckoProfileDirectories {
     /**
      * Returns true if the supplied profile entry has a 'Name' field.
      */
-    private static INISectionPredicate sectionHasName = new INISectionPredicate() {
+    private static final INISectionPredicate sectionHasName = new INISectionPredicate() {
         @Override
         public boolean matches(INISection section) {
             final String name = section.getStringProperty("Name");
diff --git a/mobile/android/base/GeckoThread.java b/mobile/android/base/GeckoThread.java
index 0b424f4cecb..fc178c98fec 100644
--- a/mobile/android/base/GeckoThread.java
+++ b/mobile/android/base/GeckoThread.java
@@ -37,7 +37,7 @@ public class GeckoThread extends Thread implements GeckoEventListener {
         GeckoExited
     }
 
-    private static AtomicReference sLaunchState =
+    private static final AtomicReference sLaunchState =
                                             new AtomicReference(LaunchState.Launching);
 
     private static GeckoThread sGeckoThread;
diff --git a/mobile/android/base/IntentHelper.java b/mobile/android/base/IntentHelper.java
index 0380c5829dd..dee1d92147a 100644
--- a/mobile/android/base/IntentHelper.java
+++ b/mobile/android/base/IntentHelper.java
@@ -31,7 +31,7 @@ public final class IntentHelper implements GeckoEventListener {
     };
     private static IntentHelper instance;
 
-    private Activity activity;
+    private final Activity activity;
 
     private IntentHelper(Activity activity) {
         this.activity = activity;
diff --git a/mobile/android/base/LightweightThemeDrawable.java b/mobile/android/base/LightweightThemeDrawable.java
index 090fcdcea80..4cd5a7ded97 100644
--- a/mobile/android/base/LightweightThemeDrawable.java
+++ b/mobile/android/base/LightweightThemeDrawable.java
@@ -26,11 +26,11 @@ import android.graphics.drawable.Drawable;
  * to specify the alpha) in order.
  */
 public class LightweightThemeDrawable extends Drawable {
-    private Paint mPaint;
+    private final Paint mPaint;
     private Paint mColorPaint;
 
-    private Bitmap mBitmap;
-    private Resources mResources;
+    private final Bitmap mBitmap;
+    private final Resources mResources;
 
     private int mStartColor;
     private int mEndColor;
diff --git a/mobile/android/base/MemoryMonitor.java b/mobile/android/base/MemoryMonitor.java
index 9664d634895..58571e159a9 100644
--- a/mobile/android/base/MemoryMonitor.java
+++ b/mobile/android/base/MemoryMonitor.java
@@ -47,7 +47,7 @@ class MemoryMonitor extends BroadcastReceiver {
     private static final int MEMORY_PRESSURE_MEDIUM = 3;
     private static final int MEMORY_PRESSURE_HIGH = 4;
 
-    private static MemoryMonitor sInstance = new MemoryMonitor();
+    private static final MemoryMonitor sInstance = new MemoryMonitor();
 
     static MemoryMonitor getInstance() {
         return sInstance;
diff --git a/mobile/android/base/NotificationHelper.java b/mobile/android/base/NotificationHelper.java
index 1614c0a501f..d4de235db77 100644
--- a/mobile/android/base/NotificationHelper.java
+++ b/mobile/android/base/NotificationHelper.java
@@ -64,7 +64,7 @@ public final class NotificationHelper implements GeckoEventListener {
     private static final String CLEARED_EVENT = "notification-cleared";
     private static final String CLOSED_EVENT = "notification-closed";
 
-    private Context mContext;
+    private final Context mContext;
 
     // Holds a list of notifications that should be cleared if the Fennec Activity is shut down.
     // Will not include ongoing or persistent notifications that are tied to Gecko's lifecycle.
diff --git a/mobile/android/base/ScrollAnimator.java b/mobile/android/base/ScrollAnimator.java
index fd70179b43e..5cc46ce79cf 100644
--- a/mobile/android/base/ScrollAnimator.java
+++ b/mobile/android/base/ScrollAnimator.java
@@ -26,7 +26,7 @@ public class ScrollAnimator implements View.OnGenericMotionListener {
     static final float MAX_SCROLL = 0.075f * GeckoAppShell.getDpi();
 
     private class ScrollRunnable extends TimerTask {
-        private View mView;
+        private final View mView;
 
         public ScrollRunnable(View view) {
             mView = view;
diff --git a/mobile/android/base/SuggestClient.java b/mobile/android/base/SuggestClient.java
index 98ce09a6042..7ac4dde563a 100644
--- a/mobile/android/base/SuggestClient.java
+++ b/mobile/android/base/SuggestClient.java
@@ -46,7 +46,7 @@ public class SuggestClient {
     private final int mMaxResults;
 
     // used by robocop for testing
-    private boolean mCheckNetwork;
+    private final boolean mCheckNetwork;
 
     // used to make suggestions appear instantly after opt-in
     private String mPrevQuery;
diff --git a/mobile/android/base/Tab.java b/mobile/android/base/Tab.java
index a679b9c8d8f..4ab519dee38 100644
--- a/mobile/android/base/Tab.java
+++ b/mobile/android/base/Tab.java
@@ -45,27 +45,27 @@ public class Tab {
     private int mFaviconSize;
     private boolean mHasFeeds;
     private boolean mHasOpenSearch;
-    private SiteIdentity mSiteIdentity;
+    private final SiteIdentity mSiteIdentity;
     private boolean mReaderEnabled;
     private BitmapDrawable mThumbnail;
     private int mHistoryIndex;
     private int mHistorySize;
-    private int mParentId;
-    private boolean mExternal;
+    private final int mParentId;
+    private final boolean mExternal;
     private boolean mBookmark;
     private int mFaviconLoadId;
     private String mContentType;
     private boolean mHasTouchListeners;
     private ZoomConstraints mZoomConstraints;
     private boolean mIsRTL;
-    private ArrayList mPluginViews;
-    private HashMap mPluginLayers;
+    private final ArrayList mPluginViews;
+    private final HashMap mPluginLayers;
     private int mBackgroundColor;
     private int mState;
     private Bitmap mThumbnailBitmap;
     private boolean mDesktopMode;
     private boolean mEnteringReaderMode;
-    private Context mAppContext;
+    private final Context mAppContext;
     private ErrorType mErrorType = ErrorType.NONE;
     private static final int MAX_HISTORY_LIST_SIZE = 50;
     private volatile int mLoadProgress;
diff --git a/mobile/android/base/Tabs.java b/mobile/android/base/Tabs.java
index dd5d35d0a8f..6f351977519 100644
--- a/mobile/android/base/Tabs.java
+++ b/mobile/android/base/Tabs.java
@@ -65,7 +65,7 @@ public class Tabs implements GeckoEventListener {
 
     public static final int INVALID_TAB_ID = -1;
 
-    private static AtomicInteger sTabId = new AtomicInteger(0);
+    private static final AtomicInteger sTabId = new AtomicInteger(0);
     private volatile boolean mInitialTabsAdded;
 
     private Context mAppContext;
diff --git a/mobile/android/base/TextSelection.java b/mobile/android/base/TextSelection.java
index 7e55d8f612b..cb29cbeb207 100644
--- a/mobile/android/base/TextSelection.java
+++ b/mobile/android/base/TextSelection.java
@@ -54,7 +54,7 @@ class TextSelection extends Layer implements GeckoEventListener {
 
     // These timers are used to avoid flicker caused by selection handles showing/hiding quickly. For isntance
     // when moving between single handle caret mode and two handle selection mode.
-    private Timer mActionModeTimer = new Timer("actionMode");
+    private final Timer mActionModeTimer = new Timer("actionMode");
     private class ActionModeTimerTask extends TimerTask {
         @Override
         public void run() {
diff --git a/mobile/android/base/animation/AnimatorProxy.java b/mobile/android/base/animation/AnimatorProxy.java
index dee3b04b2b5..e25ddd47cab 100644
--- a/mobile/android/base/animation/AnimatorProxy.java
+++ b/mobile/android/base/animation/AnimatorProxy.java
@@ -35,7 +35,7 @@ class AnimatorProxy {
         public View getView();
     }
 
-    private AnimatorProxyImpl mImpl;
+    private final AnimatorProxyImpl mImpl;
 
     private AnimatorProxy(AnimatorProxyImpl impl) {
         mImpl = impl;
@@ -146,7 +146,7 @@ class AnimatorProxy {
      * the NineOldAndroids library under the Apache License 2.0.
      */
     private static class AnimatorProxyPreHC extends Animation implements AnimatorProxyImpl {
-        private WeakReference mViewRef;
+        private final WeakReference mViewRef;
 
         private final RectF mBefore;
         private final RectF mAfter;
@@ -291,7 +291,7 @@ class AnimatorProxy {
     }
 
     private static class AnimatorProxyPostHC implements AnimatorProxyImpl {
-        private WeakReference mViewRef;
+        private final WeakReference mViewRef;
 
         public AnimatorProxyPostHC(View view) {
             mViewRef = new WeakReference(view);
diff --git a/mobile/android/base/animation/BounceAnimator.java b/mobile/android/base/animation/BounceAnimator.java
index 274f21a37b6..cd8e8f599f8 100644
--- a/mobile/android/base/animation/BounceAnimator.java
+++ b/mobile/android/base/animation/BounceAnimator.java
@@ -32,7 +32,7 @@ public class BounceAnimator extends ValueAnimator {
 
     private final View mView;
     private final String mPropertyName;
-    private List animatorChain = new LinkedList();
+    private final List animatorChain = new LinkedList();
 
     public BounceAnimator(View view, String property) {
         mView = view;
diff --git a/mobile/android/base/animation/PropertyAnimator.java b/mobile/android/base/animation/PropertyAnimator.java
index aab2c69a318..000bae5ac75 100644
--- a/mobile/android/base/animation/PropertyAnimator.java
+++ b/mobile/android/base/animation/PropertyAnimator.java
@@ -46,11 +46,11 @@ public class PropertyAnimator implements Runnable {
         public void onPropertyAnimationEnd();
     }
 
-    private Interpolator mInterpolator;
+    private final Interpolator mInterpolator;
     private long mStartTime;
-    private long mDuration;
-    private float mDurationReciprocal;
-    private List mElementsList;
+    private final long mDuration;
+    private final float mDurationReciprocal;
+    private final List mElementsList;
     private List mListeners;
     FramePoster mFramePoster;
     private boolean mUseHardwareLayer;
diff --git a/mobile/android/base/background/datareporting/TelemetryRecorder.java b/mobile/android/base/background/datareporting/TelemetryRecorder.java
index 3bc0d6bbae4..7d11a987247 100644
--- a/mobile/android/base/background/datareporting/TelemetryRecorder.java
+++ b/mobile/android/base/background/datareporting/TelemetryRecorder.java
@@ -50,7 +50,7 @@ public class TelemetryRecorder {
 
   private File tmpFile;
   private File destFile;
-  private File cacheDir;
+  private final File cacheDir;
 
   private OutputStream  outputStream;
   private MessageDigest checksum;
diff --git a/mobile/android/base/background/healthreport/HealthReportDatabaseStorage.java b/mobile/android/base/background/healthreport/HealthReportDatabaseStorage.java
index 584e55fc2fa..14832f354e4 100644
--- a/mobile/android/base/background/healthreport/HealthReportDatabaseStorage.java
+++ b/mobile/android/base/background/healthreport/HealthReportDatabaseStorage.java
@@ -909,7 +909,7 @@ public class HealthReportDatabaseStorage implements HealthReportStorage {
    * Cache the lookup from measurement and field specifier to field instance.
    * This allows us to memoize the field ID lookup, too.
    */
-  private HashMap fields = new HashMap();
+  private final HashMap fields = new HashMap();
   private boolean fieldsCacheUpdated = false;
 
   private void invalidateFieldsCache() {
diff --git a/mobile/android/base/background/healthreport/HealthReportDatabases.java b/mobile/android/base/background/healthreport/HealthReportDatabases.java
index ad85b1e4195..eb5930f09d3 100644
--- a/mobile/android/base/background/healthreport/HealthReportDatabases.java
+++ b/mobile/android/base/background/healthreport/HealthReportDatabases.java
@@ -17,7 +17,7 @@ import android.content.Context;
 public class HealthReportDatabases {
   private static final String LOG_TAG = "HealthReportDatabases";
 
-  private Context context;
+  private final Context context;
   private final HashMap storages = new HashMap();
 
 
diff --git a/mobile/android/base/background/preferences/PreferenceFragment.java b/mobile/android/base/background/preferences/PreferenceFragment.java
index 414f39c2eb0..1036d2abcfc 100644
--- a/mobile/android/base/background/preferences/PreferenceFragment.java
+++ b/mobile/android/base/background/preferences/PreferenceFragment.java
@@ -53,7 +53,7 @@ public abstract class PreferenceFragment extends Fragment implements PreferenceM
   // The issue is that the Handler references the Fragment; messages targeting
   // the Handler reference it; and if such messages are long lived, the Fragment
   // cannot be GCed. This is not an issue for us; our messages are short-lived.
-  private Handler mHandler = new Handler() {
+  private final Handler mHandler = new Handler() {
     @Override
     public void handleMessage(Message msg) {
       switch (msg.what) {
@@ -299,7 +299,7 @@ public abstract class PreferenceFragment extends Fragment implements PreferenceM
     mHandler.post(mRequestFocus);
   }
 
-  private OnKeyListener mListOnKeyListener = new OnKeyListener() {
+  private final OnKeyListener mListOnKeyListener = new OnKeyListener() {
 
     @Override
     public boolean onKey(View v, int keyCode, KeyEvent event) {
diff --git a/mobile/android/base/db/AbstractTransactionalProvider.java b/mobile/android/base/db/AbstractTransactionalProvider.java
index 915fc5d84d5..2a0cd392d6d 100644
--- a/mobile/android/base/db/AbstractTransactionalProvider.java
+++ b/mobile/android/base/db/AbstractTransactionalProvider.java
@@ -50,8 +50,8 @@ import android.util.Log;
 public abstract class AbstractTransactionalProvider extends ContentProvider {
     private static final String LOGTAG = "GeckoTransProvider";
 
-    private static boolean logDebug = Log.isLoggable(LOGTAG, Log.DEBUG);
-    private static boolean logVerbose = Log.isLoggable(LOGTAG, Log.VERBOSE);
+    private static final boolean logDebug = Log.isLoggable(LOGTAG, Log.DEBUG);
+    private static final boolean logVerbose = Log.isLoggable(LOGTAG, Log.VERBOSE);
 
     protected abstract SQLiteDatabase getReadableDatabase(Uri uri);
     protected abstract SQLiteDatabase getWritableDatabase(Uri uri);
diff --git a/mobile/android/base/db/BrowserDatabaseHelper.java b/mobile/android/base/db/BrowserDatabaseHelper.java
index daf02f056ba..07e859ce2e2 100644
--- a/mobile/android/base/db/BrowserDatabaseHelper.java
+++ b/mobile/android/base/db/BrowserDatabaseHelper.java
@@ -1565,8 +1565,8 @@ final class BrowserDatabaseHelper extends SQLiteOpenHelper {
 
     // Calculate these once, at initialization. isLoggable is too expensive to
     // have in-line in each log call.
-    private static boolean logDebug   = Log.isLoggable(LOGTAG, Log.DEBUG);
-    private static boolean logVerbose = Log.isLoggable(LOGTAG, Log.VERBOSE);
+    private static final boolean logDebug   = Log.isLoggable(LOGTAG, Log.DEBUG);
+    private static final boolean logVerbose = Log.isLoggable(LOGTAG, Log.VERBOSE);
     protected static void trace(String message) {
         if (logVerbose) {
             Log.v(LOGTAG, message);
diff --git a/mobile/android/base/db/BrowserProvider.java b/mobile/android/base/db/BrowserProvider.java
index 1f0d9aff834..2d6b18b1209 100644
--- a/mobile/android/base/db/BrowserProvider.java
+++ b/mobile/android/base/db/BrowserProvider.java
@@ -247,8 +247,8 @@ public class BrowserProvider extends SharedBrowserDatabaseProvider {
 
     // Calculate these once, at initialization. isLoggable is too expensive to
     // have in-line in each log call.
-    private static boolean logDebug   = Log.isLoggable(LOGTAG, Log.DEBUG);
-    private static boolean logVerbose = Log.isLoggable(LOGTAG, Log.VERBOSE);
+    private static final boolean logDebug   = Log.isLoggable(LOGTAG, Log.DEBUG);
+    private static final boolean logVerbose = Log.isLoggable(LOGTAG, Log.VERBOSE);
     protected static void trace(String message) {
         if (logVerbose) {
             Log.v(LOGTAG, message);
diff --git a/mobile/android/base/db/FormHistoryProvider.java b/mobile/android/base/db/FormHistoryProvider.java
index cb23d088dae..0fbee75be74 100644
--- a/mobile/android/base/db/FormHistoryProvider.java
+++ b/mobile/android/base/db/FormHistoryProvider.java
@@ -32,8 +32,8 @@ public class FormHistoryProvider extends SQLiteBridgeContentProvider {
 
 
     // This should be kept in sync with the db version in toolkit/components/satchel/nsFormHistory.js
-    private static int DB_VERSION = 4;
-    private static String DB_FILENAME = "formhistory.sqlite";
+    private static final int DB_VERSION = 4;
+    private static final String DB_FILENAME = "formhistory.sqlite";
     private static final String TELEMETRY_TAG = "SQLITEBRIDGE_PROVIDER_FORMS";
 
     private static final String WHERE_GUID_IS_NULL = BrowserContract.DeletedFormHistory.GUID + " IS NULL";
diff --git a/mobile/android/base/db/HomeProvider.java b/mobile/android/base/db/HomeProvider.java
index 71e5f8b1e7f..c6172e00be9 100644
--- a/mobile/android/base/db/HomeProvider.java
+++ b/mobile/android/base/db/HomeProvider.java
@@ -27,8 +27,8 @@ public class HomeProvider extends SQLiteBridgeContentProvider {
     private static final String LOGTAG = "GeckoHomeProvider";
 
     // This should be kept in sync with the db version in mobile/android/modules/HomeProvider.jsm
-    private static int DB_VERSION = 2;
-    private static String DB_FILENAME = "home.sqlite";
+    private static final int DB_VERSION = 2;
+    private static final String DB_FILENAME = "home.sqlite";
     private static final String TELEMETRY_TAG = "SQLITEBRIDGE_PROVIDER_HOME";
 
     private static final String TABLE_ITEMS = "items";
diff --git a/mobile/android/base/db/PasswordsProvider.java b/mobile/android/base/db/PasswordsProvider.java
index 5798ef6a3a2..c76bfe79553 100644
--- a/mobile/android/base/db/PasswordsProvider.java
+++ b/mobile/android/base/db/PasswordsProvider.java
@@ -39,8 +39,8 @@ public class PasswordsProvider extends SQLiteBridgeContentProvider {
 
     private static final UriMatcher URI_MATCHER;
 
-    private static HashMap PASSWORDS_PROJECTION_MAP;
-    private static HashMap DELETED_PASSWORDS_PROJECTION_MAP;
+    private static final HashMap PASSWORDS_PROJECTION_MAP;
+    private static final HashMap DELETED_PASSWORDS_PROJECTION_MAP;
 
     // this should be kept in sync with the version in toolkit/components/passwordmgr/storage-mozStorage.js
     private static final int DB_VERSION = 5;
diff --git a/mobile/android/base/fxa/activities/FxAccountAbstractSetupActivity.java b/mobile/android/base/fxa/activities/FxAccountAbstractSetupActivity.java
index 7df197abdd7..0295e4a19cc 100644
--- a/mobile/android/base/fxa/activities/FxAccountAbstractSetupActivity.java
+++ b/mobile/android/base/fxa/activities/FxAccountAbstractSetupActivity.java
@@ -74,7 +74,7 @@ abstract public class FxAccountAbstractSetupActivity extends FxAccountAbstractAc
 
   // By default, any custom server configuration is only shown when the account
   // is configured to use a custom server.
-  private static boolean ALWAYS_SHOW_CUSTOM_SERVER_LAYOUT = false;
+  private static final boolean ALWAYS_SHOW_CUSTOM_SERVER_LAYOUT = false;
 
   protected int minimumPasswordLength = 8;
 
diff --git a/mobile/android/base/gfx/Axis.java b/mobile/android/base/gfx/Axis.java
index b1c3b4f6222..500e7811458 100644
--- a/mobile/android/base/gfx/Axis.java
+++ b/mobile/android/base/gfx/Axis.java
@@ -130,7 +130,7 @@ abstract class Axis {
     private float mTouchPos;                /* Position of the most recent touch event on the current drag. */
     private float mLastTouchPos;            /* Position of the touch event before touchPos. */
     private float mVelocity;                /* Velocity in this direction; pixels per animation frame. */
-    private float[] mRecentVelocities;      /* Circular buffer of recent velocities since last touch start. */
+    private final float[] mRecentVelocities;/* Circular buffer of recent velocities since last touch start. */
     private int mRecentVelocityCount;       /* Number of values put into mRecentVelocities (unbounded). */
     private boolean mScrollingDisabled;     /* Whether movement on this axis is locked. */
     private boolean mDisableSnap;           /* Whether overscroll snapping is disabled. */
diff --git a/mobile/android/base/gfx/BufferedCairoImage.java b/mobile/android/base/gfx/BufferedCairoImage.java
index 307f4120425..16ad84fb27a 100644
--- a/mobile/android/base/gfx/BufferedCairoImage.java
+++ b/mobile/android/base/gfx/BufferedCairoImage.java
@@ -18,7 +18,7 @@ public class BufferedCairoImage extends CairoImage {
     private IntSize mSize;
     private int mFormat;
 
-    private static String LOGTAG = "GeckoBufferedCairoImage";
+    private static final String LOGTAG = "GeckoBufferedCairoImage";
 
     /** Creates a buffered Cairo image from a byte buffer. */
     public BufferedCairoImage(ByteBuffer inBuffer, int inWidth, int inHeight, int inFormat) {
diff --git a/mobile/android/base/gfx/DisplayPortCalculator.java b/mobile/android/base/gfx/DisplayPortCalculator.java
index 442962da5e3..a977694114b 100644
--- a/mobile/android/base/gfx/DisplayPortCalculator.java
+++ b/mobile/android/base/gfx/DisplayPortCalculator.java
@@ -75,7 +75,7 @@ final class DisplayPortCalculator {
                                  PREF_DISPLAYPORT_PB_VELOCITY_THRESHOLD };
 
         PrefsHelper.getPrefs(prefs, new PrefsHelper.PrefHandlerBase() {
-            private Map mValues = new HashMap();
+            private final Map mValues = new HashMap();
 
             @Override public void prefValue(String pref, int value) {
                 mValues.put(pref, value);
diff --git a/mobile/android/base/gfx/GLController.java b/mobile/android/base/gfx/GLController.java
index 8e18753f08c..db2adefbba8 100644
--- a/mobile/android/base/gfx/GLController.java
+++ b/mobile/android/base/gfx/GLController.java
@@ -88,7 +88,7 @@ public class GLController {
     private EGL10 mEGL;
     private EGLDisplay mEGLDisplay;
     private EGLConfig mEGLConfig;
-    private EGLPreloadingThread mEGLPreloadingThread;
+    private final EGLPreloadingThread mEGLPreloadingThread;
     private EGLSurface mEGLSurfaceForCompositor;
 
     private static final int LOCAL_EGL_OPENGL_ES2_BIT = 4;
diff --git a/mobile/android/base/gfx/GeckoLayerClient.java b/mobile/android/base/gfx/GeckoLayerClient.java
index a74c590fc77..4be02aefcaa 100644
--- a/mobile/android/base/gfx/GeckoLayerClient.java
+++ b/mobile/android/base/gfx/GeckoLayerClient.java
@@ -33,7 +33,7 @@ class GeckoLayerClient implements LayerView.Listener, PanZoomTarget
     private LayerRenderer mLayerRenderer;
     private boolean mLayerRendererInitialized;
 
-    private Context mContext;
+    private final Context mContext;
     private IntSize mScreenSize;
     private IntSize mWindowSize;
     private DisplayPortMetrics mDisplayPort;
@@ -59,7 +59,7 @@ class GeckoLayerClient implements LayerView.Listener, PanZoomTarget
      */
     private ImmutableViewportMetrics mFrameMetrics;
 
-    private List mDrawListeners;
+    private final List mDrawListeners;
 
     /* Used as temporaries by syncViewportInfo */
     private final ViewTransform mCurrentViewTransform;
@@ -94,7 +94,7 @@ class GeckoLayerClient implements LayerView.Listener, PanZoomTarget
 
     private final PanZoomController mPanZoomController;
     private final LayerMarginsAnimator mMarginsAnimator;
-    private LayerView mView;
+    private final LayerView mView;
 
     /* This flag is true from the time that browser.js detects a first-paint is about to start,
      * to the time that we receive the first-paint composite notification from the compositor.
diff --git a/mobile/android/base/gfx/JavaPanZoomController.java b/mobile/android/base/gfx/JavaPanZoomController.java
index 2e27c63c179..a9de6a1d0ff 100644
--- a/mobile/android/base/gfx/JavaPanZoomController.java
+++ b/mobile/android/base/gfx/JavaPanZoomController.java
@@ -41,9 +41,9 @@ class JavaPanZoomController
 {
     private static final String LOGTAG = "GeckoPanZoomController";
 
-    private static String MESSAGE_ZOOM_RECT = "Browser:ZoomToRect";
-    private static String MESSAGE_ZOOM_PAGE = "Browser:ZoomToPageWidth";
-    private static String MESSAGE_TOUCH_LISTENER = "Tab:HasTouchListener";
+    private static final String MESSAGE_ZOOM_RECT = "Browser:ZoomToRect";
+    private static final String MESSAGE_ZOOM_PAGE = "Browser:ZoomToPageWidth";
+    private static final String MESSAGE_TOUCH_LISTENER = "Tab:HasTouchListener";
 
     // Animation stops if the velocity is below this value when overscrolled or panning.
     private static final float STOPPED_THRESHOLD = 4.0f;
@@ -902,8 +902,8 @@ class JavaPanZoomController
          * The viewport metrics that represent the start and end of the bounce-back animation,
          * respectively.
          */
-        private ImmutableViewportMetrics mBounceStartMetrics;
-        private ImmutableViewportMetrics mBounceEndMetrics;
+        private final ImmutableViewportMetrics mBounceStartMetrics;
+        private final ImmutableViewportMetrics mBounceEndMetrics;
         // How long ago this bounce was started in ns.
         private long mBounceDuration;
 
diff --git a/mobile/android/base/gfx/LayerMarginsAnimator.java b/mobile/android/base/gfx/LayerMarginsAnimator.java
index 8727b21f5d9..4ff88b638a6 100644
--- a/mobile/android/base/gfx/LayerMarginsAnimator.java
+++ b/mobile/android/base/gfx/LayerMarginsAnimator.java
@@ -253,8 +253,8 @@ public class LayerMarginsAnimator {
     }
 
     class LayerMarginsAnimationTask extends RenderTask {
-        private float mStartLeft, mStartTop, mStartRight, mStartBottom;
-        private float mTop, mBottom, mLeft, mRight;
+        private final float mStartLeft, mStartTop, mStartRight, mStartBottom;
+        private final float mTop, mBottom, mLeft, mRight;
         private boolean mContinueAnimation;
 
         public LayerMarginsAnimationTask(boolean runAfter, ImmutableViewportMetrics metrics,
diff --git a/mobile/android/base/gfx/LayerRenderer.java b/mobile/android/base/gfx/LayerRenderer.java
index a5729070f1b..46c5071ff6f 100644
--- a/mobile/android/base/gfx/LayerRenderer.java
+++ b/mobile/android/base/gfx/LayerRenderer.java
@@ -69,10 +69,10 @@ public class LayerRenderer implements Tabs.OnTabsChangedListener {
     private long mLastFrameTime;
     private final CopyOnWriteArrayList mTasks;
 
-    private CopyOnWriteArrayList mExtraLayers = new CopyOnWriteArrayList();
+    private final CopyOnWriteArrayList mExtraLayers = new CopyOnWriteArrayList();
 
     // Dropped frames display
-    private int[] mFrameTimings;
+    private final int[] mFrameTimings;
     private int mCurrentFrame, mFrameTimingsSum, mDroppedFrames;
 
     // Render profiling output
@@ -417,9 +417,9 @@ public class LayerRenderer implements Tabs.OnTabsChangedListener {
         // The timestamp recording the start of this frame.
         private long mFrameStartTime;
         // A fixed snapshot of the viewport metrics that this frame is using to render content.
-        private ImmutableViewportMetrics mFrameMetrics;
+        private final ImmutableViewportMetrics mFrameMetrics;
         // A rendering context for page-positioned layers, and one for screen-positioned layers.
-        private RenderContext mPageContext, mScreenContext;
+        private final RenderContext mPageContext, mScreenContext;
         // Whether a layer was updated.
         private boolean mUpdated;
         private final Rect mPageRect;
diff --git a/mobile/android/base/gfx/LayerView.java b/mobile/android/base/gfx/LayerView.java
index 66cdb720666..144e1b3e293 100644
--- a/mobile/android/base/gfx/LayerView.java
+++ b/mobile/android/base/gfx/LayerView.java
@@ -50,12 +50,12 @@ import android.widget.FrameLayout;
  * Note that LayerView is accessed by Robocop via reflection.
  */
 public class LayerView extends FrameLayout implements Tabs.OnTabsChangedListener {
-    private static String LOGTAG = "GeckoLayerView";
+    private static final String LOGTAG = "GeckoLayerView";
 
     private GeckoLayerClient mLayerClient;
     private PanZoomController mPanZoomController;
     private LayerMarginsAnimator mMarginsAnimator;
-    private GLController mGLController;
+    private final GLController mGLController;
     private InputConnectionHandler mInputConnectionHandler;
     private LayerRenderer mRenderer;
     /* Must be a PAINT_xxx constant */
diff --git a/mobile/android/base/gfx/PluginLayer.java b/mobile/android/base/gfx/PluginLayer.java
index 7835565bc77..843465d86af 100644
--- a/mobile/android/base/gfx/PluginLayer.java
+++ b/mobile/android/base/gfx/PluginLayer.java
@@ -18,10 +18,10 @@ import android.widget.AbsoluteLayout;
 public class PluginLayer extends TileLayer {
     private static final String LOGTAG = "PluginLayer";
 
-    private View mView;
+    private final View mView;
     private SurfaceView mSurfaceView;
-    private PluginLayoutParams mLayoutParams;
-    private AbsoluteLayout mContainer;
+    private final PluginLayoutParams mLayoutParams;
+    private final AbsoluteLayout mContainer;
 
     private boolean mDestroyed;
     private boolean mViewVisible;
@@ -123,7 +123,7 @@ public class PluginLayer extends TileLayer {
         private static final String LOGTAG = "GeckoApp.PluginLayoutParams";
 
         private RectF mRect;
-        private int mMaxDimension;
+        private final int mMaxDimension;
         private float mLastResolution;
 
         public PluginLayoutParams(RectF rect, int maxDimension) {
diff --git a/mobile/android/base/gfx/ScrollbarLayer.java b/mobile/android/base/gfx/ScrollbarLayer.java
index 043c8277546..efc93e2967c 100644
--- a/mobile/android/base/gfx/ScrollbarLayer.java
+++ b/mobile/android/base/gfx/ScrollbarLayer.java
@@ -28,7 +28,7 @@ public class ScrollbarLayer extends TileLayer {
     private final float[] mCoords;
     private final RectF mCapRectF;
 
-    private LayerRenderer mRenderer;
+    private final LayerRenderer mRenderer;
     private int mProgram;
     private int mPositionHandle;
     private int mTextureHandle;
diff --git a/mobile/android/base/gfx/SimpleScaleGestureDetector.java b/mobile/android/base/gfx/SimpleScaleGestureDetector.java
index b3f6fcbc55e..27e8e153297 100644
--- a/mobile/android/base/gfx/SimpleScaleGestureDetector.java
+++ b/mobile/android/base/gfx/SimpleScaleGestureDetector.java
@@ -36,12 +36,12 @@ import java.util.Stack;
 class SimpleScaleGestureDetector {
     private static final String LOGTAG = "GeckoSimpleScaleGestureDetector";
 
-    private SimpleScaleGestureListener mListener;
+    private final SimpleScaleGestureListener mListener;
     private long mLastEventTime;
     private boolean mScaleResult;
 
     /* Information about all pointers that are down. */
-    private LinkedList mPointerInfo;
+    private final LinkedList mPointerInfo;
 
     /** Creates a new gesture detector with the given listener. */
     SimpleScaleGestureDetector(SimpleScaleGestureListener listener) {
diff --git a/mobile/android/base/gfx/SubdocumentScrollHelper.java b/mobile/android/base/gfx/SubdocumentScrollHelper.java
index 6c0ac7f6a1f..00fc9308323 100644
--- a/mobile/android/base/gfx/SubdocumentScrollHelper.java
+++ b/mobile/android/base/gfx/SubdocumentScrollHelper.java
@@ -20,10 +20,10 @@ import android.util.Log;
 class SubdocumentScrollHelper implements GeckoEventListener {
     private static final String LOGTAG = "GeckoSubdocScroll";
 
-    private static String MESSAGE_PANNING_OVERRIDE = "Panning:Override";
-    private static String MESSAGE_CANCEL_OVERRIDE = "Panning:CancelOverride";
-    private static String MESSAGE_SCROLL = "Gesture:Scroll";
-    private static String MESSAGE_SCROLL_ACK = "Gesture:ScrollAck";
+    private static final String MESSAGE_PANNING_OVERRIDE = "Panning:Override";
+    private static final String MESSAGE_CANCEL_OVERRIDE = "Panning:CancelOverride";
+    private static final String MESSAGE_SCROLL = "Gesture:Scroll";
+    private static final String MESSAGE_SCROLL_ACK = "Gesture:ScrollAck";
 
     private final Handler mUiHandler;
     private final EventDispatcher mEventDispatcher;
diff --git a/mobile/android/base/gfx/TextureGenerator.java b/mobile/android/base/gfx/TextureGenerator.java
index 980c8213358..97446d28b95 100644
--- a/mobile/android/base/gfx/TextureGenerator.java
+++ b/mobile/android/base/gfx/TextureGenerator.java
@@ -19,7 +19,7 @@ public class TextureGenerator {
 
     private static TextureGenerator sSharedInstance;
 
-    private ArrayBlockingQueue mTextureIds;
+    private final ArrayBlockingQueue mTextureIds;
     private EGLContext mContext;
 
     private TextureGenerator() { mTextureIds = new ArrayBlockingQueue(POOL_SIZE); }
diff --git a/mobile/android/base/gfx/TextureReaper.java b/mobile/android/base/gfx/TextureReaper.java
index 71b4690eb9f..2b132cb88c8 100644
--- a/mobile/android/base/gfx/TextureReaper.java
+++ b/mobile/android/base/gfx/TextureReaper.java
@@ -12,7 +12,7 @@ import java.util.ArrayList;
 /** Manages a list of dead tiles, so we don't leak resources. */
 public class TextureReaper {
     private static TextureReaper sSharedInstance;
-    private ArrayList mDeadTextureIDs;
+    private final ArrayList mDeadTextureIDs;
 
     private TextureReaper() { mDeadTextureIDs = new ArrayList(); }
 
diff --git a/mobile/android/base/health/BrowserHealthRecorder.java b/mobile/android/base/health/BrowserHealthRecorder.java
index d73adfebf38..2536513c469 100644
--- a/mobile/android/base/health/BrowserHealthRecorder.java
+++ b/mobile/android/base/health/BrowserHealthRecorder.java
@@ -915,7 +915,7 @@ public class BrowserHealthRecorder implements HealthRecorder, GeckoEventListener
         }
     }
 
-    private static ConcurrentLinkedQueue delayedSearches = new ConcurrentLinkedQueue<>();
+    private static final ConcurrentLinkedQueue delayedSearches = new ConcurrentLinkedQueue<>();
 
     public static void recordSearchDelayed(String location, String engineID) {
         final Search search = new Search(location, engineID);
diff --git a/mobile/android/base/home/BookmarksListAdapter.java b/mobile/android/base/home/BookmarksListAdapter.java
index 471ff8fc319..aceb0ea9d9d 100644
--- a/mobile/android/base/home/BookmarksListAdapter.java
+++ b/mobile/android/base/home/BookmarksListAdapter.java
@@ -104,7 +104,7 @@ class BookmarksListAdapter extends MultiTypeCursorAdapter {
 
     // mParentStack holds folder info instances (id + title) that allow
     // us to navigate back up the folder hierarchy.
-    private LinkedList mParentStack;
+    private final LinkedList mParentStack;
 
     // Refresh folder listener.
     private OnRefreshFolderListener mListener;
diff --git a/mobile/android/base/home/HomeListView.java b/mobile/android/base/home/HomeListView.java
index 85aeb3bec7b..dbe6414c166 100644
--- a/mobile/android/base/home/HomeListView.java
+++ b/mobile/android/base/home/HomeListView.java
@@ -33,7 +33,7 @@ public class HomeListView extends ListView
     protected OnUrlOpenListener mUrlOpenListener;
 
     // Top divider
-    private boolean mShowTopDivider;
+    private final boolean mShowTopDivider;
 
     // ContextMenuInfo maker
     private HomeContextMenuInfo.Factory mContextMenuInfoFactory;
diff --git a/mobile/android/base/home/HomePager.java b/mobile/android/base/home/HomePager.java
index d625cd5e99f..826d334ecf1 100644
--- a/mobile/android/base/home/HomePager.java
+++ b/mobile/android/base/home/HomePager.java
@@ -45,7 +45,7 @@ public class HomePager extends ViewPager {
     private final OnAddPanelListener mAddPanelListener;
 
     private final HomeConfig mConfig;
-    private ConfigLoaderCallbacks mConfigLoaderCallbacks;
+    private final ConfigLoaderCallbacks mConfigLoaderCallbacks;
 
     private String mInitialPanelId;
 
diff --git a/mobile/android/base/home/PanelGridView.java b/mobile/android/base/home/PanelGridView.java
index 6957d946579..738727a955c 100644
--- a/mobile/android/base/home/PanelGridView.java
+++ b/mobile/android/base/home/PanelGridView.java
@@ -30,7 +30,7 @@ public class PanelGridView extends GridView
 
     private final ViewConfig viewConfig;
     private final PanelViewAdapter adapter;
-    private PanelViewItemHandler itemHandler;
+    private final PanelViewItemHandler itemHandler;
     private OnItemOpenListener itemOpenListener;
     private HomeContextMenuInfo mContextMenuInfo;
     private HomeContextMenuInfo.Factory mContextMenuInfoFactory;
diff --git a/mobile/android/base/home/PanelInfoManager.java b/mobile/android/base/home/PanelInfoManager.java
index 5f4bf75eb95..b1719ee0265 100644
--- a/mobile/android/base/home/PanelInfoManager.java
+++ b/mobile/android/base/home/PanelInfoManager.java
@@ -59,7 +59,7 @@ public class PanelInfoManager implements GeckoEventListener {
         public void onComplete(List panelInfos);
     }
 
-    private static AtomicInteger sRequestId = new AtomicInteger(0);
+    private static final AtomicInteger sRequestId = new AtomicInteger(0);
 
     // Stores set of pending request callbacks.
     private static final SparseArray sCallbacks = new SparseArray();
diff --git a/mobile/android/base/home/PanelLayout.java b/mobile/android/base/home/PanelLayout.java
index 99fc2542e72..7135cf87e45 100644
--- a/mobile/android/base/home/PanelLayout.java
+++ b/mobile/android/base/home/PanelLayout.java
@@ -679,7 +679,7 @@ abstract class PanelLayout extends FrameLayout {
     }
 
     private class PanelOnItemOpenListener implements OnItemOpenListener {
-        private ViewState mViewState;
+        private final ViewState mViewState;
 
         public PanelOnItemOpenListener(ViewState viewState) {
             mViewState = viewState;
@@ -702,7 +702,7 @@ abstract class PanelLayout extends FrameLayout {
     }
 
     private class PanelKeyListener implements View.OnKeyListener {
-        private ViewState mViewState;
+        private final ViewState mViewState;
 
         public PanelKeyListener(ViewState viewState) {
             mViewState = viewState;
diff --git a/mobile/android/base/home/PinSiteDialog.java b/mobile/android/base/home/PinSiteDialog.java
index 740454ffc28..17f11eeeea2 100644
--- a/mobile/android/base/home/PinSiteDialog.java
+++ b/mobile/android/base/home/PinSiteDialog.java
@@ -206,7 +206,7 @@ class PinSiteDialog extends DialogFragment {
     }
 
     private static class SearchAdapter extends CursorAdapter {
-        private LayoutInflater mInflater;
+        private final LayoutInflater mInflater;
 
         public SearchAdapter(Context context) {
             super(context, null, 0);
diff --git a/mobile/android/base/home/TopSitesPanel.java b/mobile/android/base/home/TopSitesPanel.java
index 26ea3f154b5..93b9ee53477 100644
--- a/mobile/android/base/home/TopSitesPanel.java
+++ b/mobile/android/base/home/TopSitesPanel.java
@@ -105,8 +105,8 @@ public class TopSitesPanel extends HomeFragment {
         return new TopSitesPanel();
     }
 
-    private static boolean logDebug = Log.isLoggable(LOGTAG, Log.DEBUG);
-    private static boolean logVerbose = Log.isLoggable(LOGTAG, Log.VERBOSE);
+    private static final boolean logDebug = Log.isLoggable(LOGTAG, Log.DEBUG);
+    private static final boolean logVerbose = Log.isLoggable(LOGTAG, Log.VERBOSE);
 
     private static void debug(final String message) {
         if (logDebug) {
@@ -406,7 +406,7 @@ public class TopSitesPanel extends HomeFragment {
         // Max number of search results.
         private static final int SEARCH_LIMIT = 30;
         private static final String TELEMETRY_HISTOGRAM_LOAD_CURSOR = "FENNEC_TOPSITES_LOADER_TIME_MS";
-        private int mMaxGridEntries;
+        private final int mMaxGridEntries;
 
         public TopSitesLoader(Context context) {
             super(context);
@@ -701,7 +701,7 @@ public class TopSitesPanel extends HomeFragment {
     @SuppressWarnings("serial")
     static class ThumbnailsLoader extends AsyncTaskLoader> {
         private Map mThumbnailInfos;
-        private ArrayList mUrls;
+        private final ArrayList mUrls;
 
         private static final ArrayList COLUMNS = new ArrayList() {{
             add(TILE_IMAGE_URL_COLUMN);
diff --git a/mobile/android/base/home/TopSitesThumbnailView.java b/mobile/android/base/home/TopSitesThumbnailView.java
index 5303e52e406..7c040efb8ed 100644
--- a/mobile/android/base/home/TopSitesThumbnailView.java
+++ b/mobile/android/base/home/TopSitesThumbnailView.java
@@ -32,7 +32,7 @@ public class TopSitesThumbnailView extends ImageView {
     private final float mStrokeWidth = getResources().getDisplayMetrics().density * 2;
 
     // Paint for drawing the border.
-    private static Paint sBorderPaint;
+    private static final Paint sBorderPaint;
 
     // Initializing the static border paint.
     static {
diff --git a/mobile/android/base/menu/GeckoMenu.java b/mobile/android/base/menu/GeckoMenu.java
index 3cfcbe4d72c..b381417f693 100644
--- a/mobile/android/base/menu/GeckoMenu.java
+++ b/mobile/android/base/menu/GeckoMenu.java
@@ -88,13 +88,13 @@ public class GeckoMenu extends ListView
     protected static final int NO_ID = 0;
 
     // List of all menu items.
-    private List mItems;
+    private final List mItems;
 
     // Map of "always" action-items in action-bar and their views.
-    private Map mPrimaryActionItems;
+    private final Map mPrimaryActionItems;
 
     // Map of "ifRoom" action-items in action-bar and their views.
-    private Map mSecondaryActionItems;
+    private final Map mSecondaryActionItems;
 
     // Reference to a callback for menu events.
     private Callback mCallback;
@@ -109,7 +109,7 @@ public class GeckoMenu extends ListView
     private final ActionItemBarPresenter mSecondaryActionItemBar;
 
     // Adapter to hold the list of menu items.
-    private MenuItemsAdapter mAdapter;
+    private final MenuItemsAdapter mAdapter;
 
     // Show/hide icons in the list.
     boolean mShowIcons;
@@ -686,7 +686,7 @@ public class GeckoMenu extends ListView
         private static final int VIEW_TYPE_DEFAULT = 0;
         private static final int VIEW_TYPE_ACTION_MODE = 1;
 
-        private List mItems;
+        private final List mItems;
 
         public MenuItemsAdapter() {
             mItems = new ArrayList();
diff --git a/mobile/android/base/menu/MenuItemDefault.java b/mobile/android/base/menu/MenuItemDefault.java
index b1ceb865ab1..36d924ec03c 100644
--- a/mobile/android/base/menu/MenuItemDefault.java
+++ b/mobile/android/base/menu/MenuItemDefault.java
@@ -20,7 +20,7 @@ public class MenuItemDefault extends TextView
     private static final int[] STATE_UNCHECKED = new int[] { android.R.attr.state_checkable };
 
     private Drawable mIcon;
-    private Drawable mState;
+    private final Drawable mState;
     private static Rect sIconBounds;
 
     private boolean mCheckable;
diff --git a/mobile/android/base/mozglue/ByteBufferInputStream.java b/mobile/android/base/mozglue/ByteBufferInputStream.java
index 9a18e2dcd0d..ddc25464791 100644
--- a/mobile/android/base/mozglue/ByteBufferInputStream.java
+++ b/mobile/android/base/mozglue/ByteBufferInputStream.java
@@ -12,7 +12,7 @@ class ByteBufferInputStream extends InputStream {
 
     protected ByteBuffer mBuf;
     // Reference to a native object holding the data backing the ByteBuffer.
-    private NativeReference mNativeRef;
+    private final NativeReference mNativeRef;
 
     protected ByteBufferInputStream(ByteBuffer buffer, NativeReference ref) {
         mBuf = buffer;
diff --git a/mobile/android/base/overlays/ui/SendTabList.java b/mobile/android/base/overlays/ui/SendTabList.java
index bc838e93a77..1b9f1895b53 100644
--- a/mobile/android/base/overlays/ui/SendTabList.java
+++ b/mobile/android/base/overlays/ui/SendTabList.java
@@ -55,7 +55,7 @@ public class SendTabList extends ListView {
     // Listener to fire when a share target is selected (either directly or via the prompt)
     private SendTabTargetSelectedListener listener;
 
-    private State currentState = LOADING;
+    private final State currentState = LOADING;
 
     /**
      * Enum defining the states this view may occupy.
diff --git a/mobile/android/base/preferences/AndroidImport.java b/mobile/android/base/preferences/AndroidImport.java
index ad16d7a3c4e..d1d9f6eda33 100644
--- a/mobile/android/base/preferences/AndroidImport.java
+++ b/mobile/android/base/preferences/AndroidImport.java
@@ -22,14 +22,14 @@ import android.util.Log;
 import java.util.ArrayList;
 
 class AndroidImport implements Runnable {
-    static final private String LOGTAG = "AndroidImport";
-    private Context mContext;
-    private Runnable mOnDoneRunnable;
-    private ArrayList mOperations;
-    private ContentResolver mCr;
-    private LocalBrowserDB mDB;
-    private boolean mImportBookmarks;
-    private boolean mImportHistory;
+    private static final String LOGTAG = "AndroidImport";
+    private final Context mContext;
+    private final Runnable mOnDoneRunnable;
+    private final ArrayList mOperations;
+    private final ContentResolver mCr;
+    private final LocalBrowserDB mDB;
+    private final boolean mImportBookmarks;
+    private final boolean mImportHistory;
 
     public AndroidImport(Context context, Runnable onDoneRunnable,
                          boolean doBookmarks, boolean doHistory) {
diff --git a/mobile/android/base/preferences/AndroidImportPreference.java b/mobile/android/base/preferences/AndroidImportPreference.java
index 91ae55a4d75..1cdb9fb1271 100644
--- a/mobile/android/base/preferences/AndroidImportPreference.java
+++ b/mobile/android/base/preferences/AndroidImportPreference.java
@@ -16,9 +16,9 @@ import android.util.AttributeSet;
 import android.util.Log;
 
 class AndroidImportPreference extends MultiPrefMultiChoicePreference {
-    static final private String LOGTAG = "AndroidImport";
+    private static final String LOGTAG = "AndroidImport";
     private static final String PREF_KEY_PREFIX = "import_android.data.";
-    private Context mContext;
+    private final Context mContext;
 
     public AndroidImportPreference(Context context, AttributeSet attrs) {
         super(context, attrs);
diff --git a/mobile/android/base/preferences/GeckoPreferences.java b/mobile/android/base/preferences/GeckoPreferences.java
index a8d045d86ec..720af866544 100644
--- a/mobile/android/base/preferences/GeckoPreferences.java
+++ b/mobile/android/base/preferences/GeckoPreferences.java
@@ -1028,7 +1028,7 @@ OnSharedPreferenceChangeListener
     }
 
     @SuppressWarnings("serial")
-    private Map handlers = new HashMap() {{
+    private final Map handlers = new HashMap() {{
         put(ClearOnShutdownPref.PREF, new ClearOnShutdownPref());
     }};
 
diff --git a/mobile/android/base/preferences/LinkPreference.java b/mobile/android/base/preferences/LinkPreference.java
index a79571e5b44..4ccf2527d10 100644
--- a/mobile/android/base/preferences/LinkPreference.java
+++ b/mobile/android/base/preferences/LinkPreference.java
@@ -12,7 +12,7 @@ import android.preference.Preference;
 import android.util.AttributeSet;
 
 class LinkPreference extends Preference {
-    private String mUrl;
+    private final String mUrl;
 
     public LinkPreference(Context context, AttributeSet attrs) {
         super(context, attrs);
diff --git a/mobile/android/base/preferences/PanelsPreference.java b/mobile/android/base/preferences/PanelsPreference.java
index b3fd31b94fe..96aec53ac5d 100644
--- a/mobile/android/base/preferences/PanelsPreference.java
+++ b/mobile/android/base/preferences/PanelsPreference.java
@@ -45,7 +45,7 @@ public class PanelsPreference extends CustomListPreference {
 
     private View preferenceView;
     protected boolean mIsHidden;
-    private boolean mIsRemovable;
+    private final boolean mIsRemovable;
 
     private boolean mAnimate;
     private static final int ANIMATION_DURATION_MS = 400;
diff --git a/mobile/android/base/preferences/SyncPreference.java b/mobile/android/base/preferences/SyncPreference.java
index 2adfb369c8f..21d9ea96e43 100644
--- a/mobile/android/base/preferences/SyncPreference.java
+++ b/mobile/android/base/preferences/SyncPreference.java
@@ -21,7 +21,7 @@ import android.util.AttributeSet;
 class SyncPreference extends Preference {
     private static final boolean DEFAULT_TO_FXA = true;
 
-    private Context mContext;
+    private final Context mContext;
 
     public SyncPreference(Context context, AttributeSet attrs) {
         super(context, attrs);
diff --git a/mobile/android/base/prompts/ColorPickerInput.java b/mobile/android/base/prompts/ColorPickerInput.java
index eb775b09cd1..302410eae69 100644
--- a/mobile/android/base/prompts/ColorPickerInput.java
+++ b/mobile/android/base/prompts/ColorPickerInput.java
@@ -18,8 +18,8 @@ public class ColorPickerInput extends PromptInput {
     public static final String INPUT_TYPE = "color";
     public static final String LOGTAG = "GeckoColorPickerInput";
 
-    private boolean mShowAdvancedButton = true;
-    private int mInitialColor;
+    private final boolean mShowAdvancedButton = true;
+    private final int mInitialColor;
 
     public ColorPickerInput(JSONObject obj) {
         super(obj);
diff --git a/mobile/android/base/prompts/IconGridInput.java b/mobile/android/base/prompts/IconGridInput.java
index 6ff579f3b34..d043fd8d15f 100644
--- a/mobile/android/base/prompts/IconGridInput.java
+++ b/mobile/android/base/prompts/IconGridInput.java
@@ -40,7 +40,7 @@ public class IconGridInput extends PromptInput implements OnItemClickListener {
     private static int mMaxColumns = -1;  // The maximum number of columns to show
     private static int mIconSize = -1;    // Size of icons in the grid
     private int mSelected;                // Current selection
-    private JSONArray mArray;
+    private final JSONArray mArray;
 
     public IconGridInput(JSONObject obj) {
         super(obj);
diff --git a/mobile/android/base/prompts/PromptInput.java b/mobile/android/base/prompts/PromptInput.java
index ef5b7e9fd1f..cebea98a574 100644
--- a/mobile/android/base/prompts/PromptInput.java
+++ b/mobile/android/base/prompts/PromptInput.java
@@ -132,7 +132,7 @@ public class PromptInput {
 
     public static class CheckboxInput extends PromptInput {
         public static final String INPUT_TYPE = "checkbox";
-        private boolean mChecked;
+        private final boolean mChecked;
 
         public CheckboxInput(JSONObject obj) {
             super(obj);
diff --git a/mobile/android/base/sqlite/ByteBufferInputStream.java b/mobile/android/base/sqlite/ByteBufferInputStream.java
index 39860e48ba1..f6b16619f5f 100644
--- a/mobile/android/base/sqlite/ByteBufferInputStream.java
+++ b/mobile/android/base/sqlite/ByteBufferInputStream.java
@@ -14,7 +14,7 @@ import java.nio.ByteBuffer;
  * easier to use.
  */
 public class ByteBufferInputStream extends InputStream {
-    private ByteBuffer mByteBuffer;
+    private final ByteBuffer mByteBuffer;
 
     public ByteBufferInputStream(ByteBuffer aByteBuffer) {
         mByteBuffer = aByteBuffer;
diff --git a/mobile/android/base/sqlite/SQLiteBridge.java b/mobile/android/base/sqlite/SQLiteBridge.java
index 0fcfb67f8cf..4a062225c8e 100644
--- a/mobile/android/base/sqlite/SQLiteBridge.java
+++ b/mobile/android/base/sqlite/SQLiteBridge.java
@@ -26,7 +26,7 @@ public class SQLiteBridge {
     private static final String LOGTAG = "SQLiteBridge";
 
     // Path to the database. If this database was not opened with openDatabase, we reopen it every query.
-    private String mDb;
+    private final String mDb;
 
     // Pointer to the database if it was opened with openDatabase. 0 implies closed.
     protected volatile long mDbPointer;
diff --git a/mobile/android/base/sync/CommandProcessor.java b/mobile/android/base/sync/CommandProcessor.java
index cb4141c48b5..442ccc3041e 100644
--- a/mobile/android/base/sync/CommandProcessor.java
+++ b/mobile/android/base/sync/CommandProcessor.java
@@ -42,7 +42,7 @@ import android.net.Uri;
  */
 public class CommandProcessor {
   private static final String LOG_TAG = "Command";
-  private static AtomicInteger currentId = new AtomicInteger();
+  private static final AtomicInteger currentId = new AtomicInteger();
   protected ConcurrentHashMap commands = new ConcurrentHashMap();
 
   private final static CommandProcessor processor = new CommandProcessor();
diff --git a/mobile/android/base/sync/JSONRecordFetcher.java b/mobile/android/base/sync/JSONRecordFetcher.java
index b76146a1e06..0fb8f78dffd 100644
--- a/mobile/android/base/sync/JSONRecordFetcher.java
+++ b/mobile/android/base/sync/JSONRecordFetcher.java
@@ -87,7 +87,7 @@ public class JSONRecordFetcher {
   private class LatchedJSONRecordFetchDelegate implements JSONRecordFetchDelegate {
     public ExtendedJSONObject body = null;
     public Exception exception = null;
-    private CountDownLatch latch;
+    private final CountDownLatch latch;
 
     public LatchedJSONRecordFetchDelegate(CountDownLatch latch) {
       this.latch = latch;
diff --git a/mobile/android/base/sync/SyncConfiguration.java b/mobile/android/base/sync/SyncConfiguration.java
index 80c68a3fe9a..4e61e977521 100644
--- a/mobile/android/base/sync/SyncConfiguration.java
+++ b/mobile/android/base/sync/SyncConfiguration.java
@@ -26,7 +26,7 @@ public class SyncConfiguration {
 
   public class EditorBranch implements Editor {
 
-    private String prefix;
+    private final String prefix;
     private Editor editor;
 
     public EditorBranch(SyncConfiguration config, String prefix) {
@@ -105,8 +105,8 @@ public class SyncConfiguration {
    */
   public class ConfigurationBranch implements SharedPreferences {
 
-    private SyncConfiguration config;
-    private String prefix;                // Including trailing period.
+    private final SyncConfiguration config;
+    private final String prefix;                // Including trailing period.
 
     public ConfigurationBranch(SyncConfiguration syncConfiguration,
         String prefix) {
diff --git a/mobile/android/base/sync/Utils.java b/mobile/android/base/sync/Utils.java
index 706042f8879..e6de63d6ddd 100644
--- a/mobile/android/base/sync/Utils.java
+++ b/mobile/android/base/sync/Utils.java
@@ -40,7 +40,7 @@ public class Utils {
 
   private static final String LOG_TAG = "Utils";
 
-  private static SecureRandom sharedSecureRandom = new SecureRandom();
+  private static final SecureRandom sharedSecureRandom = new SecureRandom();
 
   // See 
   public static final int SHARED_PREFERENCES_MODE = 0;
diff --git a/mobile/android/base/sync/jpake/JPakeClient.java b/mobile/android/base/sync/jpake/JPakeClient.java
index 7720c59856e..0604c2133ce 100644
--- a/mobile/android/base/sync/jpake/JPakeClient.java
+++ b/mobile/android/base/sync/jpake/JPakeClient.java
@@ -38,57 +38,57 @@ import ch.boye.httpclientandroidlib.entity.StringEntity;
 
 public class JPakeClient {
 
-  private static String       LOG_TAG                 = "JPakeClient";
+  private static final String LOG_TAG = "JPakeClient";
 
   // J-PAKE constants.
-  public final static int     REQUEST_TIMEOUT         = 60 * 1000;       // 1 min
-  public final static int     KEYEXCHANGE_VERSION     = 3;
-  public final static String  JPAKE_VERIFY_VALUE      = "0123456789ABCDEF";
+  public static final int REQUEST_TIMEOUT = 60 * 1000;       // 1 min
+  public static final int KEYEXCHANGE_VERSION = 3;
+  public static final String JPAKE_VERIFY_VALUE = "0123456789ABCDEF";
 
-  private final static String JPAKE_SIGNERID_SENDER   = "sender";
-  private final static String JPAKE_SIGNERID_RECEIVER = "receiver";
-  private final static int    JPAKE_LENGTH_SECRET     = 8;
-  private final static int    JPAKE_LENGTH_CLIENTID   = 256;
+  private static final String JPAKE_SIGNERID_SENDER = "sender";
+  private static final String JPAKE_SIGNERID_RECEIVER = "receiver";
+  private static final int JPAKE_LENGTH_SECRET = 8;
+  private static final int JPAKE_LENGTH_CLIENTID = 256;
 
-  private final static int    MAX_TRIES               = 10;
-  private final static int    MAX_TRIES_FIRST_MSG     = 300;
-  private final static int    MAX_TRIES_LAST_MSG      = 300;
+  private static final int MAX_TRIES = 10;
+  private static final int MAX_TRIES_FIRST_MSG = 300;
+  private static final int MAX_TRIES_LAST_MSG = 300;
 
   // J-PAKE session values.
-  public String              clientId;
-  public String              secret;
+  public String clientId;
+  public String secret;
 
-  public String              myEtag;
-  public String              mySignerId;
-  public String              theirEtag;
-  public String              theirSignerId;
-  public String              jpakeServer;
+  public String myEtag;
+  public String mySignerId;
+  public String theirEtag;
+  public String theirSignerId;
+  public String jpakeServer;
 
   // J-PAKE state.
-  public boolean             paired                  = false;
-  public boolean             finished                = false;
+  public boolean paired;
+  public boolean finished;
 
   // J-PAKE values.
-  public int                 jpakePollInterval;
-  public int                 jpakeMaxTries;
-  public String              channel;
-  public volatile String     channelUrl;
+  public int jpakePollInterval;
+  public int jpakeMaxTries;
+  public String channel;
+  public volatile String channelUrl;
 
   // J-PAKE session data.
-  public KeyBundle           myKeyBundle;
-  public JSONObject          jCreds;
+  public KeyBundle myKeyBundle;
+  public JSONObject jCreds;
 
-  public ExtendedJSONObject  jOutgoing;
-  public ExtendedJSONObject  jIncoming;
+  public ExtendedJSONObject jOutgoing;
+  public ExtendedJSONObject jIncoming;
 
-  public JPakeParty          jParty;
-  public JPakeNumGenerator   numGen;
+  public JPakeParty jParty;
+  public JPakeNumGenerator numGen;
 
-  public int                 pollTries = 0;
+  public int pollTries;
 
   // UI controller.
-  private SetupSyncActivity controllerActivity;
-  private Queue  stages;
+  private final SetupSyncActivity controllerActivity;
+  private Queue stages;
 
   public JPakeClient(SetupSyncActivity activity) {
     controllerActivity = activity;
diff --git a/mobile/android/base/sync/jpake/stage/GetRequestStage.java b/mobile/android/base/sync/jpake/stage/GetRequestStage.java
index b2fdac88c0b..7d00b06b777 100644
--- a/mobile/android/base/sync/jpake/stage/GetRequestStage.java
+++ b/mobile/android/base/sync/jpake/stage/GetRequestStage.java
@@ -28,7 +28,7 @@ import ch.boye.httpclientandroidlib.message.BasicHeader;
 
 public class GetRequestStage extends JPakeStage {
 
-  private Timer timerScheduler = new Timer();
+  private final Timer timerScheduler = new Timer();
   private int pollTries;
   private GetStepTimerTask getStepTimerTask;
 
@@ -188,7 +188,7 @@ public class GetRequestStage extends JPakeStage {
    *
    */
   public class GetStepTimerTask extends TimerTask {
-    private Resource request;
+    private final Resource request;
 
     public GetStepTimerTask(Resource request) {
       this.request = request;
diff --git a/mobile/android/base/sync/middleware/Crypto5MiddlewareRepository.java b/mobile/android/base/sync/middleware/Crypto5MiddlewareRepository.java
index 69249ac4f4c..941ce9775e1 100644
--- a/mobile/android/base/sync/middleware/Crypto5MiddlewareRepository.java
+++ b/mobile/android/base/sync/middleware/Crypto5MiddlewareRepository.java
@@ -26,8 +26,8 @@ public class Crypto5MiddlewareRepository extends MiddlewareRepository {
   public RecordFactory recordFactory = new IdentityRecordFactory();
 
   public class Crypto5MiddlewareRepositorySessionCreationDelegate extends MiddlewareRepository.SessionCreationDelegate {
-    private Crypto5MiddlewareRepository repository;
-    private RepositorySessionCreationDelegate outerDelegate;
+    private final Crypto5MiddlewareRepository repository;
+    private final RepositorySessionCreationDelegate outerDelegate;
 
     public Crypto5MiddlewareRepositorySessionCreationDelegate(Crypto5MiddlewareRepository repository, RepositorySessionCreationDelegate outerDelegate) {
       this.repository = repository;
@@ -53,7 +53,7 @@ public class Crypto5MiddlewareRepository extends MiddlewareRepository {
   }
 
   public KeyBundle keyBundle;
-  private Repository inner;
+  private final Repository inner;
 
   public Crypto5MiddlewareRepository(Repository inner, KeyBundle keys) {
     super();
diff --git a/mobile/android/base/sync/middleware/Crypto5MiddlewareRepositorySession.java b/mobile/android/base/sync/middleware/Crypto5MiddlewareRepositorySession.java
index 7e7fad2478a..cebb8998e22 100644
--- a/mobile/android/base/sync/middleware/Crypto5MiddlewareRepositorySession.java
+++ b/mobile/android/base/sync/middleware/Crypto5MiddlewareRepositorySession.java
@@ -58,8 +58,8 @@ import org.mozilla.gecko.sync.repositories.domain.Record;
  *
  */
 public class Crypto5MiddlewareRepositorySession extends MiddlewareRepositorySession {
-  private KeyBundle keyBundle;
-  private RecordFactory recordFactory;
+  private final KeyBundle keyBundle;
+  private final RecordFactory recordFactory;
 
   public Crypto5MiddlewareRepositorySession(RepositorySession session, Crypto5MiddlewareRepository repository, RecordFactory recordFactory) {
     super(session, repository);
@@ -68,9 +68,9 @@ public class Crypto5MiddlewareRepositorySession extends MiddlewareRepositorySess
   }
 
   public class DecryptingTransformingFetchDelegate implements RepositorySessionFetchRecordsDelegate {
-    private RepositorySessionFetchRecordsDelegate next;
-    private KeyBundle keyBundle;
-    private RecordFactory recordFactory;
+    private final RepositorySessionFetchRecordsDelegate next;
+    private final KeyBundle keyBundle;
+    private final RecordFactory recordFactory;
 
     DecryptingTransformingFetchDelegate(RepositorySessionFetchRecordsDelegate next, KeyBundle bundle, RecordFactory recordFactory) {
       this.next = next;
diff --git a/mobile/android/base/sync/middleware/MiddlewareRepositorySession.java b/mobile/android/base/sync/middleware/MiddlewareRepositorySession.java
index 88981d714d7..5ab628cfd17 100644
--- a/mobile/android/base/sync/middleware/MiddlewareRepositorySession.java
+++ b/mobile/android/base/sync/middleware/MiddlewareRepositorySession.java
@@ -32,8 +32,8 @@ public abstract class MiddlewareRepositorySession extends RepositorySession {
 
   public class MiddlewareRepositorySessionBeginDelegate implements RepositorySessionBeginDelegate {
 
-    private MiddlewareRepositorySession outerSession;
-    private RepositorySessionBeginDelegate next;
+    private final MiddlewareRepositorySession outerSession;
+    private final RepositorySessionBeginDelegate next;
 
     public MiddlewareRepositorySessionBeginDelegate(MiddlewareRepositorySession outerSession, RepositorySessionBeginDelegate next) {
       this.outerSession = outerSession;
diff --git a/mobile/android/base/sync/net/BaseResource.java b/mobile/android/base/sync/net/BaseResource.java
index 28a59d97b5f..0d8eb544ebe 100644
--- a/mobile/android/base/sync/net/BaseResource.java
+++ b/mobile/android/base/sync/net/BaseResource.java
@@ -184,7 +184,7 @@ public class BaseResource implements Resource {
     delegate.addHeaders(request, client);
   }
 
-  private static Object connManagerMonitor = new Object();
+  private static final Object connManagerMonitor = new Object();
   private static ClientConnectionManager connManager;
 
   // Call within a synchronized block on connManagerMonitor.
diff --git a/mobile/android/base/sync/repositories/HashSetStoreTracker.java b/mobile/android/base/sync/repositories/HashSetStoreTracker.java
index 11b1a0834eb..3b6facc316b 100644
--- a/mobile/android/base/sync/repositories/HashSetStoreTracker.java
+++ b/mobile/android/base/sync/repositories/HashSetStoreTracker.java
@@ -15,7 +15,7 @@ public class HashSetStoreTracker implements StoreTracker {
   // Used to store GUIDs that were not locally modified but
   // have been modified by a call to `store`, and thus
   // should not be returned by a subsequent fetch.
-  private HashSet guids;
+  private final HashSet guids;
 
   public HashSetStoreTracker() {
     guids = new HashSet();
diff --git a/mobile/android/base/sync/repositories/Server11RepositorySession.java b/mobile/android/base/sync/repositories/Server11RepositorySession.java
index b1c4496cfd6..a7a5896c50c 100644
--- a/mobile/android/base/sync/repositories/Server11RepositorySession.java
+++ b/mobile/android/base/sync/repositories/Server11RepositorySession.java
@@ -95,7 +95,7 @@ public class Server11RepositorySession extends RepositorySession {
   /**
    * Used to track outstanding requests, so that we can abort them as needed.
    */
-  private Set pending = Collections.synchronizedSet(new HashSet());
+  private final Set pending = Collections.synchronizedSet(new HashSet());
 
   @Override
   public void abort() {
@@ -115,7 +115,7 @@ public class Server11RepositorySession extends RepositorySession {
    */
   public class RequestFetchDelegateAdapter extends WBOCollectionRequestDelegate {
     RepositorySessionFetchRecordsDelegate delegate;
-    private DelayedWorkTracker workTracker = new DelayedWorkTracker();
+    private final DelayedWorkTracker workTracker = new DelayedWorkTracker();
 
     // So that we can clean up.
     private SyncStorageCollectionRequest request;
@@ -427,9 +427,9 @@ public class Server11RepositorySession extends RepositorySession {
   protected class RecordUploadRunnable implements Runnable, SyncStorageRequestDelegate {
 
     public final String LOG_TAG = "RecordUploadRunnable";
-    private ArrayList outgoing;
+    private final ArrayList outgoing;
     private ArrayList outgoingGuids;
-    private long byteCount;
+    private final long byteCount;
 
     public RecordUploadRunnable(RepositorySessionStoreDelegate storeDelegate,
                                 ArrayList outgoing,
@@ -556,7 +556,7 @@ public class Server11RepositorySession extends RepositorySession {
     }
 
     public class ByteArraysEntity extends EntityTemplate {
-      private long count;
+      private final long count;
       public ByteArraysEntity(ArrayList arrays, long totalBytes) {
         super(new ByteArraysContentProducer(arrays));
         this.count = totalBytes;
diff --git a/mobile/android/base/sync/repositories/android/AndroidBrowserBookmarksDataAccessor.java b/mobile/android/base/sync/repositories/android/AndroidBrowserBookmarksDataAccessor.java
index e187aff4311..7bb4e2b65a5 100644
--- a/mobile/android/base/sync/repositories/android/AndroidBrowserBookmarksDataAccessor.java
+++ b/mobile/android/base/sync/repositories/android/AndroidBrowserBookmarksDataAccessor.java
@@ -87,7 +87,7 @@ public class AndroidBrowserBookmarksDataAccessor extends AndroidBrowserRepositor
     context.getContentResolver().delete(uri, EXCLUDE_SPECIAL_GUIDS_WHERE_CLAUSE, null);
   }
 
-  private String[] GUID_AND_ID = new String[] { BrowserContract.Bookmarks.GUID,
+  private final String[] GUID_AND_ID = new String[] { BrowserContract.Bookmarks.GUID,
                                                 BrowserContract.Bookmarks._ID };
 
   protected Cursor getGuidsIDsForFolders() throws NullCursorException {
diff --git a/mobile/android/base/sync/repositories/android/AndroidBrowserBookmarksRepositorySession.java b/mobile/android/base/sync/repositories/android/AndroidBrowserBookmarksRepositorySession.java
index e4ec077c38b..ce75947cc4b 100644
--- a/mobile/android/base/sync/repositories/android/AndroidBrowserBookmarksRepositorySession.java
+++ b/mobile/android/base/sync/repositories/android/AndroidBrowserBookmarksRepositorySession.java
@@ -42,8 +42,8 @@ public class AndroidBrowserBookmarksRepositorySession extends AndroidBrowserRepo
   public static final int DEFAULT_INSERTION_FLUSH_THRESHOLD = 50;
 
   // TODO: synchronization for these.
-  private HashMap parentGuidToIDMap = new HashMap();
-  private HashMap parentIDToGuidMap = new HashMap();
+  private final HashMap parentGuidToIDMap = new HashMap();
+  private final HashMap parentIDToGuidMap = new HashMap();
 
   /**
    * Some notes on reparenting/reordering.
@@ -100,11 +100,11 @@ public class AndroidBrowserBookmarksRepositorySession extends AndroidBrowserRepo
    */
 
   // TODO: can we guarantee serial access to these?
-  private HashMap> missingParentToChildren = new HashMap>();
-  private HashMap         parentToChildArray      = new HashMap();
+  private final HashMap> missingParentToChildren = new HashMap>();
+  private final HashMap         parentToChildArray      = new HashMap();
   private int needsReparenting = 0;
 
-  private AndroidBrowserBookmarksDataAccessor dataAccessor;
+  private final AndroidBrowserBookmarksDataAccessor dataAccessor;
 
   protected BookmarksDeletionManager deletionManager;
   protected BookmarksInsertionManager insertionManager;
diff --git a/mobile/android/base/sync/repositories/android/AndroidBrowserHistoryDataAccessor.java b/mobile/android/base/sync/repositories/android/AndroidBrowserHistoryDataAccessor.java
index 1546d403738..ed6cde2f85e 100644
--- a/mobile/android/base/sync/repositories/android/AndroidBrowserHistoryDataAccessor.java
+++ b/mobile/android/base/sync/repositories/android/AndroidBrowserHistoryDataAccessor.java
@@ -23,7 +23,7 @@ import android.net.Uri;
 public class AndroidBrowserHistoryDataAccessor extends
     AndroidBrowserRepositoryDataAccessor {
 
-  private AndroidBrowserHistoryDataExtender dataExtender;
+  private final AndroidBrowserHistoryDataExtender dataExtender;
 
   public AndroidBrowserHistoryDataAccessor(Context context) {
     super(context);
diff --git a/mobile/android/base/sync/repositories/android/AndroidBrowserRepository.java b/mobile/android/base/sync/repositories/android/AndroidBrowserRepository.java
index f434d8569e3..3a96eff2caa 100644
--- a/mobile/android/base/sync/repositories/android/AndroidBrowserRepository.java
+++ b/mobile/android/base/sync/repositories/android/AndroidBrowserRepository.java
@@ -27,8 +27,8 @@ public abstract class AndroidBrowserRepository extends Repository {
   }
 
   class CleanThread extends Thread {
-    private RepositorySessionCleanDelegate delegate;
-    private Context context;
+    private final RepositorySessionCleanDelegate delegate;
+    private final Context context;
 
     public CleanThread(RepositorySessionCleanDelegate delegate, Context context) {
       if (context == null) {
@@ -56,8 +56,8 @@ public abstract class AndroidBrowserRepository extends Repository {
   protected abstract void sessionCreator(RepositorySessionCreationDelegate delegate, Context context);
 
   class CreateSessionThread extends Thread {
-    private RepositorySessionCreationDelegate delegate;
-    private Context context;
+    private final RepositorySessionCreationDelegate delegate;
+    private final Context context;
 
     public CreateSessionThread(RepositorySessionCreationDelegate delegate, Context context) {
       if (context == null) {
diff --git a/mobile/android/base/sync/repositories/android/AndroidBrowserRepositorySession.java b/mobile/android/base/sync/repositories/android/AndroidBrowserRepositorySession.java
index 090a9ace481..421721dfe50 100644
--- a/mobile/android/base/sync/repositories/android/AndroidBrowserRepositorySession.java
+++ b/mobile/android/base/sync/repositories/android/AndroidBrowserRepositorySession.java
@@ -200,8 +200,8 @@ public abstract class AndroidBrowserRepositorySession extends StoreTrackingRepos
 
   class GuidsSinceRunnable implements Runnable {
 
-    private RepositorySessionGuidsSinceDelegate delegate;
-    private long                                timestamp;
+    private final RepositorySessionGuidsSinceDelegate delegate;
+    private final long                                timestamp;
 
     public GuidsSinceRunnable(long timestamp,
                               RepositorySessionGuidsSinceDelegate delegate) {
@@ -300,9 +300,9 @@ public abstract class AndroidBrowserRepositorySession extends StoreTrackingRepos
   }
 
   public class FetchRunnable extends FetchingRunnable {
-    private String[] guids;
-    private long     end;
-    private RecordFilter filter;
+    private final String[] guids;
+    private final long     end;
+    private final RecordFilter filter;
 
     public FetchRunnable(String[] guids,
                          long end,
@@ -349,9 +349,9 @@ public abstract class AndroidBrowserRepositorySession extends StoreTrackingRepos
   }
 
   class FetchSinceRunnable extends FetchingRunnable {
-    private long since;
-    private long end;
-    private RecordFilter filter;
+    private final long since;
+    private final long end;
+    private final RecordFilter filter;
 
     public FetchSinceRunnable(long since,
                               long end,
diff --git a/mobile/android/base/sync/repositories/android/FormHistoryRepositorySession.java b/mobile/android/base/sync/repositories/android/FormHistoryRepositorySession.java
index e5ae82bf1d8..438e7ef3806 100644
--- a/mobile/android/base/sync/repositories/android/FormHistoryRepositorySession.java
+++ b/mobile/android/base/sync/repositories/android/FormHistoryRepositorySession.java
@@ -44,8 +44,8 @@ public class FormHistoryRepositorySession extends
    */
   public static final int INSERT_ITEM_THRESHOLD = 200;
 
-  private static Uri FORM_HISTORY_CONTENT_URI = BrowserContractHelpers.FORM_HISTORY_CONTENT_URI;
-  private static Uri DELETED_FORM_HISTORY_CONTENT_URI = BrowserContractHelpers.DELETED_FORM_HISTORY_CONTENT_URI;
+  private static final Uri FORM_HISTORY_CONTENT_URI = BrowserContractHelpers.FORM_HISTORY_CONTENT_URI;
+  private static final Uri DELETED_FORM_HISTORY_CONTENT_URI = BrowserContractHelpers.DELETED_FORM_HISTORY_CONTENT_URI;
 
   public static class FormHistoryRepository extends Repository {
 
diff --git a/mobile/android/base/sync/repositories/android/PasswordsRepositorySession.java b/mobile/android/base/sync/repositories/android/PasswordsRepositorySession.java
index e7f41a453a1..6301a83a629 100644
--- a/mobile/android/base/sync/repositories/android/PasswordsRepositorySession.java
+++ b/mobile/android/base/sync/repositories/android/PasswordsRepositorySession.java
@@ -49,11 +49,11 @@ public class PasswordsRepositorySession extends
   }
 
   private static final String LOG_TAG = "PasswordsRepoSession";
-  private static String COLLECTION = "passwords";
+  private static final String COLLECTION = "passwords";
 
-  private RepoUtils.QueryHelper passwordsHelper;
-  private RepoUtils.QueryHelper deletedPasswordsHelper;
-  private ContentProviderClient passwordsProvider;
+  private final RepoUtils.QueryHelper passwordsHelper;
+  private final RepoUtils.QueryHelper deletedPasswordsHelper;
+  private final ContentProviderClient passwordsProvider;
 
   private final Context context;
 
diff --git a/mobile/android/base/sync/repositories/delegates/DeferredRepositorySessionBeginDelegate.java b/mobile/android/base/sync/repositories/delegates/DeferredRepositorySessionBeginDelegate.java
index 2f9a640da35..1ccdcce19a3 100644
--- a/mobile/android/base/sync/repositories/delegates/DeferredRepositorySessionBeginDelegate.java
+++ b/mobile/android/base/sync/repositories/delegates/DeferredRepositorySessionBeginDelegate.java
@@ -9,8 +9,8 @@ import java.util.concurrent.ExecutorService;
 import org.mozilla.gecko.sync.repositories.RepositorySession;
 
 public class DeferredRepositorySessionBeginDelegate implements RepositorySessionBeginDelegate {
-  private RepositorySessionBeginDelegate inner;
-  private ExecutorService executor;
+  private final RepositorySessionBeginDelegate inner;
+  private final ExecutorService executor;
   public DeferredRepositorySessionBeginDelegate(final RepositorySessionBeginDelegate inner, final ExecutorService executor) {
     this.inner = inner;
     this.executor = executor;
diff --git a/mobile/android/base/sync/repositories/delegates/DeferredRepositorySessionFetchRecordsDelegate.java b/mobile/android/base/sync/repositories/delegates/DeferredRepositorySessionFetchRecordsDelegate.java
index 9cf170f291b..1178d9b5bf5 100644
--- a/mobile/android/base/sync/repositories/delegates/DeferredRepositorySessionFetchRecordsDelegate.java
+++ b/mobile/android/base/sync/repositories/delegates/DeferredRepositorySessionFetchRecordsDelegate.java
@@ -9,8 +9,8 @@ import java.util.concurrent.ExecutorService;
 import org.mozilla.gecko.sync.repositories.domain.Record;
 
 public class DeferredRepositorySessionFetchRecordsDelegate implements RepositorySessionFetchRecordsDelegate {
-  private RepositorySessionFetchRecordsDelegate inner;
-  private ExecutorService executor;
+  private final RepositorySessionFetchRecordsDelegate inner;
+  private final ExecutorService executor;
   public DeferredRepositorySessionFetchRecordsDelegate(final RepositorySessionFetchRecordsDelegate inner, final ExecutorService executor) {
     this.inner = inner;
     this.executor = executor;
diff --git a/mobile/android/base/sync/setup/SyncAuthenticatorService.java b/mobile/android/base/sync/setup/SyncAuthenticatorService.java
index 62157283485..3ea9393c3f0 100644
--- a/mobile/android/base/sync/setup/SyncAuthenticatorService.java
+++ b/mobile/android/base/sync/setup/SyncAuthenticatorService.java
@@ -133,7 +133,7 @@ public class SyncAuthenticatorService extends Service {
   }
 
   private static class SyncAccountAuthenticator extends AbstractAccountAuthenticator {
-    private Context mContext;
+    private final Context mContext;
     public SyncAccountAuthenticator(Context context) {
       super(context);
       mContext = context;
diff --git a/mobile/android/base/sync/setup/activities/ClientRecordArrayAdapter.java b/mobile/android/base/sync/setup/activities/ClientRecordArrayAdapter.java
index b847c1e5815..558f45ef2ec 100644
--- a/mobile/android/base/sync/setup/activities/ClientRecordArrayAdapter.java
+++ b/mobile/android/base/sync/setup/activities/ClientRecordArrayAdapter.java
@@ -24,7 +24,7 @@ public class ClientRecordArrayAdapter extends ArrayAdapter {
   public static final String LOG_TAG = "ClientRecArrayAdapter";
 
   private boolean[] checkedItems;
-  private SendTabActivity sendTabActivity;
+  private final SendTabActivity sendTabActivity;
 
   public ClientRecordArrayAdapter(Context context,
                                   int textViewResourceId) {
diff --git a/mobile/android/base/sync/setup/auth/AccountAuthenticator.java b/mobile/android/base/sync/setup/auth/AccountAuthenticator.java
index 4067ceafefb..9b747a8ad0f 100644
--- a/mobile/android/base/sync/setup/auth/AccountAuthenticator.java
+++ b/mobile/android/base/sync/setup/auth/AccountAuthenticator.java
@@ -15,7 +15,7 @@ import org.mozilla.gecko.sync.setup.activities.AccountActivity;
 public class AccountAuthenticator {
   private final String LOG_TAG = "AccountAuthenticator";
 
-  private AccountActivity activityCallback;
+  private final AccountActivity activityCallback;
   private Queue stages;
 
   // Values for authentication.
diff --git a/mobile/android/base/sync/stage/FetchMetaGlobalStage.java b/mobile/android/base/sync/stage/FetchMetaGlobalStage.java
index 967059d3ce4..b4407b26bb0 100644
--- a/mobile/android/base/sync/stage/FetchMetaGlobalStage.java
+++ b/mobile/android/base/sync/stage/FetchMetaGlobalStage.java
@@ -18,7 +18,7 @@ public class FetchMetaGlobalStage extends AbstractNonRepositorySyncStage {
 
   public class StageMetaGlobalDelegate implements MetaGlobalDelegate {
 
-    private GlobalSession session;
+    private final GlobalSession session;
     public StageMetaGlobalDelegate(GlobalSession session) {
       this.session = session;
     }
diff --git a/mobile/android/base/sync/stage/SafeConstrainedServer11Repository.java b/mobile/android/base/sync/stage/SafeConstrainedServer11Repository.java
index 79850df00e4..58a92a59d9d 100644
--- a/mobile/android/base/sync/stage/SafeConstrainedServer11Repository.java
+++ b/mobile/android/base/sync/stage/SafeConstrainedServer11Repository.java
@@ -31,7 +31,7 @@ import android.content.Context;
 public class SafeConstrainedServer11Repository extends ConstrainedServer11Repository {
 
   // This can be lazily evaluated if we need it.
-  private JSONRecordFetcher countFetcher;
+  private final JSONRecordFetcher countFetcher;
 
   public SafeConstrainedServer11Repository(String collection,
                                            String storageURL,
@@ -61,7 +61,7 @@ public class SafeConstrainedServer11Repository extends ConstrainedServer11Reposi
      * The session will report no data available if this is a first sync
      * and the server has more data available than this limit.
      */
-    private long fetchLimit;
+    private final long fetchLimit;
 
     public CountCheckingServer11RepositorySession(Repository repository, long fetchLimit) {
       super(repository);
diff --git a/mobile/android/base/sync/synchronizer/ConcurrentRecordConsumer.java b/mobile/android/base/sync/synchronizer/ConcurrentRecordConsumer.java
index 96a5ef47378..9b1ef3e85f2 100644
--- a/mobile/android/base/sync/synchronizer/ConcurrentRecordConsumer.java
+++ b/mobile/android/base/sync/synchronizer/ConcurrentRecordConsumer.java
@@ -29,7 +29,7 @@ class ConcurrentRecordConsumer extends RecordConsumer {
     this.delegate = delegate;
   }
 
-  private Object monitor = new Object();
+  private final Object monitor = new Object();
   @Override
   public void doNotify() {
     synchronized (monitor) {
@@ -54,7 +54,7 @@ class ConcurrentRecordConsumer extends RecordConsumer {
     }
   }
 
-  private Object countMonitor = new Object();
+  private final Object countMonitor = new Object();
   @Override
   public void stored() {
     Logger.trace(LOG_TAG, "Record stored. Notifying.");
diff --git a/mobile/android/base/sync/synchronizer/RecordsChannel.java b/mobile/android/base/sync/synchronizer/RecordsChannel.java
index 30290e2f82e..f929cdc7579 100644
--- a/mobile/android/base/sync/synchronizer/RecordsChannel.java
+++ b/mobile/android/base/sync/synchronizer/RecordsChannel.java
@@ -69,7 +69,7 @@ public class RecordsChannel implements
   private static final String LOG_TAG = "RecordsChannel";
   public RepositorySession source;
   public RepositorySession sink;
-  private RecordsChannelDelegate delegate;
+  private final RecordsChannelDelegate delegate;
   private long fetchEnd = -1;
 
   protected final AtomicInteger numFetched = new AtomicInteger();
@@ -94,7 +94,7 @@ public class RecordsChannel implements
    */
   private RecordConsumer consumer;
   private boolean waitingForQueueDone = false;
-  private ConcurrentLinkedQueue toProcess = new ConcurrentLinkedQueue();
+  private final ConcurrentLinkedQueue toProcess = new ConcurrentLinkedQueue();
 
   @Override
   public ConcurrentLinkedQueue getQueue() {
diff --git a/mobile/android/base/sync/synchronizer/SerialRecordConsumer.java b/mobile/android/base/sync/synchronizer/SerialRecordConsumer.java
index 93a38c67b4e..6ee44ea2ba3 100644
--- a/mobile/android/base/sync/synchronizer/SerialRecordConsumer.java
+++ b/mobile/android/base/sync/synchronizer/SerialRecordConsumer.java
@@ -21,7 +21,7 @@ class SerialRecordConsumer extends RecordConsumer {
     this.delegate = delegate;
   }
 
-  private Object monitor = new Object();
+  private final Object monitor = new Object();
   @Override
   public void doNotify() {
     synchronized (monitor) {
@@ -48,7 +48,7 @@ class SerialRecordConsumer extends RecordConsumer {
     }
   }
 
-  private Object storeSerializer = new Object();
+  private final Object storeSerializer = new Object();
   @Override
   public void stored() {
     Logger.debug(LOG_TAG, "Record stored. Notifying.");
diff --git a/mobile/android/base/tabs/PrivateTabsPanel.java b/mobile/android/base/tabs/PrivateTabsPanel.java
index 5d0629ecdfd..aa20ee4b3ef 100644
--- a/mobile/android/base/tabs/PrivateTabsPanel.java
+++ b/mobile/android/base/tabs/PrivateTabsPanel.java
@@ -27,7 +27,7 @@ import android.widget.FrameLayout;
  */
 class PrivateTabsPanel extends FrameLayout implements CloseAllPanelView {
     private TabsPanel tabsPanel;
-    private TabsLayout tabsLayout;
+    private final TabsLayout tabsLayout;
 
     public PrivateTabsPanel(Context context, AttributeSet attrs) {
         super(context, attrs);
diff --git a/mobile/android/base/tabs/TabsGridLayout.java b/mobile/android/base/tabs/TabsGridLayout.java
index 26374043a4a..d93b09bcb68 100644
--- a/mobile/android/base/tabs/TabsGridLayout.java
+++ b/mobile/android/base/tabs/TabsGridLayout.java
@@ -33,12 +33,12 @@ class TabsGridLayout extends GridView
                                 Tabs.OnTabsChangedListener {
     private static final String LOGTAG = "Gecko" + TabsGridLayout.class.getSimpleName();
 
-    private Context mContext;
+    private final Context mContext;
     private TabsPanel mTabsPanel;
 
     final private boolean mIsPrivate;
 
-    private TabsLayoutAdapter mTabsAdapter;
+    private final TabsLayoutAdapter mTabsAdapter;
 
     public TabsGridLayout(Context context, AttributeSet attrs) {
         super(context, attrs, R.attr.tabGridLayoutViewStyle);
diff --git a/mobile/android/base/tabs/TabsLayoutAdapter.java b/mobile/android/base/tabs/TabsLayoutAdapter.java
index 3e2e8664634..8e21e8e67e6 100644
--- a/mobile/android/base/tabs/TabsLayoutAdapter.java
+++ b/mobile/android/base/tabs/TabsLayoutAdapter.java
@@ -20,9 +20,9 @@ import java.util.ArrayList;
 public class TabsLayoutAdapter extends BaseAdapter {
     public static final String LOGTAG = "Gecko" + TabsLayoutAdapter.class.getSimpleName();
 
-    private Context mContext;
+    private final Context mContext;
     private ArrayList mTabs;
-    private LayoutInflater mInflater;
+    private final LayoutInflater mInflater;
 
     public TabsLayoutAdapter (Context context) {
         mContext = context;
diff --git a/mobile/android/base/tabs/TabsListLayout.java b/mobile/android/base/tabs/TabsListLayout.java
index dcc1c9839b4..44233c0723f 100644
--- a/mobile/android/base/tabs/TabsListLayout.java
+++ b/mobile/android/base/tabs/TabsListLayout.java
@@ -36,18 +36,18 @@ class TabsListLayout extends TwoWayView
                                 Tabs.OnTabsChangedListener {
     private static final String LOGTAG = "Gecko" + TabsListLayout.class.getSimpleName();
 
-    private Context mContext;
+    private final Context mContext;
     private TabsPanel mTabsPanel;
 
     final private boolean mIsPrivate;
 
-    private TabsLayoutAdapter mTabsAdapter;
+    private final TabsLayoutAdapter mTabsAdapter;
 
-    private List mPendingClosedTabs;
+    private final List mPendingClosedTabs;
     private int mCloseAnimationCount;
     private int mCloseAllAnimationCount;
 
-    private TabSwipeGestureListener mSwipeListener;
+    private final TabSwipeGestureListener mSwipeListener;
 
     // Time to animate non-flinged tabs of screen, in milliseconds
     private static final int ANIMATION_DURATION = 250;
@@ -87,7 +87,7 @@ class TabsListLayout extends TwoWayView
     }
 
     private class TabsListLayoutAdapter extends TabsLayoutAdapter {
-        private Button.OnClickListener mCloseOnClickListener;
+        private final Button.OnClickListener mCloseOnClickListener;
         public TabsListLayoutAdapter (Context context) {
             super(context);
 
@@ -409,10 +409,10 @@ class TabsListLayout extends TwoWayView
         // http://androidxref.com/4.0.4/xref/packages/apps/Browser/src/com/android/browser/NavTabScroller.java#61
         private static final float MIN_VELOCITY = 750;
 
-        private int mSwipeThreshold;
-        private int mMinFlingVelocity;
+        private final int mSwipeThreshold;
+        private final int mMinFlingVelocity;
 
-        private int mMaxFlingVelocity;
+        private final int mMaxFlingVelocity;
         private VelocityTracker mVelocityTracker;
 
         private int mListWidth = 1;
diff --git a/mobile/android/base/tabs/TabsPanel.java b/mobile/android/base/tabs/TabsPanel.java
index 5d8a886eda4..5d279cc5397 100644
--- a/mobile/android/base/tabs/TabsPanel.java
+++ b/mobile/android/base/tabs/TabsPanel.java
@@ -79,7 +79,7 @@ public class TabsPanel extends LinearLayout
         public void onTabsLayoutChange(int width, int height);
     }
 
-    private Context mContext;
+    private final Context mContext;
     private final GeckoApp mActivity;
     private final LightweightTheme mTheme;
     private RelativeLayout mHeader;
@@ -90,7 +90,7 @@ public class TabsPanel extends LinearLayout
     private PanelView mPanelRemote;
     private RelativeLayout mFooter;
     private TabsLayoutChangeListener mLayoutChangeListener;
-    private AppStateListener mAppStateListener;
+    private final AppStateListener mAppStateListener;
 
     private IconTabWidget mTabWidget;
     private static ImageButton mMenuButton;
@@ -101,7 +101,7 @@ public class TabsPanel extends LinearLayout
     private boolean mVisible;
     private boolean mHeaderVisible;
 
-    private GeckoPopupMenu mPopupMenu;
+    private final GeckoPopupMenu mPopupMenu;
 
     public TabsPanel(Context context, AttributeSet attrs) {
         super(context, attrs);
diff --git a/mobile/android/base/tests/AboutHomeTest.java b/mobile/android/base/tests/AboutHomeTest.java
index 018916fa205..1a055e090f5 100644
--- a/mobile/android/base/tests/AboutHomeTest.java
+++ b/mobile/android/base/tests/AboutHomeTest.java
@@ -35,7 +35,7 @@ abstract class AboutHomeTest extends PixelTest {
         READING_LIST
     };
 
-    private ArrayList aboutHomeTabs = new ArrayList() {{
+    private final ArrayList aboutHomeTabs = new ArrayList() {{
                   add("TOP_SITES");
                   add("BOOKMARKS");
                   add("READING_LIST");
diff --git a/mobile/android/base/tests/DatabaseHelper.java b/mobile/android/base/tests/DatabaseHelper.java
index d3d9d2a074f..8f0cf1d1de0 100644
--- a/mobile/android/base/tests/DatabaseHelper.java
+++ b/mobile/android/base/tests/DatabaseHelper.java
@@ -14,8 +14,8 @@ import android.net.Uri;
 
 class DatabaseHelper {
     protected enum BrowserDataType {BOOKMARKS, HISTORY};
-    private Activity mActivity;
-    private Assert mAsserter;
+    private final Activity mActivity;
+    private final Assert mAsserter;
 
     public DatabaseHelper(Activity activity, Assert asserter) {
         mActivity = activity;
diff --git a/mobile/android/base/tests/SessionTest.java b/mobile/android/base/tests/SessionTest.java
index 53c1e40031d..c1e14b6673f 100644
--- a/mobile/android/base/tests/SessionTest.java
+++ b/mobile/android/base/tests/SessionTest.java
@@ -45,8 +45,8 @@ public abstract class SessionTest extends BaseTest {
     }
 
     protected class PageInfo {
-        private String url;
-        private String title;
+        private final String url;
+        private final String title;
 
         public PageInfo(String key) {
             if (key.startsWith("about:")) {
diff --git a/mobile/android/base/tests/testBookmark.java b/mobile/android/base/tests/testBookmark.java
index 83922e7698b..80bb4cc0bf6 100644
--- a/mobile/android/base/tests/testBookmark.java
+++ b/mobile/android/base/tests/testBookmark.java
@@ -3,7 +3,7 @@ package org.mozilla.gecko.tests;
 
 public class testBookmark extends AboutHomeTest {
     private static String BOOKMARK_URL;
-    private static int WAIT_FOR_BOOKMARKED_TIMEOUT = 10000;
+    private static final int WAIT_FOR_BOOKMARKED_TIMEOUT = 10000;
 
     public void testBookmark() {
         BOOKMARK_URL = getAbsoluteUrl(StringHelper.ROBOCOP_BLANK_PAGE_01_URL);
diff --git a/mobile/android/base/tests/testNewTab.java b/mobile/android/base/tests/testNewTab.java
index 538b870e160..fe35b1b1a80 100644
--- a/mobile/android/base/tests/testNewTab.java
+++ b/mobile/android/base/tests/testNewTab.java
@@ -12,7 +12,7 @@ import com.jayway.android.robotium.solo.Condition;
 public class testNewTab extends BaseTest {
     private Element tabCount = null;
     private Element tabs = null;
-    private Element closeTab = null;
+    private final Element closeTab = null;
     private int tabCountInt = 0;
 
     public void testNewTab() {
diff --git a/mobile/android/base/tests/testReadingListProvider.java b/mobile/android/base/tests/testReadingListProvider.java
index 726062f2a93..58c1d34e3a8 100644
--- a/mobile/android/base/tests/testReadingListProvider.java
+++ b/mobile/android/base/tests/testReadingListProvider.java
@@ -51,7 +51,7 @@ public class testReadingListProvider extends ContentProviderTest {
      * We want a fresh provider each test, so this should be invoked in
      * setUp before each individual test.
      */
-    private static Callable sProviderFactory = new Callable() {
+    private static final Callable sProviderFactory = new Callable() {
         @Override
         public ContentProvider call() {
             return new ReadingListProvider();
diff --git a/mobile/android/base/tests/testSearchHistoryProvider.java b/mobile/android/base/tests/testSearchHistoryProvider.java
index e0ae0d871c4..3c22703bcf7 100644
--- a/mobile/android/base/tests/testSearchHistoryProvider.java
+++ b/mobile/android/base/tests/testSearchHistoryProvider.java
@@ -83,7 +83,7 @@ public class testSearchHistoryProvider extends ContentProviderTest {
      * Make sure this method is present and that it returns a new
      * instance of your class.
      */
-    private static Callable sProviderFactory =
+    private static final Callable sProviderFactory =
             new Callable() {
                 @Override
                 public ContentProvider call() {
diff --git a/mobile/android/base/tests/testThumbnails.java b/mobile/android/base/tests/testThumbnails.java
index 1a9f7ee685e..85d7787b726 100644
--- a/mobile/android/base/tests/testThumbnails.java
+++ b/mobile/android/base/tests/testThumbnails.java
@@ -62,8 +62,8 @@ public class testThumbnails extends BaseTest {
     }
 
     private class ThumbnailTest implements BooleanTest {
-        private String mTitle;
-        private int mColor;
+        private final String mTitle;
+        private final int mColor;
 
         public ThumbnailTest(String title, int color) {
             mTitle = title;
diff --git a/mobile/android/base/toolbar/PageActionLayout.java b/mobile/android/base/toolbar/PageActionLayout.java
index 83bccea22c6..d38e46c2faf 100644
--- a/mobile/android/base/toolbar/PageActionLayout.java
+++ b/mobile/android/base/toolbar/PageActionLayout.java
@@ -303,12 +303,12 @@ public class PageActionLayout extends LinearLayout implements NativeEventListene
     }
 
     private static class PageAction {
-        private OnPageActionClickListeners mOnPageActionClickListeners;
+        private final OnPageActionClickListeners mOnPageActionClickListeners;
         private Drawable mDrawable;
-        private String mTitle;
-        private String mId;
-        private int key;
-        private boolean mImportant;
+        private final String mTitle;
+        private final String mId;
+        private final int key;
+        private final boolean mImportant;
 
         public PageAction(String id,
                           String title,
diff --git a/mobile/android/base/toolbar/ToolbarDisplayLayout.java b/mobile/android/base/toolbar/ToolbarDisplayLayout.java
index 11e6ace2e01..b8b903d793a 100644
--- a/mobile/android/base/toolbar/ToolbarDisplayLayout.java
+++ b/mobile/android/base/toolbar/ToolbarDisplayLayout.java
@@ -97,29 +97,29 @@ public class ToolbarDisplayLayout extends ThemedLinearLayout
 
     private boolean mIsAttached;
 
-    private ThemedTextView mTitle;
-    private int mTitlePadding;
+    private final ThemedTextView mTitle;
+    private final int mTitlePadding;
     private ToolbarPrefs mPrefs;
     private OnTitleChangeListener mTitleChangeListener;
 
-    private ImageButton mSiteSecurity;
+    private final ImageButton mSiteSecurity;
     private boolean mSiteSecurityVisible;
 
     // To de-bounce sets.
     private Bitmap mLastFavicon;
-    private ImageButton mFavicon;
+    private final ImageButton mFavicon;
     private int mFaviconSize;
 
-    private ImageButton mStop;
+    private final ImageButton mStop;
     private OnStopListener mStopListener;
 
-    private PageActionLayout mPageActionLayout;
+    private final PageActionLayout mPageActionLayout;
 
     private AlphaAnimation mLockFadeIn;
     private TranslateAnimation mTitleSlideLeft;
     private TranslateAnimation mTitleSlideRight;
 
-    private SiteIdentityPopup mSiteIdentityPopup;
+    private final SiteIdentityPopup mSiteIdentityPopup;
     private SecurityMode mSecurityMode;
 
     private PropertyAnimator mForwardAnim;
diff --git a/mobile/android/base/util/ActivityResultHandlerMap.java b/mobile/android/base/util/ActivityResultHandlerMap.java
index 66f732e5fed..dc1d26cecd9 100644
--- a/mobile/android/base/util/ActivityResultHandlerMap.java
+++ b/mobile/android/base/util/ActivityResultHandlerMap.java
@@ -7,7 +7,7 @@ package org.mozilla.gecko.util;
 import android.util.SparseArray;
 
 public final class ActivityResultHandlerMap {
-    private SparseArray mMap = new SparseArray();
+    private final SparseArray mMap = new SparseArray();
     private int mCounter;
 
     public synchronized int put(ActivityResultHandler handler) {
diff --git a/mobile/android/base/util/INIParser.java b/mobile/android/base/util/INIParser.java
index 8a738c01d42..2a68036bcdd 100644
--- a/mobile/android/base/util/INIParser.java
+++ b/mobile/android/base/util/INIParser.java
@@ -16,7 +16,7 @@ import java.util.Hashtable;
 
 public final class INIParser extends INISection {
     // default file to read and write to
-    private File mFile;
+    private final File mFile;
 
     // List of sections in the current iniFile. null if the file has not been parsed yet
     private Hashtable mSections;
diff --git a/mobile/android/base/util/NativeJSContainer.java b/mobile/android/base/util/NativeJSContainer.java
index 486d4c29e83..5fca12b1071 100644
--- a/mobile/android/base/util/NativeJSContainer.java
+++ b/mobile/android/base/util/NativeJSContainer.java
@@ -18,7 +18,7 @@ import org.mozilla.gecko.mozglue.JNITarget;
 @JNITarget
 public final class NativeJSContainer extends NativeJSObject
 {
-    private long mNativeObject;
+    private final long mNativeObject;
 
     private NativeJSContainer(long nativeObject) {
         mNativeObject = nativeObject;
diff --git a/mobile/android/base/util/UIAsyncTask.java b/mobile/android/base/util/UIAsyncTask.java
index 3c44c1943bf..ba5367f3489 100644
--- a/mobile/android/base/util/UIAsyncTask.java
+++ b/mobile/android/base/util/UIAsyncTask.java
@@ -72,7 +72,7 @@ public abstract class UIAsyncTask {
     }
 
     private final class BackgroundTaskRunnable implements Runnable {
-        private Param mParam;
+        private final Param mParam;
 
         public BackgroundTaskRunnable(Param param) {
             mParam = param;
diff --git a/mobile/android/base/webapp/InstallListener.java b/mobile/android/base/webapp/InstallListener.java
index 1d02346a541..6914efd4c7c 100644
--- a/mobile/android/base/webapp/InstallListener.java
+++ b/mobile/android/base/webapp/InstallListener.java
@@ -22,11 +22,11 @@ import android.util.Log;
 
 public class InstallListener extends BroadcastReceiver {
 
-    private static String LOGTAG = "GeckoWebappInstallListener";
-    private JSONObject mData;
-    private String mManifestUrl;
+    private static final String LOGTAG = "GeckoWebappInstallListener";
+    private final JSONObject mData;
+    private final String mManifestUrl;
     private boolean mReceived;
-    private File mApkFile;
+    private final File mApkFile;
 
     public InstallListener(String manifestUrl, JSONObject data, File apkFile) {
         mData = data;
diff --git a/mobile/android/base/webapp/UninstallListener.java b/mobile/android/base/webapp/UninstallListener.java
index 76fc2ad450a..60ff384c824 100644
--- a/mobile/android/base/webapp/UninstallListener.java
+++ b/mobile/android/base/webapp/UninstallListener.java
@@ -34,7 +34,7 @@ import java.util.ArrayList;
 
 public class UninstallListener extends BroadcastReceiver {
 
-    private static String LOGTAG = "GeckoWebappUninstallListener";
+    private static final String LOGTAG = "GeckoWebappUninstallListener";
 
     @Override
     public void onReceive(Context context, Intent intent) {
@@ -136,7 +136,7 @@ public class UninstallListener extends BroadcastReceiver {
     }
 
     public static class DelayedStartupTask implements Runnable {
-        private GeckoApp mApp;
+        private final GeckoApp mApp;
 
         public DelayedStartupTask(GeckoApp app) {
             mApp = app;
diff --git a/mobile/android/base/widget/ArrowPopup.java b/mobile/android/base/widget/ArrowPopup.java
index 74893569287..ece1a70c8bc 100644
--- a/mobile/android/base/widget/ArrowPopup.java
+++ b/mobile/android/base/widget/ArrowPopup.java
@@ -28,7 +28,7 @@ public abstract class ArrowPopup extends PopupWindow {
     ImageView mArrow;
 
     int mArrowWidth;
-    private int mYOffset;
+    private final int mYOffset;
 
     protected LinearLayout mContent;
     protected boolean mInflated;
diff --git a/mobile/android/base/widget/ButtonToast.java b/mobile/android/base/widget/ButtonToast.java
index 5c5e1c2cbd1..d9c754a93c1 100644
--- a/mobile/android/base/widget/ButtonToast.java
+++ b/mobile/android/base/widget/ButtonToast.java
@@ -165,7 +165,7 @@ public class ButtonToast {
         }
     }
 
-    private Runnable mHideRunnable = new Runnable() {
+    private final Runnable mHideRunnable = new Runnable() {
         @Override
         public void run() {
             hide(false, ReasonHidden.TIMEOUT);
diff --git a/mobile/android/base/widget/DateTimePicker.java b/mobile/android/base/widget/DateTimePicker.java
index 125dfe304f0..f68bc577675 100644
--- a/mobile/android/base/widget/DateTimePicker.java
+++ b/mobile/android/base/widget/DateTimePicker.java
@@ -58,9 +58,9 @@ public class DateTimePicker extends FrameLayout {
     private boolean mCalendarEnabled;
 
     // Size of the screen in inches;
-    private int mScreenWidth;
-    private int mScreenHeight;
-    private OnValueChangeListener mOnChangeListener;
+    private final int mScreenWidth;
+    private final int mScreenHeight;
+    private final OnValueChangeListener mOnChangeListener;
     private final LinearLayout mPickers;
     private final LinearLayout mDateSpinners;
     private final LinearLayout mTimeSpinners;
@@ -89,7 +89,7 @@ public class DateTimePicker extends FrameLayout {
     Calendar mCurrentDate;
     private Calendar mMinDate;
     private Calendar mMaxDate;
-    private PickersState mState;
+    private final PickersState mState;
 
     public static enum PickersState { DATE, MONTH, WEEK, TIME, DATETIME };
 
diff --git a/mobile/android/base/widget/Divider.java b/mobile/android/base/widget/Divider.java
index 56c059f5acc..8ce379dcd72 100644
--- a/mobile/android/base/widget/Divider.java
+++ b/mobile/android/base/widget/Divider.java
@@ -16,7 +16,7 @@ public class Divider extends View {
     private Orientation mOrientation;
 
     // Density of the device.
-    private int mDensity;
+    private final int mDensity;
 
     public Divider(Context context, AttributeSet attrs) {
         super(context, attrs);
diff --git a/mobile/android/base/widget/DoorHanger.java b/mobile/android/base/widget/DoorHanger.java
index 044d969ffc4..b15bf6181fc 100644
--- a/mobile/android/base/widget/DoorHanger.java
+++ b/mobile/android/base/widget/DoorHanger.java
@@ -42,7 +42,7 @@ public class DoorHanger extends LinearLayout {
     private static int sSpinnerTextColor = -1;
     private static int sSpinnerTextSize = -1;
 
-    private static LayoutParams sButtonParams;
+    private static final LayoutParams sButtonParams;
     static {
         sButtonParams = new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT, 1.0f);
     }
@@ -60,7 +60,7 @@ public class DoorHanger extends LinearLayout {
     // Value used to identify the notification.
     private final String mValue;
 
-    private Resources mResources;
+    private final Resources mResources;
 
     private List mInputs;
     private CheckBox mCheckBox;
diff --git a/mobile/android/base/widget/EllipsisTextView.java b/mobile/android/base/widget/EllipsisTextView.java
index c46e12e13eb..44f88e668f5 100644
--- a/mobile/android/base/widget/EllipsisTextView.java
+++ b/mobile/android/base/widget/EllipsisTextView.java
@@ -18,7 +18,7 @@ import android.widget.TextView;
 public class EllipsisTextView extends TextView {
     private final String ellipsis;
 
-    private int maxLines;
+    private final int maxLines;
     private CharSequence originalText;
 
     public EllipsisTextView(Context context) {
diff --git a/mobile/android/base/widget/FaviconView.java b/mobile/android/base/widget/FaviconView.java
index cb02eca9c8a..fed25868346 100644
--- a/mobile/android/base/widget/FaviconView.java
+++ b/mobile/android/base/widget/FaviconView.java
@@ -45,10 +45,10 @@ public class FaviconView extends ImageView {
     private static float sStrokeWidth;
 
     // Paint for drawing the stroke.
-    private static Paint sStrokePaint;
+    private static final Paint sStrokePaint;
 
     // Paint for drawing the background.
-    private static Paint sBackgroundPaint;
+    private static final Paint sBackgroundPaint;
 
     // Size of the stroke rectangle.
     private final RectF mStrokeRect;
diff --git a/mobile/android/base/widget/GeckoActionProvider.java b/mobile/android/base/widget/GeckoActionProvider.java
index 436b1830ca0..43cbc2dcd0d 100644
--- a/mobile/android/base/widget/GeckoActionProvider.java
+++ b/mobile/android/base/widget/GeckoActionProvider.java
@@ -27,7 +27,7 @@ import java.util.ArrayList;
 import java.util.HashMap;
 
 public class GeckoActionProvider {
-    private static int MAX_HISTORY_SIZE = 2;
+    private static final int MAX_HISTORY_SIZE = 2;
 
     /**
      * A listener to know when a target was selected.
@@ -51,7 +51,7 @@ public class GeckoActionProvider {
 
     private final Callbacks mCallbacks = new Callbacks();
 
-    private static HashMap mProviders = new HashMap();
+    private static final HashMap mProviders = new HashMap();
 
     private static String getFilenameFromMimeType(String mimeType) {
         String[] mime = mimeType.split("/");
diff --git a/mobile/android/base/widget/GeckoSwipeRefreshLayout.java b/mobile/android/base/widget/GeckoSwipeRefreshLayout.java
index cb2316c7b5d..27b4846891e 100644
--- a/mobile/android/base/widget/GeckoSwipeRefreshLayout.java
+++ b/mobile/android/base/widget/GeckoSwipeRefreshLayout.java
@@ -74,10 +74,10 @@ public class GeckoSwipeRefreshLayout extends ViewGroup {
     private OnRefreshListener mListener;
     private MotionEvent mDownEvent;
     private boolean mRefreshing;
-    private int mTouchSlop;
+    private final int mTouchSlop;
     private float mDistanceToTriggerSync = -1;
     private float mPrevY;
-    private int mProgressBarHeight;
+    private final int mProgressBarHeight;
 
     // Target is returning to its start offset because it was cancelled or a
     // refresh was triggered.
@@ -527,9 +527,9 @@ public class GeckoSwipeRefreshLayout extends ViewGroup {
         private int mColor2;
         private int mColor3;
         private int mColor4;
-        private View mParent;
+        private final View mParent;
 
-        private Rect mBounds = new Rect();
+        private final Rect mBounds = new Rect();
 
         public SwipeProgressBar(View parent) {
             mParent = parent;
diff --git a/mobile/android/base/widget/GeckoViewFlipper.java b/mobile/android/base/widget/GeckoViewFlipper.java
index ca563af3724..c33628ea7a9 100644
--- a/mobile/android/base/widget/GeckoViewFlipper.java
+++ b/mobile/android/base/widget/GeckoViewFlipper.java
@@ -18,7 +18,7 @@ import android.widget.ViewFlipper;
  * i.e. It ignores touch events on the ViewFlipper when its hidden. */
 
 public class GeckoViewFlipper extends ViewFlipper {
-    private Rect mRect = new Rect();
+    private final Rect mRect = new Rect();
 
     public GeckoViewFlipper(Context context) {
         super(context);
diff --git a/mobile/android/base/widget/SwipeDismissListViewTouchListener.java b/mobile/android/base/widget/SwipeDismissListViewTouchListener.java
index 05c88d17eb8..f6fb69914d4 100644
--- a/mobile/android/base/widget/SwipeDismissListViewTouchListener.java
+++ b/mobile/android/base/widget/SwipeDismissListViewTouchListener.java
@@ -76,14 +76,14 @@ import org.mozilla.gecko.R;
  */
 public class SwipeDismissListViewTouchListener implements View.OnTouchListener {
     // Cached ViewConfiguration and system-wide constant values
-    private int mSlop;
-    private int mMinFlingVelocity;
-    private int mMaxFlingVelocity;
-    private long mAnimationTime;
+    private final int mSlop;
+    private final int mMinFlingVelocity;
+    private final int mMaxFlingVelocity;
+    private final long mAnimationTime;
 
     // Fixed properties
-    private ListView mListView;
-    private OnDismissCallback mCallback;
+    private final ListView mListView;
+    private final OnDismissCallback mCallback;
     private int mViewWidth = 1; // 1 and not 0 to prevent dividing by zero
 
     // Transient properties
diff --git a/mobile/android/search/java/org/mozilla/search/providers/SearchEngine.java b/mobile/android/search/java/org/mozilla/search/providers/SearchEngine.java
index 9aad752dd7d..5deab6da345 100644
--- a/mobile/android/search/java/org/mozilla/search/providers/SearchEngine.java
+++ b/mobile/android/search/java/org/mozilla/search/providers/SearchEngine.java
@@ -52,7 +52,7 @@ public class SearchEngine {
                     "document.getElementsByTagName('head')[0].appendChild(tag);" +
                     "tag.innerText='%s'})();";
 
-    private String identifier;
+    private final String identifier;
     private String shortName;
     private String iconURL;
 
diff --git a/mobile/android/stumbler/java/org/mozilla/mozstumbler/service/stumblerthread/datahandling/DataStorageManager.java b/mobile/android/stumbler/java/org/mozilla/mozstumbler/service/stumblerthread/datahandling/DataStorageManager.java
index acbfe53693f..fc8c7c6b72c 100644
--- a/mobile/android/stumbler/java/org/mozilla/mozstumbler/service/stumblerthread/datahandling/DataStorageManager.java
+++ b/mobile/android/stumbler/java/org/mozilla/mozstumbler/service/stumblerthread/datahandling/DataStorageManager.java
@@ -67,7 +67,7 @@ public class DataStorageManager {
 
     private ReportBatch mCurrentReportsSendBuffer;
     private ReportBatchIterator mReportBatchIterator;
-    private ReportFileList mFileList;
+    private final ReportFileList mFileList;
     private Timer mFlushMemoryBuffersToDiskTimer;
 
     static final String SEP_REPORT_COUNT = "-r";
diff --git a/mobile/android/stumbler/java/org/mozilla/mozstumbler/service/stumblerthread/scanners/WifiScanner.java b/mobile/android/stumbler/java/org/mozilla/mozstumbler/service/stumblerthread/scanners/WifiScanner.java
index 767f31e2a76..a546eeddd08 100644
--- a/mobile/android/stumbler/java/org/mozilla/mozstumbler/service/stumblerthread/scanners/WifiScanner.java
+++ b/mobile/android/stumbler/java/org/mozilla/mozstumbler/service/stumblerthread/scanners/WifiScanner.java
@@ -48,7 +48,7 @@ public class WifiScanner extends BroadcastReceiver {
     private WifiLock mWifiLock;
     private Timer mWifiScanTimer;
     private final Set mAPs = Collections.synchronizedSet(new HashSet());
-    private AtomicInteger mVisibleAPs = new AtomicInteger();
+    private final AtomicInteger mVisibleAPs = new AtomicInteger();
 
     /* Testing */
     public static boolean sIsTestMode;
diff --git a/mobile/android/stumbler/java/org/mozilla/mozstumbler/service/uploadthread/AsyncUploader.java b/mobile/android/stumbler/java/org/mozilla/mozstumbler/service/uploadthread/AsyncUploader.java
index 210b390d929..628c535127d 100644
--- a/mobile/android/stumbler/java/org/mozilla/mozstumbler/service/uploadthread/AsyncUploader.java
+++ b/mobile/android/stumbler/java/org/mozilla/mozstumbler/service/uploadthread/AsyncUploader.java
@@ -28,7 +28,7 @@ public class AsyncUploader extends AsyncTask {
     private final UploadSettings mSettings;
     private final Object mListenerLock = new Object();
     private AsyncUploaderListener mListener;
-    private static AtomicBoolean sIsUploading = new AtomicBoolean();
+    private static final AtomicBoolean sIsUploading = new AtomicBoolean();
     private String mNickname;
 
     public interface AsyncUploaderListener {
diff --git a/mobile/android/stumbler/java/org/mozilla/mozstumbler/service/utils/PersistentIntentService.java b/mobile/android/stumbler/java/org/mozilla/mozstumbler/service/utils/PersistentIntentService.java
index 11e99c5855d..8387c7edd20 100644
--- a/mobile/android/stumbler/java/org/mozilla/mozstumbler/service/utils/PersistentIntentService.java
+++ b/mobile/android/stumbler/java/org/mozilla/mozstumbler/service/utils/PersistentIntentService.java
@@ -28,7 +28,7 @@ import android.os.Message;
 public abstract class PersistentIntentService extends Service {
     private volatile Looper mServiceLooper;
     private volatile ServiceHandler mServiceHandler;
-    private String mName;
+    private final String mName;
     private boolean mRedelivery;
 
     private final class ServiceHandler extends Handler {

From bf19d8280c968f1f4e47e2d115c48b649a9e1dbd Mon Sep 17 00:00:00 2001
From: Chris Kitching 
Date: Fri, 10 Oct 2014 23:17:32 +0100
Subject: [PATCH 15/17] Bug 1081369: Don't compare Integers with ==. r=rnewman

---
 mobile/android/base/ContactService.java    | 2 +-
 mobile/android/base/db/LocalBrowserDB.java | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/mobile/android/base/ContactService.java b/mobile/android/base/ContactService.java
index 7e02ce730a3..9d6392a00c1 100644
--- a/mobile/android/base/ContactService.java
+++ b/mobile/android/base/ContactService.java
@@ -1823,7 +1823,7 @@ public class ContactService implements GeckoEventListener {
         }
     }
 
-    private static String getKeyFromMapValue(final HashMap map, Integer value) {
+    private static String getKeyFromMapValue(final HashMap map, int value) {
         for (Entry entry : map.entrySet()) {
             if (value == entry.getValue()) {
                 return entry.getKey();
diff --git a/mobile/android/base/db/LocalBrowserDB.java b/mobile/android/base/db/LocalBrowserDB.java
index 1c3a6982e08..367a25f1bdb 100644
--- a/mobile/android/base/db/LocalBrowserDB.java
+++ b/mobile/android/base/db/LocalBrowserDB.java
@@ -1078,7 +1078,7 @@ public class LocalBrowserDB {
 
         // After writing the encodedFavicon, ensure that the favicon_id in both the bookmark and
         // history tables are also up-to-date.
-        final Integer id = getIDForFaviconURL(cr, faviconUri);
+        final int id = getIDForFaviconURL(cr, faviconUri);
         if (id == FAVICON_ID_NOT_FOUND) {
             return;
         }

From 822caf008242555b42551468bb411942fba26f61 Mon Sep 17 00:00:00 2001
From: Chris Kitching 
Date: Fri, 10 Oct 2014 23:36:01 +0100
Subject: [PATCH 16/17] Bug 1081401: Remove unnecessary autoboxing. r=rnewman

---
 mobile/android/base/ContactService.java              | 10 +++++-----
 .../base/db/AbstractTransactionalProvider.java       |  3 ++-
 mobile/android/base/db/BrowserProvider.java          |  2 +-
 .../android/base/preferences/GeckoPreferences.java   | 12 +++++++-----
 mobile/android/base/prompts/IconGridInput.java       |  2 +-
 mobile/android/base/prompts/PromptInput.java         |  2 +-
 mobile/android/base/tests/DatabaseHelper.java        |  2 +-
 7 files changed, 18 insertions(+), 15 deletions(-)

diff --git a/mobile/android/base/ContactService.java b/mobile/android/base/ContactService.java
index 9d6392a00c1..9152eb2402e 100644
--- a/mobile/android/base/ContactService.java
+++ b/mobile/android/base/ContactService.java
@@ -671,7 +671,7 @@ public class ContactService implements GeckoEventListener {
         if (typeConstant == BaseTypes.TYPE_CUSTOM) {
             type = cursor.getString(cursor.getColumnIndex(typeLabelColumn));
         } else {
-            type = getKeyFromMapValue(typeMap, Integer.valueOf(typeConstant));
+            type = getKeyFromMapValue(typeMap, typeConstant);
         }
 
         // Since an object may have multiple types, it may have already been added,
@@ -712,7 +712,7 @@ public class ContactService implements GeckoEventListener {
         if (typeConstant == Phone.TYPE_CUSTOM) {
             type = cursor.getString(cursor.getColumnIndex(Phone.LABEL));
         } else {
-            type = getKeyFromMapValue(mPhoneTypesMap, Integer.valueOf(typeConstant));
+            type = getKeyFromMapValue(mPhoneTypesMap, typeConstant);
         }
 
         // Since a phone may have multiple types, it may have already been added,
@@ -759,7 +759,7 @@ public class ContactService implements GeckoEventListener {
         if (typeConstant == StructuredPostal.TYPE_CUSTOM) {
             type = cursor.getString(cursor.getColumnIndex(StructuredPostal.LABEL));
         } else {
-            type = getKeyFromMapValue(mAddressTypesMap, Integer.valueOf(typeConstant));
+            type = getKeyFromMapValue(mAddressTypesMap, typeConstant);
         }
 
         // Since an email may have multiple types, it may have already been added,
@@ -984,7 +984,7 @@ public class ContactService implements GeckoEventListener {
         }
 
         String returnStatus = "KO";
-        Long newRawContactId = new Long(-1);
+        Long newRawContactId = -1L;
 
         // Insert the contact!
         ContentProviderResult[] insertResults = applyBatch(newContactOptions);
@@ -1476,7 +1476,7 @@ public class ContactService implements GeckoEventListener {
 
     private void getContactsCount(final String requestID) {
         Cursor cursor = getAllRawContactIdsCursor();
-        Integer numContacts = Integer.valueOf(cursor.getCount());
+        Integer numContacts = cursor.getCount();
         cursor.close();
 
         sendCallbackToJavascript("Android:Contacts:Count", requestID, new String[] {"count"},
diff --git a/mobile/android/base/db/AbstractTransactionalProvider.java b/mobile/android/base/db/AbstractTransactionalProvider.java
index 2a0cd392d6d..fb0b037b4e7 100644
--- a/mobile/android/base/db/AbstractTransactionalProvider.java
+++ b/mobile/android/base/db/AbstractTransactionalProvider.java
@@ -103,7 +103,8 @@ public abstract class AbstractTransactionalProvider extends ContentProvider {
         if (isInBatch == null) {
             return false;
         }
-        return isInBatch.booleanValue();
+
+        return isInBatch;
     }
 
     /**
diff --git a/mobile/android/base/db/BrowserProvider.java b/mobile/android/base/db/BrowserProvider.java
index 2d6b18b1209..00964039066 100644
--- a/mobile/android/base/db/BrowserProvider.java
+++ b/mobile/android/base/db/BrowserProvider.java
@@ -1065,7 +1065,7 @@ public class BrowserProvider extends SharedBrowserDatabaseProvider {
                     Long additional = values.getAsLong(History.VISITS);
 
                     // Increment visit count by a specified amount, or default to increment by 1
-                    values.put(History.VISITS, existing + ((additional != null) ? additional.longValue() : 1));
+                    values.put(History.VISITS, existing + ((additional != null) ? additional : 1));
                 }
 
                 updated += db.update(TABLE_HISTORY, values, "_id = ?",
diff --git a/mobile/android/base/preferences/GeckoPreferences.java b/mobile/android/base/preferences/GeckoPreferences.java
index 720af866544..806ee59187d 100644
--- a/mobile/android/base/preferences/GeckoPreferences.java
+++ b/mobile/android/base/preferences/GeckoPreferences.java
@@ -11,6 +11,7 @@ import java.util.List;
 import java.util.Locale;
 import java.util.Map;
 
+import android.os.Build;
 import org.json.JSONObject;
 import org.mozilla.gecko.AppConstants;
 import org.mozilla.gecko.AppConstants.Versions;
@@ -36,6 +37,7 @@ import org.mozilla.gecko.TelemetryContract.Method;
 import org.mozilla.gecko.background.common.GlobalConstants;
 import org.mozilla.gecko.background.healthreport.HealthReportConstants;
 import org.mozilla.gecko.db.BrowserContract.SuggestedSites;
+import org.mozilla.gecko.updater.UpdateServiceHelper;
 import org.mozilla.gecko.util.GeckoEventListener;
 import org.mozilla.gecko.util.HardwareUtils;
 import org.mozilla.gecko.util.ThreadUtils;
@@ -325,7 +327,7 @@ OnSharedPreferenceChangeListener
                 // all) in the action bar.
                 updateActionBarTitle(R.string.settings_title);
 
-                if (android.os.Build.VERSION.SDK_INT < 13) {
+                if (Build.VERSION.SDK_INT < 13) {
                     // Affected by Bug 1015209 -- no detach/attach.
                     // If we try rejigging fragments, we'll crash, so don't
                     // enable locale switching at all.
@@ -1056,17 +1058,17 @@ OnSharedPreferenceChangeListener
         if (PREFS_MENU_CHAR_ENCODING.equals(prefName)) {
             setCharEncodingState(((String) newValue).equals("true"));
         } else if (PREFS_UPDATER_AUTODOWNLOAD.equals(prefName)) {
-            org.mozilla.gecko.updater.UpdateServiceHelper.registerForUpdates(this, (String) newValue);
+            UpdateServiceHelper.registerForUpdates(this, (String) newValue);
         } else if (PREFS_HEALTHREPORT_UPLOAD_ENABLED.equals(prefName)) {
             // The healthreport pref only lives in Android, so we do not persist
             // to Gecko, but we do broadcast intent to the health report
             // background uploader service, which will start or stop the
             // repeated background upload attempts.
-            broadcastHealthReportUploadPref(this, ((Boolean) newValue).booleanValue());
+            broadcastHealthReportUploadPref(this, (Boolean) newValue);
         } else if (PREFS_GEO_REPORTING.equals(prefName)) {
-            broadcastStumblerPref(this, ((Boolean) newValue).booleanValue());
+            broadcastStumblerPref(this, (Boolean) newValue);
             // Translate boolean value to int for geo reporting pref.
-            newValue = ((Boolean) newValue) ? 1 : 0;
+            newValue = (Boolean) newValue ? 1 : 0;
         } else if (handlers.containsKey(prefName)) {
             PrefHandler handler = handlers.get(prefName);
             handler.onChange(this, preference, newValue);
diff --git a/mobile/android/base/prompts/IconGridInput.java b/mobile/android/base/prompts/IconGridInput.java
index d043fd8d15f..8b8b3f594e2 100644
--- a/mobile/android/base/prompts/IconGridInput.java
+++ b/mobile/android/base/prompts/IconGridInput.java
@@ -103,7 +103,7 @@ public class IconGridInput extends PromptInput implements OnItemClickListener {
 
     @Override
     public Object getValue() {
-        return new Integer(mSelected);
+        return mSelected;
     }
 
     @Override
diff --git a/mobile/android/base/prompts/PromptInput.java b/mobile/android/base/prompts/PromptInput.java
index cebea98a574..98d6302b034 100644
--- a/mobile/android/base/prompts/PromptInput.java
+++ b/mobile/android/base/prompts/PromptInput.java
@@ -311,7 +311,7 @@ public class PromptInput {
 
         @Override
         public Object getValue() {
-            return new Integer(spinner.getSelectedItemPosition());
+            return spinner.getSelectedItemPosition();
         }
     }
 
diff --git a/mobile/android/base/tests/DatabaseHelper.java b/mobile/android/base/tests/DatabaseHelper.java
index 8f0cf1d1de0..0c0eab9782e 100644
--- a/mobile/android/base/tests/DatabaseHelper.java
+++ b/mobile/android/base/tests/DatabaseHelper.java
@@ -92,7 +92,7 @@ class DatabaseHelper {
     // About the same implementation as getFolderIdFromGuid from LocalBrowserDB because it is declared private and we can't use reflections to access it
     protected long getFolderIdFromGuid(String guid) {
         ContentResolver resolver = mActivity.getContentResolver();
-        long folderId = Long.valueOf(-1);
+        long folderId = -1L;
         Uri bookmarksUri = buildUri(BrowserDataType.BOOKMARKS);
         Cursor c = null;
         try {

From 6d36f49b0b9d37b3537b5bfe794a263f22e528ab Mon Sep 17 00:00:00 2001
From: Chris Kitching 
Date: Sat, 11 Oct 2014 00:42:36 +0100
Subject: [PATCH 17/17] Bug 1081406: Remove unnecessary numeric casts.
 r=rnewman

---
 mobile/android/base/CrashReporter.java                    | 4 ++--
 mobile/android/base/GeckoApp.java                         | 4 ++--
 mobile/android/base/GeckoBatteryManager.java              | 4 ++--
 mobile/android/base/GeckoJavaSampler.java                 | 2 +-
 mobile/android/base/animation/PropertyAnimator.java       | 2 +-
 mobile/android/base/favicons/decoders/ICODecoder.java     | 8 ++++----
 mobile/android/base/gfx/Axis.java                         | 2 +-
 mobile/android/base/gfx/DisplayPortCalculator.java        | 4 ++--
 mobile/android/base/gfx/JavaPanZoomController.java        | 4 ++--
 mobile/android/base/gfx/LayerMarginsAnimator.java         | 2 +-
 mobile/android/base/gfx/PluginLayer.java                  | 4 ++--
 .../base/sync/SharedPreferencesClientsDataDelegate.java   | 2 +-
 mobile/android/base/sync/Utils.java                       | 2 +-
 mobile/android/base/sync/crypto/HKDF.java                 | 2 +-
 mobile/android/base/sync/syncadapter/SyncAdapter.java     | 2 +-
 mobile/android/base/tests/MotionEventReplayer.java        | 4 ++--
 mobile/android/base/widget/FadedTextView.java             | 2 +-
 17 files changed, 27 insertions(+), 27 deletions(-)

diff --git a/mobile/android/base/CrashReporter.java b/mobile/android/base/CrashReporter.java
index 10c01ef76d8..8c8c97ef8e5 100644
--- a/mobile/android/base/CrashReporter.java
+++ b/mobile/android/base/CrashReporter.java
@@ -282,8 +282,8 @@ public class CrashReporter extends Activity
 
     private String generateBoundary() {
         // Generate some random numbers to fill out the boundary
-        int r0 = (int)((double)Integer.MAX_VALUE * Math.random());
-        int r1 = (int)((double)Integer.MAX_VALUE * Math.random());
+        int r0 = (int)(Integer.MAX_VALUE * Math.random());
+        int r1 = (int)(Integer.MAX_VALUE * Math.random());
         return String.format("---------------------------%08X%08X", r0, r1);
     }
 
diff --git a/mobile/android/base/GeckoApp.java b/mobile/android/base/GeckoApp.java
index d765687675a..188129ffe1d 100644
--- a/mobile/android/base/GeckoApp.java
+++ b/mobile/android/base/GeckoApp.java
@@ -1016,9 +1016,9 @@ public abstract class GeckoApp
         int inSampleSize = 1;
         if (height > idealHeight || width > idealWidth) {
             if (width > height) {
-                inSampleSize = Math.round((float)height / (float)idealHeight);
+                inSampleSize = Math.round((float)height / idealHeight);
             } else {
-                inSampleSize = Math.round((float)width / (float)idealWidth);
+                inSampleSize = Math.round((float)width / idealWidth);
             }
         }
         return inSampleSize;
diff --git a/mobile/android/base/GeckoBatteryManager.java b/mobile/android/base/GeckoBatteryManager.java
index 303ee0fb983..97f4715a8ab 100644
--- a/mobile/android/base/GeckoBatteryManager.java
+++ b/mobile/android/base/GeckoBatteryManager.java
@@ -107,8 +107,8 @@ public class GeckoBatteryManager extends BroadcastReceiver {
             }
 
             // We need two doubles because sLevel is a double.
-            double current =  (double)intent.getIntExtra(BatteryManager.EXTRA_LEVEL, -1);
-            double max = (double)intent.getIntExtra(BatteryManager.EXTRA_SCALE, -1);
+            double current = intent.getIntExtra(BatteryManager.EXTRA_LEVEL, -1);
+            double max = intent.getIntExtra(BatteryManager.EXTRA_SCALE, -1);
             if (current == -1 || max == -1) {
                 Log.e(LOGTAG, "Failed to get battery level!");
                 sLevel = kDefaultLevel;
diff --git a/mobile/android/base/GeckoJavaSampler.java b/mobile/android/base/GeckoJavaSampler.java
index f8bde6f4b41..9c133d7bc54 100644
--- a/mobile/android/base/GeckoJavaSampler.java
+++ b/mobile/android/base/GeckoJavaSampler.java
@@ -142,7 +142,7 @@ public class GeckoJavaSampler {
         Sample sample = getSample(aThreadId, aSampleId);
         if (sample != null) {
             if (sample.mJavaTime != 0) {
-                return (double)(sample.mJavaTime -
+                return (sample.mJavaTime -
                     SystemClock.elapsedRealtime()) + getProfilerTime();
             }
             System.out.println("Sample: " + sample.mTime);
diff --git a/mobile/android/base/animation/PropertyAnimator.java b/mobile/android/base/animation/PropertyAnimator.java
index 000bae5ac75..8e82fd161d7 100644
--- a/mobile/android/base/animation/PropertyAnimator.java
+++ b/mobile/android/base/animation/PropertyAnimator.java
@@ -61,7 +61,7 @@ public class PropertyAnimator implements Runnable {
 
     public PropertyAnimator(long duration, Interpolator interpolator) {
         mDuration = duration;
-        mDurationReciprocal = 1.0f / (float) mDuration;
+        mDurationReciprocal = 1.0f / mDuration;
         mInterpolator = interpolator;
         mElementsList = new ArrayList();
         mFramePoster = FramePoster.create(this);
diff --git a/mobile/android/base/favicons/decoders/ICODecoder.java b/mobile/android/base/favicons/decoders/ICODecoder.java
index 18078b95439..1c3f6720696 100644
--- a/mobile/android/base/favicons/decoders/ICODecoder.java
+++ b/mobile/android/base/favicons/decoders/ICODecoder.java
@@ -293,10 +293,10 @@ public class ICODecoder implements Iterable {
         System.arraycopy(decodand, offset + iconDirEntry.payloadOffset, decodeTarget, singlePayloadOffset, iconDirEntry.payloadSize);
 
         // Update the offset field of the ICONDIRENTRY to make the new ICO valid.
-        decodeTarget[ICO_HEADER_LENGTH_BYTES + 12] = (byte) singlePayloadOffset;
-        decodeTarget[ICO_HEADER_LENGTH_BYTES + 13] = (byte) (singlePayloadOffset >>> 8);
-        decodeTarget[ICO_HEADER_LENGTH_BYTES + 14] = (byte) (singlePayloadOffset >>> 16);
-        decodeTarget[ICO_HEADER_LENGTH_BYTES + 15] = (byte) (singlePayloadOffset >>> 24);
+        decodeTarget[ICO_HEADER_LENGTH_BYTES + 12] = singlePayloadOffset;
+        decodeTarget[ICO_HEADER_LENGTH_BYTES + 13] = (singlePayloadOffset >>> 8);
+        decodeTarget[ICO_HEADER_LENGTH_BYTES + 14] = (singlePayloadOffset >>> 16);
+        decodeTarget[ICO_HEADER_LENGTH_BYTES + 15] = (singlePayloadOffset >>> 24);
 
         // Decode the newly-constructed singleton-ICO.
         return BitmapUtils.decodeByteArray(decodeTarget);
diff --git a/mobile/android/base/gfx/Axis.java b/mobile/android/base/gfx/Axis.java
index 500e7811458..e0c6469d377 100644
--- a/mobile/android/base/gfx/Axis.java
+++ b/mobile/android/base/gfx/Axis.java
@@ -53,7 +53,7 @@ abstract class Axis {
 
     private static float getFloatPref(Map prefs, String prefName, int defaultValue) {
         Integer value = (prefs == null ? null : prefs.get(prefName));
-        return (float)(value == null || value < 0 ? defaultValue : value) / 1000f;
+        return (value == null || value < 0 ? defaultValue : value) / 1000f;
     }
 
     private static int getIntPref(Map prefs, String prefName, int defaultValue) {
diff --git a/mobile/android/base/gfx/DisplayPortCalculator.java b/mobile/android/base/gfx/DisplayPortCalculator.java
index a977694114b..a46ed5cf37d 100644
--- a/mobile/android/base/gfx/DisplayPortCalculator.java
+++ b/mobile/android/base/gfx/DisplayPortCalculator.java
@@ -124,7 +124,7 @@ final class DisplayPortCalculator {
 
     private static float getFloatPref(Map prefs, String prefName, int defaultValue) {
         Integer value = (prefs == null ? null : prefs.get(prefName));
-        return (float)(value == null || value < 0 ? defaultValue : value) / 1000f;
+        return (value == null || value < 0 ? defaultValue : value) / 1000f;
     }
 
     private static abstract class DisplayPortStrategy {
@@ -746,7 +746,7 @@ final class DisplayPortCalculator {
         @Override
         public boolean drawTimeUpdate(long millis, int pixels) {
             // calculate the number of frames it took to draw a viewport-sized area
-            float normalizedTime = (float)mPixelArea * (float)millis / (float)pixels;
+            float normalizedTime = (float)mPixelArea * millis / pixels;
             int normalizedFrames = (int)FloatMath.ceil(normalizedTime * 60f / 1000f);
             // broaden our range on how long it takes to draw if the draw falls outside
             // the range. this allows it to grow gradually. this heuristic may need to
diff --git a/mobile/android/base/gfx/JavaPanZoomController.java b/mobile/android/base/gfx/JavaPanZoomController.java
index a9de6a1d0ff..5fcc82e727f 100644
--- a/mobile/android/base/gfx/JavaPanZoomController.java
+++ b/mobile/android/base/gfx/JavaPanZoomController.java
@@ -170,7 +170,7 @@ class JavaPanZoomController
 
             @Override public void prefValue(String pref, int value) {
                 if (pref.equals("ui.scrolling.gamepad_dead_zone")) {
-                    GamepadUtils.overrideDeadZoneThreshold((float)value / 1000f);
+                    GamepadUtils.overrideDeadZoneThreshold(value / 1000f);
                 }
             }
 
@@ -660,7 +660,7 @@ class JavaPanZoomController
     }
 
     private void track(float x, float y, long time) {
-        float timeDelta = (float)(time - mLastEventTime);
+        float timeDelta = (time - mLastEventTime);
         if (FloatUtils.fuzzyEquals(timeDelta, 0)) {
             // probably a duplicate event, ignore it. using a zero timeDelta will mess
             // up our velocity
diff --git a/mobile/android/base/gfx/LayerMarginsAnimator.java b/mobile/android/base/gfx/LayerMarginsAnimator.java
index 4ff88b638a6..6d0321fb3b3 100644
--- a/mobile/android/base/gfx/LayerMarginsAnimator.java
+++ b/mobile/android/base/gfx/LayerMarginsAnimator.java
@@ -61,7 +61,7 @@ public class LayerMarginsAnimator {
         mPrefObserverId = PrefsHelper.getPref(PREF_SHOW_MARGINS_THRESHOLD, new PrefsHelper.PrefHandlerBase() {
             @Override
             public void prefValue(String pref, int value) {
-                SHOW_MARGINS_THRESHOLD = (float)value / 100.0f;
+                SHOW_MARGINS_THRESHOLD = value / 100.0f;
             }
 
             @Override
diff --git a/mobile/android/base/gfx/PluginLayer.java b/mobile/android/base/gfx/PluginLayer.java
index 843465d86af..2923072fae8 100644
--- a/mobile/android/base/gfx/PluginLayer.java
+++ b/mobile/android/base/gfx/PluginLayer.java
@@ -136,10 +136,10 @@ public class PluginLayer extends TileLayer {
         private void clampToMaxSize() {
             if (width > mMaxDimension || height > mMaxDimension) {
                 if (width > height) {
-                    height = Math.round(((float)height/(float)width) * mMaxDimension);
+                    height = Math.round(((float)height/ width) * mMaxDimension);
                     width = mMaxDimension;
                 } else {
-                    width = Math.round(((float)width/(float)height) * mMaxDimension);
+                    width = Math.round(((float)width/ height) * mMaxDimension);
                     height = mMaxDimension;
                 }
             }
diff --git a/mobile/android/base/sync/SharedPreferencesClientsDataDelegate.java b/mobile/android/base/sync/SharedPreferencesClientsDataDelegate.java
index da825ebc18a..5abdd67f6f4 100644
--- a/mobile/android/base/sync/SharedPreferencesClientsDataDelegate.java
+++ b/mobile/android/base/sync/SharedPreferencesClientsDataDelegate.java
@@ -75,7 +75,7 @@ public class SharedPreferencesClientsDataDelegate implements ClientsDataDelegate
 
   @Override
   public synchronized void setClientsCount(int clientsCount) {
-    sharedPreferences.edit().putLong(SyncConfiguration.PREF_NUM_CLIENTS, (long) clientsCount).commit();
+    sharedPreferences.edit().putLong(SyncConfiguration.PREF_NUM_CLIENTS, clientsCount).commit();
   }
 
   @Override
diff --git a/mobile/android/base/sync/Utils.java b/mobile/android/base/sync/Utils.java
index e6de63d6ddd..94f722ce23a 100644
--- a/mobile/android/base/sync/Utils.java
+++ b/mobile/android/base/sync/Utils.java
@@ -200,7 +200,7 @@ public class Utils {
   }
 
   public static long decimalSecondsToMilliseconds(Integer decimal) {
-    return (long)(decimal * 1000);
+    return (decimal * 1000);
   }
 
   public static byte[] sha256(byte[] in)
diff --git a/mobile/android/base/sync/crypto/HKDF.java b/mobile/android/base/sync/crypto/HKDF.java
index a12efbeb616..16c0d8147da 100644
--- a/mobile/android/base/sync/crypto/HKDF.java
+++ b/mobile/android/base/sync/crypto/HKDF.java
@@ -56,7 +56,7 @@ public class HKDF {
     byte[] T  = {};
     byte[] Tn = {};
 
-    int iterations = (int) Math.ceil(((double)len) / ((double)BLOCKSIZE));
+    int iterations = (int) Math.ceil(((double)len) / (BLOCKSIZE));
     for (int i = 0; i < iterations; i++) {
       Tn = digestBytes(Utils.concatAll(Tn, info, Utils.hex2Byte(Integer.toHexString(i + 1))),
                        hmacHasher);
diff --git a/mobile/android/base/sync/syncadapter/SyncAdapter.java b/mobile/android/base/sync/syncadapter/SyncAdapter.java
index 4e88bb7c56e..7e7b36e63b9 100644
--- a/mobile/android/base/sync/syncadapter/SyncAdapter.java
+++ b/mobile/android/base/sync/syncadapter/SyncAdapter.java
@@ -198,7 +198,7 @@ public class SyncAdapter extends AbstractThreadedSyncAdapter implements BaseGlob
     }
     if (backoff > 0) {
       // Fuzz the backoff time (up to 25% more) to prevent client lock-stepping; agrees with desktop.
-      final long fuzzedBackoff = backoff + Math.round((double) backoff * 0.25d * Math.random());
+      final long fuzzedBackoff = backoff + Math.round(backoff * 0.25d * Math.random());
       this.backoffHandler.extendEarliestNextRequest(System.currentTimeMillis() + fuzzedBackoff);
     }
   }
diff --git a/mobile/android/base/tests/MotionEventReplayer.java b/mobile/android/base/tests/MotionEventReplayer.java
index db7c4d88020..ba29e65b7e2 100644
--- a/mobile/android/base/tests/MotionEventReplayer.java
+++ b/mobile/android/base/tests/MotionEventReplayer.java
@@ -76,11 +76,11 @@ class MotionEventReplayer {
     }
 
     private float scaleX(float value) {
-        return value * (float)mSurfaceWidth / (float)CAPTURE_WINDOW_WIDTH;
+        return value * mSurfaceWidth / CAPTURE_WINDOW_WIDTH;
     }
 
     private float scaleY(float value) {
-        return value * (float)mSurfaceHeight / (float)CAPTURE_WINDOW_HEIGHT;
+        return value * mSurfaceHeight / CAPTURE_WINDOW_HEIGHT;
     }
 
     public void replayEvents(InputStream eventDescriptions)
diff --git a/mobile/android/base/widget/FadedTextView.java b/mobile/android/base/widget/FadedTextView.java
index 38f2f05b29a..f0f2b762025 100644
--- a/mobile/android/base/widget/FadedTextView.java
+++ b/mobile/android/base/widget/FadedTextView.java
@@ -87,7 +87,7 @@ public class FadedTextView extends ThemedTextView {
         public FadedTextGradient(int width, int fadeWidth, int color) {
             super(0, 0, width, 0,
                   new int[] { color, color, 0x0 },
-                  new float[] { 0,  ((float) (width - fadeWidth) / (float) width), 1.0f },
+                  new float[] { 0,  ((float) (width - fadeWidth) / width), 1.0f },
                   Shader.TileMode.CLAMP);
 
             mWidth = width;