Bug 1258789 - Add binary logic operators for WhitespaceAround. r=grisha draft
authorMichael Comella <michael.l.comella@gmail.com>
Tue, 12 Apr 2016 18:10:55 -0700
changeset 350240 c414f36187da86390b633357232c883668f9afe1
parent 350239 af95f21ba76cf1ceb4f935d1d9947c9f2a9187f2
child 350241 e387c2bce427e33185c4dabdec7b169ef5133de8
push id15281
push usermichael.l.comella@gmail.com
push dateWed, 13 Apr 2016 02:23:27 +0000
reviewersgrisha
bugs1258789
milestone48.0a1
Bug 1258789 - Add binary logic operators for WhitespaceAround. r=grisha MozReview-Commit-ID: 12BUCUmassJ
mobile/android/app/checkstyle.xml
mobile/android/base/java/org/mozilla/gecko/ActionModeCompat.java
mobile/android/base/java/org/mozilla/gecko/lwt/LightweightTheme.java
--- a/mobile/android/app/checkstyle.xml
+++ b/mobile/android/app/checkstyle.xml
@@ -49,13 +49,13 @@
             <property name="tokens" value="IMPORT,PACKAGE_DEF"/>
         </module>
         <module name="OuterTypeFilename"/> <!-- `class Lol` only in Lol.java -->
         <module name="WhitespaceAfter">
             <!-- TODO: (bug 1263059) Remove specific tokens to enable CAST check. -->
             <property name="tokens" value="COMMA, SEMI"/>
         </module>
         <module name="WhitespaceAround">
-            <property name="tokens" value="ASSIGN"/>
+            <property name="tokens" value="ASSIGN, BAND, BAND_ASSIGN, BOR, BOR_ASSIGN, BSR, BSR_ASSIGN, BXOR, BXOR_ASSIGN"/>
         </module>
     </module>
 
 </module>
--- a/mobile/android/base/java/org/mozilla/gecko/ActionModeCompat.java
+++ b/mobile/android/base/java/org/mozilla/gecko/ActionModeCompat.java
@@ -116,12 +116,12 @@ class ActionModeCompat implements GeckoP
         int[] location = new int[2];
         final View view = item.getActionView();
         view.getLocationOnScreen(location);
 
         int xOffset = location[0] - view.getWidth();
         int yOffset = location[1] + view.getHeight() / 2;
 
         Toast toast = Toast.makeText(view.getContext(), item.getTitle(), Toast.LENGTH_SHORT);
-        toast.setGravity(Gravity.TOP|Gravity.LEFT, xOffset, yOffset);
+        toast.setGravity(Gravity.TOP | Gravity.LEFT, xOffset, yOffset);
         toast.show();
     }
 }
--- a/mobile/android/base/java/org/mozilla/gecko/lwt/LightweightTheme.java
+++ b/mobile/android/base/java/org/mozilla/gecko/lwt/LightweightTheme.java
@@ -244,17 +244,17 @@ public class LightweightTheme implements
             // Malformed or missing color.
             // Default to TRANSPARENT.
             mColor = Color.TRANSPARENT;
         }
 
         // Calculate the luminance to determine if it's a light or a dark theme.
         double luminance = (0.2125 * ((mColor & 0x00FF0000) >> 16)) +
                            (0.7154 * ((mColor & 0x0000FF00) >> 8)) +
-                           (0.0721 * (mColor &0x000000FF));
+                           (0.0721 * (mColor & 0x000000FF));
         mIsLight = luminance > 110;
 
         // The bitmap image might be smaller than the device's width.
         // If it's smaller, fill the extra space on the left with the dominant color.
         if (bitmapWidth >= maxWidth) {
             mBitmap = Bitmap.createBitmap(bitmap, bitmapWidth - maxWidth, 0, maxWidth, bitmapHeight);
         } else {
             Paint paint = new Paint();