Bug 1258789 - Add binary logic operators for WhitespaceAround. r=grisha
MozReview-Commit-ID: 12BUCUmassJ
--- 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();