Bug 1512274 - [geckoview] Make all local variables be lowerCamelCase. r=geckoview-reviewers,snorp
☠☠ backed out by 1f911d12fd07 ☠ ☠
authorAgi Sferro <agi@mozilla.com>
Fri, 15 Mar 2019 18:08:42 +0000
changeset 522088 60897ab005748ea3b73825e6502518b6ab3684d7
parent 522087 5d02f27fe1747a473a400e8473dc3acf0a365ea1
child 522089 c34445b1db88d8ec628dbbcbd4b2b62b17f67fe9
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] Make all local variables be lowerCamelCase. r=geckoview-reviewers,snorp Depends on D23685 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()