Bug 1512274 - [geckoview] Fix indentation. r=geckoview-reviewers,snorp
☠☠ backed out by 1f911d12fd07 ☠ ☠
authorAgi Sferro <agi@mozilla.com>
Fri, 15 Mar 2019 18:09:14 +0000
changeset 522091 670e07131f14753061bf8e85f49d5de461f1fdc0
parent 522090 161731389a46e2a1ff82736dea560118e6bc8f6f
child 522092 9a9d3c9c124a32d039969ef8c0c0624f3a80705f
push id10871
push usercbrindusan@mozilla.com
push dateMon, 18 Mar 2019 15:49:32 +0000
treeherdermozilla-beta@018abdd16060 [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] Fix indentation. r=geckoview-reviewers,snorp Depends on D23688 Differential Revision: https://phabricator.services.mozilla.com/D23689
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/GeckoProfileDirectories.java
mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoSystemStateListener.java
mobile/android/geckoview/src/main/java/org/mozilla/gecko/NSSBridge.java
mobile/android/geckoview/src/main/java/org/mozilla/gecko/TelemetryUtils.java
mobile/android/geckoview/src/main/java/org/mozilla/gecko/gfx/GeckoSurfaceTexture.java
mobile/android/geckoview/src/main/java/org/mozilla/gecko/media/CodecProxy.java
mobile/android/geckoview/src/main/java/org/mozilla/gecko/media/GeckoHLSDemuxerWrapper.java
mobile/android/geckoview/src/main/java/org/mozilla/gecko/media/GeckoHLSResourceWrapper.java
mobile/android/geckoview/src/main/java/org/mozilla/gecko/media/GeckoHLSSample.java
mobile/android/geckoview/src/main/java/org/mozilla/gecko/media/GeckoHlsPlayer.java
mobile/android/geckoview/src/main/java/org/mozilla/gecko/media/GeckoHlsVideoRenderer.java
mobile/android/geckoview/src/main/java/org/mozilla/gecko/media/GeckoMediaDrmBridgeV21.java
mobile/android/geckoview/src/main/java/org/mozilla/gecko/media/JellyBeanAsyncCodec.java
mobile/android/geckoview/src/main/java/org/mozilla/gecko/media/MediaDrmProxy.java
mobile/android/geckoview/src/main/java/org/mozilla/gecko/media/Sample.java
mobile/android/geckoview/src/main/java/org/mozilla/gecko/sqlite/SQLiteBridge.java
mobile/android/geckoview/src/main/java/org/mozilla/gecko/util/BitmapUtils.java
mobile/android/geckoview/src/main/java/org/mozilla/gecko/util/ContentUriUtils.java
mobile/android/geckoview/src/main/java/org/mozilla/gecko/util/FileUtils.java
mobile/android/geckoview/src/main/java/org/mozilla/gecko/util/GeckoBundle.java
mobile/android/geckoview/src/main/java/org/mozilla/gecko/util/HardwareCodecCapabilityUtils.java
mobile/android/geckoview/src/main/java/org/mozilla/gecko/util/INISection.java
mobile/android/geckoview/src/main/java/org/mozilla/gecko/util/ProxySelector.java
mobile/android/geckoview/src/main/java/org/mozilla/gecko/util/ThreadUtils.java
mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoEditable.java
mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoInputConnection.java
mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoRuntime.java
mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoRuntimeSettings.java
mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoSession.java
mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoSessionSettings.java
mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoVRManager.java
mobile/android/geckoview/src/main/java/org/mozilla/geckoview/SessionAccessibility.java
--- a/mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoAppShell.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoAppShell.java
@@ -415,68 +415,68 @@ public class GeckoAppShell {
         public void onSensorChanged(final SensorEvent s) {
             int sensorType = s.sensor.getType();
             int halType = 0;
             float x = 0.0f, y = 0.0f, z = 0.0f, w = 0.0f;
             // SensorEvent timestamp is in nanoseconds, Gecko expects microseconds.
             final long time = s.timestamp / 1000;
 
             switch (sensorType) {
-            case Sensor.TYPE_ACCELEROMETER:
-            case Sensor.TYPE_LINEAR_ACCELERATION:
-            case Sensor.TYPE_ORIENTATION:
-                if (sensorType == Sensor.TYPE_ACCELEROMETER) {
-                    halType = GeckoHalDefines.SENSOR_ACCELERATION;
-                } else if (sensorType == Sensor.TYPE_LINEAR_ACCELERATION) {
-                    halType = GeckoHalDefines.SENSOR_LINEAR_ACCELERATION;
-                } else {
-                    halType = GeckoHalDefines.SENSOR_ORIENTATION;
-                }
-                x = s.values[0];
-                y = s.values[1];
-                z = s.values[2];
-                break;
+                case Sensor.TYPE_ACCELEROMETER:
+                case Sensor.TYPE_LINEAR_ACCELERATION:
+                case Sensor.TYPE_ORIENTATION:
+                    if (sensorType == Sensor.TYPE_ACCELEROMETER) {
+                        halType = GeckoHalDefines.SENSOR_ACCELERATION;
+                    } else if (sensorType == Sensor.TYPE_LINEAR_ACCELERATION) {
+                        halType = GeckoHalDefines.SENSOR_LINEAR_ACCELERATION;
+                    } else {
+                        halType = GeckoHalDefines.SENSOR_ORIENTATION;
+                    }
+                    x = s.values[0];
+                    y = s.values[1];
+                    z = s.values[2];
+                    break;
 
-            case Sensor.TYPE_GYROSCOPE:
-                halType = GeckoHalDefines.SENSOR_GYROSCOPE;
-                x = (float) Math.toDegrees(s.values[0]);
-                y = (float) Math.toDegrees(s.values[1]);
-                z = (float) Math.toDegrees(s.values[2]);
-                break;
+                case Sensor.TYPE_GYROSCOPE:
+                    halType = GeckoHalDefines.SENSOR_GYROSCOPE;
+                    x = (float) Math.toDegrees(s.values[0]);
+                    y = (float) Math.toDegrees(s.values[1]);
+                    z = (float) Math.toDegrees(s.values[2]);
+                    break;
 
-            case Sensor.TYPE_PROXIMITY:
-                halType = GeckoHalDefines.SENSOR_PROXIMITY;
-                x = s.values[0];
-                z = s.sensor.getMaximumRange();
-                break;
+                case Sensor.TYPE_PROXIMITY:
+                    halType = GeckoHalDefines.SENSOR_PROXIMITY;
+                    x = s.values[0];
+                    z = s.sensor.getMaximumRange();
+                    break;
 
-            case Sensor.TYPE_LIGHT:
-                halType = GeckoHalDefines.SENSOR_LIGHT;
-                x = s.values[0];
-                break;
+                case Sensor.TYPE_LIGHT:
+                    halType = GeckoHalDefines.SENSOR_LIGHT;
+                    x = s.values[0];
+                    break;
 
-            case Sensor.TYPE_ROTATION_VECTOR:
-            case Sensor.TYPE_GAME_ROTATION_VECTOR: // API >= 18
-                halType = (sensorType == Sensor.TYPE_ROTATION_VECTOR ?
-                        GeckoHalDefines.SENSOR_ROTATION_VECTOR :
-                        GeckoHalDefines.SENSOR_GAME_ROTATION_VECTOR);
-                x = s.values[0];
-                y = s.values[1];
-                z = s.values[2];
-                if (s.values.length >= 4) {
-                    w = s.values[3];
-                } else {
-                    // s.values[3] was optional in API <= 18, so we need to compute it
-                    // The values form a unit quaternion, so we can compute the angle of
-                    // rotation purely based on the given 3 values.
-                    w = 1.0f - s.values[0] * s.values[0] -
-                            s.values[1] * s.values[1] - s.values[2] * s.values[2];
-                    w = (w > 0.0f) ? (float) Math.sqrt(w) : 0.0f;
-                }
-                break;
+                case Sensor.TYPE_ROTATION_VECTOR:
+                case Sensor.TYPE_GAME_ROTATION_VECTOR: // API >= 18
+                    halType = (sensorType == Sensor.TYPE_ROTATION_VECTOR ?
+                            GeckoHalDefines.SENSOR_ROTATION_VECTOR :
+                            GeckoHalDefines.SENSOR_GAME_ROTATION_VECTOR);
+                    x = s.values[0];
+                    y = s.values[1];
+                    z = s.values[2];
+                    if (s.values.length >= 4) {
+                        w = s.values[3];
+                    } else {
+                        // s.values[3] was optional in API <= 18, so we need to compute it
+                        // The values form a unit quaternion, so we can compute the angle of
+                        // rotation purely based on the given 3 values.
+                        w = 1.0f - s.values[0] * s.values[0] -
+                                s.values[1] * s.values[1] - s.values[2] * s.values[2];
+                        w = (w > 0.0f) ? (float) Math.sqrt(w) : 0.0f;
+                    }
+                    break;
             }
 
             GeckoAppShell.onSensorChanged(halType, x, y, z, w, time);
         }
 
         // Geolocation.
         @Override
         public void onLocationChanged(final Location location) {
@@ -567,23 +567,23 @@ public class GeckoAppShell {
             }
 
             if (state == WakeLockDelegate.STATE_LOCKED_FOREGROUND && wl == null) {
                 final PowerManager pm = (PowerManager)
                         getApplicationContext().getSystemService(Context.POWER_SERVICE);
 
                 if (WakeLockDelegate.LOCK_CPU.equals(lock) ||
                     WakeLockDelegate.LOCK_AUDIO_PLAYING.equals(lock)) {
-                  wl = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, lock);
+                    wl = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, lock);
                 } else if (WakeLockDelegate.LOCK_SCREEN.equals(lock) ||
                            WakeLockDelegate.LOCK_VIDEO_PLAYING.equals(lock)) {
                   // ON_AFTER_RELEASE is set, the user activity timer will be reset when the
                   // WakeLock is released, causing the illumination to remain on a bit longer.
-                  wl = pm.newWakeLock(PowerManager.SCREEN_BRIGHT_WAKE_LOCK |
-                                      PowerManager.ON_AFTER_RELEASE, lock);
+                    wl = pm.newWakeLock(PowerManager.SCREEN_BRIGHT_WAKE_LOCK |
+                                        PowerManager.ON_AFTER_RELEASE, lock);
                 } else {
                     Log.w(LOGTAG, "Unsupported wake-lock: " + lock);
                     return;
                 }
 
                 wl.acquire();
                 mWakeLocks.put(lock, wl);
             } else if (state != WakeLockDelegate.STATE_LOCKED_FOREGROUND && wl != null) {
@@ -672,179 +672,179 @@ public class GeckoAppShell {
 
     @SuppressWarnings("fallthrough")
     @WrapForJNI(calledFrom = "gecko")
     private static void enableSensor(final int aSensortype) {
         final SensorManager sm = (SensorManager)
             getApplicationContext().getSystemService(Context.SENSOR_SERVICE);
 
         switch (aSensortype) {
-        case GeckoHalDefines.SENSOR_GAME_ROTATION_VECTOR:
-            if (gGameRotationVectorSensor == null) {
-                gGameRotationVectorSensor = sm.getDefaultSensor(
-                        Sensor.TYPE_GAME_ROTATION_VECTOR);
-            }
-            if (gGameRotationVectorSensor != null) {
-                sm.registerListener(getSensorListener(),
-                                    gGameRotationVectorSensor,
-                                    SensorManager.SENSOR_DELAY_FASTEST);
-            }
-            if (gGameRotationVectorSensor != null) {
-              break;
-            }
-            // Fallthrough
+            case GeckoHalDefines.SENSOR_GAME_ROTATION_VECTOR:
+                if (gGameRotationVectorSensor == null) {
+                    gGameRotationVectorSensor = sm.getDefaultSensor(
+                            Sensor.TYPE_GAME_ROTATION_VECTOR);
+                }
+                if (gGameRotationVectorSensor != null) {
+                    sm.registerListener(getSensorListener(),
+                                        gGameRotationVectorSensor,
+                                        SensorManager.SENSOR_DELAY_FASTEST);
+                }
+                if (gGameRotationVectorSensor != null) {
+                    break;
+                }
+                // Fallthrough
 
-        case GeckoHalDefines.SENSOR_ROTATION_VECTOR:
-            if (gRotationVectorSensor == null) {
-                gRotationVectorSensor = sm.getDefaultSensor(
-                    Sensor.TYPE_ROTATION_VECTOR);
-            }
-            if (gRotationVectorSensor != null) {
-                sm.registerListener(getSensorListener(),
-                                    gRotationVectorSensor,
-                                    SensorManager.SENSOR_DELAY_FASTEST);
-            }
-            if (gRotationVectorSensor != null) {
-              break;
-            }
-            // Fallthrough
+            case GeckoHalDefines.SENSOR_ROTATION_VECTOR:
+                if (gRotationVectorSensor == null) {
+                    gRotationVectorSensor = sm.getDefaultSensor(
+                        Sensor.TYPE_ROTATION_VECTOR);
+                }
+                if (gRotationVectorSensor != null) {
+                    sm.registerListener(getSensorListener(),
+                                        gRotationVectorSensor,
+                                        SensorManager.SENSOR_DELAY_FASTEST);
+                }
+                if (gRotationVectorSensor != null) {
+                    break;
+                }
+                // Fallthrough
 
-        case GeckoHalDefines.SENSOR_ORIENTATION:
-            if (gOrientationSensor == null) {
-                gOrientationSensor = sm.getDefaultSensor(
-                    Sensor.TYPE_ORIENTATION);
-            }
-            if (gOrientationSensor != null) {
-                sm.registerListener(getSensorListener(),
-                                    gOrientationSensor,
-                                    SensorManager.SENSOR_DELAY_FASTEST);
-            }
-            break;
+            case GeckoHalDefines.SENSOR_ORIENTATION:
+                if (gOrientationSensor == null) {
+                    gOrientationSensor = sm.getDefaultSensor(
+                        Sensor.TYPE_ORIENTATION);
+                }
+                if (gOrientationSensor != null) {
+                    sm.registerListener(getSensorListener(),
+                                        gOrientationSensor,
+                                        SensorManager.SENSOR_DELAY_FASTEST);
+                }
+                break;
 
-        case GeckoHalDefines.SENSOR_ACCELERATION:
-            if (gAccelerometerSensor == null) {
-                gAccelerometerSensor = sm.getDefaultSensor(
-                    Sensor.TYPE_ACCELEROMETER);
-            }
-            if (gAccelerometerSensor != null) {
-                sm.registerListener(getSensorListener(),
-                                    gAccelerometerSensor,
-                                    SensorManager.SENSOR_DELAY_FASTEST);
-            }
-            break;
+            case GeckoHalDefines.SENSOR_ACCELERATION:
+                if (gAccelerometerSensor == null) {
+                    gAccelerometerSensor = sm.getDefaultSensor(
+                        Sensor.TYPE_ACCELEROMETER);
+                }
+                if (gAccelerometerSensor != null) {
+                    sm.registerListener(getSensorListener(),
+                                        gAccelerometerSensor,
+                                        SensorManager.SENSOR_DELAY_FASTEST);
+                }
+                break;
 
-        case GeckoHalDefines.SENSOR_PROXIMITY:
-            if (gProximitySensor == null) {
-                gProximitySensor = sm.getDefaultSensor(Sensor.TYPE_PROXIMITY);
-            }
-            if (gProximitySensor != null) {
-                sm.registerListener(getSensorListener(),
-                                    gProximitySensor,
-                                    SensorManager.SENSOR_DELAY_NORMAL);
-            }
-            break;
+            case GeckoHalDefines.SENSOR_PROXIMITY:
+                if (gProximitySensor == null) {
+                    gProximitySensor = sm.getDefaultSensor(Sensor.TYPE_PROXIMITY);
+                }
+                if (gProximitySensor != null) {
+                    sm.registerListener(getSensorListener(),
+                                        gProximitySensor,
+                                        SensorManager.SENSOR_DELAY_NORMAL);
+                }
+                break;
 
-        case GeckoHalDefines.SENSOR_LIGHT:
-            if (gLightSensor == null) {
-                gLightSensor = sm.getDefaultSensor(Sensor.TYPE_LIGHT);
-            }
-            if (gLightSensor != null) {
-                sm.registerListener(getSensorListener(),
-                                    gLightSensor,
-                                    SensorManager.SENSOR_DELAY_NORMAL);
-            }
-            break;
+            case GeckoHalDefines.SENSOR_LIGHT:
+                if (gLightSensor == null) {
+                    gLightSensor = sm.getDefaultSensor(Sensor.TYPE_LIGHT);
+                }
+                if (gLightSensor != null) {
+                    sm.registerListener(getSensorListener(),
+                                        gLightSensor,
+                                        SensorManager.SENSOR_DELAY_NORMAL);
+                }
+                break;
 
-        case GeckoHalDefines.SENSOR_LINEAR_ACCELERATION:
-            if (gLinearAccelerometerSensor == null) {
-                gLinearAccelerometerSensor = sm.getDefaultSensor(
-                    Sensor.TYPE_LINEAR_ACCELERATION);
-            }
-            if (gLinearAccelerometerSensor != null) {
-                sm.registerListener(getSensorListener(),
-                                    gLinearAccelerometerSensor,
-                                    SensorManager.SENSOR_DELAY_FASTEST);
-            }
-            break;
+            case GeckoHalDefines.SENSOR_LINEAR_ACCELERATION:
+                if (gLinearAccelerometerSensor == null) {
+                    gLinearAccelerometerSensor = sm.getDefaultSensor(
+                        Sensor.TYPE_LINEAR_ACCELERATION);
+                }
+                if (gLinearAccelerometerSensor != null) {
+                    sm.registerListener(getSensorListener(),
+                                        gLinearAccelerometerSensor,
+                                        SensorManager.SENSOR_DELAY_FASTEST);
+                }
+                break;
 
-        case GeckoHalDefines.SENSOR_GYROSCOPE:
-            if (gGyroscopeSensor == null) {
-                gGyroscopeSensor = sm.getDefaultSensor(Sensor.TYPE_GYROSCOPE);
-            }
-            if (gGyroscopeSensor != null) {
-                sm.registerListener(getSensorListener(),
-                                    gGyroscopeSensor,
-                                    SensorManager.SENSOR_DELAY_FASTEST);
-            }
-            break;
+            case GeckoHalDefines.SENSOR_GYROSCOPE:
+                if (gGyroscopeSensor == null) {
+                    gGyroscopeSensor = sm.getDefaultSensor(Sensor.TYPE_GYROSCOPE);
+                }
+                if (gGyroscopeSensor != null) {
+                    sm.registerListener(getSensorListener(),
+                                        gGyroscopeSensor,
+                                        SensorManager.SENSOR_DELAY_FASTEST);
+                }
+                break;
 
-        default:
-            Log.w(LOGTAG, "Error! Can't enable unknown SENSOR type " +
-                  aSensortype);
+            default:
+                Log.w(LOGTAG, "Error! Can't enable unknown SENSOR type " +
+                      aSensortype);
         }
     }
 
     @SuppressWarnings("fallthrough")
     @WrapForJNI(calledFrom = "gecko")
     private static void disableSensor(final int aSensortype) {
         final SensorManager sm = (SensorManager)
             getApplicationContext().getSystemService(Context.SENSOR_SERVICE);
 
         switch (aSensortype) {
-        case GeckoHalDefines.SENSOR_GAME_ROTATION_VECTOR:
-            if (gGameRotationVectorSensor != null) {
-                sm.unregisterListener(getSensorListener(), gGameRotationVectorSensor);
-              break;
-            }
-            // Fallthrough
+            case GeckoHalDefines.SENSOR_GAME_ROTATION_VECTOR:
+                if (gGameRotationVectorSensor != null) {
+                    sm.unregisterListener(getSensorListener(), gGameRotationVectorSensor);
+                    break;
+                }
+                // Fallthrough
 
-        case GeckoHalDefines.SENSOR_ROTATION_VECTOR:
-            if (gRotationVectorSensor != null) {
-                sm.unregisterListener(getSensorListener(), gRotationVectorSensor);
-              break;
-            }
-            // Fallthrough
+            case GeckoHalDefines.SENSOR_ROTATION_VECTOR:
+                if (gRotationVectorSensor != null) {
+                    sm.unregisterListener(getSensorListener(), gRotationVectorSensor);
+                    break;
+                }
+                // Fallthrough
 
-        case GeckoHalDefines.SENSOR_ORIENTATION:
-            if (gOrientationSensor != null) {
-                sm.unregisterListener(getSensorListener(), gOrientationSensor);
-            }
-            break;
+            case GeckoHalDefines.SENSOR_ORIENTATION:
+                if (gOrientationSensor != null) {
+                    sm.unregisterListener(getSensorListener(), gOrientationSensor);
+                }
+                break;
 
-        case GeckoHalDefines.SENSOR_ACCELERATION:
-            if (gAccelerometerSensor != null) {
-                sm.unregisterListener(getSensorListener(), gAccelerometerSensor);
-            }
-            break;
+            case GeckoHalDefines.SENSOR_ACCELERATION:
+                if (gAccelerometerSensor != null) {
+                    sm.unregisterListener(getSensorListener(), gAccelerometerSensor);
+                }
+                break;
 
-        case GeckoHalDefines.SENSOR_PROXIMITY:
-            if (gProximitySensor != null) {
-                sm.unregisterListener(getSensorListener(), gProximitySensor);
-            }
-            break;
+            case GeckoHalDefines.SENSOR_PROXIMITY:
+                if (gProximitySensor != null) {
+                    sm.unregisterListener(getSensorListener(), gProximitySensor);
+                }
+                break;
 
-        case GeckoHalDefines.SENSOR_LIGHT:
-            if (gLightSensor != null) {
-                sm.unregisterListener(getSensorListener(), gLightSensor);
-            }
-            break;
+            case GeckoHalDefines.SENSOR_LIGHT:
+                if (gLightSensor != null) {
+                    sm.unregisterListener(getSensorListener(), gLightSensor);
+                }
+                break;
 
-        case GeckoHalDefines.SENSOR_LINEAR_ACCELERATION:
-            if (gLinearAccelerometerSensor != null) {
-                sm.unregisterListener(getSensorListener(), gLinearAccelerometerSensor);
-            }
-            break;
+            case GeckoHalDefines.SENSOR_LINEAR_ACCELERATION:
+                if (gLinearAccelerometerSensor != null) {
+                    sm.unregisterListener(getSensorListener(), gLinearAccelerometerSensor);
+                }
+                break;
 
-        case GeckoHalDefines.SENSOR_GYROSCOPE:
-            if (gGyroscopeSensor != null) {
-                sm.unregisterListener(getSensorListener(), gGyroscopeSensor);
-            }
-            break;
-        default:
-            Log.w(LOGTAG, "Error! Can't disable unknown SENSOR type " + aSensortype);
+            case GeckoHalDefines.SENSOR_GYROSCOPE:
+                if (gGyroscopeSensor != null) {
+                    sm.unregisterListener(getSensorListener(), gGyroscopeSensor);
+                }
+                break;
+            default:
+                Log.w(LOGTAG, "Error! Can't disable unknown SENSOR type " + aSensortype);
         }
     }
 
     @WrapForJNI(calledFrom = "gecko")
     private static void moveTaskToBack() {
         // This is a vestige, to be removed as full-screen support for GeckoView is implemented.
     }
 
@@ -870,22 +870,22 @@ public class GeckoAppShell {
         if (geckoInterface == null) {
             return new String[] {};
         }
         return geckoInterface.getHandlersForURL(aURL, aAction);
     }
 
     @WrapForJNI(calledFrom = "gecko")
     private static boolean getHWEncoderCapability() {
-      return HardwareCodecCapabilityUtils.getHWEncoderCapability();
+        return HardwareCodecCapabilityUtils.getHWEncoderCapability();
     }
 
     @WrapForJNI(calledFrom = "gecko")
     private static boolean getHWDecoderCapability() {
-      return HardwareCodecCapabilityUtils.getHWDecoderCapability();
+        return HardwareCodecCapabilityUtils.getHWDecoderCapability();
     }
 
     static List<ResolveInfo> queryIntentActivities(final Intent intent) {
         final PackageManager pm = getApplicationContext().getPackageManager();
 
         // Exclude any non-exported activities: we can't open them even if we want to!
         // Bug 1031569 has some details.
         final ArrayList<ResolveInfo> list = new ArrayList<>();
@@ -1119,17 +1119,17 @@ public class GeckoAppShell {
     @SuppressLint("MissingPermission")
     @WrapForJNI(calledFrom = "gecko")
     private static void vibrate(final long[] pattern, final int repeat) {
         // If pattern.length is odd, the last element in the pattern is a
         // meaningless delay, so don't include it in vibrationDuration.
         long vibrationDuration = 0;
         int iterLen = pattern.length & ~1;
         for (int i = 0; i < iterLen; i++) {
-          vibrationDuration += pattern[i];
+            vibrationDuration += pattern[i];
         }
 
         sVibrationEndTime = System.nanoTime() + vibrationDuration * 1000000;
         sVibrationMaybePlaying = true;
         try {
             vibrator().vibrate(pattern, repeat);
         } catch (final SecurityException ignore) {
             Log.w(LOGTAG, "No VIBRATE permission");
@@ -1146,17 +1146,17 @@ public class GeckoAppShell {
         } catch (final SecurityException ignore) {
             Log.w(LOGTAG, "No VIBRATE permission");
         }
     }
 
     @WrapForJNI(calledFrom = "gecko")
     private static boolean isNetworkLinkUp() {
         ConnectivityManager cm = (ConnectivityManager)
-           getApplicationContext().getSystemService(Context.CONNECTIVITY_SERVICE);
+                getApplicationContext().getSystemService(Context.CONNECTIVITY_SERVICE);
         try {
             NetworkInfo info = cm.getActiveNetworkInfo();
             if (info == null || !info.isConnected())
                 return false;
         } catch (SecurityException se) {
             return false;
         }
         return true;
@@ -1778,18 +1778,17 @@ public class GeckoAppShell {
             return "image/png";
         }
 
         private final class BitmapInputStream extends PipedInputStream {
             private boolean mHaveConnected = false;
 
             @Override
             public synchronized int read(final byte[] buffer, final int byteOffset,
-                                         final int byteCount)
-            throws IOException {
+                                         final int byteCount) throws IOException {
                 if (mHaveConnected) {
                     return super.read(buffer, byteOffset, byteCount);
                 }
 
                 final PipedOutputStream output = new PipedOutputStream();
                 connect(output);
 
                 ThreadUtils.postToBackgroundThread(
--- a/mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoNetworkManager.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoNetworkManager.java
@@ -112,19 +112,19 @@ public class GeckoNetworkManager extends
 
         return instance;
     }
 
     public double[] getCurrentInformation() {
         final Context applicationContext = GeckoAppShell.getApplicationContext();
         final ConnectionType connectionType = mCurrentConnectionType;
         return new double[] {
-                connectionType.value,
-                connectionType == ConnectionType.WIFI ? 1.0 : 0.0,
-                connectionType == ConnectionType.WIFI ? wifiDhcpGatewayAddress(applicationContext) : 0.0
+            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);
     }
 
--- a/mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoProfileDirectories.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoProfileDirectories.java
@@ -133,26 +133,26 @@ public class GeckoProfileDirectories {
      * Package-scoped because {@link GeckoProfile} needs access to it.
      *
      * @return null if there is no "Default" entry in profiles.ini, or the profile
      *         name if there is.
      * @throws NoMozillaDirectoryException
      *             if the Mozilla directory did not exist and could not be created.
      */
     static String findDefaultProfileName(final Context context) throws NoMozillaDirectoryException {
-      final INIParser parser = GeckoProfileDirectories.getProfilesINI(getMozillaDirectory(context));
-      if (parser.getSections() != null) {
-          for (Enumeration<INISection> e = parser.getSections().elements(); e.hasMoreElements(); ) {
-              final INISection section = e.nextElement();
-              if (section.getIntProperty("Default") == 1) {
-                  return section.getStringProperty("Name");
-              }
-          }
-      }
-      return null;
+        final INIParser parser = GeckoProfileDirectories.getProfilesINI(getMozillaDirectory(context));
+        if (parser.getSections() != null) {
+            for (Enumeration<INISection> e = parser.getSections().elements(); e.hasMoreElements(); ) {
+                final INISection section = e.nextElement();
+                if (section.getIntProperty("Default") == 1) {
+                    return section.getStringProperty("Name");
+                }
+            }
+        }
+        return null;
     }
 
     static Map<String, String> getDefaultProfile(final File mozillaDir) {
         return getMatchingProfiles(mozillaDir, sectionIsDefault, true);
     }
 
     static Map<String, String> getProfilesNamed(final File mozillaDir, final String name) {
         final INISectionPredicate predicate = new INISectionPredicate() {
--- a/mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoSystemStateListener.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoSystemStateListener.java
@@ -87,17 +87,17 @@ public class GeckoSystemStateListener
     @WrapForJNI(calledFrom = "gecko")
     /**
      * For prefers-reduced-motion media queries feature.
      *
      * Uses `Settings.Global` which was introduced in API version 17.
      */
     private static boolean prefersReducedMotion() {
         if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR1) {
-          return false;
+            return false;
         }
 
         ContentResolver contentResolver = sApplicationContext.getContentResolver();
 
         return Settings.Global.getFloat(contentResolver,
                                         Settings.Global.ANIMATOR_DURATION_SCALE,
                                         1) == 0.0f;
     }
--- a/mobile/android/geckoview/src/main/java/org/mozilla/gecko/NSSBridge.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/gecko/NSSBridge.java
@@ -11,43 +11,39 @@ import org.mozilla.gecko.annotation.Robo
 
 public class NSSBridge {
     private static final String LOGTAG = "NSSBridge";
 
     private static native String nativeEncrypt(String aDb, String aValue);
     private static native String nativeDecrypt(String aDb, String aValue);
 
     @RobocopTarget
-    static public String encrypt(final Context context, final String aValue)
-      throws Exception {
+    static public String encrypt(final Context context, final String aValue) throws Exception {
         GeckoLoader.loadNSSLibs(context);
 
         String path = GeckoProfile.get(context).getDir().toString();
         return nativeEncrypt(path, aValue);
     }
 
     @RobocopTarget
     static public String encrypt(final Context context, final String profilePath,
-                                 final String aValue)
-      throws Exception {
+                                 final String aValue) throws Exception {
         GeckoLoader.loadNSSLibs(context);
 
         return nativeEncrypt(profilePath, aValue);
     }
 
     @RobocopTarget
-    static public String decrypt(final Context context, final String aValue)
-      throws Exception {
+    static public String decrypt(final Context context, final String aValue) throws Exception {
         GeckoLoader.loadNSSLibs(context);
 
         String path = GeckoProfile.get(context).getDir().toString();
         return nativeDecrypt(path, aValue);
     }
 
     @RobocopTarget
     static public String decrypt(final Context context, final String profilePath,
-                                 final String aValue)
-      throws Exception {
+                                 final String aValue) throws Exception {
         GeckoLoader.loadNSSLibs(context);
 
         return nativeDecrypt(profilePath, aValue);
     }
 }
--- a/mobile/android/geckoview/src/main/java/org/mozilla/gecko/TelemetryUtils.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/gecko/TelemetryUtils.java
@@ -76,17 +76,17 @@ public class TelemetryUtils {
             mStartTime = now();
         }
 
         public void cancel() {
             mHasFinished = true;
         }
 
         public long getElapsed() {
-          return mElapsed;
+            return mElapsed;
         }
 
         public void stop() {
             // Only the first stop counts.
             if (mHasFinished) {
                 return;
             }
 
--- a/mobile/android/geckoview/src/main/java/org/mozilla/gecko/gfx/GeckoSurfaceTexture.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/gecko/gfx/GeckoSurfaceTexture.java
@@ -209,17 +209,17 @@ import org.mozilla.gecko.mozglue.JNIObje
 
         if (list == null) {
             return;
         }
 
         for (GeckoSurfaceTexture tex : list) {
             try {
                 if (tex.isSingleBuffer()) {
-                   tex.releaseTexImage();
+                    tex.releaseTexImage();
                 }
 
                 tex.detachFromGLContext();
                 tex.release();
 
                 // We need to manually call finalize here, otherwise we can run out
                 // of file descriptors if the GC doesn't kick in soon enough. Bug 1416015.
                 try {
--- a/mobile/android/geckoview/src/main/java/org/mozilla/gecko/media/CodecProxy.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/gecko/media/CodecProxy.java
@@ -167,49 +167,49 @@ public final class CodecProxy {
         } catch (RemoteException e) {
             e.printStackTrace();
             return false;
         }
     }
 
     @WrapForJNI
     public synchronized boolean isAdaptivePlaybackSupported() {
-      if (mRemote == null) {
-          Log.e(LOGTAG, "cannot check isAdaptivePlaybackSupported with an ended codec");
-          return false;
-      }
-      try {
+        if (mRemote == null) {
+            Log.e(LOGTAG, "cannot check isAdaptivePlaybackSupported with an ended codec");
+            return false;
+        }
+        try {
             return mRemote.isAdaptivePlaybackSupported();
         } catch (RemoteException e) {
             e.printStackTrace();
             return false;
         }
     }
 
     @WrapForJNI
     public synchronized boolean isHardwareAccelerated() {
-      if (mRemote == null) {
-          Log.e(LOGTAG, "cannot check isHardwareAccelerated with an ended codec");
-          return false;
-      }
-      try {
+        if (mRemote == null) {
+            Log.e(LOGTAG, "cannot check isHardwareAccelerated with an ended codec");
+            return false;
+        }
+        try {
             return mRemote.isHardwareAccelerated();
         } catch (RemoteException e) {
             e.printStackTrace();
             return false;
         }
     }
 
     @WrapForJNI
     public synchronized boolean isTunneledPlaybackSupported() {
-      if (mRemote == null) {
-          Log.e(LOGTAG, "cannot check isTunneledPlaybackSupported with an ended codec");
-          return false;
-      }
-      try {
+        if (mRemote == null) {
+            Log.e(LOGTAG, "cannot check isTunneledPlaybackSupported with an ended codec");
+            return false;
+        }
+        try {
             return mRemote.isTunneledPlaybackSupported();
         } catch (RemoteException e) {
             e.printStackTrace();
             return false;
         }
     }
 
     @WrapForJNI
--- a/mobile/android/geckoview/src/main/java/org/mozilla/gecko/media/GeckoHLSDemuxerWrapper.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/gecko/media/GeckoHLSDemuxerWrapper.java
@@ -29,19 +29,17 @@ public final class GeckoHLSDemuxerWrappe
         }
         public int value() {
             return mType;
         }
     }
 
     private BaseHlsPlayer mPlayer = null;
 
-    public static class Callbacks extends JNIObject
-    implements BaseHlsPlayer.DemuxerCallbacks {
-
+    public static class Callbacks extends JNIObject implements BaseHlsPlayer.DemuxerCallbacks {
         @WrapForJNI(calledFrom = "gecko")
         Callbacks() {}
 
         @Override
         @WrapForJNI
         public native void onInitialized(boolean hasAudio, boolean hasVideo);
 
         @Override
--- a/mobile/android/geckoview/src/main/java/org/mozilla/gecko/media/GeckoHLSResourceWrapper.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/gecko/media/GeckoHLSResourceWrapper.java
@@ -11,18 +11,17 @@ import org.mozilla.gecko.annotation.Wrap
 import org.mozilla.gecko.mozglue.JNIObject;
 
 public class GeckoHLSResourceWrapper {
     private static final String LOGTAG = "GeckoHLSResourceWrapper";
     private static final boolean DEBUG = !BuildConfig.MOZILLA_OFFICIAL;
     private BaseHlsPlayer mPlayer = null;
     private boolean mDestroy = false;
 
-    public static class Callbacks extends JNIObject
-    implements BaseHlsPlayer.ResourceCallbacks {
+    public static class Callbacks extends JNIObject implements BaseHlsPlayer.ResourceCallbacks {
         @WrapForJNI(calledFrom = "gecko")
         Callbacks() {}
 
         @Override
         @WrapForJNI
         public native void onDataArrived();
 
         @Override
--- 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
@@ -76,11 +76,11 @@ public final class GeckoHLSSample {
         StringBuilder str = new StringBuilder();
         str.append("{ info=").
                 append("{ offset=").append(info.offset).
                 append(", size=").append(info.size).
                 append(", pts=").append(info.presentationTimeUs).
                 append(", duration=").append(duration).
                 append(", flags=").append(Integer.toHexString(info.flags)).append(" }").
                 append(" }");
-            return str.toString();
+        return str.toString();
     }
 }
--- a/mobile/android/geckoview/src/main/java/org/mozilla/gecko/media/GeckoHlsPlayer.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/gecko/media/GeckoHlsPlayer.java
@@ -168,19 +168,19 @@ public class GeckoHlsPlayer implements B
 
     private boolean mIsPlayerInitDone = false;
     private boolean mIsDemuxerInitDone = false;
 
     private BaseHlsPlayer.DemuxerCallbacks mDemuxerCallbacks;
     private BaseHlsPlayer.ResourceCallbacks mResourceCallbacks;
 
     private static void assertTrue(final boolean condition) {
-      if (DEBUG && !condition) {
-        throw new AssertionError("Expected condition to be true");
-      }
+        if (DEBUG && !condition) {
+            throw new AssertionError("Expected condition to be true");
+        }
     }
 
     protected void checkInitDone() {
         if (mIsDemuxerInitDone) {
             return;
         }
         assertTrue(mDemuxerCallbacks != null);
 
@@ -507,33 +507,33 @@ public class GeckoHlsPlayer implements B
 
         int periodCount = timeline.getPeriodCount();
         int windowCount = timeline.getWindowCount();
         if (DEBUG) {
             Log.d(LOGTAG, "sourceInfo [periodCount=" + periodCount + ", windowCount=" + windowCount);
         }
         Timeline.Period period = new Timeline.Period();
         for (int i = 0; i < Math.min(periodCount, MAX_TIMELINE_ITEM_LINES); i++) {
-          timeline.getPeriod(i, period);
-          if (mDurationUs < period.getDurationUs()) {
-              mDurationUs = period.getDurationUs();
-          }
+            timeline.getPeriod(i, period);
+            if (mDurationUs < period.getDurationUs()) {
+                mDurationUs = period.getDurationUs();
+            }
         }
         for (int i = 0; i < Math.min(windowCount, MAX_TIMELINE_ITEM_LINES); i++) {
-          timeline.getWindow(i, window);
-          if (mDurationUs < window.getDurationUs()) {
-              mDurationUs = window.getDurationUs();
-          }
+            timeline.getWindow(i, window);
+            if (mDurationUs < window.getDurationUs()) {
+                mDurationUs = window.getDurationUs();
+            }
         }
         // TODO : Need to check if the duration from play.getDuration is different
         // with the one calculated from multi-timelines/windows.
         if (DEBUG) {
             Log.d(LOGTAG, "Media duration (from Timeline) = " + mDurationUs +
-                          "(us)" + " player.getDuration() = " + mPlayer.getDuration() +
-                          "(ms)");
+                    "(us)" + " player.getDuration() = " + mPlayer.getDuration() +
+                    "(ms)");
         }
     }
 
     private static String getStateString(final int state) {
         switch (state) {
             case ExoPlayer.STATE_BUFFERING:
                 return "B";
             case ExoPlayer.STATE_ENDED:
@@ -544,55 +544,55 @@ public class GeckoHlsPlayer implements B
                 return "R";
             default:
                 return "?";
         }
     }
 
     private static String getFormatSupportString(final int formatSupport) {
         switch (formatSupport) {
-          case RendererCapabilities.FORMAT_HANDLED:
-            return "YES";
-          case RendererCapabilities.FORMAT_EXCEEDS_CAPABILITIES:
-            return "NO_EXCEEDS_CAPABILITIES";
-          case RendererCapabilities.FORMAT_UNSUPPORTED_SUBTYPE:
-            return "NO_UNSUPPORTED_TYPE";
-          case RendererCapabilities.FORMAT_UNSUPPORTED_TYPE:
-            return "NO";
-          default:
-            return "?";
+            case RendererCapabilities.FORMAT_HANDLED:
+                return "YES";
+            case RendererCapabilities.FORMAT_EXCEEDS_CAPABILITIES:
+                return "NO_EXCEEDS_CAPABILITIES";
+            case RendererCapabilities.FORMAT_UNSUPPORTED_SUBTYPE:
+                return "NO_UNSUPPORTED_TYPE";
+            case RendererCapabilities.FORMAT_UNSUPPORTED_TYPE:
+                return "NO";
+            default:
+                return "?";
         }
-      }
+    }
 
     private static String getAdaptiveSupportString(final int trackCount,
                                                    final int adaptiveSupport) {
         if (trackCount < 2) {
-          return "N/A";
+            return "N/A";
         }
         switch (adaptiveSupport) {
-          case RendererCapabilities.ADAPTIVE_SEAMLESS:
-            return "YES";
-          case RendererCapabilities.ADAPTIVE_NOT_SEAMLESS:
-            return "YES_NOT_SEAMLESS";
-          case RendererCapabilities.ADAPTIVE_NOT_SUPPORTED:
-            return "NO";
-          default:
-            return "?";
+            case RendererCapabilities.ADAPTIVE_SEAMLESS:
+                return "YES";
+            case RendererCapabilities.ADAPTIVE_NOT_SEAMLESS:
+                return "YES_NOT_SEAMLESS";
+            case RendererCapabilities.ADAPTIVE_NOT_SUPPORTED:
+                return "NO";
+            default:
+                return "?";
         }
-      }
+    }
 
-      private static String getTrackStatusString(final TrackSelection selection,
-                                                 final TrackGroup group, final int trackIndex) {
+    private static String getTrackStatusString(final TrackSelection selection,
+                                               final TrackGroup group, final int trackIndex) {
         return getTrackStatusString(selection != null && selection.getTrackGroup() == group
                 && selection.indexOf(trackIndex) != C.INDEX_UNSET);
-      }
+    }
 
-      private static String getTrackStatusString(final boolean enabled) {
+    private static String getTrackStatusString(final boolean enabled) {
         return enabled ? "[X]" : "[ ]";
-      }
+    }
 
     // Called on GeckoHlsPlayerThread
     private synchronized void createExoPlayer(final String url) {
         Context ctx = GeckoAppShell.getApplicationContext();
         mComponentListener = new ComponentListener();
         mComponentEventDispatcher = new ComponentEventDispatcher();
         mDurationUs = 0;
 
@@ -823,17 +823,17 @@ public class GeckoHlsPlayer implements B
             suspendExoplayer();
         }
     }
 
     // Called on Gecko's main thread.
     @Override
     public synchronized void resume() {
         if (!mExoplayerSuspended) {
-          return;
+            return;
         }
         if (mMediaDecoderPlayState == MediaDecoderPlayState.PLAY_STATE_PLAYING) {
             if (DEBUG) {
                 Log.d(LOGTAG, "resume player id : " + mPlayerId);
             }
             resumeExoplayer();
         }
     }
--- a/mobile/android/geckoview/src/main/java/org/mozilla/gecko/media/GeckoHlsVideoRenderer.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/gecko/media/GeckoHlsVideoRenderer.java
@@ -285,18 +285,19 @@ public class GeckoHlsVideoRenderer exten
         mDemuxedInputSamples.clear();
         mDemuxedNoDurationSamples.clear();
         return true;
     }
 
     @Override
     protected boolean canReconfigure(final Format oldFormat, final Format newFormat) {
         boolean canReconfig = areAdaptationCompatible(oldFormat, newFormat)
-          && newFormat.width <= mCodecMaxValues.width && newFormat.height <= mCodecMaxValues.height
-          && newFormat.maxInputSize <= mCodecMaxValues.inputSize;
+                && newFormat.width <= mCodecMaxValues.width
+                && newFormat.height <= mCodecMaxValues.height
+                && newFormat.maxInputSize <= mCodecMaxValues.inputSize;
         if (DEBUG) {
             Log.d(LOGTAG, "[canReconfigure] : " + canReconfig);
         }
         return canReconfig;
     }
 
     @Override
     protected void prepareReconfiguration() {
--- a/mobile/android/geckoview/src/main/java/org/mozilla/gecko/media/GeckoMediaDrmBridgeV21.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/gecko/media/GeckoMediaDrmBridgeV21.java
@@ -83,22 +83,22 @@ public class GeckoMediaDrmBridgeV21 impl
         }
     }
 
     public boolean isSecureDecoderComonentRequired(final String mimeType) {
         if (mCrypto != null) {
             return mCrypto.requiresSecureDecoderComponent(mimeType);
         }
         return false;
-      }
+    }
 
     private static void assertTrue(final boolean condition) {
-      if (DEBUG && !condition) {
-        throw new AssertionError("Expected condition to be true");
-      }
+        if (DEBUG && !condition) {
+            throw new AssertionError("Expected condition to be true");
+        }
     }
 
     @SuppressLint("WrongConstant")
     private void configureVendorSpecificProperty() {
         assertTrue(mDrm != null);
         if (mDrm == null) {
             return;
         }
@@ -667,21 +667,21 @@ public class GeckoMediaDrmBridgeV21 impl
             return false;
         } catch (android.media.NotProvisionedException e) {
             if (DEBUG) Log.d(LOGTAG, "ensureMediaCryptoCreated::Device not provisioned:" + e.getMessage());
             throw e;
         }
     }
 
     private UUID convertKeySystemToSchemeUUID(final String keySystem) {
-      if (WIDEVINE_KEY_SYSTEM.equals(keySystem)) {
-          return WIDEVINE_SCHEME_UUID;
-      }
-      if (DEBUG) Log.d(LOGTAG, "Cannot convert unsupported key system : " + keySystem);
-      return new UUID(0L, 0L);
+        if (WIDEVINE_KEY_SYSTEM.equals(keySystem)) {
+            return WIDEVINE_SCHEME_UUID;
+        }
+        if (DEBUG) Log.d(LOGTAG, "Cannot convert unsupported key system : " + keySystem);
+        return new UUID(0L, 0L);
     }
 
     private String getCDMUserAgent() {
         // This user agent is found and hard-coded in Android(L) source code and
         // Chromium project. Not sure if it's gonna change in the future.
         String ua = "Widevine CDM v1.0";
         return ua;
     }
--- a/mobile/android/geckoview/src/main/java/org/mozilla/gecko/media/JellyBeanAsyncCodec.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/gecko/media/JellyBeanAsyncCodec.java
@@ -68,29 +68,29 @@ final class JellyBeanAsyncCodec implemen
                         Log.d(LOGTAG, "handler " + this + " done cancellation, codec=" + JellyBeanAsyncCodec.this);
                     }
                     break;
                 default:
                     super.handleMessage(msg);
                     break;
             }
         }
-     }
+    }
 
     // A handler to invoke AsyncCodec.Callbacks methods.
     private final class CallbackSender extends CancelableHandler {
         private static final int MSG_INPUT_BUFFER_AVAILABLE = 1;
         private static final int MSG_OUTPUT_BUFFER_AVAILABLE = 2;
         private static final int MSG_OUTPUT_FORMAT_CHANGE = 3;
         private static final int MSG_ERROR = 4;
         private Callbacks mCallbacks;
 
         private CallbackSender(final Looper looper, final Callbacks callbacks) {
-          super(looper);
-          mCallbacks = callbacks;
+            super(looper);
+            mCallbacks = callbacks;
         }
 
         public void notifyInputBuffer(final int index) {
             if (isCanceled()) {
                 return;
             }
 
             Message msg = obtainMessage(MSG_INPUT_BUFFER_AVAILABLE);
--- a/mobile/android/geckoview/src/main/java/org/mozilla/gecko/media/MediaDrmProxy.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/gecko/media/MediaDrmProxy.java
@@ -95,18 +95,18 @@ public final class MediaDrmProxy {
         void onSessionUpdated(int promiseId, byte[] sessionId);
 
         void onSessionClosed(int promiseId, byte[] sessionId);
 
         void onSessionMessage(byte[] sessionId,
                               int sessionMessageType,
                               byte[] request);
 
-       void onSessionError(byte[] sessionId,
-                           String message);
+        void onSessionError(byte[] sessionId,
+                            String message);
 
         // MediaDrm.KeyStatus is available in API level 23(M)
         // https://developer.android.com/reference/android/media/MediaDrm.KeyStatus.html
         // For compatibility between L and M above, we'll unwrap the KeyStatus structure
         // and store the keyid and status into SessionKeyInfo and pass to native(MediaDrmCDMProxy).
         void onSessionBatchedKeyChanged(byte[] sessionId,
                                         SessionKeyInfo[] keyInfos);
 
--- a/mobile/android/geckoview/src/main/java/org/mozilla/gecko/media/Sample.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/gecko/media/Sample.java
@@ -264,11 +264,11 @@ public final class Sample implements Par
         StringBuilder str = new StringBuilder();
         str.append("{ buffer=").append(buffer).
                 append(", info=").
                 append("{ offset=").append(info.offset).
                 append(", size=").append(info.size).
                 append(", pts=").append(info.presentationTimeUs).
                 append(", flags=").append(Integer.toHexString(info.flags)).append(" }").
                 append(" }");
-            return str.toString();
+        return str.toString();
     }
 }
--- a/mobile/android/geckoview/src/main/java/org/mozilla/gecko/sqlite/SQLiteBridge.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/gecko/sqlite/SQLiteBridge.java
@@ -271,17 +271,17 @@ public class SQLiteBridge {
 
         prepareWAL(bridge);
 
         return bridge;
     }
 
     public void close() {
         if (isOpen()) {
-          closeDatabase(mDbPointer);
+            closeDatabase(mDbPointer);
         }
         mDbPointer = 0L;
     }
 
     public boolean isOpen() {
         return mDbPointer != 0;
     }
 
@@ -303,21 +303,21 @@ public class SQLiteBridge {
         mInTransaction = true;
     }
 
     public void endTransaction() {
         if (!inTransaction())
             return;
 
         try {
-          if (mTransactionSuccess) {
-              execSQL("COMMIT TRANSACTION");
-          } else {
-              execSQL("ROLLBACK TRANSACTION");
-          }
+            if (mTransactionSuccess) {
+                execSQL("COMMIT TRANSACTION");
+            } else {
+                execSQL("ROLLBACK TRANSACTION");
+            }
         } catch (SQLiteBridgeException ex) {
             Log.e(LOGTAG, "Error ending transaction", ex);
         }
         mInTransaction = false;
         mTransactionSuccess = false;
     }
 
     public void setTransactionSuccessful() throws SQLiteBridgeException {
--- a/mobile/android/geckoview/src/main/java/org/mozilla/gecko/util/BitmapUtils.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/gecko/util/BitmapUtils.java
@@ -163,80 +163,80 @@ public final class BitmapUtils {
         }
     }
 
     public static @ColorInt int getDominantColorCustomImplementation(final Bitmap source) {
         return getDominantColorCustomImplementation(source, true, Color.WHITE);
     }
 
     public static @ColorInt int getDominantColorCustomImplementation(
-        final Bitmap source, final boolean applyThreshold, final @ColorInt int defaultColor) {
-      if (source == null) {
-          return defaultColor;
-      }
+            final Bitmap source, final boolean applyThreshold, final @ColorInt int defaultColor) {
+        if (source == null) {
+            return defaultColor;
+        }
 
-      // Keep track of how many times a hue in a given bin appears in the image.
-      // Hue values range [0 .. 360), so dividing by 10, we get 36 bins.
-      int[] colorBins = new int[36];
+        // Keep track of how many times a hue in a given bin appears in the image.
+        // Hue values range [0 .. 360), so dividing by 10, we get 36 bins.
+        int[] colorBins = new int[36];
 
-      // The bin with the most colors. Initialize to -1 to prevent accidentally
-      // thinking the first bin holds the dominant color.
-      int maxBin = -1;
+        // The bin with the most colors. Initialize to -1 to prevent accidentally
+        // thinking the first bin holds the dominant color.
+        int maxBin = -1;
 
-      // Keep track of sum hue/saturation/value per hue bin, which we'll use to
-      // compute an average to for the dominant color.
-      float[] sumHue = new float[36];
-      float[] sumSat = new float[36];
-      float[] sumVal = new float[36];
-      float[] hsv = new float[3];
+        // Keep track of sum hue/saturation/value per hue bin, which we'll use to
+        // compute an average to for the dominant color.
+        float[] sumHue = new float[36];
+        float[] sumSat = new float[36];
+        float[] sumVal = new float[36];
+        float[] hsv = new float[3];
 
-      int height = source.getHeight();
-      int width = source.getWidth();
-      int[] pixels = new int[width * height];
-      source.getPixels(pixels, 0, width, 0, 0, width, height);
-      for (int row = 0; row < height; row++) {
-        for (int col = 0; col < width; col++) {
-          int c = pixels[col + row * width];
-          // Ignore pixels with a certain transparency.
-          if (Color.alpha(c) < 128)
-            continue;
+        int height = source.getHeight();
+        int width = source.getWidth();
+        int[] pixels = new int[width * height];
+        source.getPixels(pixels, 0, width, 0, 0, width, height);
+        for (int row = 0; row < height; row++) {
+            for (int col = 0; col < width; col++) {
+                int c = pixels[col + row * width];
+                // Ignore pixels with a certain transparency.
+                if (Color.alpha(c) < 128)
+                    continue;
 
-          Color.colorToHSV(c, hsv);
+                Color.colorToHSV(c, hsv);
 
-          // If a threshold is applied, ignore arbitrarily chosen values for "white" and "black".
-          if (applyThreshold && (hsv[1] <= 0.35f || hsv[2] <= 0.35f))
-            continue;
+                // If a threshold is applied, ignore arbitrarily chosen values for "white" and "black".
+                if (applyThreshold && (hsv[1] <= 0.35f || hsv[2] <= 0.35f))
+                    continue;
 
-          // We compute the dominant color by putting colors in bins based on their hue.
-          int bin = (int) Math.floor(hsv[0] / 10.0f);
+                // We compute the dominant color by putting colors in bins based on their hue.
+                int bin = (int) Math.floor(hsv[0] / 10.0f);
 
-          // Update the sum hue/saturation/value for this bin.
-          sumHue[bin] = sumHue[bin] + hsv[0];
-          sumSat[bin] = sumSat[bin] + hsv[1];
-          sumVal[bin] = sumVal[bin] + hsv[2];
+                // Update the sum hue/saturation/value for this bin.
+                sumHue[bin] = sumHue[bin] + hsv[0];
+                sumSat[bin] = sumSat[bin] + hsv[1];
+                sumVal[bin] = sumVal[bin] + hsv[2];
 
-          // Increment the number of colors in this bin.
-          colorBins[bin]++;
+                // Increment the number of colors in this bin.
+                colorBins[bin]++;
 
-          // Keep track of the bin that holds the most colors.
-          if (maxBin < 0 || colorBins[bin] > colorBins[maxBin])
-            maxBin = bin;
+                // Keep track of the bin that holds the most colors.
+                if (maxBin < 0 || colorBins[bin] > colorBins[maxBin])
+                    maxBin = bin;
+            }
         }
-      }
 
-      // maxBin may never get updated if the image holds only transparent and/or black/white pixels.
-      if (maxBin < 0) {
-          return defaultColor;
-      }
+        // maxBin may never get updated if the image holds only transparent and/or black/white pixels.
+        if (maxBin < 0) {
+            return defaultColor;
+        }
 
-      // Return a color with the average hue/saturation/value of the bin with the most colors.
-      hsv[0] = sumHue[maxBin] / colorBins[maxBin];
-      hsv[1] = sumSat[maxBin] / colorBins[maxBin];
-      hsv[2] = sumVal[maxBin] / colorBins[maxBin];
-      return Color.HSVToColor(hsv);
+        // Return a color with the average hue/saturation/value of the bin with the most colors.
+        hsv[0] = sumHue[maxBin] / colorBins[maxBin];
+        hsv[1] = sumSat[maxBin] / colorBins[maxBin];
+        hsv[2] = sumVal[maxBin] / colorBins[maxBin];
+        return Color.HSVToColor(hsv);
     }
 
     /**
      * Decodes a bitmap from a Base64 data URI.
      *
      * @param dataURI a Base64-encoded data URI string
      * @return        the decoded bitmap, or null if the data URI is invalid
      */
--- a/mobile/android/geckoview/src/main/java/org/mozilla/gecko/util/ContentUriUtils.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/gecko/util/ContentUriUtils.java
@@ -128,19 +128,19 @@ public class ContentUriUtils {
         final String fileName = FileUtils.getFileNameFromContentUri(context, contentUri);
         final File folder = new File(context.getCacheDir(), FileUtils.CONTENT_TEMP_DIRECTORY);
         boolean success = true;
         if (!folder.exists()) {
             success = folder.mkdirs();
         }
 
         if (!TextUtils.isEmpty(fileName) && success) {
-                File copyFile = new File(folder.getPath(), fileName);
-                FileUtils.copy(context, contentUri, copyFile);
-                return copyFile.getAbsolutePath();
+            File copyFile = new File(folder.getPath(), fileName);
+            FileUtils.copy(context, contentUri, copyFile);
+            return copyFile.getAbsolutePath();
         }
         return null;
     }
 
     /**
      * Get the value of the data column for this Uri. This is useful for
      * MediaStore Uris, and other file-based ContentProviders.
      *
@@ -150,17 +150,17 @@ public class ContentUriUtils {
      * @param selectionArgs (Optional) Selection arguments used in the query.
      * @return The value of the _data column, which is typically a file path.
      * @author paulburke
      */
     private static String getDataColumn(final Context context, final Uri uri,
                                         final String selection, final String[] selectionArgs) {
         final String column = "_data";
         final String[] projection = {
-                column
+            column
         };
 
         try (Cursor cursor = context.getContentResolver().query(uri, projection, selection, selectionArgs,
                 null)) {
             if (cursor != null && cursor.moveToFirst()) {
                 final int column_index = cursor.getColumnIndex(column);
                 return column_index >= 0 ? cursor.getString(column_index) : null;
             }
--- a/mobile/android/geckoview/src/main/java/org/mozilla/gecko/util/FileUtils.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/gecko/util/FileUtils.java
@@ -74,23 +74,23 @@ public class FileUtils {
         }
     }
 
     @RobocopTarget
     public static void delTree(final File dir, final FilenameFilter filter, final boolean recurse) {
         String[] files = null;
 
         if (filter != null) {
-          files = dir.list(filter);
+            files = dir.list(filter);
         } else {
-          files = dir.list();
+            files = dir.list();
         }
 
         if (files == null) {
-          return;
+            return;
         }
 
         for (String file : files) {
             File f = new File(dir, file);
             delete(f, recurse);
         }
     }
 
--- a/mobile/android/geckoview/src/main/java/org/mozilla/gecko/util/GeckoBundle.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/gecko/util/GeckoBundle.java
@@ -387,30 +387,30 @@ public final class GeckoBundle implement
         final Object[] ret = new Object[len];
         for (int i = 0; i < len; i++) {
             ret[i] = mMap.valueAt(i);
         }
         return ret;
     }
 
     private void put(final String key, final Object value) {
-      // We intentionally disallow a generic put() method for type safety and sanity. For
-      // example, we assume elsewhere in the code that a value belongs to a small list of
-      // predefined types, and cannot be any arbitrary object. If you want to put an
-      // Object in the bundle, check the type of the Object first and call the
-      // corresponding put methods. For example,
-      //
-      //   if (obj instanceof Integer) {
-      //     bundle.putInt(key, (Integer) key);
-      //   } else if (obj instanceof String) {
-      //     bundle.putString(key, (String) obj);
-      //   } else {
-      //     throw new IllegalArgumentException("unexpected type");
-      //   }
-      throw new UnsupportedOperationException();
+        // We intentionally disallow a generic put() method for type safety and sanity. For
+        // example, we assume elsewhere in the code that a value belongs to a small list of
+        // predefined types, and cannot be any arbitrary object. If you want to put an
+        // Object in the bundle, check the type of the Object first and call the
+        // corresponding put methods. For example,
+        //
+        //   if (obj instanceof Integer) {
+        //     bundle.putInt(key, (Integer) key);
+        //   } else if (obj instanceof String) {
+        //     bundle.putString(key, (String) obj);
+        //   } else {
+        //     throw new IllegalArgumentException("unexpected type");
+        //   }
+        throw new UnsupportedOperationException();
     }
 
     /**
      * Map a key to a boolean value.
      *
      * @param key Key to map.
      * @param value Value to map to.
      */
--- a/mobile/android/geckoview/src/main/java/org/mozilla/gecko/util/HardwareCodecCapabilityUtils.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/gecko/util/HardwareCodecCapabilityUtils.java
@@ -13,226 +13,227 @@ import android.media.MediaCodecInfo;
 import android.media.MediaCodecInfo.CodecCapabilities;
 import android.media.MediaCodecList;
 import android.os.Build;
 import android.util.Log;
 
 import java.util.Locale;
 
 public final class HardwareCodecCapabilityUtils {
-  private static final String LOGTAG = "GeckoHardwareCodecCapabilityUtils";
+    private static final String LOGTAG = "GeckoHardwareCodecCapabilityUtils";
 
-  // List of supported HW VP8 encoders.
-  private static final String[] supportedVp8HwEncCodecPrefixes =
-  {"OMX.qcom.", "OMX.Intel." };
-  // List of supported HW VP8 decoders.
-  private static final String[] supportedVp8HwDecCodecPrefixes =
-  {"OMX.qcom.", "OMX.Nvidia.", "OMX.Exynos.", "OMX.Intel." };
-  private static final String VP8_MIME_TYPE = "video/x-vnd.on2.vp8";
-  private static final String VP9_MIME_TYPE = "video/x-vnd.on2.vp9";
-  // NV12 color format supported by QCOM codec, but not declared in MediaCodec -
-  // see /hardware/qcom/media/mm-core/inc/OMX_QCOMExtns.h
-  private static final int
-    COLOR_QCOM_FORMATYUV420PackedSemiPlanar32m = 0x7FA30C04;
-  // Allowable color formats supported by codec - in order of preference.
-  private static final int[] supportedColorList = {
-    CodecCapabilities.COLOR_FormatYUV420Planar,
-    CodecCapabilities.COLOR_FormatYUV420SemiPlanar,
-    CodecCapabilities.COLOR_QCOM_FormatYUV420SemiPlanar,
-    COLOR_QCOM_FORMATYUV420PackedSemiPlanar32m
-  };
-  private static final String[] adaptivePlaybackBlacklist =
-  {
-    "GT-I9300",         // S3 (I9300 / I9300I)
-    "SCH-I535",         // S3
-    "SGH-T999",         // S3 (T-Mobile)
-    "SAMSUNG-SGH-T999", // S3 (T-Mobile)
-    "SGH-M919",         // S4
-    "GT-I9505",         // S4
-    "GT-I9515",         // S4
-    "SCH-R970",         // S4
-    "SGH-I337",         // S4
-    "SPH-L720",         // S4 (Sprint)
-    "SAMSUNG-SGH-I337", // S4
-    "GT-I9195",         // S4 Mini
-    "300E5EV/300E4EV/270E5EV/270E4EV/2470EV/2470EE",
-    "LG-D605"           // LG Optimus L9 II
-  };
+    // List of supported HW VP8 encoders.
+    private static final String[] supportedVp8HwEncCodecPrefixes = {
+        "OMX.qcom.", "OMX.Intel."
+    };
+    // List of supported HW VP8 decoders.
+    private static final String[] supportedVp8HwDecCodecPrefixes = {
+        "OMX.qcom.", "OMX.Nvidia.", "OMX.Exynos.", "OMX.Intel."
+    };
+    private static final String VP8_MIME_TYPE = "video/x-vnd.on2.vp8";
+    private static final String VP9_MIME_TYPE = "video/x-vnd.on2.vp9";
+    // NV12 color format supported by QCOM codec, but not declared in MediaCodec -
+    // see /hardware/qcom/media/mm-core/inc/OMX_QCOMExtns.h
+    private static final int
+            COLOR_QCOM_FORMATYUV420PackedSemiPlanar32m = 0x7FA30C04;
+    // Allowable color formats supported by codec - in order of preference.
+    private static final int[] supportedColorList = {
+        CodecCapabilities.COLOR_FormatYUV420Planar,
+        CodecCapabilities.COLOR_FormatYUV420SemiPlanar,
+        CodecCapabilities.COLOR_QCOM_FormatYUV420SemiPlanar,
+        COLOR_QCOM_FORMATYUV420PackedSemiPlanar32m
+    };
+    private static final String[] adaptivePlaybackBlacklist = {
+        "GT-I9300",         // S3 (I9300 / I9300I)
+        "SCH-I535",         // S3
+        "SGH-T999",         // S3 (T-Mobile)
+        "SAMSUNG-SGH-T999", // S3 (T-Mobile)
+        "SGH-M919",         // S4
+        "GT-I9505",         // S4
+        "GT-I9515",         // S4
+        "SCH-R970",         // S4
+        "SGH-I337",         // S4
+        "SPH-L720",         // S4 (Sprint)
+        "SAMSUNG-SGH-I337", // S4
+        "GT-I9195",         // S4 Mini
+        "300E5EV/300E4EV/270E5EV/270E4EV/2470EV/2470EE",
+        "LG-D605"           // LG Optimus L9 II
+    };
 
-  @WrapForJNI
-  public static boolean findDecoderCodecInfoForMimeType(final String aMimeType) {
-    int numCodecs = 0;
-    try {
-      numCodecs = MediaCodecList.getCodecCount();
-    } catch (final RuntimeException e) {
-      Log.e(LOGTAG, "Failed to retrieve media codec count", e);
-      return false;
+    @WrapForJNI
+    public static boolean findDecoderCodecInfoForMimeType(final String aMimeType) {
+        int numCodecs = 0;
+        try {
+            numCodecs = MediaCodecList.getCodecCount();
+        } catch (final RuntimeException e) {
+            Log.e(LOGTAG, "Failed to retrieve media codec count", e);
+            return false;
+        }
+
+        for (int i = 0; i < numCodecs; ++i) {
+            MediaCodecInfo info = MediaCodecList.getCodecInfoAt(i);
+            if (info.isEncoder()) {
+                continue;
+            }
+            for (String mimeType : info.getSupportedTypes()) {
+                if (mimeType.equals(aMimeType)) {
+                    return true;
+                }
+            }
+        }
+        return false;
     }
 
-    for (int i = 0; i < numCodecs; ++i) {
-      MediaCodecInfo info = MediaCodecList.getCodecInfoAt(i);
-      if (info.isEncoder()) {
-        continue;
-      }
-      for (String mimeType : info.getSupportedTypes()) {
-        if (mimeType.equals(aMimeType)) {
-          return true;
+    @WrapForJNI
+    public static boolean checkSupportsAdaptivePlayback(final MediaCodec aCodec,
+                                                        final String aMimeType) {
+        // isFeatureSupported supported on API level >= 19.
+        if (Build.VERSION.SDK_INT < Build.VERSION_CODES.KITKAT ||
+                isAdaptivePlaybackBlacklisted(aMimeType)) {
+            return false;
         }
-      }
-    }
-    return false;
-  }
 
-  @WrapForJNI
-  public static boolean checkSupportsAdaptivePlayback(final MediaCodec aCodec,
-                                                      final String aMimeType) {
-    // isFeatureSupported supported on API level >= 19.
-    if (Build.VERSION.SDK_INT < Build.VERSION_CODES.KITKAT ||
-        isAdaptivePlaybackBlacklisted(aMimeType)) {
-      return false;
+        try {
+            MediaCodecInfo info = aCodec.getCodecInfo();
+            MediaCodecInfo.CodecCapabilities capabilities = info.getCapabilitiesForType(aMimeType);
+            return capabilities != null &&
+                    capabilities.isFeatureSupported(
+                            MediaCodecInfo.CodecCapabilities.FEATURE_AdaptivePlayback);
+        } catch (IllegalArgumentException e) {
+            Log.e(LOGTAG, "Retrieve codec information failed", e);
+        }
+        return false;
     }
 
-    try {
-      MediaCodecInfo info = aCodec.getCodecInfo();
-      MediaCodecInfo.CodecCapabilities capabilities = info.getCapabilitiesForType(aMimeType);
-      return capabilities != null &&
-             capabilities.isFeatureSupported(
-               MediaCodecInfo.CodecCapabilities.FEATURE_AdaptivePlayback);
-    } catch (IllegalArgumentException e) {
-      Log.e(LOGTAG, "Retrieve codec information failed", e);
-    }
-    return false;
-  }
+    // See Bug1360626 and
+    // https://codereview.chromium.org/1869103002 for details.
+    private static boolean isAdaptivePlaybackBlacklisted(final String aMimeType) {
+        Log.d(LOGTAG, "The device ModelID is " + Build.MODEL);
+        if (!aMimeType.equals("video/avc") && !aMimeType.equals("video/avc1")) {
+            return false;
+        }
 
-  // See Bug1360626 and
-  // https://codereview.chromium.org/1869103002 for details.
-  private static boolean isAdaptivePlaybackBlacklisted(final String aMimeType) {
-    Log.d(LOGTAG, "The device ModelID is " + Build.MODEL);
-    if (!aMimeType.equals("video/avc") && !aMimeType.equals("video/avc1")) {
-      return false;
-    }
+        if (!Build.MANUFACTURER.toLowerCase(Locale.getDefault()).equals("samsung")) {
+            return false;
+        }
 
-    if (!Build.MANUFACTURER.toLowerCase(Locale.getDefault()).equals("samsung")) {
-      return false;
+        for (String model : adaptivePlaybackBlacklist) {
+            if (Build.MODEL.startsWith(model)) {
+                return true;
+            }
+        }
+        return false;
     }
 
-    for (String model : adaptivePlaybackBlacklist) {
-      if (Build.MODEL.startsWith(model)) {
-        return true;
-      }
-    }
-    return false;
-  }
-
-  public static boolean getHWEncoderCapability() {
-    if (Build.VERSION.SDK_INT >= 20) {
-      for (int i = 0; i < MediaCodecList.getCodecCount(); ++i) {
-        MediaCodecInfo info = MediaCodecList.getCodecInfoAt(i);
-        if (!info.isEncoder()) {
-          continue;
-        }
-        String name = null;
-        for (String mimeType : info.getSupportedTypes()) {
-          if (mimeType.equals(VP8_MIME_TYPE)) {
-            name = info.getName();
-            break;
-          }
-        }
-        if (name == null) {
-          continue;  // No HW support in this codec; try the next one.
-        }
-        Log.e(LOGTAG, "Found candidate encoder " + name);
+    public static boolean getHWEncoderCapability() {
+        if (Build.VERSION.SDK_INT >= 20) {
+            for (int i = 0; i < MediaCodecList.getCodecCount(); ++i) {
+                MediaCodecInfo info = MediaCodecList.getCodecInfoAt(i);
+                if (!info.isEncoder()) {
+                    continue;
+                }
+                String name = null;
+                for (String mimeType : info.getSupportedTypes()) {
+                    if (mimeType.equals(VP8_MIME_TYPE)) {
+                        name = info.getName();
+                        break;
+                    }
+                }
+                if (name == null) {
+                    continue;  // No HW support in this codec; try the next one.
+                }
+                Log.e(LOGTAG, "Found candidate encoder " + name);
 
-        // Check if this is supported encoder.
-        boolean supportedCodec = false;
-        for (String codecPrefix : supportedVp8HwEncCodecPrefixes) {
-          if (name.startsWith(codecPrefix)) {
-            supportedCodec = true;
-            break;
-          }
-        }
-        if (!supportedCodec) {
-          continue;
-        }
+                // Check if this is supported encoder.
+                boolean supportedCodec = false;
+                for (String codecPrefix : supportedVp8HwEncCodecPrefixes) {
+                    if (name.startsWith(codecPrefix)) {
+                        supportedCodec = true;
+                        break;
+                    }
+                }
+                if (!supportedCodec) {
+                    continue;
+                }
 
-        // Check if codec supports either yuv420 or nv12.
-        CodecCapabilities capabilities =
-          info.getCapabilitiesForType(VP8_MIME_TYPE);
-        for (int colorFormat : capabilities.colorFormats) {
-          Log.v(LOGTAG, "   Color: 0x" + Integer.toHexString(colorFormat));
+                // Check if codec supports either yuv420 or nv12.
+                CodecCapabilities capabilities =
+                        info.getCapabilitiesForType(VP8_MIME_TYPE);
+                for (int colorFormat : capabilities.colorFormats) {
+                    Log.v(LOGTAG, "   Color: 0x" + Integer.toHexString(colorFormat));
+                }
+                for (int supportedColorFormat : supportedColorList) {
+                    for (int codecColorFormat : capabilities.colorFormats) {
+                        if (codecColorFormat == supportedColorFormat) {
+                            // Found supported HW Encoder.
+                            Log.e(LOGTAG, "Found target encoder " + name +
+                                    ". Color: 0x" + Integer.toHexString(codecColorFormat));
+                            return true;
+                        }
+                    }
+                }
+            }
         }
-        for (int supportedColorFormat : supportedColorList) {
-          for (int codecColorFormat : capabilities.colorFormats) {
-            if (codecColorFormat == supportedColorFormat) {
-              // Found supported HW Encoder.
-              Log.e(LOGTAG, "Found target encoder " + name +
-                  ". Color: 0x" + Integer.toHexString(codecColorFormat));
-              return true;
-            }
-          }
-        }
-      }
+        // No HW encoder.
+        return false;
     }
-    // No HW encoder.
-    return false;
-  }
+
+    public static boolean getHWDecoderCapability() {
+        return getHWDecoderCapability(VP8_MIME_TYPE);
+    }
 
-  public static boolean getHWDecoderCapability() {
-    return getHWDecoderCapability(VP8_MIME_TYPE);
-  }
-
-  @WrapForJNI
-  public static boolean HasHWVP9() {
-    return getHWDecoderCapability(VP9_MIME_TYPE);
-  }
+    @WrapForJNI
+    public static boolean HasHWVP9() {
+        return getHWDecoderCapability(VP9_MIME_TYPE);
+    }
 
-  public static boolean getHWDecoderCapability(final String aMimeType) {
-    if (Build.VERSION.SDK_INT >= 20) {
-      for (int i = 0; i < MediaCodecList.getCodecCount(); ++i) {
-        MediaCodecInfo info = MediaCodecList.getCodecInfoAt(i);
-        if (info.isEncoder()) {
-          continue;
-        }
-        String name = null;
-        for (String mimeType : info.getSupportedTypes()) {
-          if (mimeType.equals(aMimeType)) {
-            name = info.getName();
-            break;
-          }
-        }
-        if (name == null) {
-          continue;  // No HW support in this codec; try the next one.
-        }
-        Log.e(LOGTAG, "Found candidate decoder " + name);
+    public static boolean getHWDecoderCapability(final String aMimeType) {
+        if (Build.VERSION.SDK_INT >= 20) {
+            for (int i = 0; i < MediaCodecList.getCodecCount(); ++i) {
+                MediaCodecInfo info = MediaCodecList.getCodecInfoAt(i);
+                if (info.isEncoder()) {
+                    continue;
+                }
+                String name = null;
+                for (String mimeType : info.getSupportedTypes()) {
+                    if (mimeType.equals(aMimeType)) {
+                        name = info.getName();
+                        break;
+                    }
+                }
+                if (name == null) {
+                    continue;  // No HW support in this codec; try the next one.
+                }
+                Log.e(LOGTAG, "Found candidate decoder " + name);
 
-        // Check if this is supported decoder.
-        boolean supportedCodec = false;
-        for (String codecPrefix : supportedVp8HwDecCodecPrefixes) {
-          if (name.startsWith(codecPrefix)) {
-            supportedCodec = true;
-            break;
-          }
-        }
-        if (!supportedCodec) {
-          continue;
-        }
+                // Check if this is supported decoder.
+                boolean supportedCodec = false;
+                for (String codecPrefix : supportedVp8HwDecCodecPrefixes) {
+                    if (name.startsWith(codecPrefix)) {
+                        supportedCodec = true;
+                        break;
+                    }
+                }
+                if (!supportedCodec) {
+                    continue;
+                }
 
-        // Check if codec supports either yuv420 or nv12.
-        CodecCapabilities capabilities =
-          info.getCapabilitiesForType(aMimeType);
-        for (int colorFormat : capabilities.colorFormats) {
-          Log.v(LOGTAG, "   Color: 0x" + Integer.toHexString(colorFormat));
+                // Check if codec supports either yuv420 or nv12.
+                CodecCapabilities capabilities =
+                        info.getCapabilitiesForType(aMimeType);
+                for (int colorFormat : capabilities.colorFormats) {
+                    Log.v(LOGTAG, "   Color: 0x" + Integer.toHexString(colorFormat));
+                }
+                for (int supportedColorFormat : supportedColorList) {
+                    for (int codecColorFormat : capabilities.colorFormats) {
+                        if (codecColorFormat == supportedColorFormat) {
+                            // Found supported HW decoder.
+                            Log.e(LOGTAG, "Found target decoder " + name +
+                                    ". Color: 0x" + Integer.toHexString(codecColorFormat));
+                            return true;
+                        }
+                    }
+                }
+            }
         }
-        for (int supportedColorFormat : supportedColorList) {
-          for (int codecColorFormat : capabilities.colorFormats) {
-            if (codecColorFormat == supportedColorFormat) {
-              // Found supported HW decoder.
-              Log.e(LOGTAG, "Found target decoder " + name +
-                  ". Color: 0x" + Integer.toHexString(codecColorFormat));
-              return true;
-            }
-          }
-        }
-      }
+        return false;  // No HW decoder.
     }
-    return false;  // No HW decoder.
-  }
 }
--- a/mobile/android/geckoview/src/main/java/org/mozilla/gecko/util/INISection.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/gecko/util/INISection.java
@@ -57,17 +57,17 @@ public class INISection {
 
         return Integer.parseInt(val.toString());
     }
 
     // get a global property out of the hash table. will return null if the property doesn't exist
     public String getStringProperty(final String key) {
         Object val = getProperty(key);
         if (val == null)
-          return null;
+            return null;
 
         return val.toString();
     }
 
     // get a hashtable of all the global properties in this file
     public Hashtable<String, Object> getProperties() {
         if (mProperties == null) {
             try {
--- a/mobile/android/geckoview/src/main/java/org/mozilla/gecko/util/ProxySelector.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/gecko/util/ProxySelector.java
@@ -133,24 +133,24 @@ public class ProxySelector {
             return false;
         }
 
         // construct pattern
         StringBuilder patternBuilder = new StringBuilder();
         for (int i = 0; i < nonProxyHosts.length(); i++) {
             char c = nonProxyHosts.charAt(i);
             switch (c) {
-            case '.':
-                patternBuilder.append("\\.");
-                break;
-            case '*':
-                patternBuilder.append(".*");
-                break;
-            default:
-                patternBuilder.append(c);
+                case '.':
+                    patternBuilder.append("\\.");
+                    break;
+                case '*':
+                    patternBuilder.append(".*");
+                    break;
+                default:
+                    patternBuilder.append(c);
             }
         }
         // check whether the host is the nonProxyHosts.
         String pattern = patternBuilder.toString();
         return host.matches(pattern);
     }
 }
 
--- a/mobile/android/geckoview/src/main/java/org/mozilla/gecko/util/ThreadUtils.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/gecko/util/ThreadUtils.java
@@ -180,20 +180,20 @@ public final class ThreadUtils {
         } else {
             message = "Expected anything but " + expectedThreadId +
                       " (\"" + expectedThread.getName() + "\"), but running there.";
         }
 
         final IllegalThreadStateException e = new IllegalThreadStateException(message);
 
         switch (behavior) {
-        case THROW:
-            throw e;
-        default:
-            Log.e(LOGTAG, "Method called on wrong thread!", e);
+            case THROW:
+                throw e;
+            default:
+                Log.e(LOGTAG, "Method called on wrong thread!", e);
         }
     }
 
     public static boolean isOnGeckoThread() {
         if (sGeckoThread != null) {
             return isOnThread(sGeckoThread);
         }
         return false;
--- a/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoEditable.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoEditable.java
@@ -539,70 +539,70 @@ import android.view.inputmethod.EditorIn
             Log.e(LOGTAG, "Remote call failed", e);
             // Undo the offer.
             mActions.remove(action);
         }
     }
 
     private void icPerformAction(final Action action) throws RemoteException {
         switch (action.mType) {
-        case Action.TYPE_EVENT:
-        case Action.TYPE_SET_HANDLER:
-            mFocusedChild.onImeSynchronize();
-            break;
+            case Action.TYPE_EVENT:
+            case Action.TYPE_SET_HANDLER:
+                mFocusedChild.onImeSynchronize();
+                break;
 
-        case Action.TYPE_SET_SPAN: {
-            final boolean needUpdate = (action.mSpanFlags & Spanned.SPAN_INTERMEDIATE) == 0 &&
-                                       ((action.mSpanFlags & Spanned.SPAN_COMPOSING) != 0 ||
-                                        action.mSpanObject == Selection.SELECTION_START ||
-                                        action.mSpanObject == Selection.SELECTION_END);
+            case Action.TYPE_SET_SPAN: {
+                final boolean needUpdate = (action.mSpanFlags & Spanned.SPAN_INTERMEDIATE) == 0 &&
+                        ((action.mSpanFlags & Spanned.SPAN_COMPOSING) != 0 ||
+                                action.mSpanObject == Selection.SELECTION_START ||
+                                action.mSpanObject == Selection.SELECTION_END);
 
-            action.mSequence = TextUtils.substring(
-                    mText.getShadowText(), action.mStart, action.mEnd);
+                action.mSequence = TextUtils.substring(
+                        mText.getShadowText(), action.mStart, action.mEnd);
 
-            mNeedUpdateComposition |= needUpdate;
-            if (needUpdate) {
-                icMaybeSendComposition(mText.getShadowText(), SEND_COMPOSITION_NOTIFY_GECKO |
-                                                              SEND_COMPOSITION_KEEP_CURRENT);
+                mNeedUpdateComposition |= needUpdate;
+                if (needUpdate) {
+                    icMaybeSendComposition(mText.getShadowText(), SEND_COMPOSITION_NOTIFY_GECKO |
+                            SEND_COMPOSITION_KEEP_CURRENT);
+                }
+
+                mFocusedChild.onImeSynchronize();
+                break;
             }
-
-            mFocusedChild.onImeSynchronize();
-            break;
-        }
-        case Action.TYPE_REMOVE_SPAN: {
-            final boolean needUpdate = (action.mSpanFlags & Spanned.SPAN_INTERMEDIATE) == 0 &&
-                                       (action.mSpanFlags & Spanned.SPAN_COMPOSING) != 0;
+            case Action.TYPE_REMOVE_SPAN: {
+                final boolean needUpdate = (action.mSpanFlags & Spanned.SPAN_INTERMEDIATE) == 0 &&
+                        (action.mSpanFlags & Spanned.SPAN_COMPOSING) != 0;
 
-            mNeedUpdateComposition |= needUpdate;
-            if (needUpdate) {
-                icMaybeSendComposition(mText.getShadowText(), SEND_COMPOSITION_NOTIFY_GECKO |
-                                                              SEND_COMPOSITION_KEEP_CURRENT);
-            }
+                mNeedUpdateComposition |= needUpdate;
+                if (needUpdate) {
+                    icMaybeSendComposition(mText.getShadowText(), SEND_COMPOSITION_NOTIFY_GECKO |
+                            SEND_COMPOSITION_KEEP_CURRENT);
+                }
 
-            mFocusedChild.onImeSynchronize();
-            break;
-        }
-        case Action.TYPE_REPLACE_TEXT:
-            // Always sync text after a replace action, so that if the Gecko
-            // text is not changed, we will revert the shadow text to before.
-            mNeedSync = true;
+                mFocusedChild.onImeSynchronize();
+                break;
+            }
+            case Action.TYPE_REPLACE_TEXT:
+                // Always sync text after a replace action, so that if the Gecko
+                // text is not changed, we will revert the shadow text to before.
+                mNeedSync = true;
 
-            // Because we get composition styling here essentially for free,
-            // we don't need to check if we're in batch mode.
-            if (!icMaybeSendComposition(
-                    action.mSequence, SEND_COMPOSITION_USE_ENTIRE_TEXT)) {
-                // Since we don't have a composition, we can try sending key events.
-                sendCharKeyEvents(action);
-            }
-            mFocusedChild.onImeReplaceText(
-                    action.mStart, action.mEnd, action.mSequence.toString());
-            break;
+                // Because we get composition styling here essentially for free,
+                // we don't need to check if we're in batch mode.
+                if (!icMaybeSendComposition(
+                        action.mSequence, SEND_COMPOSITION_USE_ENTIRE_TEXT)) {
+                    // Since we don't have a composition, we can try sending key events.
+                    sendCharKeyEvents(action);
+                }
+                mFocusedChild.onImeReplaceText(
+                        action.mStart, action.mEnd, action.mSequence.toString());
+                break;
 
-        default:
-            throw new IllegalStateException("Action not processed");
+            default:
+                throw new IllegalStateException("Action not processed");
         }
     }
 
     private KeyEvent [] synthesizeKeyEvents(final CharSequence cs) {
         try {
             if (mKeyMap == null) {
                 mKeyMap = KeyCharacterMap.load(KeyCharacterMap.VIRTUAL_KEYBOARD);
             }
@@ -1132,89 +1132,89 @@ import android.view.inputmethod.EditorIn
             Log.w(LOGTAG, "Mismatched reply");
             return;
         }
         if (DEBUG) {
             Log.d(LOGTAG, "reply: Action(" +
                           getConstantName(Action.class, "TYPE_", action.mType) + ")");
         }
         switch (action.mType) {
-        case Action.TYPE_REPLACE_TEXT: {
-            final Spanned currentText = mText.getCurrentText();
-            final int actionNewEnd = action.mStart + action.mSequence.length();
-            if (mLastTextChangeStart > mLastTextChangeNewEnd ||
-                mLastTextChangeNewEnd > currentText.length() ||
-                action.mStart < mLastTextChangeStart || actionNewEnd > mLastTextChangeNewEnd) {
-                // Replace-text action doesn't match our text change.
-                break;
-            }
+            case Action.TYPE_REPLACE_TEXT: {
+                final Spanned currentText = mText.getCurrentText();
+                final int actionNewEnd = action.mStart + action.mSequence.length();
+                if (mLastTextChangeStart > mLastTextChangeNewEnd ||
+                        mLastTextChangeNewEnd > currentText.length() ||
+                        action.mStart < mLastTextChangeStart || actionNewEnd > mLastTextChangeNewEnd) {
+                    // Replace-text action doesn't match our text change.
+                    break;
+                }
 
-            int indexInText = TextUtils.indexOf(currentText, action.mSequence,
-                                                action.mStart, mLastTextChangeNewEnd);
-            if (indexInText < 0 && action.mStart != mLastTextChangeStart) {
-                final String changedText = TextUtils.substring(
-                        currentText, mLastTextChangeStart, actionNewEnd);
-                indexInText = changedText.lastIndexOf(action.mSequence.toString());
-                if (indexInText >= 0) {
-                    indexInText += mLastTextChangeStart;
+                int indexInText = TextUtils.indexOf(currentText, action.mSequence,
+                        action.mStart, mLastTextChangeNewEnd);
+                if (indexInText < 0 && action.mStart != mLastTextChangeStart) {
+                    final String changedText = TextUtils.substring(
+                            currentText, mLastTextChangeStart, actionNewEnd);
+                    indexInText = changedText.lastIndexOf(action.mSequence.toString());
+                    if (indexInText >= 0) {
+                        indexInText += mLastTextChangeStart;
+                    }
+                }
+                if (indexInText < 0) {
+                    // Replace-text action doesn't match our current text.
+                    break;
                 }
-            }
-            if (indexInText < 0) {
-                // Replace-text action doesn't match our current text.
+
+                final int selStart = Selection.getSelectionStart(currentText);
+                final int selEnd = Selection.getSelectionEnd(currentText);
+
+                // Replace-text action matches our current text; copy the new spans to the
+                // current text.
+                mText.currentReplace(indexInText,
+                        indexInText + action.mSequence.length(),
+                        action.mSequence);
+                // Make sure selection is preserved.
+                mText.currentSetSelection(selStart, selEnd);
+
+                // The text change is caused by the replace-text event. If the text change
+                // replaced the previous selection, we need to rely on Gecko for an updated
+                // selection, so don't ignore selection change. However, if the text change
+                // did not replace the previous selection, we can ignore the Gecko selection
+                // in favor of the Java selection.
+                mIgnoreSelectionChange = !mLastTextChangeReplacedSelection;
                 break;
             }
 
-            final int selStart = Selection.getSelectionStart(currentText);
-            final int selEnd = Selection.getSelectionEnd(currentText);
-
-            // Replace-text action matches our current text; copy the new spans to the
-            // current text.
-            mText.currentReplace(indexInText,
-                                 indexInText + action.mSequence.length(),
-                                 action.mSequence);
-            // Make sure selection is preserved.
-            mText.currentSetSelection(selStart, selEnd);
-
-            // The text change is caused by the replace-text event. If the text change
-            // replaced the previous selection, we need to rely on Gecko for an updated
-            // selection, so don't ignore selection change. However, if the text change
-            // did not replace the previous selection, we can ignore the Gecko selection
-            // in favor of the Java selection.
-            mIgnoreSelectionChange = !mLastTextChangeReplacedSelection;
-            break;
-        }
+            case Action.TYPE_SET_SPAN:
+                final int len = mText.getCurrentText().length();
+                if (action.mStart > len || action.mEnd > len ||
+                        !TextUtils.substring(mText.getCurrentText(), action.mStart,
+                                action.mEnd).equals(action.mSequence)) {
+                    if (DEBUG) {
+                        Log.d(LOGTAG, "discarding stale set span call");
+                    }
+                    break;
+                }
+                if ((action.mSpanObject == Selection.SELECTION_START ||
+                        action.mSpanObject == Selection.SELECTION_END) &&
+                        (action.mStart < mLastTextChangeStart && action.mEnd < mLastTextChangeStart ||
+                                action.mStart > mLastTextChangeOldEnd && action.mEnd > mLastTextChangeOldEnd)) {
+                    // Use the Java selection if, between text-change notification and replace-text
+                    // processing, we specifically set the selection to outside the replaced range.
+                    mLastTextChangeReplacedSelection = false;
+                }
+                mText.currentSetSpan(action.mSpanObject, action.mStart, action.mEnd, action.mSpanFlags);
+                break;
 
-        case Action.TYPE_SET_SPAN:
-            final int len = mText.getCurrentText().length();
-            if (action.mStart > len || action.mEnd > len ||
-                    !TextUtils.substring(mText.getCurrentText(), action.mStart,
-                                         action.mEnd).equals(action.mSequence)) {
-                if (DEBUG) {
-                    Log.d(LOGTAG, "discarding stale set span call");
-                }
+            case Action.TYPE_REMOVE_SPAN:
+                mText.currentRemoveSpan(action.mSpanObject);
                 break;
-            }
-            if ((action.mSpanObject == Selection.SELECTION_START ||
-                 action.mSpanObject == Selection.SELECTION_END) &&
-                (action.mStart < mLastTextChangeStart && action.mEnd < mLastTextChangeStart ||
-                 action.mStart > mLastTextChangeOldEnd && action.mEnd > mLastTextChangeOldEnd)) {
-                // Use the Java selection if, between text-change notification and replace-text
-                // processing, we specifically set the selection to outside the replaced range.
-                mLastTextChangeReplacedSelection = false;
-            }
-            mText.currentSetSpan(action.mSpanObject, action.mStart, action.mEnd, action.mSpanFlags);
-            break;
 
-        case Action.TYPE_REMOVE_SPAN:
-            mText.currentRemoveSpan(action.mSpanObject);
-            break;
-
-        case Action.TYPE_SET_HANDLER:
-            geckoSetIcHandler(action.mHandler);
-            break;
+            case Action.TYPE_SET_HANDLER:
+                geckoSetIcHandler(action.mHandler);
+                break;
         }
     }
 
     private synchronized boolean binderCheckToken(final IBinder token,
                                                   final boolean allowNull) {
         // Verify that we're getting an IME notification from the currently focused child.
         if (mFocusedToken == token || (mFocusedToken == null && allowNull)) {
             return true;
@@ -1825,22 +1825,22 @@ import android.view.inputmethod.EditorIn
         } else if (Proxy.isProxyClass(obj.getClass())) {
             debugAppend(sb, Proxy.getInvocationHandler(obj));
         } else if (obj instanceof Character) {
             sb.append('\'').append(getPrintableChar((Character) obj)).append('\'');
         } else if (obj instanceof CharSequence) {
             final String str = obj.toString();
             sb.append('"');
             for (int i = 0; i < str.length(); i++) {
-              final char chr = str.charAt(i);
-              if (chr >= 0x20 && chr <= 0x7e) {
-                sb.append(chr);
-              } else {
-                sb.append(getPrintableChar(chr));
-              }
+                final char chr = str.charAt(i);
+                if (chr >= 0x20 && chr <= 0x7e) {
+                    sb.append(chr);
+                } else {
+                    sb.append(getPrintableChar(chr));
+                }
             }
             sb.append('"');
         } else if (obj.getClass().isArray()) {
             sb.append(obj.getClass().getComponentType().getSimpleName()).append('[')
               .append(Array.getLength(obj)).append(']');
         } else {
             sb.append(obj);
         }
--- a/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoInputConnection.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoInputConnection.java
@@ -128,19 +128,19 @@ import java.lang.reflect.Proxy;
                 Log.d(LOGTAG, log.toString());
                 return ret;
             }
         };
 
         return (SessionTextInput.InputConnectionClient) Proxy.newProxyInstance(
                 GeckoInputConnection.class.getClassLoader(),
                 new Class<?>[] {
-                        InputConnection.class,
-                        SessionTextInput.InputConnectionClient.class,
-                        SessionTextInput.EditableListener.class
+                    InputConnection.class,
+                    SessionTextInput.InputConnectionClient.class,
+                    SessionTextInput.EditableListener.class
                 }, handler);
     }
 
     protected GeckoInputConnection(final GeckoSession session,
                                    final View targetView,
                                    final SessionTextInput.EditableClient editable) {
         super(targetView, true);
         mSession = session;
--- a/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoRuntime.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoRuntime.java
@@ -289,23 +289,22 @@ public final class GeckoRuntime implemen
      * @param webExtension {@link WebExtension} to register
      *
      * @return A {@link GeckoResult} that will complete when the WebExtension
      * has been installed.
      */
     @UiThread
     public @NonNull GeckoResult<Void> registerWebExtension(
             final @NonNull WebExtension webExtension) {
-        final GeckoSession.CallbackResult<Void> result =
-                new GeckoSession.CallbackResult<Void>() {
-                    @Override
-                    public void sendSuccess(final Object response) {
-                        complete(null);
-                    }
-                };
+        final GeckoSession.CallbackResult<Void> result = new GeckoSession.CallbackResult<Void>() {
+            @Override
+            public void sendSuccess(final Object response) {
+                complete(null);
+            }
+        };
 
         final GeckoBundle bundle = new GeckoBundle(1);
         bundle.putString("locationUri", webExtension.location.toString());
         bundle.putString("id", webExtension.id);
 
         EventDispatcher.getInstance().dispatch("GeckoView:RegisterWebExtension",
                 bundle, result);
 
@@ -460,18 +459,18 @@ public final class GeckoRuntime implemen
     }
 
     // AIDL code may call readFromParcel even though it's not part of Parcelable.
     @AnyThread
     public void readFromParcel(final @NonNull Parcel source) {
         mSettings = source.readParcelable(getClass().getClassLoader());
     }
 
-    public static final Parcelable.Creator<GeckoRuntime> CREATOR
-        = new Parcelable.Creator<GeckoRuntime>() {
+    public static final Parcelable.Creator<GeckoRuntime> CREATOR =
+            new Parcelable.Creator<GeckoRuntime>() {
         @Override
         @AnyThread
         public GeckoRuntime createFromParcel(final Parcel in) {
             final GeckoRuntime runtime = new GeckoRuntime();
             runtime.readFromParcel(in);
             return runtime;
         }
 
--- a/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoRuntimeSettings.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoRuntimeSettings.java
@@ -801,22 +801,22 @@ public final class GeckoRuntimeSettings 
             } catch (ClassNotFoundException e) {
             }
         }
 
         mRequestedLocales = source.createStringArray();
     }
 
     public static final Parcelable.Creator<GeckoRuntimeSettings> CREATOR
-        = new Parcelable.Creator<GeckoRuntimeSettings>() {
-        @Override
-        public GeckoRuntimeSettings createFromParcel(final Parcel in) {
-            final GeckoRuntimeSettings settings = new GeckoRuntimeSettings();
-            settings.readFromParcel(in);
-            return settings;
-        }
+            = new Parcelable.Creator<GeckoRuntimeSettings>() {
+                @Override
+                public GeckoRuntimeSettings createFromParcel(final Parcel in) {
+                    final GeckoRuntimeSettings settings = new GeckoRuntimeSettings();
+                    settings.readFromParcel(in);
+                    return settings;
+                }
 
-        @Override
-        public GeckoRuntimeSettings[] newArray(final int size) {
-            return new GeckoRuntimeSettings[size];
-        }
-    };
+                @Override
+                public GeckoRuntimeSettings[] newArray(final int size) {
+                    return new GeckoRuntimeSettings[size];
+                }
+            };
 }
--- a/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoSession.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoSession.java
@@ -742,81 +742,81 @@ public class GeckoSession implements Par
     private LongSparseArray<MediaElement> mMediaElements = new LongSparseArray<>();
     /* package */ LongSparseArray<MediaElement> getMediaElements() {
         return mMediaElements;
     }
     private final GeckoSessionHandler<MediaDelegate> mMediaHandler =
             new GeckoSessionHandler<MediaDelegate>(
                     "GeckoViewMedia", this,
                     new String[]{
-                            "GeckoView:MediaAdd",
-                            "GeckoView:MediaRemove",
-                            "GeckoView:MediaRemoveAll",
-                            "GeckoView:MediaReadyStateChanged",
-                            "GeckoView:MediaTimeChanged",
-                            "GeckoView:MediaPlaybackStateChanged",
-                            "GeckoView:MediaMetadataChanged",
-                            "GeckoView:MediaProgress",
-                            "GeckoView:MediaVolumeChanged",
-                            "GeckoView:MediaRateChanged",
-                            "GeckoView:MediaFullscreenChanged",
-                            "GeckoView:MediaError",
+                        "GeckoView:MediaAdd",
+                        "GeckoView:MediaRemove",
+                        "GeckoView:MediaRemoveAll",
+                        "GeckoView:MediaReadyStateChanged",
+                        "GeckoView:MediaTimeChanged",
+                        "GeckoView:MediaPlaybackStateChanged",
+                        "GeckoView:MediaMetadataChanged",
+                        "GeckoView:MediaProgress",
+                        "GeckoView:MediaVolumeChanged",
+                        "GeckoView:MediaRateChanged",
+                        "GeckoView:MediaFullscreenChanged",
+                        "GeckoView:MediaError",
                     }
             ) {
-                @Override
-                public void handleMessage(final MediaDelegate delegate,
-                                          final String event,
-                                          final GeckoBundle message,
-                                          final EventCallback callback) {
-                    if ("GeckoView:MediaAdd".equals(event)) {
-                        final MediaElement element = new MediaElement(message.getLong("id"), GeckoSession.this);
-                        delegate.onMediaAdd(GeckoSession.this, element);
-                        return;
-                    } else if ("GeckoView:MediaRemoveAll".equals(event)) {
-                        for (int i = 0; i < mMediaElements.size(); i++) {
-                            final long key = mMediaElements.keyAt(i);
-                            delegate.onMediaRemove(GeckoSession.this, mMediaElements.get(key));
-                        }
-                        mMediaElements.clear();
-                        return;
-                    }
-
-                    final long id = message.getLong("id", 0);
-                    final MediaElement element = mMediaElements.get(id);
-                    if (element == null) {
-                        Log.w(LOGTAG, "MediaElement not found for '" + id + "'");
-                        return;
-                    }
-
-                    if ("GeckoView:MediaTimeChanged".equals(event)) {
-                        element.notifyTimeChange(message.getDouble("time"));
-                    } else if ("GeckoView:MediaProgress".equals(event)) {
-                        element.notifyLoadProgress(message);
-                    } else if ("GeckoView:MediaMetadataChanged".equals(event)) {
-                        element.notifyMetadataChange(message);
-                    } else if ("GeckoView:MediaReadyStateChanged".equals(event)) {
-                        element.notifyReadyStateChange(message.getInt("readyState"));
-                    } else if ("GeckoView:MediaPlaybackStateChanged".equals(event)) {
-                        element.notifyPlaybackStateChange(message.getString("playbackState"));
-                    } else if ("GeckoView:MediaVolumeChanged".equals(event)) {
-                        element.notifyVolumeChange(message.getDouble("volume"), message.getBoolean("muted"));
-                    } else if ("GeckoView:MediaRateChanged".equals(event)) {
-                        element.notifyPlaybackRateChange(message.getDouble("rate"));
-                    } else if ("GeckoView:MediaFullscreenChanged".equals(event)) {
-                        element.notifyFullscreenChange(message.getBoolean("fullscreen"));
-                    } else if ("GeckoView:MediaRemove".equals(event)) {
-                        delegate.onMediaRemove(GeckoSession.this, element);
-                        mMediaElements.remove(element.getVideoId());
-                    } else if ("GeckoView:MediaError".equals(event)) {
-                        element.notifyError(message.getInt("code"));
-                    } else {
-                        throw new UnsupportedOperationException(event + " media message not implemented");
-                    }
+        @Override
+        public void handleMessage(final MediaDelegate delegate,
+                                  final String event,
+                                  final GeckoBundle message,
+                                  final EventCallback callback) {
+            if ("GeckoView:MediaAdd".equals(event)) {
+                final MediaElement element = new MediaElement(message.getLong("id"), GeckoSession.this);
+                delegate.onMediaAdd(GeckoSession.this, element);
+                return;
+            } else if ("GeckoView:MediaRemoveAll".equals(event)) {
+                for (int i = 0; i < mMediaElements.size(); i++) {
+                    final long key = mMediaElements.keyAt(i);
+                    delegate.onMediaRemove(GeckoSession.this, mMediaElements.get(key));
                 }
-            };
+                mMediaElements.clear();
+                return;
+            }
+
+            final long id = message.getLong("id", 0);
+            final MediaElement element = mMediaElements.get(id);
+            if (element == null) {
+                Log.w(LOGTAG, "MediaElement not found for '" + id + "'");
+                return;
+            }
+
+            if ("GeckoView:MediaTimeChanged".equals(event)) {
+                element.notifyTimeChange(message.getDouble("time"));
+            } else if ("GeckoView:MediaProgress".equals(event)) {
+                element.notifyLoadProgress(message);
+            } else if ("GeckoView:MediaMetadataChanged".equals(event)) {
+                element.notifyMetadataChange(message);
+            } else if ("GeckoView:MediaReadyStateChanged".equals(event)) {
+                element.notifyReadyStateChange(message.getInt("readyState"));
+            } else if ("GeckoView:MediaPlaybackStateChanged".equals(event)) {
+                element.notifyPlaybackStateChange(message.getString("playbackState"));
+            } else if ("GeckoView:MediaVolumeChanged".equals(event)) {
+                element.notifyVolumeChange(message.getDouble("volume"), message.getBoolean("muted"));
+            } else if ("GeckoView:MediaRateChanged".equals(event)) {
+                element.notifyPlaybackRateChange(message.getDouble("rate"));
+            } else if ("GeckoView:MediaFullscreenChanged".equals(event)) {
+                element.notifyFullscreenChange(message.getBoolean("fullscreen"));
+            } else if ("GeckoView:MediaRemove".equals(event)) {
+                delegate.onMediaRemove(GeckoSession.this, element);
+                mMediaElements.remove(element.getVideoId());
+            } else if ("GeckoView:MediaError".equals(event)) {
+                element.notifyError(message.getInt("code"));
+            } else {
+                throw new UnsupportedOperationException(event + " media message not implemented");
+            }
+        }
+    };
 
 
     /* package */ int handlersCount;
 
     private final GeckoSessionHandler<?>[] mSessionHandlers = new GeckoSessionHandler<?>[] {
         mContentHandler, mHistoryHandler, mMediaHandler, mNavigationHandler,
         mPermissionHandler, mProgressHandler, mScrollHandler, mSelectionActionDelegate,
         mContentBlockingHandler
--- a/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoSessionSettings.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoSessionSettings.java
@@ -687,21 +687,21 @@ public final class GeckoSessionSettings 
 
     // AIDL code may call readFromParcel even though it's not part of Parcelable.
     public void readFromParcel(final @NonNull Parcel source) {
         mBundle.readFromParcel(source);
     }
 
     public static final Parcelable.Creator<GeckoSessionSettings> CREATOR
             = new Parcelable.Creator<GeckoSessionSettings>() {
-        @Override
-        public GeckoSessionSettings createFromParcel(final Parcel in) {
-            final GeckoSessionSettings settings = new GeckoSessionSettings();
-            settings.readFromParcel(in);
-            return settings;
-        }
+                @Override
+                public GeckoSessionSettings createFromParcel(final Parcel in) {
+                    final GeckoSessionSettings settings = new GeckoSessionSettings();
+                    settings.readFromParcel(in);
+                    return settings;
+                }
 
-        @Override
-        public GeckoSessionSettings[] newArray(final int size) {
-            return new GeckoSessionSettings[size];
-        }
-    };
+                @Override
+                public GeckoSessionSettings[] newArray(final int size) {
+                    return new GeckoSessionSettings[size];
+                }
+            };
 }
--- a/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoVRManager.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoVRManager.java
@@ -19,23 +19,22 @@ import org.mozilla.gecko.annotation.Wrap
  */
 public class GeckoVRManager {
     private static long mExternalContext;
 
     private GeckoVRManager() {}
 
     @WrapForJNI
     private static synchronized long getExternalContext() {
-      return mExternalContext;
+        return mExternalContext;
     }
 
     /**
      * Sets the external VR context.
      * The external VR context is defined
      * <a href="https://searchfox.org/mozilla-central/source/gfx/vr/external_api/moz_external_vr.h" target="_blank">here</a>.
      * @param externalContext A pointer to the external VR context.
      */
     @AnyThread
     public static synchronized void setExternalContext(final long externalContext) {
         mExternalContext = externalContext;
     }
-
 }
--- a/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/SessionAccessibility.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/SessionAccessibility.java
@@ -80,32 +80,32 @@ public class SessionAccessibility {
     @WrapForJNI static final int CLASSNAME_RADIOBUTTON = 10;
     @WrapForJNI static final int CLASSNAME_SEEKBAR = 11;
     @WrapForJNI static final int CLASSNAME_SPINNER = 12;
     @WrapForJNI static final int CLASSNAME_TABWIDGET = 13;
     @WrapForJNI static final int CLASSNAME_TOGGLEBUTTON = 14;
     @WrapForJNI static final int CLASSNAME_WEBVIEW = 15;
 
     private static final String[] CLASSNAMES = {
-            "android.view.View",
-            "android.widget.Button",
-            "android.widget.CheckBox",
-            "android.app.Dialog",
-            "android.widget.EditText",
-            "android.widget.GridView",
-            "android.widget.Image",
-            "android.widget.ListView",
-            "android.view.MenuItem",
-            "android.widget.ProgressBar",
-            "android.widget.RadioButton",
-            "android.widget.SeekBar",
-            "android.widget.Spinner",
-            "android.widget.TabWidget",
-            "android.widget.ToggleButton",
-            "android.webkit.WebView"
+        "android.view.View",
+        "android.widget.Button",
+        "android.widget.CheckBox",
+        "android.app.Dialog",
+        "android.widget.EditText",
+        "android.widget.GridView",
+        "android.widget.Image",
+        "android.widget.ListView",
+        "android.view.MenuItem",
+        "android.widget.ProgressBar",
+        "android.widget.RadioButton",
+        "android.widget.SeekBar",
+        "android.widget.Spinner",
+        "android.widget.TabWidget",
+        "android.widget.ToggleButton",
+        "android.webkit.WebView"
     };
 
     static private String getClassName(final int index) {
         if (index >= 0 && index < CLASSNAMES.length) {
             return CLASSNAMES[index];
         }
 
         Log.e(LOGTAG, "Index " + index + " our of CLASSNAME bounds.");
@@ -136,112 +136,112 @@ public class SessionAccessibility {
         }
 
         @Override
         public boolean performAction(final int virtualViewId, final int action,
                                      final Bundle arguments) {
             final GeckoBundle data;
 
             switch (action) {
-            case AccessibilityNodeInfo.ACTION_CLEAR_ACCESSIBILITY_FOCUS:
-                sendEvent(AccessibilityEvent.TYPE_VIEW_ACCESSIBILITY_FOCUS_CLEARED, virtualViewId, CLASSNAME_UNKNOWN, null);
-                return true;
-            case AccessibilityNodeInfo.ACTION_ACCESSIBILITY_FOCUS:
+                case AccessibilityNodeInfo.ACTION_CLEAR_ACCESSIBILITY_FOCUS:
+                    sendEvent(AccessibilityEvent.TYPE_VIEW_ACCESSIBILITY_FOCUS_CLEARED, virtualViewId, CLASSNAME_UNKNOWN, null);
+                    return true;
+                case AccessibilityNodeInfo.ACTION_ACCESSIBILITY_FOCUS:
                     if (virtualViewId == View.NO_ID) {
                         sendEvent(AccessibilityEvent.TYPE_VIEW_ACCESSIBILITY_FOCUSED, View.NO_ID, CLASSNAME_WEBVIEW, null);
                     } else {
                         if (mFocusedNode == virtualViewId) {
                             mSession.getEventDispatcher().dispatch("GeckoView:AccessibilityCursorToFocused", null);
                         } else {
                             sendEvent(AccessibilityEvent.TYPE_VIEW_ACCESSIBILITY_FOCUSED, virtualViewId, CLASSNAME_UNKNOWN, null);
                         }
                     }
-                return true;
-            case AccessibilityNodeInfo.ACTION_CLICK:
-                nativeProvider.click(virtualViewId);
-                GeckoBundle nodeInfo = getMostRecentBundle(virtualViewId);
-                if (nodeInfo != null) {
-                    if ((nodeInfo.getInt("flags") & (FLAG_SELECTABLE | FLAG_CHECKABLE)) == 0) {
-                        sendEvent(AccessibilityEvent.TYPE_VIEW_CLICKED, virtualViewId, nodeInfo.getInt("className"), null);
+                    return true;
+                case AccessibilityNodeInfo.ACTION_CLICK:
+                    nativeProvider.click(virtualViewId);
+                    GeckoBundle nodeInfo = getMostRecentBundle(virtualViewId);
+                    if (nodeInfo != null) {
+                        if ((nodeInfo.getInt("flags") & (FLAG_SELECTABLE | FLAG_CHECKABLE)) == 0) {
+                            sendEvent(AccessibilityEvent.TYPE_VIEW_CLICKED, virtualViewId, nodeInfo.getInt("className"), null);
+                        }
+                    }
+                    return true;
+                case AccessibilityNodeInfo.ACTION_LONG_CLICK:
+                    mSession.getEventDispatcher().dispatch("GeckoView:AccessibilityLongPress", null);
+                    return true;
+                case AccessibilityNodeInfo.ACTION_SCROLL_FORWARD:
+                    mSession.getEventDispatcher().dispatch("GeckoView:AccessibilityScrollForward", null);
+                    return true;
+                case AccessibilityNodeInfo.ACTION_SCROLL_BACKWARD:
+                    mSession.getEventDispatcher().dispatch("GeckoView:AccessibilityScrollBackward", null);
+                    return true;
+                case AccessibilityNodeInfo.ACTION_SELECT:
+                    nativeProvider.click(virtualViewId);
+                    return true;
+                case AccessibilityNodeInfo.ACTION_NEXT_HTML_ELEMENT:
+                case AccessibilityNodeInfo.ACTION_PREVIOUS_HTML_ELEMENT:
+                    if (arguments != null) {
+                        data = new GeckoBundle(1);
+                        data.putString("rule", arguments.getString(AccessibilityNodeInfo.ACTION_ARGUMENT_HTML_ELEMENT_STRING));
+                    } else {
+                        data = null;
                     }
-                }
-                return true;
-            case AccessibilityNodeInfo.ACTION_LONG_CLICK:
-                mSession.getEventDispatcher().dispatch("GeckoView:AccessibilityLongPress", null);
-                return true;
-            case AccessibilityNodeInfo.ACTION_SCROLL_FORWARD:
-                mSession.getEventDispatcher().dispatch("GeckoView:AccessibilityScrollForward", null);
-                return true;
-            case AccessibilityNodeInfo.ACTION_SCROLL_BACKWARD:
-                mSession.getEventDispatcher().dispatch("GeckoView:AccessibilityScrollBackward", null);
-                return true;
-            case AccessibilityNodeInfo.ACTION_SELECT:
-                nativeProvider.click(virtualViewId);
-                return true;
-            case AccessibilityNodeInfo.ACTION_NEXT_HTML_ELEMENT:
-            case AccessibilityNodeInfo.ACTION_PREVIOUS_HTML_ELEMENT:
-                if (arguments != null) {
+                    mSession.getEventDispatcher().dispatch(action == AccessibilityNodeInfo.ACTION_NEXT_HTML_ELEMENT ?
+                                                           "GeckoView:AccessibilityNext" : "GeckoView:AccessibilityPrevious", data);
+                    return true;
+                case AccessibilityNodeInfo.ACTION_NEXT_AT_MOVEMENT_GRANULARITY:
+                case AccessibilityNodeInfo.ACTION_PREVIOUS_AT_MOVEMENT_GRANULARITY:
+                    // XXX: Self brailling gives this action with a bogus argument instead of an actual click action;
+                    // the argument value is the BRAILLE_CLICK_BASE_INDEX - the index of the routing key that was hit.
+                    // Other negative values are used by ChromeVox, but we don't support them.
+                    // FAKE_GRANULARITY_READ_CURRENT = -1
+                    // FAKE_GRANULARITY_READ_TITLE = -2
+                    // FAKE_GRANULARITY_STOP_SPEECH = -3
+                    // FAKE_GRANULARITY_CHANGE_SHIFTER = -4
+                    int granularity = arguments.getInt(AccessibilityNodeInfo.ACTION_ARGUMENT_MOVEMENT_GRANULARITY_INT);
+                    if (granularity <= BRAILLE_CLICK_BASE_INDEX) {
+                        int keyIndex = BRAILLE_CLICK_BASE_INDEX - granularity;
+                        data = new GeckoBundle(1);
+                        data.putInt("keyIndex", keyIndex);
+                        mSession.getEventDispatcher().dispatch("GeckoView:AccessibilityActivate", data);
+                    } else if (granularity > 0) {
+                        boolean extendSelection = arguments.getBoolean(AccessibilityNodeInfo.ACTION_ARGUMENT_EXTEND_SELECTION_BOOLEAN);
+                        data = new GeckoBundle(3);
+                        data.putString("direction", action == AccessibilityNodeInfo.ACTION_NEXT_AT_MOVEMENT_GRANULARITY ? "Next" : "Previous");
+                        data.putInt("granularity", granularity);
+                        data.putBoolean("select", extendSelection);
+                        mSession.getEventDispatcher().dispatch("GeckoView:AccessibilityByGranularity", data);
+                    }
+                    return true;
+                case AccessibilityNodeInfo.ACTION_SET_SELECTION:
+                    if (arguments == null) {
+                        return false;
+                    }
+                    int selectionStart = arguments.getInt(AccessibilityNodeInfo.ACTION_ARGUMENT_SELECTION_START_INT);
+                    int selectionEnd = arguments.getInt(AccessibilityNodeInfo.ACTION_ARGUMENT_SELECTION_END_INT);
+                    data = new GeckoBundle(2);
+                    data.putInt("start", selectionStart);
+                    data.putInt("end", selectionEnd);
+                    mSession.getEventDispatcher().dispatch("GeckoView:AccessibilitySetSelection", data);
+                    return true;
+                case AccessibilityNodeInfo.ACTION_CUT:
+                case AccessibilityNodeInfo.ACTION_COPY:
+                case AccessibilityNodeInfo.ACTION_PASTE:
                     data = new GeckoBundle(1);
-                    data.putString("rule", arguments.getString(AccessibilityNodeInfo.ACTION_ARGUMENT_HTML_ELEMENT_STRING));
-                } else {
-                    data = null;
-                }
-                mSession.getEventDispatcher().dispatch(action == AccessibilityNodeInfo.ACTION_NEXT_HTML_ELEMENT ?
-                                                       "GeckoView:AccessibilityNext" : "GeckoView:AccessibilityPrevious", data);
-                return true;
-            case AccessibilityNodeInfo.ACTION_NEXT_AT_MOVEMENT_GRANULARITY:
-            case AccessibilityNodeInfo.ACTION_PREVIOUS_AT_MOVEMENT_GRANULARITY:
-                // XXX: Self brailling gives this action with a bogus argument instead of an actual click action;
-                // the argument value is the BRAILLE_CLICK_BASE_INDEX - the index of the routing key that was hit.
-                // Other negative values are used by ChromeVox, but we don't support them.
-                // FAKE_GRANULARITY_READ_CURRENT = -1
-                // FAKE_GRANULARITY_READ_TITLE = -2
-                // FAKE_GRANULARITY_STOP_SPEECH = -3
-                // FAKE_GRANULARITY_CHANGE_SHIFTER = -4
-                int granularity = arguments.getInt(AccessibilityNodeInfo.ACTION_ARGUMENT_MOVEMENT_GRANULARITY_INT);
-                if (granularity <= BRAILLE_CLICK_BASE_INDEX) {
-                    int keyIndex = BRAILLE_CLICK_BASE_INDEX - granularity;
-                    data = new GeckoBundle(1);
-                    data.putInt("keyIndex", keyIndex);
-                    mSession.getEventDispatcher().dispatch("GeckoView:AccessibilityActivate", data);
-                } else if (granularity > 0) {
-                    boolean extendSelection = arguments.getBoolean(AccessibilityNodeInfo.ACTION_ARGUMENT_EXTEND_SELECTION_BOOLEAN);
-                    data = new GeckoBundle(3);
-                    data.putString("direction", action == AccessibilityNodeInfo.ACTION_NEXT_AT_MOVEMENT_GRANULARITY ? "Next" : "Previous");
-                    data.putInt("granularity", granularity);
-                    data.putBoolean("select", extendSelection);
-                    mSession.getEventDispatcher().dispatch("GeckoView:AccessibilityByGranularity", data);
-                }
-                return true;
-            case AccessibilityNodeInfo.ACTION_SET_SELECTION:
-                if (arguments == null) {
-                    return false;
-                }
-                int selectionStart = arguments.getInt(AccessibilityNodeInfo.ACTION_ARGUMENT_SELECTION_START_INT);
-                int selectionEnd = arguments.getInt(AccessibilityNodeInfo.ACTION_ARGUMENT_SELECTION_END_INT);
-                data = new GeckoBundle(2);
-                data.putInt("start", selectionStart);
-                data.putInt("end", selectionEnd);
-                mSession.getEventDispatcher().dispatch("GeckoView:AccessibilitySetSelection", data);
-                return true;
-            case AccessibilityNodeInfo.ACTION_CUT:
-            case AccessibilityNodeInfo.ACTION_COPY:
-            case AccessibilityNodeInfo.ACTION_PASTE:
-                data = new GeckoBundle(1);
-                data.putInt("action", action);
-                mSession.getEventDispatcher().dispatch("GeckoView:AccessibilityClipboard", data);
-                return true;
-            case AccessibilityNodeInfo.ACTION_SET_TEXT:
-                final String value = arguments.getString(Build.VERSION.SDK_INT >= 21
-                        ? AccessibilityNodeInfo.ACTION_ARGUMENT_SET_TEXT_CHARSEQUENCE
-                        : ACTION_ARGUMENT_SET_TEXT_CHARSEQUENCE);
-                if (mAttached) {
-                    nativeProvider.setText(virtualViewId, value);
-                }
-                return true;
+                    data.putInt("action", action);
+                    mSession.getEventDispatcher().dispatch("GeckoView:AccessibilityClipboard", data);
+                    return true;
+                case AccessibilityNodeInfo.ACTION_SET_TEXT:
+                    final String value = arguments.getString(Build.VERSION.SDK_INT >= 21
+                            ? AccessibilityNodeInfo.ACTION_ARGUMENT_SET_TEXT_CHARSEQUENCE
+                            : ACTION_ARGUMENT_SET_TEXT_CHARSEQUENCE);
+                    if (mAttached) {
+                        nativeProvider.setText(virtualViewId, value);
+                    }
+                    return true;
             }
 
             return mView.performAccessibilityAction(action, arguments);
         }
 
         @Override
         public AccessibilityNodeInfo findFocus(final int focus) {
             switch (focus) {
@@ -252,17 +252,17 @@ public class SessionAccessibility {
                     break;
                 case AccessibilityNodeInfo.FOCUS_INPUT:
                     if (mFocusedNode != 0) {
                         return createAccessibilityNodeInfo(mFocusedNode);
                     }
                     break;
             }
 
-          return super.findFocus(focus);
+            return super.findFocus(focus);
         }
 
         private AccessibilityNodeInfo getNodeFromGecko(final int virtualViewId) {
             AccessibilityNodeInfo node = AccessibilityNodeInfo.obtain(mView, virtualViewId);
             populateNodeFromBundle(node, nativeProvider.getNodeInfo(virtualViewId), false);
             return node;
         }
 
@@ -550,34 +550,22 @@ public class SessionAccessibility {
         private static volatile boolean sTouchExplorationEnabled;
         /* package */ static volatile boolean sForceEnabled;
 
         static {
             final Context context = GeckoAppShell.getApplicationContext();
             AccessibilityManager accessibilityManager =
                 (AccessibilityManager) context.getSystemService(Context.ACCESSIBILITY_SERVICE);
 
-            accessibilityManager.addAccessibilityStateChangeListener(
-            new AccessibilityManager.AccessibilityStateChangeListener() {
-                @Override
-                public void onAccessibilityStateChanged(final boolean enabled) {
-                    updateAccessibilitySettings();
-                }
-            }
-            );
+            accessibilityManager.addAccessibilityStateChangeListener(enabled ->
+                    updateAccessibilitySettings());
 
             if (Build.VERSION.SDK_INT >= 19) {
-                accessibilityManager.addTouchExplorationStateChangeListener(
-                new AccessibilityManager.TouchExplorationStateChangeListener() {
-                    @Override
-                    public void onTouchExplorationStateChanged(final boolean enabled) {
-                        updateAccessibilitySettings();
-                    }
-                }
-                );
+                accessibilityManager.addTouchExplorationStateChangeListener(enabled ->
+                        updateAccessibilitySettings());
             }
 
             PrefsHelper.PrefHandler prefHandler = new PrefsHelper.PrefHandlerBase() {
                 @Override
                 public void prefValue(final String pref, final int value) {
                     if (pref.equals(FORCE_ACCESSIBILITY_PREF)) {
                         sForceEnabled = value < 0;
                         dispatch();