Bug 1512274 - [geckoview] Make all private member variable be mCamelCase. r=geckoview-reviewers,snorp
authorAgi Sferro <agi@mozilla.com>
Fri, 15 Mar 2019 21:21:15 +0000
changeset 464453 4253ecfe57e9be9ee54bd2c80d64a508de926740
parent 464452 eedd3b996ae57997a541edbb0ffed985aa1423d6
child 464454 6f9896e3f39aa3efb26315a0785db4956a47b27d
push id35716
push useraciure@mozilla.com
push dateSun, 17 Mar 2019 09:42:17 +0000
treeherdermozilla-central@8ee97c045359 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgeckoview-reviewers, snorp
bugs1512274
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1512274 - [geckoview] Make all private member variable be mCamelCase. r=geckoview-reviewers,snorp Differential Revision: https://phabricator.services.mozilla.com/D23687
mobile/android/geckoview/src/main/java/org/mozilla/gecko/EventDispatcher.java
mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoAppShell.java
mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoNetworkManager.java
mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoSystemStateListener.java
mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoThread.java
mobile/android/geckoview/src/main/java/org/mozilla/gecko/TelemetryContract.java
mobile/android/geckoview/src/main/java/org/mozilla/gecko/media/GeckoHLSSample.java
mobile/android/geckoview/src/main/java/org/mozilla/gecko/media/GeckoHlsRendererBase.java
mobile/android/geckoview/src/main/java/org/mozilla/gecko/mozglue/SafeIntent.java
mobile/android/geckoview/src/main/java/org/mozilla/gecko/permissions/PermissionBlock.java
mobile/android/geckoview/src/main/java/org/mozilla/gecko/sqlite/MatrixBlobCursor.java
mobile/android/geckoview/src/main/java/org/mozilla/gecko/util/GeckoBackgroundThread.java
mobile/android/geckoview/src/main/java/org/mozilla/gecko/util/IOUtils.java
mobile/android/geckoview/src/main/java/org/mozilla/gecko/util/NonEvictingLruCache.java
mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoDisplay.java
--- a/mobile/android/geckoview/src/main/java/org/mozilla/gecko/EventDispatcher.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/gecko/EventDispatcher.java
@@ -400,32 +400,32 @@ public final class EventDispatcher exten
         @WrapForJNI(dispatchTo = "proxy") @Override // EventCallback
         public native void sendError(Object response);
 
         @WrapForJNI(dispatchTo = "gecko") @Override // Object
         protected native void finalize();
     }
 
     private static class JavaCallbackDelegate implements EventCallback {
-        private final Thread originalThread = Thread.currentThread();
-        private final EventCallback callback;
+        private final Thread mOriginalThread = Thread.currentThread();
+        private final EventCallback mCallback;
 
         public static EventCallback wrap(final EventCallback callback) {
             if (callback == null) {
                 return null;
             }
             if (callback instanceof NativeCallbackDelegate) {
                 // NativeCallbackDelegate always posts to Gecko thread if needed.
                 return callback;
             }
             return new JavaCallbackDelegate(callback);
         }
 
         JavaCallbackDelegate(final EventCallback callback) {
-            this.callback = callback;
+            mCallback = callback;
         }
 
         private void makeCallback(final boolean callSuccess, final Object rawResponse) {
             final Object response;
             if (rawResponse instanceof Number) {
                 // There is ambiguity because a number can be converted to either int or
                 // double, so e.g. the user can be expecting a double when we give it an
                 // int. To avoid these pitfalls, we disallow all numbers. The workaround
@@ -440,32 +440,32 @@ public final class EventDispatcher exten
             } else if (rawResponse instanceof Character) {
                 response = rawResponse.toString();
             } else {
                 response = rawResponse;
             }
 
             // Call back synchronously if we happen to be on the same thread as the thread
             // making the original request.
-            if (ThreadUtils.isOnThread(originalThread)) {
+            if (ThreadUtils.isOnThread(mOriginalThread)) {
                 if (callSuccess) {
-                    callback.sendSuccess(response);
+                    mCallback.sendSuccess(response);
                 } else {
-                    callback.sendError(response);
+                    mCallback.sendError(response);
                 }
                 return;
             }
 
             // Make callback on the thread of the original request, if the original thread
             // is the UI or Gecko thread. Otherwise default to the background thread.
             final Handler handler =
-                    originalThread == ThreadUtils.getUiThread() ? ThreadUtils.getUiHandler() :
-                    originalThread == ThreadUtils.sGeckoThread ? ThreadUtils.sGeckoHandler :
+                    mOriginalThread == ThreadUtils.getUiThread() ? ThreadUtils.getUiHandler() :
+                    mOriginalThread == ThreadUtils.sGeckoThread ? ThreadUtils.sGeckoHandler :
                                                                  ThreadUtils.getBackgroundHandler();
-            final EventCallback callback = this.callback;
+            final EventCallback callback = mCallback;
 
             handler.post(new Runnable() {
                 @Override
                 public void run() {
                     if (callSuccess) {
                         callback.sendSuccess(response);
                     } else {
                         callback.sendError(response);
--- a/mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoAppShell.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoAppShell.java
@@ -1762,21 +1762,21 @@ public class GeckoAppShell
 
     @WrapForJNI
     private static InputStream createInputStream(final URLConnection connection)
             throws IOException {
         return connection.getInputStream();
     }
 
     private static class BitmapConnection extends URLConnection {
-        private Bitmap bitmap;
+        private Bitmap mBitmap;
 
         BitmapConnection(final Bitmap b) throws MalformedURLException, IOException {
             super(null);
-            bitmap = b;
+            mBitmap = b;
         }
 
         @Override
         public void connect() {}
 
         @Override
         public InputStream getInputStream() throws IOException {
             return new BitmapInputStream();
@@ -1801,17 +1801,17 @@ public class GeckoAppShell
                 final PipedOutputStream output = new PipedOutputStream();
                 connect(output);
 
                 ThreadUtils.postToBackgroundThread(
                     new Runnable() {
                         @Override
                         public void run() {
                             try {
-                                bitmap.compress(Bitmap.CompressFormat.PNG, 100, output);
+                                mBitmap.compress(Bitmap.CompressFormat.PNG, 100, output);
                             } finally {
                                 IOUtils.safeStreamClose(output);
                             }
                         }
                     });
                 mHaveConnected = true;
                 return super.read(buffer, byteOffset, byteCount);
             }
--- a/mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoNetworkManager.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoNetworkManager.java
@@ -50,17 +50,17 @@ public class GeckoNetworkManager extends
     // If we received a "check out new network state!" intent from the OS but nothing in it looks
     // different, we ignore it. See Bug 1330836 for some relevant details.
     private static final String LINK_DATA_CHANGED = "changed";
 
     private static GeckoNetworkManager instance;
 
     // We hackishly (yet harmlessly, in this case) keep a Context reference passed in via the start method.
     // See context handling notes in handleManagerEvent, and Bug 1277333.
-    private Context context;
+    private Context mContext;
 
     public static void destroy() {
         if (instance != null) {
             instance.onDestroy();
             instance = null;
         }
     }
 
@@ -74,23 +74,23 @@ public class GeckoNetworkManager extends
     public enum ManagerEvent {
         start,
         stop,
         enableNotifications,
         disableNotifications,
         receivedUpdate
     }
 
-    private ManagerState currentState = ManagerState.OffNoListeners;
-    private ConnectionType currentConnectionType = ConnectionType.NONE;
-    private ConnectionType previousConnectionType = ConnectionType.NONE;
-    private ConnectionSubType currentConnectionSubtype = ConnectionSubType.UNKNOWN;
-    private ConnectionSubType previousConnectionSubtype = ConnectionSubType.UNKNOWN;
-    private NetworkStatus currentNetworkStatus = NetworkStatus.UNKNOWN;
-    private NetworkStatus previousNetworkStatus = NetworkStatus.UNKNOWN;
+    private ManagerState mCurrentState = ManagerState.OffNoListeners;
+    private ConnectionType mCurrentConnectionType = ConnectionType.NONE;
+    private ConnectionType mPreviousConnectionType = ConnectionType.NONE;
+    private ConnectionSubType mCurrentConnectionSubtype = ConnectionSubType.UNKNOWN;
+    private ConnectionSubType mPreviousConnectionSubtype = ConnectionSubType.UNKNOWN;
+    private NetworkStatus mCurrentNetworkStatus = NetworkStatus.UNKNOWN;
+    private NetworkStatus mPreviousNetworkStatus = NetworkStatus.UNKNOWN;
 
     private enum InfoType {
         MCC,
         MNC
     }
 
     private GeckoNetworkManager() {
         EventDispatcher.getInstance().registerUiThreadListener(this,
@@ -110,31 +110,31 @@ public class GeckoNetworkManager extends
             instance = new GeckoNetworkManager();
         }
 
         return instance;
     }
 
     public double[] getCurrentInformation() {
         final Context applicationContext = GeckoAppShell.getApplicationContext();
-        final ConnectionType connectionType = currentConnectionType;
+        final ConnectionType connectionType = mCurrentConnectionType;
         return new double[] {
                 connectionType.value,
                 connectionType == ConnectionType.WIFI ? 1.0 : 0.0,
                 connectionType == ConnectionType.WIFI ? wifiDhcpGatewayAddress(applicationContext) : 0.0
         };
     }
 
     @Override
     public void onReceive(final Context aContext, final Intent aIntent) {
         handleManagerEvent(ManagerEvent.receivedUpdate);
     }
 
     public void start(final Context context) {
-        this.context = context;
+        mContext = context;
         handleManagerEvent(ManagerEvent.start);
     }
 
     public void stop() {
         handleManagerEvent(ManagerEvent.stop);
     }
 
     public void enableNotifications() {
@@ -148,45 +148,45 @@ public class GeckoNetworkManager extends
     /**
      * For a given event, figure out the next state, run any transition by-product actions, and switch
      * current state to the next state. If event is invalid for the current state, this is a no-op.
      *
      * @param event Incoming event
      * @return Boolean indicating if transition was performed.
      */
     private synchronized boolean handleManagerEvent(final ManagerEvent event) {
-        final ManagerState nextState = getNextState(currentState, event);
+        final ManagerState nextState = getNextState(mCurrentState, event);
 
-        Log.d(LOGTAG, "Incoming event " + event + " for state " + currentState + " -> " + nextState);
+        Log.d(LOGTAG, "Incoming event " + event + " for state " + mCurrentState + " -> " + nextState);
         if (nextState == null) {
-            Log.w(LOGTAG, "Invalid event " + event + " for state " + currentState);
+            Log.w(LOGTAG, "Invalid event " + event + " for state " + mCurrentState);
             return false;
         }
 
         // We're being deliberately careful about handling context here; it's possible that in some
         // rare cases and possibly related to timing of when this is called (seems to be early in the startup phase),
         // GeckoAppShell.getApplicationContext() will be null, and .start() wasn't called yet,
         // so we don't have a local Context reference either. If both of these are true, we have to drop the event.
         // NB: this is hacky (and these checks attempt to isolate the hackiness), and root cause
         // seems to be how this class fits into the larger ecosystem and general flow of events.
         // See Bug 1277333.
         final Context contextForAction;
-        if (context != null) {
-            contextForAction = context;
+        if (mContext != null) {
+            contextForAction = mContext;
         } else {
             contextForAction = GeckoAppShell.getApplicationContext();
         }
 
         if (contextForAction == null) {
-            Log.w(LOGTAG, "Context is not available while processing event " + event + " for state " + currentState);
+            Log.w(LOGTAG, "Context is not available while processing event " + event + " for state " + mCurrentState);
             return false;
         }
 
-        performActionsForStateEvent(contextForAction, currentState, event);
-        currentState = nextState;
+        performActionsForStateEvent(contextForAction, mCurrentState, event);
+        mCurrentState = nextState;
 
         return true;
     }
 
     /**
      * Defines a transition matrix for our state machine. For a given state/event pair, returns nextState.
      *
      * @param currentState Current state against which we have an incoming event
@@ -304,67 +304,67 @@ public class GeckoNetworkManager extends
      */
     private void updateNetworkStateAndConnectionType(final Context context) {
         final ConnectivityManager connectivityManager = (ConnectivityManager) context.getSystemService(
                 Context.CONNECTIVITY_SERVICE);
         // Type/status getters below all have a defined behaviour for when connectivityManager == null
         if (connectivityManager == null) {
             Log.e(LOGTAG, "ConnectivityManager does not exist.");
         }
-        currentConnectionType = NetworkUtils.getConnectionType(connectivityManager);
-        currentNetworkStatus = NetworkUtils.getNetworkStatus(connectivityManager);
-        currentConnectionSubtype = NetworkUtils.getConnectionSubType(connectivityManager);
-        Log.d(LOGTAG, "New network state: " + currentNetworkStatus + ", " + currentConnectionType + ", " + currentConnectionSubtype);
+        mCurrentConnectionType = NetworkUtils.getConnectionType(connectivityManager);
+        mCurrentNetworkStatus = NetworkUtils.getNetworkStatus(connectivityManager);
+        mCurrentConnectionSubtype = NetworkUtils.getConnectionSubType(connectivityManager);
+        Log.d(LOGTAG, "New network state: " + mCurrentNetworkStatus + ", " + mCurrentConnectionType + ", " + mCurrentConnectionSubtype);
     }
 
     @WrapForJNI(dispatchTo = "gecko")
     private static native void onConnectionChanged(int type, String subType,
                                                    boolean isWifi, int dhcpGateway);
 
     @WrapForJNI(dispatchTo = "gecko")
     private static native void onStatusChanged(String status);
 
     /**
      * Send current network state and connection type to whomever is listening.
      */
     private void sendNetworkStateToListeners(final Context context) {
-        final boolean connectionTypeOrSubtypeChanged = currentConnectionType != previousConnectionType ||
-                currentConnectionSubtype != previousConnectionSubtype;
+        final boolean connectionTypeOrSubtypeChanged = mCurrentConnectionType != mPreviousConnectionType ||
+                mCurrentConnectionSubtype != mPreviousConnectionSubtype;
         if (connectionTypeOrSubtypeChanged) {
-            previousConnectionType = currentConnectionType;
-            previousConnectionSubtype = currentConnectionSubtype;
+            mPreviousConnectionType = mCurrentConnectionType;
+            mPreviousConnectionSubtype = mCurrentConnectionSubtype;
 
-            final boolean isWifi = currentConnectionType == ConnectionType.WIFI;
+            final boolean isWifi = mCurrentConnectionType == ConnectionType.WIFI;
             final int gateway = !isWifi ? 0 :
                     wifiDhcpGatewayAddress(context);
 
             if (GeckoThread.isRunning()) {
-                onConnectionChanged(currentConnectionType.value,
-                                    currentConnectionSubtype.value, isWifi, gateway);
+                onConnectionChanged(mCurrentConnectionType.value,
+                                    mCurrentConnectionSubtype.value, isWifi, gateway);
             } else {
                 GeckoThread.queueNativeCall(GeckoNetworkManager.class, "onConnectionChanged",
-                                            currentConnectionType.value,
-                                            String.class, currentConnectionSubtype.value,
+                                            mCurrentConnectionType.value,
+                                            String.class, mCurrentConnectionSubtype.value,
                                             isWifi, gateway);
             }
         }
 
         // If neither network status nor network configuration changed, do nothing.
-        if (currentNetworkStatus == previousNetworkStatus && !connectionTypeOrSubtypeChanged) {
+        if (mCurrentNetworkStatus == mPreviousNetworkStatus && !connectionTypeOrSubtypeChanged) {
             return;
         }
 
         // If network status remains the same, send "changed". Otherwise, send new network status.
         // See Bug 1330836 for relevant details.
         final String status;
-        if (currentNetworkStatus == previousNetworkStatus) {
+        if (mCurrentNetworkStatus == mPreviousNetworkStatus) {
             status = LINK_DATA_CHANGED;
         } else {
-            previousNetworkStatus = currentNetworkStatus;
-            status = currentNetworkStatus.value;
+            mPreviousNetworkStatus = mCurrentNetworkStatus;
+            status = mCurrentNetworkStatus.value;
         }
 
         if (GeckoThread.isRunning()) {
             onStatusChanged(status);
         } else {
             GeckoThread.queueNativeCall(GeckoNetworkManager.class, "onStatusChanged",
                     String.class, status);
         }
--- a/mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoSystemStateListener.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoSystemStateListener.java
@@ -22,30 +22,30 @@ import org.mozilla.gecko.util.InputDevic
 import org.mozilla.gecko.util.ThreadUtils;
 
 public class GeckoSystemStateListener
         implements InputManager.InputDeviceListener {
     private static final String LOGTAG = "GeckoSystemStateListener";
 
     private static final GeckoSystemStateListener listenerInstance = new GeckoSystemStateListener();
 
-    private boolean initialized;
+    private boolean mInitialized;
     private ContentObserver mContentObserver;
     private static Context sApplicationContext;
     private InputManager mInputManager;
 
     public static GeckoSystemStateListener getInstance() {
         return listenerInstance;
     }
 
     private GeckoSystemStateListener() {
     }
 
     public synchronized void initialize(final Context context) {
-        if (initialized) {
+        if (mInitialized) {
             Log.w(LOGTAG, "Already initialized!");
             return;
         }
         mInputManager = (InputManager)
             context.getSystemService(Context.INPUT_SERVICE);
         mInputManager.registerInputDeviceListener(listenerInstance, ThreadUtils.getUiHandler());
 
         sApplicationContext = context;
@@ -54,36 +54,36 @@ public class GeckoSystemStateListener
         mContentObserver = new ContentObserver(new Handler(Looper.getMainLooper())) {
             @Override
             public void onChange(final boolean selfChange) {
                 onDeviceChanged();
             }
         };
         contentResolver.registerContentObserver(animationSetting, false, mContentObserver);
 
-        initialized = true;
+        mInitialized = true;
     }
 
     public synchronized void shutdown() {
-        if (!initialized) {
+        if (!mInitialized) {
             Log.w(LOGTAG, "Already shut down!");
             return;
         }
 
         if (mInputManager != null) {
             Log.e(LOGTAG, "mInputManager should be valid!");
             return;
         }
 
         mInputManager.unregisterInputDeviceListener(listenerInstance);
 
         ContentResolver contentResolver = sApplicationContext.getContentResolver();
         contentResolver.unregisterContentObserver(mContentObserver);
 
-        initialized = false;
+        mInitialized = false;
         mInputManager = null;
         mContentObserver = null;
     }
 
     @RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN_MR1)
     @WrapForJNI(calledFrom = "gecko")
     /**
      * For prefers-reduced-motion media queries feature.
--- a/mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoThread.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoThread.java
@@ -64,31 +64,31 @@ public class GeckoThread extends Thread 
 
         /* The rank is an arbitrary value reflecting the amount of components or features
          * that are available for use. During startup and up to the RUNNING state, the
          * rank value increases because more components are initialized and available for
          * use. During shutdown and up to the EXITED state, the rank value decreases as
          * components are shut down and become unavailable. EXITING has the same rank as
          * LIBS_READY because both states have a similar amount of components available.
          */
-        private final int rank;
+        private final int mRank;
 
         private State(final int rank) {
-            this.rank = rank;
+            mRank = rank;
         }
 
         @Override
         public boolean is(final NativeQueue.State other) {
             return this == other;
         }
 
         @Override
         public boolean isAtLeast(final NativeQueue.State other) {
             if (other instanceof State) {
-                return this.rank >= ((State) other).rank;
+                return mRank >= ((State) other).mRank;
             }
             return false;
         }
 
         @Override
         public String toString() {
             return name();
         }
--- a/mobile/android/geckoview/src/main/java/org/mozilla/gecko/TelemetryContract.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/gecko/TelemetryContract.java
@@ -115,25 +115,25 @@ public interface TelemetryContract {
 
         // VALUES BELOW THIS LINE ARE EXCLUSIVE TO TESTING.
         _TEST1("_test_event_1.1"),
         _TEST2("_test_event_2.1"),
         _TEST3("_test_event_3.1"),
         _TEST4("_test_event_4.1"),
         ;
 
-        private final String string;
+        private final String mString;
 
         Event(final String string) {
-            this.string = string;
+            mString = string;
         }
 
         @Override
         public String toString() {
-            return string;
+            return mString;
         }
     }
 
     /**
      * Holds event methods. Intended for use in
      * Telemetry.sendUIEvent() as the "method" parameter.
      *
      * Please keep this list sorted.
@@ -213,25 +213,25 @@ public interface TelemetryContract {
         // Action triggerred by pressing a SearchWidget button
         WIDGET("widget"),
 
         // VALUES BELOW THIS LINE ARE EXCLUSIVE TO TESTING.
         _TEST1("_test_method_1"),
         _TEST2("_test_method_2"),
         ;
 
-        private final String string;
+        private final String mString;
 
         Method(final String string) {
-            this.string = string;
+            mString = string;
         }
 
         @Override
         public String toString() {
-            return string;
+            return mString;
         }
     }
 
     /**
      * Holds session names. Intended for use with
      * Telemetry.startUISession() as the "sessionName" parameter.
      *
      * Please keep this list sorted.
@@ -267,25 +267,25 @@ public interface TelemetryContract {
         // Settings activity is active.
         SETTINGS("settings.1"),
 
         // VALUES BELOW THIS LINE ARE EXCLUSIVE TO TESTING.
         _TEST_STARTED_TWICE("_test_session_started_twice.1"),
         _TEST_STOPPED_TWICE("_test_session_stopped_twice.1"),
         ;
 
-        private final String string;
+        private final String mString;
 
         Session(final String string) {
-            this.string = string;
+            mString = string;
         }
 
         @Override
         public String toString() {
-            return string;
+            return mString;
         }
     }
 
     /**
      * Holds reasons for stopping a session. Intended for use in
      * Telemetry.stopUISession() as the "reason" parameter.
      *
      * Please keep this list sorted.
@@ -298,20 +298,20 @@ public interface TelemetryContract {
         NONE(null),
 
         // VALUES BELOW THIS LINE ARE EXCLUSIVE TO TESTING.
         _TEST1("_test_reason_1"),
         _TEST2("_test_reason_2"),
         _TEST_IGNORED("_test_reason_ignored"),
         ;
 
-        private final String string;
+        private final String mString;
 
         Reason(final String string) {
-            this.string = string;
+            mString = string;
         }
 
         @Override
         public String toString() {
-            return string;
+            return mString;
         }
     }
 }
--- a/mobile/android/geckoview/src/main/java/org/mozilla/gecko/media/GeckoHLSSample.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/gecko/media/GeckoHLSSample.java
@@ -29,22 +29,22 @@ public final class GeckoHLSSample {
     public long duration;
 
     @WrapForJNI
     final public BufferInfo info;
 
     @WrapForJNI
     final public CryptoInfo cryptoInfo;
 
-    private ByteBuffer buffer = null;
+    private ByteBuffer mBuffer = null;
 
     @WrapForJNI
     public void writeToByteBuffer(final ByteBuffer dest) throws IOException {
-        if (buffer != null && dest != null && info.size > 0) {
-            dest.put(buffer);
+        if (mBuffer != null && dest != null && info.size > 0) {
+            dest.put(mBuffer);
         }
     }
 
     @WrapForJNI
     public boolean isEOS() {
         return (info.flags & MediaCodec.BUFFER_FLAG_END_OF_STREAM) != 0;
     }
 
@@ -57,17 +57,17 @@ public final class GeckoHLSSample {
                                         final CryptoInfo cryptoInfo, final int formatIndex) {
         return new GeckoHLSSample(src, info, cryptoInfo, formatIndex);
     }
 
     private GeckoHLSSample(final ByteBuffer buffer, final BufferInfo info,
                            final CryptoInfo cryptoInfo, final int formatIndex) {
         this.formatIndex = formatIndex;
         duration = Long.MAX_VALUE;
-        this.buffer = buffer;
+        this.mBuffer = buffer;
         this.info = info;
         this.cryptoInfo = cryptoInfo;
     }
 
     @Override
     public String toString() {
         if (isEOS()) {
             return "EOS GeckoHLSSample";
--- a/mobile/android/geckoview/src/main/java/org/mozilla/gecko/media/GeckoHlsRendererBase.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/gecko/media/GeckoHlsRendererBase.java
@@ -48,17 +48,17 @@ public abstract class GeckoHlsRendererBa
     protected abstract void handleEndOfStream(DecoderInputBuffer bufferForRead);
     protected abstract void handleSamplePreparation(DecoderInputBuffer bufferForRead);
     protected abstract void resetRenderer();
     protected abstract boolean clearInputSamplesQueue();
     protected abstract void notifyPlayerInputFormatChanged(Format newFormat);
 
     private DecoderInputBuffer mBufferForRead =
         new DecoderInputBuffer(DecoderInputBuffer.BUFFER_REPLACEMENT_MODE_NORMAL);
-    private final DecoderInputBuffer mflagsOnlyBuffer = DecoderInputBuffer.newFlagsOnlyInstance();
+    private final DecoderInputBuffer mFlagsOnlyBuffer = DecoderInputBuffer.newFlagsOnlyInstance();
 
     protected void assertTrue(final boolean condition) {
         if (DEBUG && !condition) {
             throw new AssertionError("Expected condition to be true");
         }
     }
 
     public GeckoHlsRendererBase(final int trackType,
@@ -246,18 +246,18 @@ public abstract class GeckoHlsRendererBa
         if (mWaitingForData && isQueuedEnoughData()) {
             if (DEBUG) { Log.d(LOGTAG, "onDataArrived"); }
             mPlayerEventDispatcher.onDataArrived(getTrackType());
             mWaitingForData = false;
         }
     }
 
     private void readFormat() throws ExoPlaybackException {
-        mflagsOnlyBuffer.clear();
-        int result = readSource(mFormatHolder, mflagsOnlyBuffer, true);
+        mFlagsOnlyBuffer.clear();
+        int result = readSource(mFormatHolder, mFlagsOnlyBuffer, true);
         if (result == C.RESULT_FORMAT_READ) {
             onInputFormatChanged(mFormatHolder.format);
         }
     }
 
     @Override
     protected void onEnabled(final boolean joining) {
         // Do nothing.
--- a/mobile/android/geckoview/src/main/java/org/mozilla/gecko/mozglue/SafeIntent.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/gecko/mozglue/SafeIntent.java
@@ -18,137 +18,137 @@ import java.util.ArrayList;
 /**
  * External applications can pass values into Intents that can cause us to crash: in defense,
  * we wrap {@link Intent} and catch the exceptions they may force us to throw. See bug 1090385
  * for more.
  */
 public class SafeIntent {
     private static final String LOGTAG = "Gecko" + SafeIntent.class.getSimpleName();
 
-    private final Intent intent;
+    private final Intent mIntent;
 
     public SafeIntent(final Intent intent) {
         stripDataUri(intent);
-        this.intent = intent;
+        mIntent = intent;
     }
 
     public boolean hasExtra(final String name) {
         try {
-            return intent.hasExtra(name);
+            return mIntent.hasExtra(name);
         } catch (OutOfMemoryError e) {
             Log.w(LOGTAG, "Couldn't determine if intent had an extra: OOM. Malformed?");
             return false;
         } catch (RuntimeException e) {
             Log.w(LOGTAG, "Couldn't determine if intent had an extra.", e);
             return false;
         }
     }
 
     public @Nullable Bundle getExtras() {
         try {
-            return intent.getExtras();
+            return mIntent.getExtras();
         } catch (OutOfMemoryError e) {
             Log.w(LOGTAG, "Couldn't get intent extras: OOM. Malformed?");
             return null;
         } catch (RuntimeException e) {
             Log.w(LOGTAG, "Couldn't get intent extras.", e);
             return null;
         }
     }
 
     public boolean getBooleanExtra(final String name, final boolean defaultValue) {
         try {
-            return intent.getBooleanExtra(name, defaultValue);
+            return mIntent.getBooleanExtra(name, defaultValue);
         } catch (OutOfMemoryError e) {
             Log.w(LOGTAG, "Couldn't get intent extras: OOM. Malformed?");
             return defaultValue;
         } catch (RuntimeException e) {
             Log.w(LOGTAG, "Couldn't get intent extras.", e);
             return defaultValue;
         }
     }
 
     public int getIntExtra(final String name, final int defaultValue) {
         try {
-            return intent.getIntExtra(name, defaultValue);
+            return mIntent.getIntExtra(name, defaultValue);
         } catch (OutOfMemoryError e) {
             Log.w(LOGTAG, "Couldn't get intent extras: OOM. Malformed?");
             return defaultValue;
         } catch (RuntimeException e) {
             Log.w(LOGTAG, "Couldn't get intent extras.", e);
             return defaultValue;
         }
     }
 
     public String getStringExtra(final String name) {
         try {
-            return intent.getStringExtra(name);
+            return mIntent.getStringExtra(name);
         } catch (OutOfMemoryError e) {
             Log.w(LOGTAG, "Couldn't get intent extras: OOM. Malformed?");
             return null;
         } catch (RuntimeException e) {
             Log.w(LOGTAG, "Couldn't get intent extras.", e);
             return null;
         }
     }
 
     public Bundle getBundleExtra(final String name) {
         try {
-            return intent.getBundleExtra(name);
+            return mIntent.getBundleExtra(name);
         } catch (OutOfMemoryError e) {
             Log.w(LOGTAG, "Couldn't get intent extras: OOM. Malformed?");
             return null;
         } catch (RuntimeException e) {
             Log.w(LOGTAG, "Couldn't get intent extras.", e);
             return null;
         }
     }
 
     public String getAction() {
-        return intent.getAction();
+        return mIntent.getAction();
     }
 
     public String getDataString() {
         try {
-            return intent.getDataString();
+            return mIntent.getDataString();
         } catch (OutOfMemoryError e) {
             Log.w(LOGTAG, "Couldn't get intent data string: OOM. Malformed?");
             return null;
         } catch (RuntimeException e) {
             Log.w(LOGTAG, "Couldn't get intent data string.", e);
             return null;
         }
     }
 
     public ArrayList<String> getStringArrayListExtra(final String name) {
         try {
-            return intent.getStringArrayListExtra(name);
+            return mIntent.getStringArrayListExtra(name);
         } catch (OutOfMemoryError e) {
             Log.w(LOGTAG, "Couldn't get intent data string: OOM. Malformed?");
             return null;
         } catch (RuntimeException e) {
             Log.w(LOGTAG, "Couldn't get intent data string.", e);
             return null;
         }
     }
 
     public Uri getData() {
         try {
-            return intent.getData();
+            return mIntent.getData();
         } catch (OutOfMemoryError e) {
             Log.w(LOGTAG, "Couldn't get intent data: OOM. Malformed?");
             return null;
         } catch (RuntimeException e) {
             Log.w(LOGTAG, "Couldn't get intent data.", e);
             return null;
         }
     }
 
     public Intent getUnsafe() {
-        return intent;
+        return mIntent;
     }
 
     private static void stripDataUri(final Intent intent) {
         // We should limit intent filters and check incoming intents against white-list
         // But for now we just strip 'about:reader?url='
         if (intent != null && intent.getData() != null) {
             final String url = intent.getData().toString();
             final String prefix = "about:reader?url=";
--- a/mobile/android/geckoview/src/main/java/org/mozilla/gecko/permissions/PermissionBlock.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/gecko/permissions/PermissionBlock.java
@@ -10,62 +10,62 @@ import org.mozilla.gecko.util.ThreadUtil
 import android.app.Activity;
 import android.content.Context;
 import android.support.annotation.NonNull;
 
 /**
  * Helper class to run code blocks depending on whether a user has granted or denied certain runtime permissions.
  */
 public class PermissionBlock {
-    private final PermissionsHelper helper;
+    private final PermissionsHelper mHelper;
 
-    private Context context;
-    private String[] permissions;
-    private boolean onUIThread;
-    private boolean onBackgroundThread;
-    private Runnable onPermissionsGranted;
-    private Runnable onPermissionsDenied;
-    private boolean doNotPrompt;
+    private Context mContext;
+    private String[] mPermissions;
+    private boolean mOnUiThread;
+    private boolean mOnBackgroundThread;
+    private Runnable mOnPermissionsGranted;
+    private Runnable mOnPermissionsDenied;
+    private boolean mDoNotPrompt;
 
     /* package-private */ PermissionBlock(final Context context, final PermissionsHelper helper) {
-        this.context = context;
-        this.helper = helper;
+        mContext = context;
+        mHelper = helper;
     }
 
     /**
      * Determine whether the app has been granted the specified permissions.
      */
     public PermissionBlock withPermissions(final @NonNull String... permissions) {
-        this.permissions = permissions;
+        mPermissions = permissions;
         return this;
     }
 
     /**
      * Execute all callbacks on the UI thread.
      */
     public PermissionBlock onUIThread() {
-        this.onUIThread = true;
+        mOnUiThread = true;
         return this;
     }
 
     /**
      * Execute all callbacks on the background thread.
      */
     public PermissionBlock onBackgroundThread() {
-        this.onBackgroundThread = true;
+        mOnBackgroundThread = true;
         return this;
     }
 
     /**
      * Do not prompt the user to accept the permission if it has not been granted yet.
      * This also guarantees that the callback will run on the current thread if no callback
      * thread has been explicitly specified.
      */
     public PermissionBlock doNotPrompt() {
-        doNotPrompt = true;
+        mDoNotPrompt = true;
         return this;
     }
 
     /**
      * If the condition is true then do not prompt the user to accept the permission if it has not
      * been granted yet.
      */
     public PermissionBlock doNotPromptIf(final boolean condition) {
@@ -83,68 +83,68 @@ public class PermissionBlock {
         run(null);
     }
 
     /**
      * Execute the specified runnable if the app has been granted all permissions. Calling this method will prompt the
      * user if needed.
      */
     public void run(final Runnable onPermissionsGranted) {
-        if (!doNotPrompt && !(context instanceof Activity)) {
+        if (!mDoNotPrompt && !(mContext instanceof Activity)) {
             throw new IllegalStateException("You need to either specify doNotPrompt() or pass in an Activity context");
         }
 
-        this.onPermissionsGranted = onPermissionsGranted;
+        mOnPermissionsGranted = onPermissionsGranted;
 
-        if (hasPermissions(context)) {
+        if (hasPermissions(mContext)) {
             onPermissionsGranted();
-        } else if (doNotPrompt) {
+        } else if (mDoNotPrompt) {
             onPermissionsDenied();
         } else {
-            Permissions.prompt((Activity) context, this);
+            Permissions.prompt((Activity) mContext, this);
         }
 
         // This reference is no longer needed. Let's clear it now to avoid memory leaks.
-        context = null;
+        mContext = null;
     }
 
     /**
      * Execute this fallback if at least one permission has not been granted.
      */
     public PermissionBlock andFallback(final @NonNull Runnable onPermissionsDenied) {
-        this.onPermissionsDenied = onPermissionsDenied;
+        mOnPermissionsDenied = onPermissionsDenied;
         return this;
     }
 
     /* package-private */ void onPermissionsGranted() {
-        executeRunnable(onPermissionsGranted);
+        executeRunnable(mOnPermissionsGranted);
     }
 
     /* package-private */ void onPermissionsDenied() {
-        executeRunnable(onPermissionsDenied);
+        executeRunnable(mOnPermissionsDenied);
     }
 
     private void executeRunnable(final Runnable runnable) {
         if (runnable == null) {
             return;
         }
 
-        if (onUIThread && onBackgroundThread) {
+        if (mOnUiThread && mOnBackgroundThread) {
             throw new IllegalStateException("Cannot run callback on more than one thread");
         }
 
-        if (onUIThread && !ThreadUtils.isOnUiThread()) {
+        if (mOnUiThread && !ThreadUtils.isOnUiThread()) {
             ThreadUtils.postToUiThread(runnable);
-        } else if (onBackgroundThread && !ThreadUtils.isOnBackgroundThread()) {
+        } else if (mOnBackgroundThread && !ThreadUtils.isOnBackgroundThread()) {
             ThreadUtils.postToBackgroundThread(runnable);
         } else {
             runnable.run();
         }
     }
 
     /* package-private */ String[] getPermissions() {
-        return permissions;
+        return mPermissions;
     }
 
     /* package-private */ boolean hasPermissions(final Context context) {
-        return helper.hasPermissions(context, permissions);
+        return mHelper.hasPermissions(context, mPermissions);
     }
 }
--- a/mobile/android/geckoview/src/main/java/org/mozilla/gecko/sqlite/MatrixBlobCursor.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/gecko/sqlite/MatrixBlobCursor.java
@@ -35,43 +35,43 @@ import android.util.Log;
  * the implementation of getBlob that was inadvertently omitted from API 9 (and
  * perhaps later; it's present in 14).
  *
  * MatrixCursor is all private, so we entirely duplicate it here.
  */
 public class MatrixBlobCursor extends AbstractCursor {
     private static final String LOGTAG = "GeckoMatrixCursor";
 
-    private final String[] columnNames;
-    private final int columnCount;
+    private final String[] mColumnNames;
+    private final int mColumnCount;
 
-    private int rowCount;
-    private Throwable allocationStack;
+    private int mRowCount;
+    private Throwable mAllocationStack;
 
-    Object[] data;
+    Object[] mData;
 
     /**
      * Constructs a new cursor with the given initial capacity.
      *
      * @param columnNames names of the columns, the ordering of which
      *  determines column ordering elsewhere in this cursor
      * @param initialCapacity in rows
      */
     @JNITarget
     public MatrixBlobCursor(final String[] columnNames, final int initialCapacity) {
-        this.columnNames = columnNames;
-        this.columnCount = columnNames.length;
+        mColumnNames = columnNames;
+        mColumnCount = columnNames.length;
 
         int capacity = initialCapacity;
         if (capacity < 1) {
             capacity = 1;
         }
 
-        this.data = new Object[columnCount * capacity];
-        this.allocationStack = new Throwable("allocationStack");
+        mData = new Object[mColumnCount * capacity];
+        mAllocationStack = new Throwable("allocationStack");
     }
 
     /**
      * Constructs a new cursor.
      *
      * @param columnNames names of the columns, the ordering of which
      *  determines column ordering elsewhere in this cursor
      */
@@ -79,212 +79,212 @@ public class MatrixBlobCursor extends Ab
     public MatrixBlobCursor(final String[] columnNames) {
         this(columnNames, 16);
     }
 
     /**
      * Closes the Cursor, releasing all of its resources.
      */
     public void close() {
-        this.allocationStack = null;
-        this.data = null;
+        mAllocationStack = null;
+        mData = null;
         super.close();
     }
 
     /**
      * Gets value at the given column for the current row.
      */
     protected Object get(final int column) {
-        if (column < 0 || column >= columnCount) {
+        if (column < 0 || column >= mColumnCount) {
             throw new CursorIndexOutOfBoundsException("Requested column: "
-                    + column + ", # of columns: " +  columnCount);
+                    + column + ", # of columns: " +  mColumnCount);
         }
         if (mPos < 0) {
             throw new CursorIndexOutOfBoundsException("Before first row.");
         }
-        if (mPos >= rowCount) {
+        if (mPos >= mRowCount) {
             throw new CursorIndexOutOfBoundsException("After last row.");
         }
-        return data[mPos * columnCount + column];
+        return mData[mPos * mColumnCount + column];
     }
 
     /**
      * Adds a new row to the end and returns a builder for that row. Not safe
      * for concurrent use.
      *
      * @return builder which can be used to set the column values for the new
      *  row
      */
     public RowBuilder newRow() {
-        rowCount++;
-        int endIndex = rowCount * columnCount;
+        mRowCount++;
+        int endIndex = mRowCount * mColumnCount;
         ensureCapacity(endIndex);
-        int start = endIndex - columnCount;
+        int start = endIndex - mColumnCount;
         return new RowBuilder(start, endIndex);
     }
 
     /**
      * Adds a new row to the end with the given column values. Not safe
      * for concurrent use.
      *
      * @throws IllegalArgumentException if {@code columnValues.length !=
      *  columnNames.length}
      * @param columnValues in the same order as the the column names specified
      *  at cursor construction time
      */
     @JNITarget
     public void addRow(final Object[] columnValues) {
-        if (columnValues.length != columnCount) {
+        if (columnValues.length != mColumnCount) {
             throw new IllegalArgumentException("columnNames.length = "
-                    + columnCount + ", columnValues.length = "
+                    + mColumnCount + ", columnValues.length = "
                     + columnValues.length);
         }
 
-        int start = rowCount++ * columnCount;
-        ensureCapacity(start + columnCount);
-        System.arraycopy(columnValues, 0, data, start, columnCount);
+        int start = mRowCount++ * mColumnCount;
+        ensureCapacity(start + mColumnCount);
+        System.arraycopy(columnValues, 0, mData, start, mColumnCount);
     }
 
     /**
      * Adds a new row to the end with the given column values. Not safe
      * for concurrent use.
      *
      * @throws IllegalArgumentException if {@code columnValues.size() !=
      *  columnNames.length}
      * @param columnValues in the same order as the the column names specified
      *  at cursor construction time
      */
     @JNITarget
     public void addRow(final Iterable<?> columnValues) {
-        final int start = rowCount * columnCount;
+        final int start = mRowCount * mColumnCount;
 
         if (columnValues instanceof ArrayList<?>) {
             addRow((ArrayList<?>) columnValues, start);
             return;
         }
 
-        final int end = start + columnCount;
+        final int end = start + mColumnCount;
         int current = start;
 
         ensureCapacity(end);
-        final Object[] localData = data;
+        final Object[] localData = mData;
         for (Object columnValue : columnValues) {
             if (current == end) {
                 // TODO: null out row?
                 throw new IllegalArgumentException(
                         "columnValues.size() > columnNames.length");
             }
             localData[current++] = columnValue;
         }
 
         if (current != end) {
             // TODO: null out row?
             throw new IllegalArgumentException(
                     "columnValues.size() < columnNames.length");
         }
 
         // Increase row count here in case we encounter an exception.
-        rowCount++;
+        mRowCount++;
     }
 
     /** Optimization for {@link ArrayList}. */
     @JNITarget
     private void addRow(final ArrayList<?> columnValues, final int start) {
         final int size = columnValues.size();
-        if (size != columnCount) {
+        if (size != mColumnCount) {
             throw new IllegalArgumentException("columnNames.length = "
-                    + columnCount + ", columnValues.size() = " + size);
+                    + mColumnCount + ", columnValues.size() = " + size);
         }
 
-        final int end = start + columnCount;
+        final int end = start + mColumnCount;
         ensureCapacity(end);
 
         // Take a reference just in case someone calls ensureCapacity
         // and `data` gets replaced by a new array!
-        final Object[] localData = data;
+        final Object[] localData = mData;
         for (int i = 0; i < size; i++) {
             localData[start + i] = columnValues.get(i);
         }
 
-        rowCount++;
+        mRowCount++;
     }
 
     /**
      * Ensures that this cursor has enough capacity. If it needs to allocate
      * a new array, the existing capacity will be at least doubled.
      */
     private void ensureCapacity(final int size) {
-        if (size <= data.length) {
+        if (size <= mData.length) {
             return;
         }
 
-        final Object[] oldData = this.data;
-        this.data = new Object[Math.max(size, data.length * 2)];
-        System.arraycopy(oldData, 0, this.data, 0, oldData.length);
+        final Object[] oldData = mData;
+        mData = new Object[Math.max(size, mData.length * 2)];
+        System.arraycopy(oldData, 0, mData, 0, oldData.length);
     }
 
     /**
      * Builds a row, starting from the left-most column and adding one column
      * value at a time. Follows the same ordering as the column names specified
      * at cursor construction time.
      *
      * Not thread-safe.
      */
     public class RowBuilder {
-        private int index;
-        private final int endIndex;
+        private int mIndex;
+        private final int mEndIndex;
 
         RowBuilder(final int index, final int endIndex) {
-            this.index = index;
-            this.endIndex = endIndex;
+            this.mIndex = index;
+            this.mEndIndex = endIndex;
         }
 
         /**
          * Sets the next column value in this row.
          *
          * @throws CursorIndexOutOfBoundsException if you try to add too many
          *  values
          * @return this builder to support chaining
          */
         public RowBuilder add(final Object columnValue) {
-            if (index == endIndex) {
+            if (mIndex == mEndIndex) {
                 throw new CursorIndexOutOfBoundsException("No more columns left.");
             }
 
-            data[index++] = columnValue;
+            mData[mIndex++] = columnValue;
             return this;
         }
     }
 
     /**
      * Not thread safe.
      */
     public void set(final int column, final Object value) {
-        if (column < 0 || column >= columnCount) {
+        if (column < 0 || column >= mColumnCount) {
             throw new CursorIndexOutOfBoundsException("Requested column: "
-                    + column + ", # of columns: " +  columnCount);
+                    + column + ", # of columns: " +  mColumnCount);
         }
         if (mPos < 0) {
             throw new CursorIndexOutOfBoundsException("Before first row.");
         }
-        if (mPos >= rowCount) {
+        if (mPos >= mRowCount) {
             throw new CursorIndexOutOfBoundsException("After last row.");
         }
-        data[mPos * columnCount + column] = value;
+        mData[mPos * mColumnCount + column] = value;
     }
 
     // AbstractCursor implementation.
     @Override
     public int getCount() {
-        return rowCount;
+        return mRowCount;
     }
 
     @Override
     public String[] getColumnNames() {
-        return columnNames;
+        return mColumnNames;
     }
 
     @Override
     public String getString(final int column) {
         Object value = get(column);
         if (value == null) return null;
         return value.toString();
     }
@@ -349,14 +349,14 @@ public class MatrixBlobCursor extends Ab
     @Override
     public boolean isNull(final int column) {
         return get(column) == null;
     }
 
     @Override
     protected void finalize() {
         if (!isClosed()) {
-            Log.e(LOGTAG, "Cursor finalized without being closed", this.allocationStack);
+            Log.e(LOGTAG, "Cursor finalized without being closed", mAllocationStack);
         }
 
         super.finalize();
     }
 }
--- a/mobile/android/geckoview/src/main/java/org/mozilla/gecko/util/GeckoBackgroundThread.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/gecko/util/GeckoBackgroundThread.java
@@ -13,36 +13,36 @@ final class GeckoBackgroundThread extend
     private static final String LOOPER_NAME = "GeckoBackgroundThread";
 
     // Guarded by 'GeckoBackgroundThread.class'.
     private static Handler handler;
     private static Thread thread;
 
     // The initial Runnable to run on the new thread. Its purpose
     // is to avoid us having to wait for the new thread to start.
-    private Runnable initialRunnable;
+    private Runnable mInitialRunnable;
 
     // Singleton, so private constructor.
     private GeckoBackgroundThread(final Runnable initialRunnable) {
-        this.initialRunnable = initialRunnable;
+        mInitialRunnable = initialRunnable;
     }
 
     @Override
     public void run() {
         setName(LOOPER_NAME);
         Looper.prepare();
 
         synchronized (GeckoBackgroundThread.class) {
             handler = new Handler();
             GeckoBackgroundThread.class.notifyAll();
         }
 
-        if (initialRunnable != null) {
-            initialRunnable.run();
-            initialRunnable = null;
+        if (mInitialRunnable != null) {
+            mInitialRunnable.run();
+            mInitialRunnable = null;
         }
 
         Looper.loop();
     }
 
     private static void startThread(final Runnable initialRunnable) {
         thread = new GeckoBackgroundThread(initialRunnable);
         ThreadUtils.setBackgroundThread(thread);
--- a/mobile/android/geckoview/src/main/java/org/mozilla/gecko/util/IOUtils.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/gecko/util/IOUtils.java
@@ -23,37 +23,37 @@ public class IOUtils {
      * as the length of the data returned.
      * The byte[] is not guaranteed to be trimmed to the size of the data acquired from the stream:
      * hence the need for the length field. This strategy avoids the need to copy the data into a
      * trimmed buffer after consumption.
      */
     public static class ConsumedInputStream {
         public final int consumedLength;
         // Only reassigned in getTruncatedData.
-        private byte[] consumedData;
+        private byte[] mConsumedData;
 
         public ConsumedInputStream(final int consumedLength, final byte[] consumedData) {
             this.consumedLength = consumedLength;
-            this.consumedData = consumedData;
+            this.mConsumedData = consumedData;
         }
 
         /**
          * Get the data trimmed to the length of the actual payload read, caching the result.
          */
         public byte[] getTruncatedData() {
-            if (consumedData.length == consumedLength) {
-                return consumedData;
+            if (mConsumedData.length == consumedLength) {
+                return mConsumedData;
             }
 
-            consumedData = truncateBytes(consumedData, consumedLength);
-            return consumedData;
+            mConsumedData = truncateBytes(mConsumedData, consumedLength);
+            return mConsumedData;
         }
 
         public byte[] getData() {
-            return consumedData;
+            return mConsumedData;
         }
     }
 
     /**
      * Fully read an InputStream into a byte array.
      * @param iStream the InputStream to consume.
      * @param bufferSize The initial size of the buffer to allocate. It will be grown as
      *                   needed, but if the caller knows something about the InputStream then
--- a/mobile/android/geckoview/src/main/java/org/mozilla/gecko/util/NonEvictingLruCache.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/gecko/util/NonEvictingLruCache.java
@@ -10,35 +10,35 @@ import android.util.LruCache;
 import java.util.concurrent.ConcurrentHashMap;
 
 /**
  * An LruCache that also supports a set of items that will never be evicted.
  *
  * Alas, LruCache is final, so we compose rather than inherit.
  */
 public class NonEvictingLruCache<K, V> {
-    private final ConcurrentHashMap<K, V> permanent = new ConcurrentHashMap<K, V>();
-    private final LruCache<K, V> evictable;
+    private final ConcurrentHashMap<K, V> mPermanent = new ConcurrentHashMap<K, V>();
+    private final LruCache<K, V> mEvitable;
 
     public NonEvictingLruCache(final int evictableSize) {
-        evictable = new LruCache<K, V>(evictableSize);
+        mEvitable = new LruCache<K, V>(evictableSize);
     }
 
     public V get(final K key) {
-        V val = permanent.get(key);
+        V val = mPermanent.get(key);
         if (val == null) {
-            return evictable.get(key);
+            return mEvitable.get(key);
         }
         return val;
     }
 
     public void putWithoutEviction(final K key, final V value) {
-        permanent.put(key, value);
+        mPermanent.put(key, value);
     }
 
     public void put(final K key, final V value) {
-        evictable.put(key, value);
+        mEvitable.put(key, value);
     }
 
     public void evictAll() {
-        evictable.evictAll();
+        mEvitable.evictAll();
     }
 }
--- a/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoDisplay.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoDisplay.java
@@ -15,20 +15,20 @@ import org.mozilla.gecko.util.ThreadUtil
 
 /**
  * Applications use a GeckoDisplay instance to provide {@link GeckoSession} with a {@link Surface} for
  * displaying content. To ensure drawing only happens on a valid {@link Surface}, {@link GeckoSession}
  * will only use the provided {@link Surface} after {@link #surfaceChanged(Surface, int, int)} or
  * {@link #surfaceChanged(Surface, int, int, int, int)} is called and before {@link #surfaceDestroyed()} returns.
  */
 public class GeckoDisplay {
-    private final GeckoSession session;
+    private final GeckoSession mSession;
 
     protected GeckoDisplay(final GeckoSession session) {
-        this.session = session;
+        mSession = session;
     }
 
     /**
      * Sets a surface for the compositor render a surface.
      *
      * Required call. The display's Surface has been created or changed. Must be
      * called on the application main thread. GeckoSession may block this call to ensure
      * the Surface is valid while resuming drawing.
@@ -61,69 +61,69 @@ public class GeckoDisplay {
     public void surfaceChanged(@NonNull final Surface surface, final int left, final int top,
                                final int width, final int height) {
         ThreadUtils.assertOnUiThread();
 
         if ((left < 0) || (top < 0)) {
             throw new IllegalArgumentException("Parameters can not be negative.");
         }
 
-        if (session.getDisplay() == this) {
-            session.onSurfaceChanged(surface, left, top, width, height);
+        if (mSession.getDisplay() == this) {
+            mSession.onSurfaceChanged(surface, left, top, width, height);
         }
     }
 
     /**
      * Removes the current surface registered with the compositor.
      *
      * Required call. The display's Surface has been destroyed. Must be called on the
      * application main thread. GeckoSession may block this call to ensure the Surface is
      * valid while pausing drawing.
      */
     @UiThread
     public void surfaceDestroyed() {
         ThreadUtils.assertOnUiThread();
 
-        if (session.getDisplay() == this) {
-            session.onSurfaceDestroyed();
+        if (mSession.getDisplay() == this) {
+            mSession.onSurfaceDestroyed();
         }
     }
 
     /**
      * Update the position of the surface on the screen.
      *
      * Optional call. The display's coordinates on the screen has changed. Must be
      * called on the application main thread.
      *
      * @param left The X coordinate of the display on the screen, in screen pixels.
      * @param top The Y coordinate of the display on the screen, in screen pixels.
      */
     @UiThread
     public void screenOriginChanged(final int left, final int top) {
         ThreadUtils.assertOnUiThread();
 
-        if (session.getDisplay() == this) {
-            session.onScreenOriginChanged(left, top);
+        if (mSession.getDisplay() == this) {
+            mSession.onScreenOriginChanged(left, top);
         }
     }
 
     /**
      * Return whether the display should be pinned on the screen.
      *
      * When pinned, the display should not be moved on the screen due to animation, scrolling, etc.
      * A common reason for the display being pinned is when the user is dragging a selection caret
      * inside the display; normal user interaction would be disrupted in that case if the display
      * was moved on screen.
      *
      * @return True if display should be pinned on the screen.
      */
     @UiThread
     public boolean shouldPinOnScreen() {
         ThreadUtils.assertOnUiThread();
-        return session.getDisplay() == this && session.shouldPinOnScreen();
+        return mSession.getDisplay() == this && mSession.shouldPinOnScreen();
     }
 
     /**
      * Request a {@link Bitmap} of the visible portion of the web page currently being
      * rendered.
      *
      * Returned {@link Bitmap} will have the same dimensions as the {@link Surface} the
      * {@link GeckoDisplay} is currently using.
@@ -134,17 +134,17 @@ public class GeckoDisplay {
      * This function must be called on the UI thread.
      *
      * @return A {@link GeckoResult} that completes with a {@link Bitmap} containing
      * the pixels and size information of the currently visible rendered web page.
      */
     @UiThread
     public @NonNull GeckoResult<Bitmap> capturePixels() {
         ThreadUtils.assertOnUiThread();
-        if (!session.isCompositorReady()) {
+        if (!mSession.isCompositorReady()) {
             return GeckoResult.fromException(
                     new IllegalStateException("Compositor must be ready before pixels can be captured"));
         }
         GeckoResult<Bitmap> result = new GeckoResult<>();
-        session.mCompositor.requestScreenPixels(result);
+        mSession.mCompositor.requestScreenPixels(result);
         return result;
     }
 }