Bug 1512274 - [geckoview] Make all local variables be lowerCamelCase. r=geckoview-reviewers,snorp
authorAgi Sferro <agi@mozilla.com>
Fri, 15 Mar 2019 21:21:03 +0000
changeset 464452 eedd3b996ae5
parent 464451 019476ee908e
child 464453 4253ecfe57e9
push id35716
push useraciure@mozilla.com
push dateSun, 17 Mar 2019 09:42:17 +0000
treeherdermozilla-central@8ee97c045359 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgeckoview-reviewers, snorp
bugs1512274
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1512274 - [geckoview] Make all local variables be lowerCamelCase. r=geckoview-reviewers,snorp Differential Revision: https://phabricator.services.mozilla.com/D23686
mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoAppShell.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
@@ -409,59 +409,59 @@ public class GeckoAppShell
                                                      WakeLockDelegate,
                                                      HapticFeedbackDelegate {
         @Override
         public void onAccuracyChanged(final Sensor sensor, final int accuracy) {
         }
 
         @Override
         public void onSensorChanged(final SensorEvent s) {
-            int sensor_type = s.sensor.getType();
-            int hal_type = 0;
+            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 (sensor_type) {
+            switch (sensorType) {
             case Sensor.TYPE_ACCELEROMETER:
             case Sensor.TYPE_LINEAR_ACCELERATION:
             case Sensor.TYPE_ORIENTATION:
-                if (sensor_type == Sensor.TYPE_ACCELEROMETER) {
-                    hal_type = GeckoHalDefines.SENSOR_ACCELERATION;
-                } else if (sensor_type == Sensor.TYPE_LINEAR_ACCELERATION) {
-                    hal_type = GeckoHalDefines.SENSOR_LINEAR_ACCELERATION;
+                if (sensorType == Sensor.TYPE_ACCELEROMETER) {
+                    halType = GeckoHalDefines.SENSOR_ACCELERATION;
+                } else if (sensorType == Sensor.TYPE_LINEAR_ACCELERATION) {
+                    halType = GeckoHalDefines.SENSOR_LINEAR_ACCELERATION;
                 } else {
-                    hal_type = GeckoHalDefines.SENSOR_ORIENTATION;
+                    halType = GeckoHalDefines.SENSOR_ORIENTATION;
                 }
                 x = s.values[0];
                 y = s.values[1];
                 z = s.values[2];
                 break;
 
             case Sensor.TYPE_GYROSCOPE:
-                hal_type = GeckoHalDefines.SENSOR_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:
-                hal_type = GeckoHalDefines.SENSOR_PROXIMITY;
+                halType = GeckoHalDefines.SENSOR_PROXIMITY;
                 x = s.values[0];
                 z = s.sensor.getMaximumRange();
                 break;
 
             case Sensor.TYPE_LIGHT:
-                hal_type = GeckoHalDefines.SENSOR_LIGHT;
+                halType = GeckoHalDefines.SENSOR_LIGHT;
                 x = s.values[0];
                 break;
 
             case Sensor.TYPE_ROTATION_VECTOR:
             case Sensor.TYPE_GAME_ROTATION_VECTOR: // API >= 18
-                hal_type = (sensor_type == Sensor.TYPE_ROTATION_VECTOR ?
+                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 {
@@ -470,17 +470,17 @@ public class GeckoAppShell
                     // 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(hal_type, x, y, z, w, time);
+            GeckoAppShell.onSensorChanged(halType, x, y, z, w, time);
         }
 
         // Geolocation.
         @Override
         public void onLocationChanged(final Location location) {
             // No logging here: user-identifying information.
 
             double altitude = location.hasAltitude()